@trycourier/react-provider 3.1.3 → 3.1.4-internal.7e3387a.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 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -22,7 +22,9 @@ interface ICourierProvider {
|
|
|
22
22
|
brandId?: string;
|
|
23
23
|
|
|
24
24
|
/** Allows the browser to modify or react to a received message before the message is displayed to the user */
|
|
25
|
-
onMessage?: (
|
|
25
|
+
onMessage?: (
|
|
26
|
+
message?: IInboxMessagePrpeview
|
|
27
|
+
) => IInboxMessagePrpeview | undefined;
|
|
26
28
|
|
|
27
29
|
/** Courier client key. Along with userId and userSignature this can be used as an alternative to the authorization field / token. */
|
|
28
30
|
clientKey?: string;
|
|
@@ -51,10 +53,6 @@ interface Brand {
|
|
|
51
53
|
textColor?: string;
|
|
52
54
|
text?: string;
|
|
53
55
|
};
|
|
54
|
-
widgetBackground?: {
|
|
55
|
-
topColor?: string;
|
|
56
|
-
bottomColor?: string;
|
|
57
|
-
};
|
|
58
56
|
icons?: {
|
|
59
57
|
bell?: string;
|
|
60
58
|
message?: string;
|
|
@@ -84,7 +82,7 @@ There are a few ways to listen for messages and being able react.
|
|
|
84
82
|
import { CourierProvider } from "@trycourier/react-provider";
|
|
85
83
|
|
|
86
84
|
const MyApp = ({ children }) => {
|
|
87
|
-
const handleOnMessage = (messsage:
|
|
85
|
+
const handleOnMessage = (messsage: IInboxMessagePreview) => {
|
|
88
86
|
console.log(message);
|
|
89
87
|
return message;
|
|
90
88
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trycourier/react-provider",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4-internal.7e3387a.0+7e3387a",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "typings/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@trycourier/client-graphql": "^3.1.
|
|
19
|
+
"@trycourier/client-graphql": "^3.1.4-internal.7e3387a.0+7e3387a",
|
|
20
20
|
"buffer": "^6.0.3",
|
|
21
21
|
"jwt-decode": "^3.1.2",
|
|
22
22
|
"react-use": "^17.2.1",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"dist/",
|
|
34
34
|
"typings/"
|
|
35
35
|
],
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "7e3387a5b486ca6cc389afdceef2ee90dda82e43"
|
|
37
37
|
}
|