@wildix/xbees-conversations-client 1.0.32 → 1.0.34
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 -4
- package/dist-cjs/commands/{SendSystemMessageCommand.js → HideChannelCommand.js} +7 -7
- package/dist-cjs/commands/ListMessageReactionsCommand.js +41 -0
- package/dist-cjs/commands/{GetMessageReactionsCommand.js → ShowChannelCommand.js} +7 -7
- package/dist-cjs/commands/index.js +3 -2
- package/dist-cjs/protocols/Aws_restJson1.js +138 -135
- package/dist-es/Conversations.js +6 -4
- package/dist-es/commands/{SendSystemMessageCommand.js → HideChannelCommand.js} +6 -6
- package/dist-es/commands/ListMessageReactionsCommand.js +37 -0
- package/dist-es/commands/{GetMessageReactionsCommand.js → ShowChannelCommand.js} +6 -6
- package/dist-es/commands/index.js +3 -2
- package/dist-es/protocols/Aws_restJson1.js +125 -124
- package/dist-types/Conversations.d.ts +21 -14
- package/dist-types/ConversationsClient.d.ts +5 -4
- package/dist-types/commands/AddChannelMemberCommand.d.ts +1 -0
- package/dist-types/commands/AddChannelMembersCommand.d.ts +1 -0
- package/dist-types/commands/GetMessageCommand.d.ts +29 -47
- package/dist-types/commands/HideChannelCommand.d.ts +140 -0
- package/dist-types/commands/{GetMessageReactionsCommand.d.ts → ListMessageReactionsCommand.d.ts} +18 -18
- package/dist-types/commands/ListMessagesCommand.d.ts +31 -47
- package/dist-types/commands/PartialUpdateMessageCommand.d.ts +65 -138
- package/dist-types/commands/SendGiphyCommand.d.ts +29 -47
- package/dist-types/commands/SendMessageCommand.d.ts +65 -138
- package/dist-types/commands/ShowChannelCommand.d.ts +140 -0
- package/dist-types/commands/UpdateMessageCommand.d.ts +65 -138
- package/dist-types/commands/index.d.ts +3 -2
- package/dist-types/models/models_0.d.ts +150 -119
- package/dist-types/protocols/Aws_restJson1.d.ts +27 -18
- package/package.json +1 -1
- package/dist-types/commands/SendSystemMessageCommand.d.ts +0 -213
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { de_ListMessageReactionsCommand, se_ListMessageReactionsCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class ListMessageReactionsCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
12
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
13
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
14
|
+
const { logger } = configuration;
|
|
15
|
+
const clientName = "ConversationsClient";
|
|
16
|
+
const commandName = "ListMessageReactionsCommand";
|
|
17
|
+
const handlerExecutionContext = {
|
|
18
|
+
logger,
|
|
19
|
+
clientName,
|
|
20
|
+
commandName,
|
|
21
|
+
inputFilterSensitiveLog: (_) => _,
|
|
22
|
+
outputFilterSensitiveLog: (_) => _,
|
|
23
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
24
|
+
service: "Conversations",
|
|
25
|
+
operation: "ListMessageReactions",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return se_ListMessageReactionsCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return de_ListMessageReactionsCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { de_ShowChannelCommand, se_ShowChannelCommand, } from "../protocols/Aws_restJson1";
|
|
2
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
4
|
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
5
|
export { $Command };
|
|
6
|
-
export class
|
|
6
|
+
export class ShowChannelCommand extends $Command {
|
|
7
7
|
constructor(input) {
|
|
8
8
|
super();
|
|
9
9
|
this.input = input;
|
|
@@ -13,7 +13,7 @@ export class GetMessageReactionsCommand extends $Command {
|
|
|
13
13
|
const stack = clientStack.concat(this.middlewareStack);
|
|
14
14
|
const { logger } = configuration;
|
|
15
15
|
const clientName = "ConversationsClient";
|
|
16
|
-
const commandName = "
|
|
16
|
+
const commandName = "ShowChannelCommand";
|
|
17
17
|
const handlerExecutionContext = {
|
|
18
18
|
logger,
|
|
19
19
|
clientName,
|
|
@@ -22,16 +22,16 @@ export class GetMessageReactionsCommand extends $Command {
|
|
|
22
22
|
outputFilterSensitiveLog: (_) => _,
|
|
23
23
|
[SMITHY_CONTEXT_KEY]: {
|
|
24
24
|
service: "Conversations",
|
|
25
|
-
operation: "
|
|
25
|
+
operation: "ShowChannel",
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
const { requestHandler } = configuration;
|
|
29
29
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
30
|
}
|
|
31
31
|
serialize(input, context) {
|
|
32
|
-
return
|
|
32
|
+
return se_ShowChannelCommand(input, context);
|
|
33
33
|
}
|
|
34
34
|
deserialize(output, context) {
|
|
35
|
-
return
|
|
35
|
+
return de_ShowChannelCommand(output, context);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -9,13 +9,14 @@ export * from "./GetChannelCommand";
|
|
|
9
9
|
export * from "./GetChannelMemberCommand";
|
|
10
10
|
export * from "./GetDirectChannelIdCommand";
|
|
11
11
|
export * from "./GetMessageCommand";
|
|
12
|
-
export * from "./GetMessageReactionsCommand";
|
|
13
12
|
export * from "./GetOrCreateDirectChannelCommand";
|
|
13
|
+
export * from "./HideChannelCommand";
|
|
14
14
|
export * from "./InviteCommand";
|
|
15
15
|
export * from "./JoinChannelCommand";
|
|
16
16
|
export * from "./LeaveChannelCommand";
|
|
17
17
|
export * from "./ListChannelMembersCommand";
|
|
18
18
|
export * from "./ListChannelsCommand";
|
|
19
|
+
export * from "./ListMessageReactionsCommand";
|
|
19
20
|
export * from "./ListMessagesCommand";
|
|
20
21
|
export * from "./MarkReadCommand";
|
|
21
22
|
export * from "./PartialUpdateChannelCommand";
|
|
@@ -24,8 +25,8 @@ export * from "./ScheduleExternalFlagAdjustmentJobCommand";
|
|
|
24
25
|
export * from "./SendGiphyCommand";
|
|
25
26
|
export * from "./SendMessageCommand";
|
|
26
27
|
export * from "./SendMessageReactionCommand";
|
|
27
|
-
export * from "./SendSystemMessageCommand";
|
|
28
28
|
export * from "./SendTypingStartCommand";
|
|
29
29
|
export * from "./SendTypingStopCommand";
|
|
30
|
+
export * from "./ShowChannelCommand";
|
|
30
31
|
export * from "./UpdateChannelCommand";
|
|
31
32
|
export * from "./UpdateMessageCommand";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConversationsServiceException as __BaseException } from "../models/ConversationsServiceException";
|
|
2
2
|
import { ChannelAlreadyExistException, ChannelNotFoundException, ConversationsServiceException, ForbiddenException, MemberAlreadyExistException, MemberNotFoundException, MessageNotFoundException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { HttpRequest as __HttpRequest, } from "@smithy/protocol-http";
|
|
4
|
-
import { decorateServiceException as __decorateServiceException,
|
|
4
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, resolvedPath as __resolvedPath, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_AddChannelMemberCommand = async (input, context) => {
|
|
6
6
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
7
|
const headers = {
|
|
@@ -13,6 +13,7 @@ export const se_AddChannelMemberCommand = async (input, context) => {
|
|
|
13
13
|
body = JSON.stringify(take(input, {
|
|
14
14
|
'memberId': [],
|
|
15
15
|
'memberToInvite': _ => _json(_),
|
|
16
|
+
'silent': [],
|
|
16
17
|
}));
|
|
17
18
|
return new __HttpRequest({
|
|
18
19
|
protocol,
|
|
@@ -35,6 +36,7 @@ export const se_AddChannelMembersCommand = async (input, context) => {
|
|
|
35
36
|
body = JSON.stringify(take(input, {
|
|
36
37
|
'members': _ => _json(_),
|
|
37
38
|
'membersToInvite': _ => _json(_),
|
|
39
|
+
'silent': [],
|
|
38
40
|
}));
|
|
39
41
|
return new __HttpRequest({
|
|
40
42
|
protocol,
|
|
@@ -233,42 +235,40 @@ export const se_GetMessageCommand = async (input, context) => {
|
|
|
233
235
|
body,
|
|
234
236
|
});
|
|
235
237
|
};
|
|
236
|
-
export const
|
|
238
|
+
export const se_GetOrCreateDirectChannelCommand = async (input, context) => {
|
|
237
239
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
238
|
-
const headers = {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
resolvedPath =
|
|
240
|
+
const headers = {
|
|
241
|
+
'content-type': 'application/json',
|
|
242
|
+
};
|
|
243
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/direct/get_or_create_channel";
|
|
242
244
|
const query = map({
|
|
243
|
-
"
|
|
244
|
-
"offset": [() => input.offset !== void 0, () => (input.offset.toString())],
|
|
245
|
+
"user": [, input.userId],
|
|
245
246
|
});
|
|
246
247
|
let body;
|
|
248
|
+
body = JSON.stringify(take(input, {
|
|
249
|
+
'memberId': [],
|
|
250
|
+
'memberToInvite': _ => _json(_),
|
|
251
|
+
}));
|
|
247
252
|
return new __HttpRequest({
|
|
248
253
|
protocol,
|
|
249
254
|
hostname,
|
|
250
255
|
port,
|
|
251
|
-
method: "
|
|
256
|
+
method: "POST",
|
|
252
257
|
headers,
|
|
253
258
|
path: resolvedPath,
|
|
254
259
|
query,
|
|
255
260
|
body,
|
|
256
261
|
});
|
|
257
262
|
};
|
|
258
|
-
export const
|
|
263
|
+
export const se_HideChannelCommand = async (input, context) => {
|
|
259
264
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
260
|
-
const headers = {
|
|
261
|
-
|
|
262
|
-
};
|
|
263
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/direct/get_or_create_channel";
|
|
265
|
+
const headers = {};
|
|
266
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/hide";
|
|
267
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
264
268
|
const query = map({
|
|
265
269
|
"user": [, input.userId],
|
|
266
270
|
});
|
|
267
271
|
let body;
|
|
268
|
-
body = JSON.stringify(take(input, {
|
|
269
|
-
'memberId': [],
|
|
270
|
-
'memberToInvite': _ => _json(_),
|
|
271
|
-
}));
|
|
272
272
|
return new __HttpRequest({
|
|
273
273
|
protocol,
|
|
274
274
|
hostname,
|
|
@@ -392,11 +392,37 @@ export const se_ListChannelsCommand = async (input, context) => {
|
|
|
392
392
|
body,
|
|
393
393
|
});
|
|
394
394
|
};
|
|
395
|
+
export const se_ListMessageReactionsCommand = async (input, context) => {
|
|
396
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
397
|
+
const headers = {};
|
|
398
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
|
|
399
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
400
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
401
|
+
const query = map({
|
|
402
|
+
"limit": [() => input.limit !== void 0, () => (input.limit.toString())],
|
|
403
|
+
"offset": [() => input.offset !== void 0, () => (input.offset.toString())],
|
|
404
|
+
});
|
|
405
|
+
let body;
|
|
406
|
+
return new __HttpRequest({
|
|
407
|
+
protocol,
|
|
408
|
+
hostname,
|
|
409
|
+
port,
|
|
410
|
+
method: "GET",
|
|
411
|
+
headers,
|
|
412
|
+
path: resolvedPath,
|
|
413
|
+
query,
|
|
414
|
+
body,
|
|
415
|
+
});
|
|
416
|
+
};
|
|
395
417
|
export const se_ListMessagesCommand = async (input, context) => {
|
|
396
418
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
397
419
|
const headers = {};
|
|
398
420
|
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages";
|
|
399
421
|
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
422
|
+
const query = map({
|
|
423
|
+
"limit": [() => input.limit !== void 0, () => (input.limit.toString())],
|
|
424
|
+
"offset": [() => input.offset !== void 0, () => (input.offset.toString())],
|
|
425
|
+
});
|
|
400
426
|
let body;
|
|
401
427
|
return new __HttpRequest({
|
|
402
428
|
protocol,
|
|
@@ -405,6 +431,7 @@ export const se_ListMessagesCommand = async (input, context) => {
|
|
|
405
431
|
method: "GET",
|
|
406
432
|
headers,
|
|
407
433
|
path: resolvedPath,
|
|
434
|
+
query,
|
|
408
435
|
body,
|
|
409
436
|
});
|
|
410
437
|
};
|
|
@@ -464,7 +491,7 @@ export const se_PartialUpdateMessageCommand = async (input, context) => {
|
|
|
464
491
|
resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
465
492
|
let body;
|
|
466
493
|
body = JSON.stringify(take(input, {
|
|
467
|
-
'set': _ =>
|
|
494
|
+
'set': _ => _json(_),
|
|
468
495
|
'unset': _ => _json(_),
|
|
469
496
|
}));
|
|
470
497
|
return new __HttpRequest({
|
|
@@ -539,7 +566,7 @@ export const se_SendMessageCommand = async (input, context) => {
|
|
|
539
566
|
'forward': _ => _json(_),
|
|
540
567
|
'mentions': _ => _json(_),
|
|
541
568
|
'messageId': [],
|
|
542
|
-
'quote': _ =>
|
|
569
|
+
'quote': _ => _json(_),
|
|
543
570
|
'text': [],
|
|
544
571
|
}));
|
|
545
572
|
return new __HttpRequest({
|
|
@@ -579,20 +606,15 @@ export const se_SendMessageReactionCommand = async (input, context) => {
|
|
|
579
606
|
body,
|
|
580
607
|
});
|
|
581
608
|
};
|
|
582
|
-
export const
|
|
609
|
+
export const se_SendTypingStartCommand = async (input, context) => {
|
|
583
610
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
584
|
-
const headers = {
|
|
585
|
-
|
|
586
|
-
};
|
|
587
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_system_message";
|
|
611
|
+
const headers = {};
|
|
612
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_typing_start";
|
|
588
613
|
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
589
614
|
const query = map({
|
|
590
615
|
"user": [, input.userId],
|
|
591
616
|
});
|
|
592
617
|
let body;
|
|
593
|
-
body = JSON.stringify(take(input, {
|
|
594
|
-
'messageId': [],
|
|
595
|
-
}));
|
|
596
618
|
return new __HttpRequest({
|
|
597
619
|
protocol,
|
|
598
620
|
hostname,
|
|
@@ -604,10 +626,10 @@ export const se_SendSystemMessageCommand = async (input, context) => {
|
|
|
604
626
|
body,
|
|
605
627
|
});
|
|
606
628
|
};
|
|
607
|
-
export const
|
|
629
|
+
export const se_SendTypingStopCommand = async (input, context) => {
|
|
608
630
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
609
631
|
const headers = {};
|
|
610
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/
|
|
632
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_typing_stop";
|
|
611
633
|
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
612
634
|
const query = map({
|
|
613
635
|
"user": [, input.userId],
|
|
@@ -624,10 +646,10 @@ export const se_SendTypingStartCommand = async (input, context) => {
|
|
|
624
646
|
body,
|
|
625
647
|
});
|
|
626
648
|
};
|
|
627
|
-
export const
|
|
649
|
+
export const se_ShowChannelCommand = async (input, context) => {
|
|
628
650
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
629
651
|
const headers = {};
|
|
630
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/
|
|
652
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/show";
|
|
631
653
|
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
632
654
|
const query = map({
|
|
633
655
|
"user": [, input.userId],
|
|
@@ -687,7 +709,7 @@ export const se_UpdateMessageCommand = async (input, context) => {
|
|
|
687
709
|
'attachments': _ => _json(_),
|
|
688
710
|
'forward': _ => _json(_),
|
|
689
711
|
'mentions': _ => _json(_),
|
|
690
|
-
'quote': _ =>
|
|
712
|
+
'quote': _ => _json(_),
|
|
691
713
|
'text': [],
|
|
692
714
|
}));
|
|
693
715
|
return new __HttpRequest({
|
|
@@ -1101,7 +1123,7 @@ export const de_GetMessageCommand = async (output, context) => {
|
|
|
1101
1123
|
});
|
|
1102
1124
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1103
1125
|
const doc = take(data, {
|
|
1104
|
-
'message':
|
|
1126
|
+
'message': _json,
|
|
1105
1127
|
});
|
|
1106
1128
|
Object.assign(contents, doc);
|
|
1107
1129
|
return contents;
|
|
@@ -1131,30 +1153,27 @@ const de_GetMessageCommandError = async (output, context) => {
|
|
|
1131
1153
|
});
|
|
1132
1154
|
}
|
|
1133
1155
|
};
|
|
1134
|
-
export const
|
|
1156
|
+
export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
|
|
1135
1157
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1136
|
-
return
|
|
1158
|
+
return de_GetOrCreateDirectChannelCommandError(output, context);
|
|
1137
1159
|
}
|
|
1138
1160
|
const contents = map({
|
|
1139
1161
|
$metadata: deserializeMetadata(output),
|
|
1140
1162
|
});
|
|
1141
1163
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1142
1164
|
const doc = take(data, {
|
|
1143
|
-
'
|
|
1165
|
+
'channel': _json,
|
|
1144
1166
|
});
|
|
1145
1167
|
Object.assign(contents, doc);
|
|
1146
1168
|
return contents;
|
|
1147
1169
|
};
|
|
1148
|
-
const
|
|
1170
|
+
const de_GetOrCreateDirectChannelCommandError = async (output, context) => {
|
|
1149
1171
|
const parsedOutput = {
|
|
1150
1172
|
...output,
|
|
1151
1173
|
body: await parseErrorBody(output.body, context)
|
|
1152
1174
|
};
|
|
1153
1175
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1154
1176
|
switch (errorCode) {
|
|
1155
|
-
case "ChannelNotFoundException":
|
|
1156
|
-
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1157
|
-
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1158
1177
|
case "ForbiddenException":
|
|
1159
1178
|
case "smithy.framework#ForbiddenException":
|
|
1160
1179
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
@@ -1170,9 +1189,9 @@ const de_GetMessageReactionsCommandError = async (output, context) => {
|
|
|
1170
1189
|
});
|
|
1171
1190
|
}
|
|
1172
1191
|
};
|
|
1173
|
-
export const
|
|
1192
|
+
export const de_HideChannelCommand = async (output, context) => {
|
|
1174
1193
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1175
|
-
return
|
|
1194
|
+
return de_HideChannelCommandError(output, context);
|
|
1176
1195
|
}
|
|
1177
1196
|
const contents = map({
|
|
1178
1197
|
$metadata: deserializeMetadata(output),
|
|
@@ -1184,13 +1203,16 @@ export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
|
|
|
1184
1203
|
Object.assign(contents, doc);
|
|
1185
1204
|
return contents;
|
|
1186
1205
|
};
|
|
1187
|
-
const
|
|
1206
|
+
const de_HideChannelCommandError = async (output, context) => {
|
|
1188
1207
|
const parsedOutput = {
|
|
1189
1208
|
...output,
|
|
1190
1209
|
body: await parseErrorBody(output.body, context)
|
|
1191
1210
|
};
|
|
1192
1211
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1193
1212
|
switch (errorCode) {
|
|
1213
|
+
case "ChannelNotFoundException":
|
|
1214
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1215
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1194
1216
|
case "ForbiddenException":
|
|
1195
1217
|
case "smithy.framework#ForbiddenException":
|
|
1196
1218
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
@@ -1392,6 +1414,45 @@ const de_ListChannelsCommandError = async (output, context) => {
|
|
|
1392
1414
|
});
|
|
1393
1415
|
}
|
|
1394
1416
|
};
|
|
1417
|
+
export const de_ListMessageReactionsCommand = async (output, context) => {
|
|
1418
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1419
|
+
return de_ListMessageReactionsCommandError(output, context);
|
|
1420
|
+
}
|
|
1421
|
+
const contents = map({
|
|
1422
|
+
$metadata: deserializeMetadata(output),
|
|
1423
|
+
});
|
|
1424
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1425
|
+
const doc = take(data, {
|
|
1426
|
+
'reactions': _json,
|
|
1427
|
+
});
|
|
1428
|
+
Object.assign(contents, doc);
|
|
1429
|
+
return contents;
|
|
1430
|
+
};
|
|
1431
|
+
const de_ListMessageReactionsCommandError = async (output, context) => {
|
|
1432
|
+
const parsedOutput = {
|
|
1433
|
+
...output,
|
|
1434
|
+
body: await parseErrorBody(output.body, context)
|
|
1435
|
+
};
|
|
1436
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1437
|
+
switch (errorCode) {
|
|
1438
|
+
case "ChannelNotFoundException":
|
|
1439
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1440
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1441
|
+
case "ForbiddenException":
|
|
1442
|
+
case "smithy.framework#ForbiddenException":
|
|
1443
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1444
|
+
case "ValidationException":
|
|
1445
|
+
case "smithy.framework#ValidationException":
|
|
1446
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1447
|
+
default:
|
|
1448
|
+
const parsedBody = parsedOutput.body;
|
|
1449
|
+
return throwDefaultError({
|
|
1450
|
+
output,
|
|
1451
|
+
parsedBody,
|
|
1452
|
+
errorCode
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1395
1456
|
export const de_ListMessagesCommand = async (output, context) => {
|
|
1396
1457
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1397
1458
|
return de_ListMessagesCommandError(output, context);
|
|
@@ -1401,7 +1462,7 @@ export const de_ListMessagesCommand = async (output, context) => {
|
|
|
1401
1462
|
});
|
|
1402
1463
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1403
1464
|
const doc = take(data, {
|
|
1404
|
-
'messages':
|
|
1465
|
+
'messages': _json,
|
|
1405
1466
|
});
|
|
1406
1467
|
Object.assign(contents, doc);
|
|
1407
1468
|
return contents;
|
|
@@ -1514,7 +1575,7 @@ export const de_PartialUpdateMessageCommand = async (output, context) => {
|
|
|
1514
1575
|
});
|
|
1515
1576
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1516
1577
|
const doc = take(data, {
|
|
1517
|
-
'message':
|
|
1578
|
+
'message': _json,
|
|
1518
1579
|
});
|
|
1519
1580
|
Object.assign(contents, doc);
|
|
1520
1581
|
return contents;
|
|
@@ -1591,7 +1652,7 @@ export const de_SendGiphyCommand = async (output, context) => {
|
|
|
1591
1652
|
});
|
|
1592
1653
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1593
1654
|
const doc = take(data, {
|
|
1594
|
-
'message':
|
|
1655
|
+
'message': _json,
|
|
1595
1656
|
});
|
|
1596
1657
|
Object.assign(contents, doc);
|
|
1597
1658
|
return contents;
|
|
@@ -1630,7 +1691,7 @@ export const de_SendMessageCommand = async (output, context) => {
|
|
|
1630
1691
|
});
|
|
1631
1692
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1632
1693
|
const doc = take(data, {
|
|
1633
|
-
'message':
|
|
1694
|
+
'message': _json,
|
|
1634
1695
|
});
|
|
1635
1696
|
Object.assign(contents, doc);
|
|
1636
1697
|
return contents;
|
|
@@ -1695,21 +1756,17 @@ const de_SendMessageReactionCommandError = async (output, context) => {
|
|
|
1695
1756
|
});
|
|
1696
1757
|
}
|
|
1697
1758
|
};
|
|
1698
|
-
export const
|
|
1759
|
+
export const de_SendTypingStartCommand = async (output, context) => {
|
|
1699
1760
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1700
|
-
return
|
|
1761
|
+
return de_SendTypingStartCommandError(output, context);
|
|
1701
1762
|
}
|
|
1702
1763
|
const contents = map({
|
|
1703
1764
|
$metadata: deserializeMetadata(output),
|
|
1704
1765
|
});
|
|
1705
|
-
|
|
1706
|
-
const doc = take(data, {
|
|
1707
|
-
'message': _ => de_Message(_, context),
|
|
1708
|
-
});
|
|
1709
|
-
Object.assign(contents, doc);
|
|
1766
|
+
await collectBody(output.body, context);
|
|
1710
1767
|
return contents;
|
|
1711
1768
|
};
|
|
1712
|
-
const
|
|
1769
|
+
const de_SendTypingStartCommandError = async (output, context) => {
|
|
1713
1770
|
const parsedOutput = {
|
|
1714
1771
|
...output,
|
|
1715
1772
|
body: await parseErrorBody(output.body, context)
|
|
@@ -1734,9 +1791,9 @@ const de_SendSystemMessageCommandError = async (output, context) => {
|
|
|
1734
1791
|
});
|
|
1735
1792
|
}
|
|
1736
1793
|
};
|
|
1737
|
-
export const
|
|
1794
|
+
export const de_SendTypingStopCommand = async (output, context) => {
|
|
1738
1795
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1739
|
-
return
|
|
1796
|
+
return de_SendTypingStopCommandError(output, context);
|
|
1740
1797
|
}
|
|
1741
1798
|
const contents = map({
|
|
1742
1799
|
$metadata: deserializeMetadata(output),
|
|
@@ -1744,7 +1801,7 @@ export const de_SendTypingStartCommand = async (output, context) => {
|
|
|
1744
1801
|
await collectBody(output.body, context);
|
|
1745
1802
|
return contents;
|
|
1746
1803
|
};
|
|
1747
|
-
const
|
|
1804
|
+
const de_SendTypingStopCommandError = async (output, context) => {
|
|
1748
1805
|
const parsedOutput = {
|
|
1749
1806
|
...output,
|
|
1750
1807
|
body: await parseErrorBody(output.body, context)
|
|
@@ -1769,17 +1826,21 @@ const de_SendTypingStartCommandError = async (output, context) => {
|
|
|
1769
1826
|
});
|
|
1770
1827
|
}
|
|
1771
1828
|
};
|
|
1772
|
-
export const
|
|
1829
|
+
export const de_ShowChannelCommand = async (output, context) => {
|
|
1773
1830
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1774
|
-
return
|
|
1831
|
+
return de_ShowChannelCommandError(output, context);
|
|
1775
1832
|
}
|
|
1776
1833
|
const contents = map({
|
|
1777
1834
|
$metadata: deserializeMetadata(output),
|
|
1778
1835
|
});
|
|
1779
|
-
await
|
|
1836
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1837
|
+
const doc = take(data, {
|
|
1838
|
+
'channel': _json,
|
|
1839
|
+
});
|
|
1840
|
+
Object.assign(contents, doc);
|
|
1780
1841
|
return contents;
|
|
1781
1842
|
};
|
|
1782
|
-
const
|
|
1843
|
+
const de_ShowChannelCommandError = async (output, context) => {
|
|
1783
1844
|
const parsedOutput = {
|
|
1784
1845
|
...output,
|
|
1785
1846
|
body: await parseErrorBody(output.body, context)
|
|
@@ -1852,7 +1913,7 @@ export const de_UpdateMessageCommand = async (output, context) => {
|
|
|
1852
1913
|
});
|
|
1853
1914
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1854
1915
|
const doc = take(data, {
|
|
1855
|
-
'message':
|
|
1916
|
+
'message': _json,
|
|
1856
1917
|
});
|
|
1857
1918
|
Object.assign(contents, doc);
|
|
1858
1919
|
return contents;
|
|
@@ -1990,66 +2051,6 @@ const de_MessageNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
1990
2051
|
});
|
|
1991
2052
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1992
2053
|
};
|
|
1993
|
-
const se_Message = (input, context) => {
|
|
1994
|
-
return take(input, {
|
|
1995
|
-
'attachments': _json,
|
|
1996
|
-
'channelId': [],
|
|
1997
|
-
'createdAt': [],
|
|
1998
|
-
'edit': [],
|
|
1999
|
-
'event': [],
|
|
2000
|
-
'forward': _json,
|
|
2001
|
-
'giphy': _json,
|
|
2002
|
-
'latestReactions': _json,
|
|
2003
|
-
'mentions': _json,
|
|
2004
|
-
'messageId': [],
|
|
2005
|
-
'quote': _ => se_Message(_, context),
|
|
2006
|
-
'reactionCounts': _json,
|
|
2007
|
-
'silent': [],
|
|
2008
|
-
'sms': [],
|
|
2009
|
-
'smsStatus': [],
|
|
2010
|
-
'text': [],
|
|
2011
|
-
'type': [],
|
|
2012
|
-
'updatedAt': [],
|
|
2013
|
-
'user': _json,
|
|
2014
|
-
});
|
|
2015
|
-
};
|
|
2016
|
-
const se_PartialUpdateMessageSetInput = (input, context) => {
|
|
2017
|
-
return take(input, {
|
|
2018
|
-
'attachments': _json,
|
|
2019
|
-
'forward': _json,
|
|
2020
|
-
'quote': _ => se_Message(_, context),
|
|
2021
|
-
'text': [],
|
|
2022
|
-
});
|
|
2023
|
-
};
|
|
2024
|
-
const de_Message = (output, context) => {
|
|
2025
|
-
return take(output, {
|
|
2026
|
-
'attachments': _json,
|
|
2027
|
-
'channelId': __expectString,
|
|
2028
|
-
'createdAt': __expectString,
|
|
2029
|
-
'edit': __expectBoolean,
|
|
2030
|
-
'event': __expectString,
|
|
2031
|
-
'forward': _json,
|
|
2032
|
-
'giphy': _json,
|
|
2033
|
-
'latestReactions': _json,
|
|
2034
|
-
'mentions': _json,
|
|
2035
|
-
'messageId': __expectString,
|
|
2036
|
-
'quote': (_) => de_Message(_, context),
|
|
2037
|
-
'reactionCounts': _json,
|
|
2038
|
-
'silent': __expectBoolean,
|
|
2039
|
-
'sms': __expectBoolean,
|
|
2040
|
-
'smsStatus': __expectString,
|
|
2041
|
-
'text': __expectString,
|
|
2042
|
-
'type': __expectString,
|
|
2043
|
-
'updatedAt': __expectString,
|
|
2044
|
-
'user': _json,
|
|
2045
|
-
});
|
|
2046
|
-
};
|
|
2047
|
-
const de_MessagesList = (output, context) => {
|
|
2048
|
-
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
2049
|
-
return de_Message(entry, context);
|
|
2050
|
-
});
|
|
2051
|
-
return retVal;
|
|
2052
|
-
};
|
|
2053
2054
|
const deserializeMetadata = (output) => ({
|
|
2054
2055
|
httpStatusCode: output.statusCode,
|
|
2055
2056
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|