@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/android/build.gradle +1 -1
- package/android/src/main/java/com/altcraft/sdk/SdkModule.kt +53 -529
- package/android/src/main/java/com/altcraft/sdk/interfaces/RnFCMProvider.kt +0 -1
- package/android/src/main/java/com/altcraft/sdk/utilities/Converter.kt +162 -0
- package/ios/Converter.swift +203 -0
- package/ios/Sdk.h +4 -3
- package/ios/Sdk.mm +74 -132
- package/ios/SdkModule.swift +260 -319
- package/lib/module/NativeSdk.js.map +1 -1
- package/lib/module/index.js +124 -341
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/NativeSdk.d.ts +11 -2
- package/lib/typescript/src/NativeSdk.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +69 -332
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeSdk.ts +25 -6
- package/src/index.tsx +170 -368
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
|
|
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
|
-
|
|
152
|
+
unlockInitOperationsInThisSession(): void;
|
|
144
153
|
requestNotificationPermission(): void;
|
|
145
154
|
|
|
146
|
-
// mobile events
|
|
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 ----------------
|