@wildix/stream-client 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/StreamService.js +4 -0
- package/dist-cjs/commands/SearchChannelsCommand.js +21 -0
- package/dist-cjs/commands/SearchMessagesCommand.js +21 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +10 -6
- package/dist-cjs/protocols/Aws_restJson1.js +80 -3
- package/dist-es/StreamService.js +4 -0
- package/dist-es/commands/SearchChannelsCommand.js +17 -0
- package/dist-es/commands/SearchMessagesCommand.js +17 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +9 -5
- package/dist-es/protocols/Aws_restJson1.js +74 -1
- package/dist-types/StreamService.d.ts +14 -0
- package/dist-types/StreamServiceClient.d.ts +4 -2
- package/dist-types/commands/CreateGroupChannelCommand.d.ts +1 -0
- package/dist-types/commands/CreateKiteChannelCommand.d.ts +1 -0
- package/dist-types/commands/GetChannelCommand.d.ts +1 -0
- package/dist-types/commands/GetInboxCommand.d.ts +1 -0
- package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +1 -0
- package/dist-types/commands/GetOrCreateSmsChannelCommand.d.ts +1 -0
- package/dist-types/commands/GetOrCreateTelephonyChannelCommand.d.ts +1 -0
- package/dist-types/commands/GetOrCreateWhatsAppChannelCommand.d.ts +1 -0
- package/dist-types/commands/JoinChannelCommand.d.ts +1 -0
- package/dist-types/commands/ListChannelsCommand.d.ts +1 -0
- package/dist-types/commands/PartialUpdateChannelCommand.d.ts +1 -0
- package/dist-types/commands/QueryChannelsCommand.d.ts +1 -0
- package/dist-types/commands/SearchChannelsCommand.d.ts +159 -0
- package/dist-types/commands/SearchMessagesCommand.d.ts +204 -0
- package/dist-types/commands/UpdateChannelCommand.d.ts +1 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +162 -13
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/package.json +1 -1
|
@@ -99,6 +99,7 @@ declare const PartialUpdateChannelCommand_base: {
|
|
|
99
99
|
* // lastMessage: { // LastMessagePreview
|
|
100
100
|
* // messageId: "STRING_VALUE", // required
|
|
101
101
|
* // userId: "STRING_VALUE", // required
|
|
102
|
+
* // messageType: "regular" || "system" || "deleted", // required
|
|
102
103
|
* // text: "STRING_VALUE",
|
|
103
104
|
* // createdAt: "STRING_VALUE", // required
|
|
104
105
|
* // },
|
|
@@ -59,6 +59,7 @@ declare const QueryChannelsCommand_base: {
|
|
|
59
59
|
* // lastMessage: { // LastMessagePreview
|
|
60
60
|
* // messageId: "STRING_VALUE", // required
|
|
61
61
|
* // userId: "STRING_VALUE", // required
|
|
62
|
+
* // messageType: "regular" || "system" || "deleted", // required
|
|
62
63
|
* // text: "STRING_VALUE",
|
|
63
64
|
* // createdAt: "STRING_VALUE", // required
|
|
64
65
|
* // },
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { ServiceInputTypes, ServiceOutputTypes, StreamServiceClientResolvedConfig } from "../StreamServiceClient";
|
|
2
|
+
import { SearchChannelsInput, SearchChannelsOutput } 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 SearchChannelsCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface SearchChannelsCommandInput extends SearchChannelsInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link SearchChannelsCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface SearchChannelsCommandOutput extends SearchChannelsOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const SearchChannelsCommand_base: {
|
|
25
|
+
new (input: SearchChannelsCommandInput): import("@smithy/smithy-client").CommandImpl<SearchChannelsCommandInput, SearchChannelsCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: SearchChannelsCommandInput): import("@smithy/smithy-client").CommandImpl<SearchChannelsCommandInput, SearchChannelsCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Full-text search over the caller's channels by subject and description. Membership is enforced via the OpenSearch memberIds projection.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { StreamServiceClient, SearchChannelsCommand } from "@wildix/stream-client"; // ES Modules import
|
|
35
|
+
* // const { StreamServiceClient, SearchChannelsCommand } = require("@wildix/stream-client"); // CommonJS import
|
|
36
|
+
* const client = new StreamServiceClient(config);
|
|
37
|
+
* const input = { // SearchChannelsInput
|
|
38
|
+
* companyId: "STRING_VALUE",
|
|
39
|
+
* userId: "STRING_VALUE",
|
|
40
|
+
* q: "STRING_VALUE", // required
|
|
41
|
+
* size: Number("int"),
|
|
42
|
+
* cursor: "STRING_VALUE",
|
|
43
|
+
* };
|
|
44
|
+
* const command = new SearchChannelsCommand(input);
|
|
45
|
+
* const response = await client.send(command);
|
|
46
|
+
* // { // SearchChannelsOutput
|
|
47
|
+
* // results: [ // SearchChannelHitList // required
|
|
48
|
+
* // { // SearchChannelHit
|
|
49
|
+
* // channel: { // Channel
|
|
50
|
+
* // channelId: "STRING_VALUE", // required
|
|
51
|
+
* // channelType: "direct" || "group", // required
|
|
52
|
+
* // membersCount: Number("int"), // required
|
|
53
|
+
* // createdAt: "STRING_VALUE", // required
|
|
54
|
+
* // createdBy: "STRING_VALUE", // required
|
|
55
|
+
* // updatedAt: "STRING_VALUE",
|
|
56
|
+
* // channelVersion: Number("long"), // required
|
|
57
|
+
* // lastActivityAt: "STRING_VALUE", // required
|
|
58
|
+
* // lastMessage: { // LastMessagePreview
|
|
59
|
+
* // messageId: "STRING_VALUE", // required
|
|
60
|
+
* // userId: "STRING_VALUE", // required
|
|
61
|
+
* // messageType: "regular" || "system" || "deleted", // required
|
|
62
|
+
* // text: "STRING_VALUE",
|
|
63
|
+
* // createdAt: "STRING_VALUE", // required
|
|
64
|
+
* // },
|
|
65
|
+
* // company: "STRING_VALUE",
|
|
66
|
+
* // kite: true || false,
|
|
67
|
+
* // kiteTarget: "STRING_VALUE",
|
|
68
|
+
* // kiteVariant: "STRING_VALUE",
|
|
69
|
+
* // kiteServiceName: "STRING_VALUE",
|
|
70
|
+
* // kiteDefaultSubject: "STRING_VALUE",
|
|
71
|
+
* // service: "STRING_VALUE",
|
|
72
|
+
* // serviceRecipient: "STRING_VALUE",
|
|
73
|
+
* // telephony: true || false,
|
|
74
|
+
* // external: true || false,
|
|
75
|
+
* // subject: "STRING_VALUE",
|
|
76
|
+
* // description: "STRING_VALUE",
|
|
77
|
+
* // picture: "STRING_VALUE",
|
|
78
|
+
* // pictureColor: "STRING_VALUE",
|
|
79
|
+
* // access: "private" || "public",
|
|
80
|
+
* // broadcast: true || false,
|
|
81
|
+
* // context: { // ChannelContext
|
|
82
|
+
* // source: "kite",
|
|
83
|
+
* // target: "STRING_VALUE",
|
|
84
|
+
* // events: [ // ChannelContextEventList
|
|
85
|
+
* // { // ChannelContextEvent
|
|
86
|
+
* // id: "STRING_VALUE",
|
|
87
|
+
* // owner: "STRING_VALUE",
|
|
88
|
+
* // start: "STRING_VALUE",
|
|
89
|
+
* // end: "STRING_VALUE",
|
|
90
|
+
* // summary: "STRING_VALUE",
|
|
91
|
+
* // attendees: [ // ChannelContextEventAttendeeList
|
|
92
|
+
* // { // ChannelContextEventAttendee
|
|
93
|
+
* // email: "STRING_VALUE", // required
|
|
94
|
+
* // name: "STRING_VALUE",
|
|
95
|
+
* // status: "accepted" || "tentative" || "declined" || "none", // required
|
|
96
|
+
* // },
|
|
97
|
+
* // ],
|
|
98
|
+
* // },
|
|
99
|
+
* // ],
|
|
100
|
+
* // ptt: { // ChannelContextPushToTalk
|
|
101
|
+
* // broadcastId: "STRING_VALUE",
|
|
102
|
+
* // },
|
|
103
|
+
* // },
|
|
104
|
+
* // whatsappStatus: "24h_channel_closed",
|
|
105
|
+
* // sms: true || false,
|
|
106
|
+
* // mms: true || false,
|
|
107
|
+
* // whatsapp: true || false,
|
|
108
|
+
* // kiteAssign: "STRING_VALUE",
|
|
109
|
+
* // serviceTitle: "STRING_VALUE",
|
|
110
|
+
* // assigneeId: "STRING_VALUE",
|
|
111
|
+
* // autoRecord: true || false,
|
|
112
|
+
* // transcriptionLanguage: "STRING_VALUE",
|
|
113
|
+
* // wizyGuestViewOnly: true || false,
|
|
114
|
+
* // },
|
|
115
|
+
* // highlights: [ // StringList
|
|
116
|
+
* // "STRING_VALUE",
|
|
117
|
+
* // ],
|
|
118
|
+
* // },
|
|
119
|
+
* // ],
|
|
120
|
+
* // nextCursor: "STRING_VALUE",
|
|
121
|
+
* // };
|
|
122
|
+
*
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* @param SearchChannelsCommandInput - {@link SearchChannelsCommandInput}
|
|
126
|
+
* @returns {@link SearchChannelsCommandOutput}
|
|
127
|
+
* @see {@link SearchChannelsCommandInput} for command's `input` shape.
|
|
128
|
+
* @see {@link SearchChannelsCommandOutput} for command's `response` shape.
|
|
129
|
+
* @see {@link StreamServiceClientResolvedConfig | config} for StreamServiceClient's `config` shape.
|
|
130
|
+
*
|
|
131
|
+
* @throws {@link StreamServiceException} (server fault)
|
|
132
|
+
*
|
|
133
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
134
|
+
*
|
|
135
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
136
|
+
*
|
|
137
|
+
* @throws {@link ValidationException} (client fault)
|
|
138
|
+
*
|
|
139
|
+
* @throws {@link RateLimitExceededException} (client fault)
|
|
140
|
+
*
|
|
141
|
+
* @throws {@link StreamServiceServiceException}
|
|
142
|
+
* <p>Base exception class for all service exceptions from StreamService service.</p>
|
|
143
|
+
*
|
|
144
|
+
*
|
|
145
|
+
* @public
|
|
146
|
+
*/
|
|
147
|
+
export declare class SearchChannelsCommand extends SearchChannelsCommand_base {
|
|
148
|
+
/** @internal type navigation helper, not in runtime. */
|
|
149
|
+
protected static __types: {
|
|
150
|
+
api: {
|
|
151
|
+
input: SearchChannelsInput;
|
|
152
|
+
output: SearchChannelsOutput;
|
|
153
|
+
};
|
|
154
|
+
sdk: {
|
|
155
|
+
input: SearchChannelsCommandInput;
|
|
156
|
+
output: SearchChannelsCommandOutput;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
}
|
|
@@ -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",
|
|
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
|
+
}
|
|
@@ -94,6 +94,7 @@ declare const UpdateChannelCommand_base: {
|
|
|
94
94
|
* // lastMessage: { // LastMessagePreview
|
|
95
95
|
* // messageId: "STRING_VALUE", // required
|
|
96
96
|
* // userId: "STRING_VALUE", // required
|
|
97
|
+
* // messageType: "regular" || "system" || "deleted", // required
|
|
97
98
|
* // text: "STRING_VALUE",
|
|
98
99
|
* // createdAt: "STRING_VALUE", // required
|
|
99
100
|
* // },
|
|
@@ -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";
|
|
@@ -528,6 +528,19 @@ export interface ChannelContext {
|
|
|
528
528
|
events?: (ChannelContextEvent)[] | undefined;
|
|
529
529
|
ptt?: ChannelContextPushToTalk | undefined;
|
|
530
530
|
}
|
|
531
|
+
/**
|
|
532
|
+
* @public
|
|
533
|
+
* @enum
|
|
534
|
+
*/
|
|
535
|
+
export declare const MessageType: {
|
|
536
|
+
readonly DELETED: "deleted";
|
|
537
|
+
readonly REGULAR: "regular";
|
|
538
|
+
readonly SYSTEM: "system";
|
|
539
|
+
};
|
|
540
|
+
/**
|
|
541
|
+
* @public
|
|
542
|
+
*/
|
|
543
|
+
export type MessageType = typeof MessageType[keyof typeof MessageType];
|
|
531
544
|
/**
|
|
532
545
|
* Preview of the most recent visible message in a channel.
|
|
533
546
|
* @public
|
|
@@ -539,6 +552,11 @@ export interface LastMessagePreview {
|
|
|
539
552
|
* @public
|
|
540
553
|
*/
|
|
541
554
|
userId: string;
|
|
555
|
+
/**
|
|
556
|
+
* Type of the message. 'deleted' indicates a tombstoned message; clients should render a placeholder instead of text.
|
|
557
|
+
* @public
|
|
558
|
+
*/
|
|
559
|
+
messageType: MessageType;
|
|
542
560
|
/**
|
|
543
561
|
* Text body of the message. Absent for attachment-only or deleted messages.
|
|
544
562
|
* @public
|
|
@@ -1501,19 +1519,6 @@ export interface Reaction {
|
|
|
1501
1519
|
userId: string;
|
|
1502
1520
|
messageId: string;
|
|
1503
1521
|
}
|
|
1504
|
-
/**
|
|
1505
|
-
* @public
|
|
1506
|
-
* @enum
|
|
1507
|
-
*/
|
|
1508
|
-
export declare const MessageType: {
|
|
1509
|
-
readonly DELETED: "deleted";
|
|
1510
|
-
readonly REGULAR: "regular";
|
|
1511
|
-
readonly SYSTEM: "system";
|
|
1512
|
-
};
|
|
1513
|
-
/**
|
|
1514
|
-
* @public
|
|
1515
|
-
*/
|
|
1516
|
-
export type MessageType = typeof MessageType[keyof typeof MessageType];
|
|
1517
1522
|
/**
|
|
1518
1523
|
* Reference to a quoted message.
|
|
1519
1524
|
* @public
|
|
@@ -3331,6 +3336,150 @@ export interface RenameSectionOutput {
|
|
|
3331
3336
|
*/
|
|
3332
3337
|
section: Section;
|
|
3333
3338
|
}
|
|
3339
|
+
/**
|
|
3340
|
+
* @public
|
|
3341
|
+
*/
|
|
3342
|
+
export interface SearchChannelHit {
|
|
3343
|
+
channel: Channel;
|
|
3344
|
+
/**
|
|
3345
|
+
* Highlighted fragments from the matched channel subject or description.
|
|
3346
|
+
* @public
|
|
3347
|
+
*/
|
|
3348
|
+
highlights?: (string)[] | undefined;
|
|
3349
|
+
}
|
|
3350
|
+
/**
|
|
3351
|
+
* @public
|
|
3352
|
+
*/
|
|
3353
|
+
export interface SearchChannelsInput {
|
|
3354
|
+
/**
|
|
3355
|
+
* The unique identifier of the tenant when a service token is used.
|
|
3356
|
+
* @public
|
|
3357
|
+
*/
|
|
3358
|
+
companyId?: string | undefined;
|
|
3359
|
+
/**
|
|
3360
|
+
* The unique identifier of the user when a service or PBX token is used.
|
|
3361
|
+
* @public
|
|
3362
|
+
*/
|
|
3363
|
+
userId?: string | undefined;
|
|
3364
|
+
/**
|
|
3365
|
+
* Search text.
|
|
3366
|
+
* @public
|
|
3367
|
+
*/
|
|
3368
|
+
q: string;
|
|
3369
|
+
/**
|
|
3370
|
+
* Page size. Default 20, max 50.
|
|
3371
|
+
* @public
|
|
3372
|
+
*/
|
|
3373
|
+
size?: number | undefined;
|
|
3374
|
+
/**
|
|
3375
|
+
* Opaque continuation token from the previous response.
|
|
3376
|
+
* @public
|
|
3377
|
+
*/
|
|
3378
|
+
cursor?: string | undefined;
|
|
3379
|
+
}
|
|
3380
|
+
/**
|
|
3381
|
+
* @public
|
|
3382
|
+
*/
|
|
3383
|
+
export interface SearchChannelsOutput {
|
|
3384
|
+
/**
|
|
3385
|
+
* Matching channels ordered by relevance.
|
|
3386
|
+
* @public
|
|
3387
|
+
*/
|
|
3388
|
+
results: (SearchChannelHit)[];
|
|
3389
|
+
/**
|
|
3390
|
+
* Cursor for the next page. Absent when there are no more pages.
|
|
3391
|
+
* @public
|
|
3392
|
+
*/
|
|
3393
|
+
nextCursor?: string | undefined;
|
|
3394
|
+
}
|
|
3395
|
+
/**
|
|
3396
|
+
* @public
|
|
3397
|
+
*/
|
|
3398
|
+
export interface SearchMessageHit {
|
|
3399
|
+
channelId: string;
|
|
3400
|
+
/**
|
|
3401
|
+
* Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
|
|
3402
|
+
* @public
|
|
3403
|
+
*/
|
|
3404
|
+
message: Message;
|
|
3405
|
+
/**
|
|
3406
|
+
* Highlighted fragments from the matched message text or attachment names.
|
|
3407
|
+
* @public
|
|
3408
|
+
*/
|
|
3409
|
+
highlights?: (string)[] | undefined;
|
|
3410
|
+
}
|
|
3411
|
+
/**
|
|
3412
|
+
* @public
|
|
3413
|
+
* @enum
|
|
3414
|
+
*/
|
|
3415
|
+
export declare const SearchSort: {
|
|
3416
|
+
readonly RECENCY: "recency";
|
|
3417
|
+
readonly RELEVANCE: "relevance";
|
|
3418
|
+
};
|
|
3419
|
+
/**
|
|
3420
|
+
* @public
|
|
3421
|
+
*/
|
|
3422
|
+
export type SearchSort = typeof SearchSort[keyof typeof SearchSort];
|
|
3423
|
+
/**
|
|
3424
|
+
* @public
|
|
3425
|
+
*/
|
|
3426
|
+
export interface SearchMessagesInput {
|
|
3427
|
+
/**
|
|
3428
|
+
* The unique identifier of the tenant when a service token is used.
|
|
3429
|
+
* @public
|
|
3430
|
+
*/
|
|
3431
|
+
companyId?: string | undefined;
|
|
3432
|
+
/**
|
|
3433
|
+
* The unique identifier of the user when a service or PBX token is used.
|
|
3434
|
+
* @public
|
|
3435
|
+
*/
|
|
3436
|
+
userId?: string | undefined;
|
|
3437
|
+
/**
|
|
3438
|
+
* Search text.
|
|
3439
|
+
* @public
|
|
3440
|
+
*/
|
|
3441
|
+
q: string;
|
|
3442
|
+
/**
|
|
3443
|
+
* When set, restricts the search to this channel (in-channel search).
|
|
3444
|
+
* @public
|
|
3445
|
+
*/
|
|
3446
|
+
channelId?: string | undefined;
|
|
3447
|
+
/**
|
|
3448
|
+
* Page size. Default 20, max 50.
|
|
3449
|
+
* @public
|
|
3450
|
+
*/
|
|
3451
|
+
size?: number | undefined;
|
|
3452
|
+
/**
|
|
3453
|
+
* Opaque continuation token from the previous response.
|
|
3454
|
+
* @public
|
|
3455
|
+
*/
|
|
3456
|
+
cursor?: string | undefined;
|
|
3457
|
+
/**
|
|
3458
|
+
* Result ordering. `relevance` (default) or `recency`.
|
|
3459
|
+
* @public
|
|
3460
|
+
*/
|
|
3461
|
+
sort?: SearchSort | undefined;
|
|
3462
|
+
}
|
|
3463
|
+
/**
|
|
3464
|
+
* @public
|
|
3465
|
+
*/
|
|
3466
|
+
export interface SearchMessagesOutput {
|
|
3467
|
+
/**
|
|
3468
|
+
* Matching messages, access-filtered and ordered by the requested sort.
|
|
3469
|
+
* @public
|
|
3470
|
+
*/
|
|
3471
|
+
results: (SearchMessageHit)[];
|
|
3472
|
+
/**
|
|
3473
|
+
* Total OpenSearch hit count before the visibility post-filter; approximate.
|
|
3474
|
+
* @public
|
|
3475
|
+
*/
|
|
3476
|
+
totalCount?: number | undefined;
|
|
3477
|
+
/**
|
|
3478
|
+
* Cursor for the next page. Absent when there are no more pages.
|
|
3479
|
+
* @public
|
|
3480
|
+
*/
|
|
3481
|
+
nextCursor?: string | undefined;
|
|
3482
|
+
}
|
|
3334
3483
|
/**
|
|
3335
3484
|
* @public
|
|
3336
3485
|
*/
|
|
@@ -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
|
*/
|
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.
|
|
4
|
+
"version": "0.0.11",
|
|
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",
|