@wildix/wda-stream-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/WdaStream.js +2 -0
- package/dist-cjs/commands/GetConferenceIdCommand.js +41 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +62 -1
- package/dist-cjs/protocols/Aws_restJson1.js +78 -1
- package/dist-es/WdaStream.js +2 -0
- package/dist-es/commands/GetConferenceIdCommand.js +37 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +60 -0
- package/dist-es/protocols/Aws_restJson1.js +77 -2
- package/dist-types/WdaStream.d.ts +7 -0
- package/dist-types/WdaStreamClient.d.ts +3 -2
- package/dist-types/commands/ConsumeEventCommand.d.ts +273 -0
- package/dist-types/commands/GetConferenceIdCommand.d.ts +78 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +601 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +1 -1
package/dist-cjs/WdaStream.js
CHANGED
|
@@ -4,11 +4,13 @@ exports.WdaStream = void 0;
|
|
|
4
4
|
const WdaStreamClient_1 = require("./WdaStreamClient");
|
|
5
5
|
const ConsumeEventCommand_1 = require("./commands/ConsumeEventCommand");
|
|
6
6
|
const DescribeEventCommand_1 = require("./commands/DescribeEventCommand");
|
|
7
|
+
const GetConferenceIdCommand_1 = require("./commands/GetConferenceIdCommand");
|
|
7
8
|
const GetConversationsCommand_1 = require("./commands/GetConversationsCommand");
|
|
8
9
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
9
10
|
const commands = {
|
|
10
11
|
ConsumeEventCommand: ConsumeEventCommand_1.ConsumeEventCommand,
|
|
11
12
|
DescribeEventCommand: DescribeEventCommand_1.DescribeEventCommand,
|
|
13
|
+
GetConferenceIdCommand: GetConferenceIdCommand_1.GetConferenceIdCommand,
|
|
12
14
|
GetConversationsCommand: GetConversationsCommand_1.GetConversationsCommand,
|
|
13
15
|
};
|
|
14
16
|
class WdaStream extends WdaStreamClient_1.WdaStreamClient {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetConferenceIdCommand = 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 GetConferenceIdCommand 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 = "WdaStreamClient";
|
|
19
|
+
const commandName = "GetConferenceIdCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WdaStream",
|
|
28
|
+
operation: "GetConferenceId",
|
|
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_GetConferenceIdCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_GetConferenceIdCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.GetConferenceIdCommand = GetConferenceIdCommand;
|
|
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./ConsumeEventCommand"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./DescribeEventCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./GetConferenceIdCommand"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./GetConversationsCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConsumeEventInputEvent = exports.SmsStatus = exports.SmsChannelType = exports.SmsConsumeEventType = exports.ChatConsumeEventType = exports.ChatTag = exports.ChatStatus = exports.ChatParticipantType = exports.ChatParticipantRole = exports.ChatDirection = exports.ChannelType = exports.CallFlowStatus = exports.LiveEventType = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.ConferenceDirection = exports.CallTranscriptionSpeaker = exports.License = exports.CallFlowTranscriptionStatus = exports.CallDirection = exports.ConversationStatus = exports.CallDevice = exports.CallParticipantType = exports.CallParticipantRole = exports.CallFlowAttachmentType = exports.CallEndBy = exports.ValidationException = exports.ForbiddenException = void 0;
|
|
3
|
+
exports.MatchNotFoundException = exports.ConsumeEventInputEvent = exports.SmsStatus = exports.SmsChannelType = exports.SmsConsumeEventType = exports.ChatConsumeEventType = exports.ChatTag = exports.ChatStatus = exports.ChatParticipantType = exports.ChatParticipantRole = exports.ChatDirection = exports.ChannelType = exports.CallFlowConsumeStatus = exports.CallEndConsume = exports.CallFlowAttachmentConsumeType = exports.CallFlowStatus = exports.LiveEventType = exports.CallConsumeEventType = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.ConferenceDirection = exports.CallTranscriptionSpeaker = exports.License = exports.CallFlowTranscriptionStatus = exports.CallDirection = exports.ConversationStatus = exports.CallDevice = exports.CallParticipantType = exports.CallParticipantRole = exports.CallFlowAttachmentType = exports.CallEndBy = exports.ValidationException = exports.ForbiddenException = void 0;
|
|
4
4
|
const WdaStreamServiceException_1 = require("./WdaStreamServiceException");
|
|
5
5
|
class ForbiddenException extends WdaStreamServiceException_1.WdaStreamServiceException {
|
|
6
6
|
constructor(opts) {
|
|
@@ -96,6 +96,19 @@ exports.ConferenceTranscriptionStatus = {
|
|
|
96
96
|
AVAILABLE: "AVAILABLE",
|
|
97
97
|
UNAVAILABLE: "UNAVAILABLE",
|
|
98
98
|
};
|
|
99
|
+
exports.CallConsumeEventType = {
|
|
100
|
+
CALL_AGENTS_CANCEL: "CALL.AGENTS_CANCEL",
|
|
101
|
+
CALL_AGENTS_START: "CALL.AGENTS_START",
|
|
102
|
+
CALL_ATTACHMENT: "CALL.ATTACHMENT",
|
|
103
|
+
CALL_END: "CALL.END",
|
|
104
|
+
CALL_LIVE: "CALL.LIVE",
|
|
105
|
+
CALL_RECORD_START: "CALL.RECORD_START",
|
|
106
|
+
CALL_RECORD_STOP: "CALL.RECORD_STOP",
|
|
107
|
+
CALL_SPLIT: "CALL.SPLIT",
|
|
108
|
+
CALL_START: "CALL.START",
|
|
109
|
+
CALL_TRANSCRIPTION: "CALL.TRANSCRIPTION",
|
|
110
|
+
CALL_UPDATE: "CALL.UPDATE",
|
|
111
|
+
};
|
|
99
112
|
exports.LiveEventType = {
|
|
100
113
|
CALL: "call",
|
|
101
114
|
CALL_COMPLETE: "call_complete",
|
|
@@ -117,6 +130,19 @@ exports.CallFlowStatus = {
|
|
|
117
130
|
HOLD: "HOLD",
|
|
118
131
|
TALKING: "TALKING",
|
|
119
132
|
};
|
|
133
|
+
exports.CallFlowAttachmentConsumeType = {
|
|
134
|
+
FAX: "fax",
|
|
135
|
+
VOICEMAIL: "voicemail",
|
|
136
|
+
};
|
|
137
|
+
exports.CallEndConsume = {
|
|
138
|
+
CALLEE: "callee",
|
|
139
|
+
CALLER: "caller",
|
|
140
|
+
};
|
|
141
|
+
exports.CallFlowConsumeStatus = {
|
|
142
|
+
CONNECTING: "connecting",
|
|
143
|
+
HOLD: "hold",
|
|
144
|
+
TALKING: "talking",
|
|
145
|
+
};
|
|
120
146
|
exports.ChannelType = {
|
|
121
147
|
DIRECT: "direct",
|
|
122
148
|
GROUP: "group",
|
|
@@ -166,6 +192,28 @@ exports.SmsStatus = {
|
|
|
166
192
|
var ConsumeEventInputEvent;
|
|
167
193
|
(function (ConsumeEventInputEvent) {
|
|
168
194
|
ConsumeEventInputEvent.visit = (value, visitor) => {
|
|
195
|
+
if (value.callStart !== undefined)
|
|
196
|
+
return visitor.callStart(value.callStart);
|
|
197
|
+
if (value.callUpdate !== undefined)
|
|
198
|
+
return visitor.callUpdate(value.callUpdate);
|
|
199
|
+
if (value.callSplit !== undefined)
|
|
200
|
+
return visitor.callSplit(value.callSplit);
|
|
201
|
+
if (value.callLive !== undefined)
|
|
202
|
+
return visitor.callLive(value.callLive);
|
|
203
|
+
if (value.callAgentsStart !== undefined)
|
|
204
|
+
return visitor.callAgentsStart(value.callAgentsStart);
|
|
205
|
+
if (value.callAgentsCancel !== undefined)
|
|
206
|
+
return visitor.callAgentsCancel(value.callAgentsCancel);
|
|
207
|
+
if (value.callEnd !== undefined)
|
|
208
|
+
return visitor.callEnd(value.callEnd);
|
|
209
|
+
if (value.callRecordStart !== undefined)
|
|
210
|
+
return visitor.callRecordStart(value.callRecordStart);
|
|
211
|
+
if (value.callRecordStop !== undefined)
|
|
212
|
+
return visitor.callRecordStop(value.callRecordStop);
|
|
213
|
+
if (value.callAttachment !== undefined)
|
|
214
|
+
return visitor.callAttachment(value.callAttachment);
|
|
215
|
+
if (value.callTranscription !== undefined)
|
|
216
|
+
return visitor.callTranscription(value.callTranscription);
|
|
169
217
|
if (value.chatNew !== undefined)
|
|
170
218
|
return visitor.chatNew(value.chatNew);
|
|
171
219
|
if (value.chatUpdate !== undefined)
|
|
@@ -177,3 +225,16 @@ var ConsumeEventInputEvent;
|
|
|
177
225
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
178
226
|
};
|
|
179
227
|
})(ConsumeEventInputEvent = exports.ConsumeEventInputEvent || (exports.ConsumeEventInputEvent = {}));
|
|
228
|
+
class MatchNotFoundException extends WdaStreamServiceException_1.WdaStreamServiceException {
|
|
229
|
+
constructor(opts) {
|
|
230
|
+
super({
|
|
231
|
+
name: "MatchNotFoundException",
|
|
232
|
+
$fault: "client",
|
|
233
|
+
...opts
|
|
234
|
+
});
|
|
235
|
+
this.name = "MatchNotFoundException";
|
|
236
|
+
this.$fault = "client";
|
|
237
|
+
Object.setPrototypeOf(this, MatchNotFoundException.prototype);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
exports.MatchNotFoundException = MatchNotFoundException;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_GetConversationsCommand = exports.de_DescribeEventCommand = exports.de_ConsumeEventCommand = exports.se_GetConversationsCommand = exports.se_DescribeEventCommand = exports.se_ConsumeEventCommand = void 0;
|
|
3
|
+
exports.de_GetConversationsCommand = exports.de_GetConferenceIdCommand = exports.de_DescribeEventCommand = exports.de_ConsumeEventCommand = exports.se_GetConversationsCommand = exports.se_GetConferenceIdCommand = exports.se_DescribeEventCommand = exports.se_ConsumeEventCommand = void 0;
|
|
4
4
|
const WdaStreamServiceException_1 = require("../models/WdaStreamServiceException");
|
|
5
5
|
const models_0_1 = require("../models/models_0");
|
|
6
6
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
@@ -48,6 +48,27 @@ const se_DescribeEventCommand = async (input, context) => {
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
exports.se_DescribeEventCommand = se_DescribeEventCommand;
|
|
51
|
+
const se_GetConferenceIdCommand = async (input, context) => {
|
|
52
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
53
|
+
const headers = {};
|
|
54
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/stream/conferences/match/{channelId}";
|
|
55
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
56
|
+
const query = (0, smithy_client_1.map)({
|
|
57
|
+
"company": [, input.company],
|
|
58
|
+
});
|
|
59
|
+
let body;
|
|
60
|
+
return new protocol_http_1.HttpRequest({
|
|
61
|
+
protocol,
|
|
62
|
+
hostname,
|
|
63
|
+
port,
|
|
64
|
+
method: "GET",
|
|
65
|
+
headers,
|
|
66
|
+
path: resolvedPath,
|
|
67
|
+
query,
|
|
68
|
+
body,
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
exports.se_GetConferenceIdCommand = se_GetConferenceIdCommand;
|
|
51
72
|
const se_GetConversationsCommand = async (input, context) => {
|
|
52
73
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
53
74
|
const headers = {};
|
|
@@ -86,6 +107,9 @@ const de_ConsumeEventCommandError = async (output, context) => {
|
|
|
86
107
|
};
|
|
87
108
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
88
109
|
switch (errorCode) {
|
|
110
|
+
case "ForbiddenException":
|
|
111
|
+
case "smithy.framework#ForbiddenException":
|
|
112
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
89
113
|
case "ValidationException":
|
|
90
114
|
case "smithy.framework#ValidationException":
|
|
91
115
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -145,6 +169,46 @@ const de_DescribeEventCommandError = async (output, context) => {
|
|
|
145
169
|
});
|
|
146
170
|
}
|
|
147
171
|
};
|
|
172
|
+
const de_GetConferenceIdCommand = async (output, context) => {
|
|
173
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
174
|
+
return de_GetConferenceIdCommandError(output, context);
|
|
175
|
+
}
|
|
176
|
+
const contents = (0, smithy_client_1.map)({
|
|
177
|
+
$metadata: deserializeMetadata(output),
|
|
178
|
+
});
|
|
179
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
180
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
181
|
+
'id': smithy_client_1.expectString,
|
|
182
|
+
});
|
|
183
|
+
Object.assign(contents, doc);
|
|
184
|
+
return contents;
|
|
185
|
+
};
|
|
186
|
+
exports.de_GetConferenceIdCommand = de_GetConferenceIdCommand;
|
|
187
|
+
const de_GetConferenceIdCommandError = async (output, context) => {
|
|
188
|
+
const parsedOutput = {
|
|
189
|
+
...output,
|
|
190
|
+
body: await parseErrorBody(output.body, context)
|
|
191
|
+
};
|
|
192
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
193
|
+
switch (errorCode) {
|
|
194
|
+
case "ForbiddenException":
|
|
195
|
+
case "smithy.framework#ForbiddenException":
|
|
196
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
197
|
+
case "MatchNotFoundException":
|
|
198
|
+
case "wildix.wda.stream#MatchNotFoundException":
|
|
199
|
+
throw await de_MatchNotFoundExceptionRes(parsedOutput, context);
|
|
200
|
+
case "ValidationException":
|
|
201
|
+
case "smithy.framework#ValidationException":
|
|
202
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
203
|
+
default:
|
|
204
|
+
const parsedBody = parsedOutput.body;
|
|
205
|
+
return throwDefaultError({
|
|
206
|
+
output,
|
|
207
|
+
parsedBody,
|
|
208
|
+
errorCode
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
};
|
|
148
212
|
const de_GetConversationsCommand = async (output, context) => {
|
|
149
213
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
150
214
|
return de_GetConversationsCommandError(output, context);
|
|
@@ -211,6 +275,19 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
211
275
|
});
|
|
212
276
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
213
277
|
};
|
|
278
|
+
const de_MatchNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
279
|
+
const contents = (0, smithy_client_1.map)({});
|
|
280
|
+
const data = parsedOutput.body;
|
|
281
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
282
|
+
'message': smithy_client_1.expectString,
|
|
283
|
+
});
|
|
284
|
+
Object.assign(contents, doc);
|
|
285
|
+
const exception = new models_0_1.MatchNotFoundException({
|
|
286
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
287
|
+
...contents
|
|
288
|
+
});
|
|
289
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
290
|
+
};
|
|
214
291
|
const deserializeMetadata = (output) => ({
|
|
215
292
|
httpStatusCode: output.statusCode,
|
|
216
293
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-es/WdaStream.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { WdaStreamClient, } from "./WdaStreamClient";
|
|
2
2
|
import { ConsumeEventCommand, } from "./commands/ConsumeEventCommand";
|
|
3
3
|
import { DescribeEventCommand, } from "./commands/DescribeEventCommand";
|
|
4
|
+
import { GetConferenceIdCommand, } from "./commands/GetConferenceIdCommand";
|
|
4
5
|
import { GetConversationsCommand, } from "./commands/GetConversationsCommand";
|
|
5
6
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
6
7
|
const commands = {
|
|
7
8
|
ConsumeEventCommand,
|
|
8
9
|
DescribeEventCommand,
|
|
10
|
+
GetConferenceIdCommand,
|
|
9
11
|
GetConversationsCommand,
|
|
10
12
|
};
|
|
11
13
|
export class WdaStream extends WdaStreamClient {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { de_GetConferenceIdCommand, se_GetConferenceIdCommand, } 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 GetConferenceIdCommand 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 = "WdaStreamClient";
|
|
16
|
+
const commandName = "GetConferenceIdCommand";
|
|
17
|
+
const handlerExecutionContext = {
|
|
18
|
+
logger,
|
|
19
|
+
clientName,
|
|
20
|
+
commandName,
|
|
21
|
+
inputFilterSensitiveLog: (_) => _,
|
|
22
|
+
outputFilterSensitiveLog: (_) => _,
|
|
23
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
24
|
+
service: "WdaStream",
|
|
25
|
+
operation: "GetConferenceId",
|
|
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_GetConferenceIdCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return de_GetConferenceIdCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -91,6 +91,19 @@ export const ConferenceTranscriptionStatus = {
|
|
|
91
91
|
AVAILABLE: "AVAILABLE",
|
|
92
92
|
UNAVAILABLE: "UNAVAILABLE",
|
|
93
93
|
};
|
|
94
|
+
export const CallConsumeEventType = {
|
|
95
|
+
CALL_AGENTS_CANCEL: "CALL.AGENTS_CANCEL",
|
|
96
|
+
CALL_AGENTS_START: "CALL.AGENTS_START",
|
|
97
|
+
CALL_ATTACHMENT: "CALL.ATTACHMENT",
|
|
98
|
+
CALL_END: "CALL.END",
|
|
99
|
+
CALL_LIVE: "CALL.LIVE",
|
|
100
|
+
CALL_RECORD_START: "CALL.RECORD_START",
|
|
101
|
+
CALL_RECORD_STOP: "CALL.RECORD_STOP",
|
|
102
|
+
CALL_SPLIT: "CALL.SPLIT",
|
|
103
|
+
CALL_START: "CALL.START",
|
|
104
|
+
CALL_TRANSCRIPTION: "CALL.TRANSCRIPTION",
|
|
105
|
+
CALL_UPDATE: "CALL.UPDATE",
|
|
106
|
+
};
|
|
94
107
|
export const LiveEventType = {
|
|
95
108
|
CALL: "call",
|
|
96
109
|
CALL_COMPLETE: "call_complete",
|
|
@@ -112,6 +125,19 @@ export const CallFlowStatus = {
|
|
|
112
125
|
HOLD: "HOLD",
|
|
113
126
|
TALKING: "TALKING",
|
|
114
127
|
};
|
|
128
|
+
export const CallFlowAttachmentConsumeType = {
|
|
129
|
+
FAX: "fax",
|
|
130
|
+
VOICEMAIL: "voicemail",
|
|
131
|
+
};
|
|
132
|
+
export const CallEndConsume = {
|
|
133
|
+
CALLEE: "callee",
|
|
134
|
+
CALLER: "caller",
|
|
135
|
+
};
|
|
136
|
+
export const CallFlowConsumeStatus = {
|
|
137
|
+
CONNECTING: "connecting",
|
|
138
|
+
HOLD: "hold",
|
|
139
|
+
TALKING: "talking",
|
|
140
|
+
};
|
|
115
141
|
export const ChannelType = {
|
|
116
142
|
DIRECT: "direct",
|
|
117
143
|
GROUP: "group",
|
|
@@ -161,6 +187,28 @@ export const SmsStatus = {
|
|
|
161
187
|
export var ConsumeEventInputEvent;
|
|
162
188
|
(function (ConsumeEventInputEvent) {
|
|
163
189
|
ConsumeEventInputEvent.visit = (value, visitor) => {
|
|
190
|
+
if (value.callStart !== undefined)
|
|
191
|
+
return visitor.callStart(value.callStart);
|
|
192
|
+
if (value.callUpdate !== undefined)
|
|
193
|
+
return visitor.callUpdate(value.callUpdate);
|
|
194
|
+
if (value.callSplit !== undefined)
|
|
195
|
+
return visitor.callSplit(value.callSplit);
|
|
196
|
+
if (value.callLive !== undefined)
|
|
197
|
+
return visitor.callLive(value.callLive);
|
|
198
|
+
if (value.callAgentsStart !== undefined)
|
|
199
|
+
return visitor.callAgentsStart(value.callAgentsStart);
|
|
200
|
+
if (value.callAgentsCancel !== undefined)
|
|
201
|
+
return visitor.callAgentsCancel(value.callAgentsCancel);
|
|
202
|
+
if (value.callEnd !== undefined)
|
|
203
|
+
return visitor.callEnd(value.callEnd);
|
|
204
|
+
if (value.callRecordStart !== undefined)
|
|
205
|
+
return visitor.callRecordStart(value.callRecordStart);
|
|
206
|
+
if (value.callRecordStop !== undefined)
|
|
207
|
+
return visitor.callRecordStop(value.callRecordStop);
|
|
208
|
+
if (value.callAttachment !== undefined)
|
|
209
|
+
return visitor.callAttachment(value.callAttachment);
|
|
210
|
+
if (value.callTranscription !== undefined)
|
|
211
|
+
return visitor.callTranscription(value.callTranscription);
|
|
164
212
|
if (value.chatNew !== undefined)
|
|
165
213
|
return visitor.chatNew(value.chatNew);
|
|
166
214
|
if (value.chatUpdate !== undefined)
|
|
@@ -172,3 +220,15 @@ export var ConsumeEventInputEvent;
|
|
|
172
220
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
173
221
|
};
|
|
174
222
|
})(ConsumeEventInputEvent || (ConsumeEventInputEvent = {}));
|
|
223
|
+
export class MatchNotFoundException extends __BaseException {
|
|
224
|
+
constructor(opts) {
|
|
225
|
+
super({
|
|
226
|
+
name: "MatchNotFoundException",
|
|
227
|
+
$fault: "client",
|
|
228
|
+
...opts
|
|
229
|
+
});
|
|
230
|
+
this.name = "MatchNotFoundException";
|
|
231
|
+
this.$fault = "client";
|
|
232
|
+
Object.setPrototypeOf(this, MatchNotFoundException.prototype);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WdaStreamServiceException as __BaseException } from "../models/WdaStreamServiceException";
|
|
2
|
-
import { ForbiddenException, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { ForbiddenException, MatchNotFoundException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { HttpRequest as __HttpRequest, } from "@smithy/protocol-http";
|
|
4
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, resolvedPath as __resolvedPath, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_ConsumeEventCommand = async (input, context) => {
|
|
6
6
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
7
|
const headers = {
|
|
@@ -43,6 +43,26 @@ export const se_DescribeEventCommand = async (input, context) => {
|
|
|
43
43
|
body,
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
|
+
export const se_GetConferenceIdCommand = async (input, context) => {
|
|
47
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
48
|
+
const headers = {};
|
|
49
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/stream/conferences/match/{channelId}";
|
|
50
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
51
|
+
const query = map({
|
|
52
|
+
"company": [, input.company],
|
|
53
|
+
});
|
|
54
|
+
let body;
|
|
55
|
+
return new __HttpRequest({
|
|
56
|
+
protocol,
|
|
57
|
+
hostname,
|
|
58
|
+
port,
|
|
59
|
+
method: "GET",
|
|
60
|
+
headers,
|
|
61
|
+
path: resolvedPath,
|
|
62
|
+
query,
|
|
63
|
+
body,
|
|
64
|
+
});
|
|
65
|
+
};
|
|
46
66
|
export const se_GetConversationsCommand = async (input, context) => {
|
|
47
67
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
48
68
|
const headers = {};
|
|
@@ -79,6 +99,9 @@ const de_ConsumeEventCommandError = async (output, context) => {
|
|
|
79
99
|
};
|
|
80
100
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
81
101
|
switch (errorCode) {
|
|
102
|
+
case "ForbiddenException":
|
|
103
|
+
case "smithy.framework#ForbiddenException":
|
|
104
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
82
105
|
case "ValidationException":
|
|
83
106
|
case "smithy.framework#ValidationException":
|
|
84
107
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -137,6 +160,45 @@ const de_DescribeEventCommandError = async (output, context) => {
|
|
|
137
160
|
});
|
|
138
161
|
}
|
|
139
162
|
};
|
|
163
|
+
export const de_GetConferenceIdCommand = async (output, context) => {
|
|
164
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
165
|
+
return de_GetConferenceIdCommandError(output, context);
|
|
166
|
+
}
|
|
167
|
+
const contents = map({
|
|
168
|
+
$metadata: deserializeMetadata(output),
|
|
169
|
+
});
|
|
170
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
171
|
+
const doc = take(data, {
|
|
172
|
+
'id': __expectString,
|
|
173
|
+
});
|
|
174
|
+
Object.assign(contents, doc);
|
|
175
|
+
return contents;
|
|
176
|
+
};
|
|
177
|
+
const de_GetConferenceIdCommandError = 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 "ForbiddenException":
|
|
185
|
+
case "smithy.framework#ForbiddenException":
|
|
186
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
187
|
+
case "MatchNotFoundException":
|
|
188
|
+
case "wildix.wda.stream#MatchNotFoundException":
|
|
189
|
+
throw await de_MatchNotFoundExceptionRes(parsedOutput, context);
|
|
190
|
+
case "ValidationException":
|
|
191
|
+
case "smithy.framework#ValidationException":
|
|
192
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
193
|
+
default:
|
|
194
|
+
const parsedBody = parsedOutput.body;
|
|
195
|
+
return throwDefaultError({
|
|
196
|
+
output,
|
|
197
|
+
parsedBody,
|
|
198
|
+
errorCode
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
};
|
|
140
202
|
export const de_GetConversationsCommand = async (output, context) => {
|
|
141
203
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
142
204
|
return de_GetConversationsCommandError(output, context);
|
|
@@ -202,6 +264,19 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
202
264
|
});
|
|
203
265
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
204
266
|
};
|
|
267
|
+
const de_MatchNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
268
|
+
const contents = map({});
|
|
269
|
+
const data = parsedOutput.body;
|
|
270
|
+
const doc = take(data, {
|
|
271
|
+
'message': __expectString,
|
|
272
|
+
});
|
|
273
|
+
Object.assign(contents, doc);
|
|
274
|
+
const exception = new MatchNotFoundException({
|
|
275
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
276
|
+
...contents
|
|
277
|
+
});
|
|
278
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
279
|
+
};
|
|
205
280
|
const deserializeMetadata = (output) => ({
|
|
206
281
|
httpStatusCode: output.statusCode,
|
|
207
282
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WdaStreamClient } from "./WdaStreamClient";
|
|
2
2
|
import { ConsumeEventCommandInput, ConsumeEventCommandOutput } from "./commands/ConsumeEventCommand";
|
|
3
3
|
import { DescribeEventCommandInput, DescribeEventCommandOutput } from "./commands/DescribeEventCommand";
|
|
4
|
+
import { GetConferenceIdCommandInput, GetConferenceIdCommandOutput } from "./commands/GetConferenceIdCommand";
|
|
4
5
|
import { GetConversationsCommandInput, GetConversationsCommandOutput } from "./commands/GetConversationsCommand";
|
|
5
6
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
6
7
|
export interface WdaStream {
|
|
@@ -16,6 +17,12 @@ export interface WdaStream {
|
|
|
16
17
|
describeEvent(args: DescribeEventCommandInput, options?: __HttpHandlerOptions): Promise<DescribeEventCommandOutput>;
|
|
17
18
|
describeEvent(args: DescribeEventCommandInput, cb: (err: any, data?: DescribeEventCommandOutput) => void): void;
|
|
18
19
|
describeEvent(args: DescribeEventCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeEventCommandOutput) => void): void;
|
|
20
|
+
/**
|
|
21
|
+
* @see {@link GetConferenceIdCommand}
|
|
22
|
+
*/
|
|
23
|
+
getConferenceId(args: GetConferenceIdCommandInput, options?: __HttpHandlerOptions): Promise<GetConferenceIdCommandOutput>;
|
|
24
|
+
getConferenceId(args: GetConferenceIdCommandInput, cb: (err: any, data?: GetConferenceIdCommandOutput) => void): void;
|
|
25
|
+
getConferenceId(args: GetConferenceIdCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetConferenceIdCommandOutput) => void): void;
|
|
19
26
|
/**
|
|
20
27
|
* @see {@link GetConversationsCommand}
|
|
21
28
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConsumeEventCommandInput, ConsumeEventCommandOutput } from "./commands/ConsumeEventCommand";
|
|
2
2
|
import { DescribeEventCommandInput, DescribeEventCommandOutput } from "./commands/DescribeEventCommand";
|
|
3
|
+
import { GetConferenceIdCommandInput, GetConferenceIdCommandOutput } from "./commands/GetConferenceIdCommand";
|
|
3
4
|
import { GetConversationsCommandInput, GetConversationsCommandOutput } from "./commands/GetConversationsCommand";
|
|
4
5
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
5
6
|
import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
@@ -10,11 +11,11 @@ export { __Client };
|
|
|
10
11
|
/**
|
|
11
12
|
* @public
|
|
12
13
|
*/
|
|
13
|
-
export type ServiceInputTypes = ConsumeEventCommandInput | DescribeEventCommandInput | GetConversationsCommandInput;
|
|
14
|
+
export type ServiceInputTypes = ConsumeEventCommandInput | DescribeEventCommandInput | GetConferenceIdCommandInput | GetConversationsCommandInput;
|
|
14
15
|
/**
|
|
15
16
|
* @public
|
|
16
17
|
*/
|
|
17
|
-
export type ServiceOutputTypes = ConsumeEventCommandOutput | DescribeEventCommandOutput | GetConversationsCommandOutput;
|
|
18
|
+
export type ServiceOutputTypes = ConsumeEventCommandOutput | DescribeEventCommandOutput | GetConferenceIdCommandOutput | GetConversationsCommandOutput;
|
|
18
19
|
/**
|
|
19
20
|
* @public
|
|
20
21
|
*/
|