@wildix/xbees-conversations-client 1.0.37 → 1.0.39

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.
@@ -12,8 +12,10 @@ const DeleteMessageReactionCommand_1 = require("./commands/DeleteMessageReaction
12
12
  const GetChannelCommand_1 = require("./commands/GetChannelCommand");
13
13
  const GetChannelMemberCommand_1 = require("./commands/GetChannelMemberCommand");
14
14
  const GetDirectChannelIdCommand_1 = require("./commands/GetDirectChannelIdCommand");
15
+ const GetFilePresignedDownloadUrlCommand_1 = require("./commands/GetFilePresignedDownloadUrlCommand");
15
16
  const GetMessageCommand_1 = require("./commands/GetMessageCommand");
16
17
  const GetOrCreateDirectChannelCommand_1 = require("./commands/GetOrCreateDirectChannelCommand");
18
+ const GetUploadedFileInfoCommand_1 = require("./commands/GetUploadedFileInfoCommand");
17
19
  const HideChannelCommand_1 = require("./commands/HideChannelCommand");
18
20
  const InviteCommand_1 = require("./commands/InviteCommand");
19
21
  const JoinChannelCommand_1 = require("./commands/JoinChannelCommand");
@@ -34,6 +36,7 @@ const SendTypingStopCommand_1 = require("./commands/SendTypingStopCommand");
34
36
  const ShowChannelCommand_1 = require("./commands/ShowChannelCommand");
35
37
  const UpdateChannelCommand_1 = require("./commands/UpdateChannelCommand");
36
38
  const UpdateMessageCommand_1 = require("./commands/UpdateMessageCommand");
39
+ const UploadFileCommand_1 = require("./commands/UploadFileCommand");
37
40
  const smithy_client_1 = require("@smithy/smithy-client");
38
41
  const commands = {
39
42
  AddChannelMemberCommand: AddChannelMemberCommand_1.AddChannelMemberCommand,
@@ -46,8 +49,10 @@ const commands = {
46
49
  GetChannelCommand: GetChannelCommand_1.GetChannelCommand,
47
50
  GetChannelMemberCommand: GetChannelMemberCommand_1.GetChannelMemberCommand,
48
51
  GetDirectChannelIdCommand: GetDirectChannelIdCommand_1.GetDirectChannelIdCommand,
52
+ GetFilePresignedDownloadUrlCommand: GetFilePresignedDownloadUrlCommand_1.GetFilePresignedDownloadUrlCommand,
49
53
  GetMessageCommand: GetMessageCommand_1.GetMessageCommand,
50
54
  GetOrCreateDirectChannelCommand: GetOrCreateDirectChannelCommand_1.GetOrCreateDirectChannelCommand,
55
+ GetUploadedFileInfoCommand: GetUploadedFileInfoCommand_1.GetUploadedFileInfoCommand,
51
56
  HideChannelCommand: HideChannelCommand_1.HideChannelCommand,
52
57
  InviteCommand: InviteCommand_1.InviteCommand,
53
58
  JoinChannelCommand: JoinChannelCommand_1.JoinChannelCommand,
@@ -68,6 +73,7 @@ const commands = {
68
73
  ShowChannelCommand: ShowChannelCommand_1.ShowChannelCommand,
69
74
  UpdateChannelCommand: UpdateChannelCommand_1.UpdateChannelCommand,
70
75
  UpdateMessageCommand: UpdateMessageCommand_1.UpdateMessageCommand,
76
+ UploadFileCommand: UploadFileCommand_1.UploadFileCommand,
71
77
  };
72
78
  class Conversations extends ConversationsClient_1.ConversationsClient {
73
79
  }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetFilePresignedDownloadUrlCommand = 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 GetFilePresignedDownloadUrlCommand 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", "GetFilePresignedDownloadUrl", {})
15
+ .n("ConversationsClient", "GetFilePresignedDownloadUrlCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_GetFilePresignedDownloadUrlCommand)
18
+ .de(Aws_restJson1_1.de_GetFilePresignedDownloadUrlCommand)
19
+ .build() {
20
+ }
21
+ exports.GetFilePresignedDownloadUrlCommand = GetFilePresignedDownloadUrlCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetUploadedFileInfoCommand = 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 GetUploadedFileInfoCommand 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", "GetUploadedFileInfo", {})
15
+ .n("ConversationsClient", "GetUploadedFileInfoCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_GetUploadedFileInfoCommand)
18
+ .de(Aws_restJson1_1.de_GetUploadedFileInfoCommand)
19
+ .build() {
20
+ }
21
+ exports.GetUploadedFileInfoCommand = GetUploadedFileInfoCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadFileCommand = 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 UploadFileCommand 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", "UploadFile", {})
15
+ .n("ConversationsClient", "UploadFileCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_UploadFileCommand)
18
+ .de(Aws_restJson1_1.de_UploadFileCommand)
19
+ .build() {
20
+ }
21
+ exports.UploadFileCommand = UploadFileCommand;
@@ -11,8 +11,10 @@ tslib_1.__exportStar(require("./DeleteMessageReactionCommand"), exports);
11
11
  tslib_1.__exportStar(require("./GetChannelCommand"), exports);
12
12
  tslib_1.__exportStar(require("./GetChannelMemberCommand"), exports);
13
13
  tslib_1.__exportStar(require("./GetDirectChannelIdCommand"), exports);
14
+ tslib_1.__exportStar(require("./GetFilePresignedDownloadUrlCommand"), exports);
14
15
  tslib_1.__exportStar(require("./GetMessageCommand"), exports);
15
16
  tslib_1.__exportStar(require("./GetOrCreateDirectChannelCommand"), exports);
17
+ tslib_1.__exportStar(require("./GetUploadedFileInfoCommand"), exports);
16
18
  tslib_1.__exportStar(require("./HideChannelCommand"), exports);
17
19
  tslib_1.__exportStar(require("./InviteCommand"), exports);
18
20
  tslib_1.__exportStar(require("./JoinChannelCommand"), exports);
@@ -33,3 +35,4 @@ tslib_1.__exportStar(require("./SendTypingStopCommand"), exports);
33
35
  tslib_1.__exportStar(require("./ShowChannelCommand"), exports);
34
36
  tslib_1.__exportStar(require("./UpdateChannelCommand"), exports);
35
37
  tslib_1.__exportStar(require("./UpdateMessageCommand"), exports);
38
+ tslib_1.__exportStar(require("./UploadFileCommand"), exports);
@@ -1,33 +1,33 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConversationsServiceException = exports.MessageUnsetFields = exports.GroupChannelUnsetOptions = exports.MessageType = exports.MessageSmsStatus = exports.ReactionType = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.ChannelAlreadyExistException = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ChannelType = exports.ValidationException = exports.ForbiddenException = void 0;
3
+ exports.ConversationsServiceException = exports.MessageUnsetFields = exports.GroupChannelUnsetOptions = exports.MessageType = exports.MessageSmsStatus = exports.FileNotFoundException = exports.ReactionType = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.ConversationFileCategory = exports.ChannelAlreadyExistException = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ChannelType = exports.ForbiddenException = exports.ValidationException = void 0;
4
4
  const ConversationsServiceException_1 = require("./ConversationsServiceException");
5
- class ForbiddenException extends ConversationsServiceException_1.ConversationsServiceException {
5
+ class ValidationException extends ConversationsServiceException_1.ConversationsServiceException {
6
6
  constructor(opts) {
7
7
  super({
8
- name: "ForbiddenException",
8
+ name: "ValidationException",
9
9
  $fault: "client",
10
10
  ...opts
11
11
  });
12
- this.name = "ForbiddenException";
12
+ this.name = "ValidationException";
13
13
  this.$fault = "client";
14
- Object.setPrototypeOf(this, ForbiddenException.prototype);
14
+ Object.setPrototypeOf(this, ValidationException.prototype);
15
15
  }
16
16
  }
17
- exports.ForbiddenException = ForbiddenException;
18
- class ValidationException extends ConversationsServiceException_1.ConversationsServiceException {
17
+ exports.ValidationException = ValidationException;
18
+ class ForbiddenException extends ConversationsServiceException_1.ConversationsServiceException {
19
19
  constructor(opts) {
20
20
  super({
21
- name: "ValidationException",
21
+ name: "ForbiddenException",
22
22
  $fault: "client",
23
23
  ...opts
24
24
  });
25
- this.name = "ValidationException";
25
+ this.name = "ForbiddenException";
26
26
  this.$fault = "client";
27
- Object.setPrototypeOf(this, ValidationException.prototype);
27
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
28
28
  }
29
29
  }
30
- exports.ValidationException = ValidationException;
30
+ exports.ForbiddenException = ForbiddenException;
31
31
  exports.ChannelType = {
32
32
  DIRECT: "direct",
33
33
  GROUP: "group",
@@ -88,6 +88,10 @@ class ChannelAlreadyExistException extends ConversationsServiceException_1.Conve
88
88
  }
89
89
  }
90
90
  exports.ChannelAlreadyExistException = ChannelAlreadyExistException;
91
+ exports.ConversationFileCategory = {
92
+ GENERAL: "channels",
93
+ RECORDING: "recordings",
94
+ };
91
95
  class MemberNotFoundException extends ConversationsServiceException_1.ConversationsServiceException {
92
96
  constructor(opts) {
93
97
  super({
@@ -125,6 +129,19 @@ exports.ReactionType = {
125
129
  THUMBSUP: "thumbsup",
126
130
  WHITE_CHECK_MARK: "white_check_mark",
127
131
  };
132
+ class FileNotFoundException extends ConversationsServiceException_1.ConversationsServiceException {
133
+ constructor(opts) {
134
+ super({
135
+ name: "FileNotFoundException",
136
+ $fault: "client",
137
+ ...opts
138
+ });
139
+ this.name = "FileNotFoundException";
140
+ this.$fault = "client";
141
+ Object.setPrototypeOf(this, FileNotFoundException.prototype);
142
+ }
143
+ }
144
+ exports.FileNotFoundException = FileNotFoundException;
128
145
  exports.MessageSmsStatus = {
129
146
  DELIVERED: "delivered",
130
147
  ERROR: "error",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_ListChannelsCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_HideChannelCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_DeleteMessageReactionCommand = exports.de_DeleteMessageCommand = exports.de_DeleteChannelMemberCommand = exports.de_DeleteChannelCommand = exports.de_CreateGroupChannelCommand = exports.de_AddChannelMembersCommand = exports.de_AddChannelMemberCommand = 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_GetOrCreateDirectChannelCommand = exports.se_GetMessageCommand = exports.se_GetDirectChannelIdCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = 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_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 = void 0;
3
+ exports.de_HideChannelCommand = exports.de_GetUploadedFileInfoCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageCommand = exports.de_GetFilePresignedDownloadUrlCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = 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_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 = 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");
@@ -191,6 +191,24 @@ const se_GetDirectChannelIdCommand = async (input, context) => {
191
191
  return b.build();
192
192
  };
193
193
  exports.se_GetDirectChannelIdCommand = se_GetDirectChannelIdCommand;
194
+ const se_GetFilePresignedDownloadUrlCommand = async (input, context) => {
195
+ const b = (0, core_1.requestBuilder)(input, context);
196
+ const headers = {};
197
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/files/{fileId}/download_url");
198
+ b.p('channelId', () => input.channelId, '{channelId}', false);
199
+ b.p('messageId', () => input.messageId, '{messageId}', false);
200
+ b.p('fileId', () => input.fileId, '{fileId}', false);
201
+ const query = (0, smithy_client_1.map)({
202
+ [_c]: [, input[_c]],
203
+ });
204
+ let body;
205
+ b.m("GET")
206
+ .h(headers)
207
+ .q(query)
208
+ .b(body);
209
+ return b.build();
210
+ };
211
+ exports.se_GetFilePresignedDownloadUrlCommand = se_GetFilePresignedDownloadUrlCommand;
194
212
  const se_GetMessageCommand = async (input, context) => {
195
213
  const b = (0, core_1.requestBuilder)(input, context);
196
214
  const headers = {};
@@ -225,6 +243,23 @@ const se_GetOrCreateDirectChannelCommand = async (input, context) => {
225
243
  return b.build();
226
244
  };
227
245
  exports.se_GetOrCreateDirectChannelCommand = se_GetOrCreateDirectChannelCommand;
246
+ const se_GetUploadedFileInfoCommand = async (input, context) => {
247
+ const b = (0, core_1.requestBuilder)(input, context);
248
+ const headers = {};
249
+ b.bp("/v2/conversations/channels/{channelId}/files/{fileId}");
250
+ b.p('channelId', () => input.channelId, '{channelId}', false);
251
+ b.p('fileId', () => input.fileId, '{fileId}', false);
252
+ const query = (0, smithy_client_1.map)({
253
+ [_c]: [, input[_c]],
254
+ });
255
+ let body;
256
+ b.m("GET")
257
+ .h(headers)
258
+ .q(query)
259
+ .b(body);
260
+ return b.build();
261
+ };
262
+ exports.se_GetUploadedFileInfoCommand = se_GetUploadedFileInfoCommand;
228
263
  const se_HideChannelCommand = async (input, context) => {
229
264
  const b = (0, core_1.requestBuilder)(input, context);
230
265
  const headers = {};
@@ -609,6 +644,24 @@ const se_UpdateMessageCommand = async (input, context) => {
609
644
  return b.build();
610
645
  };
611
646
  exports.se_UpdateMessageCommand = se_UpdateMessageCommand;
647
+ const se_UploadFileCommand = async (input, context) => {
648
+ const b = (0, core_1.requestBuilder)(input, context);
649
+ const headers = {
650
+ 'content-type': 'application/json',
651
+ };
652
+ b.bp("/v2/conversations/channels/{channelId}/files");
653
+ b.p('channelId', () => input.channelId, '{channelId}', false);
654
+ let body;
655
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
656
+ 'name': [],
657
+ 'options': _ => (0, smithy_client_1._json)(_),
658
+ }));
659
+ b.m("POST")
660
+ .h(headers)
661
+ .b(body);
662
+ return b.build();
663
+ };
664
+ exports.se_UploadFileCommand = se_UploadFileCommand;
612
665
  const de_AddChannelMemberCommand = async (output, context) => {
613
666
  if (output.statusCode !== 200 && output.statusCode >= 300) {
614
667
  return de_CommandError(output, context);
@@ -746,6 +799,21 @@ const de_GetDirectChannelIdCommand = async (output, context) => {
746
799
  return contents;
747
800
  };
748
801
  exports.de_GetDirectChannelIdCommand = de_GetDirectChannelIdCommand;
802
+ const de_GetFilePresignedDownloadUrlCommand = async (output, context) => {
803
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
804
+ return de_CommandError(output, context);
805
+ }
806
+ const contents = (0, smithy_client_1.map)({
807
+ $metadata: deserializeMetadata(output),
808
+ });
809
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
810
+ const doc = (0, smithy_client_1.take)(data, {
811
+ 'presignedDownloadUrl': smithy_client_1.expectString,
812
+ });
813
+ Object.assign(contents, doc);
814
+ return contents;
815
+ };
816
+ exports.de_GetFilePresignedDownloadUrlCommand = de_GetFilePresignedDownloadUrlCommand;
749
817
  const de_GetMessageCommand = async (output, context) => {
750
818
  if (output.statusCode !== 200 && output.statusCode >= 300) {
751
819
  return de_CommandError(output, context);
@@ -776,6 +844,21 @@ const de_GetOrCreateDirectChannelCommand = async (output, context) => {
776
844
  return contents;
777
845
  };
778
846
  exports.de_GetOrCreateDirectChannelCommand = de_GetOrCreateDirectChannelCommand;
847
+ const de_GetUploadedFileInfoCommand = async (output, context) => {
848
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
849
+ return de_CommandError(output, context);
850
+ }
851
+ const contents = (0, smithy_client_1.map)({
852
+ $metadata: deserializeMetadata(output),
853
+ });
854
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
855
+ const doc = (0, smithy_client_1.take)(data, {
856
+ 'file': smithy_client_1._json,
857
+ });
858
+ Object.assign(contents, doc);
859
+ return contents;
860
+ };
861
+ exports.de_GetUploadedFileInfoCommand = de_GetUploadedFileInfoCommand;
779
862
  const de_HideChannelCommand = async (output, context) => {
780
863
  if (output.statusCode !== 200 && output.statusCode >= 300) {
781
864
  return de_CommandError(output, context);
@@ -1045,6 +1128,22 @@ const de_UpdateMessageCommand = async (output, context) => {
1045
1128
  return contents;
1046
1129
  };
1047
1130
  exports.de_UpdateMessageCommand = de_UpdateMessageCommand;
1131
+ const de_UploadFileCommand = async (output, context) => {
1132
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1133
+ return de_CommandError(output, context);
1134
+ }
1135
+ const contents = (0, smithy_client_1.map)({
1136
+ $metadata: deserializeMetadata(output),
1137
+ });
1138
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
1139
+ const doc = (0, smithy_client_1.take)(data, {
1140
+ 'fileId': smithy_client_1.expectString,
1141
+ 'presignedUploadUrl': smithy_client_1.expectString,
1142
+ });
1143
+ Object.assign(contents, doc);
1144
+ return contents;
1145
+ };
1146
+ exports.de_UploadFileCommand = de_UploadFileCommand;
1048
1147
  const de_CommandError = async (output, context) => {
1049
1148
  const parsedOutput = {
1050
1149
  ...output,
@@ -1073,6 +1172,9 @@ const de_CommandError = async (output, context) => {
1073
1172
  case "MessageNotFoundException":
1074
1173
  case "wildix.xbees.conversations#MessageNotFoundException":
1075
1174
  throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
1175
+ case "FileNotFoundException":
1176
+ case "wildix.xbees.conversations#FileNotFoundException":
1177
+ throw await de_FileNotFoundExceptionRes(parsedOutput, context);
1076
1178
  case "ConversationsServiceException":
1077
1179
  case "wildix.xbees.conversations#ConversationsServiceException":
1078
1180
  throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
@@ -1151,6 +1253,19 @@ const de_ConversationsServiceExceptionRes = async (parsedOutput, context) => {
1151
1253
  });
1152
1254
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1153
1255
  };
1256
+ const de_FileNotFoundExceptionRes = async (parsedOutput, context) => {
1257
+ const contents = (0, smithy_client_1.map)({});
1258
+ const data = parsedOutput.body;
1259
+ const doc = (0, smithy_client_1.take)(data, {
1260
+ 'message': smithy_client_1.expectString,
1261
+ });
1262
+ Object.assign(contents, doc);
1263
+ const exception = new models_0_1.FileNotFoundException({
1264
+ $metadata: deserializeMetadata(parsedOutput),
1265
+ ...contents
1266
+ });
1267
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1268
+ };
1154
1269
  const de_MemberAlreadyExistExceptionRes = async (parsedOutput, context) => {
1155
1270
  const contents = (0, smithy_client_1.map)({});
1156
1271
  const data = parsedOutput.body;
@@ -1203,6 +1318,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1203
1318
  (!Object.getOwnPropertyNames(value).includes("length") ||
1204
1319
  value.length != 0) &&
1205
1320
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1321
+ const _c = "category";
1206
1322
  const _l = "limit";
1207
1323
  const _o = "offset";
1208
1324
  const _s = "silent";
@@ -9,8 +9,10 @@ import { DeleteMessageReactionCommand, } from "./commands/DeleteMessageReactionC
9
9
  import { GetChannelCommand, } from "./commands/GetChannelCommand";
10
10
  import { GetChannelMemberCommand, } from "./commands/GetChannelMemberCommand";
11
11
  import { GetDirectChannelIdCommand, } from "./commands/GetDirectChannelIdCommand";
12
+ import { GetFilePresignedDownloadUrlCommand, } from "./commands/GetFilePresignedDownloadUrlCommand";
12
13
  import { GetMessageCommand, } from "./commands/GetMessageCommand";
13
14
  import { GetOrCreateDirectChannelCommand, } from "./commands/GetOrCreateDirectChannelCommand";
15
+ import { GetUploadedFileInfoCommand, } from "./commands/GetUploadedFileInfoCommand";
14
16
  import { HideChannelCommand, } from "./commands/HideChannelCommand";
15
17
  import { InviteCommand, } from "./commands/InviteCommand";
16
18
  import { JoinChannelCommand, } from "./commands/JoinChannelCommand";
@@ -31,6 +33,7 @@ import { SendTypingStopCommand, } from "./commands/SendTypingStopCommand";
31
33
  import { ShowChannelCommand, } from "./commands/ShowChannelCommand";
32
34
  import { UpdateChannelCommand, } from "./commands/UpdateChannelCommand";
33
35
  import { UpdateMessageCommand, } from "./commands/UpdateMessageCommand";
36
+ import { UploadFileCommand, } from "./commands/UploadFileCommand";
34
37
  import { createAggregatedClient } from "@smithy/smithy-client";
35
38
  const commands = {
36
39
  AddChannelMemberCommand,
@@ -43,8 +46,10 @@ const commands = {
43
46
  GetChannelCommand,
44
47
  GetChannelMemberCommand,
45
48
  GetDirectChannelIdCommand,
49
+ GetFilePresignedDownloadUrlCommand,
46
50
  GetMessageCommand,
47
51
  GetOrCreateDirectChannelCommand,
52
+ GetUploadedFileInfoCommand,
48
53
  HideChannelCommand,
49
54
  InviteCommand,
50
55
  JoinChannelCommand,
@@ -65,6 +70,7 @@ const commands = {
65
70
  ShowChannelCommand,
66
71
  UpdateChannelCommand,
67
72
  UpdateMessageCommand,
73
+ UploadFileCommand,
68
74
  };
69
75
  export class Conversations extends ConversationsClient {
70
76
  }
@@ -0,0 +1,17 @@
1
+ import { de_GetFilePresignedDownloadUrlCommand, se_GetFilePresignedDownloadUrlCommand, } 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 GetFilePresignedDownloadUrlCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Conversations", "GetFilePresignedDownloadUrl", {})
12
+ .n("ConversationsClient", "GetFilePresignedDownloadUrlCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_GetFilePresignedDownloadUrlCommand)
15
+ .de(de_GetFilePresignedDownloadUrlCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_GetUploadedFileInfoCommand, se_GetUploadedFileInfoCommand, } 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 GetUploadedFileInfoCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Conversations", "GetUploadedFileInfo", {})
12
+ .n("ConversationsClient", "GetUploadedFileInfoCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_GetUploadedFileInfoCommand)
15
+ .de(de_GetUploadedFileInfoCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_UploadFileCommand, se_UploadFileCommand, } 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 UploadFileCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Conversations", "UploadFile", {})
12
+ .n("ConversationsClient", "UploadFileCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_UploadFileCommand)
15
+ .de(de_UploadFileCommand)
16
+ .build() {
17
+ }
@@ -8,8 +8,10 @@ export * from "./DeleteMessageReactionCommand";
8
8
  export * from "./GetChannelCommand";
9
9
  export * from "./GetChannelMemberCommand";
10
10
  export * from "./GetDirectChannelIdCommand";
11
+ export * from "./GetFilePresignedDownloadUrlCommand";
11
12
  export * from "./GetMessageCommand";
12
13
  export * from "./GetOrCreateDirectChannelCommand";
14
+ export * from "./GetUploadedFileInfoCommand";
13
15
  export * from "./HideChannelCommand";
14
16
  export * from "./InviteCommand";
15
17
  export * from "./JoinChannelCommand";
@@ -30,3 +32,4 @@ export * from "./SendTypingStopCommand";
30
32
  export * from "./ShowChannelCommand";
31
33
  export * from "./UpdateChannelCommand";
32
34
  export * from "./UpdateMessageCommand";
35
+ export * from "./UploadFileCommand";
@@ -1,26 +1,26 @@
1
1
  import { ConversationsServiceException as __BaseException } from "./ConversationsServiceException";
2
- export class ForbiddenException extends __BaseException {
2
+ export class ValidationException extends __BaseException {
3
3
  constructor(opts) {
4
4
  super({
5
- name: "ForbiddenException",
5
+ name: "ValidationException",
6
6
  $fault: "client",
7
7
  ...opts
8
8
  });
9
- this.name = "ForbiddenException";
9
+ this.name = "ValidationException";
10
10
  this.$fault = "client";
11
- Object.setPrototypeOf(this, ForbiddenException.prototype);
11
+ Object.setPrototypeOf(this, ValidationException.prototype);
12
12
  }
13
13
  }
14
- export class ValidationException extends __BaseException {
14
+ export class ForbiddenException extends __BaseException {
15
15
  constructor(opts) {
16
16
  super({
17
- name: "ValidationException",
17
+ name: "ForbiddenException",
18
18
  $fault: "client",
19
19
  ...opts
20
20
  });
21
- this.name = "ValidationException";
21
+ this.name = "ForbiddenException";
22
22
  this.$fault = "client";
23
- Object.setPrototypeOf(this, ValidationException.prototype);
23
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
24
24
  }
25
25
  }
26
26
  export const ChannelType = {
@@ -80,6 +80,10 @@ export class ChannelAlreadyExistException extends __BaseException {
80
80
  Object.setPrototypeOf(this, ChannelAlreadyExistException.prototype);
81
81
  }
82
82
  }
83
+ export const ConversationFileCategory = {
84
+ GENERAL: "channels",
85
+ RECORDING: "recordings",
86
+ };
83
87
  export class MemberNotFoundException extends __BaseException {
84
88
  constructor(opts) {
85
89
  super({
@@ -115,6 +119,18 @@ export const ReactionType = {
115
119
  THUMBSUP: "thumbsup",
116
120
  WHITE_CHECK_MARK: "white_check_mark",
117
121
  };
122
+ export class FileNotFoundException extends __BaseException {
123
+ constructor(opts) {
124
+ super({
125
+ name: "FileNotFoundException",
126
+ $fault: "client",
127
+ ...opts
128
+ });
129
+ this.name = "FileNotFoundException";
130
+ this.$fault = "client";
131
+ Object.setPrototypeOf(this, FileNotFoundException.prototype);
132
+ }
133
+ }
118
134
  export const MessageSmsStatus = {
119
135
  DELIVERED: "delivered",
120
136
  ERROR: "error",