@coventia/softphone 0.3.0 → 0.4.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/dist/{call-CaPDWVk3.d.cts → call-C6YpT6uR.d.cts} +64 -1
- package/dist/{call-CaPDWVk3.d.ts → call-C6YpT6uR.d.ts} +64 -1
- package/dist/chunk-5E5OEXS2.js +14 -0
- package/dist/chunk-5E5OEXS2.js.map +1 -0
- package/dist/element/index.d.ts +56 -0
- package/dist/element/index.js +1064 -488
- package/dist/element/index.js.map +1 -1
- package/dist/{engine-CU2rEo3g.d.cts → engine-CDdaSojx.d.cts} +1 -1
- package/dist/{engine-BgBsIcEa.d.ts → engine-DPft99Wj.d.ts} +1 -1
- package/dist/index.cjs +97 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -6
- package/dist/index.d.ts +16 -6
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/{softphone-dZMkW8V1.d.cts → softphone-CY5d2WWY.d.cts} +3 -1
- package/dist/{softphone-DEt0TtQw.d.ts → softphone-DXgmTyrX.d.ts} +3 -1
- package/dist/softphone.css +254 -23
- package/dist/{sources-M3GYMS6V.js → sources-ONYQW733.js} +76 -8
- package/dist/sources-ONYQW733.js.map +1 -0
- package/dist/testing/index.d.cts +2 -2
- package/dist/testing/index.d.ts +2 -2
- package/dist/ui/index.cjs +578 -18
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +2 -2
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +573 -18
- package/dist/ui/index.js.map +1 -1
- package/dist/zadarma/index.d.cts +2 -2
- package/dist/zadarma/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/sources-M3GYMS6V.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as Softphone } from './softphone-
|
|
2
|
-
export { A as AudioDevices } from './softphone-
|
|
3
|
-
import { S as SoftphoneConfig } from './call-
|
|
4
|
-
export { C as CALL_TRANSITIONS, a as Call, b as CallDirection, c as CallEvent, d as CallEventMap, e as CallOptions, f as CallState, g as Contact, E as ERROR_CATALOGUE, F as FatalErrorCode, h as FatalSoftphoneError, H as HangupReason, i as HoldOriginator, I as INITIAL_STATES, L as LogLevel, N as NonFatalErrorCode, j as NonFatalSoftphoneError, R as RemoteParty,
|
|
1
|
+
import { S as Softphone } from './softphone-CY5d2WWY.cjs';
|
|
2
|
+
export { A as AudioDevices } from './softphone-CY5d2WWY.cjs';
|
|
3
|
+
import { S as SoftphoneConfig, O as OutboundNumberRefusal } from './call-C6YpT6uR.cjs';
|
|
4
|
+
export { C as CALL_TRANSITIONS, a as Call, b as CallDirection, c as CallEvent, d as CallEventMap, e as CallOptions, f as CallState, g as Contact, E as ERROR_CATALOGUE, F as FatalErrorCode, h as FatalSoftphoneError, H as HangupReason, i as HoldOriginator, I as INITIAL_STATES, L as LogLevel, N as NonFatalErrorCode, j as NonFatalSoftphoneError, k as OutboundNumber, l as OutboundNumberKind, m as OutboundNumberSettings, n as OutboundNumberState, o as OutboundNumbersSource, R as RemoteParty, p as RingtoneOption, q as RingtoneSettings, r as RingtoneSource, s as SoftphoneError, t as SoftphoneErrorCode, u as SoftphoneEvent, v as SoftphoneEventMap, w as SoftphoneState, T as TokenEndpointOptions, x as TokenSource, y as TypedEmitter, V as VoiceToken, z as canTransition, A as isFatal, B as isTerminal } from './call-C6YpT6uR.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Construct a softphone.
|
|
@@ -19,6 +19,16 @@ export { C as CALL_TRANSITIONS, a as Call, b as CallDirection, c as CallEvent, d
|
|
|
19
19
|
*/
|
|
20
20
|
declare function createSoftphone(config: SoftphoneConfig): Softphone;
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* A change of outbound number the request limits refused (outbound-number-per-agent.md §5.3–§5.5). Structural,
|
|
24
|
+
* like `isSoftphoneError`: the concrete error is a plain `Error` with a `refusal`, so a host — or a second copy
|
|
25
|
+
* of the SDK on the page — can recognise it without sharing a class.
|
|
26
|
+
*/
|
|
27
|
+
interface OutboundNumberRefusedError extends Error {
|
|
28
|
+
readonly refusal: OutboundNumberRefusal;
|
|
29
|
+
}
|
|
30
|
+
declare function isOutboundNumberRefused(value: unknown): value is OutboundNumberRefusedError;
|
|
31
|
+
|
|
22
32
|
/**
|
|
23
33
|
* Browser-capability probes.
|
|
24
34
|
*
|
|
@@ -57,6 +67,6 @@ declare function isWebRtcSupported(): boolean;
|
|
|
57
67
|
* - `MockProvider` — lives at @coventia/softphone/testing, so it never lands in a production bundle.
|
|
58
68
|
*/
|
|
59
69
|
|
|
60
|
-
declare const VERSION = "0.
|
|
70
|
+
declare const VERSION = "0.4.0";
|
|
61
71
|
|
|
62
|
-
export { Softphone, SoftphoneConfig, VERSION, createSoftphone, isBrowser, isWebRtcSupported };
|
|
72
|
+
export { OutboundNumberRefusal, type OutboundNumberRefusedError, Softphone, SoftphoneConfig, VERSION, createSoftphone, isBrowser, isOutboundNumberRefused, isWebRtcSupported };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as Softphone } from './softphone-
|
|
2
|
-
export { A as AudioDevices } from './softphone-
|
|
3
|
-
import { S as SoftphoneConfig } from './call-
|
|
4
|
-
export { C as CALL_TRANSITIONS, a as Call, b as CallDirection, c as CallEvent, d as CallEventMap, e as CallOptions, f as CallState, g as Contact, E as ERROR_CATALOGUE, F as FatalErrorCode, h as FatalSoftphoneError, H as HangupReason, i as HoldOriginator, I as INITIAL_STATES, L as LogLevel, N as NonFatalErrorCode, j as NonFatalSoftphoneError, R as RemoteParty,
|
|
1
|
+
import { S as Softphone } from './softphone-DXgmTyrX.js';
|
|
2
|
+
export { A as AudioDevices } from './softphone-DXgmTyrX.js';
|
|
3
|
+
import { S as SoftphoneConfig, O as OutboundNumberRefusal } from './call-C6YpT6uR.js';
|
|
4
|
+
export { C as CALL_TRANSITIONS, a as Call, b as CallDirection, c as CallEvent, d as CallEventMap, e as CallOptions, f as CallState, g as Contact, E as ERROR_CATALOGUE, F as FatalErrorCode, h as FatalSoftphoneError, H as HangupReason, i as HoldOriginator, I as INITIAL_STATES, L as LogLevel, N as NonFatalErrorCode, j as NonFatalSoftphoneError, k as OutboundNumber, l as OutboundNumberKind, m as OutboundNumberSettings, n as OutboundNumberState, o as OutboundNumbersSource, R as RemoteParty, p as RingtoneOption, q as RingtoneSettings, r as RingtoneSource, s as SoftphoneError, t as SoftphoneErrorCode, u as SoftphoneEvent, v as SoftphoneEventMap, w as SoftphoneState, T as TokenEndpointOptions, x as TokenSource, y as TypedEmitter, V as VoiceToken, z as canTransition, A as isFatal, B as isTerminal } from './call-C6YpT6uR.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Construct a softphone.
|
|
@@ -19,6 +19,16 @@ export { C as CALL_TRANSITIONS, a as Call, b as CallDirection, c as CallEvent, d
|
|
|
19
19
|
*/
|
|
20
20
|
declare function createSoftphone(config: SoftphoneConfig): Softphone;
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* A change of outbound number the request limits refused (outbound-number-per-agent.md §5.3–§5.5). Structural,
|
|
24
|
+
* like `isSoftphoneError`: the concrete error is a plain `Error` with a `refusal`, so a host — or a second copy
|
|
25
|
+
* of the SDK on the page — can recognise it without sharing a class.
|
|
26
|
+
*/
|
|
27
|
+
interface OutboundNumberRefusedError extends Error {
|
|
28
|
+
readonly refusal: OutboundNumberRefusal;
|
|
29
|
+
}
|
|
30
|
+
declare function isOutboundNumberRefused(value: unknown): value is OutboundNumberRefusedError;
|
|
31
|
+
|
|
22
32
|
/**
|
|
23
33
|
* Browser-capability probes.
|
|
24
34
|
*
|
|
@@ -57,6 +67,6 @@ declare function isWebRtcSupported(): boolean;
|
|
|
57
67
|
* - `MockProvider` — lives at @coventia/softphone/testing, so it never lands in a production bundle.
|
|
58
68
|
*/
|
|
59
69
|
|
|
60
|
-
declare const VERSION = "0.
|
|
70
|
+
declare const VERSION = "0.4.0";
|
|
61
71
|
|
|
62
|
-
export { Softphone, SoftphoneConfig, VERSION, createSoftphone, isBrowser, isWebRtcSupported };
|
|
72
|
+
export { OutboundNumberRefusal, type OutboundNumberRefusedError, Softphone, SoftphoneConfig, VERSION, createSoftphone, isBrowser, isOutboundNumberRefused, isWebRtcSupported };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isBrowser } from './chunk-KAXEMJ7E.js';
|
|
2
2
|
export { isBrowser, isWebRtcSupported } from './chunk-KAXEMJ7E.js';
|
|
3
3
|
export { CallEvent, SoftphoneEvent } from './chunk-7R6LOOAI.js';
|
|
4
|
+
export { isOutboundNumberRefused } from './chunk-5E5OEXS2.js';
|
|
4
5
|
import { isFatal } from './chunk-2ZSOGGPO.js';
|
|
5
6
|
export { ERROR_CATALOGUE, isFatal } from './chunk-2ZSOGGPO.js';
|
|
6
7
|
import { cachedTokenSource } from './chunk-MHOJHG5E.js';
|
|
@@ -284,7 +285,7 @@ function coventiaBackend(config, tokenSource, fallbackBaseUrl) {
|
|
|
284
285
|
}
|
|
285
286
|
let pending = null;
|
|
286
287
|
const load = () => {
|
|
287
|
-
pending ??= import('./sources-
|
|
288
|
+
pending ??= import('./sources-ONYQW733.js').then(
|
|
288
289
|
(m) => m.coventiaSources({ ...config, baseUrl, tokenSource })
|
|
289
290
|
);
|
|
290
291
|
return pending;
|
|
@@ -300,6 +301,11 @@ function coventiaBackend(config, tokenSource, fallbackBaseUrl) {
|
|
|
300
301
|
get: async (signal) => (await load()).ringtones.get(signal),
|
|
301
302
|
setMine: async (id) => (await load()).ringtones.setMine(id),
|
|
302
303
|
cached: async () => (await load()).ringtones.cached?.() ?? null
|
|
304
|
+
},
|
|
305
|
+
outboundNumbers: {
|
|
306
|
+
get: async (signal) => (await load()).outboundNumbers.get(signal),
|
|
307
|
+
setMine: async (id) => (await load()).outboundNumbers.setMine(id),
|
|
308
|
+
cached: async () => (await load()).outboundNumbers.cached?.() ?? null
|
|
303
309
|
}
|
|
304
310
|
};
|
|
305
311
|
}
|
|
@@ -1009,7 +1015,7 @@ function isCallEngine(value) {
|
|
|
1009
1015
|
}
|
|
1010
1016
|
|
|
1011
1017
|
// src/index.ts
|
|
1012
|
-
var VERSION = "0.
|
|
1018
|
+
var VERSION = "0.4.0";
|
|
1013
1019
|
|
|
1014
1020
|
export { CALL_TRANSITIONS, INITIAL_STATES, VERSION, canTransition, createSoftphone, isTerminal };
|
|
1015
1021
|
//# sourceMappingURL=index.js.map
|