genesys-cloud-streaming-client 17.1.2-PCM-2352.6 → 17.1.2-develop.96
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 -2
- package/dist/cjs/client.js +5 -31
- package/dist/cjs/types/interfaces.d.ts +0 -1
- package/dist/cjs/types/named-agent.d.ts +0 -2
- package/dist/deploy-info.json +4 -4
- package/dist/es/client.d.ts +0 -2
- package/dist/es/client.js +5 -33
- package/dist/es/index.bundle.js +5 -71
- package/dist/es/types/interfaces.d.ts +0 -1
- package/dist/es/types/named-agent.d.ts +0 -2
- package/dist/npm/CHANGELOG.md +0 -2
- package/dist/npm/client.d.ts +0 -2
- package/dist/npm/client.js +5 -31
- package/dist/npm/types/interfaces.d.ts +0 -1
- package/dist/npm/types/named-agent.d.ts +0 -2
- package/dist/streaming-client.browser.ie.js +6 -6
- package/dist/streaming-client.browser.js +5 -5
- package/dist/v17/streaming-client.browser.ie.js +6 -6
- package/dist/v17/streaming-client.browser.js +5 -5
- package/dist/v17.1.2/streaming-client.browser.ie.js +6 -6
- package/dist/v17.1.2/streaming-client.browser.js +5 -5
- package/package.json +1 -1
- package/dist/cjs/server-monitor.d.ts +0 -16
- package/dist/cjs/server-monitor.js +0 -42
- package/dist/es/server-monitor.d.ts +0 -16
- package/dist/es/server-monitor.js +0 -39
- package/dist/npm/server-monitor.d.ts +0 -16
- package/dist/npm/server-monitor.js +0 -42
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genesys-cloud-streaming-client",
|
|
3
|
-
"version": "17.1.2-
|
|
3
|
+
"version": "17.1.2-develop.96",
|
|
4
4
|
"description": "client for the Genesys Cloud Streaming APIs (websocket/xmpp interface)",
|
|
5
5
|
"repository": "https:github.com/purecloudlabs/genesys-cloud-streaming-client",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Client } from './client';
|
|
2
|
-
import { NamedAgent } from './types/named-agent';
|
|
3
|
-
export interface ServerMonitorOptions {
|
|
4
|
-
stanzaTimeout?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare class ServerMonitor {
|
|
7
|
-
private client;
|
|
8
|
-
private stanzaInstance;
|
|
9
|
-
private stanzaTimeout;
|
|
10
|
-
private timeoutId?;
|
|
11
|
-
private boundSetupStanzaTimeout?;
|
|
12
|
-
constructor(client: Client, stanzaInstance: NamedAgent, options?: ServerMonitorOptions);
|
|
13
|
-
private start;
|
|
14
|
-
stop(): void;
|
|
15
|
-
private setupStanzaTimeout;
|
|
16
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServerMonitor = void 0;
|
|
4
|
-
const DEFAULT_STANZA_TIMEOUT = 70 * 1000;
|
|
5
|
-
class ServerMonitor {
|
|
6
|
-
constructor(client, stanzaInstance, options = {}) {
|
|
7
|
-
this.client = client;
|
|
8
|
-
this.stanzaInstance = stanzaInstance;
|
|
9
|
-
this.stanzaTimeout = options.stanzaTimeout || DEFAULT_STANZA_TIMEOUT;
|
|
10
|
-
this.timeoutId = undefined;
|
|
11
|
-
this.start();
|
|
12
|
-
}
|
|
13
|
-
start() {
|
|
14
|
-
this.boundSetupStanzaTimeout = this.setupStanzaTimeout.bind(this);
|
|
15
|
-
this.client.on('connected', this.boundSetupStanzaTimeout);
|
|
16
|
-
this.stanzaInstance.on('raw:incoming', this.boundSetupStanzaTimeout);
|
|
17
|
-
}
|
|
18
|
-
stop() {
|
|
19
|
-
clearTimeout(this.timeoutId);
|
|
20
|
-
this.timeoutId = undefined;
|
|
21
|
-
if (this.boundSetupStanzaTimeout) {
|
|
22
|
-
this.client.off('connected', this.boundSetupStanzaTimeout);
|
|
23
|
-
this.stanzaInstance.off('raw:incoming', this.boundSetupStanzaTimeout);
|
|
24
|
-
this.boundSetupStanzaTimeout = undefined;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
setupStanzaTimeout() {
|
|
28
|
-
clearTimeout(this.timeoutId);
|
|
29
|
-
this.timeoutId = setTimeout(() => {
|
|
30
|
-
const info = {
|
|
31
|
-
channelId: this.client.config.channelId,
|
|
32
|
-
jid: this.stanzaInstance.jid,
|
|
33
|
-
stanzaInstanceId: this.stanzaInstance.id,
|
|
34
|
-
timeout: this.stanzaTimeout
|
|
35
|
-
};
|
|
36
|
-
this.client.logger.error('Time between XMPP stanzas exceeded timeout, disconnecting', info);
|
|
37
|
-
this.stanzaInstance.sendStreamError({ text: 'time between stanzas exceeded timeout', condition: 'connection-timeout' });
|
|
38
|
-
this.stop();
|
|
39
|
-
}, this.stanzaTimeout);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.ServerMonitor = ServerMonitor;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Client } from './client';
|
|
2
|
-
import { NamedAgent } from './types/named-agent';
|
|
3
|
-
export interface ServerMonitorOptions {
|
|
4
|
-
stanzaTimeout?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare class ServerMonitor {
|
|
7
|
-
private client;
|
|
8
|
-
private stanzaInstance;
|
|
9
|
-
private stanzaTimeout;
|
|
10
|
-
private timeoutId?;
|
|
11
|
-
private boundSetupStanzaTimeout?;
|
|
12
|
-
constructor(client: Client, stanzaInstance: NamedAgent, options?: ServerMonitorOptions);
|
|
13
|
-
private start;
|
|
14
|
-
stop(): void;
|
|
15
|
-
private setupStanzaTimeout;
|
|
16
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const DEFAULT_STANZA_TIMEOUT = 70 * 1000;
|
|
3
|
-
export class ServerMonitor {
|
|
4
|
-
constructor(client, stanzaInstance, options = {}) {
|
|
5
|
-
this.client = client;
|
|
6
|
-
this.stanzaInstance = stanzaInstance;
|
|
7
|
-
this.stanzaTimeout = options.stanzaTimeout || DEFAULT_STANZA_TIMEOUT;
|
|
8
|
-
this.timeoutId = undefined;
|
|
9
|
-
this.start();
|
|
10
|
-
}
|
|
11
|
-
start() {
|
|
12
|
-
this.boundSetupStanzaTimeout = this.setupStanzaTimeout.bind(this);
|
|
13
|
-
this.client.on('connected', this.boundSetupStanzaTimeout);
|
|
14
|
-
this.stanzaInstance.on('raw:incoming', this.boundSetupStanzaTimeout);
|
|
15
|
-
}
|
|
16
|
-
stop() {
|
|
17
|
-
clearTimeout(this.timeoutId);
|
|
18
|
-
this.timeoutId = undefined;
|
|
19
|
-
if (this.boundSetupStanzaTimeout) {
|
|
20
|
-
this.client.off('connected', this.boundSetupStanzaTimeout);
|
|
21
|
-
this.stanzaInstance.off('raw:incoming', this.boundSetupStanzaTimeout);
|
|
22
|
-
this.boundSetupStanzaTimeout = undefined;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
setupStanzaTimeout() {
|
|
26
|
-
clearTimeout(this.timeoutId);
|
|
27
|
-
this.timeoutId = setTimeout(() => {
|
|
28
|
-
const info = {
|
|
29
|
-
channelId: this.client.config.channelId,
|
|
30
|
-
jid: this.stanzaInstance.jid,
|
|
31
|
-
stanzaInstanceId: this.stanzaInstance.id,
|
|
32
|
-
timeout: this.stanzaTimeout
|
|
33
|
-
};
|
|
34
|
-
this.client.logger.error('Time between XMPP stanzas exceeded timeout, disconnecting', info);
|
|
35
|
-
this.stanzaInstance.sendStreamError({ text: 'time between stanzas exceeded timeout', condition: 'connection-timeout' });
|
|
36
|
-
this.stop();
|
|
37
|
-
}, this.stanzaTimeout);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Client } from './client';
|
|
2
|
-
import { NamedAgent } from './types/named-agent';
|
|
3
|
-
export interface ServerMonitorOptions {
|
|
4
|
-
stanzaTimeout?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare class ServerMonitor {
|
|
7
|
-
private client;
|
|
8
|
-
private stanzaInstance;
|
|
9
|
-
private stanzaTimeout;
|
|
10
|
-
private timeoutId?;
|
|
11
|
-
private boundSetupStanzaTimeout?;
|
|
12
|
-
constructor(client: Client, stanzaInstance: NamedAgent, options?: ServerMonitorOptions);
|
|
13
|
-
private start;
|
|
14
|
-
stop(): void;
|
|
15
|
-
private setupStanzaTimeout;
|
|
16
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServerMonitor = void 0;
|
|
4
|
-
const DEFAULT_STANZA_TIMEOUT = 70 * 1000;
|
|
5
|
-
class ServerMonitor {
|
|
6
|
-
constructor(client, stanzaInstance, options = {}) {
|
|
7
|
-
this.client = client;
|
|
8
|
-
this.stanzaInstance = stanzaInstance;
|
|
9
|
-
this.stanzaTimeout = options.stanzaTimeout || DEFAULT_STANZA_TIMEOUT;
|
|
10
|
-
this.timeoutId = undefined;
|
|
11
|
-
this.start();
|
|
12
|
-
}
|
|
13
|
-
start() {
|
|
14
|
-
this.boundSetupStanzaTimeout = this.setupStanzaTimeout.bind(this);
|
|
15
|
-
this.client.on('connected', this.boundSetupStanzaTimeout);
|
|
16
|
-
this.stanzaInstance.on('raw:incoming', this.boundSetupStanzaTimeout);
|
|
17
|
-
}
|
|
18
|
-
stop() {
|
|
19
|
-
clearTimeout(this.timeoutId);
|
|
20
|
-
this.timeoutId = undefined;
|
|
21
|
-
if (this.boundSetupStanzaTimeout) {
|
|
22
|
-
this.client.off('connected', this.boundSetupStanzaTimeout);
|
|
23
|
-
this.stanzaInstance.off('raw:incoming', this.boundSetupStanzaTimeout);
|
|
24
|
-
this.boundSetupStanzaTimeout = undefined;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
setupStanzaTimeout() {
|
|
28
|
-
clearTimeout(this.timeoutId);
|
|
29
|
-
this.timeoutId = setTimeout(() => {
|
|
30
|
-
const info = {
|
|
31
|
-
channelId: this.client.config.channelId,
|
|
32
|
-
jid: this.stanzaInstance.jid,
|
|
33
|
-
stanzaInstanceId: this.stanzaInstance.id,
|
|
34
|
-
timeout: this.stanzaTimeout
|
|
35
|
-
};
|
|
36
|
-
this.client.logger.error('Time between XMPP stanzas exceeded timeout, disconnecting', info);
|
|
37
|
-
this.stanzaInstance.sendStreamError({ text: 'time between stanzas exceeded timeout', condition: 'connection-timeout' });
|
|
38
|
-
this.stop();
|
|
39
|
-
}, this.stanzaTimeout);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.ServerMonitor = ServerMonitor;
|