@altcraft/react-native-sdk 0.0.1 → 0.0.2

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/src/NativeSdk.ts CHANGED
@@ -7,7 +7,16 @@ export type CategoryData = {
7
7
  title?: string | null;
8
8
  steady?: boolean | null;
9
9
  active?: boolean | null;
10
- }
10
+ };
11
+
12
+ export type UTM = {
13
+ campaign?: string | null;
14
+ content?: string | null;
15
+ keyword?: string | null;
16
+ medium?: string | null;
17
+ source?: string | null;
18
+ temp?: string | null;
19
+ };
11
20
 
12
21
  export type SubscriptionData = {
13
22
  subscriptionId?: string | null;
@@ -18,7 +27,7 @@ export type SubscriptionData = {
18
27
  fields?: { [key: string]: string } | null;
19
28
 
20
29
  cats?: CategoryData[] | null;
21
- }
30
+ };
22
31
 
23
32
  export interface ProfileData {
24
33
  id?: string | null;
@@ -85,7 +94,7 @@ export interface Spec extends TurboModule {
85
94
  setApnsToken(token: string | null): void; // iOS-only (no-op on Android)
86
95
  setRustoreToken(token: string | null): void; // Android-only (no-op on iOS)
87
96
 
88
- // subscription (✅ string maps in spec)
97
+ // subscription
89
98
  pushSubscribe(
90
99
  sync: boolean | null,
91
100
  profileFields: { [key: string]: string } | null,
@@ -140,10 +149,10 @@ export interface Spec extends TurboModule {
140
149
 
141
150
  // sdk
142
151
  clear(): Promise<void>;
143
- reinitializeRetryControlInThisSession(): void;
152
+ unlockInitOperationsInThisSession(): void;
144
153
  requestNotificationPermission(): void;
145
154
 
146
- // mobile events (✅ string maps in spec)
155
+ // mobile events
147
156
  mobileEvent(
148
157
  sid: string,
149
158
  eventName: string,
@@ -151,18 +160,28 @@ export interface Spec extends TurboModule {
151
160
  payload: { [key: string]: string } | null,
152
161
  matching: { [key: string]: string } | null,
153
162
  matchingType: string | null,
154
- profileFields: { [key: string]: string } | null
163
+ profileFields: { [key: string]: string } | null,
164
+ utm: UTM | null
155
165
  ): void;
156
166
 
167
+ // push event delivery
157
168
  deliveryEvent(
158
169
  message: { [key: string]: string } | null,
159
170
  messageUID: string | null
160
171
  ): void;
161
172
 
173
+ // push event open
162
174
  openEvent(
163
175
  message: { [key: string]: string } | null,
164
176
  messageUID: string | null
165
177
  ): void;
178
+
179
+ // set UserDefault
180
+ setUserDefaultsValue(
181
+ suiteName: string | null,
182
+ key: string,
183
+ value: string | null
184
+ ): void;
166
185
  }
167
186
 
168
187
  // ---------------- Export ----------------