@wildix/wda-stream-client 1.1.41 → 1.1.44

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.
@@ -1,5 +1,6 @@
1
1
  import { WdaStreamServiceException as __BaseException } from "../models/WdaStreamServiceException";
2
- import { ConsumeEventInputEvent, ForbiddenException, MatchNotFoundException, PresenceNotAvailableException, ValidationException, } from "../models/models_0";
2
+ import { ConsumeEventInputEvent, ForbiddenException, ValidationException, } from "../models/models_0";
3
+ import { MatchNotFoundException, PresenceNotAvailableException, } from "../models/models_1";
3
4
  import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
4
5
  import { requestBuilder as rb } from "@smithy/core";
5
6
  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";
@@ -69,6 +70,25 @@ export const se_GetOngoingCallCommand = async (input, context) => {
69
70
  .b(body);
70
71
  return b.build();
71
72
  };
73
+ export const se_ListServicesCommand = async (input, context) => {
74
+ const b = rb(input, context);
75
+ const headers = {
76
+ 'content-type': 'application/json',
77
+ };
78
+ b.bp("/v2/stream/services");
79
+ const query = map({
80
+ [_c]: [, input[_c]],
81
+ });
82
+ let body;
83
+ body = JSON.stringify(take(input, {
84
+ 'filter': _ => _json(_),
85
+ }));
86
+ b.m("POST")
87
+ .h(headers)
88
+ .q(query)
89
+ .b(body);
90
+ return b.build();
91
+ };
72
92
  export const se_QueryConversationsCommand = async (input, context) => {
73
93
  const b = rb(input, context);
74
94
  const headers = {
@@ -180,6 +200,12 @@ export const de_DescribeEventCommand = async (output, context) => {
180
200
  'PresenceAnalyticsStatusEvent': _json,
181
201
  'PresenceAnalyticsTelephonyEvent': _json,
182
202
  'PresenceEventType': __expectString,
203
+ 'ServiceAnalyticsLiveCompleteEvent': _json,
204
+ 'ServiceAnalyticsLiveProgressEvent': _json,
205
+ 'ServiceCallAnalyticsLiveCompleteEvent': _json,
206
+ 'ServiceCallAnalyticsLiveProgressEvent': _json,
207
+ 'ServiceCallEventType': __expectString,
208
+ 'ServiceEventType': __expectString,
183
209
  'WebhookCallCompletedEvent': _json,
184
210
  'WebhookCallLiveCompletedEvent': _json,
185
211
  'WebhookCallLiveInterruptedEvent': _json,
@@ -254,6 +280,20 @@ export const de_GetOngoingCallCommand = async (output, context) => {
254
280
  Object.assign(contents, doc);
255
281
  return contents;
256
282
  };
283
+ export const de_ListServicesCommand = async (output, context) => {
284
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
285
+ return de_CommandError(output, context);
286
+ }
287
+ const contents = map({
288
+ $metadata: deserializeMetadata(output),
289
+ });
290
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
291
+ const doc = take(data, {
292
+ 'services': _json,
293
+ });
294
+ Object.assign(contents, doc);
295
+ return contents;
296
+ };
257
297
  export const de_QueryConversationsCommand = async (output, context) => {
258
298
  if (output.statusCode !== 200 && output.statusCode >= 300) {
259
299
  return de_CommandError(output, context);
@@ -421,6 +461,15 @@ const se_ConsumeEventInputEvent = (input, context) => {
421
461
  conferenceTranscription: value => ({ "conferenceTranscription": _json(value) }),
422
462
  presence: value => ({ "presence": _json(value) }),
423
463
  presenceTelephony: value => ({ "presenceTelephony": _json(value) }),
464
+ serviceAgentJoin: value => ({ "serviceAgentJoin": _json(value) }),
465
+ serviceAgentLeave: value => ({ "serviceAgentLeave": _json(value) }),
466
+ serviceAgentUpdate: value => ({ "serviceAgentUpdate": _json(value) }),
467
+ serviceCallEnd: value => ({ "serviceCallEnd": _json(value) }),
468
+ serviceCallInit: value => ({ "serviceCallInit": _json(value) }),
469
+ serviceCallUpdate: value => ({ "serviceCallUpdate": _json(value) }),
470
+ serviceEnd: value => ({ "serviceEnd": _json(value) }),
471
+ serviceInit: value => ({ "serviceInit": _json(value) }),
472
+ serviceUpdate: value => ({ "serviceUpdate": _json(value) }),
424
473
  smsInbound: value => ({ "smsInbound": _json(value) }),
425
474
  smsStatus: value => ({ "smsStatus": _json(value) }),
426
475
  usageStt: value => ({ "usageStt": _json(value) }),
@@ -3,6 +3,7 @@ import { ConsumeEventCommandInput, ConsumeEventCommandOutput } from "./commands/
3
3
  import { DescribeEventCommandInput, DescribeEventCommandOutput } from "./commands/DescribeEventCommand";
4
4
  import { GetConferenceIdCommandInput, GetConferenceIdCommandOutput } from "./commands/GetConferenceIdCommand";
5
5
  import { GetOngoingCallCommandInput, GetOngoingCallCommandOutput } from "./commands/GetOngoingCallCommand";
6
+ import { ListServicesCommandInput, ListServicesCommandOutput } from "./commands/ListServicesCommand";
6
7
  import { QueryConversationsCommandInput, QueryConversationsCommandOutput } from "./commands/QueryConversationsCommand";
7
8
  import { QueryPresenceCommandInput, QueryPresenceCommandOutput } from "./commands/QueryPresenceCommand";
8
9
  import { QueryPresencesCommandInput, QueryPresencesCommandOutput } from "./commands/QueryPresencesCommand";
@@ -34,6 +35,13 @@ export interface WdaStream {
34
35
  getOngoingCall(args: GetOngoingCallCommandInput, options?: __HttpHandlerOptions): Promise<GetOngoingCallCommandOutput>;
35
36
  getOngoingCall(args: GetOngoingCallCommandInput, cb: (err: any, data?: GetOngoingCallCommandOutput) => void): void;
36
37
  getOngoingCall(args: GetOngoingCallCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetOngoingCallCommandOutput) => void): void;
38
+ /**
39
+ * @see {@link ListServicesCommand}
40
+ */
41
+ listServices(): Promise<ListServicesCommandOutput>;
42
+ listServices(args: ListServicesCommandInput, options?: __HttpHandlerOptions): Promise<ListServicesCommandOutput>;
43
+ listServices(args: ListServicesCommandInput, cb: (err: any, data?: ListServicesCommandOutput) => void): void;
44
+ listServices(args: ListServicesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListServicesCommandOutput) => void): void;
37
45
  /**
38
46
  * @see {@link QueryConversationsCommand}
39
47
  */
@@ -2,6 +2,7 @@ import { ConsumeEventCommandInput, ConsumeEventCommandOutput } from "./commands/
2
2
  import { DescribeEventCommandInput, DescribeEventCommandOutput } from "./commands/DescribeEventCommand";
3
3
  import { GetConferenceIdCommandInput, GetConferenceIdCommandOutput } from "./commands/GetConferenceIdCommand";
4
4
  import { GetOngoingCallCommandInput, GetOngoingCallCommandOutput } from "./commands/GetOngoingCallCommand";
5
+ import { ListServicesCommandInput, ListServicesCommandOutput } from "./commands/ListServicesCommand";
5
6
  import { QueryConversationsCommandInput, QueryConversationsCommandOutput } from "./commands/QueryConversationsCommand";
6
7
  import { QueryPresenceCommandInput, QueryPresenceCommandOutput } from "./commands/QueryPresenceCommand";
7
8
  import { QueryPresencesCommandInput, QueryPresencesCommandOutput } from "./commands/QueryPresencesCommand";
@@ -17,11 +18,11 @@ export { __Client };
17
18
  /**
18
19
  * @public
19
20
  */
20
- export type ServiceInputTypes = ConsumeEventCommandInput | DescribeEventCommandInput | GetConferenceIdCommandInput | GetOngoingCallCommandInput | QueryConversationsCommandInput | QueryPresenceCommandInput | QueryPresencesCommandInput | UpdatePresenceLastSeenCommandInput;
21
+ export type ServiceInputTypes = ConsumeEventCommandInput | DescribeEventCommandInput | GetConferenceIdCommandInput | GetOngoingCallCommandInput | ListServicesCommandInput | QueryConversationsCommandInput | QueryPresenceCommandInput | QueryPresencesCommandInput | UpdatePresenceLastSeenCommandInput;
21
22
  /**
22
23
  * @public
23
24
  */
24
- export type ServiceOutputTypes = ConsumeEventCommandOutput | DescribeEventCommandOutput | GetConferenceIdCommandOutput | GetOngoingCallCommandOutput | QueryConversationsCommandOutput | QueryPresenceCommandOutput | QueryPresencesCommandOutput | UpdatePresenceLastSeenCommandOutput;
25
+ export type ServiceOutputTypes = ConsumeEventCommandOutput | DescribeEventCommandOutput | GetConferenceIdCommandOutput | GetOngoingCallCommandOutput | ListServicesCommandOutput | QueryConversationsCommandOutput | QueryPresenceCommandOutput | QueryPresencesCommandOutput | UpdatePresenceLastSeenCommandOutput;
25
26
  /**
26
27
  * @public
27
28
  */
@@ -359,7 +359,7 @@ declare const ConsumeEventCommand_base: {
359
359
  * flowIndex: Number("int"), // required
360
360
  * flowStartTime: Number("long"), // required
361
361
  * callStartTime: Number("long"), // required
362
- * type: "chat" || "chat_transcription" || "chat_complete" || "chat_interrupted" || "chat_missed" || "call_cost" || "call" || "call_complete" || "call_interrupted" || "call_transcription" || "conference" || "conference_complete" || "conference_interrupted" || "conference_transcription" || "conference_join" || "conference_leave", // required
362
+ * type: "chat" || "chat_transcription" || "chat_complete" || "chat_interrupted" || "chat_missed" || "call_cost" || "call" || "call_complete" || "call_interrupted" || "call_transcription" || "conference" || "conference_complete" || "conference_interrupted" || "conference_transcription" || "conference_join" || "conference_leave" || "service" || "service_complete" || "service_agent" || "service_call" || "service_call_complete", // required
363
363
  * cds: { // CdsTranscriptionPayloadReference
364
364
  * id: "STRING_VALUE", // required
365
365
  * },
@@ -870,6 +870,183 @@ declare const ConsumeEventCommand_base: {
870
870
  * status: "STRING_VALUE",
871
871
  * },
872
872
  * },
873
+ * serviceInit: { // ServiceInitConsumeEvent
874
+ * id: "STRING_VALUE", // required
875
+ * time: Number("long"), // required
876
+ * pbx: "STRING_VALUE", // required
877
+ * company: "STRING_VALUE", // required
878
+ * type: "SERVICE.INIT" || "SERVICE.UPDATE" || "SERVICE.END" || "SERVICE.CALL_INIT" || "SERVICE.CALL_UPDATE" || "SERVICE.CALL_END" || "SERVICE.AGENT_JOIN" || "SERVICE.AGENT_UPDATE" || "SERVICE.AGENT_LEAVE", // required
879
+ * data: { // ServiceConsumeEventData
880
+ * eventTrigger: "service.init" || "service.update" || "service.end" || "service.call_init" || "service.call_update" || "service.call_end" || "service.agent_join" || "service.agent_update" || "service.agent_leave", // required
881
+ * name: "STRING_VALUE",
882
+ * strategy: "STRING_VALUE",
883
+ * maxCalls: "STRING_VALUE",
884
+ * weight: "STRING_VALUE",
885
+ * agents: [ // ServiceAgentsList
886
+ * { // ServiceAgent
887
+ * id: "STRING_VALUE", // required
888
+ * penalty: "STRING_VALUE",
889
+ * type: "STATIC" || "DYNAMIC",
890
+ * paused: true || false,
891
+ * lastQueueCallEnd: Number("long"),
892
+ * userExtension: "STRING_VALUE",
893
+ * name: "STRING_VALUE",
894
+ * },
895
+ * ],
896
+ * calls: [ // ServiceCallsList
897
+ * "STRING_VALUE",
898
+ * ],
899
+ * },
900
+ * },
901
+ * serviceUpdate: { // ServiceUpdateConsumeEvent
902
+ * id: "STRING_VALUE", // required
903
+ * time: Number("long"), // required
904
+ * pbx: "STRING_VALUE", // required
905
+ * company: "STRING_VALUE", // required
906
+ * type: "SERVICE.INIT" || "SERVICE.UPDATE" || "SERVICE.END" || "SERVICE.CALL_INIT" || "SERVICE.CALL_UPDATE" || "SERVICE.CALL_END" || "SERVICE.AGENT_JOIN" || "SERVICE.AGENT_UPDATE" || "SERVICE.AGENT_LEAVE", // required
907
+ * data: {
908
+ * eventTrigger: "service.init" || "service.update" || "service.end" || "service.call_init" || "service.call_update" || "service.call_end" || "service.agent_join" || "service.agent_update" || "service.agent_leave", // required
909
+ * name: "STRING_VALUE",
910
+ * strategy: "STRING_VALUE",
911
+ * maxCalls: "STRING_VALUE",
912
+ * weight: "STRING_VALUE",
913
+ * agents: [
914
+ * {
915
+ * id: "STRING_VALUE", // required
916
+ * penalty: "STRING_VALUE",
917
+ * type: "STATIC" || "DYNAMIC",
918
+ * paused: true || false,
919
+ * lastQueueCallEnd: Number("long"),
920
+ * userExtension: "STRING_VALUE",
921
+ * name: "STRING_VALUE",
922
+ * },
923
+ * ],
924
+ * calls: [
925
+ * "STRING_VALUE",
926
+ * ],
927
+ * },
928
+ * },
929
+ * serviceEnd: { // ServiceEndConsumeEvent
930
+ * id: "STRING_VALUE", // required
931
+ * time: Number("long"), // required
932
+ * pbx: "STRING_VALUE", // required
933
+ * company: "STRING_VALUE", // required
934
+ * type: "SERVICE.INIT" || "SERVICE.UPDATE" || "SERVICE.END" || "SERVICE.CALL_INIT" || "SERVICE.CALL_UPDATE" || "SERVICE.CALL_END" || "SERVICE.AGENT_JOIN" || "SERVICE.AGENT_UPDATE" || "SERVICE.AGENT_LEAVE", // required
935
+ * },
936
+ * serviceCallInit: { // ServiceCallInitConsumeEvent
937
+ * id: "STRING_VALUE", // required
938
+ * time: Number("long"), // required
939
+ * pbx: "STRING_VALUE", // required
940
+ * company: "STRING_VALUE", // required
941
+ * type: "SERVICE.INIT" || "SERVICE.UPDATE" || "SERVICE.END" || "SERVICE.CALL_INIT" || "SERVICE.CALL_UPDATE" || "SERVICE.CALL_END" || "SERVICE.AGENT_JOIN" || "SERVICE.AGENT_UPDATE" || "SERVICE.AGENT_LEAVE", // required
942
+ * data: { // ServiceCallConsumeEventData
943
+ * callId: "STRING_VALUE", // required
944
+ * startTime: Number("long"),
945
+ * direction: "INTERNAL" || "INBOUND" || "OUTBOUND" || "UNDEFINED",
946
+ * action: "RING" || "REJECT" || "CANCEL" || "ANSWER",
947
+ * customer: { // ServiceCustomer
948
+ * phone: "STRING_VALUE", // required
949
+ * name: "STRING_VALUE",
950
+ * },
951
+ * relatedAgents: [ // ServiceCallAgentsList
952
+ * "STRING_VALUE",
953
+ * ],
954
+ * eventTrigger: "service.init" || "service.update" || "service.end" || "service.call_init" || "service.call_update" || "service.call_end" || "service.agent_join" || "service.agent_update" || "service.agent_leave", // required
955
+ * },
956
+ * },
957
+ * serviceCallUpdate: { // ServiceCallUpdateConsumeEvent
958
+ * id: "STRING_VALUE", // required
959
+ * time: Number("long"), // required
960
+ * pbx: "STRING_VALUE", // required
961
+ * company: "STRING_VALUE", // required
962
+ * type: "SERVICE.INIT" || "SERVICE.UPDATE" || "SERVICE.END" || "SERVICE.CALL_INIT" || "SERVICE.CALL_UPDATE" || "SERVICE.CALL_END" || "SERVICE.AGENT_JOIN" || "SERVICE.AGENT_UPDATE" || "SERVICE.AGENT_LEAVE", // required
963
+ * data: {
964
+ * callId: "STRING_VALUE", // required
965
+ * startTime: Number("long"),
966
+ * direction: "INTERNAL" || "INBOUND" || "OUTBOUND" || "UNDEFINED",
967
+ * action: "RING" || "REJECT" || "CANCEL" || "ANSWER",
968
+ * customer: {
969
+ * phone: "STRING_VALUE", // required
970
+ * name: "STRING_VALUE",
971
+ * },
972
+ * relatedAgents: [
973
+ * "STRING_VALUE",
974
+ * ],
975
+ * eventTrigger: "service.init" || "service.update" || "service.end" || "service.call_init" || "service.call_update" || "service.call_end" || "service.agent_join" || "service.agent_update" || "service.agent_leave", // required
976
+ * },
977
+ * },
978
+ * serviceCallEnd: { // ServiceCallEndConsumeEvent
979
+ * id: "STRING_VALUE", // required
980
+ * time: Number("long"), // required
981
+ * pbx: "STRING_VALUE", // required
982
+ * company: "STRING_VALUE", // required
983
+ * type: "SERVICE.INIT" || "SERVICE.UPDATE" || "SERVICE.END" || "SERVICE.CALL_INIT" || "SERVICE.CALL_UPDATE" || "SERVICE.CALL_END" || "SERVICE.AGENT_JOIN" || "SERVICE.AGENT_UPDATE" || "SERVICE.AGENT_LEAVE", // required
984
+ * data: {
985
+ * callId: "STRING_VALUE", // required
986
+ * startTime: Number("long"),
987
+ * direction: "INTERNAL" || "INBOUND" || "OUTBOUND" || "UNDEFINED",
988
+ * action: "RING" || "REJECT" || "CANCEL" || "ANSWER",
989
+ * customer: {
990
+ * phone: "STRING_VALUE", // required
991
+ * name: "STRING_VALUE",
992
+ * },
993
+ * relatedAgents: [
994
+ * "STRING_VALUE",
995
+ * ],
996
+ * eventTrigger: "service.init" || "service.update" || "service.end" || "service.call_init" || "service.call_update" || "service.call_end" || "service.agent_join" || "service.agent_update" || "service.agent_leave", // required
997
+ * },
998
+ * },
999
+ * serviceAgentJoin: { // ServiceAgentJoinConsumeEvent
1000
+ * id: "STRING_VALUE", // required
1001
+ * time: Number("long"), // required
1002
+ * pbx: "STRING_VALUE", // required
1003
+ * company: "STRING_VALUE", // required
1004
+ * type: "SERVICE.INIT" || "SERVICE.UPDATE" || "SERVICE.END" || "SERVICE.CALL_INIT" || "SERVICE.CALL_UPDATE" || "SERVICE.CALL_END" || "SERVICE.AGENT_JOIN" || "SERVICE.AGENT_UPDATE" || "SERVICE.AGENT_LEAVE", // required
1005
+ * data: { // ServiceAgentConsumeEventData
1006
+ * id: "STRING_VALUE", // required
1007
+ * penalty: "STRING_VALUE",
1008
+ * type: "STATIC" || "DYNAMIC",
1009
+ * paused: true || false,
1010
+ * lastQueueCallEnd: Number("long"),
1011
+ * userExtension: "STRING_VALUE",
1012
+ * name: "STRING_VALUE",
1013
+ * eventTrigger: "service.init" || "service.update" || "service.end" || "service.call_init" || "service.call_update" || "service.call_end" || "service.agent_join" || "service.agent_update" || "service.agent_leave", // required
1014
+ * },
1015
+ * },
1016
+ * serviceAgentUpdate: { // ServiceAgentUpdateConsumeEvent
1017
+ * id: "STRING_VALUE", // required
1018
+ * time: Number("long"), // required
1019
+ * pbx: "STRING_VALUE", // required
1020
+ * company: "STRING_VALUE", // required
1021
+ * type: "SERVICE.INIT" || "SERVICE.UPDATE" || "SERVICE.END" || "SERVICE.CALL_INIT" || "SERVICE.CALL_UPDATE" || "SERVICE.CALL_END" || "SERVICE.AGENT_JOIN" || "SERVICE.AGENT_UPDATE" || "SERVICE.AGENT_LEAVE", // required
1022
+ * data: {
1023
+ * id: "STRING_VALUE", // required
1024
+ * penalty: "STRING_VALUE",
1025
+ * type: "STATIC" || "DYNAMIC",
1026
+ * paused: true || false,
1027
+ * lastQueueCallEnd: Number("long"),
1028
+ * userExtension: "STRING_VALUE",
1029
+ * name: "STRING_VALUE",
1030
+ * eventTrigger: "service.init" || "service.update" || "service.end" || "service.call_init" || "service.call_update" || "service.call_end" || "service.agent_join" || "service.agent_update" || "service.agent_leave", // required
1031
+ * },
1032
+ * },
1033
+ * serviceAgentLeave: { // ServiceAgentLeaveConsumeEvent
1034
+ * id: "STRING_VALUE", // required
1035
+ * time: Number("long"), // required
1036
+ * pbx: "STRING_VALUE", // required
1037
+ * company: "STRING_VALUE", // required
1038
+ * type: "SERVICE.INIT" || "SERVICE.UPDATE" || "SERVICE.END" || "SERVICE.CALL_INIT" || "SERVICE.CALL_UPDATE" || "SERVICE.CALL_END" || "SERVICE.AGENT_JOIN" || "SERVICE.AGENT_UPDATE" || "SERVICE.AGENT_LEAVE", // required
1039
+ * data: {
1040
+ * id: "STRING_VALUE", // required
1041
+ * penalty: "STRING_VALUE",
1042
+ * type: "STATIC" || "DYNAMIC",
1043
+ * paused: true || false,
1044
+ * lastQueueCallEnd: Number("long"),
1045
+ * userExtension: "STRING_VALUE",
1046
+ * name: "STRING_VALUE",
1047
+ * eventTrigger: "service.init" || "service.update" || "service.end" || "service.call_init" || "service.call_update" || "service.call_end" || "service.agent_join" || "service.agent_update" || "service.agent_leave", // required
1048
+ * },
1049
+ * },
873
1050
  * usageStt: { // TranscriptionUsageEvent
874
1051
  * id: "STRING_VALUE", // required
875
1052
  * time: Number("long"), // required