@xapp/chat-widget 1.46.3 → 1.46.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/dist/App.d.ts +1 -0
- package/dist/components/ChatWidget/ChatWidget.stories.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.es.js +87 -79
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +87 -79
- package/dist/index.js.map +1 -1
- package/dist/utils/http-utils.d.ts +1 -1
- package/dist/utils/retryRequest.d.ts +9 -4
- package/dist/xapp/StentorDirectChat.d.ts +1 -1
- package/package.json +9 -9
|
@@ -2,4 +2,4 @@ import { IntentRequest, LaunchRequest, OptionSelectRequest, PermissionRequest }
|
|
|
2
2
|
export declare const TIMEOUT_FB_MS = 20000;
|
|
3
3
|
export declare const TIMEOUT_STENTOR_MS = 20000;
|
|
4
4
|
export declare type StentorRequest = IntentRequest | LaunchRequest | OptionSelectRequest | PermissionRequest;
|
|
5
|
-
export declare function postMessageToStentor<TResponse>(data: StentorRequest, url: string, key: string): Promise<TResponse>;
|
|
5
|
+
export declare function postMessageToStentor<TResponse>(data: StentorRequest, url: string, key: string, signal?: AbortSignal): Promise<TResponse>;
|
|
@@ -4,10 +4,15 @@ export declare class RetryOptions {
|
|
|
4
4
|
log?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare class RetryRequest {
|
|
7
|
-
private attempts;
|
|
8
7
|
private options;
|
|
9
|
-
private lastError;
|
|
10
8
|
constructor(options?: RetryOptions);
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Fetch with retry and timeout
|
|
11
|
+
*
|
|
12
|
+
* Help from https://stackoverflow.com/a/66499718
|
|
13
|
+
* @param executor
|
|
14
|
+
* @param options
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
fetch<T>(executor: (signal: AbortSignal) => Promise<T>, options?: RetryOptions): Promise<T>;
|
|
13
18
|
}
|
|
@@ -6,12 +6,12 @@ export interface StentorDirectChatConfig {
|
|
|
6
6
|
readonly key: string;
|
|
7
7
|
}
|
|
8
8
|
export declare class StentorDirectChat implements ChatServer {
|
|
9
|
+
private visitorInfo;
|
|
9
10
|
private _userId;
|
|
10
11
|
private _sessionId;
|
|
11
12
|
private _accessToken;
|
|
12
13
|
private _attributes;
|
|
13
14
|
private dispatch;
|
|
14
|
-
private visitorInfo;
|
|
15
15
|
private isNewSession;
|
|
16
16
|
private readonly configurableMessages;
|
|
17
17
|
private readonly config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xapp/chat-widget",
|
|
3
|
-
"version": "1.46.
|
|
3
|
+
"version": "1.46.4",
|
|
4
4
|
"description": "XAPP Chat Widget",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf ./lib/* && rm -rf ./dist/*",
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"@types/react-transition-group": "4.4.5",
|
|
56
56
|
"@types/socket.io-client": "1.4.36",
|
|
57
57
|
"@types/store": "2.0.2",
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "5.30.
|
|
59
|
-
"@typescript-eslint/parser": "5.30.
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "5.30.6",
|
|
59
|
+
"@typescript-eslint/parser": "5.30.6",
|
|
60
60
|
"babel-eslint": "10.1.0",
|
|
61
61
|
"babel-jest": "27.5.1",
|
|
62
62
|
"babel-loader": "8.2.5",
|
|
63
63
|
"enzyme": "3.11.0",
|
|
64
64
|
"enzyme-adapter-react-16": "1.15.6",
|
|
65
|
-
"eslint": "8.
|
|
65
|
+
"eslint": "8.20.0",
|
|
66
66
|
"eslint-config-prettier": "7.2.0",
|
|
67
67
|
"eslint-config-react-app": "6.0.0",
|
|
68
68
|
"eslint-plugin-flowtype": "8.0.3",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"react-redux": "7.2.8",
|
|
78
78
|
"redux": "4.2.0",
|
|
79
79
|
"redux-thunk": "2.4.1",
|
|
80
|
-
"rollup": "2.
|
|
80
|
+
"rollup": "2.77.0",
|
|
81
81
|
"rollup-plugin-inject-process-env": "1.3.1",
|
|
82
82
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
83
83
|
"rollup-plugin-scss": "3.0.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"rollup-plugin-typescript2": "0.32.1",
|
|
86
86
|
"sass": "1.53.0",
|
|
87
87
|
"sass-loader": "10.3.1",
|
|
88
|
-
"stentor-models": "1.56.
|
|
88
|
+
"stentor-models": "1.56.31",
|
|
89
89
|
"ts-jest": "27.1.5",
|
|
90
90
|
"typescript": "4.7.4"
|
|
91
91
|
},
|
|
@@ -102,13 +102,13 @@
|
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"@rollup/plugin-replace": "^4.0.0",
|
|
105
|
-
"@xapp/chat-widget-core": "1.46.
|
|
106
|
-
"@xapp/stentor-chat-widget": "1.46.
|
|
105
|
+
"@xapp/chat-widget-core": "1.46.4",
|
|
106
|
+
"@xapp/stentor-chat-widget": "1.46.4",
|
|
107
107
|
"date-fns": "2.28.0",
|
|
108
108
|
"react-transition-group": "4.4.2",
|
|
109
109
|
"socket.io-client": "4.5.1",
|
|
110
110
|
"store": "2.0.12",
|
|
111
111
|
"tslib": "2.4.0"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "cd47bd41367f87f3a463280aef0073b8ef382380"
|
|
114
114
|
}
|