@trycourier/courier-react-native 2.0.0-beta8 → 2.0.0
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/README.md +190 -15
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/courierreactnative/CourierReactNativeModule.kt +8 -18
- package/android/src/main/java/com/courierreactnative/CourierReactNativeViewManager.kt +12 -12
- package/lib/commonjs/index.js +39 -75
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +39 -75
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +30 -73
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +44 -75
- package/android/src/main/java/com/courierreactnative/ReactNativeCourierInbox.kt +0 -49
package/README.md
CHANGED
|
@@ -1,31 +1,206 @@
|
|
|
1
|
-
|
|
1
|
+
<img width="1040" alt="banner-react-native" src="https://github.com/trycourier/courier-react-native/assets/6370613/2970316d-fdb2-4491-8578-cf4aec1bcfe6">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
 
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# Requirements & Support
|
|
6
|
+
|
|
7
|
+
 
|
|
8
|
+
|
|
9
|
+
<table>
|
|
10
|
+
<thead>
|
|
11
|
+
<tr>
|
|
12
|
+
<th width="920px" align="left">Requirements</th>
|
|
13
|
+
<th width="120px" align="center"></th>
|
|
14
|
+
</tr>
|
|
15
|
+
</thead>
|
|
16
|
+
<tbody>
|
|
17
|
+
<tr width="600px">
|
|
18
|
+
<td align="left">Courier Account</td>
|
|
19
|
+
<td align="center">
|
|
20
|
+
<a href="https://app.courier.com/channels/courier">
|
|
21
|
+
<code>Sign Up</code>
|
|
22
|
+
</a>
|
|
23
|
+
</td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr width="600px">
|
|
26
|
+
<td align="left">Minimum iOS SDK Version</td>
|
|
27
|
+
<td align="center">
|
|
28
|
+
<code>13.0</code>
|
|
29
|
+
</td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr width="600px">
|
|
32
|
+
<td align="left">Minimum Android SDK Version</td>
|
|
33
|
+
<td align="center">
|
|
34
|
+
<code>23</code>
|
|
35
|
+
</td>
|
|
36
|
+
</tr>
|
|
37
|
+
</tbody>
|
|
38
|
+
</table>
|
|
39
|
+
|
|
40
|
+
 
|
|
41
|
+
|
|
42
|
+
# Installation
|
|
43
|
+
|
|
44
|
+
## Using `npm`
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npm install @trycourier/courier-react-native
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Using `yarn`
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
yarn add @trycourier/courier-react-native
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
 
|
|
57
|
+
|
|
58
|
+
## iOS
|
|
59
|
+
|
|
60
|
+
### 1. Support iOS 13.0+ in your Project
|
|
61
|
+
|
|
62
|
+
<img width="737" alt="Screenshot 2023-09-26 at 2 16 51 PM" src="https://github.com/trycourier/courier-react-native/assets/6370613/6bf98576-9b26-4b5e-8add-7289531e6431">
|
|
63
|
+
|
|
64
|
+
### 2. Support iOS 13+ in your Podfile
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
# Resolve react_native_pods.rb with node to allow for hoisting
|
|
68
|
+
require Pod::Executable.execute_command('node', ['-p'..
|
|
69
|
+
|
|
70
|
+
# Courier React Native requires iOS 13+
|
|
71
|
+
platform :ios, '13.0' // Add this line
|
|
72
|
+
prepare_react_native_project!
|
|
73
|
+
|
|
74
|
+
..
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 3. Install the Cocoapods
|
|
78
|
+
|
|
79
|
+
From the root of your React Native project run
|
|
6
80
|
|
|
7
81
|
```sh
|
|
8
|
-
|
|
82
|
+
cd ios && pod install
|
|
9
83
|
```
|
|
10
84
|
|
|
11
|
-
|
|
85
|
+
 
|
|
86
|
+
|
|
87
|
+
## Android
|
|
88
|
+
|
|
89
|
+
### 1. Add the Jitpack repository
|
|
90
|
+
|
|
91
|
+
In your `android/build.gradle` make sure your build and repository values are as follows
|
|
92
|
+
|
|
93
|
+
```gradle
|
|
94
|
+
buildscript {
|
|
12
95
|
|
|
13
|
-
|
|
14
|
-
import { CourierReactNativeView } from "courier-react-native";
|
|
96
|
+
ext {
|
|
15
97
|
|
|
16
|
-
//
|
|
98
|
+
// Double check these values
|
|
99
|
+
buildToolsVersion = "32.0.0"
|
|
100
|
+
minSdkVersion = 23
|
|
101
|
+
compileSdkVersion = 32
|
|
102
|
+
targetSdkVersion = 32
|
|
103
|
+
..
|
|
104
|
+
}
|
|
17
105
|
|
|
18
|
-
|
|
106
|
+
repositories {
|
|
107
|
+
google()
|
|
108
|
+
mavenCentral()
|
|
109
|
+
maven { url 'https://www.jitpack.io' } // THIS LINE
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
..
|
|
113
|
+
|
|
114
|
+
}
|
|
19
115
|
```
|
|
20
116
|
|
|
21
|
-
|
|
117
|
+
### 2. Run Gradle Sync
|
|
118
|
+
|
|
119
|
+
 
|
|
120
|
+
|
|
121
|
+
# Getting Started
|
|
122
|
+
|
|
123
|
+
These are all the available features of the SDK.
|
|
124
|
+
|
|
125
|
+
<table>
|
|
126
|
+
<thead>
|
|
127
|
+
<tr>
|
|
128
|
+
<th width="25px"></th>
|
|
129
|
+
<th width="250px" align="left">Feature</th>
|
|
130
|
+
<th width="725px" align="left">Description</th>
|
|
131
|
+
</tr>
|
|
132
|
+
</thead>
|
|
133
|
+
<tbody>
|
|
134
|
+
<tr width="600px">
|
|
135
|
+
<td align="center">
|
|
136
|
+
1
|
|
137
|
+
</td>
|
|
138
|
+
<td align="left">
|
|
139
|
+
<a href="https://github.com/trycourier/courier-react-native/blob/feature/courier-inbox/Docs/Authentication.md">
|
|
140
|
+
<code>Authentication</code>
|
|
141
|
+
</a>
|
|
142
|
+
</td>
|
|
143
|
+
<td align="left">
|
|
144
|
+
Manages user credentials between app sessions. Required if you would like to use <a href="https://github.com/trycourier/courier-react-native/blob/feature/courier-inbox/Docs/Inbox.md"><code>Courier Inbox</code></a> and <a href="https://github.com/trycourier/courier-react-native/blob/feature/courier-inbox/Docs/PushNotifications.md"><code>Push Notifications</code></a>.
|
|
145
|
+
</td>
|
|
146
|
+
</tr>
|
|
147
|
+
<tr width="600px">
|
|
148
|
+
<td align="center">
|
|
149
|
+
2
|
|
150
|
+
</td>
|
|
151
|
+
<td align="left">
|
|
152
|
+
<a href="https://github.com/trycourier/courier-react-native/blob/feature/courier-inbox/Docs/Inbox.md">
|
|
153
|
+
<code>Courier Inbox</code>
|
|
154
|
+
</a>
|
|
155
|
+
</td>
|
|
156
|
+
<td align="left">
|
|
157
|
+
An in-app notification center you can use to notify your users. Comes with a prebuilt UI and also supports fully custom UIs.
|
|
158
|
+
</td>
|
|
159
|
+
</tr>
|
|
160
|
+
<tr width="600px">
|
|
161
|
+
<td align="center">
|
|
162
|
+
3
|
|
163
|
+
</td>
|
|
164
|
+
<td align="left">
|
|
165
|
+
<a href="https://github.com/trycourier/courier-react-native/blob/feature/courier-inbox/Docs/PushNotifications.md">
|
|
166
|
+
<code>Push Notifications</code>
|
|
167
|
+
</a>
|
|
168
|
+
</td>
|
|
169
|
+
<td align="left">
|
|
170
|
+
Automatically manages push notification device tokens and gives convenient functions for handling push notification receiving and clicking.
|
|
171
|
+
</td>
|
|
172
|
+
</tr>
|
|
173
|
+
</tbody>
|
|
174
|
+
</table>
|
|
175
|
+
|
|
176
|
+
 
|
|
177
|
+
|
|
178
|
+
# Example Projects
|
|
179
|
+
|
|
180
|
+
Starter projects using this SDK.
|
|
22
181
|
|
|
23
|
-
|
|
182
|
+
<table>
|
|
183
|
+
<thead>
|
|
184
|
+
<tr>
|
|
185
|
+
<th width="1000px" align="left">Project Link</th>
|
|
186
|
+
</tr>
|
|
187
|
+
</thead>
|
|
188
|
+
<tbody>
|
|
189
|
+
<tr width="1000px">
|
|
190
|
+
<td align="left">
|
|
191
|
+
<a href="https://github.com/trycourier/courier-react-native/tree/feature/courier-inbox/example">
|
|
192
|
+
<code>Example</code>
|
|
193
|
+
</a>
|
|
194
|
+
</td>
|
|
195
|
+
</tr>
|
|
196
|
+
</tbody>
|
|
197
|
+
</table>
|
|
24
198
|
|
|
25
|
-
|
|
199
|
+
 
|
|
26
200
|
|
|
27
|
-
|
|
201
|
+
# **Share feedback with Courier**
|
|
28
202
|
|
|
29
|
-
|
|
203
|
+
We are building the best SDKs for handling notifications! Have an idea or feedback about our SDKs? Here are some links to contact us:
|
|
30
204
|
|
|
31
|
-
|
|
205
|
+
- [Courier Feedback](https://feedback.courier.com/)
|
|
206
|
+
- [Courier React Native Issues](https://github.com/trycourier/courier-react-native/issues)
|
package/android/build.gradle
CHANGED
|
@@ -101,7 +101,7 @@ dependencies {
|
|
|
101
101
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
102
102
|
|
|
103
103
|
// Courier Core SDK
|
|
104
|
-
api 'com.github.trycourier:courier-android:2.0.
|
|
104
|
+
api 'com.github.trycourier:courier-android:2.0.37'
|
|
105
105
|
api 'androidx.recyclerview:recyclerview:1.3.1'
|
|
106
106
|
|
|
107
107
|
}
|
|
@@ -4,7 +4,9 @@ import android.content.Intent
|
|
|
4
4
|
import com.courier.android.Courier
|
|
5
5
|
import com.courier.android.models.*
|
|
6
6
|
import com.courier.android.modules.*
|
|
7
|
+
import com.courier.android.utils.isPushPermissionGranted
|
|
7
8
|
import com.courier.android.utils.pushNotification
|
|
9
|
+
import com.courier.android.utils.requestNotificationPermission
|
|
8
10
|
import com.courier.android.utils.trackPushNotificationClick
|
|
9
11
|
import com.facebook.react.ReactActivity
|
|
10
12
|
import com.facebook.react.bridge.*
|
|
@@ -70,28 +72,16 @@ class CourierReactNativeModule(reactContext: ReactApplicationContext) : ReactCon
|
|
|
70
72
|
)
|
|
71
73
|
}
|
|
72
74
|
|
|
73
|
-
@ReactMethod
|
|
75
|
+
@ReactMethod // TODO: Update in the future
|
|
74
76
|
fun requestNotificationPermission(promise: Promise) {
|
|
75
|
-
|
|
76
|
-
// reactActivity?.requestNotificationPermission { isGranted ->
|
|
77
|
-
//// val status = if (isGranted) NotificationPermissionStatus.AUTHORIZED else NotificationPermissionStatus.DENIED
|
|
78
|
-
//// promise.resolve(status.value)
|
|
79
|
-
// }
|
|
80
|
-
// } catch (e: Exception) {
|
|
81
|
-
// promise.reject(CourierEvents.COURIER_ERROR_TAG, e)
|
|
82
|
-
// }
|
|
77
|
+
reactActivity?.requestNotificationPermission()
|
|
83
78
|
}
|
|
84
79
|
|
|
85
|
-
@ReactMethod
|
|
80
|
+
@ReactMethod // TODO: Update in the future
|
|
86
81
|
fun getNotificationPermissionStatus(promise: Promise) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
// promise.resolve(status.value)
|
|
91
|
-
// }
|
|
92
|
-
// } catch (e: Exception) {
|
|
93
|
-
// promise.reject(COURIER_ERROR_TAG, e)
|
|
94
|
-
// }
|
|
82
|
+
val granted = reactActivity?.isPushPermissionGranted
|
|
83
|
+
val status = if (granted == true) "authorized" else "denied"
|
|
84
|
+
promise.resolve(status)
|
|
95
85
|
}
|
|
96
86
|
|
|
97
87
|
@ReactMethod
|
|
@@ -3,9 +3,9 @@ package com.courierreactnative
|
|
|
3
3
|
import android.content.Context
|
|
4
4
|
import android.graphics.Color
|
|
5
5
|
import android.graphics.Typeface
|
|
6
|
-
import android.os.Handler
|
|
7
6
|
import android.view.View
|
|
8
7
|
import androidx.recyclerview.widget.DividerItemDecoration
|
|
8
|
+
import com.courier.android.inbox.CourierInbox
|
|
9
9
|
import com.courier.android.inbox.CourierInboxButtonStyles
|
|
10
10
|
import com.courier.android.inbox.CourierInboxFont
|
|
11
11
|
import com.courier.android.inbox.CourierInboxTheme
|
|
@@ -16,7 +16,7 @@ import com.facebook.react.uimanager.ThemedReactContext
|
|
|
16
16
|
import com.facebook.react.uimanager.annotations.ReactProp
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class CourierReactNativeViewManager : SimpleViewManager<
|
|
19
|
+
class CourierReactNativeViewManager : SimpleViewManager<CourierInbox>() {
|
|
20
20
|
|
|
21
21
|
private companion object {
|
|
22
22
|
const val ON_CLICK_MESSAGE_AT_INDEX = "courierClickMessageAtIndex"
|
|
@@ -26,14 +26,14 @@ class CourierReactNativeViewManager : SimpleViewManager<ReactNativeCourierInbox>
|
|
|
26
26
|
|
|
27
27
|
override fun getName() = "CourierReactNativeView"
|
|
28
28
|
|
|
29
|
-
override fun createViewInstance(reactContext: ThemedReactContext):
|
|
29
|
+
override fun createViewInstance(reactContext: ThemedReactContext): CourierInbox = CourierInbox(reactContext)
|
|
30
30
|
|
|
31
31
|
private val View.reactContext: ThemedReactContext get() = context as ThemedReactContext
|
|
32
32
|
|
|
33
33
|
@ReactProp(name = "onClickInboxMessageAtIndex")
|
|
34
|
-
fun setOnClickInboxMessageAtIndex(view:
|
|
34
|
+
fun setOnClickInboxMessageAtIndex(view: CourierInbox, callback: Boolean) {
|
|
35
35
|
|
|
36
|
-
view.
|
|
36
|
+
view.setOnClickMessageListener { message, index ->
|
|
37
37
|
|
|
38
38
|
val map = Arguments.createMap()
|
|
39
39
|
map.putMap("message", message.toWritableMap())
|
|
@@ -46,9 +46,9 @@ class CourierReactNativeViewManager : SimpleViewManager<ReactNativeCourierInbox>
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
@ReactProp(name = "onClickInboxActionForMessageAtIndex")
|
|
49
|
-
fun setOnClickInboxActionForMessageAtIndex(view:
|
|
49
|
+
fun setOnClickInboxActionForMessageAtIndex(view: CourierInbox, callback: Boolean) {
|
|
50
50
|
|
|
51
|
-
view.
|
|
51
|
+
view.setOnClickActionListener { action, message, index ->
|
|
52
52
|
|
|
53
53
|
val map = Arguments.createMap()
|
|
54
54
|
map.putMap("action", action.toWritableMap())
|
|
@@ -62,9 +62,9 @@ class CourierReactNativeViewManager : SimpleViewManager<ReactNativeCourierInbox>
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
@ReactProp(name = "onScrollInbox")
|
|
65
|
-
fun setOnScrollInbox(view:
|
|
65
|
+
fun setOnScrollInbox(view: CourierInbox, callback: Boolean) {
|
|
66
66
|
|
|
67
|
-
view.
|
|
67
|
+
view.setOnScrollInboxListener { offsetInDp ->
|
|
68
68
|
|
|
69
69
|
val offset = Arguments.createMap()
|
|
70
70
|
offset.putInt("y", offsetInDp)
|
|
@@ -80,9 +80,9 @@ class CourierReactNativeViewManager : SimpleViewManager<ReactNativeCourierInbox>
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
@ReactProp(name = "theme")
|
|
83
|
-
fun setTheme(view:
|
|
84
|
-
view.
|
|
85
|
-
view.
|
|
83
|
+
fun setTheme(view: CourierInbox, theme: ReadableMap) {
|
|
84
|
+
view.lightTheme = theme.getMap("light")?.toTheme(view) ?: CourierInboxTheme.DEFAULT_LIGHT
|
|
85
|
+
view.darkTheme = theme.getMap("dark")?.toTheme(view) ?: CourierInboxTheme.DEFAULT_DARK
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
private fun ReadableMap.toTheme(view: View): CourierInboxTheme {
|
package/lib/commonjs/index.js
CHANGED
|
@@ -100,7 +100,6 @@ class Courier {
|
|
|
100
100
|
/**
|
|
101
101
|
* Tells native Courier SDKs to show or hide logs.
|
|
102
102
|
* Defaults to the React __DEV__ mode
|
|
103
|
-
* @example Courier.setIsDebugging(true)
|
|
104
103
|
*/
|
|
105
104
|
setIsDebugging(isDebugging) {
|
|
106
105
|
var _this$debugListener;
|
|
@@ -118,14 +117,16 @@ class Courier {
|
|
|
118
117
|
this._isDebugging = isDebugging;
|
|
119
118
|
return this._isDebugging;
|
|
120
119
|
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Returns the status of debugging
|
|
123
|
+
*/
|
|
121
124
|
get isDebugging() {
|
|
122
125
|
return this._isDebugging;
|
|
123
126
|
}
|
|
124
127
|
|
|
125
128
|
/**
|
|
126
|
-
*
|
|
127
|
-
* @param props
|
|
128
|
-
* @returns
|
|
129
|
+
* Sets the notification presentation options for iOS
|
|
129
130
|
*/
|
|
130
131
|
iOSForegroundPresentationOptions(props) {
|
|
131
132
|
// Only works on iOS
|
|
@@ -137,9 +138,7 @@ class Courier {
|
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
/**
|
|
140
|
-
*
|
|
141
|
-
* using Courier token management apis
|
|
142
|
-
* @example const apnsToken = await Courier.apnsToken
|
|
141
|
+
* Gets the apns token being used
|
|
143
142
|
*/
|
|
144
143
|
get apnsToken() {
|
|
145
144
|
if (_reactNative.Platform.OS !== 'ios') return undefined;
|
|
@@ -147,47 +146,45 @@ class Courier {
|
|
|
147
146
|
}
|
|
148
147
|
|
|
149
148
|
/**
|
|
150
|
-
*
|
|
151
|
-
* using Courier token management apis
|
|
152
|
-
* @example const fcmToken = await Courier.fcmToken
|
|
149
|
+
* Gets the fcm token being used
|
|
153
150
|
*/
|
|
154
151
|
get fcmToken() {
|
|
155
152
|
return CourierReactNativeModules.getFcmToken();
|
|
156
153
|
}
|
|
157
154
|
|
|
158
155
|
/**
|
|
159
|
-
* Sets the
|
|
160
|
-
* using Courier token management apis
|
|
161
|
-
* @example await setFcmToken('asdf...asdf')
|
|
156
|
+
* Sets the fcm token to be used by Courier
|
|
162
157
|
*/
|
|
163
158
|
setFcmToken(props) {
|
|
164
159
|
return CourierReactNativeModules.setFcmToken(props.token);
|
|
165
160
|
}
|
|
166
161
|
|
|
167
162
|
/**
|
|
168
|
-
*
|
|
169
|
-
*
|
|
163
|
+
* Returns the notification permission status
|
|
164
|
+
* Only supported on iOS
|
|
170
165
|
*/
|
|
171
166
|
getNotificationPermissionStatus() {
|
|
172
|
-
|
|
167
|
+
if (_reactNative.Platform.OS === 'ios') {
|
|
168
|
+
return CourierReactNativeModules.getNotificationPermissionStatus();
|
|
169
|
+
}
|
|
170
|
+
return Promise.reject('unknown');
|
|
173
171
|
}
|
|
174
172
|
|
|
175
173
|
/**
|
|
176
|
-
* Requests notification
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
* if the user has already been asked for permission.
|
|
180
|
-
* @example const permissionStatus = await Courier.requestNotificationPermission()
|
|
174
|
+
* Requests notification permissions
|
|
175
|
+
* This will show a dialog asking the user for permission
|
|
176
|
+
* Only supported on iOS
|
|
181
177
|
*/
|
|
182
178
|
requestNotificationPermission() {
|
|
183
|
-
|
|
179
|
+
if (_reactNative.Platform.OS === 'ios') {
|
|
180
|
+
return CourierReactNativeModules.requestNotificationPermission();
|
|
181
|
+
}
|
|
182
|
+
return Promise.reject('unknown');
|
|
184
183
|
}
|
|
185
184
|
|
|
186
185
|
/**
|
|
187
|
-
*
|
|
188
|
-
|
|
189
|
-
* @returns function that can be used to unsubscribe from registered listeners
|
|
190
|
-
*/
|
|
186
|
+
* Listens to push notification clicked and delivered messages
|
|
187
|
+
*/
|
|
191
188
|
addPushNotificationListener(props) {
|
|
192
189
|
const pushListener = new _CourierPushListener.CourierPushListener();
|
|
193
190
|
if (_reactNative.Platform.OS === 'android') {
|
|
@@ -240,46 +237,29 @@ class Courier {
|
|
|
240
237
|
}
|
|
241
238
|
|
|
242
239
|
/**
|
|
243
|
-
*
|
|
244
|
-
*
|
|
240
|
+
* Gets the user id that is currently being used
|
|
241
|
+
* This is the user id associated with the http requests the sdk does
|
|
245
242
|
*/
|
|
246
243
|
get userId() {
|
|
247
244
|
return CourierReactNativeModules.getUserId() ?? undefined;
|
|
248
245
|
}
|
|
249
246
|
|
|
250
247
|
/**
|
|
251
|
-
*
|
|
252
|
-
* using native level storage apis
|
|
253
|
-
*
|
|
254
|
-
* @example
|
|
255
|
-
* ```
|
|
256
|
-
*await Courier.signIn({
|
|
257
|
-
accessToken: YOUR_COURIER_GENERATED_JWT,
|
|
258
|
-
clientKey: YOUR_CLIENT_KEY,
|
|
259
|
-
userId: YOUR_USER_ID,
|
|
260
|
-
})
|
|
261
|
-
* ```
|
|
262
|
-
* Your access token should be generated using this endpoint
|
|
263
|
-
* that is requested from your backend
|
|
264
|
-
* https://www.courier.com/docs/reference/auth/issue-token/
|
|
248
|
+
* Registers the auth token, client key and user id the sdk should use for requests
|
|
265
249
|
*/
|
|
266
250
|
signIn(props) {
|
|
267
251
|
return CourierReactNativeModules.signIn(props.accessToken, props.clientKey ?? null, props.userId);
|
|
268
252
|
}
|
|
269
253
|
|
|
270
254
|
/**
|
|
271
|
-
*
|
|
272
|
-
* @param props
|
|
273
|
-
* @returns
|
|
255
|
+
* Removes the current user and credentials from the sdk
|
|
274
256
|
*/
|
|
275
257
|
signOut() {
|
|
276
258
|
return CourierReactNativeModules.signOut();
|
|
277
259
|
}
|
|
278
260
|
|
|
279
261
|
/**
|
|
280
|
-
*
|
|
281
|
-
* @param props
|
|
282
|
-
* @returns
|
|
262
|
+
* Listens to authentication changes for the current user
|
|
283
263
|
*/
|
|
284
264
|
addAuthenticationListener(props) {
|
|
285
265
|
const authListener = new _CourierAuthenticationListener.CourierAuthenticationListener();
|
|
@@ -291,45 +271,35 @@ class Courier {
|
|
|
291
271
|
}
|
|
292
272
|
|
|
293
273
|
/**
|
|
294
|
-
*
|
|
295
|
-
* @param props
|
|
296
|
-
* @returns
|
|
274
|
+
* Removes an authentication listener
|
|
297
275
|
*/
|
|
298
276
|
removeAuthenticationListener(props) {
|
|
299
277
|
return CourierReactNativeModules.removeAuthenticationListener(props.listenerId);
|
|
300
278
|
}
|
|
301
279
|
|
|
302
280
|
/**
|
|
303
|
-
*
|
|
304
|
-
* @param props
|
|
305
|
-
* @returns
|
|
281
|
+
* Reads an inbox message
|
|
306
282
|
*/
|
|
307
283
|
readMessage(props) {
|
|
308
284
|
return CourierReactNativeModules.readMessage(props.messageId);
|
|
309
285
|
}
|
|
310
286
|
|
|
311
287
|
/**
|
|
312
|
-
*
|
|
313
|
-
* @param props
|
|
314
|
-
* @returns
|
|
288
|
+
* Unreads an inbox message
|
|
315
289
|
*/
|
|
316
290
|
unreadMessage(props) {
|
|
317
291
|
return CourierReactNativeModules.unreadMessage(props.messageId);
|
|
318
292
|
}
|
|
319
293
|
|
|
320
294
|
/**
|
|
321
|
-
*
|
|
322
|
-
* @param props
|
|
323
|
-
* @returns
|
|
295
|
+
* Reads all the inbox messages
|
|
324
296
|
*/
|
|
325
297
|
readAllInboxMessages() {
|
|
326
298
|
return CourierReactNativeModules.readAllInboxMessages();
|
|
327
299
|
}
|
|
328
300
|
|
|
329
301
|
/**
|
|
330
|
-
*
|
|
331
|
-
* @param props
|
|
332
|
-
* @returns
|
|
302
|
+
* Listens to changes for the inbox itself
|
|
333
303
|
*/
|
|
334
304
|
addInboxListener(props) {
|
|
335
305
|
// Create the initial listeners
|
|
@@ -354,38 +324,32 @@ class Courier {
|
|
|
354
324
|
}
|
|
355
325
|
|
|
356
326
|
/**
|
|
357
|
-
*
|
|
358
|
-
* @param props
|
|
359
|
-
* @returns
|
|
327
|
+
* Removes an inbox listener
|
|
360
328
|
*/
|
|
361
329
|
removeInboxListener(props) {
|
|
362
330
|
return CourierReactNativeModules.removeInboxListener(props.listenerId);
|
|
363
331
|
}
|
|
364
332
|
|
|
365
333
|
/**
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
* @returns
|
|
334
|
+
* Refreshes the inbox
|
|
335
|
+
* Useful for pull to refresh
|
|
369
336
|
*/
|
|
370
337
|
async refreshInbox() {
|
|
371
338
|
return CourierReactNativeModules.refreshInbox();
|
|
372
339
|
}
|
|
373
340
|
|
|
374
341
|
/**
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
* @returns
|
|
342
|
+
* Fetches the next page of inbox messages
|
|
343
|
+
* Returns the fetched inbox messages
|
|
378
344
|
*/
|
|
379
345
|
async fetchNextPageOfMessages() {
|
|
380
346
|
return CourierReactNativeModules.fetchNextPageOfMessages();
|
|
381
347
|
}
|
|
382
348
|
|
|
383
349
|
/**
|
|
384
|
-
*
|
|
350
|
+
* Sets the pagination limit
|
|
385
351
|
* Min = 1
|
|
386
352
|
* Max = 100
|
|
387
|
-
* @param props
|
|
388
|
-
* @returns
|
|
389
353
|
*/
|
|
390
354
|
setInboxPaginationLimit(props) {
|
|
391
355
|
CourierReactNativeModules.setInboxPaginationLimit(props.limit);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_CourierInboxListener","_CourierPushListener","_CourierAuthenticationListener","_CourierInboxView","_CourierProvider","LINKING_ERROR","Platform","select","ios","default","CourierReactNativeModules","NativeModules","CourierReactNativeModule","Proxy","get","Error","CourierEventEmitter","NativeEventEmitter","Courier","PUSH_NOTIFICATION_CLICKED","PUSH_NOTIFICATION_DELIVERED","_isDebugging","constructor","setDefaults","shared","_sharedInstance","setIsDebugging","__DEV__","iOSForegroundPresentationOptions","options","isDebugging","_this$debugListener","debugListener","remove","addListener","event","console","log","setDebugMode","props","OS","normalizedParams","Array","from","Set","apnsToken","undefined","getApnsToken","fcmToken","getFcmToken","setFcmToken","token","getNotificationPermissionStatus","requestNotificationPermission","addPushNotificationListener","pushListener","CourierPushListener","onPushNotificationClicked","onNotificationClickedListener","DeviceEventEmitter","JSON","parse","error","onPushNotificationDelivered","onNotificationDeliveredListener","registerPushNotificationClickedOnKilledState","userId","getUserId","signIn","accessToken","clientKey","signOut","addAuthenticationListener","authListener","CourierAuthenticationListener","onUserChanged","listenerId","removeAuthenticationListener","readMessage","messageId","unreadMessage","readAllInboxMessages","addInboxListener","inboxListener","CourierInboxListener","onInitialLoad","onError","onMessagesChanged","messages","unreadMessageCount","totalMessageCount","canPaginate","removeInboxListener","refreshInbox","fetchNextPageOfMessages","setInboxPaginationLimit","limit","_default","exports"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASA,IAAAC,qBAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,G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ener","_CourierAuthenticationListener","_CourierInboxView","_CourierProvider","LINKING_ERROR","Platform","select","ios","default","CourierReactNativeModules","NativeModules","CourierReactNativeModule","Proxy","get","Error","CourierEventEmitter","NativeEventEmitter","Courier","PUSH_NOTIFICATION_CLICKED","PUSH_NOTIFICATION_DELIVERED","_isDebugging","constructor","setDefaults","shared","_sharedInstance","setIsDebugging","__DEV__","iOSForegroundPresentationOptions","options","isDebugging","_this$debugListener","debugListener","remove","addListener","event","console","log","setDebugMode","props","OS","normalizedParams","Array","from","Set","apnsToken","undefined","getApnsToken","fcmToken","getFcmToken","setFcmToken","token","getNotificationPermissionStatus","Promise","reject","requestNotificationPermission","addPushNotificationListener","pushListener","CourierPushListener","onPushNotificationClicked","onNotificationClickedListener","DeviceEventEmitter","JSON","parse","error","onPushNotificationDelivered","onNotificationDeliveredListener","registerPushNotificationClickedOnKilledState","userId","getUserId","signIn","accessToken","clientKey","signOut","addAuthenticationListener","authListener","CourierAuthenticationListener","onUserChanged","listenerId","removeAuthenticationListener","readMessage","messageId","unreadMessage","readAllInboxMessages","addInboxListener","inboxListener","CourierInboxListener","onInitialLoad","onError","onMessagesChanged","messages","unreadMessageCount","totalMessageCount","canPaginate","removeInboxListener","refreshInbox","fetchNextPageOfMessages","setInboxPaginationLimit","limit","_default","exports"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASA,IAAAC,qBAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,8BAAA,GAAAH,OAAA;AAIA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AARA;;AAMA;;AAQA,MAAMM,aAAa,GAChB,2FAA0F,GAC3FC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;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