@wildix/wda-stream-client 1.0.34 → 1.0.35
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 +36 -17
- package/dist-cjs/protocols/Aws_restJson1.js +108 -0
- package/dist-es/models/models_0.js +33 -15
- package/dist-es/protocols/Aws_restJson1.js +110 -2
- package/dist-types/commands/DescribeEventCommand.d.ts +87 -3
- package/dist-types/models/models_0.d.ts +158 -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.PresenceAnalyticsEventType = 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.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 = 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
|
};
|
|
@@ -345,6 +358,16 @@ var ConsumeEventInputEvent;
|
|
|
345
358
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
346
359
|
};
|
|
347
360
|
})(ConsumeEventInputEvent = exports.ConsumeEventInputEvent || (exports.ConsumeEventInputEvent = {}));
|
|
361
|
+
exports.WebsocketAction = {
|
|
362
|
+
AUTHORIZE: "authorize",
|
|
363
|
+
SUBSCRIBE: "subscribe",
|
|
364
|
+
UNSUBSCRIBE: "unsubscribe",
|
|
365
|
+
};
|
|
366
|
+
exports.WebsocketTopic = {
|
|
367
|
+
CONVERSATIONS: "conversations",
|
|
368
|
+
PRESENCE: "presence",
|
|
369
|
+
TRANSCRIPTIONS: "transcriptions",
|
|
370
|
+
};
|
|
348
371
|
exports.PresenceAnalyticsEventType = {
|
|
349
372
|
PRESENCE: "PRESENCE",
|
|
350
373
|
PRESENCE_TELEPHONY: "PRESENCE_TELEPHONY",
|
|
@@ -384,11 +407,7 @@ exports.WebsocketEvent = {
|
|
|
384
407
|
AUTHORIZED: "authorized",
|
|
385
408
|
BROADCAST: "broadcast",
|
|
386
409
|
SUBSCRIBED: "subscribed",
|
|
387
|
-
|
|
388
|
-
exports.WebsocketTopic = {
|
|
389
|
-
CONVERSATIONS: "conversations",
|
|
390
|
-
PRESENCE: "presence",
|
|
391
|
-
TRANSCRIPTIONS: "transcriptions",
|
|
410
|
+
UNSUBSCRIBE: "unsubscribed",
|
|
392
411
|
};
|
|
393
412
|
class MatchNotFoundException extends WdaStreamServiceException_1.WdaStreamServiceException {
|
|
394
413
|
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
|
}));
|
|
@@ -188,9 +191,15 @@ const de_DescribeEventCommand = async (output, context) => {
|
|
|
188
191
|
'WebhookPresenceConferenceEvent': smithy_client_1._json,
|
|
189
192
|
'WebhookPresenceTelephonyEvent': smithy_client_1._json,
|
|
190
193
|
'WebhookPresenceUserEvent': smithy_client_1._json,
|
|
194
|
+
'WebsocketAuthorizeBadRequestException': smithy_client_1._json,
|
|
195
|
+
'WebsocketAuthorizedEvent': _ => de_WebsocketAuthorizedEvent(_, context),
|
|
191
196
|
'WebsocketConversationsBroadcastEvent': _ => de_WebsocketConversationsBroadcastEvent(_, context),
|
|
192
197
|
'WebsocketPresenceBroadcastEvent': _ => de_WebsocketPresenceBroadcastEvent(_, context),
|
|
198
|
+
'WebsocketSubscribeBadRequestException': _ => de_WebsocketSubscribeBadRequestException(_, context),
|
|
199
|
+
'WebsocketSubscribedEvent': _ => de_WebsocketSubscribedEvent(_, context),
|
|
193
200
|
'WebsocketTranscriptionsBroadcastEvent': _ => de_WebsocketTranscriptionsBroadcastEvent(_, context),
|
|
201
|
+
'WebsocketUnsubscribeBadRequestException': _ => de_WebsocketUnsubscribeBadRequestException(_, context),
|
|
202
|
+
'WebsocketUnsubscribedEvent': smithy_client_1._json,
|
|
194
203
|
});
|
|
195
204
|
Object.assign(contents, doc);
|
|
196
205
|
return contents;
|
|
@@ -282,6 +291,9 @@ const de_CommandError = async (output, context) => {
|
|
|
282
291
|
case "ValidationException":
|
|
283
292
|
case "smithy.framework#ValidationException":
|
|
284
293
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
294
|
+
case "BadRequestException":
|
|
295
|
+
case "smithy.framework#BadRequestException":
|
|
296
|
+
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
285
297
|
case "MatchNotFoundException":
|
|
286
298
|
case "wildix.wda.stream#MatchNotFoundException":
|
|
287
299
|
throw await de_MatchNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -298,6 +310,19 @@ const de_CommandError = async (output, context) => {
|
|
|
298
310
|
}
|
|
299
311
|
};
|
|
300
312
|
const throwDefaultError = (0, smithy_client_1.withBaseException)(WdaStreamServiceException_1.WdaStreamServiceException);
|
|
313
|
+
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
314
|
+
const contents = (0, smithy_client_1.map)({});
|
|
315
|
+
const data = parsedOutput.body;
|
|
316
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
317
|
+
'message': smithy_client_1.expectString,
|
|
318
|
+
});
|
|
319
|
+
Object.assign(contents, doc);
|
|
320
|
+
const exception = new models_0_1.BadRequestException({
|
|
321
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
322
|
+
...contents
|
|
323
|
+
});
|
|
324
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
325
|
+
};
|
|
301
326
|
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
302
327
|
const contents = (0, smithy_client_1.map)({});
|
|
303
328
|
const data = parsedOutput.body;
|
|
@@ -350,6 +375,9 @@ const de_PresenceNotAvailableExceptionRes = async (parsedOutput, context) => {
|
|
|
350
375
|
});
|
|
351
376
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
352
377
|
};
|
|
378
|
+
const se_Document = (input, context) => {
|
|
379
|
+
return input;
|
|
380
|
+
};
|
|
353
381
|
const se_ConsumeEventInputEvent = (input, context) => {
|
|
354
382
|
return models_0_1.ConsumeEventInputEvent.visit(input, {
|
|
355
383
|
callAgentsCancel: value => ({ "callAgentsCancel": (0, smithy_client_1._json)(value) }),
|
|
@@ -383,6 +411,27 @@ const se_ConsumeEventInputEvent = (input, context) => {
|
|
|
383
411
|
_: (name, value) => ({ name: value })
|
|
384
412
|
});
|
|
385
413
|
};
|
|
414
|
+
const se_WebsocketSubscribeAction = (input, context) => {
|
|
415
|
+
return (0, smithy_client_1.take)(input, {
|
|
416
|
+
'action': [],
|
|
417
|
+
'filter': _ => se_WebsocketSubscribeFilter(_, context),
|
|
418
|
+
'state': [],
|
|
419
|
+
'topic': [],
|
|
420
|
+
'version': [],
|
|
421
|
+
});
|
|
422
|
+
};
|
|
423
|
+
const se_WebsocketSubscribeFilter = (input, context) => {
|
|
424
|
+
return input.filter((e) => e != null).map(entry => {
|
|
425
|
+
return se_Document(entry, context);
|
|
426
|
+
});
|
|
427
|
+
};
|
|
428
|
+
const se_WebsocketUnsubscribeAction = (input, context) => {
|
|
429
|
+
return (0, smithy_client_1.take)(input, {
|
|
430
|
+
'action': [],
|
|
431
|
+
'filter': _ => se_WebsocketSubscribeFilter(_, context),
|
|
432
|
+
'topic': [],
|
|
433
|
+
});
|
|
434
|
+
};
|
|
386
435
|
const se_WhatsAppInboundConsumeEvent = (input, context) => {
|
|
387
436
|
return (0, smithy_client_1.take)(input, {
|
|
388
437
|
'company': [],
|
|
@@ -435,6 +484,14 @@ const de_CallAnalyticsCostRecordEvent = (output, context) => {
|
|
|
435
484
|
'type': smithy_client_1.expectString,
|
|
436
485
|
});
|
|
437
486
|
};
|
|
487
|
+
const de_WebsocketAuthorizedEvent = (output, context) => {
|
|
488
|
+
return (0, smithy_client_1.take)(output, {
|
|
489
|
+
'connectionId': smithy_client_1.expectString,
|
|
490
|
+
'duration': (_) => de_Document(_, context),
|
|
491
|
+
'event': smithy_client_1.expectString,
|
|
492
|
+
'requestId': smithy_client_1.expectString,
|
|
493
|
+
});
|
|
494
|
+
};
|
|
438
495
|
const de_WebsocketConversationsBroadcastEvent = (output, context) => {
|
|
439
496
|
return (0, smithy_client_1.take)(output, {
|
|
440
497
|
'data': (_) => de_Document(_, context),
|
|
@@ -452,6 +509,40 @@ const de_WebsocketPresenceBroadcastEvent = (output, context) => {
|
|
|
452
509
|
'topic': smithy_client_1.expectString,
|
|
453
510
|
});
|
|
454
511
|
};
|
|
512
|
+
const de_WebsocketSubscribeAction = (output, context) => {
|
|
513
|
+
return (0, smithy_client_1.take)(output, {
|
|
514
|
+
'action': smithy_client_1.expectString,
|
|
515
|
+
'filter': (_) => de_WebsocketSubscribeFilter(_, context),
|
|
516
|
+
'state': smithy_client_1.expectBoolean,
|
|
517
|
+
'topic': smithy_client_1.expectString,
|
|
518
|
+
'version': smithy_client_1.expectString,
|
|
519
|
+
});
|
|
520
|
+
};
|
|
521
|
+
const de_WebsocketSubscribeBadRequestException = (output, context) => {
|
|
522
|
+
return (0, smithy_client_1.take)(output, {
|
|
523
|
+
'code': smithy_client_1.expectInt32,
|
|
524
|
+
'connectionId': smithy_client_1.expectString,
|
|
525
|
+
'event': smithy_client_1.expectString,
|
|
526
|
+
'message': smithy_client_1.expectString,
|
|
527
|
+
'requestId': smithy_client_1.expectString,
|
|
528
|
+
'source': (_) => de_WebsocketSubscribeAction(_, context),
|
|
529
|
+
});
|
|
530
|
+
};
|
|
531
|
+
const de_WebsocketSubscribedEvent = (output, context) => {
|
|
532
|
+
return (0, smithy_client_1.take)(output, {
|
|
533
|
+
'connectionId': smithy_client_1.expectString,
|
|
534
|
+
'duration': (_) => de_Document(_, context),
|
|
535
|
+
'event': smithy_client_1.expectString,
|
|
536
|
+
'requestId': smithy_client_1.expectString,
|
|
537
|
+
'topic': smithy_client_1.expectString,
|
|
538
|
+
});
|
|
539
|
+
};
|
|
540
|
+
const de_WebsocketSubscribeFilter = (output, context) => {
|
|
541
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
542
|
+
return de_Document(entry, context);
|
|
543
|
+
});
|
|
544
|
+
return retVal;
|
|
545
|
+
};
|
|
455
546
|
const de_WebsocketTranscriptionsBroadcastEvent = (output, context) => {
|
|
456
547
|
return (0, smithy_client_1.take)(output, {
|
|
457
548
|
'data': (_) => de_Document(_, context),
|
|
@@ -460,6 +551,23 @@ const de_WebsocketTranscriptionsBroadcastEvent = (output, context) => {
|
|
|
460
551
|
'topic': smithy_client_1.expectString,
|
|
461
552
|
});
|
|
462
553
|
};
|
|
554
|
+
const de_WebsocketUnsubscribeAction = (output, context) => {
|
|
555
|
+
return (0, smithy_client_1.take)(output, {
|
|
556
|
+
'action': smithy_client_1.expectString,
|
|
557
|
+
'filter': (_) => de_WebsocketSubscribeFilter(_, context),
|
|
558
|
+
'topic': smithy_client_1.expectString,
|
|
559
|
+
});
|
|
560
|
+
};
|
|
561
|
+
const de_WebsocketUnsubscribeBadRequestException = (output, context) => {
|
|
562
|
+
return (0, smithy_client_1.take)(output, {
|
|
563
|
+
'code': smithy_client_1.expectInt32,
|
|
564
|
+
'connectionId': smithy_client_1.expectString,
|
|
565
|
+
'event': smithy_client_1.expectString,
|
|
566
|
+
'message': smithy_client_1.expectString,
|
|
567
|
+
'requestId': smithy_client_1.expectString,
|
|
568
|
+
'source': (_) => de_WebsocketUnsubscribeAction(_, context),
|
|
569
|
+
});
|
|
570
|
+
};
|
|
463
571
|
const deserializeMetadata = (output) => ({
|
|
464
572
|
httpStatusCode: output.statusCode,
|
|
465
573
|
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
|
};
|
|
@@ -339,6 +351,16 @@ export var ConsumeEventInputEvent;
|
|
|
339
351
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
340
352
|
};
|
|
341
353
|
})(ConsumeEventInputEvent || (ConsumeEventInputEvent = {}));
|
|
354
|
+
export const WebsocketAction = {
|
|
355
|
+
AUTHORIZE: "authorize",
|
|
356
|
+
SUBSCRIBE: "subscribe",
|
|
357
|
+
UNSUBSCRIBE: "unsubscribe",
|
|
358
|
+
};
|
|
359
|
+
export const WebsocketTopic = {
|
|
360
|
+
CONVERSATIONS: "conversations",
|
|
361
|
+
PRESENCE: "presence",
|
|
362
|
+
TRANSCRIPTIONS: "transcriptions",
|
|
363
|
+
};
|
|
342
364
|
export const PresenceAnalyticsEventType = {
|
|
343
365
|
PRESENCE: "PRESENCE",
|
|
344
366
|
PRESENCE_TELEPHONY: "PRESENCE_TELEPHONY",
|
|
@@ -378,11 +400,7 @@ export const WebsocketEvent = {
|
|
|
378
400
|
AUTHORIZED: "authorized",
|
|
379
401
|
BROADCAST: "broadcast",
|
|
380
402
|
SUBSCRIBED: "subscribed",
|
|
381
|
-
|
|
382
|
-
export const WebsocketTopic = {
|
|
383
|
-
CONVERSATIONS: "conversations",
|
|
384
|
-
PRESENCE: "presence",
|
|
385
|
-
TRANSCRIPTIONS: "transcriptions",
|
|
403
|
+
UNSUBSCRIBE: "unsubscribed",
|
|
386
404
|
};
|
|
387
405
|
export class MatchNotFoundException extends __BaseException {
|
|
388
406
|
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
|
}));
|
|
@@ -177,9 +180,15 @@ export const de_DescribeEventCommand = async (output, context) => {
|
|
|
177
180
|
'WebhookPresenceConferenceEvent': _json,
|
|
178
181
|
'WebhookPresenceTelephonyEvent': _json,
|
|
179
182
|
'WebhookPresenceUserEvent': _json,
|
|
183
|
+
'WebsocketAuthorizeBadRequestException': _json,
|
|
184
|
+
'WebsocketAuthorizedEvent': _ => de_WebsocketAuthorizedEvent(_, context),
|
|
180
185
|
'WebsocketConversationsBroadcastEvent': _ => de_WebsocketConversationsBroadcastEvent(_, context),
|
|
181
186
|
'WebsocketPresenceBroadcastEvent': _ => de_WebsocketPresenceBroadcastEvent(_, context),
|
|
187
|
+
'WebsocketSubscribeBadRequestException': _ => de_WebsocketSubscribeBadRequestException(_, context),
|
|
188
|
+
'WebsocketSubscribedEvent': _ => de_WebsocketSubscribedEvent(_, context),
|
|
182
189
|
'WebsocketTranscriptionsBroadcastEvent': _ => de_WebsocketTranscriptionsBroadcastEvent(_, context),
|
|
190
|
+
'WebsocketUnsubscribeBadRequestException': _ => de_WebsocketUnsubscribeBadRequestException(_, context),
|
|
191
|
+
'WebsocketUnsubscribedEvent': _json,
|
|
183
192
|
});
|
|
184
193
|
Object.assign(contents, doc);
|
|
185
194
|
return contents;
|
|
@@ -265,6 +274,9 @@ const de_CommandError = async (output, context) => {
|
|
|
265
274
|
case "ValidationException":
|
|
266
275
|
case "smithy.framework#ValidationException":
|
|
267
276
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
277
|
+
case "BadRequestException":
|
|
278
|
+
case "smithy.framework#BadRequestException":
|
|
279
|
+
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
268
280
|
case "MatchNotFoundException":
|
|
269
281
|
case "wildix.wda.stream#MatchNotFoundException":
|
|
270
282
|
throw await de_MatchNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -281,6 +293,19 @@ const de_CommandError = async (output, context) => {
|
|
|
281
293
|
}
|
|
282
294
|
};
|
|
283
295
|
const throwDefaultError = withBaseException(__BaseException);
|
|
296
|
+
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
297
|
+
const contents = map({});
|
|
298
|
+
const data = parsedOutput.body;
|
|
299
|
+
const doc = take(data, {
|
|
300
|
+
'message': __expectString,
|
|
301
|
+
});
|
|
302
|
+
Object.assign(contents, doc);
|
|
303
|
+
const exception = new BadRequestException({
|
|
304
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
305
|
+
...contents
|
|
306
|
+
});
|
|
307
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
308
|
+
};
|
|
284
309
|
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
285
310
|
const contents = map({});
|
|
286
311
|
const data = parsedOutput.body;
|
|
@@ -333,6 +358,9 @@ const de_PresenceNotAvailableExceptionRes = async (parsedOutput, context) => {
|
|
|
333
358
|
});
|
|
334
359
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
335
360
|
};
|
|
361
|
+
const se_Document = (input, context) => {
|
|
362
|
+
return input;
|
|
363
|
+
};
|
|
336
364
|
const se_ConsumeEventInputEvent = (input, context) => {
|
|
337
365
|
return ConsumeEventInputEvent.visit(input, {
|
|
338
366
|
callAgentsCancel: value => ({ "callAgentsCancel": _json(value) }),
|
|
@@ -366,6 +394,27 @@ const se_ConsumeEventInputEvent = (input, context) => {
|
|
|
366
394
|
_: (name, value) => ({ name: value })
|
|
367
395
|
});
|
|
368
396
|
};
|
|
397
|
+
const se_WebsocketSubscribeAction = (input, context) => {
|
|
398
|
+
return take(input, {
|
|
399
|
+
'action': [],
|
|
400
|
+
'filter': _ => se_WebsocketSubscribeFilter(_, context),
|
|
401
|
+
'state': [],
|
|
402
|
+
'topic': [],
|
|
403
|
+
'version': [],
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
const se_WebsocketSubscribeFilter = (input, context) => {
|
|
407
|
+
return input.filter((e) => e != null).map(entry => {
|
|
408
|
+
return se_Document(entry, context);
|
|
409
|
+
});
|
|
410
|
+
};
|
|
411
|
+
const se_WebsocketUnsubscribeAction = (input, context) => {
|
|
412
|
+
return take(input, {
|
|
413
|
+
'action': [],
|
|
414
|
+
'filter': _ => se_WebsocketSubscribeFilter(_, context),
|
|
415
|
+
'topic': [],
|
|
416
|
+
});
|
|
417
|
+
};
|
|
369
418
|
const se_WhatsAppInboundConsumeEvent = (input, context) => {
|
|
370
419
|
return take(input, {
|
|
371
420
|
'company': [],
|
|
@@ -418,6 +467,14 @@ const de_CallAnalyticsCostRecordEvent = (output, context) => {
|
|
|
418
467
|
'type': __expectString,
|
|
419
468
|
});
|
|
420
469
|
};
|
|
470
|
+
const de_WebsocketAuthorizedEvent = (output, context) => {
|
|
471
|
+
return take(output, {
|
|
472
|
+
'connectionId': __expectString,
|
|
473
|
+
'duration': (_) => de_Document(_, context),
|
|
474
|
+
'event': __expectString,
|
|
475
|
+
'requestId': __expectString,
|
|
476
|
+
});
|
|
477
|
+
};
|
|
421
478
|
const de_WebsocketConversationsBroadcastEvent = (output, context) => {
|
|
422
479
|
return take(output, {
|
|
423
480
|
'data': (_) => de_Document(_, context),
|
|
@@ -435,6 +492,40 @@ const de_WebsocketPresenceBroadcastEvent = (output, context) => {
|
|
|
435
492
|
'topic': __expectString,
|
|
436
493
|
});
|
|
437
494
|
};
|
|
495
|
+
const de_WebsocketSubscribeAction = (output, context) => {
|
|
496
|
+
return take(output, {
|
|
497
|
+
'action': __expectString,
|
|
498
|
+
'filter': (_) => de_WebsocketSubscribeFilter(_, context),
|
|
499
|
+
'state': __expectBoolean,
|
|
500
|
+
'topic': __expectString,
|
|
501
|
+
'version': __expectString,
|
|
502
|
+
});
|
|
503
|
+
};
|
|
504
|
+
const de_WebsocketSubscribeBadRequestException = (output, context) => {
|
|
505
|
+
return take(output, {
|
|
506
|
+
'code': __expectInt32,
|
|
507
|
+
'connectionId': __expectString,
|
|
508
|
+
'event': __expectString,
|
|
509
|
+
'message': __expectString,
|
|
510
|
+
'requestId': __expectString,
|
|
511
|
+
'source': (_) => de_WebsocketSubscribeAction(_, context),
|
|
512
|
+
});
|
|
513
|
+
};
|
|
514
|
+
const de_WebsocketSubscribedEvent = (output, context) => {
|
|
515
|
+
return take(output, {
|
|
516
|
+
'connectionId': __expectString,
|
|
517
|
+
'duration': (_) => de_Document(_, context),
|
|
518
|
+
'event': __expectString,
|
|
519
|
+
'requestId': __expectString,
|
|
520
|
+
'topic': __expectString,
|
|
521
|
+
});
|
|
522
|
+
};
|
|
523
|
+
const de_WebsocketSubscribeFilter = (output, context) => {
|
|
524
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
525
|
+
return de_Document(entry, context);
|
|
526
|
+
});
|
|
527
|
+
return retVal;
|
|
528
|
+
};
|
|
438
529
|
const de_WebsocketTranscriptionsBroadcastEvent = (output, context) => {
|
|
439
530
|
return take(output, {
|
|
440
531
|
'data': (_) => de_Document(_, context),
|
|
@@ -443,6 +534,23 @@ const de_WebsocketTranscriptionsBroadcastEvent = (output, context) => {
|
|
|
443
534
|
'topic': __expectString,
|
|
444
535
|
});
|
|
445
536
|
};
|
|
537
|
+
const de_WebsocketUnsubscribeAction = (output, context) => {
|
|
538
|
+
return take(output, {
|
|
539
|
+
'action': __expectString,
|
|
540
|
+
'filter': (_) => de_WebsocketSubscribeFilter(_, context),
|
|
541
|
+
'topic': __expectString,
|
|
542
|
+
});
|
|
543
|
+
};
|
|
544
|
+
const de_WebsocketUnsubscribeBadRequestException = (output, context) => {
|
|
545
|
+
return take(output, {
|
|
546
|
+
'code': __expectInt32,
|
|
547
|
+
'connectionId': __expectString,
|
|
548
|
+
'event': __expectString,
|
|
549
|
+
'message': __expectString,
|
|
550
|
+
'requestId': __expectString,
|
|
551
|
+
'source': (_) => de_WebsocketUnsubscribeAction(_, context),
|
|
552
|
+
});
|
|
553
|
+
};
|
|
446
554
|
const deserializeMetadata = (output) => ({
|
|
447
555
|
httpStatusCode: output.statusCode,
|
|
448
556
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -92,6 +92,26 @@ declare const DescribeEventCommand_base: {
|
|
|
92
92
|
* parts: Number("int"),
|
|
93
93
|
* },
|
|
94
94
|
* },
|
|
95
|
+
* WebsocketAuthorizeAction: { // WebsocketAuthorizeAction
|
|
96
|
+
* action: "subscribe" || "authorize" || "unsubscribe", // required
|
|
97
|
+
* token: "STRING_VALUE", // required
|
|
98
|
+
* },
|
|
99
|
+
* WebsocketSubscribeAction: { // WebsocketSubscribeAction
|
|
100
|
+
* action: "subscribe" || "authorize" || "unsubscribe", // required
|
|
101
|
+
* topic: "conversations" || "transcriptions" || "presence", // required
|
|
102
|
+
* filter: [ // WebsocketSubscribeFilter
|
|
103
|
+
* "DOCUMENT_VALUE",
|
|
104
|
+
* ],
|
|
105
|
+
* state: true || false,
|
|
106
|
+
* version: "STRING_VALUE",
|
|
107
|
+
* },
|
|
108
|
+
* WebsocketUnsubscribeAction: { // WebsocketUnsubscribeAction
|
|
109
|
+
* action: "subscribe" || "authorize" || "unsubscribe", // required
|
|
110
|
+
* topic: "conversations" || "transcriptions" || "presence", // required
|
|
111
|
+
* filter: [
|
|
112
|
+
* "DOCUMENT_VALUE",
|
|
113
|
+
* ],
|
|
114
|
+
* },
|
|
95
115
|
* };
|
|
96
116
|
* const command = new DescribeEventCommand(input);
|
|
97
117
|
* const response = await client.send(command);
|
|
@@ -813,7 +833,7 @@ declare const DescribeEventCommand_base: {
|
|
|
813
833
|
* // sourceId: "STRING_VALUE",
|
|
814
834
|
* // },
|
|
815
835
|
* // WebsocketPresenceBroadcastEvent: { // WebsocketPresenceBroadcastEvent
|
|
816
|
-
* // event: "authorized" || "subscribed" || "broadcast", // required
|
|
836
|
+
* // event: "authorized" || "subscribed" || "broadcast" || "unsubscribed", // required
|
|
817
837
|
* // topic: "conversations" || "transcriptions" || "presence", // required
|
|
818
838
|
* // delta: { // WebsocketPresenceData
|
|
819
839
|
* // id: "STRING_VALUE",
|
|
@@ -848,17 +868,79 @@ declare const DescribeEventCommand_base: {
|
|
|
848
868
|
* // meta: "DOCUMENT_VALUE",
|
|
849
869
|
* // },
|
|
850
870
|
* // WebsocketConversationsBroadcastEvent: { // WebsocketConversationsBroadcastEvent
|
|
851
|
-
* // event: "authorized" || "subscribed" || "broadcast", // required
|
|
871
|
+
* // event: "authorized" || "subscribed" || "broadcast" || "unsubscribed", // required
|
|
852
872
|
* // topic: "conversations" || "transcriptions" || "presence", // required
|
|
853
873
|
* // data: "DOCUMENT_VALUE", // required
|
|
854
874
|
* // meta: "DOCUMENT_VALUE",
|
|
855
875
|
* // },
|
|
856
876
|
* // WebsocketTranscriptionsBroadcastEvent: { // WebsocketTranscriptionsBroadcastEvent
|
|
857
|
-
* // event: "authorized" || "subscribed" || "broadcast", // required
|
|
877
|
+
* // event: "authorized" || "subscribed" || "broadcast" || "unsubscribed", // required
|
|
858
878
|
* // topic: "conversations" || "transcriptions" || "presence", // required
|
|
859
879
|
* // data: "DOCUMENT_VALUE", // required
|
|
860
880
|
* // meta: "DOCUMENT_VALUE",
|
|
861
881
|
* // },
|
|
882
|
+
* // WebsocketAuthorizedEvent: { // WebsocketAuthorizedEvent
|
|
883
|
+
* // event: "authorized" || "subscribed" || "broadcast" || "unsubscribed", // required
|
|
884
|
+
* // connectionId: "STRING_VALUE", // required
|
|
885
|
+
* // requestId: "STRING_VALUE", // required
|
|
886
|
+
* // duration: "DOCUMENT_VALUE",
|
|
887
|
+
* // },
|
|
888
|
+
* // WebsocketSubscribedEvent: { // WebsocketSubscribedEvent
|
|
889
|
+
* // event: "authorized" || "subscribed" || "broadcast" || "unsubscribed", // required
|
|
890
|
+
* // connectionId: "STRING_VALUE", // required
|
|
891
|
+
* // requestId: "STRING_VALUE", // required
|
|
892
|
+
* // topic: "conversations" || "transcriptions" || "presence", // required
|
|
893
|
+
* // duration: "DOCUMENT_VALUE",
|
|
894
|
+
* // },
|
|
895
|
+
* // WebsocketUnsubscribedEvent: { // WebsocketUnsubscribedEvent
|
|
896
|
+
* // event: "authorized" || "subscribed" || "broadcast" || "unsubscribed", // required
|
|
897
|
+
* // connectionId: "STRING_VALUE", // required
|
|
898
|
+
* // requestId: "STRING_VALUE", // required
|
|
899
|
+
* // topic: "conversations" || "transcriptions" || "presence", // required
|
|
900
|
+
* // duration: Number("int"),
|
|
901
|
+
* // pending: Number("int"),
|
|
902
|
+
* // },
|
|
903
|
+
* // WebsocketAuthorizeBadRequestException: { // WebsocketAuthorizeBadRequestException
|
|
904
|
+
* // event: "STRING_VALUE",
|
|
905
|
+
* // requestId: "STRING_VALUE",
|
|
906
|
+
* // connectionId: "STRING_VALUE",
|
|
907
|
+
* // message: "STRING_VALUE",
|
|
908
|
+
* // code: Number("int"),
|
|
909
|
+
* // source: { // WebsocketAuthorizeAction
|
|
910
|
+
* // action: "subscribe" || "authorize" || "unsubscribe", // required
|
|
911
|
+
* // token: "STRING_VALUE", // required
|
|
912
|
+
* // },
|
|
913
|
+
* // },
|
|
914
|
+
* // WebsocketSubscribeBadRequestException: { // WebsocketSubscribeBadRequestException
|
|
915
|
+
* // event: "STRING_VALUE",
|
|
916
|
+
* // requestId: "STRING_VALUE",
|
|
917
|
+
* // connectionId: "STRING_VALUE",
|
|
918
|
+
* // message: "STRING_VALUE",
|
|
919
|
+
* // code: Number("int"),
|
|
920
|
+
* // source: { // WebsocketSubscribeAction
|
|
921
|
+
* // action: "subscribe" || "authorize" || "unsubscribe", // required
|
|
922
|
+
* // topic: "conversations" || "transcriptions" || "presence", // required
|
|
923
|
+
* // filter: [ // WebsocketSubscribeFilter
|
|
924
|
+
* // "DOCUMENT_VALUE",
|
|
925
|
+
* // ],
|
|
926
|
+
* // state: true || false,
|
|
927
|
+
* // version: "STRING_VALUE",
|
|
928
|
+
* // },
|
|
929
|
+
* // },
|
|
930
|
+
* // WebsocketUnsubscribeBadRequestException: { // WebsocketUnsubscribeBadRequestException
|
|
931
|
+
* // event: "STRING_VALUE",
|
|
932
|
+
* // requestId: "STRING_VALUE",
|
|
933
|
+
* // connectionId: "STRING_VALUE",
|
|
934
|
+
* // message: "STRING_VALUE",
|
|
935
|
+
* // code: Number("int"),
|
|
936
|
+
* // source: { // WebsocketUnsubscribeAction
|
|
937
|
+
* // action: "subscribe" || "authorize" || "unsubscribe", // required
|
|
938
|
+
* // topic: "conversations" || "transcriptions" || "presence", // required
|
|
939
|
+
* // filter: [
|
|
940
|
+
* // "DOCUMENT_VALUE",
|
|
941
|
+
* // ],
|
|
942
|
+
* // },
|
|
943
|
+
* // },
|
|
862
944
|
* // WebhookPresenceUserEvent: { // WebhookPresenceUserEvent
|
|
863
945
|
* // id: "STRING_VALUE", // required
|
|
864
946
|
* // pbx: "STRING_VALUE",
|
|
@@ -1609,6 +1691,8 @@ declare const DescribeEventCommand_base: {
|
|
|
1609
1691
|
* @see {@link DescribeEventCommandOutput} for command's `response` shape.
|
|
1610
1692
|
* @see {@link WdaStreamClientResolvedConfig | config} for WdaStreamClient's `config` shape.
|
|
1611
1693
|
*
|
|
1694
|
+
* @throws {@link BadRequestException} (client fault)
|
|
1695
|
+
*
|
|
1612
1696
|
* @throws {@link ValidationException} (client fault)
|
|
1613
1697
|
*
|
|
1614
1698
|
* @throws {@link WdaStreamServiceException}
|
|
@@ -12,6 +12,32 @@ export declare class ValidationException extends __BaseException {
|
|
|
12
12
|
*/
|
|
13
13
|
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* @public
|
|
17
|
+
* @enum
|
|
18
|
+
*/
|
|
19
|
+
export declare const CallDirection: {
|
|
20
|
+
readonly INBOUND: "INBOUND";
|
|
21
|
+
readonly INTERNAL: "INTERNAL";
|
|
22
|
+
readonly OUTBOUND: "OUTBOUND";
|
|
23
|
+
readonly UNDEFINED: "UNDEFINED";
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export type CallDirection = typeof CallDirection[keyof typeof CallDirection];
|
|
29
|
+
/**
|
|
30
|
+
* @public
|
|
31
|
+
* @enum
|
|
32
|
+
*/
|
|
33
|
+
export declare const ConversationStatus: {
|
|
34
|
+
readonly COMPLETED: "COMPLETED";
|
|
35
|
+
readonly MISSED: "MISSED";
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export type ConversationStatus = typeof ConversationStatus[keyof typeof ConversationStatus];
|
|
15
41
|
/**
|
|
16
42
|
* @public
|
|
17
43
|
*/
|
|
@@ -23,6 +49,17 @@ export declare class ForbiddenException extends __BaseException {
|
|
|
23
49
|
*/
|
|
24
50
|
constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
|
|
25
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
export declare class BadRequestException extends __BaseException {
|
|
56
|
+
readonly name: "BadRequestException";
|
|
57
|
+
readonly $fault: "client";
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
constructor(opts: __ExceptionOptionType<BadRequestException, __BaseException>);
|
|
62
|
+
}
|
|
26
63
|
/**
|
|
27
64
|
* @public
|
|
28
65
|
* @enum
|
|
@@ -164,32 +201,6 @@ export interface CallParticipant {
|
|
|
164
201
|
role: CallParticipantRole;
|
|
165
202
|
license?: string;
|
|
166
203
|
}
|
|
167
|
-
/**
|
|
168
|
-
* @public
|
|
169
|
-
* @enum
|
|
170
|
-
*/
|
|
171
|
-
export declare const ConversationStatus: {
|
|
172
|
-
readonly COMPLETED: "COMPLETED";
|
|
173
|
-
readonly MISSED: "MISSED";
|
|
174
|
-
};
|
|
175
|
-
/**
|
|
176
|
-
* @public
|
|
177
|
-
*/
|
|
178
|
-
export type ConversationStatus = typeof ConversationStatus[keyof typeof ConversationStatus];
|
|
179
|
-
/**
|
|
180
|
-
* @public
|
|
181
|
-
* @enum
|
|
182
|
-
*/
|
|
183
|
-
export declare const CallDirection: {
|
|
184
|
-
readonly INBOUND: "INBOUND";
|
|
185
|
-
readonly INTERNAL: "INTERNAL";
|
|
186
|
-
readonly OUTBOUND: "OUTBOUND";
|
|
187
|
-
readonly UNDEFINED: "UNDEFINED";
|
|
188
|
-
};
|
|
189
|
-
/**
|
|
190
|
-
* @public
|
|
191
|
-
*/
|
|
192
|
-
export type CallDirection = typeof CallDirection[keyof typeof CallDirection];
|
|
193
204
|
/**
|
|
194
205
|
* @public
|
|
195
206
|
* @enum
|
|
@@ -2775,6 +2786,57 @@ export interface SmsStatusEvent {
|
|
|
2775
2786
|
type: SmsConsumeEventType;
|
|
2776
2787
|
data: SmsStatusConsumeEventData;
|
|
2777
2788
|
}
|
|
2789
|
+
/**
|
|
2790
|
+
* @public
|
|
2791
|
+
* @enum
|
|
2792
|
+
*/
|
|
2793
|
+
export declare const WebsocketAction: {
|
|
2794
|
+
readonly AUTHORIZE: "authorize";
|
|
2795
|
+
readonly SUBSCRIBE: "subscribe";
|
|
2796
|
+
readonly UNSUBSCRIBE: "unsubscribe";
|
|
2797
|
+
};
|
|
2798
|
+
/**
|
|
2799
|
+
* @public
|
|
2800
|
+
*/
|
|
2801
|
+
export type WebsocketAction = typeof WebsocketAction[keyof typeof WebsocketAction];
|
|
2802
|
+
/**
|
|
2803
|
+
* @public
|
|
2804
|
+
*/
|
|
2805
|
+
export interface WebsocketAuthorizeAction {
|
|
2806
|
+
action: WebsocketAction;
|
|
2807
|
+
token: string;
|
|
2808
|
+
}
|
|
2809
|
+
/**
|
|
2810
|
+
* @public
|
|
2811
|
+
* @enum
|
|
2812
|
+
*/
|
|
2813
|
+
export declare const WebsocketTopic: {
|
|
2814
|
+
readonly CONVERSATIONS: "conversations";
|
|
2815
|
+
readonly PRESENCE: "presence";
|
|
2816
|
+
readonly TRANSCRIPTIONS: "transcriptions";
|
|
2817
|
+
};
|
|
2818
|
+
/**
|
|
2819
|
+
* @public
|
|
2820
|
+
*/
|
|
2821
|
+
export type WebsocketTopic = typeof WebsocketTopic[keyof typeof WebsocketTopic];
|
|
2822
|
+
/**
|
|
2823
|
+
* @public
|
|
2824
|
+
*/
|
|
2825
|
+
export interface WebsocketSubscribeAction {
|
|
2826
|
+
action: WebsocketAction;
|
|
2827
|
+
topic: WebsocketTopic;
|
|
2828
|
+
filter?: (__DocumentType)[];
|
|
2829
|
+
state?: boolean;
|
|
2830
|
+
version?: string;
|
|
2831
|
+
}
|
|
2832
|
+
/**
|
|
2833
|
+
* @public
|
|
2834
|
+
*/
|
|
2835
|
+
export interface WebsocketUnsubscribeAction {
|
|
2836
|
+
action: WebsocketAction;
|
|
2837
|
+
topic: WebsocketTopic;
|
|
2838
|
+
filter?: (__DocumentType)[];
|
|
2839
|
+
}
|
|
2778
2840
|
/**
|
|
2779
2841
|
* @public
|
|
2780
2842
|
*/
|
|
@@ -2803,6 +2865,9 @@ export interface DescribeEventInput {
|
|
|
2803
2865
|
SmsStatusEvent?: SmsStatusEvent;
|
|
2804
2866
|
WhatsAppInboundEvent?: WhatsAppInboundEvent;
|
|
2805
2867
|
WhatsAppStatusEvent?: WhatsAppStatusEvent;
|
|
2868
|
+
WebsocketAuthorizeAction?: WebsocketAuthorizeAction;
|
|
2869
|
+
WebsocketSubscribeAction?: WebsocketSubscribeAction;
|
|
2870
|
+
WebsocketUnsubscribeAction?: WebsocketUnsubscribeAction;
|
|
2806
2871
|
}
|
|
2807
2872
|
/**
|
|
2808
2873
|
* @public
|
|
@@ -3264,6 +3329,17 @@ export interface WebhookPresenceUserEvent {
|
|
|
3264
3329
|
integrationId: string;
|
|
3265
3330
|
data: WebhookPresenceUserEventData;
|
|
3266
3331
|
}
|
|
3332
|
+
/**
|
|
3333
|
+
* @public
|
|
3334
|
+
*/
|
|
3335
|
+
export interface WebsocketAuthorizeBadRequestException {
|
|
3336
|
+
event?: string;
|
|
3337
|
+
requestId?: string;
|
|
3338
|
+
connectionId?: string;
|
|
3339
|
+
message?: string;
|
|
3340
|
+
code?: number;
|
|
3341
|
+
source?: WebsocketAuthorizeAction;
|
|
3342
|
+
}
|
|
3267
3343
|
/**
|
|
3268
3344
|
* @public
|
|
3269
3345
|
* @enum
|
|
@@ -3272,6 +3348,7 @@ export declare const WebsocketEvent: {
|
|
|
3272
3348
|
readonly AUTHORIZED: "authorized";
|
|
3273
3349
|
readonly BROADCAST: "broadcast";
|
|
3274
3350
|
readonly SUBSCRIBED: "subscribed";
|
|
3351
|
+
readonly UNSUBSCRIBE: "unsubscribed";
|
|
3275
3352
|
};
|
|
3276
3353
|
/**
|
|
3277
3354
|
* @public
|
|
@@ -3279,17 +3356,13 @@ export declare const WebsocketEvent: {
|
|
|
3279
3356
|
export type WebsocketEvent = typeof WebsocketEvent[keyof typeof WebsocketEvent];
|
|
3280
3357
|
/**
|
|
3281
3358
|
* @public
|
|
3282
|
-
* @enum
|
|
3283
3359
|
*/
|
|
3284
|
-
export
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
* @public
|
|
3291
|
-
*/
|
|
3292
|
-
export type WebsocketTopic = typeof WebsocketTopic[keyof typeof WebsocketTopic];
|
|
3360
|
+
export interface WebsocketAuthorizedEvent {
|
|
3361
|
+
event: WebsocketEvent;
|
|
3362
|
+
connectionId: string;
|
|
3363
|
+
requestId: string;
|
|
3364
|
+
duration?: __DocumentType;
|
|
3365
|
+
}
|
|
3293
3366
|
/**
|
|
3294
3367
|
* @public
|
|
3295
3368
|
*/
|
|
@@ -3332,6 +3405,27 @@ export interface WebsocketPresenceBroadcastEvent {
|
|
|
3332
3405
|
data?: WebsocketPresenceDataList;
|
|
3333
3406
|
meta?: __DocumentType;
|
|
3334
3407
|
}
|
|
3408
|
+
/**
|
|
3409
|
+
* @public
|
|
3410
|
+
*/
|
|
3411
|
+
export interface WebsocketSubscribeBadRequestException {
|
|
3412
|
+
event?: string;
|
|
3413
|
+
requestId?: string;
|
|
3414
|
+
connectionId?: string;
|
|
3415
|
+
message?: string;
|
|
3416
|
+
code?: number;
|
|
3417
|
+
source?: WebsocketSubscribeAction;
|
|
3418
|
+
}
|
|
3419
|
+
/**
|
|
3420
|
+
* @public
|
|
3421
|
+
*/
|
|
3422
|
+
export interface WebsocketSubscribedEvent {
|
|
3423
|
+
event: WebsocketEvent;
|
|
3424
|
+
connectionId: string;
|
|
3425
|
+
requestId: string;
|
|
3426
|
+
topic: WebsocketTopic;
|
|
3427
|
+
duration?: __DocumentType;
|
|
3428
|
+
}
|
|
3335
3429
|
/**
|
|
3336
3430
|
* @public
|
|
3337
3431
|
*/
|
|
@@ -3341,6 +3435,28 @@ export interface WebsocketTranscriptionsBroadcastEvent {
|
|
|
3341
3435
|
data: __DocumentType;
|
|
3342
3436
|
meta?: __DocumentType;
|
|
3343
3437
|
}
|
|
3438
|
+
/**
|
|
3439
|
+
* @public
|
|
3440
|
+
*/
|
|
3441
|
+
export interface WebsocketUnsubscribeBadRequestException {
|
|
3442
|
+
event?: string;
|
|
3443
|
+
requestId?: string;
|
|
3444
|
+
connectionId?: string;
|
|
3445
|
+
message?: string;
|
|
3446
|
+
code?: number;
|
|
3447
|
+
source?: WebsocketUnsubscribeAction;
|
|
3448
|
+
}
|
|
3449
|
+
/**
|
|
3450
|
+
* @public
|
|
3451
|
+
*/
|
|
3452
|
+
export interface WebsocketUnsubscribedEvent {
|
|
3453
|
+
event: WebsocketEvent;
|
|
3454
|
+
connectionId: string;
|
|
3455
|
+
requestId: string;
|
|
3456
|
+
topic: WebsocketTopic;
|
|
3457
|
+
duration?: number;
|
|
3458
|
+
pending?: number;
|
|
3459
|
+
}
|
|
3344
3460
|
/**
|
|
3345
3461
|
* @public
|
|
3346
3462
|
*/
|
|
@@ -3371,6 +3487,12 @@ export interface DescribeEventOutput {
|
|
|
3371
3487
|
WebsocketPresenceBroadcastEvent?: WebsocketPresenceBroadcastEvent;
|
|
3372
3488
|
WebsocketConversationsBroadcastEvent?: WebsocketConversationsBroadcastEvent;
|
|
3373
3489
|
WebsocketTranscriptionsBroadcastEvent?: WebsocketTranscriptionsBroadcastEvent;
|
|
3490
|
+
WebsocketAuthorizedEvent?: WebsocketAuthorizedEvent;
|
|
3491
|
+
WebsocketSubscribedEvent?: WebsocketSubscribedEvent;
|
|
3492
|
+
WebsocketUnsubscribedEvent?: WebsocketUnsubscribedEvent;
|
|
3493
|
+
WebsocketAuthorizeBadRequestException?: WebsocketAuthorizeBadRequestException;
|
|
3494
|
+
WebsocketSubscribeBadRequestException?: WebsocketSubscribeBadRequestException;
|
|
3495
|
+
WebsocketUnsubscribeBadRequestException?: WebsocketUnsubscribeBadRequestException;
|
|
3374
3496
|
WebhookPresenceUserEvent?: WebhookPresenceUserEvent;
|
|
3375
3497
|
WebhookPresenceTelephonyEvent?: WebhookPresenceTelephonyEvent;
|
|
3376
3498
|
WebhookPresenceConferenceEvent?: WebhookPresenceConferenceEvent;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wda-stream-client",
|
|
3
3
|
"description": "@wildix/wda-stream-client client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.35",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|