@wildix/wim-voicebots-client 1.1.8 → 3.1.10
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/VoiceBots.js +3 -3
- package/dist-cjs/VoiceBotsClient.js +34 -26
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +65 -0
- package/dist-cjs/commands/CreateVoiceBotCommand.js +10 -11
- package/dist-cjs/commands/DeleteVoiceBotCommand.js +10 -11
- package/dist-cjs/commands/DescribeEventCommand.js +10 -11
- package/dist-cjs/commands/GetTraceCommand.js +10 -11
- package/dist-cjs/commands/GetVoiceBotCommand.js +10 -11
- package/dist-cjs/commands/ListTracesCommand.js +10 -11
- package/dist-cjs/commands/ListVoiceBotsCommand.js +10 -11
- package/dist-cjs/commands/ListVoiceBotsNamesCommand.js +10 -11
- package/dist-cjs/commands/SendHangupCommand.js +10 -11
- package/dist-cjs/commands/SendPlayCommand.js +10 -11
- package/dist-cjs/commands/SendSayCommand.js +10 -11
- package/dist-cjs/commands/SendStopCommand.js +10 -11
- package/dist-cjs/commands/SendTransferCommand.js +10 -11
- package/dist-cjs/commands/UpdateVoiceBotCommand.js +10 -11
- 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/index.js +4 -1
- package/dist-cjs/models/VoiceBotsServiceException.js +3 -3
- package/dist-cjs/models/enums.js +64 -0
- package/dist-cjs/models/errors.js +75 -0
- package/dist-cjs/models/models_0.js +0 -314
- package/dist-cjs/runtimeConfig.browser.js +11 -11
- package/dist-cjs/runtimeConfig.js +22 -18
- package/dist-cjs/runtimeConfig.shared.js +30 -10
- package/dist-cjs/runtimeExtensions.js +6 -5
- package/dist-cjs/schemas/schemas_0.js +1247 -0
- package/dist-es/VoiceBots.js +6 -6
- package/dist-es/VoiceBotsClient.js +30 -22
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +59 -0
- package/dist-es/commands/CreateVoiceBotCommand.js +9 -10
- package/dist-es/commands/DeleteVoiceBotCommand.js +9 -10
- package/dist-es/commands/DescribeEventCommand.js +9 -10
- package/dist-es/commands/GetTraceCommand.js +9 -10
- package/dist-es/commands/GetVoiceBotCommand.js +9 -10
- package/dist-es/commands/ListTracesCommand.js +9 -10
- package/dist-es/commands/ListVoiceBotsCommand.js +9 -10
- package/dist-es/commands/ListVoiceBotsNamesCommand.js +9 -10
- package/dist-es/commands/SendHangupCommand.js +9 -10
- package/dist-es/commands/SendPlayCommand.js +9 -10
- package/dist-es/commands/SendSayCommand.js +9 -10
- package/dist-es/commands/SendStopCommand.js +9 -10
- package/dist-es/commands/SendTransferCommand.js +9 -10
- package/dist-es/commands/UpdateVoiceBotCommand.js +9 -10
- 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/index.js +4 -1
- package/dist-es/models/VoiceBotsServiceException.js +1 -1
- package/dist-es/models/enums.js +61 -0
- package/dist-es/models/errors.js +67 -0
- package/dist-es/models/models_0.js +1 -308
- package/dist-es/runtimeConfig.browser.js +7 -7
- package/dist-es/runtimeConfig.js +17 -13
- package/dist-es/runtimeConfig.shared.js +24 -4
- package/dist-es/runtimeExtensions.js +6 -5
- package/dist-es/schemas/schemas_0.js +1241 -0
- package/dist-types/VoiceBots.d.ts +15 -15
- package/dist-types/VoiceBotsClient.d.ts +44 -26
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
- package/dist-types/commands/CreateVoiceBotCommand.d.ts +143 -7
- package/dist-types/commands/DeleteVoiceBotCommand.d.ts +11 -7
- package/dist-types/commands/DescribeEventCommand.d.ts +35 -7
- package/dist-types/commands/GetTraceCommand.d.ts +33 -7
- package/dist-types/commands/GetVoiceBotCommand.d.ts +77 -7
- package/dist-types/commands/ListTracesCommand.d.ts +11 -7
- package/dist-types/commands/ListVoiceBotsCommand.d.ts +77 -7
- package/dist-types/commands/ListVoiceBotsNamesCommand.d.ts +11 -7
- package/dist-types/commands/SendHangupCommand.d.ts +11 -7
- package/dist-types/commands/SendPlayCommand.d.ts +11 -7
- package/dist-types/commands/SendSayCommand.d.ts +11 -7
- package/dist-types/commands/SendStopCommand.d.ts +11 -7
- package/dist-types/commands/SendTransferCommand.d.ts +11 -7
- package/dist-types/commands/UpdateVoiceBotCommand.d.ts +143 -7
- 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 +4 -3
- package/dist-types/index.d.ts +5 -1
- package/dist-types/models/VoiceBotsServiceException.d.ts +1 -1
- package/dist-types/models/enums.d.ts +141 -0
- package/dist-types/models/errors.d.ts +60 -0
- package/dist-types/models/models_0.d.ts +349 -204
- package/dist-types/runtimeConfig.browser.d.ts +35 -16
- package/dist-types/runtimeConfig.d.ts +34 -15
- package/dist-types/runtimeConfig.native.d.ts +36 -17
- package/dist-types/runtimeConfig.shared.d.ts +20 -3
- package/dist-types/runtimeExtensions.d.ts +1 -1
- package/dist-types/schemas/schemas_0.d.ts +175 -0
- package/package.json +14 -40
- package/dist-cjs/models/index.js +0 -4
- package/dist-cjs/protocols/Aws_restJson1.js +0 -1030
- package/dist-es/models/index.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -999
- package/dist-types/models/index.d.ts +0 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -128
package/dist-es/VoiceBots.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createAggregatedClient } from "@smithy/core/client";
|
|
2
2
|
import { CreateVoiceBotCommand, } from "./commands/CreateVoiceBotCommand";
|
|
3
3
|
import { DeleteVoiceBotCommand, } from "./commands/DeleteVoiceBotCommand";
|
|
4
4
|
import { DescribeEventCommand, } from "./commands/DescribeEventCommand";
|
|
5
|
-
import { GetTraceCommand
|
|
5
|
+
import { GetTraceCommand } from "./commands/GetTraceCommand";
|
|
6
6
|
import { GetVoiceBotCommand, } from "./commands/GetVoiceBotCommand";
|
|
7
7
|
import { ListTracesCommand, } from "./commands/ListTracesCommand";
|
|
8
8
|
import { ListVoiceBotsCommand, } from "./commands/ListVoiceBotsCommand";
|
|
9
9
|
import { ListVoiceBotsNamesCommand, } from "./commands/ListVoiceBotsNamesCommand";
|
|
10
10
|
import { SendHangupCommand, } from "./commands/SendHangupCommand";
|
|
11
|
-
import { SendPlayCommand
|
|
12
|
-
import { SendSayCommand
|
|
13
|
-
import { SendStopCommand
|
|
11
|
+
import { SendPlayCommand } from "./commands/SendPlayCommand";
|
|
12
|
+
import { SendSayCommand } from "./commands/SendSayCommand";
|
|
13
|
+
import { SendStopCommand } from "./commands/SendStopCommand";
|
|
14
14
|
import { SendTransferCommand, } from "./commands/SendTransferCommand";
|
|
15
15
|
import { UpdateVoiceBotCommand, } from "./commands/UpdateVoiceBotCommand";
|
|
16
|
-
import {
|
|
16
|
+
import { VoiceBotsClient } from "./VoiceBotsClient";
|
|
17
17
|
const commands = {
|
|
18
18
|
CreateVoiceBotCommand,
|
|
19
19
|
DeleteVoiceBotCommand,
|
|
@@ -1,35 +1,43 @@
|
|
|
1
|
+
import { getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveHostHeaderConfig, resolveUserAgentConfig, } from "@aws-sdk/core/client";
|
|
2
|
+
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
3
|
+
import { Client as __Client, } from "@smithy/core/client";
|
|
4
|
+
import { resolveEndpointConfig } from "@smithy/core/endpoints";
|
|
5
|
+
import { getContentLengthPlugin } from "@smithy/core/protocols";
|
|
6
|
+
import { getRetryPlugin, resolveRetryConfig, } from "@smithy/core/retry";
|
|
7
|
+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
|
|
8
|
+
import { defaultVoiceBotsHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
|
|
9
|
+
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
1
10
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
2
|
-
import { resolveRuntimeExtensions
|
|
3
|
-
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
4
|
-
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
5
|
-
import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
|
|
6
|
-
import { Client as __Client, } from "@smithy/smithy-client";
|
|
7
|
-
import { authorizationMiddleware } from '@wildix/smithy-utils';
|
|
11
|
+
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
|
8
12
|
export { __Client };
|
|
9
13
|
export class VoiceBotsClient extends __Client {
|
|
10
14
|
config;
|
|
11
15
|
constructor(...[configuration]) {
|
|
12
|
-
|
|
16
|
+
const _config_0 = __getRuntimeConfig(configuration || {});
|
|
13
17
|
super(_config_0);
|
|
14
18
|
this.initConfig = _config_0;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
path: ''
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
const config = { ..._config_3, endpoint };
|
|
28
|
-
this.config = config;
|
|
29
|
-
this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
19
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
20
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
21
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
22
|
+
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
23
|
+
const _config_5 = resolveEndpointConfig(_config_4);
|
|
24
|
+
const _config_6 = resolveHttpAuthSchemeConfig(_config_5);
|
|
25
|
+
const _config_7 = resolveRuntimeExtensions(_config_6, configuration?.extensions || []);
|
|
26
|
+
this.config = _config_7;
|
|
27
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
30
28
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
31
29
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
32
30
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
31
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
32
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
34
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
35
|
+
httpAuthSchemeParametersProvider: defaultVoiceBotsHttpAuthSchemeParametersProvider,
|
|
36
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
37
|
+
"smithy.api#httpBearerAuth": config.token,
|
|
38
|
+
}),
|
|
39
|
+
}));
|
|
40
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
33
41
|
}
|
|
34
42
|
destroy() {
|
|
35
43
|
super.destroy();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
2
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
3
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
4
|
+
let _token = runtimeConfig.token;
|
|
5
|
+
return {
|
|
6
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
7
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
8
|
+
if (index === -1) {
|
|
9
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
httpAuthSchemes() {
|
|
16
|
+
return _httpAuthSchemes;
|
|
17
|
+
},
|
|
18
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
19
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
20
|
+
},
|
|
21
|
+
httpAuthSchemeProvider() {
|
|
22
|
+
return _httpAuthSchemeProvider;
|
|
23
|
+
},
|
|
24
|
+
setToken(token) {
|
|
25
|
+
_token = token;
|
|
26
|
+
},
|
|
27
|
+
token() {
|
|
28
|
+
return _token;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export const resolveHttpAuthRuntimeConfig = (config) => {
|
|
33
|
+
return {
|
|
34
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
35
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
36
|
+
token: config.token(),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider } from "@smithy/core";
|
|
2
|
+
import { getSmithyContext, normalizeProvider } from "@smithy/core/client";
|
|
3
|
+
export const defaultVoiceBotsHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
4
|
+
return {
|
|
5
|
+
operation: getSmithyContext(context).operation,
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
|
|
9
|
+
return {
|
|
10
|
+
schemeId: "smithy.api#httpBearerAuth",
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function createWildixAuthApiKeysHttpAuthOption(authParameters) {
|
|
14
|
+
return {
|
|
15
|
+
schemeId: "wildix.auth#apiKeys",
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function createWildixAuthPbxHttpAuthOption(authParameters) {
|
|
19
|
+
return {
|
|
20
|
+
schemeId: "wildix.auth#pbx",
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function createWildixAuthS2sHttpAuthOption(authParameters) {
|
|
24
|
+
return {
|
|
25
|
+
schemeId: "wildix.auth#s2s",
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function createWildixAuthXbsHttpAuthOption(authParameters) {
|
|
29
|
+
return {
|
|
30
|
+
schemeId: "wildix.auth#xbs",
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export const defaultVoiceBotsHttpAuthSchemeProvider = (authParameters) => {
|
|
34
|
+
const options = [];
|
|
35
|
+
switch (authParameters.operation) {
|
|
36
|
+
case "ListVoiceBotsNames":
|
|
37
|
+
{
|
|
38
|
+
options.push(createWildixAuthS2sHttpAuthOption(authParameters));
|
|
39
|
+
options.push(createWildixAuthPbxHttpAuthOption(authParameters));
|
|
40
|
+
options.push(createWildixAuthXbsHttpAuthOption(authParameters));
|
|
41
|
+
options.push(createWildixAuthApiKeysHttpAuthOption(authParameters));
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
;
|
|
45
|
+
default: {
|
|
46
|
+
options.push(createSmithyApiHttpBearerAuthHttpAuthOption(authParameters));
|
|
47
|
+
options.push(createWildixAuthS2sHttpAuthOption(authParameters));
|
|
48
|
+
options.push(createWildixAuthPbxHttpAuthOption(authParameters));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return options;
|
|
52
|
+
};
|
|
53
|
+
export const resolveHttpAuthSchemeConfig = (config) => {
|
|
54
|
+
const token = memoizeIdentityProvider(config.token, isIdentityExpired, doesIdentityRequireRefresh);
|
|
55
|
+
return Object.assign(config, {
|
|
56
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
57
|
+
token,
|
|
58
|
+
});
|
|
59
|
+
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { CreateVoiceBot$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class CreateVoiceBotCommand extends $Command
|
|
6
|
+
export class CreateVoiceBotCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "CreateVoiceBot", {})
|
|
12
13
|
.n("VoiceBotsClient", "CreateVoiceBotCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_CreateVoiceBotCommand)
|
|
15
|
-
.de(de_CreateVoiceBotCommand)
|
|
14
|
+
.sc(CreateVoiceBot$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { DeleteVoiceBot$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class DeleteVoiceBotCommand extends $Command
|
|
6
|
+
export class DeleteVoiceBotCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "DeleteVoiceBot", {})
|
|
12
13
|
.n("VoiceBotsClient", "DeleteVoiceBotCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_DeleteVoiceBotCommand)
|
|
15
|
-
.de(de_DeleteVoiceBotCommand)
|
|
14
|
+
.sc(DeleteVoiceBot$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { DescribeEvent$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class DescribeEventCommand extends $Command
|
|
6
|
+
export class DescribeEventCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "DescribeEvent", {})
|
|
12
13
|
.n("VoiceBotsClient", "DescribeEventCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_DescribeEventCommand)
|
|
15
|
-
.de(de_DescribeEventCommand)
|
|
14
|
+
.sc(DescribeEvent$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { GetTrace$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class GetTraceCommand extends $Command
|
|
6
|
+
export class GetTraceCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "GetTrace", {})
|
|
12
13
|
.n("VoiceBotsClient", "GetTraceCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_GetTraceCommand)
|
|
15
|
-
.de(de_GetTraceCommand)
|
|
14
|
+
.sc(GetTrace$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { GetVoiceBot$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class GetVoiceBotCommand extends $Command
|
|
6
|
+
export class GetVoiceBotCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "GetVoiceBot", {})
|
|
12
13
|
.n("VoiceBotsClient", "GetVoiceBotCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_GetVoiceBotCommand)
|
|
15
|
-
.de(de_GetVoiceBotCommand)
|
|
14
|
+
.sc(GetVoiceBot$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { ListTraces$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class ListTracesCommand extends $Command
|
|
6
|
+
export class ListTracesCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "ListTraces", {})
|
|
12
13
|
.n("VoiceBotsClient", "ListTracesCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_ListTracesCommand)
|
|
15
|
-
.de(de_ListTracesCommand)
|
|
14
|
+
.sc(ListTraces$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { ListVoiceBots$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class ListVoiceBotsCommand extends $Command
|
|
6
|
+
export class ListVoiceBotsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "ListVoiceBots", {})
|
|
12
13
|
.n("VoiceBotsClient", "ListVoiceBotsCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_ListVoiceBotsCommand)
|
|
15
|
-
.de(de_ListVoiceBotsCommand)
|
|
14
|
+
.sc(ListVoiceBots$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { ListVoiceBotsNames$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class ListVoiceBotsNamesCommand extends $Command
|
|
6
|
+
export class ListVoiceBotsNamesCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "ListVoiceBotsNames", {})
|
|
12
13
|
.n("VoiceBotsClient", "ListVoiceBotsNamesCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_ListVoiceBotsNamesCommand)
|
|
15
|
-
.de(de_ListVoiceBotsNamesCommand)
|
|
14
|
+
.sc(ListVoiceBotsNames$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { SendHangup$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class SendHangupCommand extends $Command
|
|
6
|
+
export class SendHangupCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "SendHangup", {})
|
|
12
13
|
.n("VoiceBotsClient", "SendHangupCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_SendHangupCommand)
|
|
15
|
-
.de(de_SendHangupCommand)
|
|
14
|
+
.sc(SendHangup$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { SendPlay$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class SendPlayCommand extends $Command
|
|
6
|
+
export class SendPlayCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "SendPlay", {})
|
|
12
13
|
.n("VoiceBotsClient", "SendPlayCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_SendPlayCommand)
|
|
15
|
-
.de(de_SendPlayCommand)
|
|
14
|
+
.sc(SendPlay$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { SendSay$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class SendSayCommand extends $Command
|
|
6
|
+
export class SendSayCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "SendSay", {})
|
|
12
13
|
.n("VoiceBotsClient", "SendSayCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_SendSayCommand)
|
|
15
|
-
.de(de_SendSayCommand)
|
|
14
|
+
.sc(SendSay$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { SendStop$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class SendStopCommand extends $Command
|
|
6
|
+
export class SendStopCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "SendStop", {})
|
|
12
13
|
.n("VoiceBotsClient", "SendStopCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_SendStopCommand)
|
|
15
|
-
.de(de_SendStopCommand)
|
|
14
|
+
.sc(SendStop$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { SendTransfer$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class SendTransferCommand extends $Command
|
|
6
|
+
export class SendTransferCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "SendTransfer", {})
|
|
12
13
|
.n("VoiceBotsClient", "SendTransferCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_SendTransferCommand)
|
|
15
|
-
.de(de_SendTransferCommand)
|
|
14
|
+
.sc(SendTransfer$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { UpdateVoiceBot$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class UpdateVoiceBotCommand extends $Command
|
|
6
|
+
export class UpdateVoiceBotCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("VoiceBots", "UpdateVoiceBot", {})
|
|
12
13
|
.n("VoiceBotsClient", "UpdateVoiceBotCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_UpdateVoiceBotCommand)
|
|
15
|
-
.de(de_UpdateVoiceBotCommand)
|
|
14
|
+
.sc(UpdateVoiceBot$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const clientContextParamDefaults = {};
|
|
2
|
+
export const resolveClientEndpointParameters = (options) => {
|
|
3
|
+
return Object.assign(options, {
|
|
4
|
+
env: options.env ?? "prod",
|
|
5
|
+
defaultSigningName: "",
|
|
6
|
+
clientContextParams: Object.assign(clientContextParamDefaults, options.clientContextParams),
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
export const commonParams = {
|
|
10
|
+
env: { type: "clientContextParams", name: "env" },
|
|
11
|
+
endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
};
|
|
@@ -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://wim-stable.wildix.com", {}],
|
|
13
|
+
["https://wim-stage.wildix.com", {}],
|
|
14
|
+
["https://wim.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
|
+
};
|