@wildix/wda-history-client 1.0.6 → 1.0.8
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 +4 -0
- package/dist-cjs/commands/GetCallTranscriptionTextCommand.js +41 -0
- package/dist-cjs/commands/GetConferenceTranscriptionTextCommand.js +41 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +9 -7
- package/dist-cjs/protocols/Aws_restJson1.js +130 -3
- package/dist-es/WdaHistory.js +4 -0
- package/dist-es/commands/GetCallTranscriptionTextCommand.js +37 -0
- package/dist-es/commands/GetConferenceTranscriptionTextCommand.js +37 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +8 -6
- package/dist-es/protocols/Aws_restJson1.js +125 -2
- package/dist-types/WdaHistory.d.ts +14 -0
- package/dist-types/WdaHistoryClient.d.ts +4 -2
- package/dist-types/commands/GetCallCommand.d.ts +83 -89
- package/dist-types/commands/GetCallTranscriptionCommand.d.ts +13 -15
- package/dist-types/commands/GetCallTranscriptionTextCommand.d.ts +88 -0
- package/dist-types/commands/GetConferenceCommand.d.ts +1 -0
- package/dist-types/commands/GetConferenceTranscriptionCommand.d.ts +4 -3
- package/dist-types/commands/GetConferenceTranscriptionTextCommand.d.ts +87 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +89 -58
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/package.json +1 -1
package/dist-cjs/WdaHistory.js
CHANGED
|
@@ -4,14 +4,18 @@ exports.WdaHistory = void 0;
|
|
|
4
4
|
const WdaHistoryClient_1 = require("./WdaHistoryClient");
|
|
5
5
|
const GetCallCommand_1 = require("./commands/GetCallCommand");
|
|
6
6
|
const GetCallTranscriptionCommand_1 = require("./commands/GetCallTranscriptionCommand");
|
|
7
|
+
const GetCallTranscriptionTextCommand_1 = require("./commands/GetCallTranscriptionTextCommand");
|
|
7
8
|
const GetConferenceCommand_1 = require("./commands/GetConferenceCommand");
|
|
8
9
|
const GetConferenceTranscriptionCommand_1 = require("./commands/GetConferenceTranscriptionCommand");
|
|
10
|
+
const GetConferenceTranscriptionTextCommand_1 = require("./commands/GetConferenceTranscriptionTextCommand");
|
|
9
11
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
10
12
|
const commands = {
|
|
11
13
|
GetCallCommand: GetCallCommand_1.GetCallCommand,
|
|
12
14
|
GetCallTranscriptionCommand: GetCallTranscriptionCommand_1.GetCallTranscriptionCommand,
|
|
15
|
+
GetCallTranscriptionTextCommand: GetCallTranscriptionTextCommand_1.GetCallTranscriptionTextCommand,
|
|
13
16
|
GetConferenceCommand: GetConferenceCommand_1.GetConferenceCommand,
|
|
14
17
|
GetConferenceTranscriptionCommand: GetConferenceTranscriptionCommand_1.GetConferenceTranscriptionCommand,
|
|
18
|
+
GetConferenceTranscriptionTextCommand: GetConferenceTranscriptionTextCommand_1.GetConferenceTranscriptionTextCommand,
|
|
15
19
|
};
|
|
16
20
|
class WdaHistory extends WdaHistoryClient_1.WdaHistoryClient {
|
|
17
21
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetCallTranscriptionTextCommand = 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 GetCallTranscriptionTextCommand 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 = "GetCallTranscriptionTextCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WdaHistory",
|
|
28
|
+
operation: "GetCallTranscriptionText",
|
|
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_GetCallTranscriptionTextCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_GetCallTranscriptionTextCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.GetCallTranscriptionTextCommand = GetCallTranscriptionTextCommand;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetConferenceTranscriptionTextCommand = 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 GetConferenceTranscriptionTextCommand 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 = "GetConferenceTranscriptionTextCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WdaHistory",
|
|
28
|
+
operation: "GetConferenceTranscriptionText",
|
|
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_GetConferenceTranscriptionTextCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_GetConferenceTranscriptionTextCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.GetConferenceTranscriptionTextCommand = GetConferenceTranscriptionTextCommand;
|
|
@@ -3,5 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./GetCallCommand"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./GetCallTranscriptionCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./GetCallTranscriptionTextCommand"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./GetConferenceCommand"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./GetConferenceTranscriptionCommand"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./GetConferenceTranscriptionTextCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConferenceTranscriptionNotFoundException = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.ConferenceDirection = exports.ConferenceNotFoundException = exports.CallTranscriptionSpeaker = exports.CallTranscriptionNotFoundException = exports.
|
|
3
|
+
exports.ConferenceTranscriptionNotFoundException = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.ConferenceDirection = exports.ConferenceNotFoundException = exports.CallTranscriptionSpeaker = exports.CallTranscriptionNotFoundException = exports.RecordType = exports.CallFlowTranscriptionStatus = exports.License = exports.CallDirection = exports.ConversationStatus = exports.CallDevice = exports.CallParticipantType = exports.CallParticipantRole = exports.CallFlowAttachmentType = exports.CallNotFoundException = exports.ValidationException = exports.ForbiddenException = void 0;
|
|
4
4
|
const WdaHistoryServiceException_1 = require("./WdaHistoryServiceException");
|
|
5
5
|
class ForbiddenException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
|
|
6
6
|
constructor(opts) {
|
|
@@ -41,10 +41,6 @@ class CallNotFoundException extends WdaHistoryServiceException_1.WdaHistoryServi
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
exports.CallNotFoundException = CallNotFoundException;
|
|
44
|
-
exports.CallEndBy = {
|
|
45
|
-
CALLEE: "CALLEE",
|
|
46
|
-
CALLER: "CALLER",
|
|
47
|
-
};
|
|
48
44
|
exports.CallFlowAttachmentType = {
|
|
49
45
|
FAX: "FAX",
|
|
50
46
|
VOICEMAIL: "VOICEMAIL",
|
|
@@ -78,12 +74,18 @@ exports.CallDirection = {
|
|
|
78
74
|
OUTBOUND: "OUTBOUND",
|
|
79
75
|
UNDEFINED: "UNDEFINED",
|
|
80
76
|
};
|
|
77
|
+
exports.License = {
|
|
78
|
+
XBEES: "x-bees",
|
|
79
|
+
};
|
|
81
80
|
exports.CallFlowTranscriptionStatus = {
|
|
82
81
|
AVAILABLE: "AVAILABLE",
|
|
83
82
|
UNAVAILABLE: "UNAVAILABLE",
|
|
84
83
|
};
|
|
85
|
-
exports.
|
|
86
|
-
|
|
84
|
+
exports.RecordType = {
|
|
85
|
+
CALL: "call",
|
|
86
|
+
CALL_TRANSCRIPTION: "call_transcription",
|
|
87
|
+
CONFERENCE: "conference",
|
|
88
|
+
CONFERENCE_TRANSCRIPTION: "conference_transcription",
|
|
87
89
|
};
|
|
88
90
|
class CallTranscriptionNotFoundException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
|
|
89
91
|
constructor(opts) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
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;
|
|
3
|
+
exports.de_GetConferenceTranscriptionTextCommand = exports.de_GetConferenceTranscriptionCommand = exports.de_GetConferenceCommand = exports.de_GetCallTranscriptionTextCommand = exports.de_GetCallTranscriptionCommand = exports.de_GetCallCommand = exports.se_GetConferenceTranscriptionTextCommand = exports.se_GetConferenceTranscriptionCommand = exports.se_GetConferenceCommand = exports.se_GetCallTranscriptionTextCommand = exports.se_GetCallTranscriptionCommand = exports.se_GetCallCommand = void 0;
|
|
4
4
|
const WdaHistoryServiceException_1 = require("../models/WdaHistoryServiceException");
|
|
5
5
|
const models_0_1 = require("../models/models_0");
|
|
6
6
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
@@ -8,8 +8,9 @@ const smithy_client_1 = require("@smithy/smithy-client");
|
|
|
8
8
|
const se_GetCallCommand = async (input, context) => {
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
10
|
const headers = {};
|
|
11
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}";
|
|
11
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}/flows/{flowIndex}";
|
|
12
12
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'callId', () => input.callId, '{callId}', false);
|
|
13
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'flowIndex', () => input.flowIndex.toString(), '{flowIndex}', false);
|
|
13
14
|
const query = (0, smithy_client_1.map)({
|
|
14
15
|
"company": [, input.company],
|
|
15
16
|
});
|
|
@@ -29,8 +30,9 @@ exports.se_GetCallCommand = se_GetCallCommand;
|
|
|
29
30
|
const se_GetCallTranscriptionCommand = async (input, context) => {
|
|
30
31
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
31
32
|
const headers = {};
|
|
32
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}/transcription";
|
|
33
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}/flows/{flowIndex}/transcription";
|
|
33
34
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'callId', () => input.callId, '{callId}', false);
|
|
35
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'flowIndex', () => input.flowIndex.toString(), '{flowIndex}', false);
|
|
34
36
|
const query = (0, smithy_client_1.map)({
|
|
35
37
|
"company": [, input.company],
|
|
36
38
|
});
|
|
@@ -47,6 +49,28 @@ const se_GetCallTranscriptionCommand = async (input, context) => {
|
|
|
47
49
|
});
|
|
48
50
|
};
|
|
49
51
|
exports.se_GetCallTranscriptionCommand = se_GetCallTranscriptionCommand;
|
|
52
|
+
const se_GetCallTranscriptionTextCommand = async (input, context) => {
|
|
53
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
|
+
const headers = {};
|
|
55
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}/flows/{flowIndex}/transcription/text";
|
|
56
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'callId', () => input.callId, '{callId}', false);
|
|
57
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'flowIndex', () => input.flowIndex.toString(), '{flowIndex}', false);
|
|
58
|
+
const query = (0, smithy_client_1.map)({
|
|
59
|
+
"company": [, input.company],
|
|
60
|
+
});
|
|
61
|
+
let body;
|
|
62
|
+
return new protocol_http_1.HttpRequest({
|
|
63
|
+
protocol,
|
|
64
|
+
hostname,
|
|
65
|
+
port,
|
|
66
|
+
method: "GET",
|
|
67
|
+
headers,
|
|
68
|
+
path: resolvedPath,
|
|
69
|
+
query,
|
|
70
|
+
body,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
exports.se_GetCallTranscriptionTextCommand = se_GetCallTranscriptionTextCommand;
|
|
50
74
|
const se_GetConferenceCommand = async (input, context) => {
|
|
51
75
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
52
76
|
const headers = {};
|
|
@@ -89,6 +113,27 @@ const se_GetConferenceTranscriptionCommand = async (input, context) => {
|
|
|
89
113
|
});
|
|
90
114
|
};
|
|
91
115
|
exports.se_GetConferenceTranscriptionCommand = se_GetConferenceTranscriptionCommand;
|
|
116
|
+
const se_GetConferenceTranscriptionTextCommand = async (input, context) => {
|
|
117
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
118
|
+
const headers = {};
|
|
119
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/conferences/{conferenceId}/transcription/text";
|
|
120
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'conferenceId', () => input.conferenceId, '{conferenceId}', false);
|
|
121
|
+
const query = (0, smithy_client_1.map)({
|
|
122
|
+
"company": [, input.company],
|
|
123
|
+
});
|
|
124
|
+
let body;
|
|
125
|
+
return new protocol_http_1.HttpRequest({
|
|
126
|
+
protocol,
|
|
127
|
+
hostname,
|
|
128
|
+
port,
|
|
129
|
+
method: "GET",
|
|
130
|
+
headers,
|
|
131
|
+
path: resolvedPath,
|
|
132
|
+
query,
|
|
133
|
+
body,
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
exports.se_GetConferenceTranscriptionTextCommand = se_GetConferenceTranscriptionTextCommand;
|
|
92
137
|
const de_GetCallCommand = async (output, context) => {
|
|
93
138
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
94
139
|
return de_GetCallCommandError(output, context);
|
|
@@ -169,6 +214,47 @@ const de_GetCallTranscriptionCommandError = async (output, context) => {
|
|
|
169
214
|
});
|
|
170
215
|
}
|
|
171
216
|
};
|
|
217
|
+
const de_GetCallTranscriptionTextCommand = async (output, context) => {
|
|
218
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
219
|
+
return de_GetCallTranscriptionTextCommandError(output, context);
|
|
220
|
+
}
|
|
221
|
+
const contents = (0, smithy_client_1.map)({
|
|
222
|
+
$metadata: deserializeMetadata(output),
|
|
223
|
+
});
|
|
224
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
225
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
226
|
+
'chunks': smithy_client_1._json,
|
|
227
|
+
'text': smithy_client_1.expectString,
|
|
228
|
+
});
|
|
229
|
+
Object.assign(contents, doc);
|
|
230
|
+
return contents;
|
|
231
|
+
};
|
|
232
|
+
exports.de_GetCallTranscriptionTextCommand = de_GetCallTranscriptionTextCommand;
|
|
233
|
+
const de_GetCallTranscriptionTextCommandError = async (output, context) => {
|
|
234
|
+
const parsedOutput = {
|
|
235
|
+
...output,
|
|
236
|
+
body: await parseErrorBody(output.body, context)
|
|
237
|
+
};
|
|
238
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
239
|
+
switch (errorCode) {
|
|
240
|
+
case "CallTranscriptionNotFoundException":
|
|
241
|
+
case "wildix.wda.history#CallTranscriptionNotFoundException":
|
|
242
|
+
throw await de_CallTranscriptionNotFoundExceptionRes(parsedOutput, context);
|
|
243
|
+
case "ForbiddenException":
|
|
244
|
+
case "smithy.framework#ForbiddenException":
|
|
245
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
246
|
+
case "ValidationException":
|
|
247
|
+
case "smithy.framework#ValidationException":
|
|
248
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
249
|
+
default:
|
|
250
|
+
const parsedBody = parsedOutput.body;
|
|
251
|
+
return throwDefaultError({
|
|
252
|
+
output,
|
|
253
|
+
parsedBody,
|
|
254
|
+
errorCode
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
};
|
|
172
258
|
const de_GetConferenceCommand = async (output, context) => {
|
|
173
259
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
174
260
|
return de_GetConferenceCommandError(output, context);
|
|
@@ -249,6 +335,47 @@ const de_GetConferenceTranscriptionCommandError = async (output, context) => {
|
|
|
249
335
|
});
|
|
250
336
|
}
|
|
251
337
|
};
|
|
338
|
+
const de_GetConferenceTranscriptionTextCommand = async (output, context) => {
|
|
339
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
340
|
+
return de_GetConferenceTranscriptionTextCommandError(output, context);
|
|
341
|
+
}
|
|
342
|
+
const contents = (0, smithy_client_1.map)({
|
|
343
|
+
$metadata: deserializeMetadata(output),
|
|
344
|
+
});
|
|
345
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
346
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
347
|
+
'chunks': smithy_client_1._json,
|
|
348
|
+
'text': smithy_client_1.expectString,
|
|
349
|
+
});
|
|
350
|
+
Object.assign(contents, doc);
|
|
351
|
+
return contents;
|
|
352
|
+
};
|
|
353
|
+
exports.de_GetConferenceTranscriptionTextCommand = de_GetConferenceTranscriptionTextCommand;
|
|
354
|
+
const de_GetConferenceTranscriptionTextCommandError = async (output, context) => {
|
|
355
|
+
const parsedOutput = {
|
|
356
|
+
...output,
|
|
357
|
+
body: await parseErrorBody(output.body, context)
|
|
358
|
+
};
|
|
359
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
360
|
+
switch (errorCode) {
|
|
361
|
+
case "ConferenceTranscriptionNotFoundException":
|
|
362
|
+
case "wildix.wda.history#ConferenceTranscriptionNotFoundException":
|
|
363
|
+
throw await de_ConferenceTranscriptionNotFoundExceptionRes(parsedOutput, context);
|
|
364
|
+
case "ForbiddenException":
|
|
365
|
+
case "smithy.framework#ForbiddenException":
|
|
366
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
367
|
+
case "ValidationException":
|
|
368
|
+
case "smithy.framework#ValidationException":
|
|
369
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
370
|
+
default:
|
|
371
|
+
const parsedBody = parsedOutput.body;
|
|
372
|
+
return throwDefaultError({
|
|
373
|
+
output,
|
|
374
|
+
parsedBody,
|
|
375
|
+
errorCode
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
};
|
|
252
379
|
const throwDefaultError = (0, smithy_client_1.withBaseException)(WdaHistoryServiceException_1.WdaHistoryServiceException);
|
|
253
380
|
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
254
381
|
const contents = (0, smithy_client_1.map)({});
|
package/dist-es/WdaHistory.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { WdaHistoryClient, } from "./WdaHistoryClient";
|
|
2
2
|
import { GetCallCommand, } from "./commands/GetCallCommand";
|
|
3
3
|
import { GetCallTranscriptionCommand, } from "./commands/GetCallTranscriptionCommand";
|
|
4
|
+
import { GetCallTranscriptionTextCommand, } from "./commands/GetCallTranscriptionTextCommand";
|
|
4
5
|
import { GetConferenceCommand, } from "./commands/GetConferenceCommand";
|
|
5
6
|
import { GetConferenceTranscriptionCommand, } from "./commands/GetConferenceTranscriptionCommand";
|
|
7
|
+
import { GetConferenceTranscriptionTextCommand, } from "./commands/GetConferenceTranscriptionTextCommand";
|
|
6
8
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
7
9
|
const commands = {
|
|
8
10
|
GetCallCommand,
|
|
9
11
|
GetCallTranscriptionCommand,
|
|
12
|
+
GetCallTranscriptionTextCommand,
|
|
10
13
|
GetConferenceCommand,
|
|
11
14
|
GetConferenceTranscriptionCommand,
|
|
15
|
+
GetConferenceTranscriptionTextCommand,
|
|
12
16
|
};
|
|
13
17
|
export class WdaHistory extends WdaHistoryClient {
|
|
14
18
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { de_GetCallTranscriptionTextCommand, se_GetCallTranscriptionTextCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class GetCallTranscriptionTextCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
12
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
13
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
14
|
+
const { logger } = configuration;
|
|
15
|
+
const clientName = "WdaHistoryClient";
|
|
16
|
+
const commandName = "GetCallTranscriptionTextCommand";
|
|
17
|
+
const handlerExecutionContext = {
|
|
18
|
+
logger,
|
|
19
|
+
clientName,
|
|
20
|
+
commandName,
|
|
21
|
+
inputFilterSensitiveLog: (_) => _,
|
|
22
|
+
outputFilterSensitiveLog: (_) => _,
|
|
23
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
24
|
+
service: "WdaHistory",
|
|
25
|
+
operation: "GetCallTranscriptionText",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return se_GetCallTranscriptionTextCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return de_GetCallTranscriptionTextCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { de_GetConferenceTranscriptionTextCommand, se_GetConferenceTranscriptionTextCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class GetConferenceTranscriptionTextCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
12
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
13
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
14
|
+
const { logger } = configuration;
|
|
15
|
+
const clientName = "WdaHistoryClient";
|
|
16
|
+
const commandName = "GetConferenceTranscriptionTextCommand";
|
|
17
|
+
const handlerExecutionContext = {
|
|
18
|
+
logger,
|
|
19
|
+
clientName,
|
|
20
|
+
commandName,
|
|
21
|
+
inputFilterSensitiveLog: (_) => _,
|
|
22
|
+
outputFilterSensitiveLog: (_) => _,
|
|
23
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
24
|
+
service: "WdaHistory",
|
|
25
|
+
operation: "GetConferenceTranscriptionText",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return se_GetConferenceTranscriptionTextCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return de_GetConferenceTranscriptionTextCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from "./GetCallCommand";
|
|
2
2
|
export * from "./GetCallTranscriptionCommand";
|
|
3
|
+
export * from "./GetCallTranscriptionTextCommand";
|
|
3
4
|
export * from "./GetConferenceCommand";
|
|
4
5
|
export * from "./GetConferenceTranscriptionCommand";
|
|
6
|
+
export * from "./GetConferenceTranscriptionTextCommand";
|
|
@@ -35,10 +35,6 @@ export class CallNotFoundException extends __BaseException {
|
|
|
35
35
|
Object.setPrototypeOf(this, CallNotFoundException.prototype);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
export const CallEndBy = {
|
|
39
|
-
CALLEE: "CALLEE",
|
|
40
|
-
CALLER: "CALLER",
|
|
41
|
-
};
|
|
42
38
|
export const CallFlowAttachmentType = {
|
|
43
39
|
FAX: "FAX",
|
|
44
40
|
VOICEMAIL: "VOICEMAIL",
|
|
@@ -72,12 +68,18 @@ export const CallDirection = {
|
|
|
72
68
|
OUTBOUND: "OUTBOUND",
|
|
73
69
|
UNDEFINED: "UNDEFINED",
|
|
74
70
|
};
|
|
71
|
+
export const License = {
|
|
72
|
+
XBEES: "x-bees",
|
|
73
|
+
};
|
|
75
74
|
export const CallFlowTranscriptionStatus = {
|
|
76
75
|
AVAILABLE: "AVAILABLE",
|
|
77
76
|
UNAVAILABLE: "UNAVAILABLE",
|
|
78
77
|
};
|
|
79
|
-
export const
|
|
80
|
-
|
|
78
|
+
export const RecordType = {
|
|
79
|
+
CALL: "call",
|
|
80
|
+
CALL_TRANSCRIPTION: "call_transcription",
|
|
81
|
+
CONFERENCE: "conference",
|
|
82
|
+
CONFERENCE_TRANSCRIPTION: "conference_transcription",
|
|
81
83
|
};
|
|
82
84
|
export class CallTranscriptionNotFoundException extends __BaseException {
|
|
83
85
|
constructor(opts) {
|
|
@@ -5,8 +5,9 @@ import { decorateServiceException as __decorateServiceException, expectNonNull a
|
|
|
5
5
|
export const se_GetCallCommand = async (input, context) => {
|
|
6
6
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
7
|
const headers = {};
|
|
8
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}";
|
|
8
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}/flows/{flowIndex}";
|
|
9
9
|
resolvedPath = __resolvedPath(resolvedPath, input, 'callId', () => input.callId, '{callId}', false);
|
|
10
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'flowIndex', () => input.flowIndex.toString(), '{flowIndex}', false);
|
|
10
11
|
const query = map({
|
|
11
12
|
"company": [, input.company],
|
|
12
13
|
});
|
|
@@ -25,8 +26,30 @@ export const se_GetCallCommand = async (input, context) => {
|
|
|
25
26
|
export const se_GetCallTranscriptionCommand = async (input, context) => {
|
|
26
27
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
27
28
|
const headers = {};
|
|
28
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}/transcription";
|
|
29
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}/flows/{flowIndex}/transcription";
|
|
29
30
|
resolvedPath = __resolvedPath(resolvedPath, input, 'callId', () => input.callId, '{callId}', false);
|
|
31
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'flowIndex', () => input.flowIndex.toString(), '{flowIndex}', false);
|
|
32
|
+
const query = map({
|
|
33
|
+
"company": [, input.company],
|
|
34
|
+
});
|
|
35
|
+
let body;
|
|
36
|
+
return new __HttpRequest({
|
|
37
|
+
protocol,
|
|
38
|
+
hostname,
|
|
39
|
+
port,
|
|
40
|
+
method: "GET",
|
|
41
|
+
headers,
|
|
42
|
+
path: resolvedPath,
|
|
43
|
+
query,
|
|
44
|
+
body,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
export const se_GetCallTranscriptionTextCommand = async (input, context) => {
|
|
48
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
49
|
+
const headers = {};
|
|
50
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/calls/{callId}/flows/{flowIndex}/transcription/text";
|
|
51
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'callId', () => input.callId, '{callId}', false);
|
|
52
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'flowIndex', () => input.flowIndex.toString(), '{flowIndex}', false);
|
|
30
53
|
const query = map({
|
|
31
54
|
"company": [, input.company],
|
|
32
55
|
});
|
|
@@ -82,6 +105,26 @@ export const se_GetConferenceTranscriptionCommand = async (input, context) => {
|
|
|
82
105
|
body,
|
|
83
106
|
});
|
|
84
107
|
};
|
|
108
|
+
export const se_GetConferenceTranscriptionTextCommand = async (input, context) => {
|
|
109
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
110
|
+
const headers = {};
|
|
111
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/history/conferences/{conferenceId}/transcription/text";
|
|
112
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'conferenceId', () => input.conferenceId, '{conferenceId}', false);
|
|
113
|
+
const query = map({
|
|
114
|
+
"company": [, input.company],
|
|
115
|
+
});
|
|
116
|
+
let body;
|
|
117
|
+
return new __HttpRequest({
|
|
118
|
+
protocol,
|
|
119
|
+
hostname,
|
|
120
|
+
port,
|
|
121
|
+
method: "GET",
|
|
122
|
+
headers,
|
|
123
|
+
path: resolvedPath,
|
|
124
|
+
query,
|
|
125
|
+
body,
|
|
126
|
+
});
|
|
127
|
+
};
|
|
85
128
|
export const de_GetCallCommand = async (output, context) => {
|
|
86
129
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
87
130
|
return de_GetCallCommandError(output, context);
|
|
@@ -160,6 +203,46 @@ const de_GetCallTranscriptionCommandError = async (output, context) => {
|
|
|
160
203
|
});
|
|
161
204
|
}
|
|
162
205
|
};
|
|
206
|
+
export const de_GetCallTranscriptionTextCommand = async (output, context) => {
|
|
207
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
208
|
+
return de_GetCallTranscriptionTextCommandError(output, context);
|
|
209
|
+
}
|
|
210
|
+
const contents = map({
|
|
211
|
+
$metadata: deserializeMetadata(output),
|
|
212
|
+
});
|
|
213
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
214
|
+
const doc = take(data, {
|
|
215
|
+
'chunks': _json,
|
|
216
|
+
'text': __expectString,
|
|
217
|
+
});
|
|
218
|
+
Object.assign(contents, doc);
|
|
219
|
+
return contents;
|
|
220
|
+
};
|
|
221
|
+
const de_GetCallTranscriptionTextCommandError = async (output, context) => {
|
|
222
|
+
const parsedOutput = {
|
|
223
|
+
...output,
|
|
224
|
+
body: await parseErrorBody(output.body, context)
|
|
225
|
+
};
|
|
226
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
227
|
+
switch (errorCode) {
|
|
228
|
+
case "CallTranscriptionNotFoundException":
|
|
229
|
+
case "wildix.wda.history#CallTranscriptionNotFoundException":
|
|
230
|
+
throw await de_CallTranscriptionNotFoundExceptionRes(parsedOutput, context);
|
|
231
|
+
case "ForbiddenException":
|
|
232
|
+
case "smithy.framework#ForbiddenException":
|
|
233
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
234
|
+
case "ValidationException":
|
|
235
|
+
case "smithy.framework#ValidationException":
|
|
236
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
237
|
+
default:
|
|
238
|
+
const parsedBody = parsedOutput.body;
|
|
239
|
+
return throwDefaultError({
|
|
240
|
+
output,
|
|
241
|
+
parsedBody,
|
|
242
|
+
errorCode
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
};
|
|
163
246
|
export const de_GetConferenceCommand = async (output, context) => {
|
|
164
247
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
165
248
|
return de_GetConferenceCommandError(output, context);
|
|
@@ -238,6 +321,46 @@ const de_GetConferenceTranscriptionCommandError = async (output, context) => {
|
|
|
238
321
|
});
|
|
239
322
|
}
|
|
240
323
|
};
|
|
324
|
+
export const de_GetConferenceTranscriptionTextCommand = async (output, context) => {
|
|
325
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
326
|
+
return de_GetConferenceTranscriptionTextCommandError(output, context);
|
|
327
|
+
}
|
|
328
|
+
const contents = map({
|
|
329
|
+
$metadata: deserializeMetadata(output),
|
|
330
|
+
});
|
|
331
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
332
|
+
const doc = take(data, {
|
|
333
|
+
'chunks': _json,
|
|
334
|
+
'text': __expectString,
|
|
335
|
+
});
|
|
336
|
+
Object.assign(contents, doc);
|
|
337
|
+
return contents;
|
|
338
|
+
};
|
|
339
|
+
const de_GetConferenceTranscriptionTextCommandError = async (output, context) => {
|
|
340
|
+
const parsedOutput = {
|
|
341
|
+
...output,
|
|
342
|
+
body: await parseErrorBody(output.body, context)
|
|
343
|
+
};
|
|
344
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
345
|
+
switch (errorCode) {
|
|
346
|
+
case "ConferenceTranscriptionNotFoundException":
|
|
347
|
+
case "wildix.wda.history#ConferenceTranscriptionNotFoundException":
|
|
348
|
+
throw await de_ConferenceTranscriptionNotFoundExceptionRes(parsedOutput, context);
|
|
349
|
+
case "ForbiddenException":
|
|
350
|
+
case "smithy.framework#ForbiddenException":
|
|
351
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
352
|
+
case "ValidationException":
|
|
353
|
+
case "smithy.framework#ValidationException":
|
|
354
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
355
|
+
default:
|
|
356
|
+
const parsedBody = parsedOutput.body;
|
|
357
|
+
return throwDefaultError({
|
|
358
|
+
output,
|
|
359
|
+
parsedBody,
|
|
360
|
+
errorCode
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
};
|
|
241
364
|
const throwDefaultError = withBaseException(__BaseException);
|
|
242
365
|
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
243
366
|
const contents = map({});
|