@xapp/chat-widget 1.46.2 → 1.46.5

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.
@@ -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
- retry<T>(executor: Promise<T>): Promise<T>;
12
- private log;
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.2",
3
+ "version": "1.46.5",
4
4
  "description": "XAPP Chat Widget",
5
5
  "scripts": {
6
6
  "clean": "rm -rf ./lib/* && rm -rf ./dist/*",
@@ -39,7 +39,7 @@
39
39
  "homepage": "https://github.com/XappMedia/chat-widget#readme",
40
40
  "devDependencies": {
41
41
  "@babel/core": "7.18.6",
42
- "@rollup/plugin-commonjs": "21.1.0",
42
+ "@rollup/plugin-commonjs": "22.0.1",
43
43
  "@rollup/plugin-json": "4.1.0",
44
44
  "@rollup/plugin-node-resolve": "13.3.0",
45
45
  "@storybook/addon-actions": "6.5.9",
@@ -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.5",
59
- "@typescript-eslint/parser": "5.30.5",
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.19.0",
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.76.0",
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.28",
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.2",
106
- "@xapp/stentor-chat-widget": "1.46.2",
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": "1e52ade460b37e3a4786e3bcba0ca20b9b81fffc"
113
+ "gitHead": "14016fb5c2fcf44165385e95be16e7d80ed4a958"
114
114
  }