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