@wildix/wilma-voice-client 0.0.1
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/WilmaVoice.js +23 -0
- package/dist-cjs/WilmaVoiceClient.js +49 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +58 -0
- package/dist-cjs/commands/DescribeVoiceProtocolCommand.js +20 -0
- package/dist-cjs/commands/SendHangupCommand.js +20 -0
- package/dist-cjs/commands/SendPlayCommand.js +20 -0
- package/dist-cjs/commands/SendSayCommand.js +20 -0
- package/dist-cjs/commands/SendStopCommand.js +20 -0
- package/dist-cjs/commands/SendTransferCommand.js +20 -0
- package/dist-cjs/commands/index.js +9 -0
- package/dist-cjs/endpoint/EndpointParameters.js +16 -0
- package/dist-cjs/endpoint/bdd.js +28 -0
- package/dist-cjs/endpoint/endpointResolver.js +16 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +13 -0
- package/dist-cjs/models/WilmaVoiceServiceException.js +12 -0
- package/dist-cjs/models/enums.js +37 -0
- package/dist-cjs/models/errors.js +45 -0
- package/dist-cjs/models/models_0.js +2 -0
- package/dist-cjs/runtimeConfig.browser.js +32 -0
- package/dist-cjs/runtimeConfig.js +41 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +41 -0
- package/dist-cjs/runtimeExtensions.js +12 -0
- package/dist-cjs/schemas/schemas_0.js +404 -0
- package/dist-es/WilmaVoice.js +19 -0
- package/dist-es/WilmaVoiceClient.js +45 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +52 -0
- package/dist-es/commands/DescribeVoiceProtocolCommand.js +16 -0
- package/dist-es/commands/SendHangupCommand.js +16 -0
- package/dist-es/commands/SendPlayCommand.js +16 -0
- package/dist-es/commands/SendSayCommand.js +16 -0
- package/dist-es/commands/SendStopCommand.js +16 -0
- package/dist-es/commands/SendTransferCommand.js +16 -0
- package/dist-es/commands/index.js +6 -0
- package/dist-es/endpoint/EndpointParameters.js +12 -0
- package/dist-es/endpoint/bdd.js +25 -0
- package/dist-es/endpoint/endpointResolver.js +12 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +8 -0
- package/dist-es/models/WilmaVoiceServiceException.js +8 -0
- package/dist-es/models/enums.js +34 -0
- package/dist-es/models/errors.js +39 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/runtimeConfig.browser.js +27 -0
- package/dist-es/runtimeConfig.js +36 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +37 -0
- package/dist-es/runtimeExtensions.js +8 -0
- package/dist-es/schemas/schemas_0.js +400 -0
- package/dist-types/WilmaVoice.d.ts +70 -0
- package/dist-types/WilmaVoiceClient.d.ts +185 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
- package/dist-types/commands/DescribeVoiceProtocolCommand.d.ts +252 -0
- package/dist-types/commands/SendHangupCommand.d.ts +79 -0
- package/dist-types/commands/SendPlayCommand.d.ts +81 -0
- package/dist-types/commands/SendSayCommand.d.ts +85 -0
- package/dist-types/commands/SendStopCommand.d.ts +78 -0
- package/dist-types/commands/SendTransferCommand.d.ts +80 -0
- package/dist-types/commands/index.d.ts +6 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
- package/dist-types/endpoint/bdd.d.ts +2 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/index.d.ts +33 -0
- package/dist-types/models/WilmaVoiceServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +101 -0
- package/dist-types/models/errors.d.ts +36 -0
- package/dist-types/models/models_0.d.ts +805 -0
- package/dist-types/runtimeConfig.browser.d.ts +55 -0
- package/dist-types/runtimeConfig.d.ts +55 -0
- package/dist-types/runtimeConfig.native.d.ts +54 -0
- package/dist-types/runtimeConfig.shared.d.ts +32 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +63 -0
- package/package.json +57 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BinaryDecisionDiagram } from "@smithy/core/endpoints";
|
|
2
|
+
const a = "stringEquals", b = { "ref": "endpoint" }, c = { "ref": "env" };
|
|
3
|
+
const _data = {
|
|
4
|
+
conditions: [
|
|
5
|
+
["isSet", [b]],
|
|
6
|
+
[a, [c, "stable"]],
|
|
7
|
+
[a, [c, "stage"]]
|
|
8
|
+
],
|
|
9
|
+
results: [
|
|
10
|
+
[-1],
|
|
11
|
+
[b, {}],
|
|
12
|
+
["https://api-stable.wilma.wildix.com", {}],
|
|
13
|
+
["https://api-stage.wilma.wildix.com", {}],
|
|
14
|
+
["https://api.wilma.wildix.com", {}]
|
|
15
|
+
]
|
|
16
|
+
};
|
|
17
|
+
const root = 2;
|
|
18
|
+
const r = 100_000_000;
|
|
19
|
+
const nodes = new Int32Array([
|
|
20
|
+
-1, 1, -1,
|
|
21
|
+
0, r + 1, 3,
|
|
22
|
+
1, r + 2, 4,
|
|
23
|
+
2, r + 3, r + 4,
|
|
24
|
+
]);
|
|
25
|
+
export const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { decideEndpoint, EndpointCache } from "@smithy/core/endpoints";
|
|
2
|
+
import { bdd } from "./bdd";
|
|
3
|
+
const cache = new EndpointCache({
|
|
4
|
+
size: 50,
|
|
5
|
+
params: ["endpoint", "env"],
|
|
6
|
+
});
|
|
7
|
+
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
8
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
9
|
+
endpointParams: endpointParams,
|
|
10
|
+
logger: context.logger,
|
|
11
|
+
}));
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./WilmaVoiceClient";
|
|
2
|
+
export * from "./WilmaVoice";
|
|
3
|
+
export * from "./commands";
|
|
4
|
+
export * from "./schemas/schemas_0";
|
|
5
|
+
export * from "./models/enums";
|
|
6
|
+
export * from "./models/errors";
|
|
7
|
+
export * from "./models/models_0";
|
|
8
|
+
export { WilmaVoiceServiceException } from "./models/WilmaVoiceServiceException";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/core/client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class WilmaVoiceServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, WilmaVoiceServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const VoiceEventType = {
|
|
2
|
+
AUDIO: "audio",
|
|
3
|
+
COMPLETE: "complete",
|
|
4
|
+
CONTROL: "control",
|
|
5
|
+
ENDED: "ended",
|
|
6
|
+
ERROR: "error",
|
|
7
|
+
INTERRUPTION: "interruption",
|
|
8
|
+
PLAYBACK: "playback",
|
|
9
|
+
REPLY: "reply",
|
|
10
|
+
STARTED: "started",
|
|
11
|
+
TRANSCRIPTION: "transcription",
|
|
12
|
+
};
|
|
13
|
+
export const VoiceControlAction = {
|
|
14
|
+
CLEAR: "clear",
|
|
15
|
+
END_OF_TURN: "end_of_turn",
|
|
16
|
+
KEEPALIVE: "keepalive",
|
|
17
|
+
};
|
|
18
|
+
export const VoiceAudioEncoding = {
|
|
19
|
+
ALAW: "alaw",
|
|
20
|
+
MULAW: "mulaw",
|
|
21
|
+
OPUS: "opus",
|
|
22
|
+
PCM_S16LE: "pcm_s16le",
|
|
23
|
+
};
|
|
24
|
+
export const VoiceInputMode = {
|
|
25
|
+
AUDIO: "audio",
|
|
26
|
+
TRANSCRIPTION: "transcription",
|
|
27
|
+
};
|
|
28
|
+
export const VoiceCommandType = {
|
|
29
|
+
HANGUP: "hangup",
|
|
30
|
+
PLAY: "play",
|
|
31
|
+
SAY: "say",
|
|
32
|
+
STOP: "stop",
|
|
33
|
+
TRANSFER: "transfer",
|
|
34
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { WilmaVoiceServiceException as __BaseException } from "./WilmaVoiceServiceException";
|
|
2
|
+
export class ForbiddenException extends __BaseException {
|
|
3
|
+
name = "ForbiddenException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "ForbiddenException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class ValidationException extends __BaseException {
|
|
15
|
+
name = "ValidationException";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
constructor(opts) {
|
|
18
|
+
super({
|
|
19
|
+
name: "ValidationException",
|
|
20
|
+
$fault: "client",
|
|
21
|
+
...opts,
|
|
22
|
+
});
|
|
23
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class VoiceSessionNotFoundException extends __BaseException {
|
|
27
|
+
name = "VoiceSessionNotFoundException";
|
|
28
|
+
$fault = "client";
|
|
29
|
+
type;
|
|
30
|
+
constructor(opts) {
|
|
31
|
+
super({
|
|
32
|
+
name: "VoiceSessionNotFoundException",
|
|
33
|
+
$fault: "client",
|
|
34
|
+
...opts,
|
|
35
|
+
});
|
|
36
|
+
Object.setPrototypeOf(this, VoiceSessionNotFoundException.prototype);
|
|
37
|
+
this.type = opts.type;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
|
|
4
|
+
import { loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
5
|
+
import { resolveDefaultsModeConfig } from "@smithy/core/config";
|
|
6
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/core/retry";
|
|
7
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
8
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
9
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
10
|
+
export const getRuntimeConfig = (config) => {
|
|
11
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
13
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
14
|
+
return {
|
|
15
|
+
...clientSharedValues,
|
|
16
|
+
...config,
|
|
17
|
+
runtime: "browser",
|
|
18
|
+
defaultsMode,
|
|
19
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
20
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ clientVersion: packageInfo.version }),
|
|
21
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
22
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
23
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
24
|
+
sha256: config?.sha256 ?? Sha256,
|
|
25
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } from "@aws-sdk/core/client";
|
|
3
|
+
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
4
|
+
import { loadConfig as loadNodeConfig, resolveDefaultsModeConfig } from "@smithy/core/config";
|
|
5
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
|
|
6
|
+
import { calculateBodyLength, Hash } from "@smithy/core/serde";
|
|
7
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
8
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
9
|
+
export const getRuntimeConfig = (config) => {
|
|
10
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
11
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
13
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
14
|
+
const loaderConfig = {
|
|
15
|
+
profile: config?.profile,
|
|
16
|
+
logger: clientSharedValues.logger,
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
...clientSharedValues,
|
|
20
|
+
...config,
|
|
21
|
+
runtime: "node",
|
|
22
|
+
defaultsMode,
|
|
23
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ clientVersion: packageInfo.version }),
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
26
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
+
retryMode: config?.retryMode ??
|
|
28
|
+
loadNodeConfig({
|
|
29
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
30
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
31
|
+
}, config),
|
|
32
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
33
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
34
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
2
|
+
import { HttpBearerAuthSigner } from "@smithy/core";
|
|
3
|
+
import { NoOpLogger } from "@smithy/core/client";
|
|
4
|
+
import { parseUrl } from "@smithy/core/protocols";
|
|
5
|
+
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
|
|
6
|
+
import { defaultWilmaVoiceHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
7
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
8
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
9
|
+
export const getRuntimeConfig = (config) => {
|
|
10
|
+
return {
|
|
11
|
+
apiVersion: "v2",
|
|
12
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
13
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
14
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
15
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
16
|
+
extensions: config?.extensions ?? [],
|
|
17
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultWilmaVoiceHttpAuthSchemeProvider,
|
|
18
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
19
|
+
{
|
|
20
|
+
schemeId: "smithy.api#httpBearerAuth",
|
|
21
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
|
|
22
|
+
signer: new HttpBearerAuthSigner(),
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
27
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
28
|
+
defaultNamespace: "wildix.wilma.voice",
|
|
29
|
+
errorTypeRegistries,
|
|
30
|
+
version: "v2",
|
|
31
|
+
serviceTarget: "WilmaVoice",
|
|
32
|
+
},
|
|
33
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
34
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
35
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/core/client";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/core/protocols";
|
|
3
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
4
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
5
|
+
const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
6
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
7
|
+
return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
8
|
+
};
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
const _AE = "AudioEvent";
|
|
2
|
+
const _AWE = "AudioWebsocketEvent";
|
|
3
|
+
const _CE = "CompleteEvent";
|
|
4
|
+
const _CEo = "ControlEvent";
|
|
5
|
+
const _CWE = "CompleteWebsocketEvent";
|
|
6
|
+
const _CWEo = "ControlWebsocketEvent";
|
|
7
|
+
const _DVP = "DescribeVoiceProtocol";
|
|
8
|
+
const _DVPI = "DescribeVoiceProtocolInput";
|
|
9
|
+
const _DVPO = "DescribeVoiceProtocolOutput";
|
|
10
|
+
const _EWE = "ErrorWebsocketEvent";
|
|
11
|
+
const _FE = "ForbiddenException";
|
|
12
|
+
const _HCD = "HangupCommandData";
|
|
13
|
+
const _HWC = "HangupWebsocketCommand";
|
|
14
|
+
const _IE = "InterruptionEvent";
|
|
15
|
+
const _IWE = "InterruptionWebsocketEvent";
|
|
16
|
+
const _PCD = "PlayCommandData";
|
|
17
|
+
const _PE = "PlaybackEvent";
|
|
18
|
+
const _PWC = "PlayWebsocketCommand";
|
|
19
|
+
const _PWE = "PlaybackWebsocketEvent";
|
|
20
|
+
const _RE = "ReplyEvent";
|
|
21
|
+
const _RWE = "ReplyWebsocketEvent";
|
|
22
|
+
const _SCAO = "SayCommandAudioOptions";
|
|
23
|
+
const _SCD = "SayCommandData";
|
|
24
|
+
const _SCDt = "StopCommandData";
|
|
25
|
+
const _SEE = "SessionEndedEvent";
|
|
26
|
+
const _SEWE = "SessionEndedWebsocketEvent";
|
|
27
|
+
const _SH = "SendHangup";
|
|
28
|
+
const _SHI = "SendHangupInput";
|
|
29
|
+
const _SHO = "SendHangupOutput";
|
|
30
|
+
const _SP = "SendPlay";
|
|
31
|
+
const _SPI = "SendPlayInput";
|
|
32
|
+
const _SPO = "SendPlayOutput";
|
|
33
|
+
const _SS = "SendSay";
|
|
34
|
+
const _SSE = "SessionStartedEvent";
|
|
35
|
+
const _SSI = "SendSayInput";
|
|
36
|
+
const _SSIe = "SendStopInput";
|
|
37
|
+
const _SSO = "SendSayOutput";
|
|
38
|
+
const _SSOe = "SendStopOutput";
|
|
39
|
+
const _SSWE = "SessionStartedWebsocketEvent";
|
|
40
|
+
const _SSe = "SendStop";
|
|
41
|
+
const _ST = "SendTransfer";
|
|
42
|
+
const _STI = "SendTransferInput";
|
|
43
|
+
const _STO = "SendTransferOutput";
|
|
44
|
+
const _SWC = "SayWebsocketCommand";
|
|
45
|
+
const _SWCt = "StopWebsocketCommand";
|
|
46
|
+
const _TCD = "TransferCommandData";
|
|
47
|
+
const _TE = "TranscriptionEvent";
|
|
48
|
+
const _TWC = "TransferWebsocketCommand";
|
|
49
|
+
const _TWE = "TranscriptionWebsocketEvent";
|
|
50
|
+
const _VAF = "VoiceAudioFormat";
|
|
51
|
+
const _VCP = "VoiceConnectParams";
|
|
52
|
+
const _VE = "ValidationException";
|
|
53
|
+
const _VEE = "VoiceErrorEvent";
|
|
54
|
+
const _VSNFE = "VoiceSessionNotFoundException";
|
|
55
|
+
const _a = "action";
|
|
56
|
+
const _aD = "agentDeployment";
|
|
57
|
+
const _aDg = "agentDraft";
|
|
58
|
+
const _aI = "agentId";
|
|
59
|
+
const _aN = "agentName";
|
|
60
|
+
const _aV = "agentVersion";
|
|
61
|
+
const _aWE = "audioWebsocketEvent";
|
|
62
|
+
const _au = "audio";
|
|
63
|
+
const _c = "client";
|
|
64
|
+
const _cC = "callerCompany";
|
|
65
|
+
const _cE = "callerEmail";
|
|
66
|
+
const _cI = "callId";
|
|
67
|
+
const _cN = "callerName";
|
|
68
|
+
const _cNa = "callerNumber";
|
|
69
|
+
const _cP = "connectParams";
|
|
70
|
+
const _cWE = "completeWebsocketEvent";
|
|
71
|
+
const _cWEo = "controlWebsocketEvent";
|
|
72
|
+
const _ca = "category";
|
|
73
|
+
const _ch = "channels";
|
|
74
|
+
const _co = "command";
|
|
75
|
+
const _cod = "code";
|
|
76
|
+
const _com = "complete";
|
|
77
|
+
const _con = "context";
|
|
78
|
+
const _conf = "confidence";
|
|
79
|
+
const _d = "data";
|
|
80
|
+
const _e = "error";
|
|
81
|
+
const _eT = "endTime";
|
|
82
|
+
const _eWE = "errorWebsocketEvent";
|
|
83
|
+
const _en = "encoding";
|
|
84
|
+
const _ev = "event";
|
|
85
|
+
const _ex = "extension";
|
|
86
|
+
const _f = "final";
|
|
87
|
+
const _gI = "groupId";
|
|
88
|
+
const _h = "http";
|
|
89
|
+
const _hE = "httpError";
|
|
90
|
+
const _hWC = "hangupWebsocketCommand";
|
|
91
|
+
const _i = "id";
|
|
92
|
+
const _iA = "inputAudio";
|
|
93
|
+
const _iM = "initialMessage";
|
|
94
|
+
const _iMn = "inputMode";
|
|
95
|
+
const _iWE = "interruptionWebsocketEvent";
|
|
96
|
+
const _in = "interruptible";
|
|
97
|
+
const _l = "language";
|
|
98
|
+
const _m = "message";
|
|
99
|
+
const _oA = "outputAudio";
|
|
100
|
+
const _oT = "originalText";
|
|
101
|
+
const _pT = "playedText";
|
|
102
|
+
const _pV = "protocolVersion";
|
|
103
|
+
const _pWC = "playWebsocketCommand";
|
|
104
|
+
const _pWE = "playbackWebsocketEvent";
|
|
105
|
+
const _r = "reason";
|
|
106
|
+
const _rI = "replyId";
|
|
107
|
+
const _rWE = "replyWebsocketEvent";
|
|
108
|
+
const _s = "smithy.ts.sdk.synthetic.wildix.wilma.voice";
|
|
109
|
+
const _sEWE = "sessionEndedWebsocketEvent";
|
|
110
|
+
const _sI = "streamId";
|
|
111
|
+
const _sIe = "sessionId";
|
|
112
|
+
const _sR = "sampleRate";
|
|
113
|
+
const _sSWE = "sessionStartedWebsocketEvent";
|
|
114
|
+
const _sT = "startTime";
|
|
115
|
+
const _sWC = "sayWebsocketCommand";
|
|
116
|
+
const _sWCt = "stopWebsocketCommand";
|
|
117
|
+
const _se = "seq";
|
|
118
|
+
const _t = "type";
|
|
119
|
+
const _tWC = "transferWebsocketCommand";
|
|
120
|
+
const _tWE = "transcriptionWebsocketEvent";
|
|
121
|
+
const _te = "text";
|
|
122
|
+
const _ti = "time";
|
|
123
|
+
const _v = "voice";
|
|
124
|
+
const _va = "variables";
|
|
125
|
+
const n0 = "smithy.framework";
|
|
126
|
+
const n1 = "wildix.wilma.voice";
|
|
127
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
128
|
+
import { ForbiddenException, ValidationException, VoiceSessionNotFoundException } from "../models/errors";
|
|
129
|
+
import { WilmaVoiceServiceException } from "../models/WilmaVoiceServiceException";
|
|
130
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
131
|
+
export var WilmaVoiceServiceException$ = [-3, _s, "WilmaVoiceServiceException", 0, [], []];
|
|
132
|
+
_s_registry.registerError(WilmaVoiceServiceException$, WilmaVoiceServiceException);
|
|
133
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
134
|
+
const n1_registry = TypeRegistry.for(n1);
|
|
135
|
+
export var ForbiddenException$ = [-3, n0, _FE,
|
|
136
|
+
{ [_e]: _c, [_hE]: 403 },
|
|
137
|
+
[_m],
|
|
138
|
+
[0], 1
|
|
139
|
+
];
|
|
140
|
+
n0_registry.registerError(ForbiddenException$, ForbiddenException);
|
|
141
|
+
export var ValidationException$ = [-3, n0, _VE,
|
|
142
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
143
|
+
[_m],
|
|
144
|
+
[0], 1
|
|
145
|
+
];
|
|
146
|
+
n0_registry.registerError(ValidationException$, ValidationException);
|
|
147
|
+
export var VoiceSessionNotFoundException$ = [-3, n1, _VSNFE,
|
|
148
|
+
{ [_e]: _c, [_hE]: 404 },
|
|
149
|
+
[_m, _t],
|
|
150
|
+
[0, 0], 1
|
|
151
|
+
];
|
|
152
|
+
n1_registry.registerError(VoiceSessionNotFoundException$, VoiceSessionNotFoundException);
|
|
153
|
+
export const errorTypeRegistries = [
|
|
154
|
+
_s_registry,
|
|
155
|
+
n0_registry,
|
|
156
|
+
n1_registry,
|
|
157
|
+
];
|
|
158
|
+
export var AudioEvent$ = [3, n1, _AE,
|
|
159
|
+
0,
|
|
160
|
+
[_t, _d, _se],
|
|
161
|
+
[0, 0, 1], 2
|
|
162
|
+
];
|
|
163
|
+
export var AudioWebsocketEvent$ = [3, n1, _AWE,
|
|
164
|
+
0,
|
|
165
|
+
[_t, _ev],
|
|
166
|
+
[0, () => AudioEvent$], 2
|
|
167
|
+
];
|
|
168
|
+
export var CompleteEvent$ = [3, n1, _CE,
|
|
169
|
+
0,
|
|
170
|
+
[_t, _r, _ti],
|
|
171
|
+
[0, 0, 1], 3
|
|
172
|
+
];
|
|
173
|
+
export var CompleteWebsocketEvent$ = [3, n1, _CWE,
|
|
174
|
+
0,
|
|
175
|
+
[_t, _ev],
|
|
176
|
+
[0, () => CompleteEvent$], 2
|
|
177
|
+
];
|
|
178
|
+
export var ControlEvent$ = [3, n1, _CEo,
|
|
179
|
+
0,
|
|
180
|
+
[_t, _a],
|
|
181
|
+
[0, 0], 2
|
|
182
|
+
];
|
|
183
|
+
export var ControlWebsocketEvent$ = [3, n1, _CWEo,
|
|
184
|
+
0,
|
|
185
|
+
[_t, _ev],
|
|
186
|
+
[0, () => ControlEvent$], 2
|
|
187
|
+
];
|
|
188
|
+
export var DescribeVoiceProtocolInput$ = [3, n1, _DVPI,
|
|
189
|
+
0,
|
|
190
|
+
[],
|
|
191
|
+
[]
|
|
192
|
+
];
|
|
193
|
+
export var DescribeVoiceProtocolOutput$ = [3, n1, _DVPO,
|
|
194
|
+
0,
|
|
195
|
+
[_cP, _aWE, _tWE, _rWE, _pWE, _iWE, _cWE, _cWEo, _sSWE, _sEWE, _eWE, _sWC, _pWC, _sWCt, _hWC, _tWC],
|
|
196
|
+
[() => VoiceConnectParams$, () => AudioWebsocketEvent$, () => TranscriptionWebsocketEvent$, () => ReplyWebsocketEvent$, () => PlaybackWebsocketEvent$, () => InterruptionWebsocketEvent$, () => CompleteWebsocketEvent$, () => ControlWebsocketEvent$, () => SessionStartedWebsocketEvent$, () => SessionEndedWebsocketEvent$, () => ErrorWebsocketEvent$, () => SayWebsocketCommand$, () => PlayWebsocketCommand$, () => StopWebsocketCommand$, () => HangupWebsocketCommand$, () => TransferWebsocketCommand$]
|
|
197
|
+
];
|
|
198
|
+
export var ErrorWebsocketEvent$ = [3, n1, _EWE,
|
|
199
|
+
0,
|
|
200
|
+
[_t, _ev],
|
|
201
|
+
[0, () => VoiceErrorEvent$], 2
|
|
202
|
+
];
|
|
203
|
+
export var HangupCommandData$ = [3, n1, _HCD,
|
|
204
|
+
0,
|
|
205
|
+
[_t, _r],
|
|
206
|
+
[0, 0], 1
|
|
207
|
+
];
|
|
208
|
+
export var HangupWebsocketCommand$ = [3, n1, _HWC,
|
|
209
|
+
0,
|
|
210
|
+
[_t, _co],
|
|
211
|
+
[0, () => HangupCommandData$], 2
|
|
212
|
+
];
|
|
213
|
+
export var InterruptionEvent$ = [3, n1, _IE,
|
|
214
|
+
0,
|
|
215
|
+
[_t, _rI, _pT, _oT, _ti],
|
|
216
|
+
[0, 0, 0, 0, 1], 5
|
|
217
|
+
];
|
|
218
|
+
export var InterruptionWebsocketEvent$ = [3, n1, _IWE,
|
|
219
|
+
0,
|
|
220
|
+
[_t, _ev],
|
|
221
|
+
[0, () => InterruptionEvent$], 2
|
|
222
|
+
];
|
|
223
|
+
export var PlaybackEvent$ = [3, n1, _PE,
|
|
224
|
+
0,
|
|
225
|
+
[_t, _rI, _te, _com, _sT, _eT],
|
|
226
|
+
[0, 0, 0, 2, 1, 1], 5
|
|
227
|
+
];
|
|
228
|
+
export var PlaybackWebsocketEvent$ = [3, n1, _PWE,
|
|
229
|
+
0,
|
|
230
|
+
[_t, _ev],
|
|
231
|
+
[0, () => PlaybackEvent$], 2
|
|
232
|
+
];
|
|
233
|
+
export var PlayCommandData$ = [3, n1, _PCD,
|
|
234
|
+
0,
|
|
235
|
+
[_rI, _sI, _d, _t],
|
|
236
|
+
[0, 0, 0, 0], 4
|
|
237
|
+
];
|
|
238
|
+
export var PlayWebsocketCommand$ = [3, n1, _PWC,
|
|
239
|
+
0,
|
|
240
|
+
[_t, _co],
|
|
241
|
+
[0, () => PlayCommandData$], 2
|
|
242
|
+
];
|
|
243
|
+
export var ReplyEvent$ = [3, n1, _RE,
|
|
244
|
+
0,
|
|
245
|
+
[_t, _i, _te, _sT, _eT],
|
|
246
|
+
[0, 0, 0, 1, 1], 5
|
|
247
|
+
];
|
|
248
|
+
export var ReplyWebsocketEvent$ = [3, n1, _RWE,
|
|
249
|
+
0,
|
|
250
|
+
[_t, _ev],
|
|
251
|
+
[0, () => ReplyEvent$], 2
|
|
252
|
+
];
|
|
253
|
+
export var SayCommandAudioOptions$ = [3, n1, _SCAO,
|
|
254
|
+
0,
|
|
255
|
+
[_sI, _sR],
|
|
256
|
+
[0, 1], 2
|
|
257
|
+
];
|
|
258
|
+
export var SayCommandData$ = [3, n1, _SCD,
|
|
259
|
+
0,
|
|
260
|
+
[_te, _rI, _t, _in, _au],
|
|
261
|
+
[0, 0, 0, 2, () => SayCommandAudioOptions$], 3
|
|
262
|
+
];
|
|
263
|
+
export var SayWebsocketCommand$ = [3, n1, _SWC,
|
|
264
|
+
0,
|
|
265
|
+
[_t, _co],
|
|
266
|
+
[0, () => SayCommandData$], 2
|
|
267
|
+
];
|
|
268
|
+
export var SendHangupInput$ = [3, n1, _SHI,
|
|
269
|
+
0,
|
|
270
|
+
[_sIe, _r],
|
|
271
|
+
[[0, 1], 0], 1
|
|
272
|
+
];
|
|
273
|
+
export var SendHangupOutput$ = [3, n1, _SHO,
|
|
274
|
+
0,
|
|
275
|
+
[],
|
|
276
|
+
[]
|
|
277
|
+
];
|
|
278
|
+
export var SendPlayInput$ = [3, n1, _SPI,
|
|
279
|
+
0,
|
|
280
|
+
[_rI, _sI, _d, _sIe],
|
|
281
|
+
[0, 0, 0, [0, 1]], 4
|
|
282
|
+
];
|
|
283
|
+
export var SendPlayOutput$ = [3, n1, _SPO,
|
|
284
|
+
0,
|
|
285
|
+
[],
|
|
286
|
+
[]
|
|
287
|
+
];
|
|
288
|
+
export var SendSayInput$ = [3, n1, _SSI,
|
|
289
|
+
0,
|
|
290
|
+
[_te, _rI, _sIe, _in, _au],
|
|
291
|
+
[0, 0, [0, 1], 2, () => SayCommandAudioOptions$], 3
|
|
292
|
+
];
|
|
293
|
+
export var SendSayOutput$ = [3, n1, _SSO,
|
|
294
|
+
0,
|
|
295
|
+
[],
|
|
296
|
+
[]
|
|
297
|
+
];
|
|
298
|
+
export var SendStopInput$ = [3, n1, _SSIe,
|
|
299
|
+
0,
|
|
300
|
+
[_sIe],
|
|
301
|
+
[[0, 1]], 1
|
|
302
|
+
];
|
|
303
|
+
export var SendStopOutput$ = [3, n1, _SSOe,
|
|
304
|
+
0,
|
|
305
|
+
[],
|
|
306
|
+
[]
|
|
307
|
+
];
|
|
308
|
+
export var SendTransferInput$ = [3, n1, _STI,
|
|
309
|
+
0,
|
|
310
|
+
[_con, _ex, _sIe],
|
|
311
|
+
[0, 0, [0, 1]], 3
|
|
312
|
+
];
|
|
313
|
+
export var SendTransferOutput$ = [3, n1, _STO,
|
|
314
|
+
0,
|
|
315
|
+
[],
|
|
316
|
+
[]
|
|
317
|
+
];
|
|
318
|
+
export var SessionEndedEvent$ = [3, n1, _SEE,
|
|
319
|
+
0,
|
|
320
|
+
[_t, _ti, _r, _e],
|
|
321
|
+
[0, 1, 0, 0], 2
|
|
322
|
+
];
|
|
323
|
+
export var SessionEndedWebsocketEvent$ = [3, n1, _SEWE,
|
|
324
|
+
0,
|
|
325
|
+
[_t, _ev],
|
|
326
|
+
[0, () => SessionEndedEvent$], 2
|
|
327
|
+
];
|
|
328
|
+
export var SessionStartedEvent$ = [3, n1, _SSE,
|
|
329
|
+
0,
|
|
330
|
+
[_t, _ti, _sIe, _aI, _aV, _aN, _ca, _gI, _iA, _oA],
|
|
331
|
+
[0, 1, 0, 0, 1, 0, 0, 0, () => VoiceAudioFormat$, () => VoiceAudioFormat$], 4
|
|
332
|
+
];
|
|
333
|
+
export var SessionStartedWebsocketEvent$ = [3, n1, _SSWE,
|
|
334
|
+
0,
|
|
335
|
+
[_t, _ev],
|
|
336
|
+
[0, () => SessionStartedEvent$], 2
|
|
337
|
+
];
|
|
338
|
+
export var StopCommandData$ = [3, n1, _SCDt,
|
|
339
|
+
0,
|
|
340
|
+
[_t],
|
|
341
|
+
[0], 1
|
|
342
|
+
];
|
|
343
|
+
export var StopWebsocketCommand$ = [3, n1, _SWCt,
|
|
344
|
+
0,
|
|
345
|
+
[_t, _co],
|
|
346
|
+
[0, () => StopCommandData$], 2
|
|
347
|
+
];
|
|
348
|
+
export var TranscriptionEvent$ = [3, n1, _TE,
|
|
349
|
+
0,
|
|
350
|
+
[_t, _i, _te, _ti, _conf, _f],
|
|
351
|
+
[0, 0, 0, 1, 1, 2], 4
|
|
352
|
+
];
|
|
353
|
+
export var TranscriptionWebsocketEvent$ = [3, n1, _TWE,
|
|
354
|
+
0,
|
|
355
|
+
[_t, _ev],
|
|
356
|
+
[0, () => TranscriptionEvent$], 2
|
|
357
|
+
];
|
|
358
|
+
export var TransferCommandData$ = [3, n1, _TCD,
|
|
359
|
+
0,
|
|
360
|
+
[_con, _ex, _t],
|
|
361
|
+
[0, 0, 0], 3
|
|
362
|
+
];
|
|
363
|
+
export var TransferWebsocketCommand$ = [3, n1, _TWC,
|
|
364
|
+
0,
|
|
365
|
+
[_t, _co],
|
|
366
|
+
[0, () => TransferCommandData$], 2
|
|
367
|
+
];
|
|
368
|
+
export var VoiceAudioFormat$ = [3, n1, _VAF,
|
|
369
|
+
0,
|
|
370
|
+
[_en, _sR, _ch],
|
|
371
|
+
[0, 1, 1], 2
|
|
372
|
+
];
|
|
373
|
+
export var VoiceConnectParams$ = [3, n1, _VCP,
|
|
374
|
+
0,
|
|
375
|
+
[_sIe, _aI, _pV, _aD, _aV, _aDg, _cI, _l, _cN, _cNa, _cE, _cC, _v, _iM, _va, _iMn, _iA, _oA],
|
|
376
|
+
[0, 0, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, () => VoiceAudioFormat$, () => VoiceAudioFormat$], 2
|
|
377
|
+
];
|
|
378
|
+
export var VoiceErrorEvent$ = [3, n1, _VEE,
|
|
379
|
+
0,
|
|
380
|
+
[_t, _cod, _m, _ti],
|
|
381
|
+
[0, 0, 0, 1], 4
|
|
382
|
+
];
|
|
383
|
+
export var DescribeVoiceProtocol$ = [9, n1, _DVP,
|
|
384
|
+
{ [_h]: ["POST", "/v2/voice/describe", 200] }, () => DescribeVoiceProtocolInput$, () => DescribeVoiceProtocolOutput$
|
|
385
|
+
];
|
|
386
|
+
export var SendHangup$ = [9, n1, _SH,
|
|
387
|
+
{ [_h]: ["POST", "/v2/voice/sessions/{sessionId}/hangup", 200] }, () => SendHangupInput$, () => SendHangupOutput$
|
|
388
|
+
];
|
|
389
|
+
export var SendPlay$ = [9, n1, _SP,
|
|
390
|
+
{ [_h]: ["POST", "/v2/voice/sessions/{sessionId}/play", 200] }, () => SendPlayInput$, () => SendPlayOutput$
|
|
391
|
+
];
|
|
392
|
+
export var SendSay$ = [9, n1, _SS,
|
|
393
|
+
{ [_h]: ["POST", "/v2/voice/sessions/{sessionId}/say", 200] }, () => SendSayInput$, () => SendSayOutput$
|
|
394
|
+
];
|
|
395
|
+
export var SendStop$ = [9, n1, _SSe,
|
|
396
|
+
{ [_h]: ["POST", "/v2/voice/sessions/{sessionId}/stop", 200] }, () => SendStopInput$, () => SendStopOutput$
|
|
397
|
+
];
|
|
398
|
+
export var SendTransfer$ = [9, n1, _ST,
|
|
399
|
+
{ [_h]: ["POST", "/v2/voice/sessions/{sessionId}/transfer", 200] }, () => SendTransferInput$, () => SendTransferOutput$
|
|
400
|
+
];
|