genesys-cloud-streaming-client 20.0.2-STREAM-1812.4 → 20.0.2-develop.23
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/cjs/client.d.ts +0 -6
- package/dist/cjs/client.js +0 -30
- package/dist/cjs/ping.js +2 -2
- package/dist/deploy-info.json +3 -3
- package/dist/es/client.d.ts +0 -6
- package/dist/es/client.js +0 -32
- package/dist/es/index.bundle.js +8730 -3264
- package/dist/es/ping.js +2 -2
- package/dist/manifest.json +3 -3
- package/dist/npm/client.d.ts +0 -6
- package/dist/npm/client.js +0 -30
- package/dist/npm/ping.js +2 -2
- package/dist/streaming-client.browser.js +1 -1
- package/dist/v20/streaming-client.browser.js +1 -1
- package/dist/v20.0.2/streaming-client.browser.js +1 -1
- package/package.json +2 -3
package/dist/es/ping.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import { __awaiter } from "tslib";
|
|
3
|
-
const DEFAULT_PING_INTERVAL =
|
|
4
|
-
const DEFAULT_MAXIMUM_FAILED_PINGS_BEFORE_DISCONNECT =
|
|
3
|
+
const DEFAULT_PING_INTERVAL = 14 * 1000;
|
|
4
|
+
const DEFAULT_MAXIMUM_FAILED_PINGS_BEFORE_DISCONNECT = 1;
|
|
5
5
|
export class Ping {
|
|
6
6
|
constructor(client, stanzaInstance, options = {}) {
|
|
7
7
|
this.client = client;
|
package/dist/manifest.json
CHANGED
package/dist/npm/client.d.ts
CHANGED
|
@@ -33,9 +33,6 @@ export declare class Client extends EventEmitter {
|
|
|
33
33
|
private boundStanzaDisconnect?;
|
|
34
34
|
private boundStanzaNoLongerSubscribed?;
|
|
35
35
|
private boundStanzaDuplicateId?;
|
|
36
|
-
private boundHandleIQResult?;
|
|
37
|
-
private boundHandleSocketError?;
|
|
38
|
-
private boundHandleSocketReset?;
|
|
39
36
|
http: HttpClient;
|
|
40
37
|
notifications: NotificationsAPI;
|
|
41
38
|
_notifications: Notifications;
|
|
@@ -49,9 +46,6 @@ export declare class Client extends EventEmitter {
|
|
|
49
46
|
constructor(options: IClientOptions);
|
|
50
47
|
private handleSendEventFromExtension;
|
|
51
48
|
private checkIsBackgroundAssistant;
|
|
52
|
-
private handleIQResult;
|
|
53
|
-
private handleSocketError;
|
|
54
|
-
private handleSocketReset;
|
|
55
49
|
private addInateEventHandlers;
|
|
56
50
|
private removeStanzaBoundEventHandlers;
|
|
57
51
|
private proxyStanzaEvents;
|
package/dist/npm/client.js
CHANGED
|
@@ -34,8 +34,6 @@ const MAX_CHANNEL_REUSES = 10;
|
|
|
34
34
|
const SESSION_STORE_KEY = 'sc_connectionData';
|
|
35
35
|
const BACKOFF_DECREASE_DELAY_MULTIPLIER = 5;
|
|
36
36
|
const INITIAL_DELAY = 2000;
|
|
37
|
-
// hjon:upgrade
|
|
38
|
-
// hjon:iq:result
|
|
39
37
|
class Client extends events_1.default {
|
|
40
38
|
constructor(options) {
|
|
41
39
|
super();
|
|
@@ -133,24 +131,9 @@ class Client extends events_1.default {
|
|
|
133
131
|
}
|
|
134
132
|
return false;
|
|
135
133
|
}
|
|
136
|
-
async handleIQResult(iq) {
|
|
137
|
-
this.logger.warn(`Hjon: IQ result with id ${iq.id} received: ${iq}`);
|
|
138
|
-
}
|
|
139
|
-
handleSocketError(error) {
|
|
140
|
-
this.logger.warn(`Hjon: socket error: ${error}`);
|
|
141
|
-
}
|
|
142
|
-
handleSocketReset(error) {
|
|
143
|
-
this.logger.warn(`Hjon: socket error seems to be a RST: ${error}`);
|
|
144
|
-
}
|
|
145
134
|
addInateEventHandlers(stanza) {
|
|
146
135
|
// make sure we don't stack event handlers. There should only ever be *at most* one handler
|
|
147
136
|
this.removeStanzaBoundEventHandlers();
|
|
148
|
-
this.boundHandleIQResult = this.handleIQResult.bind(this);
|
|
149
|
-
stanza.on('hjon:iq:result', this.boundHandleIQResult);
|
|
150
|
-
this.boundHandleSocketError = this.handleSocketError.bind(this);
|
|
151
|
-
stanza.on('hjon:socketerror', this.boundHandleSocketError);
|
|
152
|
-
this.boundHandleSocketReset = this.handleSocketReset.bind(this);
|
|
153
|
-
stanza.on('hjon:socketerror:reset', this.boundHandleSocketReset);
|
|
154
137
|
this.boundStanzaDisconnect = this.handleStanzaDisconnectedEvent.bind(this, stanza);
|
|
155
138
|
this.boundStanzaNoLongerSubscribed = this.handleNoLongerSubscribed.bind(this, stanza);
|
|
156
139
|
this.boundStanzaDuplicateId = this.handleDuplicateId.bind(this, stanza);
|
|
@@ -167,19 +150,6 @@ class Client extends events_1.default {
|
|
|
167
150
|
});
|
|
168
151
|
}
|
|
169
152
|
removeStanzaBoundEventHandlers() {
|
|
170
|
-
var _a, _b, _c;
|
|
171
|
-
if (this.boundHandleIQResult) {
|
|
172
|
-
(_a = this.activeStanzaInstance) === null || _a === void 0 ? void 0 : _a.off('hjon:iq:result', this.boundHandleIQResult);
|
|
173
|
-
this.boundHandleIQResult = undefined;
|
|
174
|
-
}
|
|
175
|
-
if (this.boundHandleSocketError) {
|
|
176
|
-
(_b = this.activeStanzaInstance) === null || _b === void 0 ? void 0 : _b.on('hjon:socketerror', this.boundHandleSocketError);
|
|
177
|
-
this.boundHandleSocketError = undefined;
|
|
178
|
-
}
|
|
179
|
-
if (this.boundHandleSocketReset) {
|
|
180
|
-
(_c = this.activeStanzaInstance) === null || _c === void 0 ? void 0 : _c.on('hjon:socketerror:reset', this.boundHandleSocketReset);
|
|
181
|
-
this.boundHandleSocketReset = undefined;
|
|
182
|
-
}
|
|
183
153
|
if (this.boundStanzaDisconnect) {
|
|
184
154
|
this.off(STANZA_DISCONNECTED, this.boundStanzaDisconnect);
|
|
185
155
|
this.boundStanzaDisconnect = undefined;
|
package/dist/npm/ping.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Ping = void 0;
|
|
4
|
-
const DEFAULT_PING_INTERVAL =
|
|
5
|
-
const DEFAULT_MAXIMUM_FAILED_PINGS_BEFORE_DISCONNECT =
|
|
4
|
+
const DEFAULT_PING_INTERVAL = 14 * 1000;
|
|
5
|
+
const DEFAULT_MAXIMUM_FAILED_PINGS_BEFORE_DISCONNECT = 1;
|
|
6
6
|
class Ping {
|
|
7
7
|
constructor(client, stanzaInstance, options = {}) {
|
|
8
8
|
this.client = client;
|