@wildix/xbees-conversations-client 1.0.31 → 1.0.33

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.
@@ -13,13 +13,13 @@ const GetChannelCommand_1 = require("./commands/GetChannelCommand");
13
13
  const GetChannelMemberCommand_1 = require("./commands/GetChannelMemberCommand");
14
14
  const GetDirectChannelIdCommand_1 = require("./commands/GetDirectChannelIdCommand");
15
15
  const GetMessageCommand_1 = require("./commands/GetMessageCommand");
16
- const GetMessageReactionsCommand_1 = require("./commands/GetMessageReactionsCommand");
17
16
  const GetOrCreateDirectChannelCommand_1 = require("./commands/GetOrCreateDirectChannelCommand");
18
17
  const InviteCommand_1 = require("./commands/InviteCommand");
19
18
  const JoinChannelCommand_1 = require("./commands/JoinChannelCommand");
20
19
  const LeaveChannelCommand_1 = require("./commands/LeaveChannelCommand");
21
20
  const ListChannelMembersCommand_1 = require("./commands/ListChannelMembersCommand");
22
21
  const ListChannelsCommand_1 = require("./commands/ListChannelsCommand");
22
+ const ListMessageReactionsCommand_1 = require("./commands/ListMessageReactionsCommand");
23
23
  const ListMessagesCommand_1 = require("./commands/ListMessagesCommand");
24
24
  const MarkReadCommand_1 = require("./commands/MarkReadCommand");
25
25
  const PartialUpdateChannelCommand_1 = require("./commands/PartialUpdateChannelCommand");
@@ -46,13 +46,13 @@ const commands = {
46
46
  GetChannelMemberCommand: GetChannelMemberCommand_1.GetChannelMemberCommand,
47
47
  GetDirectChannelIdCommand: GetDirectChannelIdCommand_1.GetDirectChannelIdCommand,
48
48
  GetMessageCommand: GetMessageCommand_1.GetMessageCommand,
49
- GetMessageReactionsCommand: GetMessageReactionsCommand_1.GetMessageReactionsCommand,
50
49
  GetOrCreateDirectChannelCommand: GetOrCreateDirectChannelCommand_1.GetOrCreateDirectChannelCommand,
51
50
  InviteCommand: InviteCommand_1.InviteCommand,
52
51
  JoinChannelCommand: JoinChannelCommand_1.JoinChannelCommand,
53
52
  LeaveChannelCommand: LeaveChannelCommand_1.LeaveChannelCommand,
54
53
  ListChannelMembersCommand: ListChannelMembersCommand_1.ListChannelMembersCommand,
55
54
  ListChannelsCommand: ListChannelsCommand_1.ListChannelsCommand,
55
+ ListMessageReactionsCommand: ListMessageReactionsCommand_1.ListMessageReactionsCommand,
56
56
  ListMessagesCommand: ListMessagesCommand_1.ListMessagesCommand,
57
57
  MarkReadCommand: MarkReadCommand_1.MarkReadCommand,
58
58
  PartialUpdateChannelCommand: PartialUpdateChannelCommand_1.PartialUpdateChannelCommand,
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetMessageReactionsCommand = exports.$Command = void 0;
3
+ exports.ListMessageReactionsCommand = exports.$Command = void 0;
4
4
  const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
8
  const types_1 = require("@smithy/types");
9
- class GetMessageReactionsCommand extends smithy_client_1.Command {
9
+ class ListMessageReactionsCommand extends smithy_client_1.Command {
10
10
  constructor(input) {
11
11
  super();
12
12
  this.input = input;
@@ -16,7 +16,7 @@ class GetMessageReactionsCommand extends smithy_client_1.Command {
16
16
  const stack = clientStack.concat(this.middlewareStack);
17
17
  const { logger } = configuration;
18
18
  const clientName = "ConversationsClient";
19
- const commandName = "GetMessageReactionsCommand";
19
+ const commandName = "ListMessageReactionsCommand";
20
20
  const handlerExecutionContext = {
21
21
  logger,
22
22
  clientName,
@@ -25,17 +25,17 @@ class GetMessageReactionsCommand extends smithy_client_1.Command {
25
25
  outputFilterSensitiveLog: (_) => _,
26
26
  [types_1.SMITHY_CONTEXT_KEY]: {
27
27
  service: "Conversations",
28
- operation: "GetMessageReactions",
28
+ operation: "ListMessageReactions",
29
29
  },
30
30
  };
31
31
  const { requestHandler } = configuration;
32
32
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
33
33
  }
34
34
  serialize(input, context) {
35
- return (0, Aws_restJson1_1.se_GetMessageReactionsCommand)(input, context);
35
+ return (0, Aws_restJson1_1.se_ListMessageReactionsCommand)(input, context);
36
36
  }
37
37
  deserialize(output, context) {
38
- return (0, Aws_restJson1_1.de_GetMessageReactionsCommand)(output, context);
38
+ return (0, Aws_restJson1_1.de_ListMessageReactionsCommand)(output, context);
39
39
  }
40
40
  }
41
- exports.GetMessageReactionsCommand = GetMessageReactionsCommand;
41
+ exports.ListMessageReactionsCommand = ListMessageReactionsCommand;
@@ -12,13 +12,13 @@ tslib_1.__exportStar(require("./GetChannelCommand"), exports);
12
12
  tslib_1.__exportStar(require("./GetChannelMemberCommand"), exports);
13
13
  tslib_1.__exportStar(require("./GetDirectChannelIdCommand"), exports);
14
14
  tslib_1.__exportStar(require("./GetMessageCommand"), exports);
15
- tslib_1.__exportStar(require("./GetMessageReactionsCommand"), exports);
16
15
  tslib_1.__exportStar(require("./GetOrCreateDirectChannelCommand"), exports);
17
16
  tslib_1.__exportStar(require("./InviteCommand"), exports);
18
17
  tslib_1.__exportStar(require("./JoinChannelCommand"), exports);
19
18
  tslib_1.__exportStar(require("./LeaveChannelCommand"), exports);
20
19
  tslib_1.__exportStar(require("./ListChannelMembersCommand"), exports);
21
20
  tslib_1.__exportStar(require("./ListChannelsCommand"), exports);
21
+ tslib_1.__exportStar(require("./ListMessageReactionsCommand"), exports);
22
22
  tslib_1.__exportStar(require("./ListMessagesCommand"), exports);
23
23
  tslib_1.__exportStar(require("./MarkReadCommand"), exports);
24
24
  tslib_1.__exportStar(require("./PartialUpdateChannelCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_ListMessagesCommand = exports.de_ListChannelsCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageReactionsCommand = exports.de_GetMessageCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_DeleteMessageReactionCommand = exports.de_DeleteMessageCommand = exports.de_DeleteChannelMemberCommand = exports.de_DeleteChannelCommand = exports.de_CreateGroupChannelCommand = exports.de_AddChannelMembersCommand = exports.de_AddChannelMemberCommand = exports.se_UpdateMessageCommand = exports.se_UpdateChannelCommand = exports.se_SendTypingStopCommand = exports.se_SendTypingStartCommand = exports.se_SendSystemMessageCommand = exports.se_SendMessageReactionCommand = exports.se_SendMessageCommand = exports.se_SendGiphyCommand = exports.se_ScheduleExternalFlagAdjustmentJobCommand = exports.se_PartialUpdateMessageCommand = exports.se_PartialUpdateChannelCommand = exports.se_MarkReadCommand = exports.se_ListMessagesCommand = exports.se_ListChannelsCommand = exports.se_ListChannelMembersCommand = exports.se_LeaveChannelCommand = exports.se_JoinChannelCommand = exports.se_InviteCommand = exports.se_GetOrCreateDirectChannelCommand = exports.se_GetMessageReactionsCommand = exports.se_GetMessageCommand = exports.se_GetDirectChannelIdCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_DeleteMessageReactionCommand = exports.se_DeleteMessageCommand = exports.se_DeleteChannelMemberCommand = exports.se_DeleteChannelCommand = exports.se_CreateGroupChannelCommand = exports.se_AddChannelMembersCommand = exports.se_AddChannelMemberCommand = void 0;
3
+ exports.de_ListMessagesCommand = exports.de_ListMessageReactionsCommand = exports.de_ListChannelsCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_DeleteMessageReactionCommand = exports.de_DeleteMessageCommand = exports.de_DeleteChannelMemberCommand = exports.de_DeleteChannelCommand = exports.de_CreateGroupChannelCommand = exports.de_AddChannelMembersCommand = exports.de_AddChannelMemberCommand = exports.se_UpdateMessageCommand = exports.se_UpdateChannelCommand = exports.se_SendTypingStopCommand = exports.se_SendTypingStartCommand = exports.se_SendSystemMessageCommand = exports.se_SendMessageReactionCommand = exports.se_SendMessageCommand = exports.se_SendGiphyCommand = exports.se_ScheduleExternalFlagAdjustmentJobCommand = exports.se_PartialUpdateMessageCommand = exports.se_PartialUpdateChannelCommand = exports.se_MarkReadCommand = exports.se_ListMessagesCommand = exports.se_ListMessageReactionsCommand = exports.se_ListChannelsCommand = exports.se_ListChannelMembersCommand = exports.se_LeaveChannelCommand = exports.se_JoinChannelCommand = exports.se_InviteCommand = exports.se_GetOrCreateDirectChannelCommand = exports.se_GetMessageCommand = exports.se_GetDirectChannelIdCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_DeleteMessageReactionCommand = exports.se_DeleteMessageCommand = exports.se_DeleteChannelMemberCommand = exports.se_DeleteChannelCommand = exports.se_CreateGroupChannelCommand = exports.se_AddChannelMembersCommand = exports.se_AddChannelMemberCommand = void 0;
4
4
  exports.de_UpdateMessageCommand = exports.de_UpdateChannelCommand = exports.de_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendSystemMessageCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_ScheduleExternalFlagAdjustmentJobCommand = exports.de_PartialUpdateMessageCommand = exports.de_PartialUpdateChannelCommand = exports.de_MarkReadCommand = void 0;
5
5
  const ConversationsServiceException_1 = require("../models/ConversationsServiceException");
6
6
  const models_0_1 = require("../models/models_0");
@@ -130,6 +130,9 @@ const se_DeleteMessageCommand = async (input, context) => {
130
130
  let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}";
131
131
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
132
132
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
133
+ const query = (0, smithy_client_1.map)({
134
+ "user": [, input.userId],
135
+ });
133
136
  let body;
134
137
  return new protocol_http_1.HttpRequest({
135
138
  protocol,
@@ -138,6 +141,7 @@ const se_DeleteMessageCommand = async (input, context) => {
138
141
  method: "DELETE",
139
142
  headers,
140
143
  path: resolvedPath,
144
+ query,
141
145
  body,
142
146
  });
143
147
  };
@@ -244,29 +248,6 @@ const se_GetMessageCommand = async (input, context) => {
244
248
  });
245
249
  };
246
250
  exports.se_GetMessageCommand = se_GetMessageCommand;
247
- const se_GetMessageReactionsCommand = async (input, context) => {
248
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
249
- const headers = {};
250
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
251
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
252
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
253
- const query = (0, smithy_client_1.map)({
254
- "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
255
- "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
256
- });
257
- let body;
258
- return new protocol_http_1.HttpRequest({
259
- protocol,
260
- hostname,
261
- port,
262
- method: "GET",
263
- headers,
264
- path: resolvedPath,
265
- query,
266
- body,
267
- });
268
- };
269
- exports.se_GetMessageReactionsCommand = se_GetMessageReactionsCommand;
270
251
  const se_GetOrCreateDirectChannelCommand = async (input, context) => {
271
252
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
272
253
  const headers = {
@@ -410,11 +391,38 @@ const se_ListChannelsCommand = async (input, context) => {
410
391
  });
411
392
  };
412
393
  exports.se_ListChannelsCommand = se_ListChannelsCommand;
394
+ const se_ListMessageReactionsCommand = async (input, context) => {
395
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
396
+ const headers = {};
397
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
398
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
399
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
400
+ const query = (0, smithy_client_1.map)({
401
+ "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
402
+ "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
403
+ });
404
+ let body;
405
+ return new protocol_http_1.HttpRequest({
406
+ protocol,
407
+ hostname,
408
+ port,
409
+ method: "GET",
410
+ headers,
411
+ path: resolvedPath,
412
+ query,
413
+ body,
414
+ });
415
+ };
416
+ exports.se_ListMessageReactionsCommand = se_ListMessageReactionsCommand;
413
417
  const se_ListMessagesCommand = async (input, context) => {
414
418
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
415
419
  const headers = {};
416
420
  let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages";
417
421
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
422
+ const query = (0, smithy_client_1.map)({
423
+ "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
424
+ "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
425
+ });
418
426
  let body;
419
427
  return new protocol_http_1.HttpRequest({
420
428
  protocol,
@@ -423,6 +431,7 @@ const se_ListMessagesCommand = async (input, context) => {
423
431
  method: "GET",
424
432
  headers,
425
433
  path: resolvedPath,
434
+ query,
426
435
  body,
427
436
  });
428
437
  };
@@ -1173,46 +1182,6 @@ const de_GetMessageCommandError = async (output, context) => {
1173
1182
  });
1174
1183
  }
1175
1184
  };
1176
- const de_GetMessageReactionsCommand = async (output, context) => {
1177
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1178
- return de_GetMessageReactionsCommandError(output, context);
1179
- }
1180
- const contents = (0, smithy_client_1.map)({
1181
- $metadata: deserializeMetadata(output),
1182
- });
1183
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
1184
- const doc = (0, smithy_client_1.take)(data, {
1185
- 'reactions': smithy_client_1._json,
1186
- });
1187
- Object.assign(contents, doc);
1188
- return contents;
1189
- };
1190
- exports.de_GetMessageReactionsCommand = de_GetMessageReactionsCommand;
1191
- const de_GetMessageReactionsCommandError = async (output, context) => {
1192
- const parsedOutput = {
1193
- ...output,
1194
- body: await parseErrorBody(output.body, context)
1195
- };
1196
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1197
- switch (errorCode) {
1198
- case "ChannelNotFoundException":
1199
- case "wildix.xbees.conversations#ChannelNotFoundException":
1200
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1201
- case "ForbiddenException":
1202
- case "smithy.framework#ForbiddenException":
1203
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1204
- case "ValidationException":
1205
- case "smithy.framework#ValidationException":
1206
- throw await de_ValidationExceptionRes(parsedOutput, context);
1207
- default:
1208
- const parsedBody = parsedOutput.body;
1209
- return throwDefaultError({
1210
- output,
1211
- parsedBody,
1212
- errorCode
1213
- });
1214
- }
1215
- };
1216
1185
  const de_GetOrCreateDirectChannelCommand = async (output, context) => {
1217
1186
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1218
1187
  return de_GetOrCreateDirectChannelCommandError(output, context);
@@ -1441,6 +1410,46 @@ const de_ListChannelsCommandError = async (output, context) => {
1441
1410
  });
1442
1411
  }
1443
1412
  };
1413
+ const de_ListMessageReactionsCommand = async (output, context) => {
1414
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1415
+ return de_ListMessageReactionsCommandError(output, context);
1416
+ }
1417
+ const contents = (0, smithy_client_1.map)({
1418
+ $metadata: deserializeMetadata(output),
1419
+ });
1420
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
1421
+ const doc = (0, smithy_client_1.take)(data, {
1422
+ 'reactions': smithy_client_1._json,
1423
+ });
1424
+ Object.assign(contents, doc);
1425
+ return contents;
1426
+ };
1427
+ exports.de_ListMessageReactionsCommand = de_ListMessageReactionsCommand;
1428
+ const de_ListMessageReactionsCommandError = async (output, context) => {
1429
+ const parsedOutput = {
1430
+ ...output,
1431
+ body: await parseErrorBody(output.body, context)
1432
+ };
1433
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1434
+ switch (errorCode) {
1435
+ case "ChannelNotFoundException":
1436
+ case "wildix.xbees.conversations#ChannelNotFoundException":
1437
+ throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1438
+ case "ForbiddenException":
1439
+ case "smithy.framework#ForbiddenException":
1440
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
1441
+ case "ValidationException":
1442
+ case "smithy.framework#ValidationException":
1443
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1444
+ default:
1445
+ const parsedBody = parsedOutput.body;
1446
+ return throwDefaultError({
1447
+ output,
1448
+ parsedBody,
1449
+ errorCode
1450
+ });
1451
+ }
1452
+ };
1444
1453
  const de_ListMessagesCommand = async (output, context) => {
1445
1454
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1446
1455
  return de_ListMessagesCommandError(output, context);
@@ -10,13 +10,13 @@ import { GetChannelCommand, } from "./commands/GetChannelCommand";
10
10
  import { GetChannelMemberCommand, } from "./commands/GetChannelMemberCommand";
11
11
  import { GetDirectChannelIdCommand, } from "./commands/GetDirectChannelIdCommand";
12
12
  import { GetMessageCommand, } from "./commands/GetMessageCommand";
13
- import { GetMessageReactionsCommand, } from "./commands/GetMessageReactionsCommand";
14
13
  import { GetOrCreateDirectChannelCommand, } from "./commands/GetOrCreateDirectChannelCommand";
15
14
  import { InviteCommand, } from "./commands/InviteCommand";
16
15
  import { JoinChannelCommand, } from "./commands/JoinChannelCommand";
17
16
  import { LeaveChannelCommand, } from "./commands/LeaveChannelCommand";
18
17
  import { ListChannelMembersCommand, } from "./commands/ListChannelMembersCommand";
19
18
  import { ListChannelsCommand, } from "./commands/ListChannelsCommand";
19
+ import { ListMessageReactionsCommand, } from "./commands/ListMessageReactionsCommand";
20
20
  import { ListMessagesCommand, } from "./commands/ListMessagesCommand";
21
21
  import { MarkReadCommand, } from "./commands/MarkReadCommand";
22
22
  import { PartialUpdateChannelCommand, } from "./commands/PartialUpdateChannelCommand";
@@ -43,13 +43,13 @@ const commands = {
43
43
  GetChannelMemberCommand,
44
44
  GetDirectChannelIdCommand,
45
45
  GetMessageCommand,
46
- GetMessageReactionsCommand,
47
46
  GetOrCreateDirectChannelCommand,
48
47
  InviteCommand,
49
48
  JoinChannelCommand,
50
49
  LeaveChannelCommand,
51
50
  ListChannelMembersCommand,
52
51
  ListChannelsCommand,
52
+ ListMessageReactionsCommand,
53
53
  ListMessagesCommand,
54
54
  MarkReadCommand,
55
55
  PartialUpdateChannelCommand,
@@ -1,9 +1,9 @@
1
- import { de_GetMessageReactionsCommand, se_GetMessageReactionsCommand, } from "../protocols/Aws_restJson1";
1
+ import { de_ListMessageReactionsCommand, se_ListMessageReactionsCommand, } 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 GetMessageReactionsCommand extends $Command {
6
+ export class ListMessageReactionsCommand 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 = "GetMessageReactionsCommand";
16
+ const commandName = "ListMessageReactionsCommand";
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: "GetMessageReactions",
25
+ operation: "ListMessageReactions",
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 se_GetMessageReactionsCommand(input, context);
32
+ return se_ListMessageReactionsCommand(input, context);
33
33
  }
34
34
  deserialize(output, context) {
35
- return de_GetMessageReactionsCommand(output, context);
35
+ return de_ListMessageReactionsCommand(output, context);
36
36
  }
37
37
  }
@@ -9,13 +9,13 @@ 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";
14
13
  export * from "./InviteCommand";
15
14
  export * from "./JoinChannelCommand";
16
15
  export * from "./LeaveChannelCommand";
17
16
  export * from "./ListChannelMembersCommand";
18
17
  export * from "./ListChannelsCommand";
18
+ export * from "./ListMessageReactionsCommand";
19
19
  export * from "./ListMessagesCommand";
20
20
  export * from "./MarkReadCommand";
21
21
  export * from "./PartialUpdateChannelCommand";
@@ -121,6 +121,9 @@ export const se_DeleteMessageCommand = async (input, context) => {
121
121
  let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}";
122
122
  resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
123
123
  resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
124
+ const query = map({
125
+ "user": [, input.userId],
126
+ });
124
127
  let body;
125
128
  return new __HttpRequest({
126
129
  protocol,
@@ -129,6 +132,7 @@ export const se_DeleteMessageCommand = async (input, context) => {
129
132
  method: "DELETE",
130
133
  headers,
131
134
  path: resolvedPath,
135
+ query,
132
136
  body,
133
137
  });
134
138
  };
@@ -229,28 +233,6 @@ export const se_GetMessageCommand = async (input, context) => {
229
233
  body,
230
234
  });
231
235
  };
232
- export const se_GetMessageReactionsCommand = async (input, context) => {
233
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
234
- const headers = {};
235
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
236
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
237
- resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
238
- const query = map({
239
- "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
240
- "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
241
- });
242
- let body;
243
- return new __HttpRequest({
244
- protocol,
245
- hostname,
246
- port,
247
- method: "GET",
248
- headers,
249
- path: resolvedPath,
250
- query,
251
- body,
252
- });
253
- };
254
236
  export const se_GetOrCreateDirectChannelCommand = async (input, context) => {
255
237
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
256
238
  const headers = {
@@ -388,11 +370,37 @@ export const se_ListChannelsCommand = async (input, context) => {
388
370
  body,
389
371
  });
390
372
  };
373
+ export const se_ListMessageReactionsCommand = async (input, context) => {
374
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
375
+ const headers = {};
376
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
377
+ resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
378
+ resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
379
+ const query = map({
380
+ "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
381
+ "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
382
+ });
383
+ let body;
384
+ return new __HttpRequest({
385
+ protocol,
386
+ hostname,
387
+ port,
388
+ method: "GET",
389
+ headers,
390
+ path: resolvedPath,
391
+ query,
392
+ body,
393
+ });
394
+ };
391
395
  export const se_ListMessagesCommand = async (input, context) => {
392
396
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
393
397
  const headers = {};
394
398
  let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages";
395
399
  resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
400
+ const query = map({
401
+ "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
402
+ "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
403
+ });
396
404
  let body;
397
405
  return new __HttpRequest({
398
406
  protocol,
@@ -401,6 +409,7 @@ export const se_ListMessagesCommand = async (input, context) => {
401
409
  method: "GET",
402
410
  headers,
403
411
  path: resolvedPath,
412
+ query,
404
413
  body,
405
414
  });
406
415
  };
@@ -1127,45 +1136,6 @@ const de_GetMessageCommandError = async (output, context) => {
1127
1136
  });
1128
1137
  }
1129
1138
  };
1130
- export const de_GetMessageReactionsCommand = async (output, context) => {
1131
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1132
- return de_GetMessageReactionsCommandError(output, context);
1133
- }
1134
- const contents = map({
1135
- $metadata: deserializeMetadata(output),
1136
- });
1137
- const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
1138
- const doc = take(data, {
1139
- 'reactions': _json,
1140
- });
1141
- Object.assign(contents, doc);
1142
- return contents;
1143
- };
1144
- const de_GetMessageReactionsCommandError = async (output, context) => {
1145
- const parsedOutput = {
1146
- ...output,
1147
- body: await parseErrorBody(output.body, context)
1148
- };
1149
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1150
- switch (errorCode) {
1151
- case "ChannelNotFoundException":
1152
- case "wildix.xbees.conversations#ChannelNotFoundException":
1153
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1154
- case "ForbiddenException":
1155
- case "smithy.framework#ForbiddenException":
1156
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1157
- case "ValidationException":
1158
- case "smithy.framework#ValidationException":
1159
- throw await de_ValidationExceptionRes(parsedOutput, context);
1160
- default:
1161
- const parsedBody = parsedOutput.body;
1162
- return throwDefaultError({
1163
- output,
1164
- parsedBody,
1165
- errorCode
1166
- });
1167
- }
1168
- };
1169
1139
  export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
1170
1140
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1171
1141
  return de_GetOrCreateDirectChannelCommandError(output, context);
@@ -1388,6 +1358,45 @@ const de_ListChannelsCommandError = async (output, context) => {
1388
1358
  });
1389
1359
  }
1390
1360
  };
1361
+ export const de_ListMessageReactionsCommand = async (output, context) => {
1362
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1363
+ return de_ListMessageReactionsCommandError(output, context);
1364
+ }
1365
+ const contents = map({
1366
+ $metadata: deserializeMetadata(output),
1367
+ });
1368
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
1369
+ const doc = take(data, {
1370
+ 'reactions': _json,
1371
+ });
1372
+ Object.assign(contents, doc);
1373
+ return contents;
1374
+ };
1375
+ const de_ListMessageReactionsCommandError = async (output, context) => {
1376
+ const parsedOutput = {
1377
+ ...output,
1378
+ body: await parseErrorBody(output.body, context)
1379
+ };
1380
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1381
+ switch (errorCode) {
1382
+ case "ChannelNotFoundException":
1383
+ case "wildix.xbees.conversations#ChannelNotFoundException":
1384
+ throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1385
+ case "ForbiddenException":
1386
+ case "smithy.framework#ForbiddenException":
1387
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
1388
+ case "ValidationException":
1389
+ case "smithy.framework#ValidationException":
1390
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1391
+ default:
1392
+ const parsedBody = parsedOutput.body;
1393
+ return throwDefaultError({
1394
+ output,
1395
+ parsedBody,
1396
+ errorCode
1397
+ });
1398
+ }
1399
+ };
1391
1400
  export const de_ListMessagesCommand = async (output, context) => {
1392
1401
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1393
1402
  return de_ListMessagesCommandError(output, context);
@@ -10,13 +10,13 @@ import { GetChannelCommandInput, GetChannelCommandOutput } from "./commands/GetC
10
10
  import { GetChannelMemberCommandInput, GetChannelMemberCommandOutput } from "./commands/GetChannelMemberCommand";
11
11
  import { GetDirectChannelIdCommandInput, GetDirectChannelIdCommandOutput } from "./commands/GetDirectChannelIdCommand";
12
12
  import { GetMessageCommandInput, GetMessageCommandOutput } from "./commands/GetMessageCommand";
13
- import { GetMessageReactionsCommandInput, GetMessageReactionsCommandOutput } from "./commands/GetMessageReactionsCommand";
14
13
  import { GetOrCreateDirectChannelCommandInput, GetOrCreateDirectChannelCommandOutput } from "./commands/GetOrCreateDirectChannelCommand";
15
14
  import { InviteCommandInput, InviteCommandOutput } from "./commands/InviteCommand";
16
15
  import { JoinChannelCommandInput, JoinChannelCommandOutput } from "./commands/JoinChannelCommand";
17
16
  import { LeaveChannelCommandInput, LeaveChannelCommandOutput } from "./commands/LeaveChannelCommand";
18
17
  import { ListChannelMembersCommandInput, ListChannelMembersCommandOutput } from "./commands/ListChannelMembersCommand";
19
18
  import { ListChannelsCommandInput, ListChannelsCommandOutput } from "./commands/ListChannelsCommand";
19
+ import { ListMessageReactionsCommandInput, ListMessageReactionsCommandOutput } from "./commands/ListMessageReactionsCommand";
20
20
  import { ListMessagesCommandInput, ListMessagesCommandOutput } from "./commands/ListMessagesCommand";
21
21
  import { MarkReadCommandInput, MarkReadCommandOutput } from "./commands/MarkReadCommand";
22
22
  import { PartialUpdateChannelCommandInput, PartialUpdateChannelCommandOutput } from "./commands/PartialUpdateChannelCommand";
@@ -98,12 +98,6 @@ export interface Conversations {
98
98
  getMessage(args: GetMessageCommandInput, options?: __HttpHandlerOptions): Promise<GetMessageCommandOutput>;
99
99
  getMessage(args: GetMessageCommandInput, cb: (err: any, data?: GetMessageCommandOutput) => void): void;
100
100
  getMessage(args: GetMessageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetMessageCommandOutput) => void): void;
101
- /**
102
- * @see {@link GetMessageReactionsCommand}
103
- */
104
- getMessageReactions(args: GetMessageReactionsCommandInput, options?: __HttpHandlerOptions): Promise<GetMessageReactionsCommandOutput>;
105
- getMessageReactions(args: GetMessageReactionsCommandInput, cb: (err: any, data?: GetMessageReactionsCommandOutput) => void): void;
106
- getMessageReactions(args: GetMessageReactionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetMessageReactionsCommandOutput) => void): void;
107
101
  /**
108
102
  * @see {@link GetOrCreateDirectChannelCommand}
109
103
  */
@@ -140,6 +134,12 @@ export interface Conversations {
140
134
  listChannels(args: ListChannelsCommandInput, options?: __HttpHandlerOptions): Promise<ListChannelsCommandOutput>;
141
135
  listChannels(args: ListChannelsCommandInput, cb: (err: any, data?: ListChannelsCommandOutput) => void): void;
142
136
  listChannels(args: ListChannelsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListChannelsCommandOutput) => void): void;
137
+ /**
138
+ * @see {@link ListMessageReactionsCommand}
139
+ */
140
+ listMessageReactions(args: ListMessageReactionsCommandInput, options?: __HttpHandlerOptions): Promise<ListMessageReactionsCommandOutput>;
141
+ listMessageReactions(args: ListMessageReactionsCommandInput, cb: (err: any, data?: ListMessageReactionsCommandOutput) => void): void;
142
+ listMessageReactions(args: ListMessageReactionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListMessageReactionsCommandOutput) => void): void;
143
143
  /**
144
144
  * @see {@link ListMessagesCommand}
145
145
  */
@@ -9,13 +9,13 @@ import { GetChannelCommandInput, GetChannelCommandOutput } from "./commands/GetC
9
9
  import { GetChannelMemberCommandInput, GetChannelMemberCommandOutput } from "./commands/GetChannelMemberCommand";
10
10
  import { GetDirectChannelIdCommandInput, GetDirectChannelIdCommandOutput } from "./commands/GetDirectChannelIdCommand";
11
11
  import { GetMessageCommandInput, GetMessageCommandOutput } from "./commands/GetMessageCommand";
12
- import { GetMessageReactionsCommandInput, GetMessageReactionsCommandOutput } from "./commands/GetMessageReactionsCommand";
13
12
  import { GetOrCreateDirectChannelCommandInput, GetOrCreateDirectChannelCommandOutput } from "./commands/GetOrCreateDirectChannelCommand";
14
13
  import { InviteCommandInput, InviteCommandOutput } from "./commands/InviteCommand";
15
14
  import { JoinChannelCommandInput, JoinChannelCommandOutput } from "./commands/JoinChannelCommand";
16
15
  import { LeaveChannelCommandInput, LeaveChannelCommandOutput } from "./commands/LeaveChannelCommand";
17
16
  import { ListChannelMembersCommandInput, ListChannelMembersCommandOutput } from "./commands/ListChannelMembersCommand";
18
17
  import { ListChannelsCommandInput, ListChannelsCommandOutput } from "./commands/ListChannelsCommand";
18
+ import { ListMessageReactionsCommandInput, ListMessageReactionsCommandOutput } from "./commands/ListMessageReactionsCommand";
19
19
  import { ListMessagesCommandInput, ListMessagesCommandOutput } from "./commands/ListMessagesCommand";
20
20
  import { MarkReadCommandInput, MarkReadCommandOutput } from "./commands/MarkReadCommand";
21
21
  import { PartialUpdateChannelCommandInput, PartialUpdateChannelCommandOutput } from "./commands/PartialUpdateChannelCommand";
@@ -38,11 +38,11 @@ export { __Client };
38
38
  /**
39
39
  * @public
40
40
  */
41
- export type ServiceInputTypes = AddChannelMemberCommandInput | AddChannelMembersCommandInput | CreateGroupChannelCommandInput | DeleteChannelCommandInput | DeleteChannelMemberCommandInput | DeleteMessageCommandInput | DeleteMessageReactionCommandInput | GetChannelCommandInput | GetChannelMemberCommandInput | GetDirectChannelIdCommandInput | GetMessageCommandInput | GetMessageReactionsCommandInput | GetOrCreateDirectChannelCommandInput | InviteCommandInput | JoinChannelCommandInput | LeaveChannelCommandInput | ListChannelMembersCommandInput | ListChannelsCommandInput | ListMessagesCommandInput | MarkReadCommandInput | PartialUpdateChannelCommandInput | PartialUpdateMessageCommandInput | ScheduleExternalFlagAdjustmentJobCommandInput | SendGiphyCommandInput | SendMessageCommandInput | SendMessageReactionCommandInput | SendSystemMessageCommandInput | SendTypingStartCommandInput | SendTypingStopCommandInput | UpdateChannelCommandInput | UpdateMessageCommandInput;
41
+ export type ServiceInputTypes = AddChannelMemberCommandInput | AddChannelMembersCommandInput | CreateGroupChannelCommandInput | DeleteChannelCommandInput | DeleteChannelMemberCommandInput | DeleteMessageCommandInput | DeleteMessageReactionCommandInput | GetChannelCommandInput | GetChannelMemberCommandInput | GetDirectChannelIdCommandInput | GetMessageCommandInput | GetOrCreateDirectChannelCommandInput | InviteCommandInput | JoinChannelCommandInput | LeaveChannelCommandInput | ListChannelMembersCommandInput | ListChannelsCommandInput | ListMessageReactionsCommandInput | ListMessagesCommandInput | MarkReadCommandInput | PartialUpdateChannelCommandInput | PartialUpdateMessageCommandInput | ScheduleExternalFlagAdjustmentJobCommandInput | SendGiphyCommandInput | SendMessageCommandInput | SendMessageReactionCommandInput | SendSystemMessageCommandInput | SendTypingStartCommandInput | SendTypingStopCommandInput | UpdateChannelCommandInput | UpdateMessageCommandInput;
42
42
  /**
43
43
  * @public
44
44
  */
45
- export type ServiceOutputTypes = AddChannelMemberCommandOutput | AddChannelMembersCommandOutput | CreateGroupChannelCommandOutput | DeleteChannelCommandOutput | DeleteChannelMemberCommandOutput | DeleteMessageCommandOutput | DeleteMessageReactionCommandOutput | GetChannelCommandOutput | GetChannelMemberCommandOutput | GetDirectChannelIdCommandOutput | GetMessageCommandOutput | GetMessageReactionsCommandOutput | GetOrCreateDirectChannelCommandOutput | InviteCommandOutput | JoinChannelCommandOutput | LeaveChannelCommandOutput | ListChannelMembersCommandOutput | ListChannelsCommandOutput | ListMessagesCommandOutput | MarkReadCommandOutput | PartialUpdateChannelCommandOutput | PartialUpdateMessageCommandOutput | ScheduleExternalFlagAdjustmentJobCommandOutput | SendGiphyCommandOutput | SendMessageCommandOutput | SendMessageReactionCommandOutput | SendSystemMessageCommandOutput | SendTypingStartCommandOutput | SendTypingStopCommandOutput | UpdateChannelCommandOutput | UpdateMessageCommandOutput;
45
+ export type ServiceOutputTypes = AddChannelMemberCommandOutput | AddChannelMembersCommandOutput | CreateGroupChannelCommandOutput | DeleteChannelCommandOutput | DeleteChannelMemberCommandOutput | DeleteMessageCommandOutput | DeleteMessageReactionCommandOutput | GetChannelCommandOutput | GetChannelMemberCommandOutput | GetDirectChannelIdCommandOutput | GetMessageCommandOutput | GetOrCreateDirectChannelCommandOutput | InviteCommandOutput | JoinChannelCommandOutput | LeaveChannelCommandOutput | ListChannelMembersCommandOutput | ListChannelsCommandOutput | ListMessageReactionsCommandOutput | ListMessagesCommandOutput | MarkReadCommandOutput | PartialUpdateChannelCommandOutput | PartialUpdateMessageCommandOutput | ScheduleExternalFlagAdjustmentJobCommandOutput | SendGiphyCommandOutput | SendMessageCommandOutput | SendMessageReactionCommandOutput | SendSystemMessageCommandOutput | SendTypingStartCommandOutput | SendTypingStopCommandOutput | UpdateChannelCommandOutput | UpdateMessageCommandOutput;
46
46
  /**
47
47
  * @public
48
48
  */
@@ -32,6 +32,7 @@ export interface DeleteMessageCommandOutput extends DeleteMessageOutput, __Metad
32
32
  * const input = { // DeleteMessageInput
33
33
  * channelId: "STRING_VALUE", // required
34
34
  * messageId: "STRING_VALUE", // required
35
+ * userId: "STRING_VALUE",
35
36
  * };
36
37
  * const command = new DeleteMessageCommand(input);
37
38
  * const response = await client.send(command);
@@ -43,7 +43,7 @@ export interface GetMessageCommandOutput extends GetMessageOutput, __MetadataBea
43
43
  * // id: "STRING_VALUE", // required
44
44
  * // fsId: "STRING_VALUE", // required
45
45
  * // mime: "STRING_VALUE",
46
- * // name: "STRING_VALUE",
46
+ * // name: "STRING_VALUE", // required
47
47
  * // size: Number("int"), // required
48
48
  * // width: Number("int"),
49
49
  * // height: Number("int"),
@@ -57,7 +57,7 @@ export interface GetMessageCommandOutput extends GetMessageOutput, __MetadataBea
57
57
  * // id: "STRING_VALUE", // required
58
58
  * // fsId: "STRING_VALUE", // required
59
59
  * // mime: "STRING_VALUE",
60
- * // name: "STRING_VALUE",
60
+ * // name: "STRING_VALUE", // required
61
61
  * // size: Number("int"), // required
62
62
  * // width: Number("int"),
63
63
  * // height: Number("int"),
@@ -1,5 +1,5 @@
1
1
  import { ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConversationsClient";
2
- import { GetMessageReactionsInput, GetMessageReactionsOutput } from "../models/models_0";
2
+ import { ListMessageReactionsInput, ListMessageReactionsOutput } from "../models/models_0";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
4
  import { Handler, MiddlewareStack, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer } from "@smithy/types";
5
5
  /**
@@ -9,16 +9,16 @@ export { __MetadataBearer, $Command };
9
9
  /**
10
10
  * @public
11
11
  *
12
- * The input for {@link GetMessageReactionsCommand}.
12
+ * The input for {@link ListMessageReactionsCommand}.
13
13
  */
14
- export interface GetMessageReactionsCommandInput extends GetMessageReactionsInput {
14
+ export interface ListMessageReactionsCommandInput extends ListMessageReactionsInput {
15
15
  }
16
16
  /**
17
17
  * @public
18
18
  *
19
- * The output of {@link GetMessageReactionsCommand}.
19
+ * The output of {@link ListMessageReactionsCommand}.
20
20
  */
21
- export interface GetMessageReactionsCommandOutput extends GetMessageReactionsOutput, __MetadataBearer {
21
+ export interface ListMessageReactionsCommandOutput extends ListMessageReactionsOutput, __MetadataBearer {
22
22
  }
23
23
  /**
24
24
  * @public
@@ -26,18 +26,18 @@ export interface GetMessageReactionsCommandOutput extends GetMessageReactionsOut
26
26
  * @example
27
27
  * Use a bare-bones client and the command you need to make an API call.
28
28
  * ```javascript
29
- * import { ConversationsClient, GetMessageReactionsCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
30
- * // const { ConversationsClient, GetMessageReactionsCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
29
+ * import { ConversationsClient, ListMessageReactionsCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
30
+ * // const { ConversationsClient, ListMessageReactionsCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
31
31
  * const client = new ConversationsClient(config);
32
- * const input = { // GetMessageReactionsInput
32
+ * const input = { // ListMessageReactionsInput
33
33
  * channelId: "STRING_VALUE", // required
34
34
  * messageId: "STRING_VALUE", // required
35
35
  * limit: Number("int"),
36
36
  * offset: Number("int"),
37
37
  * };
38
- * const command = new GetMessageReactionsCommand(input);
38
+ * const command = new ListMessageReactionsCommand(input);
39
39
  * const response = await client.send(command);
40
- * // { // GetMessageReactionsOutput
40
+ * // { // ListMessageReactionsOutput
41
41
  * // reactions: [ // ReactionList // required
42
42
  * // { // Reaction
43
43
  * // type: "STRING_VALUE",
@@ -64,10 +64,10 @@ export interface GetMessageReactionsCommandOutput extends GetMessageReactionsOut
64
64
  *
65
65
  * ```
66
66
  *
67
- * @param GetMessageReactionsCommandInput - {@link GetMessageReactionsCommandInput}
68
- * @returns {@link GetMessageReactionsCommandOutput}
69
- * @see {@link GetMessageReactionsCommandInput} for command's `input` shape.
70
- * @see {@link GetMessageReactionsCommandOutput} for command's `response` shape.
67
+ * @param ListMessageReactionsCommandInput - {@link ListMessageReactionsCommandInput}
68
+ * @returns {@link ListMessageReactionsCommandOutput}
69
+ * @see {@link ListMessageReactionsCommandInput} for command's `input` shape.
70
+ * @see {@link ListMessageReactionsCommandOutput} for command's `response` shape.
71
71
  * @see {@link ConversationsClientResolvedConfig | config} for ConversationsClient's `config` shape.
72
72
  *
73
73
  * @throws {@link ChannelNotFoundException} (client fault)
@@ -80,16 +80,16 @@ export interface GetMessageReactionsCommandOutput extends GetMessageReactionsOut
80
80
  * <p>Base exception class for all service exceptions from Conversations service.</p>
81
81
  *
82
82
  */
83
- export declare class GetMessageReactionsCommand extends $Command<GetMessageReactionsCommandInput, GetMessageReactionsCommandOutput, ConversationsClientResolvedConfig> {
84
- readonly input: GetMessageReactionsCommandInput;
83
+ export declare class ListMessageReactionsCommand extends $Command<ListMessageReactionsCommandInput, ListMessageReactionsCommandOutput, ConversationsClientResolvedConfig> {
84
+ readonly input: ListMessageReactionsCommandInput;
85
85
  /**
86
86
  * @public
87
87
  */
88
- constructor(input: GetMessageReactionsCommandInput);
88
+ constructor(input: ListMessageReactionsCommandInput);
89
89
  /**
90
90
  * @internal
91
91
  */
92
- resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ConversationsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetMessageReactionsCommandInput, GetMessageReactionsCommandOutput>;
92
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ConversationsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListMessageReactionsCommandInput, ListMessageReactionsCommandOutput>;
93
93
  /**
94
94
  * @internal
95
95
  */
@@ -31,6 +31,8 @@ export interface ListMessagesCommandOutput extends ListMessagesOutput, __Metadat
31
31
  * const client = new ConversationsClient(config);
32
32
  * const input = { // ListMessagesInput
33
33
  * channelId: "STRING_VALUE", // required
34
+ * limit: Number("int"),
35
+ * offset: Number("int"),
34
36
  * };
35
37
  * const command = new ListMessagesCommand(input);
36
38
  * const response = await client.send(command);
@@ -43,7 +45,7 @@ export interface ListMessagesCommandOutput extends ListMessagesOutput, __Metadat
43
45
  * // id: "STRING_VALUE", // required
44
46
  * // fsId: "STRING_VALUE", // required
45
47
  * // mime: "STRING_VALUE",
46
- * // name: "STRING_VALUE",
48
+ * // name: "STRING_VALUE", // required
47
49
  * // size: Number("int"), // required
48
50
  * // width: Number("int"),
49
51
  * // height: Number("int"),
@@ -57,7 +59,7 @@ export interface ListMessagesCommandOutput extends ListMessagesOutput, __Metadat
57
59
  * // id: "STRING_VALUE", // required
58
60
  * // fsId: "STRING_VALUE", // required
59
61
  * // mime: "STRING_VALUE",
60
- * // name: "STRING_VALUE",
62
+ * // name: "STRING_VALUE", // required
61
63
  * // size: Number("int"), // required
62
64
  * // width: Number("int"),
63
65
  * // height: Number("int"),
@@ -39,7 +39,7 @@ export interface PartialUpdateMessageCommandOutput extends PartialUpdateMessageO
39
39
  * id: "STRING_VALUE", // required
40
40
  * fsId: "STRING_VALUE", // required
41
41
  * mime: "STRING_VALUE",
42
- * name: "STRING_VALUE",
42
+ * name: "STRING_VALUE", // required
43
43
  * size: Number("int"), // required
44
44
  * width: Number("int"),
45
45
  * height: Number("int"),
@@ -53,7 +53,7 @@ export interface PartialUpdateMessageCommandOutput extends PartialUpdateMessageO
53
53
  * id: "STRING_VALUE", // required
54
54
  * fsId: "STRING_VALUE", // required
55
55
  * mime: "STRING_VALUE",
56
- * name: "STRING_VALUE",
56
+ * name: "STRING_VALUE", // required
57
57
  * size: Number("int"), // required
58
58
  * width: Number("int"),
59
59
  * height: Number("int"),
@@ -186,7 +186,7 @@ export interface PartialUpdateMessageCommandOutput extends PartialUpdateMessageO
186
186
  * // id: "STRING_VALUE", // required
187
187
  * // fsId: "STRING_VALUE", // required
188
188
  * // mime: "STRING_VALUE",
189
- * // name: "STRING_VALUE",
189
+ * // name: "STRING_VALUE", // required
190
190
  * // size: Number("int"), // required
191
191
  * // width: Number("int"),
192
192
  * // height: Number("int"),
@@ -200,7 +200,7 @@ export interface PartialUpdateMessageCommandOutput extends PartialUpdateMessageO
200
200
  * // id: "STRING_VALUE", // required
201
201
  * // fsId: "STRING_VALUE", // required
202
202
  * // mime: "STRING_VALUE",
203
- * // name: "STRING_VALUE",
203
+ * // name: "STRING_VALUE", // required
204
204
  * // size: Number("int"), // required
205
205
  * // width: Number("int"),
206
206
  * // height: Number("int"),
@@ -51,7 +51,7 @@ export interface SendGiphyCommandOutput extends SendGiphyOutput, __MetadataBeare
51
51
  * // id: "STRING_VALUE", // required
52
52
  * // fsId: "STRING_VALUE", // required
53
53
  * // mime: "STRING_VALUE",
54
- * // name: "STRING_VALUE",
54
+ * // name: "STRING_VALUE", // required
55
55
  * // size: Number("int"), // required
56
56
  * // width: Number("int"),
57
57
  * // height: Number("int"),
@@ -65,7 +65,7 @@ export interface SendGiphyCommandOutput extends SendGiphyOutput, __MetadataBeare
65
65
  * // id: "STRING_VALUE", // required
66
66
  * // fsId: "STRING_VALUE", // required
67
67
  * // mime: "STRING_VALUE",
68
- * // name: "STRING_VALUE",
68
+ * // name: "STRING_VALUE", // required
69
69
  * // size: Number("int"), // required
70
70
  * // width: Number("int"),
71
71
  * // height: Number("int"),
@@ -36,7 +36,7 @@ export interface SendMessageCommandOutput extends SendMessageOutput, __MetadataB
36
36
  * id: "STRING_VALUE", // required
37
37
  * fsId: "STRING_VALUE", // required
38
38
  * mime: "STRING_VALUE",
39
- * name: "STRING_VALUE",
39
+ * name: "STRING_VALUE", // required
40
40
  * size: Number("int"), // required
41
41
  * width: Number("int"),
42
42
  * height: Number("int"),
@@ -50,7 +50,7 @@ export interface SendMessageCommandOutput extends SendMessageOutput, __MetadataB
50
50
  * id: "STRING_VALUE", // required
51
51
  * fsId: "STRING_VALUE", // required
52
52
  * mime: "STRING_VALUE",
53
- * name: "STRING_VALUE",
53
+ * name: "STRING_VALUE", // required
54
54
  * size: Number("int"), // required
55
55
  * width: Number("int"),
56
56
  * height: Number("int"),
@@ -185,7 +185,7 @@ export interface SendMessageCommandOutput extends SendMessageOutput, __MetadataB
185
185
  * // id: "STRING_VALUE", // required
186
186
  * // fsId: "STRING_VALUE", // required
187
187
  * // mime: "STRING_VALUE",
188
- * // name: "STRING_VALUE",
188
+ * // name: "STRING_VALUE", // required
189
189
  * // size: Number("int"), // required
190
190
  * // width: Number("int"),
191
191
  * // height: Number("int"),
@@ -199,7 +199,7 @@ export interface SendMessageCommandOutput extends SendMessageOutput, __MetadataB
199
199
  * // id: "STRING_VALUE", // required
200
200
  * // fsId: "STRING_VALUE", // required
201
201
  * // mime: "STRING_VALUE",
202
- * // name: "STRING_VALUE",
202
+ * // name: "STRING_VALUE", // required
203
203
  * // size: Number("int"), // required
204
204
  * // width: Number("int"),
205
205
  * // height: Number("int"),
@@ -44,7 +44,7 @@ export interface SendSystemMessageCommandOutput extends SendSystemMessageOutput,
44
44
  * // id: "STRING_VALUE", // required
45
45
  * // fsId: "STRING_VALUE", // required
46
46
  * // mime: "STRING_VALUE",
47
- * // name: "STRING_VALUE",
47
+ * // name: "STRING_VALUE", // required
48
48
  * // size: Number("int"), // required
49
49
  * // width: Number("int"),
50
50
  * // height: Number("int"),
@@ -58,7 +58,7 @@ export interface SendSystemMessageCommandOutput extends SendSystemMessageOutput,
58
58
  * // id: "STRING_VALUE", // required
59
59
  * // fsId: "STRING_VALUE", // required
60
60
  * // mime: "STRING_VALUE",
61
- * // name: "STRING_VALUE",
61
+ * // name: "STRING_VALUE", // required
62
62
  * // size: Number("int"), // required
63
63
  * // width: Number("int"),
64
64
  * // height: Number("int"),
@@ -36,7 +36,7 @@ export interface UpdateMessageCommandOutput extends UpdateMessageOutput, __Metad
36
36
  * id: "STRING_VALUE", // required
37
37
  * fsId: "STRING_VALUE", // required
38
38
  * mime: "STRING_VALUE",
39
- * name: "STRING_VALUE",
39
+ * name: "STRING_VALUE", // required
40
40
  * size: Number("int"), // required
41
41
  * width: Number("int"),
42
42
  * height: Number("int"),
@@ -50,7 +50,7 @@ export interface UpdateMessageCommandOutput extends UpdateMessageOutput, __Metad
50
50
  * id: "STRING_VALUE", // required
51
51
  * fsId: "STRING_VALUE", // required
52
52
  * mime: "STRING_VALUE",
53
- * name: "STRING_VALUE",
53
+ * name: "STRING_VALUE", // required
54
54
  * size: Number("int"), // required
55
55
  * width: Number("int"),
56
56
  * height: Number("int"),
@@ -184,7 +184,7 @@ export interface UpdateMessageCommandOutput extends UpdateMessageOutput, __Metad
184
184
  * // id: "STRING_VALUE", // required
185
185
  * // fsId: "STRING_VALUE", // required
186
186
  * // mime: "STRING_VALUE",
187
- * // name: "STRING_VALUE",
187
+ * // name: "STRING_VALUE", // required
188
188
  * // size: Number("int"), // required
189
189
  * // width: Number("int"),
190
190
  * // height: Number("int"),
@@ -198,7 +198,7 @@ export interface UpdateMessageCommandOutput extends UpdateMessageOutput, __Metad
198
198
  * // id: "STRING_VALUE", // required
199
199
  * // fsId: "STRING_VALUE", // required
200
200
  * // mime: "STRING_VALUE",
201
- * // name: "STRING_VALUE",
201
+ * // name: "STRING_VALUE", // required
202
202
  * // size: Number("int"), // required
203
203
  * // width: Number("int"),
204
204
  * // height: Number("int"),
@@ -9,13 +9,13 @@ 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";
14
13
  export * from "./InviteCommand";
15
14
  export * from "./JoinChannelCommand";
16
15
  export * from "./LeaveChannelCommand";
17
16
  export * from "./ListChannelMembersCommand";
18
17
  export * from "./ListChannelsCommand";
18
+ export * from "./ListMessageReactionsCommand";
19
19
  export * from "./ListMessagesCommand";
20
20
  export * from "./MarkReadCommand";
21
21
  export * from "./PartialUpdateChannelCommand";
@@ -339,6 +339,11 @@ export declare class MemberNotFoundException extends __BaseException {
339
339
  export interface DeleteMessageInput {
340
340
  channelId: string;
341
341
  messageId: string;
342
+ /**
343
+ * @public
344
+ * User ID for server side calls
345
+ */
346
+ userId?: string;
342
347
  }
343
348
  /**
344
349
  * @public
@@ -459,7 +464,7 @@ export interface MessageAttachment {
459
464
  */
460
465
  fsId: string;
461
466
  mime?: string;
462
- name?: string;
467
+ name: string;
463
468
  size: number;
464
469
  width?: number;
465
470
  height?: number;
@@ -518,21 +523,6 @@ export declare const MessageType: {
518
523
  * @public
519
524
  */
520
525
  export type MessageType = typeof MessageType[keyof typeof MessageType];
521
- /**
522
- * @public
523
- */
524
- export interface GetMessageReactionsInput {
525
- channelId: string;
526
- messageId: string;
527
- limit?: number;
528
- offset?: number;
529
- }
530
- /**
531
- * @public
532
- */
533
- export interface GetMessageReactionsOutput {
534
- reactions: (Reaction)[];
535
- }
536
526
  /**
537
527
  * @public
538
528
  */
@@ -623,11 +613,28 @@ export interface ListChannelsInput {
623
613
  export interface ListChannelsOutput {
624
614
  channels: (Channel)[];
625
615
  }
616
+ /**
617
+ * @public
618
+ */
619
+ export interface ListMessageReactionsInput {
620
+ channelId: string;
621
+ messageId: string;
622
+ limit?: number;
623
+ offset?: number;
624
+ }
625
+ /**
626
+ * @public
627
+ */
628
+ export interface ListMessageReactionsOutput {
629
+ reactions: (Reaction)[];
630
+ }
626
631
  /**
627
632
  * @public
628
633
  */
629
634
  export interface ListMessagesInput {
630
635
  channelId: string;
636
+ limit?: number;
637
+ offset?: number;
631
638
  }
632
639
  /**
633
640
  * @public
@@ -9,13 +9,13 @@ import { GetChannelCommandInput, GetChannelCommandOutput } from "../commands/Get
9
9
  import { GetChannelMemberCommandInput, GetChannelMemberCommandOutput } from "../commands/GetChannelMemberCommand";
10
10
  import { GetDirectChannelIdCommandInput, GetDirectChannelIdCommandOutput } from "../commands/GetDirectChannelIdCommand";
11
11
  import { GetMessageCommandInput, GetMessageCommandOutput } from "../commands/GetMessageCommand";
12
- import { GetMessageReactionsCommandInput, GetMessageReactionsCommandOutput } from "../commands/GetMessageReactionsCommand";
13
12
  import { GetOrCreateDirectChannelCommandInput, GetOrCreateDirectChannelCommandOutput } from "../commands/GetOrCreateDirectChannelCommand";
14
13
  import { InviteCommandInput, InviteCommandOutput } from "../commands/InviteCommand";
15
14
  import { JoinChannelCommandInput, JoinChannelCommandOutput } from "../commands/JoinChannelCommand";
16
15
  import { LeaveChannelCommandInput, LeaveChannelCommandOutput } from "../commands/LeaveChannelCommand";
17
16
  import { ListChannelMembersCommandInput, ListChannelMembersCommandOutput } from "../commands/ListChannelMembersCommand";
18
17
  import { ListChannelsCommandInput, ListChannelsCommandOutput } from "../commands/ListChannelsCommand";
18
+ import { ListMessageReactionsCommandInput, ListMessageReactionsCommandOutput } from "../commands/ListMessageReactionsCommand";
19
19
  import { ListMessagesCommandInput, ListMessagesCommandOutput } from "../commands/ListMessagesCommand";
20
20
  import { MarkReadCommandInput, MarkReadCommandOutput } from "../commands/MarkReadCommand";
21
21
  import { PartialUpdateChannelCommandInput, PartialUpdateChannelCommandOutput } from "../commands/PartialUpdateChannelCommand";
@@ -75,10 +75,6 @@ export declare const se_GetDirectChannelIdCommand: (input: GetDirectChannelIdCom
75
75
  * serializeAws_restJson1GetMessageCommand
76
76
  */
77
77
  export declare const se_GetMessageCommand: (input: GetMessageCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
78
- /**
79
- * serializeAws_restJson1GetMessageReactionsCommand
80
- */
81
- export declare const se_GetMessageReactionsCommand: (input: GetMessageReactionsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
82
78
  /**
83
79
  * serializeAws_restJson1GetOrCreateDirectChannelCommand
84
80
  */
@@ -103,6 +99,10 @@ export declare const se_ListChannelMembersCommand: (input: ListChannelMembersCom
103
99
  * serializeAws_restJson1ListChannelsCommand
104
100
  */
105
101
  export declare const se_ListChannelsCommand: (input: ListChannelsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
102
+ /**
103
+ * serializeAws_restJson1ListMessageReactionsCommand
104
+ */
105
+ export declare const se_ListMessageReactionsCommand: (input: ListMessageReactionsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
106
106
  /**
107
107
  * serializeAws_restJson1ListMessagesCommand
108
108
  */
@@ -199,10 +199,6 @@ export declare const de_GetDirectChannelIdCommand: (output: __HttpResponse, cont
199
199
  * deserializeAws_restJson1GetMessageCommand
200
200
  */
201
201
  export declare const de_GetMessageCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetMessageCommandOutput>;
202
- /**
203
- * deserializeAws_restJson1GetMessageReactionsCommand
204
- */
205
- export declare const de_GetMessageReactionsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetMessageReactionsCommandOutput>;
206
202
  /**
207
203
  * deserializeAws_restJson1GetOrCreateDirectChannelCommand
208
204
  */
@@ -227,6 +223,10 @@ export declare const de_ListChannelMembersCommand: (output: __HttpResponse, cont
227
223
  * deserializeAws_restJson1ListChannelsCommand
228
224
  */
229
225
  export declare const de_ListChannelsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListChannelsCommandOutput>;
226
+ /**
227
+ * deserializeAws_restJson1ListMessageReactionsCommand
228
+ */
229
+ export declare const de_ListMessageReactionsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListMessageReactionsCommandOutput>;
230
230
  /**
231
231
  * deserializeAws_restJson1ListMessagesCommand
232
232
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/xbees-conversations-client",
3
3
  "description": "@wildix/xbees-conversations-client client",
4
- "version": "1.0.31",
4
+ "version": "1.0.33",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",