@wildix/xbees-conversations-client 1.0.52 → 1.0.54

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.
Files changed (58) hide show
  1. package/dist-cjs/Conversations.js +2 -0
  2. package/dist-cjs/ConversationsClient.js +7 -2
  3. package/dist-cjs/commands/CreateKiteChannelCommand.js +21 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/models/models_0.js +52 -22
  6. package/dist-cjs/protocols/Aws_restJson1.js +81 -7
  7. package/dist-es/Conversations.js +2 -0
  8. package/dist-es/ConversationsClient.js +7 -2
  9. package/dist-es/commands/CreateKiteChannelCommand.js +17 -0
  10. package/dist-es/commands/index.js +1 -0
  11. package/dist-es/models/models_0.js +48 -20
  12. package/dist-es/protocols/Aws_restJson1.js +78 -6
  13. package/dist-types/Conversations.d.ts +7 -0
  14. package/dist-types/ConversationsClient.d.ts +6 -4
  15. package/dist-types/commands/AddChannelMemberCommand.d.ts +1 -1
  16. package/dist-types/commands/AddChannelMembersCommand.d.ts +1 -1
  17. package/dist-types/commands/CreateGroupChannelCommand.d.ts +1 -1
  18. package/dist-types/commands/CreateKiteChannelCommand.d.ts +300 -0
  19. package/dist-types/commands/DeleteChannelCommand.d.ts +1 -1
  20. package/dist-types/commands/DeleteChannelMemberCommand.d.ts +1 -1
  21. package/dist-types/commands/DeleteMessageCommand.d.ts +1 -1
  22. package/dist-types/commands/DeleteMessageReactionCommand.d.ts +1 -1
  23. package/dist-types/commands/DescribeEventCommand.d.ts +56 -26
  24. package/dist-types/commands/GetChannelCommand.d.ts +1 -1
  25. package/dist-types/commands/GetChannelMemberCommand.d.ts +1 -1
  26. package/dist-types/commands/GetDirectChannelIdCommand.d.ts +1 -1
  27. package/dist-types/commands/GetFilePresignedDownloadUrlCommand.d.ts +1 -1
  28. package/dist-types/commands/GetMessageCommand.d.ts +17 -11
  29. package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +1 -1
  30. package/dist-types/commands/GetUploadedFileInfoCommand.d.ts +1 -1
  31. package/dist-types/commands/HideChannelCommand.d.ts +1 -1
  32. package/dist-types/commands/InviteCommand.d.ts +1 -1
  33. package/dist-types/commands/JoinChannelCommand.d.ts +1 -1
  34. package/dist-types/commands/LeaveChannelCommand.d.ts +1 -1
  35. package/dist-types/commands/ListChannelMembersCommand.d.ts +1 -1
  36. package/dist-types/commands/ListChannelsCommand.d.ts +1 -1
  37. package/dist-types/commands/ListMessageReactionsCommand.d.ts +1 -1
  38. package/dist-types/commands/ListMessagesCommand.d.ts +17 -11
  39. package/dist-types/commands/MarkReadCommand.d.ts +1 -1
  40. package/dist-types/commands/PartialUpdateChannelCommand.d.ts +1 -1
  41. package/dist-types/commands/PartialUpdateMessageCommand.d.ts +28 -16
  42. package/dist-types/commands/ScheduleExternalFlagAdjustmentJobCommand.d.ts +1 -1
  43. package/dist-types/commands/SendGiphyCommand.d.ts +22 -16
  44. package/dist-types/commands/SendMessageCommand.d.ts +28 -16
  45. package/dist-types/commands/SendMessageReactionCommand.d.ts +1 -1
  46. package/dist-types/commands/SendTypingStartCommand.d.ts +1 -1
  47. package/dist-types/commands/SendTypingStopCommand.d.ts +1 -1
  48. package/dist-types/commands/ShowChannelCommand.d.ts +1 -1
  49. package/dist-types/commands/UpdateChannelCommand.d.ts +1 -1
  50. package/dist-types/commands/UpdateMessageCommand.d.ts +28 -16
  51. package/dist-types/commands/UploadFileCommand.d.ts +1 -1
  52. package/dist-types/commands/index.d.ts +1 -0
  53. package/dist-types/models/models_0.d.ts +252 -95
  54. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  55. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  56. package/dist-types/runtimeConfig.d.ts +1 -0
  57. package/dist-types/runtimeConfig.native.d.ts +1 -0
  58. package/package.json +1 -1
@@ -5,6 +5,7 @@ const ConversationsClient_1 = require("./ConversationsClient");
5
5
  const AddChannelMemberCommand_1 = require("./commands/AddChannelMemberCommand");
6
6
  const AddChannelMembersCommand_1 = require("./commands/AddChannelMembersCommand");
7
7
  const CreateGroupChannelCommand_1 = require("./commands/CreateGroupChannelCommand");
8
+ const CreateKiteChannelCommand_1 = require("./commands/CreateKiteChannelCommand");
8
9
  const DeleteChannelCommand_1 = require("./commands/DeleteChannelCommand");
9
10
  const DeleteChannelMemberCommand_1 = require("./commands/DeleteChannelMemberCommand");
10
11
  const DeleteMessageCommand_1 = require("./commands/DeleteMessageCommand");
@@ -43,6 +44,7 @@ const commands = {
43
44
  AddChannelMemberCommand: AddChannelMemberCommand_1.AddChannelMemberCommand,
44
45
  AddChannelMembersCommand: AddChannelMembersCommand_1.AddChannelMembersCommand,
45
46
  CreateGroupChannelCommand: CreateGroupChannelCommand_1.CreateGroupChannelCommand,
47
+ CreateKiteChannelCommand: CreateKiteChannelCommand_1.CreateKiteChannelCommand,
46
48
  DeleteChannelCommand: DeleteChannelCommand_1.DeleteChannelCommand,
47
49
  DeleteChannelMemberCommand: DeleteChannelMemberCommand_1.DeleteChannelMemberCommand,
48
50
  DeleteMessageCommand: DeleteMessageCommand_1.DeleteMessageCommand,
@@ -4,6 +4,8 @@ exports.ConversationsClient = exports.__Client = void 0;
4
4
  const runtimeConfig_1 = require("./runtimeConfig");
5
5
  const runtimeExtensions_1 = require("./runtimeExtensions");
6
6
  const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
7
+ const middleware_content_length_1 = require("@smithy/middleware-content-length");
8
+ const middleware_retry_1 = require("@smithy/middleware-retry");
7
9
  const smithy_client_1 = require("@smithy/smithy-client");
8
10
  Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
9
11
  const smithy_utils_1 = require("@wildix/smithy-utils");
@@ -11,7 +13,8 @@ class ConversationsClient extends smithy_client_1.Client {
11
13
  constructor(...[configuration]) {
12
14
  let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
13
15
  let _config_1 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_0);
14
- let _config_2 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_1, configuration?.extensions || []);
16
+ let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
17
+ let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
15
18
  const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `api-${configuration.env}.x-bees.com` : 'api.x-bees.com';
16
19
  const endpoint = () => {
17
20
  return {
@@ -22,13 +25,15 @@ class ConversationsClient extends smithy_client_1.Client {
22
25
  };
23
26
  };
24
27
  const config = {
25
- ..._config_2,
28
+ ..._config_3,
26
29
  endpoint,
27
30
  };
28
31
  super(config);
29
32
  this.config = config;
30
33
  this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
31
34
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
35
+ this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
36
+ this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
32
37
  }
33
38
  destroy() {
34
39
  super.destroy();
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateKiteChannelCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class CreateKiteChannelCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("Conversations", "CreateKiteChannel", {})
15
+ .n("ConversationsClient", "CreateKiteChannelCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_CreateKiteChannelCommand)
18
+ .de(Aws_restJson1_1.de_CreateKiteChannelCommand)
19
+ .build() {
20
+ }
21
+ exports.CreateKiteChannelCommand = CreateKiteChannelCommand;
@@ -4,6 +4,7 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./AddChannelMemberCommand"), exports);
5
5
  tslib_1.__exportStar(require("./AddChannelMembersCommand"), exports);
6
6
  tslib_1.__exportStar(require("./CreateGroupChannelCommand"), exports);
7
+ tslib_1.__exportStar(require("./CreateKiteChannelCommand"), exports);
7
8
  tslib_1.__exportStar(require("./DeleteChannelCommand"), exports);
8
9
  tslib_1.__exportStar(require("./DeleteChannelMemberCommand"), exports);
9
10
  tslib_1.__exportStar(require("./DeleteMessageCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConversationsServiceException = exports.MessageUnsetFields = exports.GroupChannelUnsetOptions = exports.FileNotFoundException = exports.MessageWhatsAppStatus = exports.MessageType = exports.MessageSmsStatus = exports.WebhookEventType = exports.ReactionType = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.ConversationFileCategory = exports.ChannelAlreadyExistException = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ChannelType = exports.LimitExceededException = exports.ForbiddenException = exports.ValidationException = void 0;
3
+ exports.ConversationsServiceException = exports.MessageUnsetFields = exports.GroupChannelUnsetOptions = exports.FileNotFoundException = exports.WebhookEventType = exports.ReactionType = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.TargetNotFoundException = exports.TargetNotEligibleException = exports.TargetNotEligibleReason = exports.MessageWhatsAppStatus = exports.MessageType = exports.MessageSmsStatus = exports.ConversationFileCategory = exports.ChannelAlreadyExistException = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = 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) {
@@ -28,23 +28,23 @@ class ForbiddenException extends ConversationsServiceException_1.ConversationsSe
28
28
  }
29
29
  }
30
30
  exports.ForbiddenException = ForbiddenException;
31
- class LimitExceededException extends ConversationsServiceException_1.ConversationsServiceException {
31
+ class RateLimitExceededException extends ConversationsServiceException_1.ConversationsServiceException {
32
32
  constructor(opts) {
33
33
  super({
34
- name: "LimitExceededException",
34
+ name: "RateLimitExceededException",
35
35
  $fault: "client",
36
36
  ...opts
37
37
  });
38
- this.name = "LimitExceededException";
38
+ this.name = "RateLimitExceededException";
39
39
  this.$fault = "client";
40
- Object.setPrototypeOf(this, LimitExceededException.prototype);
40
+ Object.setPrototypeOf(this, RateLimitExceededException.prototype);
41
41
  this.rateLimit = opts.rateLimit;
42
42
  this.rateLimitRemaining = opts.rateLimitRemaining;
43
43
  this.rateLimitReset = opts.rateLimitReset;
44
44
  this.retryAfter = opts.retryAfter;
45
45
  }
46
46
  }
47
- exports.LimitExceededException = LimitExceededException;
47
+ exports.RateLimitExceededException = RateLimitExceededException;
48
48
  exports.ChannelType = {
49
49
  DIRECT: "direct",
50
50
  GROUP: "group",
@@ -112,6 +112,52 @@ exports.ConversationFileCategory = {
112
112
  GENERAL: "channels",
113
113
  RECORDING: "recordings",
114
114
  };
115
+ exports.MessageSmsStatus = {
116
+ DELIVERED: "delivered",
117
+ ERROR: "error",
118
+ SENT: "sent",
119
+ TRYING: "trying",
120
+ };
121
+ exports.MessageType = {
122
+ REGULAR: "regular",
123
+ SYSTEM: "system",
124
+ };
125
+ exports.MessageWhatsAppStatus = {
126
+ DELIVERED: "delivered",
127
+ ERROR: "error",
128
+ SENT: "sent",
129
+ TRYING: "trying",
130
+ };
131
+ exports.TargetNotEligibleReason = {
132
+ NO_LICENSE: "no_license",
133
+ };
134
+ class TargetNotEligibleException extends ConversationsServiceException_1.ConversationsServiceException {
135
+ constructor(opts) {
136
+ super({
137
+ name: "TargetNotEligibleException",
138
+ $fault: "client",
139
+ ...opts
140
+ });
141
+ this.name = "TargetNotEligibleException";
142
+ this.$fault = "client";
143
+ Object.setPrototypeOf(this, TargetNotEligibleException.prototype);
144
+ this.reason = opts.reason;
145
+ }
146
+ }
147
+ exports.TargetNotEligibleException = TargetNotEligibleException;
148
+ class TargetNotFoundException extends ConversationsServiceException_1.ConversationsServiceException {
149
+ constructor(opts) {
150
+ super({
151
+ name: "TargetNotFoundException",
152
+ $fault: "client",
153
+ ...opts
154
+ });
155
+ this.name = "TargetNotFoundException";
156
+ this.$fault = "client";
157
+ Object.setPrototypeOf(this, TargetNotFoundException.prototype);
158
+ }
159
+ }
160
+ exports.TargetNotFoundException = TargetNotFoundException;
115
161
  class MemberNotFoundException extends ConversationsServiceException_1.ConversationsServiceException {
116
162
  constructor(opts) {
117
163
  super({
@@ -160,22 +206,6 @@ exports.WebhookEventType = {
160
206
  REACTION_DELETED: "chat:reaction:deleted",
161
207
  REACTION_NEW: "chat:reaction:new",
162
208
  };
163
- exports.MessageSmsStatus = {
164
- DELIVERED: "delivered",
165
- ERROR: "error",
166
- SENT: "sent",
167
- TRYING: "trying",
168
- };
169
- exports.MessageType = {
170
- REGULAR: "regular",
171
- SYSTEM: "system",
172
- };
173
- exports.MessageWhatsAppStatus = {
174
- DELIVERED: "delivered",
175
- ERROR: "error",
176
- SENT: "sent",
177
- TRYING: "trying",
178
- };
179
209
  class FileNotFoundException extends ConversationsServiceException_1.ConversationsServiceException {
180
210
  constructor(opts) {
181
211
  super({
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageCommand = exports.de_GetFilePresignedDownloadUrlCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_DescribeEventCommand = exports.de_DeleteMessageReactionCommand = exports.de_DeleteMessageCommand = exports.de_DeleteChannelMemberCommand = exports.de_DeleteChannelCommand = exports.de_CreateGroupChannelCommand = exports.de_AddChannelMembersCommand = exports.de_AddChannelMemberCommand = exports.se_UploadFileCommand = exports.se_UpdateMessageCommand = exports.se_UpdateChannelCommand = exports.se_ShowChannelCommand = exports.se_SendTypingStopCommand = exports.se_SendTypingStartCommand = exports.se_SendMessageReactionCommand = exports.se_SendMessageCommand = exports.se_SendGiphyCommand = exports.se_ScheduleExternalFlagAdjustmentJobCommand = exports.se_PartialUpdateMessageCommand = exports.se_PartialUpdateChannelCommand = exports.se_MarkReadCommand = exports.se_ListMessagesCommand = exports.se_ListMessageReactionsCommand = exports.se_ListChannelsCommand = exports.se_ListChannelMembersCommand = exports.se_LeaveChannelCommand = exports.se_JoinChannelCommand = exports.se_InviteCommand = exports.se_HideChannelCommand = exports.se_GetUploadedFileInfoCommand = exports.se_GetOrCreateDirectChannelCommand = exports.se_GetMessageCommand = exports.se_GetFilePresignedDownloadUrlCommand = exports.se_GetDirectChannelIdCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_DescribeEventCommand = exports.se_DeleteMessageReactionCommand = exports.se_DeleteMessageCommand = exports.se_DeleteChannelMemberCommand = exports.se_DeleteChannelCommand = exports.se_CreateGroupChannelCommand = exports.se_AddChannelMembersCommand = exports.se_AddChannelMemberCommand = void 0;
4
- exports.de_UploadFileCommand = exports.de_UpdateMessageCommand = exports.de_UpdateChannelCommand = exports.de_ShowChannelCommand = exports.de_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_ScheduleExternalFlagAdjustmentJobCommand = exports.de_PartialUpdateMessageCommand = exports.de_PartialUpdateChannelCommand = exports.de_MarkReadCommand = exports.de_ListMessagesCommand = exports.de_ListMessageReactionsCommand = exports.de_ListChannelsCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_HideChannelCommand = exports.de_GetUploadedFileInfoCommand = void 0;
3
+ exports.de_GetFilePresignedDownloadUrlCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_DescribeEventCommand = exports.de_DeleteMessageReactionCommand = exports.de_DeleteMessageCommand = exports.de_DeleteChannelMemberCommand = exports.de_DeleteChannelCommand = exports.de_CreateKiteChannelCommand = exports.de_CreateGroupChannelCommand = exports.de_AddChannelMembersCommand = exports.de_AddChannelMemberCommand = exports.se_UploadFileCommand = exports.se_UpdateMessageCommand = exports.se_UpdateChannelCommand = exports.se_ShowChannelCommand = exports.se_SendTypingStopCommand = exports.se_SendTypingStartCommand = exports.se_SendMessageReactionCommand = exports.se_SendMessageCommand = exports.se_SendGiphyCommand = exports.se_ScheduleExternalFlagAdjustmentJobCommand = exports.se_PartialUpdateMessageCommand = exports.se_PartialUpdateChannelCommand = exports.se_MarkReadCommand = exports.se_ListMessagesCommand = exports.se_ListMessageReactionsCommand = exports.se_ListChannelsCommand = exports.se_ListChannelMembersCommand = exports.se_LeaveChannelCommand = exports.se_JoinChannelCommand = exports.se_InviteCommand = exports.se_HideChannelCommand = exports.se_GetUploadedFileInfoCommand = exports.se_GetOrCreateDirectChannelCommand = exports.se_GetMessageCommand = exports.se_GetFilePresignedDownloadUrlCommand = exports.se_GetDirectChannelIdCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_DescribeEventCommand = exports.se_DeleteMessageReactionCommand = exports.se_DeleteMessageCommand = exports.se_DeleteChannelMemberCommand = exports.se_DeleteChannelCommand = exports.se_CreateKiteChannelCommand = exports.se_CreateGroupChannelCommand = exports.se_AddChannelMembersCommand = exports.se_AddChannelMemberCommand = void 0;
4
+ exports.de_UploadFileCommand = exports.de_UpdateMessageCommand = exports.de_UpdateChannelCommand = exports.de_ShowChannelCommand = exports.de_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_ScheduleExternalFlagAdjustmentJobCommand = exports.de_PartialUpdateMessageCommand = exports.de_PartialUpdateChannelCommand = exports.de_MarkReadCommand = exports.de_ListMessagesCommand = exports.de_ListMessageReactionsCommand = exports.de_ListChannelsCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_HideChannelCommand = exports.de_GetUploadedFileInfoCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageCommand = void 0;
5
5
  const ConversationsServiceException_1 = require("../models/ConversationsServiceException");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const core_1 = require("@smithy/core");
@@ -80,6 +80,30 @@ const se_CreateGroupChannelCommand = async (input, context) => {
80
80
  return b.build();
81
81
  };
82
82
  exports.se_CreateGroupChannelCommand = se_CreateGroupChannelCommand;
83
+ const se_CreateKiteChannelCommand = async (input, context) => {
84
+ const b = (0, core_1.requestBuilder)(input, context);
85
+ const headers = {
86
+ 'content-type': 'application/json',
87
+ };
88
+ b.bp("/v2/conversations/kite");
89
+ const query = (0, smithy_client_1.map)({
90
+ [_u]: [, input[_uI]],
91
+ });
92
+ let body;
93
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
94
+ 'channelId': [],
95
+ 'initialMessage': _ => (0, smithy_client_1._json)(_),
96
+ 'targetId': [],
97
+ 'targetRouteId': [],
98
+ 'welcomeMessages': _ => (0, smithy_client_1._json)(_),
99
+ }));
100
+ b.m("POST")
101
+ .h(headers)
102
+ .q(query)
103
+ .b(body);
104
+ return b.build();
105
+ };
106
+ exports.se_CreateKiteChannelCommand = se_CreateKiteChannelCommand;
83
107
  const se_DeleteChannelCommand = async (input, context) => {
84
108
  const b = (0, core_1.requestBuilder)(input, context);
85
109
  const headers = {};
@@ -533,6 +557,7 @@ const se_SendMessageCommand = async (input, context) => {
533
557
  'forward': _ => (0, smithy_client_1._json)(_),
534
558
  'mentions': _ => (0, smithy_client_1._json)(_),
535
559
  'messageId': [],
560
+ 'predefinedReplies': _ => (0, smithy_client_1._json)(_),
536
561
  'quote': _ => (0, smithy_client_1._json)(_),
537
562
  'text': [],
538
563
  }));
@@ -656,6 +681,7 @@ const se_UpdateMessageCommand = async (input, context) => {
656
681
  'attachments': _ => (0, smithy_client_1._json)(_),
657
682
  'forward': _ => (0, smithy_client_1._json)(_),
658
683
  'mentions': _ => (0, smithy_client_1._json)(_),
684
+ 'predefinedReplies': _ => (0, smithy_client_1._json)(_),
659
685
  'quote': _ => (0, smithy_client_1._json)(_),
660
686
  'text': [],
661
687
  }));
@@ -731,6 +757,21 @@ const de_CreateGroupChannelCommand = async (output, context) => {
731
757
  return contents;
732
758
  };
733
759
  exports.de_CreateGroupChannelCommand = de_CreateGroupChannelCommand;
760
+ const de_CreateKiteChannelCommand = async (output, context) => {
761
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
762
+ return de_CommandError(output, context);
763
+ }
764
+ const contents = (0, smithy_client_1.map)({
765
+ $metadata: deserializeMetadata(output),
766
+ });
767
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
768
+ const doc = (0, smithy_client_1.take)(data, {
769
+ 'channel': smithy_client_1._json,
770
+ });
771
+ Object.assign(contents, doc);
772
+ return contents;
773
+ };
774
+ exports.de_CreateKiteChannelCommand = de_CreateKiteChannelCommand;
734
775
  const de_DeleteChannelCommand = async (output, context) => {
735
776
  if (output.statusCode !== 200 && output.statusCode >= 300) {
736
777
  return de_CommandError(output, context);
@@ -1202,18 +1243,24 @@ const de_CommandError = async (output, context) => {
1202
1243
  case "ForbiddenException":
1203
1244
  case "smithy.framework#ForbiddenException":
1204
1245
  throw await de_ForbiddenExceptionRes(parsedOutput, context);
1205
- case "LimitExceededException":
1206
- case "smithy.framework#LimitExceededException":
1207
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1208
1246
  case "MemberAlreadyExistException":
1209
1247
  case "wildix.xbees.conversations#MemberAlreadyExistException":
1210
1248
  throw await de_MemberAlreadyExistExceptionRes(parsedOutput, context);
1249
+ case "RateLimitExceededException":
1250
+ case "smithy.framework#RateLimitExceededException":
1251
+ throw await de_RateLimitExceededExceptionRes(parsedOutput, context);
1211
1252
  case "ValidationException":
1212
1253
  case "smithy.framework#ValidationException":
1213
1254
  throw await de_ValidationExceptionRes(parsedOutput, context);
1214
1255
  case "ChannelAlreadyExistException":
1215
1256
  case "wildix.xbees.conversations#ChannelAlreadyExistException":
1216
1257
  throw await de_ChannelAlreadyExistExceptionRes(parsedOutput, context);
1258
+ case "TargetNotEligibleException":
1259
+ case "wildix.xbees.conversations#TargetNotEligibleException":
1260
+ throw await de_TargetNotEligibleExceptionRes(parsedOutput, context);
1261
+ case "TargetNotFoundException":
1262
+ case "wildix.xbees.conversations#TargetNotFoundException":
1263
+ throw await de_TargetNotFoundExceptionRes(parsedOutput, context);
1217
1264
  case "MemberNotFoundException":
1218
1265
  case "wildix.xbees.conversations#MemberNotFoundException":
1219
1266
  throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
@@ -1249,7 +1296,7 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1249
1296
  });
1250
1297
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1251
1298
  };
1252
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1299
+ const de_RateLimitExceededExceptionRes = async (parsedOutput, context) => {
1253
1300
  const contents = (0, smithy_client_1.map)({
1254
1301
  [_rL]: [, parsedOutput.headers[_xrl]],
1255
1302
  [_rLR]: [() => void 0 !== parsedOutput.headers[_xrr], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_xrr])],
@@ -1261,7 +1308,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1261
1308
  'message': smithy_client_1.expectString,
1262
1309
  });
1263
1310
  Object.assign(contents, doc);
1264
- const exception = new models_0_1.LimitExceededException({
1311
+ const exception = new models_0_1.RateLimitExceededException({
1265
1312
  $metadata: deserializeMetadata(parsedOutput),
1266
1313
  ...contents
1267
1314
  });
@@ -1371,6 +1418,33 @@ const de_MessageNotFoundExceptionRes = async (parsedOutput, context) => {
1371
1418
  });
1372
1419
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1373
1420
  };
1421
+ const de_TargetNotEligibleExceptionRes = async (parsedOutput, context) => {
1422
+ const contents = (0, smithy_client_1.map)({});
1423
+ const data = parsedOutput.body;
1424
+ const doc = (0, smithy_client_1.take)(data, {
1425
+ 'message': smithy_client_1.expectString,
1426
+ 'reason': smithy_client_1.expectString,
1427
+ });
1428
+ Object.assign(contents, doc);
1429
+ const exception = new models_0_1.TargetNotEligibleException({
1430
+ $metadata: deserializeMetadata(parsedOutput),
1431
+ ...contents
1432
+ });
1433
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1434
+ };
1435
+ const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
1436
+ const contents = (0, smithy_client_1.map)({});
1437
+ const data = parsedOutput.body;
1438
+ const doc = (0, smithy_client_1.take)(data, {
1439
+ 'message': smithy_client_1.expectString,
1440
+ });
1441
+ Object.assign(contents, doc);
1442
+ const exception = new models_0_1.TargetNotFoundException({
1443
+ $metadata: deserializeMetadata(parsedOutput),
1444
+ ...contents
1445
+ });
1446
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1447
+ };
1374
1448
  const deserializeMetadata = (output) => ({
1375
1449
  httpStatusCode: output.statusCode,
1376
1450
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -2,6 +2,7 @@ import { ConversationsClient, } from "./ConversationsClient";
2
2
  import { AddChannelMemberCommand, } from "./commands/AddChannelMemberCommand";
3
3
  import { AddChannelMembersCommand, } from "./commands/AddChannelMembersCommand";
4
4
  import { CreateGroupChannelCommand, } from "./commands/CreateGroupChannelCommand";
5
+ import { CreateKiteChannelCommand, } from "./commands/CreateKiteChannelCommand";
5
6
  import { DeleteChannelCommand, } from "./commands/DeleteChannelCommand";
6
7
  import { DeleteChannelMemberCommand, } from "./commands/DeleteChannelMemberCommand";
7
8
  import { DeleteMessageCommand, } from "./commands/DeleteMessageCommand";
@@ -40,6 +41,7 @@ const commands = {
40
41
  AddChannelMemberCommand,
41
42
  AddChannelMembersCommand,
42
43
  CreateGroupChannelCommand,
44
+ CreateKiteChannelCommand,
43
45
  DeleteChannelCommand,
44
46
  DeleteChannelMemberCommand,
45
47
  DeleteMessageCommand,
@@ -1,6 +1,8 @@
1
1
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
2
2
  import { resolveRuntimeExtensions, } from "./runtimeExtensions";
3
3
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
4
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
5
+ import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
4
6
  import { Client as __Client, } from "@smithy/smithy-client";
5
7
  import { authorizationMiddleware } from '@wildix/smithy-utils';
6
8
  export { __Client };
@@ -8,7 +10,8 @@ export class ConversationsClient extends __Client {
8
10
  constructor(...[configuration]) {
9
11
  let _config_0 = __getRuntimeConfig(configuration || {});
10
12
  let _config_1 = resolveUserAgentConfig(_config_0);
11
- let _config_2 = resolveRuntimeExtensions(_config_1, configuration?.extensions || []);
13
+ let _config_2 = resolveRetryConfig(_config_1);
14
+ let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
12
15
  const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `api-${configuration.env}.x-bees.com` : 'api.x-bees.com';
13
16
  const endpoint = () => {
14
17
  return {
@@ -19,13 +22,15 @@ export class ConversationsClient extends __Client {
19
22
  };
20
23
  };
21
24
  const config = {
22
- ..._config_2,
25
+ ..._config_3,
23
26
  endpoint,
24
27
  };
25
28
  super(config);
26
29
  this.config = config;
27
30
  this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
28
31
  this.middlewareStack.use(getUserAgentPlugin(this.config));
32
+ this.middlewareStack.use(getRetryPlugin(this.config));
33
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
29
34
  }
30
35
  destroy() {
31
36
  super.destroy();
@@ -0,0 +1,17 @@
1
+ import { de_CreateKiteChannelCommand, se_CreateKiteChannelCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class CreateKiteChannelCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Conversations", "CreateKiteChannel", {})
12
+ .n("ConversationsClient", "CreateKiteChannelCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_CreateKiteChannelCommand)
15
+ .de(de_CreateKiteChannelCommand)
16
+ .build() {
17
+ }
@@ -1,6 +1,7 @@
1
1
  export * from "./AddChannelMemberCommand";
2
2
  export * from "./AddChannelMembersCommand";
3
3
  export * from "./CreateGroupChannelCommand";
4
+ export * from "./CreateKiteChannelCommand";
4
5
  export * from "./DeleteChannelCommand";
5
6
  export * from "./DeleteChannelMemberCommand";
6
7
  export * from "./DeleteMessageCommand";
@@ -23,16 +23,16 @@ export class ForbiddenException extends __BaseException {
23
23
  Object.setPrototypeOf(this, ForbiddenException.prototype);
24
24
  }
25
25
  }
26
- export class LimitExceededException extends __BaseException {
26
+ export class RateLimitExceededException extends __BaseException {
27
27
  constructor(opts) {
28
28
  super({
29
- name: "LimitExceededException",
29
+ name: "RateLimitExceededException",
30
30
  $fault: "client",
31
31
  ...opts
32
32
  });
33
- this.name = "LimitExceededException";
33
+ this.name = "RateLimitExceededException";
34
34
  this.$fault = "client";
35
- Object.setPrototypeOf(this, LimitExceededException.prototype);
35
+ Object.setPrototypeOf(this, RateLimitExceededException.prototype);
36
36
  this.rateLimit = opts.rateLimit;
37
37
  this.rateLimitRemaining = opts.rateLimitRemaining;
38
38
  this.rateLimitReset = opts.rateLimitReset;
@@ -103,6 +103,50 @@ export const ConversationFileCategory = {
103
103
  GENERAL: "channels",
104
104
  RECORDING: "recordings",
105
105
  };
106
+ export const MessageSmsStatus = {
107
+ DELIVERED: "delivered",
108
+ ERROR: "error",
109
+ SENT: "sent",
110
+ TRYING: "trying",
111
+ };
112
+ export const MessageType = {
113
+ REGULAR: "regular",
114
+ SYSTEM: "system",
115
+ };
116
+ export const MessageWhatsAppStatus = {
117
+ DELIVERED: "delivered",
118
+ ERROR: "error",
119
+ SENT: "sent",
120
+ TRYING: "trying",
121
+ };
122
+ export const TargetNotEligibleReason = {
123
+ NO_LICENSE: "no_license",
124
+ };
125
+ export class TargetNotEligibleException extends __BaseException {
126
+ constructor(opts) {
127
+ super({
128
+ name: "TargetNotEligibleException",
129
+ $fault: "client",
130
+ ...opts
131
+ });
132
+ this.name = "TargetNotEligibleException";
133
+ this.$fault = "client";
134
+ Object.setPrototypeOf(this, TargetNotEligibleException.prototype);
135
+ this.reason = opts.reason;
136
+ }
137
+ }
138
+ export class TargetNotFoundException extends __BaseException {
139
+ constructor(opts) {
140
+ super({
141
+ name: "TargetNotFoundException",
142
+ $fault: "client",
143
+ ...opts
144
+ });
145
+ this.name = "TargetNotFoundException";
146
+ this.$fault = "client";
147
+ Object.setPrototypeOf(this, TargetNotFoundException.prototype);
148
+ }
149
+ }
106
150
  export class MemberNotFoundException extends __BaseException {
107
151
  constructor(opts) {
108
152
  super({
@@ -149,22 +193,6 @@ export const WebhookEventType = {
149
193
  REACTION_DELETED: "chat:reaction:deleted",
150
194
  REACTION_NEW: "chat:reaction:new",
151
195
  };
152
- export const MessageSmsStatus = {
153
- DELIVERED: "delivered",
154
- ERROR: "error",
155
- SENT: "sent",
156
- TRYING: "trying",
157
- };
158
- export const MessageType = {
159
- REGULAR: "regular",
160
- SYSTEM: "system",
161
- };
162
- export const MessageWhatsAppStatus = {
163
- DELIVERED: "delivered",
164
- ERROR: "error",
165
- SENT: "sent",
166
- TRYING: "trying",
167
- };
168
196
  export class FileNotFoundException extends __BaseException {
169
197
  constructor(opts) {
170
198
  super({