@wildix/stream-client 0.0.12 → 0.0.14

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 (81) hide show
  1. package/dist-cjs/StreamService.js +4 -0
  2. package/dist-cjs/commands/SearchChannelsCommand.js +21 -0
  3. package/dist-cjs/commands/SearchMessagesCommand.js +21 -0
  4. package/dist-cjs/commands/index.js +2 -0
  5. package/dist-cjs/models/models_0.js +6 -1
  6. package/dist-cjs/protocols/Aws_restJson1.js +80 -3
  7. package/dist-es/StreamService.js +4 -0
  8. package/dist-es/commands/SearchChannelsCommand.js +17 -0
  9. package/dist-es/commands/SearchMessagesCommand.js +17 -0
  10. package/dist-es/commands/index.js +2 -0
  11. package/dist-es/models/models_0.js +5 -0
  12. package/dist-es/protocols/Aws_restJson1.js +74 -1
  13. package/dist-types/StreamService.d.ts +14 -0
  14. package/dist-types/StreamServiceClient.d.ts +4 -2
  15. package/dist-types/commands/AddChannelMemberCommand.d.ts +1 -3
  16. package/dist-types/commands/AddChannelMembersCommand.d.ts +1 -3
  17. package/dist-types/commands/AssignChannelCommand.d.ts +1 -3
  18. package/dist-types/commands/CreateGroupChannelCommand.d.ts +1 -3
  19. package/dist-types/commands/CreateKiteChannelCommand.d.ts +1 -3
  20. package/dist-types/commands/CreateSectionCommand.d.ts +1 -3
  21. package/dist-types/commands/DeleteChannelCommand.d.ts +1 -3
  22. package/dist-types/commands/DeleteChannelMemberCommand.d.ts +1 -3
  23. package/dist-types/commands/DeleteMessageCommand.d.ts +1 -3
  24. package/dist-types/commands/DeleteMessageReactionCommand.d.ts +1 -3
  25. package/dist-types/commands/DeleteSectionCommand.d.ts +1 -3
  26. package/dist-types/commands/GetChannelCommand.d.ts +1 -3
  27. package/dist-types/commands/GetChannelMemberCommand.d.ts +1 -3
  28. package/dist-types/commands/GetDirectChannelIdCommand.d.ts +1 -3
  29. package/dist-types/commands/GetFilePresignedDownloadUrlCommand.d.ts +1 -3
  30. package/dist-types/commands/GetInboxCommand.d.ts +1 -3
  31. package/dist-types/commands/GetMessageCommand.d.ts +1 -3
  32. package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +1 -3
  33. package/dist-types/commands/GetOrCreateSmsChannelCommand.d.ts +1 -3
  34. package/dist-types/commands/GetOrCreateTelephonyChannelCommand.d.ts +1 -3
  35. package/dist-types/commands/GetOrCreateWhatsAppChannelCommand.d.ts +1 -3
  36. package/dist-types/commands/GetSmsChannelIdCommand.d.ts +1 -3
  37. package/dist-types/commands/GetTelephonyChannelIdCommand.d.ts +1 -3
  38. package/dist-types/commands/GetTokenCommand.d.ts +1 -3
  39. package/dist-types/commands/GetUploadedFileInfoCommand.d.ts +1 -3
  40. package/dist-types/commands/GetWhatsAppChannelIdCommand.d.ts +1 -3
  41. package/dist-types/commands/HideChannelCommand.d.ts +1 -3
  42. package/dist-types/commands/JoinChannelCommand.d.ts +1 -3
  43. package/dist-types/commands/LeaveChannelCommand.d.ts +1 -3
  44. package/dist-types/commands/ListChannelMembersCommand.d.ts +1 -3
  45. package/dist-types/commands/ListChannelMembersReadStatusCommand.d.ts +1 -3
  46. package/dist-types/commands/ListChannelsCommand.d.ts +1 -3
  47. package/dist-types/commands/ListMentionsCommand.d.ts +1 -3
  48. package/dist-types/commands/ListMessagesCommand.d.ts +1 -3
  49. package/dist-types/commands/MarkReadCommand.d.ts +1 -3
  50. package/dist-types/commands/MarkUnreadCommand.d.ts +1 -3
  51. package/dist-types/commands/MoveChannelToSectionCommand.d.ts +1 -3
  52. package/dist-types/commands/MuteChannelCommand.d.ts +1 -3
  53. package/dist-types/commands/PartialUpdateChannelCommand.d.ts +1 -3
  54. package/dist-types/commands/PartialUpdateMessageCommand.d.ts +1 -3
  55. package/dist-types/commands/PinChannelCommand.d.ts +1 -3
  56. package/dist-types/commands/PinMessageCommand.d.ts +1 -3
  57. package/dist-types/commands/QueryChannelsCommand.d.ts +1 -3
  58. package/dist-types/commands/RemoveChannelFromSectionCommand.d.ts +1 -3
  59. package/dist-types/commands/RenameSectionCommand.d.ts +1 -3
  60. package/dist-types/commands/SearchChannelsCommand.d.ts +160 -0
  61. package/dist-types/commands/SearchMessagesCommand.d.ts +204 -0
  62. package/dist-types/commands/SendGiphyCommand.d.ts +1 -3
  63. package/dist-types/commands/SendMessageCommand.d.ts +1 -3
  64. package/dist-types/commands/SendMessageReactionCommand.d.ts +1 -3
  65. package/dist-types/commands/SendSystemMessageCommand.d.ts +1 -3
  66. package/dist-types/commands/SendTypingStartCommand.d.ts +1 -3
  67. package/dist-types/commands/SendTypingStopCommand.d.ts +1 -3
  68. package/dist-types/commands/ShowChannelCommand.d.ts +1 -3
  69. package/dist-types/commands/UnmuteChannelCommand.d.ts +1 -3
  70. package/dist-types/commands/UnpinChannelCommand.d.ts +1 -3
  71. package/dist-types/commands/UnpinMessageCommand.d.ts +1 -3
  72. package/dist-types/commands/UpdateChannelCommand.d.ts +1 -3
  73. package/dist-types/commands/UpdateMessageCommand.d.ts +1 -3
  74. package/dist-types/commands/UploadFileCommand.d.ts +1 -3
  75. package/dist-types/commands/index.d.ts +2 -0
  76. package/dist-types/models/models_0.d.ts +145 -0
  77. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  78. package/dist-types/runtimeConfig.browser.d.ts +1 -3
  79. package/dist-types/runtimeConfig.d.ts +1 -3
  80. package/dist-types/runtimeConfig.native.d.ts +1 -3
  81. package/package.json +2 -2
@@ -0,0 +1,204 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, StreamServiceClientResolvedConfig } from "../StreamServiceClient";
2
+ import { SearchMessagesInput, SearchMessagesOutput } 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 SearchMessagesCommand}.
14
+ */
15
+ export interface SearchMessagesCommandInput extends SearchMessagesInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link SearchMessagesCommand}.
21
+ */
22
+ export interface SearchMessagesCommandOutput extends SearchMessagesOutput, __MetadataBearer {
23
+ }
24
+ declare const SearchMessagesCommand_base: {
25
+ new (input: SearchMessagesCommandInput): import("@smithy/smithy-client").CommandImpl<SearchMessagesCommandInput, SearchMessagesCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: SearchMessagesCommandInput): import("@smithy/smithy-client").CommandImpl<SearchMessagesCommandInput, SearchMessagesCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Full-text search over messages. With `channelId`, searches within that channel (membership required); without it, searches across the caller's channels. Results are access-filtered against DynamoDB.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { StreamServiceClient, SearchMessagesCommand } from "@wildix/stream-client"; // ES Modules import
35
+ * // const { StreamServiceClient, SearchMessagesCommand } = require("@wildix/stream-client"); // CommonJS import
36
+ * const client = new StreamServiceClient(config);
37
+ * const input = { // SearchMessagesInput
38
+ * companyId: "STRING_VALUE",
39
+ * userId: "STRING_VALUE",
40
+ * q: "STRING_VALUE", // required
41
+ * channelId: "STRING_VALUE",
42
+ * size: Number("int"),
43
+ * cursor: "STRING_VALUE",
44
+ * sort: "relevance" || "recency" || "recency_asc",
45
+ * };
46
+ * const command = new SearchMessagesCommand(input);
47
+ * const response = await client.send(command);
48
+ * // { // SearchMessagesOutput
49
+ * // results: [ // SearchMessageHitList // required
50
+ * // { // SearchMessageHit
51
+ * // channelId: "STRING_VALUE", // required
52
+ * // message: { // Message
53
+ * // messageId: "STRING_VALUE", // required
54
+ * // userId: "STRING_VALUE", // required
55
+ * // messageType: "regular" || "system" || "deleted", // required
56
+ * // text: "STRING_VALUE",
57
+ * // attachments: [ // MessageAttachmentList // required
58
+ * // { // MessageAttachment
59
+ * // fsId: "STRING_VALUE", // required
60
+ * // mime: "STRING_VALUE",
61
+ * // name: "STRING_VALUE", // required
62
+ * // size: Number("long"), // required
63
+ * // width: Number("int"),
64
+ * // height: Number("int"),
65
+ * // thumbnail: "STRING_VALUE",
66
+ * // id: "STRING_VALUE", // required
67
+ * // },
68
+ * // ],
69
+ * // mentions: [ // UserIdList // required
70
+ * // "STRING_VALUE",
71
+ * // ],
72
+ * // quote: { // MessageQuote
73
+ * // channelId: "STRING_VALUE", // required
74
+ * // messageId: "STRING_VALUE", // required
75
+ * // userId: "STRING_VALUE", // required
76
+ * // text: "STRING_VALUE",
77
+ * // createdAt: "STRING_VALUE", // required
78
+ * // },
79
+ * // forward: { // MessageForward
80
+ * // channelId: "STRING_VALUE", // required
81
+ * // messageId: "STRING_VALUE", // required
82
+ * // userId: "STRING_VALUE", // required
83
+ * // companyId: "STRING_VALUE",
84
+ * // createdAt: "STRING_VALUE",
85
+ * // },
86
+ * // reactionCounts: { // ReactionCounts // required
87
+ * // "<keys>": Number("int"),
88
+ * // },
89
+ * // latestReactions: [ // ReactionList
90
+ * // { // Reaction
91
+ * // type: "STRING_VALUE", // required
92
+ * // userId: "STRING_VALUE", // required
93
+ * // messageId: "STRING_VALUE", // required
94
+ * // },
95
+ * // ],
96
+ * // pinned: true || false, // required
97
+ * // pinnedAt: "STRING_VALUE",
98
+ * // pinnedBy: "STRING_VALUE",
99
+ * // system: true || false, // required
100
+ * // timelineSeq: Number("long"), // required
101
+ * // visibleSeq: Number("long"), // required
102
+ * // channelVersion: Number("long"), // required
103
+ * // messageVersion: Number("long"), // required
104
+ * // createdAt: "STRING_VALUE", // required
105
+ * // editedAt: "STRING_VALUE",
106
+ * // deletedAt: "STRING_VALUE",
107
+ * // elements: [ // ElementsList
108
+ * // { // Element Union: only one key present
109
+ * // template: { // MessageTemplateConfig
110
+ * // whatsapp: { // TemplateWithParameters
111
+ * // name: "STRING_VALUE", // required
112
+ * // parameters: [ // ListTemplateParameter
113
+ * // { // TemplateParameter
114
+ * // name: "STRING_VALUE", // required
115
+ * // value: "STRING_VALUE", // required
116
+ * // },
117
+ * // ],
118
+ * // },
119
+ * // },
120
+ * // actions: [ // ActionsElementsList
121
+ * // { // ActionElement Union: only one key present
122
+ * // button: { // ButtonElement
123
+ * // text: "STRING_VALUE", // required
124
+ * // handler: { // ButtonHandler Union: only one key present
125
+ * // link: { // ButtonLinkHandler
126
+ * // url: "STRING_VALUE", // required
127
+ * // },
128
+ * // reply: { // ButtonReplyHandler
129
+ * // text: "STRING_VALUE",
130
+ * // },
131
+ * // action: { // ButtonActionHandler
132
+ * // id: "STRING_VALUE", // required
133
+ * // },
134
+ * // },
135
+ * // variant: "contained" || "outlined",
136
+ * // disabled: true || false,
137
+ * // },
138
+ * // },
139
+ * // ],
140
+ * // },
141
+ * // ],
142
+ * // whatsapp: true || false,
143
+ * // whatsappStatus: "trying" || "sent" || "delivered" || "error",
144
+ * // sms: true || false,
145
+ * // smsStatus: "sent" || "delivered" || "trying" || "error",
146
+ * // markdown: true || false,
147
+ * // giphy: { // MessageGiphy
148
+ * // id: "STRING_VALUE", // required
149
+ * // size: "STRING_VALUE", // required
150
+ * // url: "STRING_VALUE", // required
151
+ * // height: "STRING_VALUE", // required
152
+ * // width: "STRING_VALUE", // required
153
+ * // },
154
+ * // silent: true || false,
155
+ * // event: "STRING_VALUE",
156
+ * // },
157
+ * // highlights: [ // StringList
158
+ * // "STRING_VALUE",
159
+ * // ],
160
+ * // },
161
+ * // ],
162
+ * // totalCount: Number("int"),
163
+ * // nextCursor: "STRING_VALUE",
164
+ * // };
165
+ *
166
+ * ```
167
+ *
168
+ * @param SearchMessagesCommandInput - {@link SearchMessagesCommandInput}
169
+ * @returns {@link SearchMessagesCommandOutput}
170
+ * @see {@link SearchMessagesCommandInput} for command's `input` shape.
171
+ * @see {@link SearchMessagesCommandOutput} for command's `response` shape.
172
+ * @see {@link StreamServiceClientResolvedConfig | config} for StreamServiceClient's `config` shape.
173
+ *
174
+ * @throws {@link ChannelNotFoundException} (client fault)
175
+ *
176
+ * @throws {@link StreamServiceException} (server fault)
177
+ *
178
+ * @throws {@link UnauthorizedException} (client fault)
179
+ *
180
+ * @throws {@link ForbiddenException} (client fault)
181
+ *
182
+ * @throws {@link ValidationException} (client fault)
183
+ *
184
+ * @throws {@link RateLimitExceededException} (client fault)
185
+ *
186
+ * @throws {@link StreamServiceServiceException}
187
+ * <p>Base exception class for all service exceptions from StreamService service.</p>
188
+ *
189
+ *
190
+ * @public
191
+ */
192
+ export declare class SearchMessagesCommand extends SearchMessagesCommand_base {
193
+ /** @internal type navigation helper, not in runtime. */
194
+ protected static __types: {
195
+ api: {
196
+ input: SearchMessagesInput;
197
+ output: SearchMessagesOutput;
198
+ };
199
+ sdk: {
200
+ input: SearchMessagesCommandInput;
201
+ output: SearchMessagesCommandOutput;
202
+ };
203
+ };
204
+ }
@@ -24,9 +24,7 @@ export interface SendGiphyCommandOutput extends SendGiphyOutput, __MetadataBeare
24
24
  declare const SendGiphyCommand_base: {
25
25
  new (input: SendGiphyCommandInput): import("@smithy/smithy-client").CommandImpl<SendGiphyCommandInput, SendGiphyCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: SendGiphyCommandInput): import("@smithy/smithy-client").CommandImpl<SendGiphyCommandInput, SendGiphyCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Persists a Giphy message to a channel. Returns the full message snapshot in the same shape as one `ListMessages` item.
@@ -24,9 +24,7 @@ export interface SendMessageCommandOutput extends SendMessageOutput, __MetadataB
24
24
  declare const SendMessageCommand_base: {
25
25
  new (input: SendMessageCommandInput): import("@smithy/smithy-client").CommandImpl<SendMessageCommandInput, SendMessageCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: SendMessageCommandInput): import("@smithy/smithy-client").CommandImpl<SendMessageCommandInput, SendMessageCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Persists a new user message to a channel. Supports text, attachments, rich `elements`, replies (`quote`), forwards (`forward`), and targeted user mentions (`mentions[]`). File attachments must be uploaded first to the file service and referenced by `attachments[].fsId`. Returns the full message snapshot in the same shape as one `ListMessages` item.
@@ -24,9 +24,7 @@ export interface SendMessageReactionCommandOutput extends SendMessageReactionOut
24
24
  declare const SendMessageReactionCommand_base: {
25
25
  new (input: SendMessageReactionCommandInput): import("@smithy/smithy-client").CommandImpl<SendMessageReactionCommandInput, SendMessageReactionCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: SendMessageReactionCommandInput): import("@smithy/smithy-client").CommandImpl<SendMessageReactionCommandInput, SendMessageReactionCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Adds the current user's reaction of `<type>` on one message. Duplicate adds are absorbed and only the first apply advances `messageVersion`. Reactions on a deleted message are rejected.
@@ -24,9 +24,7 @@ export interface SendSystemMessageCommandOutput extends SendSystemMessageOutput,
24
24
  declare const SendSystemMessageCommand_base: {
25
25
  new (input: SendSystemMessageCommandInput): import("@smithy/smithy-client").CommandImpl<SendSystemMessageCommandInput, SendSystemMessageCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: SendSystemMessageCommandInput): import("@smithy/smithy-client").CommandImpl<SendSystemMessageCommandInput, SendSystemMessageCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Persists a backend-generated system message to a channel. Available with S2S authorization only. Each `message` variant maps to a server-side template; optional `event` carries a client rendering hint.
@@ -24,9 +24,7 @@ export interface SendTypingStartCommandOutput extends SendTypingStartOutput, __M
24
24
  declare const SendTypingStartCommand_base: {
25
25
  new (input: SendTypingStartCommandInput): import("@smithy/smithy-client").CommandImpl<SendTypingStartCommandInput, SendTypingStartCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: SendTypingStartCommandInput): import("@smithy/smithy-client").CommandImpl<SendTypingStartCommandInput, SendTypingStartCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Broadcasts a typing-start indicator for the current user in a channel.
@@ -24,9 +24,7 @@ export interface SendTypingStopCommandOutput extends SendTypingStopOutput, __Met
24
24
  declare const SendTypingStopCommand_base: {
25
25
  new (input: SendTypingStopCommandInput): import("@smithy/smithy-client").CommandImpl<SendTypingStopCommandInput, SendTypingStopCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: SendTypingStopCommandInput): import("@smithy/smithy-client").CommandImpl<SendTypingStopCommandInput, SendTypingStopCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Broadcasts a typing-stop indicator for the current user in a channel.
@@ -24,9 +24,7 @@ export interface ShowChannelCommandOutput extends ShowChannelOutput, __MetadataB
24
24
  declare const ShowChannelCommand_base: {
25
25
  new (input: ShowChannelCommandInput): import("@smithy/smithy-client").CommandImpl<ShowChannelCommandInput, ShowChannelCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: ShowChannelCommandInput): import("@smithy/smithy-client").CommandImpl<ShowChannelCommandInput, ShowChannelCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Restores a hidden channel for the current user.
@@ -24,9 +24,7 @@ export interface UnmuteChannelCommandOutput extends UnmuteChannelOutput, __Metad
24
24
  declare const UnmuteChannelCommand_base: {
25
25
  new (input: UnmuteChannelCommandInput): import("@smithy/smithy-client").CommandImpl<UnmuteChannelCommandInput, UnmuteChannelCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: UnmuteChannelCommandInput): import("@smithy/smithy-client").CommandImpl<UnmuteChannelCommandInput, UnmuteChannelCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Unmutes a channel for the current user.
@@ -24,9 +24,7 @@ export interface UnpinChannelCommandOutput extends UnpinChannelOutput, __Metadat
24
24
  declare const UnpinChannelCommand_base: {
25
25
  new (input: UnpinChannelCommandInput): import("@smithy/smithy-client").CommandImpl<UnpinChannelCommandInput, UnpinChannelCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: UnpinChannelCommandInput): import("@smithy/smithy-client").CommandImpl<UnpinChannelCommandInput, UnpinChannelCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Unpins a channel in the current user's inbox.
@@ -24,9 +24,7 @@ export interface UnpinMessageCommandOutput extends UnpinMessageOutput, __Metadat
24
24
  declare const UnpinMessageCommand_base: {
25
25
  new (input: UnpinMessageCommandInput): import("@smithy/smithy-client").CommandImpl<UnpinMessageCommandInput, UnpinMessageCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: UnpinMessageCommandInput): import("@smithy/smithy-client").CommandImpl<UnpinMessageCommandInput, UnpinMessageCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Unpins one message at channel scope. Duplicate calls on an already-unpinned message are absorbed and do not advance `messageVersion`.
@@ -24,9 +24,7 @@ export interface UpdateChannelCommandOutput extends UpdateChannelOutput, __Metad
24
24
  declare const UpdateChannelCommand_base: {
25
25
  new (input: UpdateChannelCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateChannelCommandInput, UpdateChannelCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: UpdateChannelCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateChannelCommandInput, UpdateChannelCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Replaces editable channel metadata.
@@ -24,9 +24,7 @@ export interface UpdateMessageCommandOutput extends UpdateMessageOutput, __Metad
24
24
  declare const UpdateMessageCommand_base: {
25
25
  new (input: UpdateMessageCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateMessageCommandInput, UpdateMessageCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: UpdateMessageCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateMessageCommandInput, UpdateMessageCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Replaces the editable content of an existing message in place. Updates never move the message in the timeline. The server rejects payloads that would empty both `text` and `attachments`. Returns the rewritten message snapshot with `messageVersion` incremented and `editedAt` set.
@@ -24,9 +24,7 @@ export interface UploadFileCommandOutput extends UploadFileOutput, __MetadataBea
24
24
  declare const UploadFileCommand_base: {
25
25
  new (input: UploadFileCommandInput): import("@smithy/smithy-client").CommandImpl<UploadFileCommandInput, UploadFileCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
26
  new (__0_0: UploadFileCommandInput): import("@smithy/smithy-client").CommandImpl<UploadFileCommandInput, UploadFileCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
30
28
  };
31
29
  /**
32
30
  * Creates a presigned URL for uploading a file into a channel. The returned `fsId` is referenced verbatim as `attachments[].fsId` when sending or editing a message.
@@ -43,6 +43,8 @@ export * from "./PinMessageCommand";
43
43
  export * from "./QueryChannelsCommand";
44
44
  export * from "./RemoveChannelFromSectionCommand";
45
45
  export * from "./RenameSectionCommand";
46
+ export * from "./SearchChannelsCommand";
47
+ export * from "./SearchMessagesCommand";
46
48
  export * from "./SendGiphyCommand";
47
49
  export * from "./SendMessageCommand";
48
50
  export * from "./SendMessageReactionCommand";
@@ -3341,6 +3341,151 @@ export interface RenameSectionOutput {
3341
3341
  */
3342
3342
  section: Section;
3343
3343
  }
3344
+ /**
3345
+ * @public
3346
+ */
3347
+ export interface SearchChannelHit {
3348
+ channel: Channel;
3349
+ /**
3350
+ * Highlighted fragments from the matched channel subject or description.
3351
+ * @public
3352
+ */
3353
+ highlights?: (string)[] | undefined;
3354
+ }
3355
+ /**
3356
+ * @public
3357
+ */
3358
+ export interface SearchChannelsInput {
3359
+ /**
3360
+ * The unique identifier of the tenant when a service token is used.
3361
+ * @public
3362
+ */
3363
+ companyId?: string | undefined;
3364
+ /**
3365
+ * The unique identifier of the user when a service or PBX token is used.
3366
+ * @public
3367
+ */
3368
+ userId?: string | undefined;
3369
+ /**
3370
+ * Search text.
3371
+ * @public
3372
+ */
3373
+ q: string;
3374
+ /**
3375
+ * Page size. Default 20, max 50.
3376
+ * @public
3377
+ */
3378
+ size?: number | undefined;
3379
+ /**
3380
+ * Opaque continuation token from the previous response.
3381
+ * @public
3382
+ */
3383
+ cursor?: string | undefined;
3384
+ }
3385
+ /**
3386
+ * @public
3387
+ */
3388
+ export interface SearchChannelsOutput {
3389
+ /**
3390
+ * Matching channels ordered by relevance.
3391
+ * @public
3392
+ */
3393
+ results: (SearchChannelHit)[];
3394
+ /**
3395
+ * Cursor for the next page. Absent when there are no more pages.
3396
+ * @public
3397
+ */
3398
+ nextCursor?: string | undefined;
3399
+ }
3400
+ /**
3401
+ * @public
3402
+ */
3403
+ export interface SearchMessageHit {
3404
+ channelId: string;
3405
+ /**
3406
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
3407
+ * @public
3408
+ */
3409
+ message: Message;
3410
+ /**
3411
+ * Highlighted fragments from the matched message text or attachment names.
3412
+ * @public
3413
+ */
3414
+ highlights?: (string)[] | undefined;
3415
+ }
3416
+ /**
3417
+ * @public
3418
+ * @enum
3419
+ */
3420
+ export declare const SearchSort: {
3421
+ readonly RECENCY: "recency";
3422
+ readonly RECENCY_ASC: "recency_asc";
3423
+ readonly RELEVANCE: "relevance";
3424
+ };
3425
+ /**
3426
+ * @public
3427
+ */
3428
+ export type SearchSort = typeof SearchSort[keyof typeof SearchSort];
3429
+ /**
3430
+ * @public
3431
+ */
3432
+ export interface SearchMessagesInput {
3433
+ /**
3434
+ * The unique identifier of the tenant when a service token is used.
3435
+ * @public
3436
+ */
3437
+ companyId?: string | undefined;
3438
+ /**
3439
+ * The unique identifier of the user when a service or PBX token is used.
3440
+ * @public
3441
+ */
3442
+ userId?: string | undefined;
3443
+ /**
3444
+ * Search text.
3445
+ * @public
3446
+ */
3447
+ q: string;
3448
+ /**
3449
+ * When set, restricts the search to this channel (in-channel search).
3450
+ * @public
3451
+ */
3452
+ channelId?: string | undefined;
3453
+ /**
3454
+ * Page size. Default 20, max 50.
3455
+ * @public
3456
+ */
3457
+ size?: number | undefined;
3458
+ /**
3459
+ * Opaque continuation token from the previous response.
3460
+ * @public
3461
+ */
3462
+ cursor?: string | undefined;
3463
+ /**
3464
+ * Result ordering. `relevance` (default), `recency` (newest first), or `recency_asc` (oldest first).
3465
+ * @public
3466
+ */
3467
+ sort?: SearchSort | undefined;
3468
+ }
3469
+ /**
3470
+ * @public
3471
+ */
3472
+ export interface SearchMessagesOutput {
3473
+ /**
3474
+ * Matching messages, access-filtered and ordered by the requested sort.
3475
+ * @public
3476
+ */
3477
+ results: (SearchMessageHit)[];
3478
+ /**
3479
+ * Total OpenSearch hit count before the visibility post-filter; approximate.
3480
+ * @public
3481
+ */
3482
+ totalCount?: number | undefined;
3483
+ /**
3484
+ * Cursor for the next page. Absent when there are no more pages.
3485
+ * @public
3486
+ */
3487
+ nextCursor?: string | undefined;
3488
+ }
3344
3489
  /**
3345
3490
  * @public
3346
3491
  */
@@ -43,6 +43,8 @@ import { PinMessageCommandInput, PinMessageCommandOutput } from "../commands/Pin
43
43
  import { QueryChannelsCommandInput, QueryChannelsCommandOutput } from "../commands/QueryChannelsCommand";
44
44
  import { RemoveChannelFromSectionCommandInput, RemoveChannelFromSectionCommandOutput } from "../commands/RemoveChannelFromSectionCommand";
45
45
  import { RenameSectionCommandInput, RenameSectionCommandOutput } from "../commands/RenameSectionCommand";
46
+ import { SearchChannelsCommandInput, SearchChannelsCommandOutput } from "../commands/SearchChannelsCommand";
47
+ import { SearchMessagesCommandInput, SearchMessagesCommandOutput } from "../commands/SearchMessagesCommand";
46
48
  import { SendGiphyCommandInput, SendGiphyCommandOutput } from "../commands/SendGiphyCommand";
47
49
  import { SendMessageCommandInput, SendMessageCommandOutput } from "../commands/SendMessageCommand";
48
50
  import { SendMessageReactionCommandInput, SendMessageReactionCommandOutput } from "../commands/SendMessageReactionCommand";
@@ -238,6 +240,14 @@ export declare const se_RemoveChannelFromSectionCommand: (input: RemoveChannelFr
238
240
  * serializeAws_restJson1RenameSectionCommand
239
241
  */
240
242
  export declare const se_RenameSectionCommand: (input: RenameSectionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
243
+ /**
244
+ * serializeAws_restJson1SearchChannelsCommand
245
+ */
246
+ export declare const se_SearchChannelsCommand: (input: SearchChannelsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
247
+ /**
248
+ * serializeAws_restJson1SearchMessagesCommand
249
+ */
250
+ export declare const se_SearchMessagesCommand: (input: SearchMessagesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
241
251
  /**
242
252
  * serializeAws_restJson1SendGiphyCommand
243
253
  */
@@ -470,6 +480,14 @@ export declare const de_RemoveChannelFromSectionCommand: (output: __HttpResponse
470
480
  * deserializeAws_restJson1RenameSectionCommand
471
481
  */
472
482
  export declare const de_RenameSectionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RenameSectionCommandOutput>;
483
+ /**
484
+ * deserializeAws_restJson1SearchChannelsCommand
485
+ */
486
+ export declare const de_SearchChannelsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SearchChannelsCommandOutput>;
487
+ /**
488
+ * deserializeAws_restJson1SearchMessagesCommand
489
+ */
490
+ export declare const de_SearchMessagesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SearchMessagesCommandOutput>;
473
491
  /**
474
492
  * deserializeAws_restJson1SendGiphyCommand
475
493
  */
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler";
4
2
  import { StreamServiceClientConfig } from "./StreamServiceClient";
5
3
  /**
@@ -14,7 +12,7 @@ export declare const getRuntimeConfig: (config: StreamServiceClientConfig) => {
14
12
  requestHandler: import("@smithy/protocol-http").HttpHandler<any> | RequestHandler;
15
13
  retryMode: string | import("@smithy/types").Provider<string>;
16
14
  sha256: import("@smithy/types").HashConstructor;
17
- streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream<any> | ReadableStream<any> | Blob) => Promise<Uint8Array>;
15
+ streamCollector: import("@smithy/types").StreamCollector;
18
16
  serviceRegion?: "eu-1" | "us-1" | undefined;
19
17
  env?: "stage" | "stable" | "prod" | undefined;
20
18
  token: import("@wildix/smithy-utils").TokenProvider;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler";
4
2
  import { StreamServiceClientConfig } from "./StreamServiceClient";
5
3
  /**
@@ -14,7 +12,7 @@ export declare const getRuntimeConfig: (config: StreamServiceClientConfig) => {
14
12
  requestHandler: RequestHandler | import("@smithy/protocol-http").HttpHandler<any>;
15
13
  retryMode: string | import("@smithy/types").Provider<string>;
16
14
  sha256: import("@smithy/types").HashConstructor;
17
- streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream<any> | ReadableStream<any> | Blob) => Promise<Uint8Array>;
15
+ streamCollector: import("@smithy/types").StreamCollector;
18
16
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
19
17
  serviceRegion?: "eu-1" | "us-1" | undefined;
20
18
  env?: "stage" | "stable" | "prod" | undefined;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { StreamServiceClientConfig } from "./StreamServiceClient";
4
2
  /**
5
3
  * @internal
@@ -21,7 +19,7 @@ export declare const getRuntimeConfig: (config: StreamServiceClientConfig) => {
21
19
  apiVersion: string;
22
20
  urlParser: import("@smithy/types").UrlParser;
23
21
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
24
- streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream<any> | ReadableStream<any> | Blob) => Promise<Uint8Array>;
22
+ streamCollector: import("@smithy/types").StreamCollector;
25
23
  base64Decoder: import("@smithy/types").Decoder;
26
24
  base64Encoder: (_input: string | Uint8Array) => string;
27
25
  utf8Decoder: import("@smithy/types").Decoder;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/stream-client",
3
3
  "description": "@wildix/stream-client client",
4
- "version": "0.0.12",
4
+ "version": "0.0.14",
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",
@@ -80,4 +80,4 @@
80
80
  "react-native": {
81
81
  "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
82
82
  }
83
- }
83
+ }