@altcraft/react-native-sdk 0.0.1
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/LICENSE +20 -0
- package/README.md +46 -0
- package/Sdk.podspec +48 -0
- package/android/build.gradle +78 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/altcraft/sdk/SdkModule.kt +1242 -0
- package/android/src/main/java/com/altcraft/sdk/SdkPackage.kt +33 -0
- package/android/src/main/java/com/altcraft/sdk/interfaces/RnFCMProvider.kt +27 -0
- package/android/src/main/java/com/altcraft/sdk/interfaces/RnHMSProvider.kt +32 -0
- package/android/src/main/java/com/altcraft/sdk/interfaces/RnJWTProvider.kt +21 -0
- package/android/src/main/java/com/altcraft/sdk/interfaces/RnRustoreProvider.kt +53 -0
- package/ios/Sdk.h +19 -0
- package/ios/Sdk.mm +1112 -0
- package/ios/SdkModule.swift +888 -0
- package/ios/protocols/RNAPNSProvider.swift +15 -0
- package/ios/protocols/RNFCMProvider.swift +24 -0
- package/ios/protocols/RNHMSProvider.swift +24 -0
- package/ios/protocols/RNJWTProvider.swift +15 -0
- package/lib/module/NativeSdk.js +13 -0
- package/lib/module/NativeSdk.js.map +1 -0
- package/lib/module/index.js +561 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NativeSdk.d.ts +114 -0
- package/lib/typescript/src/NativeSdk.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +391 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +128 -0
- package/react-native.config.js +10 -0
- package/src/NativeSdk.ts +171 -0
- package/src/index.tsx +670 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Altcraft
|
|
3
|
+
|
|
4
|
+
@objcMembers
|
|
5
|
+
final class RNAPNSProvider: NSObject, APNSInterface {
|
|
6
|
+
private let get: (@escaping (String?) -> Void) -> Void
|
|
7
|
+
|
|
8
|
+
init(get: @escaping (@escaping (String?) -> Void) -> Void) {
|
|
9
|
+
self.get = get
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
func getToken(completion: @escaping (String?) -> Void) {
|
|
13
|
+
get(completion)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Altcraft
|
|
3
|
+
|
|
4
|
+
@objcMembers
|
|
5
|
+
final class RNFCMProvider: NSObject, FCMInterface {
|
|
6
|
+
private let get: (@escaping (String?) -> Void) -> Void
|
|
7
|
+
private let del: (@escaping (Bool) -> Void) -> Void
|
|
8
|
+
|
|
9
|
+
init(
|
|
10
|
+
get: @escaping (@escaping (String?) -> Void) -> Void,
|
|
11
|
+
del: @escaping (@escaping (Bool) -> Void) -> Void
|
|
12
|
+
) {
|
|
13
|
+
self.get = get
|
|
14
|
+
self.del = del
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
func getToken(completion: @escaping (String?) -> Void) {
|
|
18
|
+
get(completion)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
func deleteToken(completion: @escaping (Bool) -> Void) {
|
|
22
|
+
del(completion)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Altcraft
|
|
3
|
+
|
|
4
|
+
@objcMembers
|
|
5
|
+
final class RNHMSProvider: NSObject, HMSInterface {
|
|
6
|
+
private let get: (@escaping (String?) -> Void) -> Void
|
|
7
|
+
private let del: (@escaping (Bool) -> Void) -> Void
|
|
8
|
+
|
|
9
|
+
init(
|
|
10
|
+
get: @escaping (@escaping (String?) -> Void) -> Void,
|
|
11
|
+
del: @escaping (@escaping (Bool) -> Void) -> Void
|
|
12
|
+
) {
|
|
13
|
+
self.get = get
|
|
14
|
+
self.del = del
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
func getToken(completion: @escaping (String?) -> Void) {
|
|
18
|
+
get(completion)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
func deleteToken(completion: @escaping (Bool) -> Void) {
|
|
22
|
+
del(completion)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Altcraft
|
|
3
|
+
|
|
4
|
+
@objcMembers
|
|
5
|
+
final class RNJWTProvider: NSObject, JWTInterface {
|
|
6
|
+
private let get: () -> String?
|
|
7
|
+
|
|
8
|
+
init(get: @escaping () -> String?) {
|
|
9
|
+
self.get = get
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
func getToken() -> String? {
|
|
13
|
+
get()
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
4
|
+
|
|
5
|
+
// ---------------- Data models ----------------
|
|
6
|
+
|
|
7
|
+
// ---------------- TurboModule Spec ----------------
|
|
8
|
+
|
|
9
|
+
// ---------------- Export ----------------
|
|
10
|
+
|
|
11
|
+
const NativeSDK = TurboModuleRegistry.getEnforcing('Sdk');
|
|
12
|
+
export default NativeSDK;
|
|
13
|
+
//# sourceMappingURL=NativeSdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","NativeSDK","getEnforcing"],"sourceRoot":"../../src","sources":["NativeSdk.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAA0B,cAAc;;AAEpE;;AAiEA;;AAoGA;;AAEA,MAAMC,SAAS,GAAGD,mBAAmB,CAACE,YAAY,CAAO,KAAK,CAAC;AAC/D,eAAeD,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { NativeEventEmitter } from 'react-native';
|
|
4
|
+
import NativeSDK from "./NativeSdk.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* SDK event payload emitted from the native layer via NativeEventEmitter.
|
|
8
|
+
*
|
|
9
|
+
* Native sources (conceptually):
|
|
10
|
+
* - Android (Kotlin): SDK Events module -> emits "AltcraftSdkEvent"
|
|
11
|
+
* - iOS (Swift): SDKEvents.shared -> bridge -> emits "AltcraftSdkEvent"
|
|
12
|
+
*
|
|
13
|
+
* Fields:
|
|
14
|
+
* - function: origin function/context name in the SDK
|
|
15
|
+
* - code: optional numeric code (HTTP/internal/etc.)
|
|
16
|
+
* - message: human-readable message
|
|
17
|
+
* - type: event category ("event" | "error" | "retryError")
|
|
18
|
+
* - value: optional extra data/context
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Converts a JS object to a string-to-string map suitable for passing through the RN bridge.
|
|
23
|
+
*
|
|
24
|
+
* Why:
|
|
25
|
+
* - TurboModules/bridges often prefer primitive types and predictable structures.
|
|
26
|
+
* - Native SDK public APIs frequently accept Map<String, String> (Android) / bridged dictionaries (iOS).
|
|
27
|
+
*
|
|
28
|
+
* Behavior:
|
|
29
|
+
* - null/undefined values are skipped
|
|
30
|
+
* - all other values are coerced via `String(v)`
|
|
31
|
+
* - returns `null` if the resulting map is empty (native side can treat it as "not provided")
|
|
32
|
+
*/
|
|
33
|
+
function toNativeStringMap(input) {
|
|
34
|
+
if (!input) return null;
|
|
35
|
+
const out = {};
|
|
36
|
+
for (const [k, v] of Object.entries(input)) {
|
|
37
|
+
if (v == null) continue;
|
|
38
|
+
out[k] = String(v);
|
|
39
|
+
}
|
|
40
|
+
return Object.keys(out).length > 0 ? out : null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* JS-side abstraction for handling incoming push payloads.
|
|
45
|
+
*
|
|
46
|
+
* Native analogy:
|
|
47
|
+
* - Android: `AltcraftSDK.PushReceiver` + `PushReceiver.takePush(context, message)`
|
|
48
|
+
*
|
|
49
|
+
* In RN:
|
|
50
|
+
* - `takePush(...)` always forwards the payload to native (`NativeSdk.takePush`)
|
|
51
|
+
* - then optionally dispatches it to registered JS receivers (`PushReceiver`)
|
|
52
|
+
*
|
|
53
|
+
* This provides:
|
|
54
|
+
* - centralized forwarding to the Altcraft native SDK (parsing/internal flows)
|
|
55
|
+
* - optional additional JS-level handling (logging, routing, analytics, debugging)
|
|
56
|
+
*/
|
|
57
|
+
export class PushReceiver {}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Registered JS receivers for push payload dispatch.
|
|
61
|
+
* If none are registered, a DefaultPushReceiver will log the payload.
|
|
62
|
+
*/
|
|
63
|
+
const registeredPushReceivers = [];
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Registers a JS receiver for incoming push payloads.
|
|
67
|
+
*
|
|
68
|
+
* Typically called once during app startup.
|
|
69
|
+
*
|
|
70
|
+
* @param receiver Implementation of `PushReceiver`.
|
|
71
|
+
*/
|
|
72
|
+
export function registerPushReceiver(receiver) {
|
|
73
|
+
registeredPushReceivers.push(receiver);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Clears all registered push receivers.
|
|
78
|
+
*
|
|
79
|
+
* Useful for tests or reinitializing the integration layer.
|
|
80
|
+
*/
|
|
81
|
+
export function clearPushReceivers() {
|
|
82
|
+
registeredPushReceivers.length = 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Default receiver used when no custom receivers are registered.
|
|
87
|
+
* Prevents silent drops during integration and provides visibility via console logs.
|
|
88
|
+
*/
|
|
89
|
+
class DefaultPushReceiver extends PushReceiver {
|
|
90
|
+
pushHandler(message) {
|
|
91
|
+
// eslint-disable-next-line no-console
|
|
92
|
+
console.log('[AltcraftSDK] Default push handler:', message);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Forwards an incoming push payload to the native Altcraft SDK and then to JS receivers.
|
|
98
|
+
*
|
|
99
|
+
* Native analogy:
|
|
100
|
+
* - Android: `AltcraftSDK.PushReceiver.takePush(context, message)`
|
|
101
|
+
*
|
|
102
|
+
* Important:
|
|
103
|
+
* - This method does NOT intercept notifications by itself.
|
|
104
|
+
* Platform-level interception must be implemented separately:
|
|
105
|
+
* - Android: FCM/HMS service -> call `takePush(message.data)`
|
|
106
|
+
* - iOS: AppDelegate / UNUserNotificationCenter / Notification Service Extension -> call `takePush(userInfo)`
|
|
107
|
+
*
|
|
108
|
+
* @param message Flat push payload map. Empty payloads are ignored.
|
|
109
|
+
*/
|
|
110
|
+
export function takePush(message) {
|
|
111
|
+
if (!message || Object.keys(message).length === 0) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 1) Always forward to native SDK for parsing/internal processing
|
|
116
|
+
NativeSDK.takePush({
|
|
117
|
+
...message
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// 2) Optionally forward to JS receivers (custom logic/analytics/debug)
|
|
121
|
+
const receivers = registeredPushReceivers.length > 0 ? registeredPushReceivers : [new DefaultPushReceiver()];
|
|
122
|
+
for (const receiver of receivers) {
|
|
123
|
+
try {
|
|
124
|
+
receiver.pushHandler(message);
|
|
125
|
+
} catch (e) {
|
|
126
|
+
// eslint-disable-next-line no-console
|
|
127
|
+
console.warn('[AltcraftSDK] PushReceiver error:', e);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// ---------------- Events API for RN ----------------
|
|
133
|
+
|
|
134
|
+
/** RN subscription handle type (NativeEventEmitter). */
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Native event emitter used to receive SDK events from the native bridge.
|
|
138
|
+
* Event name: "AltcraftSdkEvent"
|
|
139
|
+
*/
|
|
140
|
+
const nativeEventEmitter = new NativeEventEmitter(NativeSDK);
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Current active subscription to native SDK events.
|
|
144
|
+
* Only one subscription is maintained; re-subscribing replaces the previous one.
|
|
145
|
+
*/
|
|
146
|
+
let eventsSubscription = null;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Subscribes to Altcraft SDK events and starts streaming them from native to JS.
|
|
150
|
+
*
|
|
151
|
+
* Contract:
|
|
152
|
+
* - If a previous subscription exists, it is removed.
|
|
153
|
+
* - Calls `NativeSdk.subscribeToEvents()` so the native side starts emitting events.
|
|
154
|
+
*
|
|
155
|
+
* @param handler JS handler invoked for each SDK event.
|
|
156
|
+
*/
|
|
157
|
+
export function subscribeToEvents(handler) {
|
|
158
|
+
if (eventsSubscription) {
|
|
159
|
+
eventsSubscription.remove();
|
|
160
|
+
eventsSubscription = null;
|
|
161
|
+
}
|
|
162
|
+
NativeSDK.subscribeToEvents();
|
|
163
|
+
eventsSubscription = nativeEventEmitter.addListener('AltcraftSdkEvent', (...args) => {
|
|
164
|
+
const event = args[0] ?? null;
|
|
165
|
+
if (!event) return;
|
|
166
|
+
try {
|
|
167
|
+
handler(event);
|
|
168
|
+
} catch (e) {
|
|
169
|
+
// eslint-disable-next-line no-console
|
|
170
|
+
console.warn('[AltcraftSDK] subscribeToEvents handler error:', e);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Unsubscribes from Altcraft SDK events.
|
|
177
|
+
*
|
|
178
|
+
* Behavior:
|
|
179
|
+
* - removes the JS listener
|
|
180
|
+
* - calls `NativeSdk.unsubscribeFromEvent()` to stop native emissions
|
|
181
|
+
*/
|
|
182
|
+
export function unsubscribeFromEvent() {
|
|
183
|
+
if (eventsSubscription) {
|
|
184
|
+
eventsSubscription.remove();
|
|
185
|
+
eventsSubscription = null;
|
|
186
|
+
}
|
|
187
|
+
NativeSDK.unsubscribeFromEvent();
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// ---------------- existing public SDK API ----------------
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Initializes the Altcraft SDK.
|
|
194
|
+
*
|
|
195
|
+
* Native equivalents:
|
|
196
|
+
* - Android: `AltcraftSDK.initialization(context, configuration, complete)`
|
|
197
|
+
* - iOS: `AltcraftSDK.shared.initialization(configuration, completion)`
|
|
198
|
+
*
|
|
199
|
+
* Promise:
|
|
200
|
+
* - resolves on success
|
|
201
|
+
*
|
|
202
|
+
* ⚠️ Can throw (reject):
|
|
203
|
+
* - configuration mapping/validation errors on native side
|
|
204
|
+
* - native initialization failure (e.g. missing required fields, internal init error)
|
|
205
|
+
*
|
|
206
|
+
* @param config SDK configuration (apiUrl is required).
|
|
207
|
+
*/
|
|
208
|
+
export function initialize(config) {
|
|
209
|
+
return NativeSDK.initialize(config);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Sets/clears the JWT used by the SDK for authenticated requests.
|
|
214
|
+
*
|
|
215
|
+
* Native concept:
|
|
216
|
+
* - Android/iOS register a JWT provider; RN uses an internal provider backed by this token.
|
|
217
|
+
*
|
|
218
|
+
* Semantics:
|
|
219
|
+
* - token === null -> clear JWT provider/token
|
|
220
|
+
* - token !== null -> store token and enable provider
|
|
221
|
+
*
|
|
222
|
+
* @param token JWT string or null to clear.
|
|
223
|
+
*/
|
|
224
|
+
export function setJwt(token) {
|
|
225
|
+
return NativeSDK.setJwt(token);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// platform-specific token setters
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Android-only: sets the FCM token to be used by the SDK.
|
|
232
|
+
*
|
|
233
|
+
* Typical usage:
|
|
234
|
+
* - after `messaging().getToken()`
|
|
235
|
+
* - when the token refreshes
|
|
236
|
+
*
|
|
237
|
+
* @param token FCM token or null to clear/unset.
|
|
238
|
+
*/
|
|
239
|
+
export function setAndroidFcmToken(token) {
|
|
240
|
+
return NativeSDK.setAndroidFcmToken(token);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* iOS-only: kept for API symmetry (may be a no-op on other platforms).
|
|
245
|
+
*
|
|
246
|
+
* @param token iOS FCM token or null.
|
|
247
|
+
*/
|
|
248
|
+
export function setIosFcmToken(token) {
|
|
249
|
+
return NativeSDK.setIosFcmToken(token);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Android-only: sets the HMS token.
|
|
254
|
+
*
|
|
255
|
+
* @param token HMS token or null.
|
|
256
|
+
*/
|
|
257
|
+
export function setAndroidHmsToken(token) {
|
|
258
|
+
return NativeSDK.setAndroidHmsToken(token);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* iOS-only: kept for API symmetry (may be a no-op on other platforms).
|
|
263
|
+
*
|
|
264
|
+
* @param token iOS HMS token or null.
|
|
265
|
+
*/
|
|
266
|
+
export function setIosHmsToken(token) {
|
|
267
|
+
return NativeSDK.setIosHmsToken(token);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// other tokens
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* iOS-only: sets the APNs token (usually forwarded from AppDelegate).
|
|
274
|
+
*
|
|
275
|
+
* Note:
|
|
276
|
+
* - APNs token is commonly represented as a hex string on native side.
|
|
277
|
+
*
|
|
278
|
+
* @param token APNs token as hex string or null.
|
|
279
|
+
*/
|
|
280
|
+
export function setApnsToken(token) {
|
|
281
|
+
return NativeSDK.setApnsToken(token);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Android-only: sets the RuStore token.
|
|
286
|
+
*
|
|
287
|
+
* @param token RuStore token or null.
|
|
288
|
+
*/
|
|
289
|
+
export function setRustoreToken(token) {
|
|
290
|
+
return NativeSDK.setRustoreToken(token);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// ---------------- subscription (public: any, native: string) ----------------
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Performs a push subscribe request.
|
|
297
|
+
*
|
|
298
|
+
* Notes:
|
|
299
|
+
* - fire-and-forget: results/errors are delivered via the SDK Events stream
|
|
300
|
+
* - `sync` is forwarded to the SDK/server semantics
|
|
301
|
+
*/
|
|
302
|
+
export function pushSubscribe(sync = true, profileFields = null, customFields = null, cats = null, replace = null, skipTriggers = null) {
|
|
303
|
+
NativeSDK.pushSubscribe(sync, toNativeStringMap(profileFields), toNativeStringMap(customFields), cats, replace, skipTriggers);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Suspends push notifications for the current profile/subscription.
|
|
308
|
+
*
|
|
309
|
+
* Same parameter semantics as `pushSubscribe`.
|
|
310
|
+
* Results/errors are delivered via the SDK Events stream.
|
|
311
|
+
*/
|
|
312
|
+
export function pushSuspend(sync = true, profileFields = null, customFields = null, cats = null, replace = null, skipTriggers = null) {
|
|
313
|
+
NativeSDK.pushSuspend(sync, toNativeStringMap(profileFields), toNativeStringMap(customFields), cats, replace, skipTriggers);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Performs a push unsubscribe request.
|
|
318
|
+
*
|
|
319
|
+
* Same parameter semantics as `pushSubscribe`.
|
|
320
|
+
* Results/errors are delivered via the SDK Events stream.
|
|
321
|
+
*/
|
|
322
|
+
export function pushUnSubscribe(sync = true, profileFields = null, customFields = null, cats = null, replace = null, skipTriggers = null) {
|
|
323
|
+
NativeSDK.pushUnSubscribe(sync, toNativeStringMap(profileFields), toNativeStringMap(customFields), cats, replace, skipTriggers);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Sends an "unSuspend" request and returns the response wrapped with HTTP status code.
|
|
328
|
+
*
|
|
329
|
+
* ⚠️ Can throw (reject):
|
|
330
|
+
* - native validation failure (missing data to create request)
|
|
331
|
+
* - request creation/sending failures
|
|
332
|
+
* - unexpected native exceptions
|
|
333
|
+
*
|
|
334
|
+
* @returns `ResponseWithHttpCode | null`
|
|
335
|
+
*/
|
|
336
|
+
export function unSuspendPushSubscription() {
|
|
337
|
+
return NativeSDK.unSuspendPushSubscription();
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Returns the status of the latest subscription request stored in the profile.
|
|
342
|
+
*
|
|
343
|
+
* ⚠️ Can throw (reject) on native request creation/sending failures or unexpected exceptions.
|
|
344
|
+
*/
|
|
345
|
+
export function getStatusOfLatestSubscription() {
|
|
346
|
+
return NativeSDK.getStatusOfLatestSubscription();
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Returns the status of the latest subscription for the specified provider.
|
|
351
|
+
* If provider is null, native SDK may use the current provider (SDK-specific).
|
|
352
|
+
*
|
|
353
|
+
* ⚠️ Can throw (reject):
|
|
354
|
+
* - invalid provider
|
|
355
|
+
* - native request creation/sending failures
|
|
356
|
+
* - unexpected native exceptions
|
|
357
|
+
*
|
|
358
|
+
* @param provider Provider identifier or null.
|
|
359
|
+
*/
|
|
360
|
+
export function getStatusOfLatestSubscriptionForProvider(provider = null) {
|
|
361
|
+
return NativeSDK.getStatusOfLatestSubscriptionForProvider(provider);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Returns the status for the "current subscription context" (current provider + current token),
|
|
366
|
+
* according to native SDK rules.
|
|
367
|
+
*
|
|
368
|
+
* ⚠️ Can throw (reject) on native request creation/sending failures or unexpected exceptions.
|
|
369
|
+
*/
|
|
370
|
+
export function getStatusForCurrentSubscription() {
|
|
371
|
+
return NativeSDK.getStatusForCurrentSubscription();
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// ---------------- token public API ----------------
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Returns the current push token selected/managed by the SDK.
|
|
378
|
+
*
|
|
379
|
+
* ⚠️ Can throw (reject) on unexpected native errors.
|
|
380
|
+
*
|
|
381
|
+
* May resolve `null` if token is not yet available or providers are not configured.
|
|
382
|
+
*/
|
|
383
|
+
export function getPushToken() {
|
|
384
|
+
return NativeSDK.getPushToken();
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Deletes the device token for a given provider.
|
|
389
|
+
*
|
|
390
|
+
* ⚠️ Can throw (reject):
|
|
391
|
+
* - provider is null/invalid
|
|
392
|
+
* - native deletion flow fails
|
|
393
|
+
* - unexpected native exceptions
|
|
394
|
+
*
|
|
395
|
+
* @param provider Provider identifier (or null; native may treat this as invalid).
|
|
396
|
+
*/
|
|
397
|
+
export function deleteDeviceToken(provider) {
|
|
398
|
+
return NativeSDK.deleteDeviceToken(provider);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Forces a token refresh flow.
|
|
403
|
+
*
|
|
404
|
+
* ⚠️ Can throw (reject) on native failures or unexpected exceptions.
|
|
405
|
+
*/
|
|
406
|
+
export function forcedTokenUpdate() {
|
|
407
|
+
return NativeSDK.forcedTokenUpdate();
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Updates the provider priority list used by the SDK to select a push provider.
|
|
412
|
+
*
|
|
413
|
+
* ⚠️ Can throw (reject):
|
|
414
|
+
* - invalid provider list (unknown identifiers)
|
|
415
|
+
* - native update flow failure
|
|
416
|
+
* - unexpected native exceptions
|
|
417
|
+
*
|
|
418
|
+
* @param priorityList Ordered list of provider IDs, or null.
|
|
419
|
+
*/
|
|
420
|
+
export function changePushProviderPriorityList(priorityList) {
|
|
421
|
+
return NativeSDK.changePushProviderPriorityList(priorityList);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Sets (or clears) a token for a specific provider.
|
|
426
|
+
|
|
427
|
+
*
|
|
428
|
+
* ⚠️ Can throw (reject):
|
|
429
|
+
* - provider is invalid/blank (native validation)
|
|
430
|
+
* - native set/delete flow fails
|
|
431
|
+
* - unexpected native exceptions
|
|
432
|
+
*
|
|
433
|
+
* @param provider Provider identifier.
|
|
434
|
+
* @param token Token string or null to clear.
|
|
435
|
+
*/
|
|
436
|
+
export function setPushToken(provider, token) {
|
|
437
|
+
return NativeSDK.setPushToken(provider, token);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// ---------------- sdk wrappers ----------------
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Clears SDK local state and stops active SDK background work (SDK-specific).
|
|
444
|
+
*
|
|
445
|
+
* ⚠️ Can throw (reject) on unexpected native errors.
|
|
446
|
+
*/
|
|
447
|
+
export function clear() {
|
|
448
|
+
return NativeSDK.clear();
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Resets retry-control state in the current session to allow retry/re-init flows again.
|
|
453
|
+
* This is a session-level unlock, not a full SDK reset.
|
|
454
|
+
*/
|
|
455
|
+
export function reinitializeRetryControlInThisSession() {
|
|
456
|
+
return NativeSDK.reinitializeRetryControlInThisSession();
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Requests notification permission (where applicable).
|
|
461
|
+
*
|
|
462
|
+
* Note:
|
|
463
|
+
* - Usually no Promise here; native may silently no-op if not supported.
|
|
464
|
+
*/
|
|
465
|
+
export function requestNotificationPermission() {
|
|
466
|
+
return NativeSDK.requestNotificationPermission();
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// ---------------- MobileEvent (public: any, native: string) ----------------
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Sends a "mobile event" (non-push event) to Altcraft backend.
|
|
473
|
+
*
|
|
474
|
+
* Note:
|
|
475
|
+
* - This is fire-and-forget and does not return a Promise.
|
|
476
|
+
* - Any errors are expected to be surfaced via SDK Events stream (if enabled) or native logs.
|
|
477
|
+
*/
|
|
478
|
+
export function mobileEvent(sid, eventName, sendMessageId = null, payload = null, matching = null, matchingType = null, profileFields = null) {
|
|
479
|
+
NativeSDK.mobileEvent(sid, eventName, sendMessageId, toNativeStringMap(payload), toNativeStringMap(matching), matchingType, toNativeStringMap(profileFields));
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Manually registers a "delivery" event for a push notification.
|
|
484
|
+
*
|
|
485
|
+
* Note:
|
|
486
|
+
* - Fire-and-forget (no Promise). Native errors should be emitted as SDK events or logs.
|
|
487
|
+
*/
|
|
488
|
+
export function deliveryEvent(message = null, messageUID = null) {
|
|
489
|
+
const nativePayload = message && Object.keys(message).length > 0 ? {
|
|
490
|
+
...message
|
|
491
|
+
} : null;
|
|
492
|
+
NativeSDK.deliveryEvent(nativePayload, messageUID);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Manually registers an "open" event for a push notification.
|
|
497
|
+
*
|
|
498
|
+
* Note:
|
|
499
|
+
* - Fire-and-forget (no Promise). Native errors should be emitted as SDK events or logs.
|
|
500
|
+
*/
|
|
501
|
+
export function openEvent(message = null, messageUID = null) {
|
|
502
|
+
const nativePayload = message && Object.keys(message).length > 0 ? {
|
|
503
|
+
...message
|
|
504
|
+
} : null;
|
|
505
|
+
NativeSDK.openEvent(nativePayload, messageUID);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// ---------------- Default export ----------------
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Public React Native facade for the Altcraft SDK.
|
|
512
|
+
*
|
|
513
|
+
* Promise-returning methods (can throw on `await` / reject):
|
|
514
|
+
* - initialize
|
|
515
|
+
* - unSuspendPushSubscription
|
|
516
|
+
* - getStatusOfLatestSubscription
|
|
517
|
+
* - getStatusOfLatestSubscriptionForProvider
|
|
518
|
+
* - getStatusForCurrentSubscription
|
|
519
|
+
* - getPushToken
|
|
520
|
+
* - deleteDeviceToken
|
|
521
|
+
* - forcedTokenUpdate
|
|
522
|
+
* - changePushProviderPriorityList
|
|
523
|
+
* - setPushToken
|
|
524
|
+
* - clear
|
|
525
|
+
*/
|
|
526
|
+
const AltcraftSDK = {
|
|
527
|
+
initialize,
|
|
528
|
+
setJwt,
|
|
529
|
+
setAndroidFcmToken,
|
|
530
|
+
setIosFcmToken,
|
|
531
|
+
setAndroidHmsToken,
|
|
532
|
+
setIosHmsToken,
|
|
533
|
+
setApnsToken,
|
|
534
|
+
setRustoreToken,
|
|
535
|
+
pushSubscribe,
|
|
536
|
+
pushSuspend,
|
|
537
|
+
pushUnSubscribe,
|
|
538
|
+
unSuspendPushSubscription,
|
|
539
|
+
getStatusOfLatestSubscription,
|
|
540
|
+
getStatusOfLatestSubscriptionForProvider,
|
|
541
|
+
getStatusForCurrentSubscription,
|
|
542
|
+
getPushToken,
|
|
543
|
+
deleteDeviceToken,
|
|
544
|
+
forcedTokenUpdate,
|
|
545
|
+
changePushProviderPriorityList,
|
|
546
|
+
setPushToken,
|
|
547
|
+
clear,
|
|
548
|
+
reinitializeRetryControlInThisSession,
|
|
549
|
+
requestNotificationPermission,
|
|
550
|
+
mobileEvent,
|
|
551
|
+
PushReceiver,
|
|
552
|
+
registerPushReceiver,
|
|
553
|
+
clearPushReceivers,
|
|
554
|
+
takePush,
|
|
555
|
+
subscribeToEvents,
|
|
556
|
+
unsubscribeFromEvent,
|
|
557
|
+
deliveryEvent,
|
|
558
|
+
openEvent
|
|
559
|
+
};
|
|
560
|
+
export default AltcraftSDK;
|
|
561
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","NativeSDK","toNativeStringMap","input","out","k","v","Object","entries","String","keys","length","PushReceiver","registeredPushReceivers","registerPushReceiver","receiver","push","clearPushReceivers","DefaultPushReceiver","pushHandler","message","console","log","takePush","receivers","e","warn","nativeEventEmitter","eventsSubscription","subscribeToEvents","handler","remove","addListener","args","event","unsubscribeFromEvent","initialize","config","setJwt","token","setAndroidFcmToken","setIosFcmToken","setAndroidHmsToken","setIosHmsToken","setApnsToken","setRustoreToken","pushSubscribe","sync","profileFields","customFields","cats","replace","skipTriggers","pushSuspend","pushUnSubscribe","unSuspendPushSubscription","getStatusOfLatestSubscription","getStatusOfLatestSubscriptionForProvider","provider","getStatusForCurrentSubscription","getPushToken","deleteDeviceToken","forcedTokenUpdate","changePushProviderPriorityList","priorityList","setPushToken","clear","reinitializeRetryControlInThisSession","requestNotificationPermission","mobileEvent","sid","eventName","sendMessageId","payload","matching","matchingType","deliveryEvent","messageUID","nativePayload","openEvent","AltcraftSDK"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,cAAc;AACjD,OAAOC,SAAS,MAKT,gBAAa;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CACxBC,KAAoC,EACF;EAClC,IAAI,CAACA,KAAK,EAAE,OAAO,IAAI;EAEvB,MAAMC,GAA8B,GAAG,CAAC,CAAC;EACzC,KAAK,MAAM,CAACC,CAAC,EAAEC,CAAC,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACL,KAAK,CAAC,EAAE;IAC1C,IAAIG,CAAC,IAAI,IAAI,EAAE;IACfF,GAAG,CAACC,CAAC,CAAC,GAAGI,MAAM,CAACH,CAAC,CAAC;EACpB;EAEA,OAAOC,MAAM,CAACG,IAAI,CAACN,GAAG,CAAC,CAACO,MAAM,GAAG,CAAC,GAAGP,GAAG,GAAG,IAAI;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAeQ,YAAY,CAAC;;AASnC;AACA;AACA;AACA;AACA,MAAMC,uBAAuC,GAAG,EAAE;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAACC,QAAsB,EAAQ;EACjEF,uBAAuB,CAACG,IAAI,CAACD,QAAQ,CAAC;AACxC;;AAEA;AACA;AACA;AACA;AACA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