@trycourier/react-hooks 1.51.2-internal.218be13.0 → 1.51.2-internal.3a60286.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 +4 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -35,7 +35,8 @@ import { useElementalInbox } from "@trycourier/react-hooks";
|
|
|
35
35
|
const MyApp = () => {
|
|
36
36
|
/**
|
|
37
37
|
* Auth token for courier provider, can be a token from Courier's auth/issue-token endpoint
|
|
38
|
-
* or a JWT signed with a valid courier api key. Must include scope: "user_id:<user_id_here> inbox:read:messages"
|
|
38
|
+
* or a JWT signed with a valid courier api key. Must include scope: "user_id:<user_id_here> inbox:read:messages",
|
|
39
|
+
* you must also include the "inbox:write:events" scope if making a write request or mutation as well.
|
|
39
40
|
*
|
|
40
41
|
* For more information on the auth/issue-token endpoint, visit:
|
|
41
42
|
* https://courier.com/docs/reference/auth/intro/
|
|
@@ -43,7 +44,7 @@ const MyApp = () => {
|
|
|
43
44
|
const authorization = await fetchAuthToken();
|
|
44
45
|
|
|
45
46
|
return (
|
|
46
|
-
<CourierProvider authorization="abc123">
|
|
47
|
+
<CourierProvider authorization="abc123" userId="MY_USER_ID">
|
|
47
48
|
<MyInbox />
|
|
48
49
|
</CourierProvider>
|
|
49
50
|
);
|
|
@@ -176,11 +177,11 @@ Elemental Inbox (`useElementalInbox`):
|
|
|
176
177
|
```ts
|
|
177
178
|
// This interface defines the return value of useElemental Inbox
|
|
178
179
|
interface IElementalInbox {
|
|
179
|
-
lastMessagesFetched?: number;
|
|
180
180
|
brand?: Brand;
|
|
181
181
|
from?: number;
|
|
182
182
|
isLoading?: boolean;
|
|
183
183
|
isOpen?: boolean;
|
|
184
|
+
lastMessagesFetched?: number;
|
|
184
185
|
messages?: Array<IElementalInboxMessage>;
|
|
185
186
|
startCursor?: string;
|
|
186
187
|
unreadMessageCount?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trycourier/react-hooks",
|
|
3
|
-
"version": "1.51.2-internal.
|
|
3
|
+
"version": "1.51.2-internal.3a60286.0+3a60286",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "typings/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"concat-md": "^0.3.5"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@trycourier/client-graphql": "^1.51.2-internal.
|
|
23
|
+
"@trycourier/client-graphql": "^1.51.2-internal.3a60286.0+3a60286",
|
|
24
24
|
"deep-extend": "^0.6.0",
|
|
25
25
|
"rimraf": "^3.0.2"
|
|
26
26
|
},
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
".": "./dist/index.js",
|
|
37
37
|
"./use-inbox": "./dist/inbox/use-inbox.js"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "3a60286960b36a1e7724b303ffe40f606eda4a98"
|
|
40
40
|
}
|