@wildix/wda-stream-client 1.0.34 → 1.0.36
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/models/models_0.js +46 -17
- package/dist-cjs/protocols/Aws_restJson1.js +114 -0
- package/dist-es/models/models_0.js +43 -15
- package/dist-es/protocols/Aws_restJson1.js +116 -2
- package/dist-types/commands/DescribeEventCommand.d.ts +383 -26
- package/dist-types/models/models_0.d.ts +462 -36
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.PresenceNotAvailableException = exports.TelephonyStatus = exports.PresenceStatus = exports.MatchNotFoundException = exports.
|
|
3
|
+
exports.WebsocketTopic = exports.WebsocketAction = exports.ConsumeEventInputEvent = exports.SmsStatus = exports.SmsChannelType = exports.SmsConsumeEventType = exports.PresenceConsumeEventType = exports.ConferenceTranscriptionSentiment = exports.ConferenceEventType = exports.ConferenceConsumeEventType = exports.ConferenceConsumeDirection = exports.ChatEventType = exports.ChatConsumeEventType = exports.ChatTag = exports.ChatStatus = exports.ChatParticipantType = exports.ChatParticipantRole = exports.ChatDirection = exports.ChannelType = exports.CallFlowConsumeStatus = exports.CallEventType = exports.CallEndConsume = exports.CallFlowAttachmentConsumeType = exports.CallEndBy = exports.CallFlowStatus = exports.CallAnalyticsLiveProgressEventTrigger = exports.LiveEventType = exports.CallConsumeEventType = exports.InsightsQuality = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.PbxLicenseType = exports.ConferenceDirection = exports.CallTranscriptionSpeaker = exports.CallFlowTranscriptionStatus = exports.CallRecordPauseReason = exports.CallRecordOwner = exports.License = exports.CallDevice = exports.CallParticipantType = exports.CallParticipantRole = exports.CallFlowAttachmentType = exports.WhatsAppStatus = exports.WhatsAppEventType = exports.BadRequestException = exports.ForbiddenException = exports.ConversationStatus = exports.CallDirection = exports.ValidationException = void 0;
|
|
4
|
+
exports.PresenceNotAvailableException = exports.TelephonyStatus = exports.PresenceStatus = exports.MatchNotFoundException = exports.WebsocketEvent = exports.WebhookEventType = exports.PresenceEventType = exports.PresenceAnalyticsEventType = void 0;
|
|
5
5
|
const WdaStreamServiceException_1 = require("./WdaStreamServiceException");
|
|
6
6
|
class ValidationException extends WdaStreamServiceException_1.WdaStreamServiceException {
|
|
7
7
|
constructor(opts) {
|
|
@@ -16,6 +16,16 @@ class ValidationException extends WdaStreamServiceException_1.WdaStreamServiceEx
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.ValidationException = ValidationException;
|
|
19
|
+
exports.CallDirection = {
|
|
20
|
+
INBOUND: "INBOUND",
|
|
21
|
+
INTERNAL: "INTERNAL",
|
|
22
|
+
OUTBOUND: "OUTBOUND",
|
|
23
|
+
UNDEFINED: "UNDEFINED",
|
|
24
|
+
};
|
|
25
|
+
exports.ConversationStatus = {
|
|
26
|
+
COMPLETED: "COMPLETED",
|
|
27
|
+
MISSED: "MISSED",
|
|
28
|
+
};
|
|
19
29
|
class ForbiddenException extends WdaStreamServiceException_1.WdaStreamServiceException {
|
|
20
30
|
constructor(opts) {
|
|
21
31
|
super({
|
|
@@ -29,6 +39,19 @@ class ForbiddenException extends WdaStreamServiceException_1.WdaStreamServiceExc
|
|
|
29
39
|
}
|
|
30
40
|
}
|
|
31
41
|
exports.ForbiddenException = ForbiddenException;
|
|
42
|
+
class BadRequestException extends WdaStreamServiceException_1.WdaStreamServiceException {
|
|
43
|
+
constructor(opts) {
|
|
44
|
+
super({
|
|
45
|
+
name: "BadRequestException",
|
|
46
|
+
$fault: "client",
|
|
47
|
+
...opts
|
|
48
|
+
});
|
|
49
|
+
this.name = "BadRequestException";
|
|
50
|
+
this.$fault = "client";
|
|
51
|
+
Object.setPrototypeOf(this, BadRequestException.prototype);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.BadRequestException = BadRequestException;
|
|
32
55
|
exports.WhatsAppEventType = {
|
|
33
56
|
WHATSAPP_INBOUND: "WHATSAPP.INBOUND",
|
|
34
57
|
WHATSAPP_STATUS: "WHATSAPP.STATUS",
|
|
@@ -64,16 +87,6 @@ exports.CallDevice = {
|
|
|
64
87
|
XBEES_IOS: "XBEES_IOS",
|
|
65
88
|
XBEES_WEB: "XBEES_WEB",
|
|
66
89
|
};
|
|
67
|
-
exports.ConversationStatus = {
|
|
68
|
-
COMPLETED: "COMPLETED",
|
|
69
|
-
MISSED: "MISSED",
|
|
70
|
-
};
|
|
71
|
-
exports.CallDirection = {
|
|
72
|
-
INBOUND: "INBOUND",
|
|
73
|
-
INTERNAL: "INTERNAL",
|
|
74
|
-
OUTBOUND: "OUTBOUND",
|
|
75
|
-
UNDEFINED: "UNDEFINED",
|
|
76
|
-
};
|
|
77
90
|
exports.License = {
|
|
78
91
|
XBEES: "x-bees",
|
|
79
92
|
};
|
|
@@ -121,6 +134,10 @@ exports.ConferenceTranscriptionStatus = {
|
|
|
121
134
|
AVAILABLE: "AVAILABLE",
|
|
122
135
|
UNAVAILABLE: "UNAVAILABLE",
|
|
123
136
|
};
|
|
137
|
+
exports.InsightsQuality = {
|
|
138
|
+
MAX: "MAX",
|
|
139
|
+
RECOMMENDED: "RECOMMENDED",
|
|
140
|
+
};
|
|
124
141
|
exports.CallConsumeEventType = {
|
|
125
142
|
CALL_AGENTS_CANCEL: "CALL.AGENTS_CANCEL",
|
|
126
143
|
CALL_AGENTS_START: "CALL.AGENTS_START",
|
|
@@ -345,6 +362,16 @@ var ConsumeEventInputEvent;
|
|
|
345
362
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
346
363
|
};
|
|
347
364
|
})(ConsumeEventInputEvent = exports.ConsumeEventInputEvent || (exports.ConsumeEventInputEvent = {}));
|
|
365
|
+
exports.WebsocketAction = {
|
|
366
|
+
AUTHORIZE: "authorize",
|
|
367
|
+
SUBSCRIBE: "subscribe",
|
|
368
|
+
UNSUBSCRIBE: "unsubscribe",
|
|
369
|
+
};
|
|
370
|
+
exports.WebsocketTopic = {
|
|
371
|
+
CONVERSATIONS: "conversations",
|
|
372
|
+
PRESENCE: "presence",
|
|
373
|
+
TRANSCRIPTIONS: "transcriptions",
|
|
374
|
+
};
|
|
348
375
|
exports.PresenceAnalyticsEventType = {
|
|
349
376
|
PRESENCE: "PRESENCE",
|
|
350
377
|
PRESENCE_TELEPHONY: "PRESENCE_TELEPHONY",
|
|
@@ -360,6 +387,9 @@ exports.WebhookEventType = {
|
|
|
360
387
|
CALL_LIVE_INTERRUPTED: "call:live:interrupted",
|
|
361
388
|
CALL_LIVE_PROGRESS: "call:live:progress",
|
|
362
389
|
CALL_LIVE_TRANSCRIPTION: "call:live:transcription",
|
|
390
|
+
CALL_SUMMARY_COMPLETED: "call:summary:completed",
|
|
391
|
+
CALL_TRANSCRIPTION_COMPLETED: "call:transcription:completed",
|
|
392
|
+
CALL_TRANSCRIPTION_TEXT_COMPLETED: "call:transcription:text:completed",
|
|
363
393
|
CHAT_COMPLETED: "chat:completed",
|
|
364
394
|
CHAT_LIVE_COMPLETED: "chat:live:completed",
|
|
365
395
|
CHAT_LIVE_INTERRUPTED: "chat:live:interrupted",
|
|
@@ -373,6 +403,9 @@ exports.WebhookEventType = {
|
|
|
373
403
|
CONFERENCE_LIVE_LEAVE: "conference:live:leave",
|
|
374
404
|
CONFERENCE_LIVE_PROGRESS: "conference:live:progress",
|
|
375
405
|
CONFERENCE_LIVE_TRANSCRIPTION: "conference:live:transcription",
|
|
406
|
+
CONFERENCE_SUMMARY_COMPLETED: "conference:summary:completed",
|
|
407
|
+
CONFERENCE_TRANSCRIPTION_COMPLETED: "conference:transcription:completed",
|
|
408
|
+
CONFERENCE_TRANSCRIPTION_TEXT_COMPLETED: "conference:transcription:text:completed",
|
|
376
409
|
OLD_CALL_END: "call:end",
|
|
377
410
|
OLD_CALL_START: "call:start",
|
|
378
411
|
OLD_CALL_UPDATE: "call:update",
|
|
@@ -384,11 +417,7 @@ exports.WebsocketEvent = {
|
|
|
384
417
|
AUTHORIZED: "authorized",
|
|
385
418
|
BROADCAST: "broadcast",
|
|
386
419
|
SUBSCRIBED: "subscribed",
|
|
387
|
-
|
|
388
|
-
exports.WebsocketTopic = {
|
|
389
|
-
CONVERSATIONS: "conversations",
|
|
390
|
-
PRESENCE: "presence",
|
|
391
|
-
TRANSCRIPTIONS: "transcriptions",
|
|
420
|
+
UNSUBSCRIBE: "unsubscribed",
|
|
392
421
|
};
|
|
393
422
|
class MatchNotFoundException extends WdaStreamServiceException_1.WdaStreamServiceException {
|
|
394
423
|
constructor(opts) {
|
|
@@ -31,6 +31,9 @@ const se_DescribeEventCommand = async (input, context) => {
|
|
|
31
31
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
32
32
|
'SmsInboundEvent': _ => (0, smithy_client_1._json)(_),
|
|
33
33
|
'SmsStatusEvent': _ => (0, smithy_client_1._json)(_),
|
|
34
|
+
'WebsocketAuthorizeAction': _ => (0, smithy_client_1._json)(_),
|
|
35
|
+
'WebsocketSubscribeAction': _ => se_WebsocketSubscribeAction(_, context),
|
|
36
|
+
'WebsocketUnsubscribeAction': _ => se_WebsocketUnsubscribeAction(_, context),
|
|
34
37
|
'WhatsAppInboundEvent': _ => se_WhatsAppInboundEvent(_, context),
|
|
35
38
|
'WhatsAppStatusEvent': _ => se_WhatsAppStatusEvent(_, context),
|
|
36
39
|
}));
|
|
@@ -170,6 +173,9 @@ const de_DescribeEventCommand = async (output, context) => {
|
|
|
170
173
|
'WebhookCallLiveInterruptedEvent': smithy_client_1._json,
|
|
171
174
|
'WebhookCallLiveProgressEvent': smithy_client_1._json,
|
|
172
175
|
'WebhookCallLiveTranscriptionEvent': smithy_client_1._json,
|
|
176
|
+
'WebhookCallSummaryCompletedEvent': smithy_client_1._json,
|
|
177
|
+
'WebhookCallTranscriptionCompletedEvent': smithy_client_1._json,
|
|
178
|
+
'WebhookCallTranscriptionTextCompletedEvent': smithy_client_1._json,
|
|
173
179
|
'WebhookChatCompletedEvent': smithy_client_1._json,
|
|
174
180
|
'WebhookChatLiveCompletedEvent': smithy_client_1._json,
|
|
175
181
|
'WebhookChatLiveInterruptedEvent': smithy_client_1._json,
|
|
@@ -182,15 +188,24 @@ const de_DescribeEventCommand = async (output, context) => {
|
|
|
182
188
|
'WebhookConferenceLiveLeaveEvent': smithy_client_1._json,
|
|
183
189
|
'WebhookConferenceLiveProgressEvent': smithy_client_1._json,
|
|
184
190
|
'WebhookConferenceLiveTranscriptionEvent': smithy_client_1._json,
|
|
191
|
+
'WebhookConferenceSummaryCompletedEvent': smithy_client_1._json,
|
|
192
|
+
'WebhookConferenceTranscriptionCompletedEvent': smithy_client_1._json,
|
|
193
|
+
'WebhookConferenceTranscriptionTextCompletedEvent': smithy_client_1._json,
|
|
185
194
|
'WebhookOutdatedCallEndEvent': smithy_client_1._json,
|
|
186
195
|
'WebhookOutdatedCallStartEvent': smithy_client_1._json,
|
|
187
196
|
'WebhookOutdatedCallUpdateEvent': smithy_client_1._json,
|
|
188
197
|
'WebhookPresenceConferenceEvent': smithy_client_1._json,
|
|
189
198
|
'WebhookPresenceTelephonyEvent': smithy_client_1._json,
|
|
190
199
|
'WebhookPresenceUserEvent': smithy_client_1._json,
|
|
200
|
+
'WebsocketAuthorizeBadRequestException': smithy_client_1._json,
|
|
201
|
+
'WebsocketAuthorizedEvent': _ => de_WebsocketAuthorizedEvent(_, context),
|
|
191
202
|
'WebsocketConversationsBroadcastEvent': _ => de_WebsocketConversationsBroadcastEvent(_, context),
|
|
192
203
|
'WebsocketPresenceBroadcastEvent': _ => de_WebsocketPresenceBroadcastEvent(_, context),
|
|
204
|
+
'WebsocketSubscribeBadRequestException': _ => de_WebsocketSubscribeBadRequestException(_, context),
|
|
205
|
+
'WebsocketSubscribedEvent': _ => de_WebsocketSubscribedEvent(_, context),
|
|
193
206
|
'WebsocketTranscriptionsBroadcastEvent': _ => de_WebsocketTranscriptionsBroadcastEvent(_, context),
|
|
207
|
+
'WebsocketUnsubscribeBadRequestException': _ => de_WebsocketUnsubscribeBadRequestException(_, context),
|
|
208
|
+
'WebsocketUnsubscribedEvent': smithy_client_1._json,
|
|
194
209
|
});
|
|
195
210
|
Object.assign(contents, doc);
|
|
196
211
|
return contents;
|
|
@@ -282,6 +297,9 @@ const de_CommandError = async (output, context) => {
|
|
|
282
297
|
case "ValidationException":
|
|
283
298
|
case "smithy.framework#ValidationException":
|
|
284
299
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
300
|
+
case "BadRequestException":
|
|
301
|
+
case "smithy.framework#BadRequestException":
|
|
302
|
+
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
285
303
|
case "MatchNotFoundException":
|
|
286
304
|
case "wildix.wda.stream#MatchNotFoundException":
|
|
287
305
|
throw await de_MatchNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -298,6 +316,19 @@ const de_CommandError = async (output, context) => {
|
|
|
298
316
|
}
|
|
299
317
|
};
|
|
300
318
|
const throwDefaultError = (0, smithy_client_1.withBaseException)(WdaStreamServiceException_1.WdaStreamServiceException);
|
|
319
|
+
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
320
|
+
const contents = (0, smithy_client_1.map)({});
|
|
321
|
+
const data = parsedOutput.body;
|
|
322
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
323
|
+
'message': smithy_client_1.expectString,
|
|
324
|
+
});
|
|
325
|
+
Object.assign(contents, doc);
|
|
326
|
+
const exception = new models_0_1.BadRequestException({
|
|
327
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
328
|
+
...contents
|
|
329
|
+
});
|
|
330
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
331
|
+
};
|
|
301
332
|
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
302
333
|
const contents = (0, smithy_client_1.map)({});
|
|
303
334
|
const data = parsedOutput.body;
|
|
@@ -350,6 +381,9 @@ const de_PresenceNotAvailableExceptionRes = async (parsedOutput, context) => {
|
|
|
350
381
|
});
|
|
351
382
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
352
383
|
};
|
|
384
|
+
const se_Document = (input, context) => {
|
|
385
|
+
return input;
|
|
386
|
+
};
|
|
353
387
|
const se_ConsumeEventInputEvent = (input, context) => {
|
|
354
388
|
return models_0_1.ConsumeEventInputEvent.visit(input, {
|
|
355
389
|
callAgentsCancel: value => ({ "callAgentsCancel": (0, smithy_client_1._json)(value) }),
|
|
@@ -383,6 +417,27 @@ const se_ConsumeEventInputEvent = (input, context) => {
|
|
|
383
417
|
_: (name, value) => ({ name: value })
|
|
384
418
|
});
|
|
385
419
|
};
|
|
420
|
+
const se_WebsocketSubscribeAction = (input, context) => {
|
|
421
|
+
return (0, smithy_client_1.take)(input, {
|
|
422
|
+
'action': [],
|
|
423
|
+
'filter': _ => se_WebsocketSubscribeFilter(_, context),
|
|
424
|
+
'state': [],
|
|
425
|
+
'topic': [],
|
|
426
|
+
'version': [],
|
|
427
|
+
});
|
|
428
|
+
};
|
|
429
|
+
const se_WebsocketSubscribeFilter = (input, context) => {
|
|
430
|
+
return input.filter((e) => e != null).map(entry => {
|
|
431
|
+
return se_Document(entry, context);
|
|
432
|
+
});
|
|
433
|
+
};
|
|
434
|
+
const se_WebsocketUnsubscribeAction = (input, context) => {
|
|
435
|
+
return (0, smithy_client_1.take)(input, {
|
|
436
|
+
'action': [],
|
|
437
|
+
'filter': _ => se_WebsocketSubscribeFilter(_, context),
|
|
438
|
+
'topic': [],
|
|
439
|
+
});
|
|
440
|
+
};
|
|
386
441
|
const se_WhatsAppInboundConsumeEvent = (input, context) => {
|
|
387
442
|
return (0, smithy_client_1.take)(input, {
|
|
388
443
|
'company': [],
|
|
@@ -435,6 +490,14 @@ const de_CallAnalyticsCostRecordEvent = (output, context) => {
|
|
|
435
490
|
'type': smithy_client_1.expectString,
|
|
436
491
|
});
|
|
437
492
|
};
|
|
493
|
+
const de_WebsocketAuthorizedEvent = (output, context) => {
|
|
494
|
+
return (0, smithy_client_1.take)(output, {
|
|
495
|
+
'connectionId': smithy_client_1.expectString,
|
|
496
|
+
'duration': (_) => de_Document(_, context),
|
|
497
|
+
'event': smithy_client_1.expectString,
|
|
498
|
+
'requestId': smithy_client_1.expectString,
|
|
499
|
+
});
|
|
500
|
+
};
|
|
438
501
|
const de_WebsocketConversationsBroadcastEvent = (output, context) => {
|
|
439
502
|
return (0, smithy_client_1.take)(output, {
|
|
440
503
|
'data': (_) => de_Document(_, context),
|
|
@@ -452,6 +515,40 @@ const de_WebsocketPresenceBroadcastEvent = (output, context) => {
|
|
|
452
515
|
'topic': smithy_client_1.expectString,
|
|
453
516
|
});
|
|
454
517
|
};
|
|
518
|
+
const de_WebsocketSubscribeAction = (output, context) => {
|
|
519
|
+
return (0, smithy_client_1.take)(output, {
|
|
520
|
+
'action': smithy_client_1.expectString,
|
|
521
|
+
'filter': (_) => de_WebsocketSubscribeFilter(_, context),
|
|
522
|
+
'state': smithy_client_1.expectBoolean,
|
|
523
|
+
'topic': smithy_client_1.expectString,
|
|
524
|
+
'version': smithy_client_1.expectString,
|
|
525
|
+
});
|
|
526
|
+
};
|
|
527
|
+
const de_WebsocketSubscribeBadRequestException = (output, context) => {
|
|
528
|
+
return (0, smithy_client_1.take)(output, {
|
|
529
|
+
'code': smithy_client_1.expectInt32,
|
|
530
|
+
'connectionId': smithy_client_1.expectString,
|
|
531
|
+
'event': smithy_client_1.expectString,
|
|
532
|
+
'message': smithy_client_1.expectString,
|
|
533
|
+
'requestId': smithy_client_1.expectString,
|
|
534
|
+
'source': (_) => de_WebsocketSubscribeAction(_, context),
|
|
535
|
+
});
|
|
536
|
+
};
|
|
537
|
+
const de_WebsocketSubscribedEvent = (output, context) => {
|
|
538
|
+
return (0, smithy_client_1.take)(output, {
|
|
539
|
+
'connectionId': smithy_client_1.expectString,
|
|
540
|
+
'duration': (_) => de_Document(_, context),
|
|
541
|
+
'event': smithy_client_1.expectString,
|
|
542
|
+
'requestId': smithy_client_1.expectString,
|
|
543
|
+
'topic': smithy_client_1.expectString,
|
|
544
|
+
});
|
|
545
|
+
};
|
|
546
|
+
const de_WebsocketSubscribeFilter = (output, context) => {
|
|
547
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
548
|
+
return de_Document(entry, context);
|
|
549
|
+
});
|
|
550
|
+
return retVal;
|
|
551
|
+
};
|
|
455
552
|
const de_WebsocketTranscriptionsBroadcastEvent = (output, context) => {
|
|
456
553
|
return (0, smithy_client_1.take)(output, {
|
|
457
554
|
'data': (_) => de_Document(_, context),
|
|
@@ -460,6 +557,23 @@ const de_WebsocketTranscriptionsBroadcastEvent = (output, context) => {
|
|
|
460
557
|
'topic': smithy_client_1.expectString,
|
|
461
558
|
});
|
|
462
559
|
};
|
|
560
|
+
const de_WebsocketUnsubscribeAction = (output, context) => {
|
|
561
|
+
return (0, smithy_client_1.take)(output, {
|
|
562
|
+
'action': smithy_client_1.expectString,
|
|
563
|
+
'filter': (_) => de_WebsocketSubscribeFilter(_, context),
|
|
564
|
+
'topic': smithy_client_1.expectString,
|
|
565
|
+
});
|
|
566
|
+
};
|
|
567
|
+
const de_WebsocketUnsubscribeBadRequestException = (output, context) => {
|
|
568
|
+
return (0, smithy_client_1.take)(output, {
|
|
569
|
+
'code': smithy_client_1.expectInt32,
|
|
570
|
+
'connectionId': smithy_client_1.expectString,
|
|
571
|
+
'event': smithy_client_1.expectString,
|
|
572
|
+
'message': smithy_client_1.expectString,
|
|
573
|
+
'requestId': smithy_client_1.expectString,
|
|
574
|
+
'source': (_) => de_WebsocketUnsubscribeAction(_, context),
|
|
575
|
+
});
|
|
576
|
+
};
|
|
463
577
|
const deserializeMetadata = (output) => ({
|
|
464
578
|
httpStatusCode: output.statusCode,
|
|
465
579
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -11,6 +11,16 @@ export class ValidationException extends __BaseException {
|
|
|
11
11
|
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
export const CallDirection = {
|
|
15
|
+
INBOUND: "INBOUND",
|
|
16
|
+
INTERNAL: "INTERNAL",
|
|
17
|
+
OUTBOUND: "OUTBOUND",
|
|
18
|
+
UNDEFINED: "UNDEFINED",
|
|
19
|
+
};
|
|
20
|
+
export const ConversationStatus = {
|
|
21
|
+
COMPLETED: "COMPLETED",
|
|
22
|
+
MISSED: "MISSED",
|
|
23
|
+
};
|
|
14
24
|
export class ForbiddenException extends __BaseException {
|
|
15
25
|
constructor(opts) {
|
|
16
26
|
super({
|
|
@@ -23,6 +33,18 @@ export class ForbiddenException extends __BaseException {
|
|
|
23
33
|
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
24
34
|
}
|
|
25
35
|
}
|
|
36
|
+
export class BadRequestException extends __BaseException {
|
|
37
|
+
constructor(opts) {
|
|
38
|
+
super({
|
|
39
|
+
name: "BadRequestException",
|
|
40
|
+
$fault: "client",
|
|
41
|
+
...opts
|
|
42
|
+
});
|
|
43
|
+
this.name = "BadRequestException";
|
|
44
|
+
this.$fault = "client";
|
|
45
|
+
Object.setPrototypeOf(this, BadRequestException.prototype);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
26
48
|
export const WhatsAppEventType = {
|
|
27
49
|
WHATSAPP_INBOUND: "WHATSAPP.INBOUND",
|
|
28
50
|
WHATSAPP_STATUS: "WHATSAPP.STATUS",
|
|
@@ -58,16 +80,6 @@ export const CallDevice = {
|
|
|
58
80
|
XBEES_IOS: "XBEES_IOS",
|
|
59
81
|
XBEES_WEB: "XBEES_WEB",
|
|
60
82
|
};
|
|
61
|
-
export const ConversationStatus = {
|
|
62
|
-
COMPLETED: "COMPLETED",
|
|
63
|
-
MISSED: "MISSED",
|
|
64
|
-
};
|
|
65
|
-
export const CallDirection = {
|
|
66
|
-
INBOUND: "INBOUND",
|
|
67
|
-
INTERNAL: "INTERNAL",
|
|
68
|
-
OUTBOUND: "OUTBOUND",
|
|
69
|
-
UNDEFINED: "UNDEFINED",
|
|
70
|
-
};
|
|
71
83
|
export const License = {
|
|
72
84
|
XBEES: "x-bees",
|
|
73
85
|
};
|
|
@@ -115,6 +127,10 @@ export const ConferenceTranscriptionStatus = {
|
|
|
115
127
|
AVAILABLE: "AVAILABLE",
|
|
116
128
|
UNAVAILABLE: "UNAVAILABLE",
|
|
117
129
|
};
|
|
130
|
+
export const InsightsQuality = {
|
|
131
|
+
MAX: "MAX",
|
|
132
|
+
RECOMMENDED: "RECOMMENDED",
|
|
133
|
+
};
|
|
118
134
|
export const CallConsumeEventType = {
|
|
119
135
|
CALL_AGENTS_CANCEL: "CALL.AGENTS_CANCEL",
|
|
120
136
|
CALL_AGENTS_START: "CALL.AGENTS_START",
|
|
@@ -339,6 +355,16 @@ export var ConsumeEventInputEvent;
|
|
|
339
355
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
340
356
|
};
|
|
341
357
|
})(ConsumeEventInputEvent || (ConsumeEventInputEvent = {}));
|
|
358
|
+
export const WebsocketAction = {
|
|
359
|
+
AUTHORIZE: "authorize",
|
|
360
|
+
SUBSCRIBE: "subscribe",
|
|
361
|
+
UNSUBSCRIBE: "unsubscribe",
|
|
362
|
+
};
|
|
363
|
+
export const WebsocketTopic = {
|
|
364
|
+
CONVERSATIONS: "conversations",
|
|
365
|
+
PRESENCE: "presence",
|
|
366
|
+
TRANSCRIPTIONS: "transcriptions",
|
|
367
|
+
};
|
|
342
368
|
export const PresenceAnalyticsEventType = {
|
|
343
369
|
PRESENCE: "PRESENCE",
|
|
344
370
|
PRESENCE_TELEPHONY: "PRESENCE_TELEPHONY",
|
|
@@ -354,6 +380,9 @@ export const WebhookEventType = {
|
|
|
354
380
|
CALL_LIVE_INTERRUPTED: "call:live:interrupted",
|
|
355
381
|
CALL_LIVE_PROGRESS: "call:live:progress",
|
|
356
382
|
CALL_LIVE_TRANSCRIPTION: "call:live:transcription",
|
|
383
|
+
CALL_SUMMARY_COMPLETED: "call:summary:completed",
|
|
384
|
+
CALL_TRANSCRIPTION_COMPLETED: "call:transcription:completed",
|
|
385
|
+
CALL_TRANSCRIPTION_TEXT_COMPLETED: "call:transcription:text:completed",
|
|
357
386
|
CHAT_COMPLETED: "chat:completed",
|
|
358
387
|
CHAT_LIVE_COMPLETED: "chat:live:completed",
|
|
359
388
|
CHAT_LIVE_INTERRUPTED: "chat:live:interrupted",
|
|
@@ -367,6 +396,9 @@ export const WebhookEventType = {
|
|
|
367
396
|
CONFERENCE_LIVE_LEAVE: "conference:live:leave",
|
|
368
397
|
CONFERENCE_LIVE_PROGRESS: "conference:live:progress",
|
|
369
398
|
CONFERENCE_LIVE_TRANSCRIPTION: "conference:live:transcription",
|
|
399
|
+
CONFERENCE_SUMMARY_COMPLETED: "conference:summary:completed",
|
|
400
|
+
CONFERENCE_TRANSCRIPTION_COMPLETED: "conference:transcription:completed",
|
|
401
|
+
CONFERENCE_TRANSCRIPTION_TEXT_COMPLETED: "conference:transcription:text:completed",
|
|
370
402
|
OLD_CALL_END: "call:end",
|
|
371
403
|
OLD_CALL_START: "call:start",
|
|
372
404
|
OLD_CALL_UPDATE: "call:update",
|
|
@@ -378,11 +410,7 @@ export const WebsocketEvent = {
|
|
|
378
410
|
AUTHORIZED: "authorized",
|
|
379
411
|
BROADCAST: "broadcast",
|
|
380
412
|
SUBSCRIBED: "subscribed",
|
|
381
|
-
|
|
382
|
-
export const WebsocketTopic = {
|
|
383
|
-
CONVERSATIONS: "conversations",
|
|
384
|
-
PRESENCE: "presence",
|
|
385
|
-
TRANSCRIPTIONS: "transcriptions",
|
|
413
|
+
UNSUBSCRIBE: "unsubscribed",
|
|
386
414
|
};
|
|
387
415
|
export class MatchNotFoundException extends __BaseException {
|
|
388
416
|
constructor(opts) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WdaStreamServiceException as __BaseException } from "../models/WdaStreamServiceException";
|
|
2
|
-
import { ConsumeEventInputEvent, ForbiddenException, MatchNotFoundException, PresenceNotAvailableException, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { BadRequestException, ConsumeEventInputEvent, ForbiddenException, MatchNotFoundException, PresenceNotAvailableException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { requestBuilder as rb } from "@smithy/core";
|
|
4
|
-
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
+
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_ConsumeEventCommand = async (input, context) => {
|
|
6
6
|
const b = rb(input, context);
|
|
7
7
|
const headers = {
|
|
@@ -27,6 +27,9 @@ export const se_DescribeEventCommand = async (input, context) => {
|
|
|
27
27
|
body = JSON.stringify(take(input, {
|
|
28
28
|
'SmsInboundEvent': _ => _json(_),
|
|
29
29
|
'SmsStatusEvent': _ => _json(_),
|
|
30
|
+
'WebsocketAuthorizeAction': _ => _json(_),
|
|
31
|
+
'WebsocketSubscribeAction': _ => se_WebsocketSubscribeAction(_, context),
|
|
32
|
+
'WebsocketUnsubscribeAction': _ => se_WebsocketUnsubscribeAction(_, context),
|
|
30
33
|
'WhatsAppInboundEvent': _ => se_WhatsAppInboundEvent(_, context),
|
|
31
34
|
'WhatsAppStatusEvent': _ => se_WhatsAppStatusEvent(_, context),
|
|
32
35
|
}));
|
|
@@ -159,6 +162,9 @@ export const de_DescribeEventCommand = async (output, context) => {
|
|
|
159
162
|
'WebhookCallLiveInterruptedEvent': _json,
|
|
160
163
|
'WebhookCallLiveProgressEvent': _json,
|
|
161
164
|
'WebhookCallLiveTranscriptionEvent': _json,
|
|
165
|
+
'WebhookCallSummaryCompletedEvent': _json,
|
|
166
|
+
'WebhookCallTranscriptionCompletedEvent': _json,
|
|
167
|
+
'WebhookCallTranscriptionTextCompletedEvent': _json,
|
|
162
168
|
'WebhookChatCompletedEvent': _json,
|
|
163
169
|
'WebhookChatLiveCompletedEvent': _json,
|
|
164
170
|
'WebhookChatLiveInterruptedEvent': _json,
|
|
@@ -171,15 +177,24 @@ export const de_DescribeEventCommand = async (output, context) => {
|
|
|
171
177
|
'WebhookConferenceLiveLeaveEvent': _json,
|
|
172
178
|
'WebhookConferenceLiveProgressEvent': _json,
|
|
173
179
|
'WebhookConferenceLiveTranscriptionEvent': _json,
|
|
180
|
+
'WebhookConferenceSummaryCompletedEvent': _json,
|
|
181
|
+
'WebhookConferenceTranscriptionCompletedEvent': _json,
|
|
182
|
+
'WebhookConferenceTranscriptionTextCompletedEvent': _json,
|
|
174
183
|
'WebhookOutdatedCallEndEvent': _json,
|
|
175
184
|
'WebhookOutdatedCallStartEvent': _json,
|
|
176
185
|
'WebhookOutdatedCallUpdateEvent': _json,
|
|
177
186
|
'WebhookPresenceConferenceEvent': _json,
|
|
178
187
|
'WebhookPresenceTelephonyEvent': _json,
|
|
179
188
|
'WebhookPresenceUserEvent': _json,
|
|
189
|
+
'WebsocketAuthorizeBadRequestException': _json,
|
|
190
|
+
'WebsocketAuthorizedEvent': _ => de_WebsocketAuthorizedEvent(_, context),
|
|
180
191
|
'WebsocketConversationsBroadcastEvent': _ => de_WebsocketConversationsBroadcastEvent(_, context),
|
|
181
192
|
'WebsocketPresenceBroadcastEvent': _ => de_WebsocketPresenceBroadcastEvent(_, context),
|
|
193
|
+
'WebsocketSubscribeBadRequestException': _ => de_WebsocketSubscribeBadRequestException(_, context),
|
|
194
|
+
'WebsocketSubscribedEvent': _ => de_WebsocketSubscribedEvent(_, context),
|
|
182
195
|
'WebsocketTranscriptionsBroadcastEvent': _ => de_WebsocketTranscriptionsBroadcastEvent(_, context),
|
|
196
|
+
'WebsocketUnsubscribeBadRequestException': _ => de_WebsocketUnsubscribeBadRequestException(_, context),
|
|
197
|
+
'WebsocketUnsubscribedEvent': _json,
|
|
183
198
|
});
|
|
184
199
|
Object.assign(contents, doc);
|
|
185
200
|
return contents;
|
|
@@ -265,6 +280,9 @@ const de_CommandError = async (output, context) => {
|
|
|
265
280
|
case "ValidationException":
|
|
266
281
|
case "smithy.framework#ValidationException":
|
|
267
282
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
283
|
+
case "BadRequestException":
|
|
284
|
+
case "smithy.framework#BadRequestException":
|
|
285
|
+
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
268
286
|
case "MatchNotFoundException":
|
|
269
287
|
case "wildix.wda.stream#MatchNotFoundException":
|
|
270
288
|
throw await de_MatchNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -281,6 +299,19 @@ const de_CommandError = async (output, context) => {
|
|
|
281
299
|
}
|
|
282
300
|
};
|
|
283
301
|
const throwDefaultError = withBaseException(__BaseException);
|
|
302
|
+
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
303
|
+
const contents = map({});
|
|
304
|
+
const data = parsedOutput.body;
|
|
305
|
+
const doc = take(data, {
|
|
306
|
+
'message': __expectString,
|
|
307
|
+
});
|
|
308
|
+
Object.assign(contents, doc);
|
|
309
|
+
const exception = new BadRequestException({
|
|
310
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
311
|
+
...contents
|
|
312
|
+
});
|
|
313
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
314
|
+
};
|
|
284
315
|
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
285
316
|
const contents = map({});
|
|
286
317
|
const data = parsedOutput.body;
|
|
@@ -333,6 +364,9 @@ const de_PresenceNotAvailableExceptionRes = async (parsedOutput, context) => {
|
|
|
333
364
|
});
|
|
334
365
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
335
366
|
};
|
|
367
|
+
const se_Document = (input, context) => {
|
|
368
|
+
return input;
|
|
369
|
+
};
|
|
336
370
|
const se_ConsumeEventInputEvent = (input, context) => {
|
|
337
371
|
return ConsumeEventInputEvent.visit(input, {
|
|
338
372
|
callAgentsCancel: value => ({ "callAgentsCancel": _json(value) }),
|
|
@@ -366,6 +400,27 @@ const se_ConsumeEventInputEvent = (input, context) => {
|
|
|
366
400
|
_: (name, value) => ({ name: value })
|
|
367
401
|
});
|
|
368
402
|
};
|
|
403
|
+
const se_WebsocketSubscribeAction = (input, context) => {
|
|
404
|
+
return take(input, {
|
|
405
|
+
'action': [],
|
|
406
|
+
'filter': _ => se_WebsocketSubscribeFilter(_, context),
|
|
407
|
+
'state': [],
|
|
408
|
+
'topic': [],
|
|
409
|
+
'version': [],
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
const se_WebsocketSubscribeFilter = (input, context) => {
|
|
413
|
+
return input.filter((e) => e != null).map(entry => {
|
|
414
|
+
return se_Document(entry, context);
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
const se_WebsocketUnsubscribeAction = (input, context) => {
|
|
418
|
+
return take(input, {
|
|
419
|
+
'action': [],
|
|
420
|
+
'filter': _ => se_WebsocketSubscribeFilter(_, context),
|
|
421
|
+
'topic': [],
|
|
422
|
+
});
|
|
423
|
+
};
|
|
369
424
|
const se_WhatsAppInboundConsumeEvent = (input, context) => {
|
|
370
425
|
return take(input, {
|
|
371
426
|
'company': [],
|
|
@@ -418,6 +473,14 @@ const de_CallAnalyticsCostRecordEvent = (output, context) => {
|
|
|
418
473
|
'type': __expectString,
|
|
419
474
|
});
|
|
420
475
|
};
|
|
476
|
+
const de_WebsocketAuthorizedEvent = (output, context) => {
|
|
477
|
+
return take(output, {
|
|
478
|
+
'connectionId': __expectString,
|
|
479
|
+
'duration': (_) => de_Document(_, context),
|
|
480
|
+
'event': __expectString,
|
|
481
|
+
'requestId': __expectString,
|
|
482
|
+
});
|
|
483
|
+
};
|
|
421
484
|
const de_WebsocketConversationsBroadcastEvent = (output, context) => {
|
|
422
485
|
return take(output, {
|
|
423
486
|
'data': (_) => de_Document(_, context),
|
|
@@ -435,6 +498,40 @@ const de_WebsocketPresenceBroadcastEvent = (output, context) => {
|
|
|
435
498
|
'topic': __expectString,
|
|
436
499
|
});
|
|
437
500
|
};
|
|
501
|
+
const de_WebsocketSubscribeAction = (output, context) => {
|
|
502
|
+
return take(output, {
|
|
503
|
+
'action': __expectString,
|
|
504
|
+
'filter': (_) => de_WebsocketSubscribeFilter(_, context),
|
|
505
|
+
'state': __expectBoolean,
|
|
506
|
+
'topic': __expectString,
|
|
507
|
+
'version': __expectString,
|
|
508
|
+
});
|
|
509
|
+
};
|
|
510
|
+
const de_WebsocketSubscribeBadRequestException = (output, context) => {
|
|
511
|
+
return take(output, {
|
|
512
|
+
'code': __expectInt32,
|
|
513
|
+
'connectionId': __expectString,
|
|
514
|
+
'event': __expectString,
|
|
515
|
+
'message': __expectString,
|
|
516
|
+
'requestId': __expectString,
|
|
517
|
+
'source': (_) => de_WebsocketSubscribeAction(_, context),
|
|
518
|
+
});
|
|
519
|
+
};
|
|
520
|
+
const de_WebsocketSubscribedEvent = (output, context) => {
|
|
521
|
+
return take(output, {
|
|
522
|
+
'connectionId': __expectString,
|
|
523
|
+
'duration': (_) => de_Document(_, context),
|
|
524
|
+
'event': __expectString,
|
|
525
|
+
'requestId': __expectString,
|
|
526
|
+
'topic': __expectString,
|
|
527
|
+
});
|
|
528
|
+
};
|
|
529
|
+
const de_WebsocketSubscribeFilter = (output, context) => {
|
|
530
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
531
|
+
return de_Document(entry, context);
|
|
532
|
+
});
|
|
533
|
+
return retVal;
|
|
534
|
+
};
|
|
438
535
|
const de_WebsocketTranscriptionsBroadcastEvent = (output, context) => {
|
|
439
536
|
return take(output, {
|
|
440
537
|
'data': (_) => de_Document(_, context),
|
|
@@ -443,6 +540,23 @@ const de_WebsocketTranscriptionsBroadcastEvent = (output, context) => {
|
|
|
443
540
|
'topic': __expectString,
|
|
444
541
|
});
|
|
445
542
|
};
|
|
543
|
+
const de_WebsocketUnsubscribeAction = (output, context) => {
|
|
544
|
+
return take(output, {
|
|
545
|
+
'action': __expectString,
|
|
546
|
+
'filter': (_) => de_WebsocketSubscribeFilter(_, context),
|
|
547
|
+
'topic': __expectString,
|
|
548
|
+
});
|
|
549
|
+
};
|
|
550
|
+
const de_WebsocketUnsubscribeBadRequestException = (output, context) => {
|
|
551
|
+
return take(output, {
|
|
552
|
+
'code': __expectInt32,
|
|
553
|
+
'connectionId': __expectString,
|
|
554
|
+
'event': __expectString,
|
|
555
|
+
'message': __expectString,
|
|
556
|
+
'requestId': __expectString,
|
|
557
|
+
'source': (_) => de_WebsocketUnsubscribeAction(_, context),
|
|
558
|
+
});
|
|
559
|
+
};
|
|
446
560
|
const deserializeMetadata = (output) => ({
|
|
447
561
|
httpStatusCode: output.statusCode,
|
|
448
562
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|