@wildix/wda-history-client 1.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/WdaHistory.js +19 -0
- package/dist-cjs/WdaHistoryClient.js +35 -0
- package/dist-cjs/commands/GetCallCommand.js +41 -0
- package/dist-cjs/commands/GetCallTranscriptionCommand.js +41 -0
- package/dist-cjs/commands/GetConferenceCommand.js +41 -0
- package/dist-cjs/commands/GetConferenceTranscriptionCommand.js +41 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +10 -0
- package/dist-cjs/models/WdaHistoryServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +17 -0
- package/dist-cjs/protocols/Aws_restJson1.js +262 -0
- package/dist-cjs/runtimeConfig.browser.js +28 -0
- package/dist-cjs/runtimeConfig.js +32 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +19 -0
- package/dist-cjs/runtimeExtensions.js +19 -0
- package/dist-es/WdaHistory.js +15 -0
- package/dist-es/WdaHistoryClient.js +31 -0
- package/dist-es/commands/GetCallCommand.js +37 -0
- package/dist-es/commands/GetCallTranscriptionCommand.js +37 -0
- package/dist-es/commands/GetConferenceCommand.js +37 -0
- package/dist-es/commands/GetConferenceTranscriptionCommand.js +37 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/WdaHistoryServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +13 -0
- package/dist-es/protocols/Aws_restJson1.js +251 -0
- package/dist-es/runtimeConfig.browser.js +24 -0
- package/dist-es/runtimeConfig.js +28 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +15 -0
- package/dist-es/runtimeExtensions.js +15 -0
- package/dist-types/WdaHistory.d.ts +37 -0
- package/dist-types/WdaHistoryClient.d.ts +140 -0
- package/dist-types/commands/GetCallCommand.d.ts +71 -0
- package/dist-types/commands/GetCallTranscriptionCommand.d.ts +71 -0
- package/dist-types/commands/GetConferenceCommand.d.ts +71 -0
- package/dist-types/commands/GetConferenceTranscriptionCommand.d.ts +71 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/extensionConfiguration.d.ts +7 -0
- package/dist-types/index.d.ts +5 -0
- package/dist-types/models/WdaHistoryServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +57 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +38 -0
- package/dist-types/runtimeConfig.browser.d.ts +29 -0
- package/dist-types/runtimeConfig.d.ts +29 -0
- package/dist-types/runtimeConfig.native.d.ts +28 -0
- package/dist-types/runtimeConfig.shared.d.ts +15 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/package.json +77 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WdaHistory = void 0;
|
|
4
|
+
const WdaHistoryClient_1 = require("./WdaHistoryClient");
|
|
5
|
+
const GetCallCommand_1 = require("./commands/GetCallCommand");
|
|
6
|
+
const GetCallTranscriptionCommand_1 = require("./commands/GetCallTranscriptionCommand");
|
|
7
|
+
const GetConferenceCommand_1 = require("./commands/GetConferenceCommand");
|
|
8
|
+
const GetConferenceTranscriptionCommand_1 = require("./commands/GetConferenceTranscriptionCommand");
|
|
9
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
10
|
+
const commands = {
|
|
11
|
+
GetCallCommand: GetCallCommand_1.GetCallCommand,
|
|
12
|
+
GetCallTranscriptionCommand: GetCallTranscriptionCommand_1.GetCallTranscriptionCommand,
|
|
13
|
+
GetConferenceCommand: GetConferenceCommand_1.GetConferenceCommand,
|
|
14
|
+
GetConferenceTranscriptionCommand: GetConferenceTranscriptionCommand_1.GetConferenceTranscriptionCommand,
|
|
15
|
+
};
|
|
16
|
+
class WdaHistory extends WdaHistoryClient_1.WdaHistoryClient {
|
|
17
|
+
}
|
|
18
|
+
exports.WdaHistory = WdaHistory;
|
|
19
|
+
(0, smithy_client_1.createAggregatedClient)(commands, WdaHistory);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WdaHistoryClient = exports.__Client = void 0;
|
|
4
|
+
const runtimeConfig_1 = require("./runtimeConfig");
|
|
5
|
+
const runtimeExtensions_1 = require("./runtimeExtensions");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
|
|
8
|
+
const smithy_utils_1 = require("@wildix/smithy-utils");
|
|
9
|
+
class WdaHistoryClient extends smithy_client_1.Client {
|
|
10
|
+
constructor(...[configuration]) {
|
|
11
|
+
let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
|
|
12
|
+
let _config_1 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_0, configuration?.extensions || []);
|
|
13
|
+
super(_config_1);
|
|
14
|
+
this.config = _config_1;
|
|
15
|
+
const endpoint = () => {
|
|
16
|
+
return {
|
|
17
|
+
hostname: configuration.env === 'prod' || !configuration.env ? 'wda.wildix.com' : configuration.env === 'stable' ? 'wda-stable.wildix.com' : 'wda-stage.wildix.com',
|
|
18
|
+
protocol: "https",
|
|
19
|
+
port: '443',
|
|
20
|
+
path: ''
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
const config = {
|
|
24
|
+
..._config_1,
|
|
25
|
+
endpoint,
|
|
26
|
+
};
|
|
27
|
+
super(config);
|
|
28
|
+
this.config = config;
|
|
29
|
+
this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
30
|
+
}
|
|
31
|
+
destroy() {
|
|
32
|
+
super.destroy();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.WdaHistoryClient = WdaHistoryClient;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetCallCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
class GetCallCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
16
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
17
|
+
const { logger } = configuration;
|
|
18
|
+
const clientName = "WdaHistoryClient";
|
|
19
|
+
const commandName = "GetCallCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WdaHistory",
|
|
28
|
+
operation: "GetCall",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const { requestHandler } = configuration;
|
|
32
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
|
+
}
|
|
34
|
+
serialize(input, context) {
|
|
35
|
+
return (0, Aws_restJson1_1.se_GetCallCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_GetCallCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.GetCallCommand = GetCallCommand;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetCallTranscriptionCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
class GetCallTranscriptionCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
16
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
17
|
+
const { logger } = configuration;
|
|
18
|
+
const clientName = "WdaHistoryClient";
|
|
19
|
+
const commandName = "GetCallTranscriptionCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WdaHistory",
|
|
28
|
+
operation: "GetCallTranscription",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const { requestHandler } = configuration;
|
|
32
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
|
+
}
|
|
34
|
+
serialize(input, context) {
|
|
35
|
+
return (0, Aws_restJson1_1.se_GetCallTranscriptionCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_GetCallTranscriptionCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.GetCallTranscriptionCommand = GetCallTranscriptionCommand;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetConferenceCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
class GetConferenceCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
16
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
17
|
+
const { logger } = configuration;
|
|
18
|
+
const clientName = "WdaHistoryClient";
|
|
19
|
+
const commandName = "GetConferenceCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WdaHistory",
|
|
28
|
+
operation: "GetConference",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const { requestHandler } = configuration;
|
|
32
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
|
+
}
|
|
34
|
+
serialize(input, context) {
|
|
35
|
+
return (0, Aws_restJson1_1.se_GetConferenceCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_GetConferenceCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.GetConferenceCommand = GetConferenceCommand;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetConferenceTranscriptionCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
class GetConferenceTranscriptionCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
16
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
17
|
+
const { logger } = configuration;
|
|
18
|
+
const clientName = "WdaHistoryClient";
|
|
19
|
+
const commandName = "GetConferenceTranscriptionCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WdaHistory",
|
|
28
|
+
operation: "GetConferenceTranscription",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const { requestHandler } = configuration;
|
|
32
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
|
+
}
|
|
34
|
+
serialize(input, context) {
|
|
35
|
+
return (0, Aws_restJson1_1.se_GetConferenceTranscriptionCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_GetConferenceTranscriptionCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.GetConferenceTranscriptionCommand = GetConferenceTranscriptionCommand;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./GetCallCommand"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./GetCallTranscriptionCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./GetConferenceCommand"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./GetConferenceTranscriptionCommand"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WdaHistoryServiceException = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./WdaHistoryClient"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./WdaHistory"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./commands"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./models"), exports);
|
|
9
|
+
var WdaHistoryServiceException_1 = require("./models/WdaHistoryServiceException");
|
|
10
|
+
Object.defineProperty(exports, "WdaHistoryServiceException", { enumerable: true, get: function () { return WdaHistoryServiceException_1.WdaHistoryServiceException; } });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WdaHistoryServiceException = exports.__ServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
+
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
+
class WdaHistoryServiceException extends smithy_client_1.ServiceException {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
Object.setPrototypeOf(this, WdaHistoryServiceException.prototype);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.WdaHistoryServiceException = WdaHistoryServiceException;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationException = void 0;
|
|
4
|
+
const WdaHistoryServiceException_1 = require("./WdaHistoryServiceException");
|
|
5
|
+
class ValidationException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super({
|
|
8
|
+
name: "ValidationException",
|
|
9
|
+
$fault: "client",
|
|
10
|
+
...opts
|
|
11
|
+
});
|
|
12
|
+
this.name = "ValidationException";
|
|
13
|
+
this.$fault = "client";
|
|
14
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ValidationException = ValidationException;
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.de_GetConferenceTranscriptionCommand = exports.de_GetConferenceCommand = exports.de_GetCallTranscriptionCommand = exports.de_GetCallCommand = exports.se_GetConferenceTranscriptionCommand = exports.se_GetConferenceCommand = exports.se_GetCallTranscriptionCommand = exports.se_GetCallCommand = void 0;
|
|
4
|
+
const WdaHistoryServiceException_1 = require("../models/WdaHistoryServiceException");
|
|
5
|
+
const models_0_1 = require("../models/models_0");
|
|
6
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
7
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
|
+
const se_GetCallCommand = async (input, context) => {
|
|
9
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
+
const headers = {};
|
|
11
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}";
|
|
12
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'callId', () => input.callId, '{callId}', false);
|
|
13
|
+
let body;
|
|
14
|
+
return new protocol_http_1.HttpRequest({
|
|
15
|
+
protocol,
|
|
16
|
+
hostname,
|
|
17
|
+
port,
|
|
18
|
+
method: "GET",
|
|
19
|
+
headers,
|
|
20
|
+
path: resolvedPath,
|
|
21
|
+
body,
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.se_GetCallCommand = se_GetCallCommand;
|
|
25
|
+
const se_GetCallTranscriptionCommand = async (input, context) => {
|
|
26
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
27
|
+
const headers = {};
|
|
28
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}/transcription";
|
|
29
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'callId', () => input.callId, '{callId}', false);
|
|
30
|
+
let body;
|
|
31
|
+
return new protocol_http_1.HttpRequest({
|
|
32
|
+
protocol,
|
|
33
|
+
hostname,
|
|
34
|
+
port,
|
|
35
|
+
method: "GET",
|
|
36
|
+
headers,
|
|
37
|
+
path: resolvedPath,
|
|
38
|
+
body,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
exports.se_GetCallTranscriptionCommand = se_GetCallTranscriptionCommand;
|
|
42
|
+
const se_GetConferenceCommand = async (input, context) => {
|
|
43
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
44
|
+
const headers = {};
|
|
45
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/conferences/{conferenceId}";
|
|
46
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'conferenceId', () => input.conferenceId, '{conferenceId}', false);
|
|
47
|
+
let body;
|
|
48
|
+
return new protocol_http_1.HttpRequest({
|
|
49
|
+
protocol,
|
|
50
|
+
hostname,
|
|
51
|
+
port,
|
|
52
|
+
method: "GET",
|
|
53
|
+
headers,
|
|
54
|
+
path: resolvedPath,
|
|
55
|
+
body,
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
exports.se_GetConferenceCommand = se_GetConferenceCommand;
|
|
59
|
+
const se_GetConferenceTranscriptionCommand = async (input, context) => {
|
|
60
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
61
|
+
const headers = {};
|
|
62
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/conferences/{conferenceId}/transcription";
|
|
63
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'conferenceId', () => input.conferenceId, '{conferenceId}', false);
|
|
64
|
+
let body;
|
|
65
|
+
return new protocol_http_1.HttpRequest({
|
|
66
|
+
protocol,
|
|
67
|
+
hostname,
|
|
68
|
+
port,
|
|
69
|
+
method: "GET",
|
|
70
|
+
headers,
|
|
71
|
+
path: resolvedPath,
|
|
72
|
+
body,
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
exports.se_GetConferenceTranscriptionCommand = se_GetConferenceTranscriptionCommand;
|
|
76
|
+
const de_GetCallCommand = async (output, context) => {
|
|
77
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
78
|
+
return de_GetCallCommandError(output, context);
|
|
79
|
+
}
|
|
80
|
+
const contents = (0, smithy_client_1.map)({
|
|
81
|
+
$metadata: deserializeMetadata(output),
|
|
82
|
+
});
|
|
83
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
84
|
+
return contents;
|
|
85
|
+
};
|
|
86
|
+
exports.de_GetCallCommand = de_GetCallCommand;
|
|
87
|
+
const de_GetCallCommandError = async (output, context) => {
|
|
88
|
+
const parsedOutput = {
|
|
89
|
+
...output,
|
|
90
|
+
body: await parseErrorBody(output.body, context)
|
|
91
|
+
};
|
|
92
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
93
|
+
switch (errorCode) {
|
|
94
|
+
case "ValidationException":
|
|
95
|
+
case "smithy.framework#ValidationException":
|
|
96
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
97
|
+
default:
|
|
98
|
+
const parsedBody = parsedOutput.body;
|
|
99
|
+
return throwDefaultError({
|
|
100
|
+
output,
|
|
101
|
+
parsedBody,
|
|
102
|
+
errorCode
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const de_GetCallTranscriptionCommand = async (output, context) => {
|
|
107
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
108
|
+
return de_GetCallTranscriptionCommandError(output, context);
|
|
109
|
+
}
|
|
110
|
+
const contents = (0, smithy_client_1.map)({
|
|
111
|
+
$metadata: deserializeMetadata(output),
|
|
112
|
+
});
|
|
113
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
114
|
+
return contents;
|
|
115
|
+
};
|
|
116
|
+
exports.de_GetCallTranscriptionCommand = de_GetCallTranscriptionCommand;
|
|
117
|
+
const de_GetCallTranscriptionCommandError = async (output, context) => {
|
|
118
|
+
const parsedOutput = {
|
|
119
|
+
...output,
|
|
120
|
+
body: await parseErrorBody(output.body, context)
|
|
121
|
+
};
|
|
122
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
123
|
+
switch (errorCode) {
|
|
124
|
+
case "ValidationException":
|
|
125
|
+
case "smithy.framework#ValidationException":
|
|
126
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
127
|
+
default:
|
|
128
|
+
const parsedBody = parsedOutput.body;
|
|
129
|
+
return throwDefaultError({
|
|
130
|
+
output,
|
|
131
|
+
parsedBody,
|
|
132
|
+
errorCode
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const de_GetConferenceCommand = async (output, context) => {
|
|
137
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
138
|
+
return de_GetConferenceCommandError(output, context);
|
|
139
|
+
}
|
|
140
|
+
const contents = (0, smithy_client_1.map)({
|
|
141
|
+
$metadata: deserializeMetadata(output),
|
|
142
|
+
});
|
|
143
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
144
|
+
return contents;
|
|
145
|
+
};
|
|
146
|
+
exports.de_GetConferenceCommand = de_GetConferenceCommand;
|
|
147
|
+
const de_GetConferenceCommandError = async (output, context) => {
|
|
148
|
+
const parsedOutput = {
|
|
149
|
+
...output,
|
|
150
|
+
body: await parseErrorBody(output.body, context)
|
|
151
|
+
};
|
|
152
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
153
|
+
switch (errorCode) {
|
|
154
|
+
case "ValidationException":
|
|
155
|
+
case "smithy.framework#ValidationException":
|
|
156
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
157
|
+
default:
|
|
158
|
+
const parsedBody = parsedOutput.body;
|
|
159
|
+
return throwDefaultError({
|
|
160
|
+
output,
|
|
161
|
+
parsedBody,
|
|
162
|
+
errorCode
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
const de_GetConferenceTranscriptionCommand = async (output, context) => {
|
|
167
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
168
|
+
return de_GetConferenceTranscriptionCommandError(output, context);
|
|
169
|
+
}
|
|
170
|
+
const contents = (0, smithy_client_1.map)({
|
|
171
|
+
$metadata: deserializeMetadata(output),
|
|
172
|
+
});
|
|
173
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
174
|
+
return contents;
|
|
175
|
+
};
|
|
176
|
+
exports.de_GetConferenceTranscriptionCommand = de_GetConferenceTranscriptionCommand;
|
|
177
|
+
const de_GetConferenceTranscriptionCommandError = async (output, context) => {
|
|
178
|
+
const parsedOutput = {
|
|
179
|
+
...output,
|
|
180
|
+
body: await parseErrorBody(output.body, context)
|
|
181
|
+
};
|
|
182
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
183
|
+
switch (errorCode) {
|
|
184
|
+
case "ValidationException":
|
|
185
|
+
case "smithy.framework#ValidationException":
|
|
186
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
187
|
+
default:
|
|
188
|
+
const parsedBody = parsedOutput.body;
|
|
189
|
+
return throwDefaultError({
|
|
190
|
+
output,
|
|
191
|
+
parsedBody,
|
|
192
|
+
errorCode
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(WdaHistoryServiceException_1.WdaHistoryServiceException);
|
|
197
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
198
|
+
const contents = (0, smithy_client_1.map)({});
|
|
199
|
+
const data = parsedOutput.body;
|
|
200
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
201
|
+
'message': smithy_client_1.expectString,
|
|
202
|
+
});
|
|
203
|
+
Object.assign(contents, doc);
|
|
204
|
+
const exception = new models_0_1.ValidationException({
|
|
205
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
206
|
+
...contents
|
|
207
|
+
});
|
|
208
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
209
|
+
};
|
|
210
|
+
const deserializeMetadata = (output) => ({
|
|
211
|
+
httpStatusCode: output.statusCode,
|
|
212
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
213
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
214
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
215
|
+
});
|
|
216
|
+
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
|
|
217
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
218
|
+
value !== null &&
|
|
219
|
+
value !== "" &&
|
|
220
|
+
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
221
|
+
value.length != 0) &&
|
|
222
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
223
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
|
|
224
|
+
if (encoded.length) {
|
|
225
|
+
return JSON.parse(encoded);
|
|
226
|
+
}
|
|
227
|
+
return {};
|
|
228
|
+
});
|
|
229
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
230
|
+
const value = await parseBody(errorBody, context);
|
|
231
|
+
value.message = value.message ?? value.Message;
|
|
232
|
+
return value;
|
|
233
|
+
};
|
|
234
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
235
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
236
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
237
|
+
let cleanValue = rawValue;
|
|
238
|
+
if (typeof cleanValue === "number") {
|
|
239
|
+
cleanValue = cleanValue.toString();
|
|
240
|
+
}
|
|
241
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
242
|
+
cleanValue = cleanValue.split(",")[0];
|
|
243
|
+
}
|
|
244
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
245
|
+
cleanValue = cleanValue.split(":")[0];
|
|
246
|
+
}
|
|
247
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
248
|
+
cleanValue = cleanValue.split("#")[1];
|
|
249
|
+
}
|
|
250
|
+
return cleanValue;
|
|
251
|
+
};
|
|
252
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
253
|
+
if (headerKey !== undefined) {
|
|
254
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
255
|
+
}
|
|
256
|
+
if (data.code !== undefined) {
|
|
257
|
+
return sanitizeErrorCode(data.code);
|
|
258
|
+
}
|
|
259
|
+
if (data["__type"] !== undefined) {
|
|
260
|
+
return sanitizeErrorCode(data["__type"]);
|
|
261
|
+
}
|
|
262
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
5
|
+
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
6
|
+
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
7
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
8
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
9
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
10
|
+
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
|
|
11
|
+
const getRuntimeConfig = (config) => {
|
|
12
|
+
const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
|
|
13
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
14
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
15
|
+
return {
|
|
16
|
+
...clientSharedValues,
|
|
17
|
+
...config,
|
|
18
|
+
runtime: "browser",
|
|
19
|
+
defaultsMode,
|
|
20
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
|
21
|
+
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
22
|
+
requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
|
|
23
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
|
24
|
+
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
25
|
+
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const hash_node_1 = require("@smithy/hash-node");
|
|
5
|
+
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
6
|
+
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
7
|
+
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
8
|
+
const util_body_length_node_1 = require("@smithy/util-body-length-node");
|
|
9
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
10
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
11
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
12
|
+
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
|
|
13
|
+
const smithy_client_2 = require("@smithy/smithy-client");
|
|
14
|
+
const getRuntimeConfig = (config) => {
|
|
15
|
+
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
|
16
|
+
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
|
17
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
18
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
19
|
+
return {
|
|
20
|
+
...clientSharedValues,
|
|
21
|
+
...config,
|
|
22
|
+
runtime: "node",
|
|
23
|
+
defaultsMode,
|
|
24
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
26
|
+
requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
|
|
27
|
+
retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }),
|
|
28
|
+
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
29
|
+
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
+
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
6
|
+
const getRuntimeConfig = (config) => {
|
|
7
|
+
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
|
|
8
|
+
return {
|
|
9
|
+
...browserDefaults,
|
|
10
|
+
...config,
|
|
11
|
+
runtime: "react-native",
|
|
12
|
+
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
+
const url_parser_1 = require("@smithy/url-parser");
|
|
6
|
+
const util_base64_1 = require("@smithy/util-base64");
|
|
7
|
+
const util_utf8_1 = require("@smithy/util-utf8");
|
|
8
|
+
const getRuntimeConfig = (config) => ({
|
|
9
|
+
apiVersion: "v2",
|
|
10
|
+
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
|
|
11
|
+
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
|
12
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
13
|
+
extensions: config?.extensions ?? [],
|
|
14
|
+
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
15
|
+
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
16
|
+
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
17
|
+
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
|
|
18
|
+
});
|
|
19
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|