@app-swiss-knife/react-native-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +182 -0
- package/SwissKnifePurchases.podspec +40 -0
- package/android/build.gradle +89 -0
- package/android/gradle.properties +3 -0
- package/android/src/main/AndroidManifest.xml +26 -0
- package/android/src/main/java/com/swissknife/crashreporting/SKCrashReportingModule.kt +216 -0
- package/android/src/main/java/com/swissknife/crashreporting/SKCrashReportingPackage.kt +17 -0
- package/android/src/main/java/com/swissknife/purchases/Conversions.kt +15 -0
- package/android/src/main/java/com/swissknife/purchases/SwissKnifeJson.kt +371 -0
- package/android/src/main/java/com/swissknife/purchases/SwissKnifePurchasesModule.kt +497 -0
- package/android/src/main/java/com/swissknife/purchases/SwissKnifePurchasesPackage.kt +25 -0
- package/android/vendor/GENERATED.md +10 -0
- package/android/vendor/java/com/appswissknife/SwissKnife.kt +533 -0
- package/android/vendor/java/com/appswissknife/analytics/EventQueueStore.kt +326 -0
- package/android/vendor/java/com/appswissknife/analytics/FlushEventsWorker.kt +296 -0
- package/android/vendor/java/com/appswissknife/analytics/SKAnalytics.kt +503 -0
- package/android/vendor/java/com/appswissknife/attributes/AttributesClient.kt +188 -0
- package/android/vendor/java/com/appswissknife/attributes/SetAttributesWorker.kt +204 -0
- package/android/vendor/java/com/appswissknife/attribution/Attribution.kt +447 -0
- package/android/vendor/java/com/appswissknife/context/AppLifecycle.kt +120 -0
- package/android/vendor/java/com/appswissknife/context/Clock.kt +70 -0
- package/android/vendor/java/com/appswissknife/context/DeviceContext.kt +138 -0
- package/android/vendor/java/com/appswissknife/context/IDs.kt +55 -0
- package/android/vendor/java/com/appswissknife/context/Reachability.kt +145 -0
- package/android/vendor/java/com/appswissknife/context/Session.kt +192 -0
- package/android/vendor/java/com/appswissknife/crashreporting/SKCrashReporting.kt +945 -0
- package/android/vendor/java/com/appswissknife/crashreporting/SKScreenshot.kt +201 -0
- package/android/vendor/java/com/appswissknife/device/DeviceID.kt +172 -0
- package/android/vendor/java/com/appswissknife/diagnostics/SKLog.kt +97 -0
- package/android/vendor/java/com/appswissknife/entitlements/EntitlementsRepository.kt +495 -0
- package/android/vendor/java/com/appswissknife/identity/Identity.kt +522 -0
- package/android/vendor/java/com/appswissknife/models/CustomerInfo.kt +67 -0
- package/android/vendor/java/com/appswissknife/models/Enums.kt +35 -0
- package/android/vendor/java/com/appswissknife/models/Offerings.kt +80 -0
- package/android/vendor/java/com/appswissknife/models/PurchasesError.kt +89 -0
- package/android/vendor/java/com/appswissknife/models/StoreTransaction.kt +17 -0
- package/android/vendor/java/com/appswissknife/net/BackendHttpClient.kt +507 -0
- package/android/vendor/java/com/appswissknife/net/ExponentialBackoff.kt +69 -0
- package/android/vendor/java/com/appswissknife/net/IngestClient.kt +582 -0
- package/android/vendor/java/com/appswissknife/net/OfflineQueueStore.kt +320 -0
- package/android/vendor/java/com/appswissknife/offerings/OfferingsRepository.kt +219 -0
- package/android/vendor/java/com/appswissknife/performance/SKFrameTracker.kt +94 -0
- package/android/vendor/java/com/appswissknife/performance/SKPerformance.kt +428 -0
- package/android/vendor/java/com/appswissknife/purchases/BillingClientGateway.kt +560 -0
- package/android/vendor/java/com/appswissknife/purchases/PlayPriceEnrichmentProvider.kt +100 -0
- package/android/vendor/java/com/appswissknife/purchases/PriceEnrichmentProvider.kt +36 -0
- package/android/vendor/java/com/appswissknife/purchases/PurchasesGateway.kt +120 -0
- package/android/vendor/res/xml/swissknife_data_extraction_rules.xml +20 -0
- package/ios/SwissKnifeCrashReporting.m +32 -0
- package/ios/SwissKnifeCrashReporting.swift +186 -0
- package/ios/SwissKnifeJSON.swift +347 -0
- package/ios/SwissKnifePurchases.m +124 -0
- package/ios/SwissKnifePurchases.swift +523 -0
- package/ios/vendor/GENERATED.md +10 -0
- package/ios/vendor/SwissKnifeiOS/Analytics/SKAnalytics.swift +488 -0
- package/ios/vendor/SwissKnifeiOS/AttributesClient.swift +460 -0
- package/ios/vendor/SwissKnifeiOS/Attribution/Attribution.swift +307 -0
- package/ios/vendor/SwissKnifeiOS/Attribution/AttributionNetwork.swift +92 -0
- package/ios/vendor/SwissKnifeiOS/Attribution/AttributionState.swift +141 -0
- package/ios/vendor/SwissKnifeiOS/Context/AppLifecycle.swift +130 -0
- package/ios/vendor/SwissKnifeiOS/Context/Clock.swift +100 -0
- package/ios/vendor/SwissKnifeiOS/Context/DeviceContext.swift +190 -0
- package/ios/vendor/SwissKnifeiOS/Context/IDs.swift +64 -0
- package/ios/vendor/SwissKnifeiOS/Context/Reachability.swift +121 -0
- package/ios/vendor/SwissKnifeiOS/Context/Session.swift +223 -0
- package/ios/vendor/SwissKnifeiOS/CrashReporting/SKCrashReporting.swift +1287 -0
- package/ios/vendor/SwissKnifeiOS/CrashReporting/SKScreenshot.swift +175 -0
- package/ios/vendor/SwissKnifeiOS/DeviceID.swift +161 -0
- package/ios/vendor/SwissKnifeiOS/Diagnostics/SKLog.swift +128 -0
- package/ios/vendor/SwissKnifeiOS/Identity/Identity.swift +323 -0
- package/ios/vendor/SwissKnifeiOS/Identity/IdentityNetwork.swift +70 -0
- package/ios/vendor/SwissKnifeiOS/Net/BackendHttpClient.swift +329 -0
- package/ios/vendor/SwissKnifeiOS/Net/ExponentialBackoff.swift +87 -0
- package/ios/vendor/SwissKnifeiOS/Net/IngestClient.swift +681 -0
- package/ios/vendor/SwissKnifeiOS/Net/OfflineQueueStore.swift +409 -0
- package/ios/vendor/SwissKnifeiOS/Performance/SKFrameTracker.swift +89 -0
- package/ios/vendor/SwissKnifeiOS/Performance/SKPerformance.swift +440 -0
- package/ios/vendor/SwissKnifeiOS/Performance/SKURLSessionDelegate.swift +87 -0
- package/ios/vendor/SwissKnifeiOS/Services/EntitlementsService.swift +646 -0
- package/ios/vendor/SwissKnifeiOS/Services/OfferingsService.swift +458 -0
- package/ios/vendor/SwissKnifeiOS/Services/PurchaseService.swift +374 -0
- package/ios/vendor/SwissKnifeiOS/SwissKnife+Analytics.swift +46 -0
- package/ios/vendor/SwissKnifeiOS/SwissKnife+DeviceID.swift +30 -0
- package/ios/vendor/SwissKnifeiOS/SwissKnife+Session.swift +47 -0
- package/ios/vendor/SwissKnifeiOS/SwissKnife.swift +417 -0
- package/ios/vendor/SwissKnifeiOS/Types.swift +496 -0
- package/lib/commonjs/attribution.js +55 -0
- package/lib/commonjs/attribution.js.map +1 -0
- package/lib/commonjs/identity.js +126 -0
- package/lib/commonjs/identity.js.map +1 -0
- package/lib/commonjs/index.js +118 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/modules/analytics.js +646 -0
- package/lib/commonjs/modules/analytics.js.map +1 -0
- package/lib/commonjs/modules/attachments.js +169 -0
- package/lib/commonjs/modules/attachments.js.map +1 -0
- package/lib/commonjs/modules/crash-reporting.js +1327 -0
- package/lib/commonjs/modules/crash-reporting.js.map +1 -0
- package/lib/commonjs/modules/ids.js +50 -0
- package/lib/commonjs/modules/ids.js.map +1 -0
- package/lib/commonjs/modules/log.js +59 -0
- package/lib/commonjs/modules/log.js.map +1 -0
- package/lib/commonjs/modules/offline-store.js +44 -0
- package/lib/commonjs/modules/offline-store.js.map +1 -0
- package/lib/commonjs/modules/performance.js +494 -0
- package/lib/commonjs/modules/performance.js.map +1 -0
- package/lib/commonjs/native/module.js +41 -0
- package/lib/commonjs/native/module.js.map +1 -0
- package/lib/commonjs/native/spec.js +26 -0
- package/lib/commonjs/native/spec.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/purchases.js +194 -0
- package/lib/commonjs/purchases.js.map +1 -0
- package/lib/commonjs/types.js +236 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/attribution.js +51 -0
- package/lib/module/attribution.js.map +1 -0
- package/lib/module/identity.js +122 -0
- package/lib/module/identity.js.map +1 -0
- package/lib/module/index.js +36 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/modules/analytics.js +642 -0
- package/lib/module/modules/analytics.js.map +1 -0
- package/lib/module/modules/attachments.js +162 -0
- package/lib/module/modules/attachments.js.map +1 -0
- package/lib/module/modules/crash-reporting.js +1320 -0
- package/lib/module/modules/crash-reporting.js.map +1 -0
- package/lib/module/modules/ids.js +44 -0
- package/lib/module/modules/ids.js.map +1 -0
- package/lib/module/modules/log.js +54 -0
- package/lib/module/modules/log.js.map +1 -0
- package/lib/module/modules/offline-store.js +39 -0
- package/lib/module/modules/offline-store.js.map +1 -0
- package/lib/module/modules/performance.js +491 -0
- package/lib/module/modules/performance.js.map +1 -0
- package/lib/module/native/module.js +34 -0
- package/lib/module/native/module.js.map +1 -0
- package/lib/module/native/spec.js +22 -0
- package/lib/module/native/spec.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/purchases.js +187 -0
- package/lib/module/purchases.js.map +1 -0
- package/lib/module/types.js +230 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/commonjs/attribution.d.ts +24 -0
- package/lib/typescript/commonjs/attribution.d.ts.map +1 -0
- package/lib/typescript/commonjs/identity.d.ts +37 -0
- package/lib/typescript/commonjs/identity.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +15 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/analytics.d.ts +127 -0
- package/lib/typescript/commonjs/modules/analytics.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/attachments.d.ts +50 -0
- package/lib/typescript/commonjs/modules/attachments.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/crash-reporting.d.ts +175 -0
- package/lib/typescript/commonjs/modules/crash-reporting.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/ids.d.ts +17 -0
- package/lib/typescript/commonjs/modules/ids.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/log.d.ts +12 -0
- package/lib/typescript/commonjs/modules/log.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/offline-store.d.ts +9 -0
- package/lib/typescript/commonjs/modules/offline-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/modules/performance.d.ts +75 -0
- package/lib/typescript/commonjs/modules/performance.d.ts.map +1 -0
- package/lib/typescript/commonjs/native/module.d.ts +6 -0
- package/lib/typescript/commonjs/native/module.d.ts.map +1 -0
- package/lib/typescript/commonjs/native/spec.d.ts +119 -0
- package/lib/typescript/commonjs/native/spec.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/purchases.d.ts +68 -0
- package/lib/typescript/commonjs/purchases.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts +384 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/module/attribution.d.ts +24 -0
- package/lib/typescript/module/attribution.d.ts.map +1 -0
- package/lib/typescript/module/identity.d.ts +37 -0
- package/lib/typescript/module/identity.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +15 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/modules/analytics.d.ts +127 -0
- package/lib/typescript/module/modules/analytics.d.ts.map +1 -0
- package/lib/typescript/module/modules/attachments.d.ts +50 -0
- package/lib/typescript/module/modules/attachments.d.ts.map +1 -0
- package/lib/typescript/module/modules/crash-reporting.d.ts +175 -0
- package/lib/typescript/module/modules/crash-reporting.d.ts.map +1 -0
- package/lib/typescript/module/modules/ids.d.ts +17 -0
- package/lib/typescript/module/modules/ids.d.ts.map +1 -0
- package/lib/typescript/module/modules/log.d.ts +12 -0
- package/lib/typescript/module/modules/log.d.ts.map +1 -0
- package/lib/typescript/module/modules/offline-store.d.ts +9 -0
- package/lib/typescript/module/modules/offline-store.d.ts.map +1 -0
- package/lib/typescript/module/modules/performance.d.ts +75 -0
- package/lib/typescript/module/modules/performance.d.ts.map +1 -0
- package/lib/typescript/module/native/module.d.ts +6 -0
- package/lib/typescript/module/native/module.d.ts.map +1 -0
- package/lib/typescript/module/native/spec.d.ts +119 -0
- package/lib/typescript/module/native/spec.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/purchases.d.ts +68 -0
- package/lib/typescript/module/purchases.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts +384 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/package.json +115 -0
- package/react-native.config.js +23 -0
- package/src/attribution.ts +56 -0
- package/src/identity.ts +133 -0
- package/src/index.ts +54 -0
- package/src/modules/analytics.ts +689 -0
- package/src/modules/attachments.ts +222 -0
- package/src/modules/crash-reporting.ts +1577 -0
- package/src/modules/ids.ts +41 -0
- package/src/modules/log.ts +56 -0
- package/src/modules/offline-store.ts +51 -0
- package/src/modules/performance.ts +589 -0
- package/src/native/module.ts +47 -0
- package/src/native/spec.ts +183 -0
- package/src/purchases.ts +214 -0
- package/src/types.ts +470 -0
package/src/identity.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// packages/react-native-sdk/src/identity.ts
|
|
2
|
+
//
|
|
3
|
+
// Wave 1 — unified `Identity` JS surface. Mirror of `SwissKnife.Identity`
|
|
4
|
+
// on iOS (Swift) and `com.appswissknife.identity.Identity` on Android
|
|
5
|
+
// (Kotlin). All logic lives natively — this module is a thin
|
|
6
|
+
// passthrough.
|
|
7
|
+
//
|
|
8
|
+
// Why JS doesn't keep its own state
|
|
9
|
+
// ---------------------------------
|
|
10
|
+
// Before Wave 1, `modules/analytics.ts` kept a JS-local `_userId` that
|
|
11
|
+
// drifted from the native state. After `Purchases.logIn("u_42")`, an
|
|
12
|
+
// immediate `Analytics.track(...)` emitted with `user_id: ""` because
|
|
13
|
+
// the JS module never heard about the new user id. The fix is to make
|
|
14
|
+
// native the single source of truth and have JS derive `user_id` from
|
|
15
|
+
// the native `Identity.current()` snapshot at event-build time. See
|
|
16
|
+
// `modules/analytics.ts` for that derivation.
|
|
17
|
+
//
|
|
18
|
+
// Observers
|
|
19
|
+
// ---------
|
|
20
|
+
// Native does NOT currently emit identity-change events over a
|
|
21
|
+
// `NativeEventEmitter` channel (would require another bridge plumbing
|
|
22
|
+
// pass). For now JS-side observers fire on the next `logIn` / `logOut`
|
|
23
|
+
// / `reset` / `wipe` call that originates from JS — they are NOT
|
|
24
|
+
// notified about identity changes triggered natively (e.g. silent push
|
|
25
|
+
// rebinding). When we need that, add a `Purchases-IdentityChanged`
|
|
26
|
+
// event to the native event emitter and subscribe here.
|
|
27
|
+
|
|
28
|
+
import { getNativeModule } from "./native/module";
|
|
29
|
+
import type { IdentityChange, IdentitySnapshot, LogInResult } from "./types";
|
|
30
|
+
|
|
31
|
+
type Observer = (change: IdentityChange) => void;
|
|
32
|
+
|
|
33
|
+
const observers = new Map<string, Observer>();
|
|
34
|
+
|
|
35
|
+
let lastSnapshot: IdentitySnapshot | null = null;
|
|
36
|
+
|
|
37
|
+
function generateToken(): string {
|
|
38
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
39
|
+
const r = (Math.random() * 16) | 0;
|
|
40
|
+
const v = c === "x" ? r : (r & 0x3) | 0x8;
|
|
41
|
+
return v.toString(16);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async function snapshotAndNotify(reason: "logIn" | "logOut" | "reset" | "wipe"): Promise<IdentitySnapshot> {
|
|
46
|
+
const previous = lastSnapshot;
|
|
47
|
+
const current = await getNativeModule().identityCurrent();
|
|
48
|
+
lastSnapshot = current;
|
|
49
|
+
if (previous && observers.size > 0) {
|
|
50
|
+
const change: IdentityChange = { previous, current };
|
|
51
|
+
// Fire observers off the awaited stack so a slow observer doesn't
|
|
52
|
+
// delay the caller's promise resolution.
|
|
53
|
+
void Promise.resolve().then(() => {
|
|
54
|
+
for (const observer of observers.values()) {
|
|
55
|
+
try {
|
|
56
|
+
observer(change);
|
|
57
|
+
} catch (e) {
|
|
58
|
+
console.warn(`[SwissKnife Identity] observer threw during ${reason}:`, e);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return current;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const Identity = {
|
|
67
|
+
/**
|
|
68
|
+
* Latest known identity snapshot. The first call hits the bridge;
|
|
69
|
+
* subsequent calls return the cached value updated by
|
|
70
|
+
* `logIn` / `logOut` / `reset` / `wipe`. Returns `null` only before
|
|
71
|
+
* the bridge has resolved.
|
|
72
|
+
*/
|
|
73
|
+
async current(): Promise<IdentitySnapshot> {
|
|
74
|
+
const current = await getNativeModule().identityCurrent();
|
|
75
|
+
lastSnapshot = current;
|
|
76
|
+
return current;
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Identify this device as a known user. Native posts the
|
|
81
|
+
* `(anonymous_id, user_id)` pair to `/api/sdk/users/identify` (the
|
|
82
|
+
* Wave 1 bug-fix; pre-Wave-1 Android did NOT post). Resolves once
|
|
83
|
+
* the backend ack + post-identify entitlements refresh complete.
|
|
84
|
+
*/
|
|
85
|
+
async logIn(userId: string): Promise<LogInResult> {
|
|
86
|
+
const result = await getNativeModule().identityLogIn(userId);
|
|
87
|
+
await snapshotAndNotify("logIn");
|
|
88
|
+
return result;
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
/** Revert to anonymous. DeviceID stays stable across logout. */
|
|
92
|
+
async logOut(): Promise<void> {
|
|
93
|
+
await getNativeModule().identityLogOut();
|
|
94
|
+
await snapshotAndNotify("logOut");
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Rotate in-memory state but keep persistent storage. Matches the
|
|
99
|
+
* "switch test user" UX semantic.
|
|
100
|
+
*/
|
|
101
|
+
async reset(): Promise<void> {
|
|
102
|
+
await getNativeModule().identityReset();
|
|
103
|
+
await snapshotAndNotify("reset");
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Hard wipe: clear Keychain (iOS) / EncryptedSharedPreferences
|
|
108
|
+
* (Android) DeviceID. GDPR-delete / test-build cleanup.
|
|
109
|
+
*/
|
|
110
|
+
async wipe(): Promise<void> {
|
|
111
|
+
await getNativeModule().identityWipe();
|
|
112
|
+
await snapshotAndNotify("wipe");
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
/** Subscribe to identity changes. Returns an unsubscribe token. */
|
|
116
|
+
addObserver(block: Observer): string {
|
|
117
|
+
const token = generateToken();
|
|
118
|
+
observers.set(token, block);
|
|
119
|
+
return token;
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
removeObserver(token: string): void {
|
|
123
|
+
observers.delete(token);
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
/** @internal Test seam — reset the cached snapshot + observers. */
|
|
127
|
+
__resetForTests(): void {
|
|
128
|
+
lastSnapshot = null;
|
|
129
|
+
observers.clear();
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export type { IdentitySnapshot, IdentityChange } from "./types";
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import Purchases from "./purchases";
|
|
3
|
+
|
|
4
|
+
// Default export mirrors react-native-purchases: `import Purchases from '...'`.
|
|
5
|
+
export default Purchases;
|
|
6
|
+
|
|
7
|
+
// Named export of the class for `import { Purchases } from '...'`.
|
|
8
|
+
export { Purchases };
|
|
9
|
+
|
|
10
|
+
// Public type/enum/error surface (CustomerInfo, PurchasesOfferings,
|
|
11
|
+
// PURCHASES_ERROR_CODE, LOG_LEVEL, the enums, PurchasesError, etc.) —
|
|
12
|
+
// defined in ./types (Phase 7: own definitions, no RC dependency).
|
|
13
|
+
export * from "./types";
|
|
14
|
+
|
|
15
|
+
// Wave 1 — unified Identity surface. Routes through native
|
|
16
|
+
// `SwissKnife.Identity` (iOS) / `com.appswissknife.identity.Identity`
|
|
17
|
+
// (Android). Decoupled from analytics: `Identity.logIn(...)` does NOT
|
|
18
|
+
// auto-emit a `$identify` event; call `Analytics.identify(...)`
|
|
19
|
+
// separately if you want retro-tagging.
|
|
20
|
+
export { Identity } from "./identity";
|
|
21
|
+
export type { IdentitySnapshot, IdentityChange } from "./identity";
|
|
22
|
+
|
|
23
|
+
// Wave 2 — Attribution. Routes through native
|
|
24
|
+
// `SwissKnife.Attribution` (iOS) / `com.appswissknife.attribution.Attribution`
|
|
25
|
+
// (Android). Native owns the ATT prompt orchestration, IDFA /
|
|
26
|
+
// AdvertisingId / InstallReferrer collection, and the disk-backed
|
|
27
|
+
// idempotency cache.
|
|
28
|
+
export { Attribution } from "./attribution";
|
|
29
|
+
export type { ResolvedAttribution } from "./attribution";
|
|
30
|
+
|
|
31
|
+
// Companion observability modules. These are used by the maestro-app E2E
|
|
32
|
+
// harness and any consumer that wants analytics / crash-reporting /
|
|
33
|
+
// performance alongside subscriptions. The Purchases surface is the SDK's
|
|
34
|
+
// primary product; these are additive.
|
|
35
|
+
export { Analytics, SKIdentify, SKRevenue } from "./modules/analytics";
|
|
36
|
+
export type { SKAnalyticsConfig, SKEvent } from "./modules/analytics";
|
|
37
|
+
export {
|
|
38
|
+
CrashReporting,
|
|
39
|
+
SKErrorBoundary,
|
|
40
|
+
parseStackTrace,
|
|
41
|
+
} from "./modules/crash-reporting";
|
|
42
|
+
export type {
|
|
43
|
+
CrashReportingConfig,
|
|
44
|
+
SKCrashEvent,
|
|
45
|
+
SKCrashBreadcrumb,
|
|
46
|
+
SKCrashUser,
|
|
47
|
+
} from "./modules/crash-reporting";
|
|
48
|
+
export { Performance } from "./modules/performance";
|
|
49
|
+
export type {
|
|
50
|
+
PerformanceConfig,
|
|
51
|
+
SKTransaction,
|
|
52
|
+
SKSpan,
|
|
53
|
+
SKStallMeasurements,
|
|
54
|
+
} from "./modules/performance";
|