@wildix/stream-client 0.0.1

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.
Files changed (79) hide show
  1. package/dist-cjs/StreamService.js +35 -0
  2. package/dist-cjs/StreamServiceClient.js +42 -0
  3. package/dist-cjs/commands/AddReactionCommand.js +21 -0
  4. package/dist-cjs/commands/DeleteMessageCommand.js +21 -0
  5. package/dist-cjs/commands/EditMessageCommand.js +21 -0
  6. package/dist-cjs/commands/GetInboxCommand.js +21 -0
  7. package/dist-cjs/commands/GetMessageCommand.js +21 -0
  8. package/dist-cjs/commands/ListChannelsCommand.js +21 -0
  9. package/dist-cjs/commands/ListMentionsCommand.js +21 -0
  10. package/dist-cjs/commands/ListMessagesCommand.js +21 -0
  11. package/dist-cjs/commands/PinMessageCommand.js +21 -0
  12. package/dist-cjs/commands/RemoveReactionCommand.js +21 -0
  13. package/dist-cjs/commands/SendMessageCommand.js +21 -0
  14. package/dist-cjs/commands/UnpinMessageCommand.js +21 -0
  15. package/dist-cjs/commands/index.js +15 -0
  16. package/dist-cjs/extensionConfiguration.js +2 -0
  17. package/dist-cjs/index.js +10 -0
  18. package/dist-cjs/models/StreamServiceServiceException.js +12 -0
  19. package/dist-cjs/models/index.js +4 -0
  20. package/dist-cjs/models/models_0.js +123 -0
  21. package/dist-cjs/protocols/Aws_restJson1.js +579 -0
  22. package/dist-cjs/runtimeConfig.browser.js +32 -0
  23. package/dist-cjs/runtimeConfig.js +37 -0
  24. package/dist-cjs/runtimeConfig.native.js +15 -0
  25. package/dist-cjs/runtimeConfig.shared.js +21 -0
  26. package/dist-cjs/runtimeExtensions.js +11 -0
  27. package/dist-es/StreamService.js +31 -0
  28. package/dist-es/StreamServiceClient.js +38 -0
  29. package/dist-es/commands/AddReactionCommand.js +17 -0
  30. package/dist-es/commands/DeleteMessageCommand.js +17 -0
  31. package/dist-es/commands/EditMessageCommand.js +17 -0
  32. package/dist-es/commands/GetInboxCommand.js +17 -0
  33. package/dist-es/commands/GetMessageCommand.js +17 -0
  34. package/dist-es/commands/ListChannelsCommand.js +17 -0
  35. package/dist-es/commands/ListMentionsCommand.js +17 -0
  36. package/dist-es/commands/ListMessagesCommand.js +17 -0
  37. package/dist-es/commands/PinMessageCommand.js +17 -0
  38. package/dist-es/commands/RemoveReactionCommand.js +17 -0
  39. package/dist-es/commands/SendMessageCommand.js +17 -0
  40. package/dist-es/commands/UnpinMessageCommand.js +17 -0
  41. package/dist-es/commands/index.js +12 -0
  42. package/dist-es/extensionConfiguration.js +1 -0
  43. package/dist-es/index.js +5 -0
  44. package/dist-es/models/StreamServiceServiceException.js +8 -0
  45. package/dist-es/models/index.js +1 -0
  46. package/dist-es/models/models_0.js +113 -0
  47. package/dist-es/protocols/Aws_restJson1.js +552 -0
  48. package/dist-es/runtimeConfig.browser.js +27 -0
  49. package/dist-es/runtimeConfig.js +32 -0
  50. package/dist-es/runtimeConfig.native.js +11 -0
  51. package/dist-es/runtimeConfig.shared.js +17 -0
  52. package/dist-es/runtimeExtensions.js +7 -0
  53. package/dist-types/StreamService.d.ts +96 -0
  54. package/dist-types/StreamServiceClient.d.ts +157 -0
  55. package/dist-types/commands/AddReactionCommand.d.ts +137 -0
  56. package/dist-types/commands/DeleteMessageCommand.d.ts +87 -0
  57. package/dist-types/commands/EditMessageCommand.d.ts +151 -0
  58. package/dist-types/commands/GetInboxCommand.d.ts +129 -0
  59. package/dist-types/commands/GetMessageCommand.d.ts +136 -0
  60. package/dist-types/commands/ListChannelsCommand.d.ts +119 -0
  61. package/dist-types/commands/ListMentionsCommand.d.ts +153 -0
  62. package/dist-types/commands/ListMessagesCommand.d.ts +137 -0
  63. package/dist-types/commands/PinMessageCommand.d.ts +136 -0
  64. package/dist-types/commands/RemoveReactionCommand.d.ts +137 -0
  65. package/dist-types/commands/SendMessageCommand.d.ts +160 -0
  66. package/dist-types/commands/UnpinMessageCommand.d.ts +136 -0
  67. package/dist-types/commands/index.d.ts +12 -0
  68. package/dist-types/extensionConfiguration.d.ts +7 -0
  69. package/dist-types/index.d.ts +7 -0
  70. package/dist-types/models/StreamServiceServiceException.d.ts +14 -0
  71. package/dist-types/models/index.d.ts +1 -0
  72. package/dist-types/models/models_0.d.ts +1113 -0
  73. package/dist-types/protocols/Aws_restJson1.d.ts +110 -0
  74. package/dist-types/runtimeConfig.browser.d.ts +38 -0
  75. package/dist-types/runtimeConfig.d.ts +38 -0
  76. package/dist-types/runtimeConfig.native.d.ts +37 -0
  77. package/dist-types/runtimeConfig.shared.d.ts +15 -0
  78. package/dist-types/runtimeExtensions.d.ts +17 -0
  79. package/package.json +83 -0
@@ -0,0 +1,129 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, StreamServiceClientResolvedConfig } from "../StreamServiceClient";
2
+ import { GetInboxInput, GetInboxOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetInboxCommand}.
14
+ */
15
+ export interface GetInboxCommandInput extends GetInboxInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetInboxCommand}.
21
+ */
22
+ export interface GetInboxCommandOutput extends GetInboxOutput, __MetadataBearer {
23
+ }
24
+ declare const GetInboxCommand_base: {
25
+ new (input: GetInboxCommandInput): import("@smithy/smithy-client").CommandImpl<GetInboxCommandInput, GetInboxCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [GetInboxCommandInput]): import("@smithy/smithy-client").CommandImpl<GetInboxCommandInput, GetInboxCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Returns the user's main-page inbox: recent channels with per-user state and last-message preview, plus per-section channel and unread counters. Not paginated; use `ListChannels` to page further.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { StreamServiceClient, GetInboxCommand } from "@wildix/stream-client"; // ES Modules import
35
+ * // const { StreamServiceClient, GetInboxCommand } = require("@wildix/stream-client"); // CommonJS import
36
+ * const client = new StreamServiceClient(config);
37
+ * const input = { // GetInboxInput
38
+ * companyId: "STRING_VALUE",
39
+ * userId: "STRING_VALUE",
40
+ * };
41
+ * const command = new GetInboxCommand(input);
42
+ * const response = await client.send(command);
43
+ * // { // GetInboxOutput
44
+ * // channels: [ // InboxChannelList // required
45
+ * // { // InboxChannel
46
+ * // channelId: "STRING_VALUE", // required
47
+ * // channelType: "direct" || "group" || "external", // required
48
+ * // subject: "STRING_VALUE",
49
+ * // picture: "STRING_VALUE",
50
+ * // memberCount: Number("int"), // required
51
+ * // createdAt: "STRING_VALUE", // required
52
+ * // createdBy: "STRING_VALUE", // required
53
+ * // updatedAt: "STRING_VALUE", // required
54
+ * // channelVersion: Number("long"), // required
55
+ * // lastActivityAt: "STRING_VALUE", // required
56
+ * // lastMessage: { // LastMessagePreview
57
+ * // messageId: "STRING_VALUE", // required
58
+ * // userId: "STRING_VALUE", // required
59
+ * // text: "STRING_VALUE",
60
+ * // createdAt: "STRING_VALUE", // required
61
+ * // },
62
+ * // inbox: { // InboxState
63
+ * // sectionIds: [ // SectionIdList // required
64
+ * // "STRING_VALUE",
65
+ * // ],
66
+ * // unreadCount: Number("int"), // required
67
+ * // mentionUnreadCount: Number("int"), // required
68
+ * // lastReadVisibleSeq: Number("long"),
69
+ * // lastReadAt: "STRING_VALUE",
70
+ * // hidden: true || false, // required
71
+ * // muted: true || false, // required
72
+ * // mutedUntil: "STRING_VALUE",
73
+ * // unreadMarkAt: Number("long"),
74
+ * // },
75
+ * // },
76
+ * // ],
77
+ * // sections: [ // SectionList // required
78
+ * // { // Section
79
+ * // sectionId: "STRING_VALUE", // required
80
+ * // name: "STRING_VALUE", // required
81
+ * // type: "system" || "custom", // required
82
+ * // channelCount: Number("int"), // required
83
+ * // unread: { // SectionUnreadCounters
84
+ * // unmutedUnreadChannelCount: Number("int"), // required
85
+ * // unmutedUnreadMessageCount: Number("int"), // required
86
+ * // mutedUnreadMessageCount: Number("int"), // required
87
+ * // unreadMentionCount: Number("int"), // required
88
+ * // },
89
+ * // },
90
+ * // ],
91
+ * // };
92
+ *
93
+ * ```
94
+ *
95
+ * @param GetInboxCommandInput - {@link GetInboxCommandInput}
96
+ * @returns {@link GetInboxCommandOutput}
97
+ * @see {@link GetInboxCommandInput} for command's `input` shape.
98
+ * @see {@link GetInboxCommandOutput} for command's `response` shape.
99
+ * @see {@link StreamServiceClientResolvedConfig | config} for StreamServiceClient's `config` shape.
100
+ *
101
+ * @throws {@link InternalServerError} (server fault)
102
+ *
103
+ * @throws {@link UnauthorizedException} (client fault)
104
+ *
105
+ * @throws {@link ForbiddenException} (client fault)
106
+ *
107
+ * @throws {@link ValidationException} (client fault)
108
+ *
109
+ * @throws {@link RateLimitExceededException} (client fault)
110
+ *
111
+ * @throws {@link StreamServiceServiceException}
112
+ * <p>Base exception class for all service exceptions from StreamService service.</p>
113
+ *
114
+ *
115
+ * @public
116
+ */
117
+ export declare class GetInboxCommand extends GetInboxCommand_base {
118
+ /** @internal type navigation helper, not in runtime. */
119
+ protected static __types: {
120
+ api: {
121
+ input: GetInboxInput;
122
+ output: GetInboxOutput;
123
+ };
124
+ sdk: {
125
+ input: GetInboxCommandInput;
126
+ output: GetInboxCommandOutput;
127
+ };
128
+ };
129
+ }
@@ -0,0 +1,136 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, StreamServiceClientResolvedConfig } from "../StreamServiceClient";
2
+ import { GetMessageInput, GetMessageOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetMessageCommand}.
14
+ */
15
+ export interface GetMessageCommandInput extends GetMessageInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetMessageCommand}.
21
+ */
22
+ export interface GetMessageCommandOutput extends GetMessageOutput, __MetadataBearer {
23
+ }
24
+ declare const GetMessageCommand_base: {
25
+ new (input: GetMessageCommandInput): import("@smithy/smithy-client").CommandImpl<GetMessageCommandInput, GetMessageCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: GetMessageCommandInput): import("@smithy/smithy-client").CommandImpl<GetMessageCommandInput, GetMessageCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Returns a single message by id. Used by goto-message to resolve a `messageId` to its `timelineSeq` before loading a window with `ListMessages`.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { StreamServiceClient, GetMessageCommand } from "@wildix/stream-client"; // ES Modules import
35
+ * // const { StreamServiceClient, GetMessageCommand } = require("@wildix/stream-client"); // CommonJS import
36
+ * const client = new StreamServiceClient(config);
37
+ * const input = { // GetMessageInput
38
+ * companyId: "STRING_VALUE",
39
+ * userId: "STRING_VALUE",
40
+ * channelId: "STRING_VALUE", // required
41
+ * messageId: "STRING_VALUE", // required
42
+ * };
43
+ * const command = new GetMessageCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // GetMessageOutput
46
+ * // message: { // Message
47
+ * // messageId: "STRING_VALUE", // required
48
+ * // userId: "STRING_VALUE", // required
49
+ * // messageType: "regular" || "system", // required
50
+ * // text: "STRING_VALUE",
51
+ * // attachments: [ // MessageAttachmentList // required
52
+ * // { // MessageAttachment
53
+ * // fsId: "STRING_VALUE", // required
54
+ * // mime: "STRING_VALUE",
55
+ * // name: "STRING_VALUE", // required
56
+ * // size: Number("long"), // required
57
+ * // width: Number("int"),
58
+ * // height: Number("int"),
59
+ * // thumbnail: "STRING_VALUE",
60
+ * // id: "STRING_VALUE", // required
61
+ * // },
62
+ * // ],
63
+ * // mentions: [ // UserIdList // required
64
+ * // "STRING_VALUE",
65
+ * // ],
66
+ * // quote: { // MessageQuote
67
+ * // channelId: "STRING_VALUE", // required
68
+ * // messageId: "STRING_VALUE", // required
69
+ * // userId: "STRING_VALUE", // required
70
+ * // text: "STRING_VALUE",
71
+ * // createdAt: "STRING_VALUE", // required
72
+ * // },
73
+ * // forward: { // MessageForward
74
+ * // channelId: "STRING_VALUE", // required
75
+ * // messageId: "STRING_VALUE", // required
76
+ * // userId: "STRING_VALUE", // required
77
+ * // forwardedAt: "STRING_VALUE", // required
78
+ * // },
79
+ * // reactionCounts: { // ReactionCounts // required
80
+ * // "<keys>": Number("int"),
81
+ * // },
82
+ * // pinned: true || false, // required
83
+ * // pinnedAt: "STRING_VALUE",
84
+ * // pinnedBy: "STRING_VALUE",
85
+ * // system: true || false, // required
86
+ * // timelineSeq: Number("long"), // required
87
+ * // visibleSeq: Number("long"), // required
88
+ * // channelVersion: Number("long"), // required
89
+ * // messageVersion: Number("long"), // required
90
+ * // createdAt: "STRING_VALUE", // required
91
+ * // editedAt: "STRING_VALUE",
92
+ * // deletedAt: "STRING_VALUE",
93
+ * // },
94
+ * // };
95
+ *
96
+ * ```
97
+ *
98
+ * @param GetMessageCommandInput - {@link GetMessageCommandInput}
99
+ * @returns {@link GetMessageCommandOutput}
100
+ * @see {@link GetMessageCommandInput} for command's `input` shape.
101
+ * @see {@link GetMessageCommandOutput} for command's `response` shape.
102
+ * @see {@link StreamServiceClientResolvedConfig | config} for StreamServiceClient's `config` shape.
103
+ *
104
+ * @throws {@link ChannelNotFoundException} (client fault)
105
+ *
106
+ * @throws {@link MessageNotFoundException} (client fault)
107
+ *
108
+ * @throws {@link InternalServerError} (server fault)
109
+ *
110
+ * @throws {@link UnauthorizedException} (client fault)
111
+ *
112
+ * @throws {@link ForbiddenException} (client fault)
113
+ *
114
+ * @throws {@link ValidationException} (client fault)
115
+ *
116
+ * @throws {@link RateLimitExceededException} (client fault)
117
+ *
118
+ * @throws {@link StreamServiceServiceException}
119
+ * <p>Base exception class for all service exceptions from StreamService service.</p>
120
+ *
121
+ *
122
+ * @public
123
+ */
124
+ export declare class GetMessageCommand extends GetMessageCommand_base {
125
+ /** @internal type navigation helper, not in runtime. */
126
+ protected static __types: {
127
+ api: {
128
+ input: GetMessageInput;
129
+ output: GetMessageOutput;
130
+ };
131
+ sdk: {
132
+ input: GetMessageCommandInput;
133
+ output: GetMessageCommandOutput;
134
+ };
135
+ };
136
+ }
@@ -0,0 +1,119 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, StreamServiceClientResolvedConfig } from "../StreamServiceClient";
2
+ import { ListChannelsInput, ListChannelsOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ListChannelsCommand}.
14
+ */
15
+ export interface ListChannelsCommandInput extends ListChannelsInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListChannelsCommand}.
21
+ */
22
+ export interface ListChannelsCommandOutput extends ListChannelsOutput, __MetadataBearer {
23
+ }
24
+ declare const ListChannelsCommand_base: {
25
+ new (input: ListChannelsCommandInput): import("@smithy/smithy-client").CommandImpl<ListChannelsCommandInput, ListChannelsCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [ListChannelsCommandInput]): import("@smithy/smithy-client").CommandImpl<ListChannelsCommandInput, ListChannelsCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Returns one ordered page of channels for the requested section, with per-channel inbox state and last-message preview. Default page size is 30 channels, but a page may return more when the scanned window contains extra rows after filtering. Use `nextCursor` to keep paging; section counters live on `GetInbox`.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { StreamServiceClient, ListChannelsCommand } from "@wildix/stream-client"; // ES Modules import
35
+ * // const { StreamServiceClient, ListChannelsCommand } = require("@wildix/stream-client"); // CommonJS import
36
+ * const client = new StreamServiceClient(config);
37
+ * const input = { // ListChannelsInput
38
+ * companyId: "STRING_VALUE",
39
+ * userId: "STRING_VALUE",
40
+ * section: "STRING_VALUE",
41
+ * filter: "unread" || "archived",
42
+ * cursor: "STRING_VALUE",
43
+ * };
44
+ * const command = new ListChannelsCommand(input);
45
+ * const response = await client.send(command);
46
+ * // { // ListChannelsOutput
47
+ * // channels: [ // InboxChannelList // required
48
+ * // { // InboxChannel
49
+ * // channelId: "STRING_VALUE", // required
50
+ * // channelType: "direct" || "group" || "external", // required
51
+ * // subject: "STRING_VALUE",
52
+ * // picture: "STRING_VALUE",
53
+ * // memberCount: Number("int"), // required
54
+ * // createdAt: "STRING_VALUE", // required
55
+ * // createdBy: "STRING_VALUE", // required
56
+ * // updatedAt: "STRING_VALUE", // required
57
+ * // channelVersion: Number("long"), // required
58
+ * // lastActivityAt: "STRING_VALUE", // required
59
+ * // lastMessage: { // LastMessagePreview
60
+ * // messageId: "STRING_VALUE", // required
61
+ * // userId: "STRING_VALUE", // required
62
+ * // text: "STRING_VALUE",
63
+ * // createdAt: "STRING_VALUE", // required
64
+ * // },
65
+ * // inbox: { // InboxState
66
+ * // sectionIds: [ // SectionIdList // required
67
+ * // "STRING_VALUE",
68
+ * // ],
69
+ * // unreadCount: Number("int"), // required
70
+ * // mentionUnreadCount: Number("int"), // required
71
+ * // lastReadVisibleSeq: Number("long"),
72
+ * // lastReadAt: "STRING_VALUE",
73
+ * // hidden: true || false, // required
74
+ * // muted: true || false, // required
75
+ * // mutedUntil: "STRING_VALUE",
76
+ * // unreadMarkAt: Number("long"),
77
+ * // },
78
+ * // },
79
+ * // ],
80
+ * // nextCursor: "STRING_VALUE",
81
+ * // };
82
+ *
83
+ * ```
84
+ *
85
+ * @param ListChannelsCommandInput - {@link ListChannelsCommandInput}
86
+ * @returns {@link ListChannelsCommandOutput}
87
+ * @see {@link ListChannelsCommandInput} for command's `input` shape.
88
+ * @see {@link ListChannelsCommandOutput} for command's `response` shape.
89
+ * @see {@link StreamServiceClientResolvedConfig | config} for StreamServiceClient's `config` shape.
90
+ *
91
+ * @throws {@link InternalServerError} (server fault)
92
+ *
93
+ * @throws {@link UnauthorizedException} (client fault)
94
+ *
95
+ * @throws {@link ForbiddenException} (client fault)
96
+ *
97
+ * @throws {@link ValidationException} (client fault)
98
+ *
99
+ * @throws {@link RateLimitExceededException} (client fault)
100
+ *
101
+ * @throws {@link StreamServiceServiceException}
102
+ * <p>Base exception class for all service exceptions from StreamService service.</p>
103
+ *
104
+ *
105
+ * @public
106
+ */
107
+ export declare class ListChannelsCommand extends ListChannelsCommand_base {
108
+ /** @internal type navigation helper, not in runtime. */
109
+ protected static __types: {
110
+ api: {
111
+ input: ListChannelsInput;
112
+ output: ListChannelsOutput;
113
+ };
114
+ sdk: {
115
+ input: ListChannelsCommandInput;
116
+ output: ListChannelsCommandOutput;
117
+ };
118
+ };
119
+ }
@@ -0,0 +1,153 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, StreamServiceClientResolvedConfig } from "../StreamServiceClient";
2
+ import { ListMentionsInput, ListMentionsOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ListMentionsCommand}.
14
+ */
15
+ export interface ListMentionsCommandInput extends ListMentionsInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListMentionsCommand}.
21
+ */
22
+ export interface ListMentionsCommandOutput extends ListMentionsOutput, __MetadataBearer {
23
+ }
24
+ declare const ListMentionsCommand_base: {
25
+ new (input: ListMentionsCommandInput): import("@smithy/smithy-client").CommandImpl<ListMentionsCommandInput, ListMentionsCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [ListMentionsCommandInput]): import("@smithy/smithy-client").CommandImpl<ListMentionsCommandInput, ListMentionsCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Returns messages where the current user was directly mentioned, ordered by most recent mention. Default page size is 30 mentions, but a page may return more when the scanned window contains extra rows after filtering. Use `filter=unread` for unread-only.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { StreamServiceClient, ListMentionsCommand } from "@wildix/stream-client"; // ES Modules import
35
+ * // const { StreamServiceClient, ListMentionsCommand } = require("@wildix/stream-client"); // CommonJS import
36
+ * const client = new StreamServiceClient(config);
37
+ * const input = { // ListMentionsInput
38
+ * companyId: "STRING_VALUE",
39
+ * userId: "STRING_VALUE",
40
+ * filter: "unread",
41
+ * cursor: "STRING_VALUE",
42
+ * };
43
+ * const command = new ListMentionsCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // ListMentionsOutput
46
+ * // mentions: [ // MentionEntryList // required
47
+ * // { // MentionEntry
48
+ * // channelId: "STRING_VALUE", // required
49
+ * // messageId: "STRING_VALUE", // required
50
+ * // timelineSeq: Number("long"), // required
51
+ * // visibleSeq: Number("long"),
52
+ * // mentionAddedAt: "STRING_VALUE", // required
53
+ * // read: true || false, // required
54
+ * // readAt: "STRING_VALUE",
55
+ * // message: { // Message
56
+ * // messageId: "STRING_VALUE", // required
57
+ * // userId: "STRING_VALUE", // required
58
+ * // messageType: "regular" || "system", // required
59
+ * // text: "STRING_VALUE",
60
+ * // attachments: [ // MessageAttachmentList // required
61
+ * // { // MessageAttachment
62
+ * // fsId: "STRING_VALUE", // required
63
+ * // mime: "STRING_VALUE",
64
+ * // name: "STRING_VALUE", // required
65
+ * // size: Number("long"), // required
66
+ * // width: Number("int"),
67
+ * // height: Number("int"),
68
+ * // thumbnail: "STRING_VALUE",
69
+ * // id: "STRING_VALUE", // required
70
+ * // },
71
+ * // ],
72
+ * // mentions: [ // UserIdList // required
73
+ * // "STRING_VALUE",
74
+ * // ],
75
+ * // quote: { // MessageQuote
76
+ * // channelId: "STRING_VALUE", // required
77
+ * // messageId: "STRING_VALUE", // required
78
+ * // userId: "STRING_VALUE", // required
79
+ * // text: "STRING_VALUE",
80
+ * // createdAt: "STRING_VALUE", // required
81
+ * // },
82
+ * // forward: { // MessageForward
83
+ * // channelId: "STRING_VALUE", // required
84
+ * // messageId: "STRING_VALUE", // required
85
+ * // userId: "STRING_VALUE", // required
86
+ * // forwardedAt: "STRING_VALUE", // required
87
+ * // },
88
+ * // reactionCounts: { // ReactionCounts // required
89
+ * // "<keys>": Number("int"),
90
+ * // },
91
+ * // pinned: true || false, // required
92
+ * // pinnedAt: "STRING_VALUE",
93
+ * // pinnedBy: "STRING_VALUE",
94
+ * // system: true || false, // required
95
+ * // timelineSeq: Number("long"), // required
96
+ * // visibleSeq: Number("long"), // required
97
+ * // channelVersion: Number("long"), // required
98
+ * // messageVersion: Number("long"), // required
99
+ * // createdAt: "STRING_VALUE", // required
100
+ * // editedAt: "STRING_VALUE",
101
+ * // deletedAt: "STRING_VALUE",
102
+ * // },
103
+ * // channel: { // MentionChannelPreview
104
+ * // channelId: "STRING_VALUE", // required
105
+ * // channelType: "direct" || "group" || "external", // required
106
+ * // subject: "STRING_VALUE",
107
+ * // picture: "STRING_VALUE",
108
+ * // memberCount: Number("int"), // required
109
+ * // channelVersion: Number("long"), // required
110
+ * // lastActivityAt: "STRING_VALUE", // required
111
+ * // },
112
+ * // },
113
+ * // ],
114
+ * // nextCursor: "STRING_VALUE",
115
+ * // };
116
+ *
117
+ * ```
118
+ *
119
+ * @param ListMentionsCommandInput - {@link ListMentionsCommandInput}
120
+ * @returns {@link ListMentionsCommandOutput}
121
+ * @see {@link ListMentionsCommandInput} for command's `input` shape.
122
+ * @see {@link ListMentionsCommandOutput} for command's `response` shape.
123
+ * @see {@link StreamServiceClientResolvedConfig | config} for StreamServiceClient's `config` shape.
124
+ *
125
+ * @throws {@link InternalServerError} (server fault)
126
+ *
127
+ * @throws {@link UnauthorizedException} (client fault)
128
+ *
129
+ * @throws {@link ForbiddenException} (client fault)
130
+ *
131
+ * @throws {@link ValidationException} (client fault)
132
+ *
133
+ * @throws {@link RateLimitExceededException} (client fault)
134
+ *
135
+ * @throws {@link StreamServiceServiceException}
136
+ * <p>Base exception class for all service exceptions from StreamService service.</p>
137
+ *
138
+ *
139
+ * @public
140
+ */
141
+ export declare class ListMentionsCommand extends ListMentionsCommand_base {
142
+ /** @internal type navigation helper, not in runtime. */
143
+ protected static __types: {
144
+ api: {
145
+ input: ListMentionsInput;
146
+ output: ListMentionsOutput;
147
+ };
148
+ sdk: {
149
+ input: ListMentionsCommandInput;
150
+ output: ListMentionsCommandOutput;
151
+ };
152
+ };
153
+ }
@@ -0,0 +1,137 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, StreamServiceClientResolvedConfig } from "../StreamServiceClient";
2
+ import { ListMessagesInput, ListMessagesOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ListMessagesCommand}.
14
+ */
15
+ export interface ListMessagesCommandInput extends ListMessagesInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListMessagesCommand}.
21
+ */
22
+ export interface ListMessagesCommandOutput extends ListMessagesOutput, __MetadataBearer {
23
+ }
24
+ declare const ListMessagesCommand_base: {
25
+ new (input: ListMessagesCommandInput): import("@smithy/smithy-client").CommandImpl<ListMessagesCommandInput, ListMessagesCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: ListMessagesCommandInput): import("@smithy/smithy-client").CommandImpl<ListMessagesCommandInput, ListMessagesCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Returns one page of messages, newest-first by `timelineSeq`. `from` and `to` are optional bounds and can be set independently; when both are omitted, returns the most recent page. Maximum page size is 30 messages.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { StreamServiceClient, ListMessagesCommand } from "@wildix/stream-client"; // ES Modules import
35
+ * // const { StreamServiceClient, ListMessagesCommand } = require("@wildix/stream-client"); // CommonJS import
36
+ * const client = new StreamServiceClient(config);
37
+ * const input = { // ListMessagesInput
38
+ * companyId: "STRING_VALUE",
39
+ * userId: "STRING_VALUE",
40
+ * channelId: "STRING_VALUE", // required
41
+ * from: Number("long"),
42
+ * to: Number("long"),
43
+ * };
44
+ * const command = new ListMessagesCommand(input);
45
+ * const response = await client.send(command);
46
+ * // { // ListMessagesOutput
47
+ * // messages: [ // MessageList // required
48
+ * // { // Message
49
+ * // messageId: "STRING_VALUE", // required
50
+ * // userId: "STRING_VALUE", // required
51
+ * // messageType: "regular" || "system", // required
52
+ * // text: "STRING_VALUE",
53
+ * // attachments: [ // MessageAttachmentList // required
54
+ * // { // MessageAttachment
55
+ * // fsId: "STRING_VALUE", // required
56
+ * // mime: "STRING_VALUE",
57
+ * // name: "STRING_VALUE", // required
58
+ * // size: Number("long"), // required
59
+ * // width: Number("int"),
60
+ * // height: Number("int"),
61
+ * // thumbnail: "STRING_VALUE",
62
+ * // id: "STRING_VALUE", // required
63
+ * // },
64
+ * // ],
65
+ * // mentions: [ // UserIdList // required
66
+ * // "STRING_VALUE",
67
+ * // ],
68
+ * // quote: { // MessageQuote
69
+ * // channelId: "STRING_VALUE", // required
70
+ * // messageId: "STRING_VALUE", // required
71
+ * // userId: "STRING_VALUE", // required
72
+ * // text: "STRING_VALUE",
73
+ * // createdAt: "STRING_VALUE", // required
74
+ * // },
75
+ * // forward: { // MessageForward
76
+ * // channelId: "STRING_VALUE", // required
77
+ * // messageId: "STRING_VALUE", // required
78
+ * // userId: "STRING_VALUE", // required
79
+ * // forwardedAt: "STRING_VALUE", // required
80
+ * // },
81
+ * // reactionCounts: { // ReactionCounts // required
82
+ * // "<keys>": Number("int"),
83
+ * // },
84
+ * // pinned: true || false, // required
85
+ * // pinnedAt: "STRING_VALUE",
86
+ * // pinnedBy: "STRING_VALUE",
87
+ * // system: true || false, // required
88
+ * // timelineSeq: Number("long"), // required
89
+ * // visibleSeq: Number("long"), // required
90
+ * // channelVersion: Number("long"), // required
91
+ * // messageVersion: Number("long"), // required
92
+ * // createdAt: "STRING_VALUE", // required
93
+ * // editedAt: "STRING_VALUE",
94
+ * // deletedAt: "STRING_VALUE",
95
+ * // },
96
+ * // ],
97
+ * // };
98
+ *
99
+ * ```
100
+ *
101
+ * @param ListMessagesCommandInput - {@link ListMessagesCommandInput}
102
+ * @returns {@link ListMessagesCommandOutput}
103
+ * @see {@link ListMessagesCommandInput} for command's `input` shape.
104
+ * @see {@link ListMessagesCommandOutput} for command's `response` shape.
105
+ * @see {@link StreamServiceClientResolvedConfig | config} for StreamServiceClient's `config` shape.
106
+ *
107
+ * @throws {@link ChannelNotFoundException} (client fault)
108
+ *
109
+ * @throws {@link InternalServerError} (server fault)
110
+ *
111
+ * @throws {@link UnauthorizedException} (client fault)
112
+ *
113
+ * @throws {@link ForbiddenException} (client fault)
114
+ *
115
+ * @throws {@link ValidationException} (client fault)
116
+ *
117
+ * @throws {@link RateLimitExceededException} (client fault)
118
+ *
119
+ * @throws {@link StreamServiceServiceException}
120
+ * <p>Base exception class for all service exceptions from StreamService service.</p>
121
+ *
122
+ *
123
+ * @public
124
+ */
125
+ export declare class ListMessagesCommand extends ListMessagesCommand_base {
126
+ /** @internal type navigation helper, not in runtime. */
127
+ protected static __types: {
128
+ api: {
129
+ input: ListMessagesInput;
130
+ output: ListMessagesOutput;
131
+ };
132
+ sdk: {
133
+ input: ListMessagesCommandInput;
134
+ output: ListMessagesCommandOutput;
135
+ };
136
+ };
137
+ }