@trycourier/courier-react-native 3.2.1 → 4.0.4
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 +4 -1
- package/android/src/main/java/com/courierreactnative/CourierClientModule.kt +441 -0
- package/android/src/main/java/com/courierreactnative/CourierInboxViewManager.kt +2 -2
- package/android/src/main/java/com/courierreactnative/CourierReactNativePackage.kt +9 -3
- package/android/src/main/java/com/courierreactnative/CourierSharedModule.kt +321 -0
- package/android/src/main/java/com/courierreactnative/CourierSystemModule.kt +91 -0
- package/android/src/main/java/com/courierreactnative/ReactNativeModule.kt +36 -0
- package/android/src/main/java/com/courierreactnative/{Extensions.kt → Utils.kt} +5 -5
- package/courier-react-native.podspec +1 -1
- package/ios/CourierClientModule.swift +450 -0
- package/ios/CourierInboxReactNativeManager.swift +17 -9
- package/ios/CourierReactNativeDelegate.m +18 -35
- package/ios/CourierReactNativeEventEmitter.swift +25 -0
- package/ios/CourierReactNativeModule.m +192 -23
- package/ios/CourierSharedModule.swift +425 -0
- package/ios/CourierSystemModule.swift +147 -0
- package/ios/Utils.swift +103 -115
- package/lib/commonjs/Broadcaster.js +30 -0
- package/lib/commonjs/Broadcaster.js.map +1 -0
- package/lib/commonjs/Modules.js +25 -0
- package/lib/commonjs/Modules.js.map +1 -0
- package/lib/commonjs/client/BrandClient.js +25 -0
- package/lib/commonjs/client/BrandClient.js.map +1 -0
- package/lib/commonjs/client/ClientModule.js +21 -0
- package/lib/commonjs/client/ClientModule.js.map +1 -0
- package/lib/commonjs/client/CourierClient.js +33 -0
- package/lib/commonjs/client/CourierClient.js.map +1 -0
- package/lib/commonjs/client/InboxClient.js +116 -0
- package/lib/commonjs/client/InboxClient.js.map +1 -0
- package/lib/commonjs/client/PreferenceClient.js +73 -0
- package/lib/commonjs/client/PreferenceClient.js.map +1 -0
- package/lib/commonjs/client/TokenClient.js +36 -0
- package/lib/commonjs/client/TokenClient.js.map +1 -0
- package/lib/commonjs/client/TrackingClient.js +25 -0
- package/lib/commonjs/client/TrackingClient.js.map +1 -0
- package/lib/commonjs/index.js +418 -186
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/Android_CourierSheet.js.map +1 -1
- package/lib/commonjs/models/CourierAuthenticationListener.js.map +1 -1
- package/lib/commonjs/models/CourierBrand.js +2 -0
- package/lib/commonjs/models/{CourierUserPreferencesTopic.js.map → CourierBrand.js.map} +1 -1
- package/lib/commonjs/models/CourierButton.js.map +1 -1
- package/lib/commonjs/models/CourierDevice.js +2 -0
- package/lib/commonjs/models/CourierDevice.js.map +1 -0
- package/lib/commonjs/models/CourierFont.js.map +1 -1
- package/lib/commonjs/models/CourierInboxListener.js +2 -2
- package/lib/commonjs/models/CourierInboxListener.js.map +1 -1
- package/lib/commonjs/models/{CourierUserPreferencesTopic.js → CourierInboxMessages.js} +1 -1
- package/lib/commonjs/models/CourierInboxMessages.js.map +1 -0
- package/lib/commonjs/models/CourierInboxTheme.js.map +1 -1
- package/lib/commonjs/models/CourierInfoViewStyle.js.map +1 -1
- package/lib/commonjs/models/CourierPaging.js.map +1 -1
- package/lib/commonjs/models/CourierPreferencesTheme.js.map +1 -1
- package/lib/commonjs/models/CourierPushListener.js +7 -3
- package/lib/commonjs/models/CourierPushListener.js.map +1 -1
- package/lib/commonjs/models/CourierPushProvider.js.map +1 -1
- package/lib/commonjs/models/CourierTrackingEvent.js +16 -0
- package/lib/commonjs/models/CourierTrackingEvent.js.map +1 -0
- package/lib/commonjs/models/CourierUserPreferences.js +54 -0
- package/lib/commonjs/models/CourierUserPreferences.js.map +1 -1
- package/lib/commonjs/models/InboxAction.js.map +1 -1
- package/lib/commonjs/models/InboxMessage.js.map +1 -1
- package/lib/commonjs/models/iOS_CourierCell.js.map +1 -1
- package/lib/commonjs/models/iOS_CourierSheet.js.map +1 -1
- package/lib/commonjs/utils.js +9 -17
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/views/CourierInboxView.js +3 -3
- package/lib/commonjs/views/CourierInboxView.js.map +1 -1
- package/lib/commonjs/views/CourierPreferencesView.js.map +1 -1
- package/lib/module/Broadcaster.js +23 -0
- package/lib/module/Broadcaster.js.map +1 -0
- package/lib/module/Modules.js +18 -0
- package/lib/module/Modules.js.map +1 -0
- package/lib/module/client/BrandClient.js +18 -0
- package/lib/module/client/BrandClient.js.map +1 -0
- package/lib/module/client/ClientModule.js +14 -0
- package/lib/module/client/ClientModule.js.map +1 -0
- package/lib/module/client/CourierClient.js +26 -0
- package/lib/module/client/CourierClient.js.map +1 -0
- package/lib/module/client/InboxClient.js +109 -0
- package/lib/module/client/InboxClient.js.map +1 -0
- package/lib/module/client/PreferenceClient.js +66 -0
- package/lib/module/client/PreferenceClient.js.map +1 -0
- package/lib/module/client/TokenClient.js +29 -0
- package/lib/module/client/TokenClient.js.map +1 -0
- package/lib/module/client/TrackingClient.js +18 -0
- package/lib/module/client/TrackingClient.js.map +1 -0
- package/lib/module/index.js +383 -185
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/Android_CourierSheet.js.map +1 -1
- package/lib/module/models/CourierAuthenticationListener.js.map +1 -1
- package/lib/module/models/CourierBrand.js +2 -0
- package/lib/module/models/{CourierUserPreferencesTopic.js.map → CourierBrand.js.map} +1 -1
- package/lib/module/models/CourierButton.js.map +1 -1
- package/lib/module/models/CourierDevice.js +2 -0
- package/lib/module/models/CourierDevice.js.map +1 -0
- package/lib/module/models/CourierFont.js.map +1 -1
- package/lib/module/models/CourierInboxListener.js +1 -1
- package/lib/module/models/CourierInboxListener.js.map +1 -1
- package/lib/module/models/CourierInboxMessages.js +2 -0
- package/lib/module/models/CourierInboxMessages.js.map +1 -0
- package/lib/module/models/CourierInboxTheme.js.map +1 -1
- package/lib/module/models/CourierInfoViewStyle.js.map +1 -1
- package/lib/module/models/CourierPaging.js.map +1 -1
- package/lib/module/models/CourierPreferencesTheme.js.map +1 -1
- package/lib/module/models/CourierPushListener.js +7 -3
- package/lib/module/models/CourierPushListener.js.map +1 -1
- package/lib/module/models/CourierPushProvider.js.map +1 -1
- package/lib/module/models/CourierTrackingEvent.js +9 -0
- package/lib/module/models/CourierTrackingEvent.js.map +1 -0
- package/lib/module/models/CourierUserPreferences.js +53 -1
- package/lib/module/models/CourierUserPreferences.js.map +1 -1
- package/lib/module/models/InboxAction.js.map +1 -1
- package/lib/module/models/InboxMessage.js.map +1 -1
- package/lib/module/models/iOS_CourierCell.js.map +1 -1
- package/lib/module/models/iOS_CourierSheet.js.map +1 -1
- package/lib/module/utils.js +7 -16
- package/lib/module/utils.js.map +1 -1
- package/lib/module/views/CourierInboxView.js +3 -3
- package/lib/module/views/CourierInboxView.js.map +1 -1
- package/lib/module/views/CourierPreferencesView.js.map +1 -1
- package/lib/typescript/src/Broadcaster.d.ts +14 -0
- package/lib/typescript/src/Broadcaster.d.ts.map +1 -0
- package/lib/typescript/src/Modules.d.ts +8 -0
- package/lib/typescript/src/Modules.d.ts.map +1 -0
- package/lib/typescript/src/client/BrandClient.d.ts +15 -0
- package/lib/typescript/src/client/BrandClient.d.ts.map +1 -0
- package/lib/typescript/src/client/ClientModule.d.ts +8 -0
- package/lib/typescript/src/client/ClientModule.d.ts.map +1 -0
- package/lib/typescript/src/client/CourierClient.d.ts +31 -0
- package/lib/typescript/src/client/CourierClient.d.ts.map +1 -0
- package/lib/typescript/src/client/InboxClient.d.ts +94 -0
- package/lib/typescript/src/client/InboxClient.d.ts.map +1 -0
- package/lib/typescript/src/client/PreferenceClient.d.ts +39 -0
- package/lib/typescript/src/client/PreferenceClient.d.ts.map +1 -0
- package/lib/typescript/src/client/TokenClient.d.ts +28 -0
- package/lib/typescript/src/client/TokenClient.d.ts.map +1 -0
- package/lib/typescript/src/client/TrackingClient.d.ts +17 -0
- package/lib/typescript/src/client/TrackingClient.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +300 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/models/Android_CourierSheet.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierAuthenticationListener.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierBrand.d.ts +20 -0
- package/lib/typescript/src/models/CourierBrand.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierButton.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierDevice.d.ts +9 -0
- package/lib/typescript/src/models/CourierDevice.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierFont.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierInboxListener.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierInboxMessages.d.ts +23 -0
- package/lib/typescript/src/models/CourierInboxMessages.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierInboxTheme.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierInfoViewStyle.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierPaging.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierPreferencesTheme.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierPushListener.d.ts +8 -0
- package/lib/typescript/src/models/CourierPushListener.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierPushProvider.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierTrackingEvent.d.ts +8 -0
- package/lib/typescript/src/models/CourierTrackingEvent.d.ts.map +1 -0
- package/lib/typescript/src/models/CourierUserPreferences.d.ts +35 -0
- package/lib/typescript/src/models/CourierUserPreferences.d.ts.map +1 -0
- package/lib/typescript/src/models/InboxAction.d.ts.map +1 -0
- package/lib/typescript/src/models/InboxMessage.d.ts.map +1 -0
- package/lib/typescript/src/models/iOS_CourierCell.d.ts.map +1 -0
- package/lib/typescript/src/models/iOS_CourierSheet.d.ts.map +1 -0
- package/lib/typescript/src/utils.d.ts +14 -0
- package/lib/typescript/src/utils.d.ts.map +1 -0
- package/lib/typescript/src/views/CourierInboxView.d.ts.map +1 -0
- package/lib/typescript/src/views/CourierPreferencesView.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/Broadcaster.tsx +32 -0
- package/src/Modules.tsx +28 -0
- package/src/client/BrandClient.tsx +23 -0
- package/src/client/ClientModule.tsx +21 -0
- package/src/client/CourierClient.tsx +49 -0
- package/src/client/InboxClient.tsx +114 -0
- package/src/client/PreferenceClient.tsx +77 -0
- package/src/client/TokenClient.tsx +34 -0
- package/src/client/TrackingClient.tsx +23 -0
- package/src/index.tsx +398 -205
- package/src/models/CourierBrand.tsx +24 -0
- package/src/models/CourierDevice.tsx +8 -0
- package/src/models/CourierInboxListener.tsx +1 -1
- package/src/models/CourierInboxMessages.tsx +28 -0
- package/src/models/CourierPushListener.tsx +11 -6
- package/src/models/CourierTrackingEvent.tsx +7 -0
- package/src/models/CourierUserPreferences.tsx +70 -3
- package/src/utils.tsx +7 -23
- package/src/views/CourierInboxView.tsx +3 -3
- package/android/src/main/java/com/courierreactnative/CourierReactNativeModule.kt +0 -393
- package/ios/CourierReactNativeModule.swift +0 -524
- package/lib/commonjs/models/CourierUserPreferencesChannel.js +0 -17
- package/lib/commonjs/models/CourierUserPreferencesChannel.js.map +0 -1
- package/lib/commonjs/models/CourierUserPreferencesStatus.js +0 -15
- package/lib/commonjs/models/CourierUserPreferencesStatus.js.map +0 -1
- package/lib/module/models/CourierUserPreferencesChannel.js +0 -10
- package/lib/module/models/CourierUserPreferencesChannel.js.map +0 -1
- package/lib/module/models/CourierUserPreferencesStatus.js +0 -8
- package/lib/module/models/CourierUserPreferencesStatus.js.map +0 -1
- package/lib/module/models/CourierUserPreferencesTopic.js +0 -2
- package/lib/typescript/index.d.ts +0 -199
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/models/Android_CourierSheet.d.ts.map +0 -1
- package/lib/typescript/models/CourierAuthenticationListener.d.ts.map +0 -1
- package/lib/typescript/models/CourierButton.d.ts.map +0 -1
- package/lib/typescript/models/CourierFont.d.ts.map +0 -1
- package/lib/typescript/models/CourierInboxListener.d.ts.map +0 -1
- package/lib/typescript/models/CourierInboxTheme.d.ts.map +0 -1
- package/lib/typescript/models/CourierInfoViewStyle.d.ts.map +0 -1
- package/lib/typescript/models/CourierPaging.d.ts.map +0 -1
- package/lib/typescript/models/CourierPreferencesTheme.d.ts.map +0 -1
- package/lib/typescript/models/CourierPushListener.d.ts +0 -7
- package/lib/typescript/models/CourierPushListener.d.ts.map +0 -1
- package/lib/typescript/models/CourierPushProvider.d.ts.map +0 -1
- package/lib/typescript/models/CourierUserPreferences.d.ts +0 -7
- package/lib/typescript/models/CourierUserPreferences.d.ts.map +0 -1
- package/lib/typescript/models/CourierUserPreferencesChannel.d.ts +0 -9
- package/lib/typescript/models/CourierUserPreferencesChannel.d.ts.map +0 -1
- package/lib/typescript/models/CourierUserPreferencesStatus.d.ts +0 -7
- package/lib/typescript/models/CourierUserPreferencesStatus.d.ts.map +0 -1
- package/lib/typescript/models/CourierUserPreferencesTopic.d.ts +0 -13
- package/lib/typescript/models/CourierUserPreferencesTopic.d.ts.map +0 -1
- package/lib/typescript/models/InboxAction.d.ts.map +0 -1
- package/lib/typescript/models/InboxMessage.d.ts.map +0 -1
- package/lib/typescript/models/iOS_CourierCell.d.ts.map +0 -1
- package/lib/typescript/models/iOS_CourierSheet.d.ts.map +0 -1
- package/lib/typescript/utils.d.ts +0 -21
- package/lib/typescript/utils.d.ts.map +0 -1
- package/lib/typescript/views/CourierInboxView.d.ts.map +0 -1
- package/lib/typescript/views/CourierPreferencesView.d.ts.map +0 -1
- package/src/models/CourierUserPreferencesChannel.tsx +0 -8
- package/src/models/CourierUserPreferencesStatus.tsx +0 -6
- package/src/models/CourierUserPreferencesTopic.tsx +0 -13
- /package/lib/typescript/{models → src/models}/Android_CourierSheet.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/CourierAuthenticationListener.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/CourierButton.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/CourierFont.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/CourierInboxListener.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/CourierInboxTheme.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/CourierInfoViewStyle.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/CourierPaging.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/CourierPreferencesTheme.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/CourierPushProvider.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/InboxAction.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/InboxMessage.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/iOS_CourierCell.d.ts +0 -0
- /package/lib/typescript/{models → src/models}/iOS_CourierSheet.d.ts +0 -0
- /package/lib/typescript/{views → src/views}/CourierInboxView.d.ts +0 -0
- /package/lib/typescript/{views → src/views}/CourierPreferencesView.d.ts +0 -0
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
#import <React/RCTBridgeModule.h>
|
|
2
2
|
|
|
3
|
-
@interface RCT_EXTERN_MODULE(
|
|
3
|
+
@interface RCT_EXTERN_MODULE(CourierSharedModule, NSObject)
|
|
4
4
|
|
|
5
5
|
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
6
|
-
|
|
6
|
+
getClient
|
|
7
7
|
)
|
|
8
8
|
|
|
9
9
|
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
10
|
-
|
|
10
|
+
getUserId
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
14
|
+
getTenantId
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
18
|
+
getIsUserSignedIn
|
|
11
19
|
)
|
|
12
20
|
|
|
13
21
|
RCT_EXTERN_METHOD(
|
|
@@ -15,6 +23,7 @@ RCT_EXTERN_METHOD(
|
|
|
15
23
|
withClientKey: (NSString*)clientKey
|
|
16
24
|
withUserId: (NSString*)userId
|
|
17
25
|
withTenantId: (NSString*)tenantId
|
|
26
|
+
withShowLogs: (BOOL*)showLogs
|
|
18
27
|
withResolver: (RCTPromiseResolveBlock)resolve
|
|
19
28
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
20
29
|
)
|
|
@@ -25,54 +34,71 @@ RCT_EXTERN_METHOD(
|
|
|
25
34
|
)
|
|
26
35
|
|
|
27
36
|
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
28
|
-
|
|
37
|
+
addAuthenticationListener: (NSString*)authId
|
|
29
38
|
)
|
|
30
39
|
|
|
31
40
|
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
32
|
-
|
|
41
|
+
removeAuthenticationListener: (NSString*)listenerId
|
|
33
42
|
)
|
|
34
43
|
|
|
35
44
|
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
36
|
-
|
|
45
|
+
removeAllAuthenticationListeners
|
|
37
46
|
)
|
|
38
47
|
|
|
39
|
-
|
|
40
|
-
|
|
48
|
+
RCT_EXTERN_METHOD(
|
|
49
|
+
getAllTokens: (RCTPromiseResolveBlock)resolve
|
|
50
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
41
51
|
)
|
|
42
52
|
|
|
43
53
|
RCT_EXTERN_METHOD(
|
|
44
|
-
|
|
54
|
+
getToken: (NSString*)provider
|
|
55
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
45
56
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
46
57
|
)
|
|
47
58
|
|
|
48
59
|
RCT_EXTERN_METHOD(
|
|
49
|
-
|
|
60
|
+
setToken: (NSString*)provider
|
|
61
|
+
withToken: (NSString*)token
|
|
62
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
50
63
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
51
64
|
)
|
|
52
65
|
|
|
66
|
+
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
67
|
+
getInboxPaginationLimit
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
71
|
+
setInboxPaginationLimit: (double)limit
|
|
72
|
+
)
|
|
73
|
+
|
|
53
74
|
RCT_EXTERN_METHOD(
|
|
54
|
-
|
|
55
|
-
withToken: (NSString*)token
|
|
75
|
+
openMessage: (NSString*)messageId
|
|
56
76
|
withResolver: (RCTPromiseResolveBlock)resolve
|
|
57
77
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
58
78
|
)
|
|
59
79
|
|
|
60
80
|
RCT_EXTERN_METHOD(
|
|
61
|
-
|
|
81
|
+
archiveMessage: (NSString*)messageId
|
|
62
82
|
withResolver: (RCTPromiseResolveBlock)resolve
|
|
63
83
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
64
84
|
)
|
|
65
85
|
|
|
66
|
-
|
|
86
|
+
RCT_EXTERN_METHOD(
|
|
67
87
|
clickMessage: (NSString*)messageId
|
|
88
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
89
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
68
90
|
)
|
|
69
91
|
|
|
70
|
-
|
|
92
|
+
RCT_EXTERN_METHOD(
|
|
71
93
|
readMessage: (NSString*)messageId
|
|
94
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
95
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
72
96
|
)
|
|
73
97
|
|
|
74
|
-
|
|
98
|
+
RCT_EXTERN_METHOD(
|
|
75
99
|
unreadMessage: (NSString*)messageId
|
|
100
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
101
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
76
102
|
)
|
|
77
103
|
|
|
78
104
|
RCT_EXTERN_METHOD(
|
|
@@ -90,6 +116,10 @@ RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
|
90
116
|
removeInboxListener: (NSString*)listenerId
|
|
91
117
|
)
|
|
92
118
|
|
|
119
|
+
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
120
|
+
removeAllInboxListeners
|
|
121
|
+
)
|
|
122
|
+
|
|
93
123
|
RCT_EXTERN_METHOD(
|
|
94
124
|
refreshInbox: (RCTPromiseResolveBlock)resolve
|
|
95
125
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
@@ -100,37 +130,176 @@ RCT_EXTERN_METHOD(
|
|
|
100
130
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
101
131
|
)
|
|
102
132
|
|
|
133
|
+
+ (BOOL)requiresMainQueueSetup
|
|
134
|
+
{
|
|
135
|
+
return YES;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@end
|
|
139
|
+
|
|
140
|
+
@interface RCT_EXTERN_MODULE(CourierClientModule, NSObject)
|
|
141
|
+
|
|
103
142
|
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
104
|
-
|
|
143
|
+
addClient: (NSDictionary*)options
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
147
|
+
removeClient: (NSString*)clientId
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
RCT_EXTERN_METHOD(
|
|
151
|
+
putUserToken: (NSString*)clientId
|
|
152
|
+
withToken: (NSString*)token
|
|
153
|
+
withProvider: (NSString*)provider
|
|
154
|
+
withDevice: (NSDictionary*)device
|
|
155
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
156
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
RCT_EXTERN_METHOD(
|
|
160
|
+
deleteUserToken: (NSString*)clientId
|
|
161
|
+
withToken: (NSString*)token
|
|
162
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
163
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
RCT_EXTERN_METHOD(
|
|
167
|
+
getBrand: (NSString*)clientId
|
|
168
|
+
withBrandId: (NSString*)brandId
|
|
169
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
170
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
105
171
|
)
|
|
106
172
|
|
|
107
173
|
RCT_EXTERN_METHOD(
|
|
108
|
-
|
|
174
|
+
getMessages: (NSString*)clientId
|
|
175
|
+
withPaginationLimit: (double)paginationLimit
|
|
176
|
+
withStartCursor: (NSString*)startCursor
|
|
109
177
|
withResolver: (RCTPromiseResolveBlock)resolve
|
|
110
178
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
111
179
|
)
|
|
112
180
|
|
|
113
181
|
RCT_EXTERN_METHOD(
|
|
114
|
-
|
|
182
|
+
getArchivedMessages: (NSString*)clientId
|
|
183
|
+
withPaginationLimit: (double)paginationLimit
|
|
184
|
+
withStartCursor: (NSString*)startCursor
|
|
115
185
|
withResolver: (RCTPromiseResolveBlock)resolve
|
|
116
186
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
117
187
|
)
|
|
118
188
|
|
|
119
189
|
RCT_EXTERN_METHOD(
|
|
120
|
-
|
|
190
|
+
getMessageById: (NSString*)clientId
|
|
191
|
+
withMessageId: (NSString*)messageId
|
|
121
192
|
withResolver: (RCTPromiseResolveBlock)resolve
|
|
122
193
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
123
194
|
)
|
|
124
195
|
|
|
125
196
|
RCT_EXTERN_METHOD(
|
|
126
|
-
|
|
197
|
+
getUnreadMessageCount: (NSString*)clientId
|
|
198
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
199
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
RCT_EXTERN_METHOD(
|
|
203
|
+
openMessage: (NSString*)clientId
|
|
204
|
+
withMessageId: (NSString*)messageId
|
|
205
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
206
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
RCT_EXTERN_METHOD(
|
|
210
|
+
readMessage: (NSString*)clientId
|
|
211
|
+
withMessageId: (NSString*)messageId
|
|
212
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
213
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
RCT_EXTERN_METHOD(
|
|
217
|
+
unreadMessage: (NSString*)clientId
|
|
218
|
+
withMessageId: (NSString*)messageId
|
|
219
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
220
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
RCT_EXTERN_METHOD(
|
|
224
|
+
clickMessage: (NSString*)clientId
|
|
225
|
+
withMessageId: (NSString*)messageId
|
|
226
|
+
withTrackingId: (NSString*)trackingId
|
|
227
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
228
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
RCT_EXTERN_METHOD(
|
|
232
|
+
archiveMessage: (NSString*)clientId
|
|
233
|
+
withMessageId: (NSString*)messageId
|
|
234
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
235
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
RCT_EXTERN_METHOD(
|
|
239
|
+
readAllMessages: (NSString*)clientId
|
|
240
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
241
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
RCT_EXTERN_METHOD(
|
|
245
|
+
getUserPreferences: (NSString*)clientId
|
|
246
|
+
withPaginationCursor: (NSString*)paginationCursor
|
|
247
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
248
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
RCT_EXTERN_METHOD(
|
|
252
|
+
getUserPreferenceTopic: (NSString*)clientId
|
|
253
|
+
withTopicId: (NSString*)topicId
|
|
254
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
255
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
RCT_EXTERN_METHOD(
|
|
259
|
+
putUserPreferenceTopic: (NSString*)clientId
|
|
260
|
+
withTopicId: (NSString*)topicId
|
|
127
261
|
withStatus: (NSString*)status
|
|
128
|
-
withHasCustomRouting: (BOOL
|
|
129
|
-
withCustomRouting: (NSArray
|
|
262
|
+
withHasCustomRouting: (BOOL)hasCustomRouting
|
|
263
|
+
withCustomRouting: (NSArray<NSString*>*)customRouting
|
|
130
264
|
withResolver: (RCTPromiseResolveBlock)resolve
|
|
131
265
|
withRejecter: (RCTPromiseRejectBlock)reject
|
|
132
266
|
)
|
|
133
267
|
|
|
268
|
+
RCT_EXTERN_METHOD(
|
|
269
|
+
postTrackingUrl: (NSString*)clientId
|
|
270
|
+
withUrl: (NSString*)url
|
|
271
|
+
withEvent: (NSString*)event
|
|
272
|
+
withResolver: (RCTPromiseResolveBlock)resolve
|
|
273
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
+ (BOOL)requiresMainQueueSetup
|
|
277
|
+
{
|
|
278
|
+
return YES;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@end
|
|
282
|
+
|
|
283
|
+
@interface RCT_EXTERN_MODULE(CourierSystemModule, NSObject)
|
|
284
|
+
|
|
285
|
+
RCT_EXTERN_METHOD(
|
|
286
|
+
openSettingsForApp
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(
|
|
290
|
+
setIOSForegroundPresentationOptions: (NSDictionary*)params
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
RCT_EXTERN_METHOD(
|
|
294
|
+
getNotificationPermissionStatus: (RCTPromiseResolveBlock)resolve
|
|
295
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
RCT_EXTERN_METHOD(
|
|
299
|
+
requestNotificationPermission: (RCTPromiseResolveBlock)resolve
|
|
300
|
+
withRejecter: (RCTPromiseRejectBlock)reject
|
|
301
|
+
)
|
|
302
|
+
|
|
134
303
|
RCT_EXTERN_METHOD(
|
|
135
304
|
registerPushNotificationClickedOnKilledState
|
|
136
305
|
)
|