@wildix/xbees-conversations-client 1.0.36 → 1.0.38
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 +127 -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 +120 -1
- package/dist-types/Conversations.d.ts +21 -0
- package/dist-types/ConversationsClient.d.ts +5 -2
- package/dist-types/commands/AddChannelMemberCommand.d.ts +1 -0
- package/dist-types/commands/AddChannelMembersCommand.d.ts +1 -0
- package/dist-types/commands/DeleteChannelMemberCommand.d.ts +1 -0
- package/dist-types/commands/GetFilePresignedDownloadUrlCommand.d.ts +72 -0
- package/dist-types/commands/GetUploadedFileInfoCommand.d.ts +78 -0
- package/dist-types/commands/ListMessagesCommand.d.ts +1 -1
- package/dist-types/commands/UploadFileCommand.d.ts +72 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/models/models_0.d.ts +157 -7
- 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) => {
|
|
@@ -9,6 +9,9 @@ export const se_AddChannelMemberCommand = async (input, context) => {
|
|
|
9
9
|
};
|
|
10
10
|
b.bp("/v2/conversations/channels/{channelId}/members");
|
|
11
11
|
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
12
|
+
const query = map({
|
|
13
|
+
[_u]: [, input[_uI]],
|
|
14
|
+
});
|
|
12
15
|
let body;
|
|
13
16
|
body = JSON.stringify(take(input, {
|
|
14
17
|
'memberId': [],
|
|
@@ -17,6 +20,7 @@ export const se_AddChannelMemberCommand = async (input, context) => {
|
|
|
17
20
|
}));
|
|
18
21
|
b.m("POST")
|
|
19
22
|
.h(headers)
|
|
23
|
+
.q(query)
|
|
20
24
|
.b(body);
|
|
21
25
|
return b.build();
|
|
22
26
|
};
|
|
@@ -27,6 +31,9 @@ export const se_AddChannelMembersCommand = async (input, context) => {
|
|
|
27
31
|
};
|
|
28
32
|
b.bp("/v2/conversations/channels/{channelId}/members");
|
|
29
33
|
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
34
|
+
const query = map({
|
|
35
|
+
[_u]: [, input[_uI]],
|
|
36
|
+
});
|
|
30
37
|
let body;
|
|
31
38
|
body = JSON.stringify(take(input, {
|
|
32
39
|
'members': _ => _json(_),
|
|
@@ -35,6 +42,7 @@ export const se_AddChannelMembersCommand = async (input, context) => {
|
|
|
35
42
|
}));
|
|
36
43
|
b.m("PUT")
|
|
37
44
|
.h(headers)
|
|
45
|
+
.q(query)
|
|
38
46
|
.b(body);
|
|
39
47
|
return b.build();
|
|
40
48
|
};
|
|
@@ -83,6 +91,7 @@ export const se_DeleteChannelMemberCommand = async (input, context) => {
|
|
|
83
91
|
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
84
92
|
b.p('memberId', () => input.memberId, '{memberId}', false);
|
|
85
93
|
const query = map({
|
|
94
|
+
[_u]: [, input[_uI]],
|
|
86
95
|
[_s]: [() => input.silent !== void 0, () => (input[_s].toString())],
|
|
87
96
|
});
|
|
88
97
|
let body;
|
|
@@ -168,6 +177,23 @@ export const se_GetDirectChannelIdCommand = async (input, context) => {
|
|
|
168
177
|
.b(body);
|
|
169
178
|
return b.build();
|
|
170
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
|
+
};
|
|
171
197
|
export const se_GetMessageCommand = async (input, context) => {
|
|
172
198
|
const b = rb(input, context);
|
|
173
199
|
const headers = {};
|
|
@@ -200,6 +226,22 @@ export const se_GetOrCreateDirectChannelCommand = async (input, context) => {
|
|
|
200
226
|
.b(body);
|
|
201
227
|
return b.build();
|
|
202
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
|
+
};
|
|
203
245
|
export const se_HideChannelCommand = async (input, context) => {
|
|
204
246
|
const b = rb(input, context);
|
|
205
247
|
const headers = {};
|
|
@@ -564,6 +606,23 @@ export const se_UpdateMessageCommand = async (input, context) => {
|
|
|
564
606
|
.b(body);
|
|
565
607
|
return b.build();
|
|
566
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
|
+
};
|
|
567
626
|
export const de_AddChannelMemberCommand = async (output, context) => {
|
|
568
627
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
569
628
|
return de_CommandError(output, context);
|
|
@@ -691,6 +750,20 @@ export const de_GetDirectChannelIdCommand = async (output, context) => {
|
|
|
691
750
|
Object.assign(contents, doc);
|
|
692
751
|
return contents;
|
|
693
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
|
+
};
|
|
694
767
|
export const de_GetMessageCommand = async (output, context) => {
|
|
695
768
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
696
769
|
return de_CommandError(output, context);
|
|
@@ -719,6 +792,20 @@ export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
|
|
|
719
792
|
Object.assign(contents, doc);
|
|
720
793
|
return contents;
|
|
721
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
|
+
};
|
|
722
809
|
export const de_HideChannelCommand = async (output, context) => {
|
|
723
810
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
724
811
|
return de_CommandError(output, context);
|
|
@@ -968,6 +1055,21 @@ export const de_UpdateMessageCommand = async (output, context) => {
|
|
|
968
1055
|
Object.assign(contents, doc);
|
|
969
1056
|
return contents;
|
|
970
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
|
+
};
|
|
971
1073
|
const de_CommandError = async (output, context) => {
|
|
972
1074
|
const parsedOutput = {
|
|
973
1075
|
...output,
|
|
@@ -996,6 +1098,9 @@ const de_CommandError = async (output, context) => {
|
|
|
996
1098
|
case "MessageNotFoundException":
|
|
997
1099
|
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
998
1100
|
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
1101
|
+
case "FileNotFoundException":
|
|
1102
|
+
case "wildix.xbees.conversations#FileNotFoundException":
|
|
1103
|
+
throw await de_FileNotFoundExceptionRes(parsedOutput, context);
|
|
999
1104
|
case "ConversationsServiceException":
|
|
1000
1105
|
case "wildix.xbees.conversations#ConversationsServiceException":
|
|
1001
1106
|
throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
|
|
@@ -1074,6 +1179,19 @@ const de_ConversationsServiceExceptionRes = async (parsedOutput, context) => {
|
|
|
1074
1179
|
});
|
|
1075
1180
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1076
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
|
+
};
|
|
1077
1195
|
const de_MemberAlreadyExistExceptionRes = async (parsedOutput, context) => {
|
|
1078
1196
|
const contents = map({});
|
|
1079
1197
|
const data = parsedOutput.body;
|
|
@@ -1126,6 +1244,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1126
1244
|
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
1127
1245
|
value.length != 0) &&
|
|
1128
1246
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1247
|
+
const _c = "category";
|
|
1129
1248
|
const _l = "limit";
|
|
1130
1249
|
const _o = "offset";
|
|
1131
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
|
*/
|
|
@@ -36,6 +36,7 @@ declare const AddChannelMemberCommand_base: {
|
|
|
36
36
|
* const client = new ConversationsClient(config);
|
|
37
37
|
* const input = { // AddChannelMemberInput
|
|
38
38
|
* channelId: "STRING_VALUE", // required
|
|
39
|
+
* userId: "STRING_VALUE",
|
|
39
40
|
* silent: true || false,
|
|
40
41
|
* memberId: "STRING_VALUE",
|
|
41
42
|
* memberToInvite: { // UserToInvite
|
|
@@ -36,6 +36,7 @@ declare const AddChannelMembersCommand_base: {
|
|
|
36
36
|
* const client = new ConversationsClient(config);
|
|
37
37
|
* const input = { // AddChannelMembersInput
|
|
38
38
|
* channelId: "STRING_VALUE", // required
|
|
39
|
+
* userId: "STRING_VALUE",
|
|
39
40
|
* silent: true || false,
|
|
40
41
|
* members: [ // UsersIdList
|
|
41
42
|
* "STRING_VALUE",
|
|
@@ -36,6 +36,7 @@ declare const DeleteChannelMemberCommand_base: {
|
|
|
36
36
|
* const client = new ConversationsClient(config);
|
|
37
37
|
* const input = { // DeleteChannelMemberInput
|
|
38
38
|
* channelId: "STRING_VALUE", // required
|
|
39
|
+
* userId: "STRING_VALUE",
|
|
39
40
|
* memberId: "STRING_VALUE", // required
|
|
40
41
|
* silent: true || false,
|
|
41
42
|
* };
|
|
@@ -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 ValidationException} (client fault)
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link ForbiddenException} (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
|
+
}
|
|
@@ -42,7 +42,7 @@ declare const ListMessagesCommand_base: {
|
|
|
42
42
|
* const command = new ListMessagesCommand(input);
|
|
43
43
|
* const response = await client.send(command);
|
|
44
44
|
* // { // ListMessagesOutput
|
|
45
|
-
* // messages: [ // MessagesList
|
|
45
|
+
* // messages: [ // MessagesList // required
|
|
46
46
|
* // { // Message
|
|
47
47
|
* // text: "STRING_VALUE",
|
|
48
48
|
* // attachments: [ // MessageAttachmentList
|
|
@@ -0,0 +1,72 @@
|
|
|
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 ForbiddenException} (client fault)
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link ConversationsServiceException}
|
|
67
|
+
* <p>Base exception class for all service exceptions from Conversations service.</p>
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export declare class UploadFileCommand extends UploadFileCommand_base {
|
|
72
|
+
}
|
|
@@ -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";
|