@wildix/xbees-conversations-client 1.0.61 → 1.0.63

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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MessageActionNotFoundException = exports.TaggedChannelsLimitReachedException = exports.ConversationsServiceException = exports.PinnedChannelsLimitReachedException = exports.MessageUnsetFields = exports.GroupChannelUnsetOptions = exports.MarkUnreadChannelsLimitReachedException = exports.TagNotFoundException = exports.FileNotFoundException = exports.TriggerNotFoundException = exports.MessageWhatsAppStatus = exports.MessageType = exports.MessageSmsStatus = exports.Element = exports.WebhookEventType = exports.ReactionType = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.TagsLimitReachedException = exports.ConversationFileCategory = exports.ChannelAlreadyExistException = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ActionTriggerStatus = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.ChannelType = exports.RateLimitExceededException = exports.ForbiddenException = exports.ValidationException = void 0;
3
+ exports.MessageActionNotFoundException = exports.TaggedChannelsLimitReachedException = exports.ConversationsServiceException = exports.PinnedChannelsLimitReachedException = exports.MessageUnsetFields = exports.GroupChannelUnsetOptions = exports.MarkUnreadChannelsLimitReachedException = exports.TagNotFoundException = exports.FileNotFoundException = exports.TriggerNotFoundException = exports.WebhookEventType = exports.MessageWhatsAppStatus = exports.MessageType = exports.MessageSmsStatus = exports.Element = exports.ReactionType = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.TagsLimitReachedException = exports.ConversationFileCategory = exports.ChannelAlreadyExistException = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ActionTriggerStatus = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.ChannelType = exports.RateLimitExceededException = exports.ForbiddenException = exports.ValidationException = void 0;
4
4
  const ConversationsServiceException_1 = require("./ConversationsServiceException");
5
5
  class ValidationException extends ConversationsServiceException_1.ConversationsServiceException {
6
6
  constructor(opts) {
@@ -139,6 +139,7 @@ exports.ChannelAlreadyExistException = ChannelAlreadyExistException;
139
139
  exports.ConversationFileCategory = {
140
140
  GENERAL: "channels",
141
141
  RECORDING: "recordings",
142
+ WIZY_RECORDING: "wizyconfRecordings",
142
143
  };
143
144
  class TagsLimitReachedException extends ConversationsServiceException_1.ConversationsServiceException {
144
145
  constructor(opts) {
@@ -190,18 +191,6 @@ exports.ReactionType = {
190
191
  THUMBSUP: "thumbsup",
191
192
  WHITE_CHECK_MARK: "white_check_mark",
192
193
  };
193
- exports.WebhookEventType = {
194
- ACTION_TRIGGERED: "chat:action:triggered",
195
- CHANNEL_CREATED: "chat:channel:created",
196
- CHANNEL_UPDATED: "chat:channel:updated",
197
- MEMBER_ADDED: "chat:member:added",
198
- MEMBER_REMOVED: "chat:member:removed",
199
- MESSAGE_DELETED: "chat:message:deleted",
200
- MESSAGE_NEW: "chat:message:new",
201
- MESSAGE_UPDATED: "chat:message:updated",
202
- REACTION_DELETED: "chat:reaction:deleted",
203
- REACTION_NEW: "chat:reaction:new",
204
- };
205
194
  var Element;
206
195
  (function (Element) {
207
196
  Element.visit = (value, visitor) => {
@@ -236,6 +225,18 @@ exports.MessageWhatsAppStatus = {
236
225
  SENT: "sent",
237
226
  TRYING: "trying",
238
227
  };
228
+ exports.WebhookEventType = {
229
+ ACTION_TRIGGERED: "chat:action:triggered",
230
+ CHANNEL_CREATED: "chat:channel:created",
231
+ CHANNEL_UPDATED: "chat:channel:updated",
232
+ MEMBER_ADDED: "chat:member:added",
233
+ MEMBER_REMOVED: "chat:member:removed",
234
+ MESSAGE_DELETED: "chat:message:deleted",
235
+ MESSAGE_NEW: "chat:message:new",
236
+ MESSAGE_UPDATED: "chat:message:updated",
237
+ REACTION_DELETED: "chat:reaction:deleted",
238
+ REACTION_NEW: "chat:reaction:new",
239
+ };
239
240
  class TriggerNotFoundException extends ConversationsServiceException_1.ConversationsServiceException {
240
241
  constructor(opts) {
241
242
  super({
@@ -267,6 +267,7 @@ const se_GetFilePresignedDownloadUrlCommand = async (input, context) => {
267
267
  b.p('fileId', () => input.fileId, '{fileId}', false);
268
268
  const query = (0, smithy_client_1.map)({
269
269
  [_c]: [, input[_c]],
270
+ [_d]: [() => input.download !== void 0, () => (input[_d].toString())],
270
271
  });
271
272
  let body;
272
273
  b.m("GET")
@@ -1066,6 +1067,7 @@ const de_DescribeEventCommand = async (output, context) => {
1066
1067
  });
1067
1068
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
1068
1069
  const doc = (0, smithy_client_1.take)(data, {
1070
+ 'WebhookChatActionTriggeredEvent': smithy_client_1._json,
1069
1071
  'WebhookChatChannelCreatedEvent': smithy_client_1._json,
1070
1072
  'WebhookChatChannelUpdatedEvent': smithy_client_1._json,
1071
1073
  'WebhookChatMemberAddedEvent': smithy_client_1._json,
@@ -1538,7 +1540,11 @@ const de_TriggerMessageActionCommand = async (output, context) => {
1538
1540
  const contents = (0, smithy_client_1.map)({
1539
1541
  $metadata: deserializeMetadata(output),
1540
1542
  });
1541
- await (0, smithy_client_1.collectBody)(output.body, context);
1543
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
1544
+ const doc = (0, smithy_client_1.take)(data, {
1545
+ 'triggerId': smithy_client_1.expectString,
1546
+ });
1547
+ Object.assign(contents, doc);
1542
1548
  return contents;
1543
1549
  };
1544
1550
  exports.de_TriggerMessageActionCommand = de_TriggerMessageActionCommand;
@@ -1933,6 +1939,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1933
1939
  value.length != 0) &&
1934
1940
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1935
1941
  const _c = "category";
1942
+ const _d = "download";
1936
1943
  const _f = "force";
1937
1944
  const _l = "limit";
1938
1945
  const _o = "offset";
@@ -130,6 +130,7 @@ export class ChannelAlreadyExistException extends __BaseException {
130
130
  export const ConversationFileCategory = {
131
131
  GENERAL: "channels",
132
132
  RECORDING: "recordings",
133
+ WIZY_RECORDING: "wizyconfRecordings",
133
134
  };
134
135
  export class TagsLimitReachedException extends __BaseException {
135
136
  constructor(opts) {
@@ -178,18 +179,6 @@ export const ReactionType = {
178
179
  THUMBSUP: "thumbsup",
179
180
  WHITE_CHECK_MARK: "white_check_mark",
180
181
  };
181
- export const WebhookEventType = {
182
- ACTION_TRIGGERED: "chat:action:triggered",
183
- CHANNEL_CREATED: "chat:channel:created",
184
- CHANNEL_UPDATED: "chat:channel:updated",
185
- MEMBER_ADDED: "chat:member:added",
186
- MEMBER_REMOVED: "chat:member:removed",
187
- MESSAGE_DELETED: "chat:message:deleted",
188
- MESSAGE_NEW: "chat:message:new",
189
- MESSAGE_UPDATED: "chat:message:updated",
190
- REACTION_DELETED: "chat:reaction:deleted",
191
- REACTION_NEW: "chat:reaction:new",
192
- };
193
182
  export var Element;
194
183
  (function (Element) {
195
184
  Element.visit = (value, visitor) => {
@@ -224,6 +213,18 @@ export const MessageWhatsAppStatus = {
224
213
  SENT: "sent",
225
214
  TRYING: "trying",
226
215
  };
216
+ export const WebhookEventType = {
217
+ ACTION_TRIGGERED: "chat:action:triggered",
218
+ CHANNEL_CREATED: "chat:channel:created",
219
+ CHANNEL_UPDATED: "chat:channel:updated",
220
+ MEMBER_ADDED: "chat:member:added",
221
+ MEMBER_REMOVED: "chat:member:removed",
222
+ MESSAGE_DELETED: "chat:message:deleted",
223
+ MESSAGE_NEW: "chat:message:new",
224
+ MESSAGE_UPDATED: "chat:message:updated",
225
+ REACTION_DELETED: "chat:reaction:deleted",
226
+ REACTION_NEW: "chat:reaction:new",
227
+ };
227
228
  export class TriggerNotFoundException extends __BaseException {
228
229
  constructor(opts) {
229
230
  super({
@@ -249,6 +249,7 @@ export const se_GetFilePresignedDownloadUrlCommand = async (input, context) => {
249
249
  b.p('fileId', () => input.fileId, '{fileId}', false);
250
250
  const query = map({
251
251
  [_c]: [, input[_c]],
252
+ [_d]: [() => input.download !== void 0, () => (input[_d].toString())],
252
253
  });
253
254
  let body;
254
255
  b.m("GET")
@@ -1003,6 +1004,7 @@ export const de_DescribeEventCommand = async (output, context) => {
1003
1004
  });
1004
1005
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
1005
1006
  const doc = take(data, {
1007
+ 'WebhookChatActionTriggeredEvent': _json,
1006
1008
  'WebhookChatChannelCreatedEvent': _json,
1007
1009
  'WebhookChatChannelUpdatedEvent': _json,
1008
1010
  'WebhookChatMemberAddedEvent': _json,
@@ -1441,7 +1443,11 @@ export const de_TriggerMessageActionCommand = async (output, context) => {
1441
1443
  const contents = map({
1442
1444
  $metadata: deserializeMetadata(output),
1443
1445
  });
1444
- await collectBody(output.body, context);
1446
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
1447
+ const doc = take(data, {
1448
+ 'triggerId': __expectString,
1449
+ });
1450
+ Object.assign(contents, doc);
1445
1451
  return contents;
1446
1452
  };
1447
1453
  export const de_UnpinChannelCommand = async (output, context) => {
@@ -1829,6 +1835,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1829
1835
  value.length != 0) &&
1830
1836
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1831
1837
  const _c = "category";
1838
+ const _d = "download";
1832
1839
  const _f = "force";
1833
1840
  const _l = "limit";
1834
1841
  const _o = "offset";
@@ -1094,6 +1094,21 @@ declare const DescribeEventCommand_base: {
1094
1094
  * // reaction: "<Reaction>", // required
1095
1095
  * // },
1096
1096
  * // },
1097
+ * // WebhookChatActionTriggeredEvent: { // WebhookChatActionTriggeredEvent
1098
+ * // id: "STRING_VALUE", // required
1099
+ * // company: "STRING_VALUE", // required
1100
+ * // type: "chat:channel:created" || "chat:channel:updated" || "chat:member:added" || "chat:member:removed" || "chat:message:new" || "chat:message:updated" || "chat:message:deleted" || "chat:reaction:new" || "chat:reaction:deleted" || "chat:action:triggered", // required
1101
+ * // time: Number("long"), // required
1102
+ * // integrationId: "STRING_VALUE",
1103
+ * // botId: "STRING_VALUE",
1104
+ * // data: { // WebhookChatActionTriggeredEventData
1105
+ * // channel: "<Channel>", // required
1106
+ * // message: "<Message>", // required
1107
+ * // user: "<User>", // required
1108
+ * // actionId: "STRING_VALUE", // required
1109
+ * // triggerId: "STRING_VALUE", // required
1110
+ * // },
1111
+ * // },
1097
1112
  * // };
1098
1113
  *
1099
1114
  * ```
@@ -38,7 +38,8 @@ declare const GetFilePresignedDownloadUrlCommand_base: {
38
38
  * channelId: "STRING_VALUE", // required
39
39
  * messageId: "STRING_VALUE", // required
40
40
  * fileId: "STRING_VALUE", // required
41
- * category: "channels" || "recordings",
41
+ * category: "channels" || "recordings" || "wizyconfRecordings",
42
+ * download: Number("int"),
42
43
  * };
43
44
  * const command = new GetFilePresignedDownloadUrlCommand(input);
44
45
  * const response = await client.send(command);
@@ -37,7 +37,7 @@ declare const GetUploadedFileInfoCommand_base: {
37
37
  * const input = { // GetUploadedFileInfoInput
38
38
  * channelId: "STRING_VALUE", // required
39
39
  * fileId: "STRING_VALUE", // required
40
- * category: "channels" || "recordings",
40
+ * category: "channels" || "recordings" || "wizyconfRecordings",
41
41
  * };
42
42
  * const command = new GetUploadedFileInfoCommand(input);
43
43
  * const response = await client.send(command);
@@ -42,7 +42,9 @@ declare const TriggerMessageActionCommand_base: {
42
42
  * };
43
43
  * const command = new TriggerMessageActionCommand(input);
44
44
  * const response = await client.send(command);
45
- * // {};
45
+ * // { // TriggerMessageActionOutput
46
+ * // triggerId: "STRING_VALUE", // required
47
+ * // };
46
48
  *
47
49
  * ```
48
50
  *
@@ -39,7 +39,7 @@ declare const UploadFileCommand_base: {
39
39
  * name: "STRING_VALUE", // required
40
40
  * userId: "STRING_VALUE",
41
41
  * options: { // UploadFileOptions
42
- * category: "channels" || "recordings",
42
+ * category: "channels" || "recordings" || "wizyconfRecordings",
43
43
  * region: "STRING_VALUE",
44
44
  * },
45
45
  * };
@@ -491,6 +491,7 @@ export declare class ChannelAlreadyExistException extends __BaseException {
491
491
  export declare const ConversationFileCategory: {
492
492
  readonly GENERAL: "channels";
493
493
  readonly RECORDING: "recordings";
494
+ readonly WIZY_RECORDING: "wizyconfRecordings";
494
495
  };
495
496
  /**
496
497
  * @public
@@ -767,90 +768,6 @@ export interface DeleteMessageReactionOutput {
767
768
  */
768
769
  export interface DescribeEventInput {
769
770
  }
770
- /**
771
- * @public
772
- */
773
- export interface WebhookChatChannelCreatedOrUpdatedEventData {
774
- channel: Channel;
775
- members: (ChannelMember)[];
776
- users: (User)[];
777
- }
778
- /**
779
- * @public
780
- * @enum
781
- */
782
- export declare const WebhookEventType: {
783
- readonly ACTION_TRIGGERED: "chat:action:triggered";
784
- readonly CHANNEL_CREATED: "chat:channel:created";
785
- readonly CHANNEL_UPDATED: "chat:channel:updated";
786
- readonly MEMBER_ADDED: "chat:member:added";
787
- readonly MEMBER_REMOVED: "chat:member:removed";
788
- readonly MESSAGE_DELETED: "chat:message:deleted";
789
- readonly MESSAGE_NEW: "chat:message:new";
790
- readonly MESSAGE_UPDATED: "chat:message:updated";
791
- readonly REACTION_DELETED: "chat:reaction:deleted";
792
- readonly REACTION_NEW: "chat:reaction:new";
793
- };
794
- /**
795
- * @public
796
- */
797
- export type WebhookEventType = typeof WebhookEventType[keyof typeof WebhookEventType];
798
- /**
799
- * @public
800
- */
801
- export interface WebhookChatChannelCreatedEvent {
802
- id: string;
803
- company: string;
804
- type: WebhookEventType;
805
- time: number;
806
- integrationId?: string;
807
- botId?: string;
808
- data: WebhookChatChannelCreatedOrUpdatedEventData;
809
- }
810
- /**
811
- * @public
812
- */
813
- export interface WebhookChatChannelUpdatedEvent {
814
- id: string;
815
- company: string;
816
- type: WebhookEventType;
817
- time: number;
818
- integrationId?: string;
819
- botId?: string;
820
- data: WebhookChatChannelCreatedOrUpdatedEventData;
821
- }
822
- /**
823
- * @public
824
- */
825
- export interface WebhookChatMemberAddedOrRemovedEventData {
826
- channel: Channel;
827
- member: ChannelMember;
828
- user: User;
829
- }
830
- /**
831
- * @public
832
- */
833
- export interface WebhookChatMemberAddedEvent {
834
- id: string;
835
- company: string;
836
- type: WebhookEventType;
837
- time: number;
838
- integrationId?: string;
839
- botId?: string;
840
- data: WebhookChatMemberAddedOrRemovedEventData;
841
- }
842
- /**
843
- * @public
844
- */
845
- export interface WebhookChatMemberRemovedEvent {
846
- id: string;
847
- company: string;
848
- type: WebhookEventType;
849
- time: number;
850
- integrationId?: string;
851
- botId?: string;
852
- data: WebhookChatMemberAddedOrRemovedEventData;
853
- }
854
771
  /**
855
772
  * @public
856
773
  */
@@ -1136,6 +1053,112 @@ export interface Message {
1136
1053
  createdAt: string;
1137
1054
  updatedAt?: string;
1138
1055
  }
1056
+ /**
1057
+ * @public
1058
+ */
1059
+ export interface WebhookChatActionTriggeredEventData {
1060
+ channel: Channel;
1061
+ message: Message;
1062
+ user: User;
1063
+ actionId: string;
1064
+ triggerId: string;
1065
+ }
1066
+ /**
1067
+ * @public
1068
+ * @enum
1069
+ */
1070
+ export declare const WebhookEventType: {
1071
+ readonly ACTION_TRIGGERED: "chat:action:triggered";
1072
+ readonly CHANNEL_CREATED: "chat:channel:created";
1073
+ readonly CHANNEL_UPDATED: "chat:channel:updated";
1074
+ readonly MEMBER_ADDED: "chat:member:added";
1075
+ readonly MEMBER_REMOVED: "chat:member:removed";
1076
+ readonly MESSAGE_DELETED: "chat:message:deleted";
1077
+ readonly MESSAGE_NEW: "chat:message:new";
1078
+ readonly MESSAGE_UPDATED: "chat:message:updated";
1079
+ readonly REACTION_DELETED: "chat:reaction:deleted";
1080
+ readonly REACTION_NEW: "chat:reaction:new";
1081
+ };
1082
+ /**
1083
+ * @public
1084
+ */
1085
+ export type WebhookEventType = typeof WebhookEventType[keyof typeof WebhookEventType];
1086
+ /**
1087
+ * @public
1088
+ */
1089
+ export interface WebhookChatActionTriggeredEvent {
1090
+ id: string;
1091
+ company: string;
1092
+ type: WebhookEventType;
1093
+ time: number;
1094
+ integrationId?: string;
1095
+ botId?: string;
1096
+ data: WebhookChatActionTriggeredEventData;
1097
+ }
1098
+ /**
1099
+ * @public
1100
+ */
1101
+ export interface WebhookChatChannelCreatedOrUpdatedEventData {
1102
+ channel: Channel;
1103
+ members: (ChannelMember)[];
1104
+ users: (User)[];
1105
+ }
1106
+ /**
1107
+ * @public
1108
+ */
1109
+ export interface WebhookChatChannelCreatedEvent {
1110
+ id: string;
1111
+ company: string;
1112
+ type: WebhookEventType;
1113
+ time: number;
1114
+ integrationId?: string;
1115
+ botId?: string;
1116
+ data: WebhookChatChannelCreatedOrUpdatedEventData;
1117
+ }
1118
+ /**
1119
+ * @public
1120
+ */
1121
+ export interface WebhookChatChannelUpdatedEvent {
1122
+ id: string;
1123
+ company: string;
1124
+ type: WebhookEventType;
1125
+ time: number;
1126
+ integrationId?: string;
1127
+ botId?: string;
1128
+ data: WebhookChatChannelCreatedOrUpdatedEventData;
1129
+ }
1130
+ /**
1131
+ * @public
1132
+ */
1133
+ export interface WebhookChatMemberAddedOrRemovedEventData {
1134
+ channel: Channel;
1135
+ member: ChannelMember;
1136
+ user: User;
1137
+ }
1138
+ /**
1139
+ * @public
1140
+ */
1141
+ export interface WebhookChatMemberAddedEvent {
1142
+ id: string;
1143
+ company: string;
1144
+ type: WebhookEventType;
1145
+ time: number;
1146
+ integrationId?: string;
1147
+ botId?: string;
1148
+ data: WebhookChatMemberAddedOrRemovedEventData;
1149
+ }
1150
+ /**
1151
+ * @public
1152
+ */
1153
+ export interface WebhookChatMemberRemovedEvent {
1154
+ id: string;
1155
+ company: string;
1156
+ type: WebhookEventType;
1157
+ time: number;
1158
+ integrationId?: string;
1159
+ botId?: string;
1160
+ data: WebhookChatMemberAddedOrRemovedEventData;
1161
+ }
1139
1162
  /**
1140
1163
  * @public
1141
1164
  */
@@ -1233,6 +1256,7 @@ export interface DescribeEventOutput {
1233
1256
  WebhookChatMessageDeletedEvent?: WebhookChatMessageDeletedEvent;
1234
1257
  WebhookChatReactionNewEvent?: WebhookChatReactionNewEvent;
1235
1258
  WebhookChatReactionDeletedEvent?: WebhookChatReactionDeletedEvent;
1259
+ WebhookChatActionTriggeredEvent?: WebhookChatActionTriggeredEvent;
1236
1260
  }
1237
1261
  /**
1238
1262
  * @public
@@ -1374,6 +1398,11 @@ export interface GetFilePresignedDownloadUrlInput {
1374
1398
  * @public
1375
1399
  */
1376
1400
  category?: ConversationFileCategory;
1401
+ /**
1402
+ * URL behavior, 0 - open(play) for audio/video, others are downloaded; 1 — always download.
1403
+ * @public
1404
+ */
1405
+ download?: number;
1377
1406
  }
1378
1407
  /**
1379
1408
  * @public
@@ -2303,6 +2332,7 @@ export interface TriggerMessageActionInput {
2303
2332
  * @public
2304
2333
  */
2305
2334
  export interface TriggerMessageActionOutput {
2335
+ triggerId: string;
2306
2336
  }
2307
2337
  /**
2308
2338
  * @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/xbees-conversations-client",
3
3
  "description": "@wildix/xbees-conversations-client client",
4
- "version": "1.0.61",
4
+ "version": "1.0.63",
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",