@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.
- package/dist-cjs/Conversations.js +6 -0
- package/dist-cjs/commands/GetFilePresignedDownloadUrlCommand.js +21 -0
- package/dist-cjs/commands/GetUploadedFileInfoCommand.js +21 -0
- package/dist-cjs/commands/UploadFileCommand.js +21 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/models/models_0.js +28 -11
- package/dist-cjs/protocols/Aws_restJson1.js +118 -2
- package/dist-es/Conversations.js +6 -0
- package/dist-es/commands/GetFilePresignedDownloadUrlCommand.js +17 -0
- package/dist-es/commands/GetUploadedFileInfoCommand.js +17 -0
- package/dist-es/commands/UploadFileCommand.js +17 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/models/models_0.js +24 -8
- package/dist-es/protocols/Aws_restJson1.js +111 -1
- package/dist-types/Conversations.d.ts +21 -0
- package/dist-types/ConversationsClient.d.ts +5 -2
- package/dist-types/commands/GetFilePresignedDownloadUrlCommand.d.ts +72 -0
- package/dist-types/commands/GetUploadedFileInfoCommand.d.ts +78 -0
- package/dist-types/commands/UploadFileCommand.d.ts +74 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/models/models_0.d.ts +141 -6
- package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConversationsServiceException as __BaseException } from "../models/ConversationsServiceException";
|
|
2
|
-
import { ChannelAlreadyExistException, ChannelNotFoundException, ConversationsServiceException, ForbiddenException, MemberAlreadyExistException, MemberNotFoundException, MessageNotFoundException, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { ChannelAlreadyExistException, ChannelNotFoundException, ConversationsServiceException, FileNotFoundException, ForbiddenException, MemberAlreadyExistException, MemberNotFoundException, MessageNotFoundException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { requestBuilder as rb } from "@smithy/core";
|
|
4
4
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_AddChannelMemberCommand = async (input, context) => {
|
|
@@ -177,6 +177,23 @@ export const se_GetDirectChannelIdCommand = async (input, context) => {
|
|
|
177
177
|
.b(body);
|
|
178
178
|
return b.build();
|
|
179
179
|
};
|
|
180
|
+
export const se_GetFilePresignedDownloadUrlCommand = async (input, context) => {
|
|
181
|
+
const b = rb(input, context);
|
|
182
|
+
const headers = {};
|
|
183
|
+
b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/files/{fileId}/download_url");
|
|
184
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
185
|
+
b.p('messageId', () => input.messageId, '{messageId}', false);
|
|
186
|
+
b.p('fileId', () => input.fileId, '{fileId}', false);
|
|
187
|
+
const query = map({
|
|
188
|
+
[_c]: [, input[_c]],
|
|
189
|
+
});
|
|
190
|
+
let body;
|
|
191
|
+
b.m("GET")
|
|
192
|
+
.h(headers)
|
|
193
|
+
.q(query)
|
|
194
|
+
.b(body);
|
|
195
|
+
return b.build();
|
|
196
|
+
};
|
|
180
197
|
export const se_GetMessageCommand = async (input, context) => {
|
|
181
198
|
const b = rb(input, context);
|
|
182
199
|
const headers = {};
|
|
@@ -209,6 +226,22 @@ export const se_GetOrCreateDirectChannelCommand = async (input, context) => {
|
|
|
209
226
|
.b(body);
|
|
210
227
|
return b.build();
|
|
211
228
|
};
|
|
229
|
+
export const se_GetUploadedFileInfoCommand = async (input, context) => {
|
|
230
|
+
const b = rb(input, context);
|
|
231
|
+
const headers = {};
|
|
232
|
+
b.bp("/v2/conversations/channels/{channelId}/files/{fileId}");
|
|
233
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
234
|
+
b.p('fileId', () => input.fileId, '{fileId}', false);
|
|
235
|
+
const query = map({
|
|
236
|
+
[_c]: [, input[_c]],
|
|
237
|
+
});
|
|
238
|
+
let body;
|
|
239
|
+
b.m("GET")
|
|
240
|
+
.h(headers)
|
|
241
|
+
.q(query)
|
|
242
|
+
.b(body);
|
|
243
|
+
return b.build();
|
|
244
|
+
};
|
|
212
245
|
export const se_HideChannelCommand = async (input, context) => {
|
|
213
246
|
const b = rb(input, context);
|
|
214
247
|
const headers = {};
|
|
@@ -573,6 +606,23 @@ export const se_UpdateMessageCommand = async (input, context) => {
|
|
|
573
606
|
.b(body);
|
|
574
607
|
return b.build();
|
|
575
608
|
};
|
|
609
|
+
export const se_UploadFileCommand = async (input, context) => {
|
|
610
|
+
const b = rb(input, context);
|
|
611
|
+
const headers = {
|
|
612
|
+
'content-type': 'application/json',
|
|
613
|
+
};
|
|
614
|
+
b.bp("/v2/conversations/channels/{channelId}/files");
|
|
615
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
616
|
+
let body;
|
|
617
|
+
body = JSON.stringify(take(input, {
|
|
618
|
+
'name': [],
|
|
619
|
+
'options': _ => _json(_),
|
|
620
|
+
}));
|
|
621
|
+
b.m("POST")
|
|
622
|
+
.h(headers)
|
|
623
|
+
.b(body);
|
|
624
|
+
return b.build();
|
|
625
|
+
};
|
|
576
626
|
export const de_AddChannelMemberCommand = async (output, context) => {
|
|
577
627
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
578
628
|
return de_CommandError(output, context);
|
|
@@ -700,6 +750,20 @@ export const de_GetDirectChannelIdCommand = async (output, context) => {
|
|
|
700
750
|
Object.assign(contents, doc);
|
|
701
751
|
return contents;
|
|
702
752
|
};
|
|
753
|
+
export const de_GetFilePresignedDownloadUrlCommand = async (output, context) => {
|
|
754
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
755
|
+
return de_CommandError(output, context);
|
|
756
|
+
}
|
|
757
|
+
const contents = map({
|
|
758
|
+
$metadata: deserializeMetadata(output),
|
|
759
|
+
});
|
|
760
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
761
|
+
const doc = take(data, {
|
|
762
|
+
'presignedDownloadUrl': __expectString,
|
|
763
|
+
});
|
|
764
|
+
Object.assign(contents, doc);
|
|
765
|
+
return contents;
|
|
766
|
+
};
|
|
703
767
|
export const de_GetMessageCommand = async (output, context) => {
|
|
704
768
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
705
769
|
return de_CommandError(output, context);
|
|
@@ -728,6 +792,20 @@ export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
|
|
|
728
792
|
Object.assign(contents, doc);
|
|
729
793
|
return contents;
|
|
730
794
|
};
|
|
795
|
+
export const de_GetUploadedFileInfoCommand = async (output, context) => {
|
|
796
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
797
|
+
return de_CommandError(output, context);
|
|
798
|
+
}
|
|
799
|
+
const contents = map({
|
|
800
|
+
$metadata: deserializeMetadata(output),
|
|
801
|
+
});
|
|
802
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
803
|
+
const doc = take(data, {
|
|
804
|
+
'file': _json,
|
|
805
|
+
});
|
|
806
|
+
Object.assign(contents, doc);
|
|
807
|
+
return contents;
|
|
808
|
+
};
|
|
731
809
|
export const de_HideChannelCommand = async (output, context) => {
|
|
732
810
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
733
811
|
return de_CommandError(output, context);
|
|
@@ -977,6 +1055,21 @@ export const de_UpdateMessageCommand = async (output, context) => {
|
|
|
977
1055
|
Object.assign(contents, doc);
|
|
978
1056
|
return contents;
|
|
979
1057
|
};
|
|
1058
|
+
export const de_UploadFileCommand = async (output, context) => {
|
|
1059
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1060
|
+
return de_CommandError(output, context);
|
|
1061
|
+
}
|
|
1062
|
+
const contents = map({
|
|
1063
|
+
$metadata: deserializeMetadata(output),
|
|
1064
|
+
});
|
|
1065
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1066
|
+
const doc = take(data, {
|
|
1067
|
+
'fileId': __expectString,
|
|
1068
|
+
'presignedUploadUrl': __expectString,
|
|
1069
|
+
});
|
|
1070
|
+
Object.assign(contents, doc);
|
|
1071
|
+
return contents;
|
|
1072
|
+
};
|
|
980
1073
|
const de_CommandError = async (output, context) => {
|
|
981
1074
|
const parsedOutput = {
|
|
982
1075
|
...output,
|
|
@@ -1005,6 +1098,9 @@ const de_CommandError = async (output, context) => {
|
|
|
1005
1098
|
case "MessageNotFoundException":
|
|
1006
1099
|
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
1007
1100
|
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
1101
|
+
case "FileNotFoundException":
|
|
1102
|
+
case "wildix.xbees.conversations#FileNotFoundException":
|
|
1103
|
+
throw await de_FileNotFoundExceptionRes(parsedOutput, context);
|
|
1008
1104
|
case "ConversationsServiceException":
|
|
1009
1105
|
case "wildix.xbees.conversations#ConversationsServiceException":
|
|
1010
1106
|
throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
|
|
@@ -1083,6 +1179,19 @@ const de_ConversationsServiceExceptionRes = async (parsedOutput, context) => {
|
|
|
1083
1179
|
});
|
|
1084
1180
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1085
1181
|
};
|
|
1182
|
+
const de_FileNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1183
|
+
const contents = map({});
|
|
1184
|
+
const data = parsedOutput.body;
|
|
1185
|
+
const doc = take(data, {
|
|
1186
|
+
'message': __expectString,
|
|
1187
|
+
});
|
|
1188
|
+
Object.assign(contents, doc);
|
|
1189
|
+
const exception = new FileNotFoundException({
|
|
1190
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1191
|
+
...contents
|
|
1192
|
+
});
|
|
1193
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1194
|
+
};
|
|
1086
1195
|
const de_MemberAlreadyExistExceptionRes = async (parsedOutput, context) => {
|
|
1087
1196
|
const contents = map({});
|
|
1088
1197
|
const data = parsedOutput.body;
|
|
@@ -1135,6 +1244,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1135
1244
|
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
1136
1245
|
value.length != 0) &&
|
|
1137
1246
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1247
|
+
const _c = "category";
|
|
1138
1248
|
const _l = "limit";
|
|
1139
1249
|
const _o = "offset";
|
|
1140
1250
|
const _s = "silent";
|
|
@@ -9,8 +9,10 @@ import { DeleteMessageReactionCommandInput, DeleteMessageReactionCommandOutput }
|
|
|
9
9
|
import { GetChannelCommandInput, GetChannelCommandOutput } from "./commands/GetChannelCommand";
|
|
10
10
|
import { GetChannelMemberCommandInput, GetChannelMemberCommandOutput } from "./commands/GetChannelMemberCommand";
|
|
11
11
|
import { GetDirectChannelIdCommandInput, GetDirectChannelIdCommandOutput } from "./commands/GetDirectChannelIdCommand";
|
|
12
|
+
import { GetFilePresignedDownloadUrlCommandInput, GetFilePresignedDownloadUrlCommandOutput } from "./commands/GetFilePresignedDownloadUrlCommand";
|
|
12
13
|
import { GetMessageCommandInput, GetMessageCommandOutput } from "./commands/GetMessageCommand";
|
|
13
14
|
import { GetOrCreateDirectChannelCommandInput, GetOrCreateDirectChannelCommandOutput } from "./commands/GetOrCreateDirectChannelCommand";
|
|
15
|
+
import { GetUploadedFileInfoCommandInput, GetUploadedFileInfoCommandOutput } from "./commands/GetUploadedFileInfoCommand";
|
|
14
16
|
import { HideChannelCommandInput, HideChannelCommandOutput } from "./commands/HideChannelCommand";
|
|
15
17
|
import { InviteCommandInput, InviteCommandOutput } from "./commands/InviteCommand";
|
|
16
18
|
import { JoinChannelCommandInput, JoinChannelCommandOutput } from "./commands/JoinChannelCommand";
|
|
@@ -31,6 +33,7 @@ import { SendTypingStopCommandInput, SendTypingStopCommandOutput } from "./comma
|
|
|
31
33
|
import { ShowChannelCommandInput, ShowChannelCommandOutput } from "./commands/ShowChannelCommand";
|
|
32
34
|
import { UpdateChannelCommandInput, UpdateChannelCommandOutput } from "./commands/UpdateChannelCommand";
|
|
33
35
|
import { UpdateMessageCommandInput, UpdateMessageCommandOutput } from "./commands/UpdateMessageCommand";
|
|
36
|
+
import { UploadFileCommandInput, UploadFileCommandOutput } from "./commands/UploadFileCommand";
|
|
34
37
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
35
38
|
export interface Conversations {
|
|
36
39
|
/**
|
|
@@ -95,6 +98,12 @@ export interface Conversations {
|
|
|
95
98
|
getDirectChannelId(args: GetDirectChannelIdCommandInput, options?: __HttpHandlerOptions): Promise<GetDirectChannelIdCommandOutput>;
|
|
96
99
|
getDirectChannelId(args: GetDirectChannelIdCommandInput, cb: (err: any, data?: GetDirectChannelIdCommandOutput) => void): void;
|
|
97
100
|
getDirectChannelId(args: GetDirectChannelIdCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDirectChannelIdCommandOutput) => void): void;
|
|
101
|
+
/**
|
|
102
|
+
* @see {@link GetFilePresignedDownloadUrlCommand}
|
|
103
|
+
*/
|
|
104
|
+
getFilePresignedDownloadUrl(args: GetFilePresignedDownloadUrlCommandInput, options?: __HttpHandlerOptions): Promise<GetFilePresignedDownloadUrlCommandOutput>;
|
|
105
|
+
getFilePresignedDownloadUrl(args: GetFilePresignedDownloadUrlCommandInput, cb: (err: any, data?: GetFilePresignedDownloadUrlCommandOutput) => void): void;
|
|
106
|
+
getFilePresignedDownloadUrl(args: GetFilePresignedDownloadUrlCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetFilePresignedDownloadUrlCommandOutput) => void): void;
|
|
98
107
|
/**
|
|
99
108
|
* @see {@link GetMessageCommand}
|
|
100
109
|
*/
|
|
@@ -108,6 +117,12 @@ export interface Conversations {
|
|
|
108
117
|
getOrCreateDirectChannel(args: GetOrCreateDirectChannelCommandInput, options?: __HttpHandlerOptions): Promise<GetOrCreateDirectChannelCommandOutput>;
|
|
109
118
|
getOrCreateDirectChannel(args: GetOrCreateDirectChannelCommandInput, cb: (err: any, data?: GetOrCreateDirectChannelCommandOutput) => void): void;
|
|
110
119
|
getOrCreateDirectChannel(args: GetOrCreateDirectChannelCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetOrCreateDirectChannelCommandOutput) => void): void;
|
|
120
|
+
/**
|
|
121
|
+
* @see {@link GetUploadedFileInfoCommand}
|
|
122
|
+
*/
|
|
123
|
+
getUploadedFileInfo(args: GetUploadedFileInfoCommandInput, options?: __HttpHandlerOptions): Promise<GetUploadedFileInfoCommandOutput>;
|
|
124
|
+
getUploadedFileInfo(args: GetUploadedFileInfoCommandInput, cb: (err: any, data?: GetUploadedFileInfoCommandOutput) => void): void;
|
|
125
|
+
getUploadedFileInfo(args: GetUploadedFileInfoCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetUploadedFileInfoCommandOutput) => void): void;
|
|
111
126
|
/**
|
|
112
127
|
* @see {@link HideChannelCommand}
|
|
113
128
|
*/
|
|
@@ -229,6 +244,12 @@ export interface Conversations {
|
|
|
229
244
|
updateMessage(args: UpdateMessageCommandInput, options?: __HttpHandlerOptions): Promise<UpdateMessageCommandOutput>;
|
|
230
245
|
updateMessage(args: UpdateMessageCommandInput, cb: (err: any, data?: UpdateMessageCommandOutput) => void): void;
|
|
231
246
|
updateMessage(args: UpdateMessageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateMessageCommandOutput) => void): void;
|
|
247
|
+
/**
|
|
248
|
+
* @see {@link UploadFileCommand}
|
|
249
|
+
*/
|
|
250
|
+
uploadFile(args: UploadFileCommandInput, options?: __HttpHandlerOptions): Promise<UploadFileCommandOutput>;
|
|
251
|
+
uploadFile(args: UploadFileCommandInput, cb: (err: any, data?: UploadFileCommandOutput) => void): void;
|
|
252
|
+
uploadFile(args: UploadFileCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UploadFileCommandOutput) => void): void;
|
|
232
253
|
}
|
|
233
254
|
/**
|
|
234
255
|
* @public
|
|
@@ -8,8 +8,10 @@ import { DeleteMessageReactionCommandInput, DeleteMessageReactionCommandOutput }
|
|
|
8
8
|
import { GetChannelCommandInput, GetChannelCommandOutput } from "./commands/GetChannelCommand";
|
|
9
9
|
import { GetChannelMemberCommandInput, GetChannelMemberCommandOutput } from "./commands/GetChannelMemberCommand";
|
|
10
10
|
import { GetDirectChannelIdCommandInput, GetDirectChannelIdCommandOutput } from "./commands/GetDirectChannelIdCommand";
|
|
11
|
+
import { GetFilePresignedDownloadUrlCommandInput, GetFilePresignedDownloadUrlCommandOutput } from "./commands/GetFilePresignedDownloadUrlCommand";
|
|
11
12
|
import { GetMessageCommandInput, GetMessageCommandOutput } from "./commands/GetMessageCommand";
|
|
12
13
|
import { GetOrCreateDirectChannelCommandInput, GetOrCreateDirectChannelCommandOutput } from "./commands/GetOrCreateDirectChannelCommand";
|
|
14
|
+
import { GetUploadedFileInfoCommandInput, GetUploadedFileInfoCommandOutput } from "./commands/GetUploadedFileInfoCommand";
|
|
13
15
|
import { HideChannelCommandInput, HideChannelCommandOutput } from "./commands/HideChannelCommand";
|
|
14
16
|
import { InviteCommandInput, InviteCommandOutput } from "./commands/InviteCommand";
|
|
15
17
|
import { JoinChannelCommandInput, JoinChannelCommandOutput } from "./commands/JoinChannelCommand";
|
|
@@ -30,6 +32,7 @@ import { SendTypingStopCommandInput, SendTypingStopCommandOutput } from "./comma
|
|
|
30
32
|
import { ShowChannelCommandInput, ShowChannelCommandOutput } from "./commands/ShowChannelCommand";
|
|
31
33
|
import { UpdateChannelCommandInput, UpdateChannelCommandOutput } from "./commands/UpdateChannelCommand";
|
|
32
34
|
import { UpdateMessageCommandInput, UpdateMessageCommandOutput } from "./commands/UpdateMessageCommand";
|
|
35
|
+
import { UploadFileCommandInput, UploadFileCommandOutput } from "./commands/UploadFileCommand";
|
|
33
36
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
34
37
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
35
38
|
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
@@ -40,11 +43,11 @@ export { __Client };
|
|
|
40
43
|
/**
|
|
41
44
|
* @public
|
|
42
45
|
*/
|
|
43
|
-
export type ServiceInputTypes = AddChannelMemberCommandInput | AddChannelMembersCommandInput | CreateGroupChannelCommandInput | DeleteChannelCommandInput | DeleteChannelMemberCommandInput | DeleteMessageCommandInput | DeleteMessageReactionCommandInput | GetChannelCommandInput | GetChannelMemberCommandInput | GetDirectChannelIdCommandInput | GetMessageCommandInput | GetOrCreateDirectChannelCommandInput | HideChannelCommandInput | InviteCommandInput | JoinChannelCommandInput | LeaveChannelCommandInput | ListChannelMembersCommandInput | ListChannelsCommandInput | ListMessageReactionsCommandInput | ListMessagesCommandInput | MarkReadCommandInput | PartialUpdateChannelCommandInput | PartialUpdateMessageCommandInput | ScheduleExternalFlagAdjustmentJobCommandInput | SendGiphyCommandInput | SendMessageCommandInput | SendMessageReactionCommandInput | SendTypingStartCommandInput | SendTypingStopCommandInput | ShowChannelCommandInput | UpdateChannelCommandInput | UpdateMessageCommandInput;
|
|
46
|
+
export type ServiceInputTypes = AddChannelMemberCommandInput | AddChannelMembersCommandInput | CreateGroupChannelCommandInput | DeleteChannelCommandInput | DeleteChannelMemberCommandInput | DeleteMessageCommandInput | DeleteMessageReactionCommandInput | GetChannelCommandInput | GetChannelMemberCommandInput | GetDirectChannelIdCommandInput | GetFilePresignedDownloadUrlCommandInput | GetMessageCommandInput | GetOrCreateDirectChannelCommandInput | GetUploadedFileInfoCommandInput | HideChannelCommandInput | InviteCommandInput | JoinChannelCommandInput | LeaveChannelCommandInput | ListChannelMembersCommandInput | ListChannelsCommandInput | ListMessageReactionsCommandInput | ListMessagesCommandInput | MarkReadCommandInput | PartialUpdateChannelCommandInput | PartialUpdateMessageCommandInput | ScheduleExternalFlagAdjustmentJobCommandInput | SendGiphyCommandInput | SendMessageCommandInput | SendMessageReactionCommandInput | SendTypingStartCommandInput | SendTypingStopCommandInput | ShowChannelCommandInput | UpdateChannelCommandInput | UpdateMessageCommandInput | UploadFileCommandInput;
|
|
44
47
|
/**
|
|
45
48
|
* @public
|
|
46
49
|
*/
|
|
47
|
-
export type ServiceOutputTypes = AddChannelMemberCommandOutput | AddChannelMembersCommandOutput | CreateGroupChannelCommandOutput | DeleteChannelCommandOutput | DeleteChannelMemberCommandOutput | DeleteMessageCommandOutput | DeleteMessageReactionCommandOutput | GetChannelCommandOutput | GetChannelMemberCommandOutput | GetDirectChannelIdCommandOutput | GetMessageCommandOutput | GetOrCreateDirectChannelCommandOutput | HideChannelCommandOutput | InviteCommandOutput | JoinChannelCommandOutput | LeaveChannelCommandOutput | ListChannelMembersCommandOutput | ListChannelsCommandOutput | ListMessageReactionsCommandOutput | ListMessagesCommandOutput | MarkReadCommandOutput | PartialUpdateChannelCommandOutput | PartialUpdateMessageCommandOutput | ScheduleExternalFlagAdjustmentJobCommandOutput | SendGiphyCommandOutput | SendMessageCommandOutput | SendMessageReactionCommandOutput | SendTypingStartCommandOutput | SendTypingStopCommandOutput | ShowChannelCommandOutput | UpdateChannelCommandOutput | UpdateMessageCommandOutput;
|
|
50
|
+
export type ServiceOutputTypes = AddChannelMemberCommandOutput | AddChannelMembersCommandOutput | CreateGroupChannelCommandOutput | DeleteChannelCommandOutput | DeleteChannelMemberCommandOutput | DeleteMessageCommandOutput | DeleteMessageReactionCommandOutput | GetChannelCommandOutput | GetChannelMemberCommandOutput | GetDirectChannelIdCommandOutput | GetFilePresignedDownloadUrlCommandOutput | GetMessageCommandOutput | GetOrCreateDirectChannelCommandOutput | GetUploadedFileInfoCommandOutput | HideChannelCommandOutput | InviteCommandOutput | JoinChannelCommandOutput | LeaveChannelCommandOutput | ListChannelMembersCommandOutput | ListChannelsCommandOutput | ListMessageReactionsCommandOutput | ListMessagesCommandOutput | MarkReadCommandOutput | PartialUpdateChannelCommandOutput | PartialUpdateMessageCommandOutput | ScheduleExternalFlagAdjustmentJobCommandOutput | SendGiphyCommandOutput | SendMessageCommandOutput | SendMessageReactionCommandOutput | SendTypingStartCommandOutput | SendTypingStopCommandOutput | ShowChannelCommandOutput | UpdateChannelCommandOutput | UpdateMessageCommandOutput | UploadFileCommandOutput;
|
|
48
51
|
/**
|
|
49
52
|
* @public
|
|
50
53
|
*/
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConversationsClient";
|
|
2
|
+
import { GetFilePresignedDownloadUrlInput, GetFilePresignedDownloadUrlOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export { __MetadataBearer, $Command };
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*
|
|
12
|
+
* The input for {@link GetFilePresignedDownloadUrlCommand}.
|
|
13
|
+
*/
|
|
14
|
+
export interface GetFilePresignedDownloadUrlCommandInput extends GetFilePresignedDownloadUrlInput {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*
|
|
19
|
+
* The output of {@link GetFilePresignedDownloadUrlCommand}.
|
|
20
|
+
*/
|
|
21
|
+
export interface GetFilePresignedDownloadUrlCommandOutput extends GetFilePresignedDownloadUrlOutput, __MetadataBearer {
|
|
22
|
+
}
|
|
23
|
+
declare const GetFilePresignedDownloadUrlCommand_base: {
|
|
24
|
+
new (input: GetFilePresignedDownloadUrlCommandInput): import("@smithy/smithy-client").CommandImpl<GetFilePresignedDownloadUrlCommandInput, GetFilePresignedDownloadUrlCommandOutput, ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
25
|
+
new (__0_0: GetFilePresignedDownloadUrlCommandInput): import("@smithy/smithy-client").CommandImpl<GetFilePresignedDownloadUrlCommandInput, GetFilePresignedDownloadUrlCommandOutput, ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { ConversationsClient, GetFilePresignedDownloadUrlCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
|
|
35
|
+
* // const { ConversationsClient, GetFilePresignedDownloadUrlCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
|
|
36
|
+
* const client = new ConversationsClient(config);
|
|
37
|
+
* const input = { // GetFilePresignedDownloadUrlInput
|
|
38
|
+
* channelId: "STRING_VALUE", // required
|
|
39
|
+
* messageId: "STRING_VALUE", // required
|
|
40
|
+
* fileId: "STRING_VALUE", // required
|
|
41
|
+
* category: "channels" || "recordings",
|
|
42
|
+
* };
|
|
43
|
+
* const command = new GetFilePresignedDownloadUrlCommand(input);
|
|
44
|
+
* const response = await client.send(command);
|
|
45
|
+
* // { // GetFilePresignedDownloadUrlOutput
|
|
46
|
+
* // presignedDownloadUrl: "STRING_VALUE", // required
|
|
47
|
+
* // };
|
|
48
|
+
*
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @param GetFilePresignedDownloadUrlCommandInput - {@link GetFilePresignedDownloadUrlCommandInput}
|
|
52
|
+
* @returns {@link GetFilePresignedDownloadUrlCommandOutput}
|
|
53
|
+
* @see {@link GetFilePresignedDownloadUrlCommandInput} for command's `input` shape.
|
|
54
|
+
* @see {@link GetFilePresignedDownloadUrlCommandOutput} for command's `response` shape.
|
|
55
|
+
* @see {@link ConversationsClientResolvedConfig | config} for ConversationsClient's `config` shape.
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link ChannelNotFoundException} (client fault)
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link MessageNotFoundException} (client fault)
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link FileNotFoundException} (client fault)
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link ValidationException} (client fault)
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link ConversationsServiceException}
|
|
68
|
+
* <p>Base exception class for all service exceptions from Conversations service.</p>
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
export declare class GetFilePresignedDownloadUrlCommand extends GetFilePresignedDownloadUrlCommand_base {
|
|
72
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConversationsClient";
|
|
2
|
+
import { GetUploadedFileInfoInput, GetUploadedFileInfoOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export { __MetadataBearer, $Command };
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*
|
|
12
|
+
* The input for {@link GetUploadedFileInfoCommand}.
|
|
13
|
+
*/
|
|
14
|
+
export interface GetUploadedFileInfoCommandInput extends GetUploadedFileInfoInput {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*
|
|
19
|
+
* The output of {@link GetUploadedFileInfoCommand}.
|
|
20
|
+
*/
|
|
21
|
+
export interface GetUploadedFileInfoCommandOutput extends GetUploadedFileInfoOutput, __MetadataBearer {
|
|
22
|
+
}
|
|
23
|
+
declare const GetUploadedFileInfoCommand_base: {
|
|
24
|
+
new (input: GetUploadedFileInfoCommandInput): import("@smithy/smithy-client").CommandImpl<GetUploadedFileInfoCommandInput, GetUploadedFileInfoCommandOutput, ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
25
|
+
new (__0_0: GetUploadedFileInfoCommandInput): import("@smithy/smithy-client").CommandImpl<GetUploadedFileInfoCommandInput, GetUploadedFileInfoCommandOutput, ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { ConversationsClient, GetUploadedFileInfoCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
|
|
35
|
+
* // const { ConversationsClient, GetUploadedFileInfoCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
|
|
36
|
+
* const client = new ConversationsClient(config);
|
|
37
|
+
* const input = { // GetUploadedFileInfoInput
|
|
38
|
+
* channelId: "STRING_VALUE", // required
|
|
39
|
+
* fileId: "STRING_VALUE", // required
|
|
40
|
+
* category: "channels" || "recordings",
|
|
41
|
+
* };
|
|
42
|
+
* const command = new GetUploadedFileInfoCommand(input);
|
|
43
|
+
* const response = await client.send(command);
|
|
44
|
+
* // { // GetUploadedFileInfoOutput
|
|
45
|
+
* // file: { // MessageAttachment
|
|
46
|
+
* // id: "STRING_VALUE", // required
|
|
47
|
+
* // fsId: "STRING_VALUE", // required
|
|
48
|
+
* // mime: "STRING_VALUE",
|
|
49
|
+
* // name: "STRING_VALUE", // required
|
|
50
|
+
* // size: Number("int"), // required
|
|
51
|
+
* // width: Number("int"),
|
|
52
|
+
* // height: Number("int"),
|
|
53
|
+
* // thumbnail: "STRING_VALUE",
|
|
54
|
+
* // },
|
|
55
|
+
* // };
|
|
56
|
+
*
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @param GetUploadedFileInfoCommandInput - {@link GetUploadedFileInfoCommandInput}
|
|
60
|
+
* @returns {@link GetUploadedFileInfoCommandOutput}
|
|
61
|
+
* @see {@link GetUploadedFileInfoCommandInput} for command's `input` shape.
|
|
62
|
+
* @see {@link GetUploadedFileInfoCommandOutput} for command's `response` shape.
|
|
63
|
+
* @see {@link ConversationsClientResolvedConfig | config} for ConversationsClient's `config` shape.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link ChannelNotFoundException} (client fault)
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link FileNotFoundException} (client fault)
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link ValidationException} (client fault)
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link ConversationsServiceException}
|
|
74
|
+
* <p>Base exception class for all service exceptions from Conversations service.</p>
|
|
75
|
+
*
|
|
76
|
+
*/
|
|
77
|
+
export declare class GetUploadedFileInfoCommand extends GetUploadedFileInfoCommand_base {
|
|
78
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConversationsClient";
|
|
2
|
+
import { UploadFileInput, UploadFileOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export { __MetadataBearer, $Command };
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*
|
|
12
|
+
* The input for {@link UploadFileCommand}.
|
|
13
|
+
*/
|
|
14
|
+
export interface UploadFileCommandInput extends UploadFileInput {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*
|
|
19
|
+
* The output of {@link UploadFileCommand}.
|
|
20
|
+
*/
|
|
21
|
+
export interface UploadFileCommandOutput extends UploadFileOutput, __MetadataBearer {
|
|
22
|
+
}
|
|
23
|
+
declare const UploadFileCommand_base: {
|
|
24
|
+
new (input: UploadFileCommandInput): import("@smithy/smithy-client").CommandImpl<UploadFileCommandInput, UploadFileCommandOutput, ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
25
|
+
new (__0_0: UploadFileCommandInput): import("@smithy/smithy-client").CommandImpl<UploadFileCommandInput, UploadFileCommandOutput, ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Create a presigned URL for file in x-bees channel.
|
|
30
|
+
* @example
|
|
31
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
32
|
+
* ```javascript
|
|
33
|
+
* import { ConversationsClient, UploadFileCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
|
|
34
|
+
* // const { ConversationsClient, UploadFileCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
|
|
35
|
+
* const client = new ConversationsClient(config);
|
|
36
|
+
* const input = { // UploadFileInput
|
|
37
|
+
* channelId: "STRING_VALUE", // required
|
|
38
|
+
* name: "STRING_VALUE", // required
|
|
39
|
+
* options: { // UploadFileOptions
|
|
40
|
+
* userId: "STRING_VALUE",
|
|
41
|
+
* category: "channels" || "recordings",
|
|
42
|
+
* region: "STRING_VALUE",
|
|
43
|
+
* },
|
|
44
|
+
* };
|
|
45
|
+
* const command = new UploadFileCommand(input);
|
|
46
|
+
* const response = await client.send(command);
|
|
47
|
+
* // { // UploadFileOutput
|
|
48
|
+
* // fileId: "STRING_VALUE", // required
|
|
49
|
+
* // presignedUploadUrl: "STRING_VALUE", // required
|
|
50
|
+
* // };
|
|
51
|
+
*
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @param UploadFileCommandInput - {@link UploadFileCommandInput}
|
|
55
|
+
* @returns {@link UploadFileCommandOutput}
|
|
56
|
+
* @see {@link UploadFileCommandInput} for command's `input` shape.
|
|
57
|
+
* @see {@link UploadFileCommandOutput} for command's `response` shape.
|
|
58
|
+
* @see {@link ConversationsClientResolvedConfig | config} for ConversationsClient's `config` shape.
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link ChannelNotFoundException} (client fault)
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link ValidationException} (client fault)
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link MemberNotFoundException} (client fault)
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link ConversationsServiceException}
|
|
69
|
+
* <p>Base exception class for all service exceptions from Conversations service.</p>
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
export declare class UploadFileCommand extends UploadFileCommand_base {
|
|
74
|
+
}
|
|
@@ -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";
|