@wildix/stream-client 0.0.10 → 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 +5 -1
- 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 +4 -0
- 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/SearchChannelsCommand.d.ts +159 -0
- package/dist-types/commands/SearchMessagesCommand.d.ts +204 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +144 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/package.json +1 -1
|
@@ -47,6 +47,8 @@ const PinMessageCommand_1 = require("./commands/PinMessageCommand");
|
|
|
47
47
|
const QueryChannelsCommand_1 = require("./commands/QueryChannelsCommand");
|
|
48
48
|
const RemoveChannelFromSectionCommand_1 = require("./commands/RemoveChannelFromSectionCommand");
|
|
49
49
|
const RenameSectionCommand_1 = require("./commands/RenameSectionCommand");
|
|
50
|
+
const SearchChannelsCommand_1 = require("./commands/SearchChannelsCommand");
|
|
51
|
+
const SearchMessagesCommand_1 = require("./commands/SearchMessagesCommand");
|
|
50
52
|
const SendGiphyCommand_1 = require("./commands/SendGiphyCommand");
|
|
51
53
|
const SendMessageCommand_1 = require("./commands/SendMessageCommand");
|
|
52
54
|
const SendMessageReactionCommand_1 = require("./commands/SendMessageReactionCommand");
|
|
@@ -107,6 +109,8 @@ const commands = {
|
|
|
107
109
|
QueryChannelsCommand: QueryChannelsCommand_1.QueryChannelsCommand,
|
|
108
110
|
RemoveChannelFromSectionCommand: RemoveChannelFromSectionCommand_1.RemoveChannelFromSectionCommand,
|
|
109
111
|
RenameSectionCommand: RenameSectionCommand_1.RenameSectionCommand,
|
|
112
|
+
SearchChannelsCommand: SearchChannelsCommand_1.SearchChannelsCommand,
|
|
113
|
+
SearchMessagesCommand: SearchMessagesCommand_1.SearchMessagesCommand,
|
|
110
114
|
SendGiphyCommand: SendGiphyCommand_1.SendGiphyCommand,
|
|
111
115
|
SendMessageCommand: SendMessageCommand_1.SendMessageCommand,
|
|
112
116
|
SendMessageReactionCommand: SendMessageReactionCommand_1.SendMessageReactionCommand,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchChannelsCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class SearchChannelsCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("StreamService", "SearchChannels", {})
|
|
15
|
+
.n("StreamServiceClient", "SearchChannelsCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_SearchChannelsCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_SearchChannelsCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.SearchChannelsCommand = SearchChannelsCommand;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchMessagesCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class SearchMessagesCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("StreamService", "SearchMessages", {})
|
|
15
|
+
.n("StreamServiceClient", "SearchMessagesCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_SearchMessagesCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_SearchMessagesCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.SearchMessagesCommand = SearchMessagesCommand;
|
|
@@ -46,6 +46,8 @@ tslib_1.__exportStar(require("./PinMessageCommand"), exports);
|
|
|
46
46
|
tslib_1.__exportStar(require("./QueryChannelsCommand"), exports);
|
|
47
47
|
tslib_1.__exportStar(require("./RemoveChannelFromSectionCommand"), exports);
|
|
48
48
|
tslib_1.__exportStar(require("./RenameSectionCommand"), exports);
|
|
49
|
+
tslib_1.__exportStar(require("./SearchChannelsCommand"), exports);
|
|
50
|
+
tslib_1.__exportStar(require("./SearchMessagesCommand"), exports);
|
|
49
51
|
tslib_1.__exportStar(require("./SendGiphyCommand"), exports);
|
|
50
52
|
tslib_1.__exportStar(require("./SendMessageCommand"), exports);
|
|
51
53
|
tslib_1.__exportStar(require("./SendMessageReactionCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SystemMessage = exports.MessageUnsetFields = exports.MarkUnreadChannelsLimitReachedException = exports.MentionsFilter = exports.GroupChannelUnsetOptions = exports.FileNotFoundException = exports.FileCategory = exports.DownloadStrategy = exports.SectionNotFoundException = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.SectionType = exports.TargetNotFoundException = exports.TargetNotEligibleException = exports.TargetNotEligibleReason = exports.MessageWhatsAppStatus = exports.MessageSmsStatus = exports.Element = exports.GroupChannelCreationEventType = exports.ChannelsFilter = exports.ChannelAlreadyExistException = exports.ChannelWhatsAppStatus = exports.MessageType = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelType = exports.ChannelAccess = exports.AssignChannelVariant = exports.AssignChannelServiceRequest = exports.AssignChannelAssigneeRequest = exports.StreamServiceException = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.ValidationException = exports.UnauthorizedException = exports.RateLimitExceededException = exports.ForbiddenException = void 0;
|
|
3
|
+
exports.SystemMessage = exports.SearchSort = exports.MessageUnsetFields = exports.MarkUnreadChannelsLimitReachedException = exports.MentionsFilter = exports.GroupChannelUnsetOptions = exports.FileNotFoundException = exports.FileCategory = exports.DownloadStrategy = exports.SectionNotFoundException = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.SectionType = exports.TargetNotFoundException = exports.TargetNotEligibleException = exports.TargetNotEligibleReason = exports.MessageWhatsAppStatus = exports.MessageSmsStatus = exports.Element = exports.GroupChannelCreationEventType = exports.ChannelsFilter = exports.ChannelAlreadyExistException = exports.ChannelWhatsAppStatus = exports.MessageType = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelType = exports.ChannelAccess = exports.AssignChannelVariant = exports.AssignChannelServiceRequest = exports.AssignChannelAssigneeRequest = exports.StreamServiceException = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.ValidationException = exports.UnauthorizedException = exports.RateLimitExceededException = exports.ForbiddenException = void 0;
|
|
4
4
|
const StreamServiceServiceException_1 = require("./StreamServiceServiceException");
|
|
5
5
|
class ForbiddenException extends StreamServiceServiceException_1.StreamServiceServiceException {
|
|
6
6
|
name = "ForbiddenException";
|
|
@@ -366,6 +366,10 @@ exports.MessageUnsetFields = {
|
|
|
366
366
|
WHATSAPP: "whatsapp",
|
|
367
367
|
WHATSAPP_STATUS: "whatsappStatus",
|
|
368
368
|
};
|
|
369
|
+
exports.SearchSort = {
|
|
370
|
+
RECENCY: "recency",
|
|
371
|
+
RELEVANCE: "relevance",
|
|
372
|
+
};
|
|
369
373
|
var SystemMessage;
|
|
370
374
|
(function (SystemMessage) {
|
|
371
375
|
SystemMessage.visit = (value, visitor) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.de_UploadFileCommand = exports.de_UpdateMessageCommand = exports.de_UpdateChannelCommand = exports.de_UnpinMessageCommand = exports.de_UnpinChannelCommand = exports.de_UnmuteChannelCommand = exports.de_ShowChannelCommand = exports.de_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendSystemMessageCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_RenameSectionCommand = exports.de_RemoveChannelFromSectionCommand = exports.de_QueryChannelsCommand = void 0;
|
|
3
|
+
exports.se_SendMessageReactionCommand = exports.se_SendMessageCommand = exports.se_SendGiphyCommand = exports.se_SearchMessagesCommand = exports.se_SearchChannelsCommand = exports.se_RenameSectionCommand = exports.se_RemoveChannelFromSectionCommand = exports.se_QueryChannelsCommand = exports.se_PinMessageCommand = exports.se_PinChannelCommand = exports.se_PartialUpdateMessageCommand = exports.se_PartialUpdateChannelCommand = exports.se_MuteChannelCommand = exports.se_MoveChannelToSectionCommand = exports.se_MarkUnreadCommand = exports.se_MarkReadCommand = exports.se_ListMessagesCommand = exports.se_ListMentionsCommand = exports.se_ListChannelsCommand = exports.se_ListChannelMembersReadStatusCommand = exports.se_ListChannelMembersCommand = exports.se_LeaveChannelCommand = exports.se_JoinChannelCommand = exports.se_HideChannelCommand = exports.se_GetWhatsAppChannelIdCommand = exports.se_GetUploadedFileInfoCommand = exports.se_GetTokenCommand = exports.se_GetTelephonyChannelIdCommand = exports.se_GetSmsChannelIdCommand = exports.se_GetOrCreateWhatsAppChannelCommand = exports.se_GetOrCreateTelephonyChannelCommand = exports.se_GetOrCreateSmsChannelCommand = exports.se_GetOrCreateDirectChannelCommand = exports.se_GetMessageCommand = exports.se_GetInboxCommand = exports.se_GetFilePresignedDownloadUrlCommand = exports.se_GetDirectChannelIdCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_DeleteSectionCommand = exports.se_DeleteMessageReactionCommand = exports.se_DeleteMessageCommand = exports.se_DeleteChannelMemberCommand = exports.se_DeleteChannelCommand = exports.se_CreateSectionCommand = exports.se_CreateKiteChannelCommand = exports.se_CreateGroupChannelCommand = exports.se_AssignChannelCommand = exports.se_AddChannelMembersCommand = exports.se_AddChannelMemberCommand = void 0;
|
|
4
|
+
exports.de_PartialUpdateMessageCommand = exports.de_PartialUpdateChannelCommand = exports.de_MuteChannelCommand = exports.de_MoveChannelToSectionCommand = exports.de_MarkUnreadCommand = exports.de_MarkReadCommand = exports.de_ListMessagesCommand = exports.de_ListMentionsCommand = exports.de_ListChannelsCommand = exports.de_ListChannelMembersReadStatusCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_HideChannelCommand = exports.de_GetWhatsAppChannelIdCommand = exports.de_GetUploadedFileInfoCommand = exports.de_GetTokenCommand = exports.de_GetTelephonyChannelIdCommand = exports.de_GetSmsChannelIdCommand = exports.de_GetOrCreateWhatsAppChannelCommand = exports.de_GetOrCreateTelephonyChannelCommand = exports.de_GetOrCreateSmsChannelCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageCommand = exports.de_GetInboxCommand = exports.de_GetFilePresignedDownloadUrlCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_DeleteSectionCommand = exports.de_DeleteMessageReactionCommand = exports.de_DeleteMessageCommand = exports.de_DeleteChannelMemberCommand = exports.de_DeleteChannelCommand = exports.de_CreateSectionCommand = exports.de_CreateKiteChannelCommand = exports.de_CreateGroupChannelCommand = exports.de_AssignChannelCommand = exports.de_AddChannelMembersCommand = exports.de_AddChannelMemberCommand = exports.se_UploadFileCommand = exports.se_UpdateMessageCommand = exports.se_UpdateChannelCommand = exports.se_UnpinMessageCommand = exports.se_UnpinChannelCommand = exports.se_UnmuteChannelCommand = exports.se_ShowChannelCommand = exports.se_SendTypingStopCommand = exports.se_SendTypingStartCommand = exports.se_SendSystemMessageCommand = void 0;
|
|
5
|
+
exports.de_UploadFileCommand = exports.de_UpdateMessageCommand = exports.de_UpdateChannelCommand = exports.de_UnpinMessageCommand = exports.de_UnpinChannelCommand = exports.de_UnmuteChannelCommand = exports.de_ShowChannelCommand = exports.de_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendSystemMessageCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_SearchMessagesCommand = exports.de_SearchChannelsCommand = exports.de_RenameSectionCommand = exports.de_RemoveChannelFromSectionCommand = exports.de_QueryChannelsCommand = exports.de_PinMessageCommand = exports.de_PinChannelCommand = void 0;
|
|
6
6
|
const StreamServiceServiceException_1 = require("../models/StreamServiceServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const core_1 = require("@aws-sdk/core");
|
|
@@ -956,6 +956,46 @@ const se_RenameSectionCommand = async (input, context) => {
|
|
|
956
956
|
return b.build();
|
|
957
957
|
};
|
|
958
958
|
exports.se_RenameSectionCommand = se_RenameSectionCommand;
|
|
959
|
+
const se_SearchChannelsCommand = async (input, context) => {
|
|
960
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
961
|
+
const headers = {};
|
|
962
|
+
b.bp("/api/v1/search/channels");
|
|
963
|
+
const query = (0, smithy_client_1.map)({
|
|
964
|
+
[_c]: [, input[_cI]],
|
|
965
|
+
[_uI]: [, input[_uI]],
|
|
966
|
+
[_q]: [, (0, smithy_client_1.expectNonNull)(input[_q], `q`)],
|
|
967
|
+
[_si]: [() => input.size !== void 0, () => (input[_si].toString())],
|
|
968
|
+
[_cu]: [, input[_cu]],
|
|
969
|
+
});
|
|
970
|
+
let body;
|
|
971
|
+
b.m("GET")
|
|
972
|
+
.h(headers)
|
|
973
|
+
.q(query)
|
|
974
|
+
.b(body);
|
|
975
|
+
return b.build();
|
|
976
|
+
};
|
|
977
|
+
exports.se_SearchChannelsCommand = se_SearchChannelsCommand;
|
|
978
|
+
const se_SearchMessagesCommand = async (input, context) => {
|
|
979
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
980
|
+
const headers = {};
|
|
981
|
+
b.bp("/api/v1/search/messages");
|
|
982
|
+
const query = (0, smithy_client_1.map)({
|
|
983
|
+
[_c]: [, input[_cI]],
|
|
984
|
+
[_uI]: [, input[_uI]],
|
|
985
|
+
[_q]: [, (0, smithy_client_1.expectNonNull)(input[_q], `q`)],
|
|
986
|
+
[_cIh]: [, input[_cIh]],
|
|
987
|
+
[_si]: [() => input.size !== void 0, () => (input[_si].toString())],
|
|
988
|
+
[_cu]: [, input[_cu]],
|
|
989
|
+
[_so]: [, input[_so]],
|
|
990
|
+
});
|
|
991
|
+
let body;
|
|
992
|
+
b.m("GET")
|
|
993
|
+
.h(headers)
|
|
994
|
+
.q(query)
|
|
995
|
+
.b(body);
|
|
996
|
+
return b.build();
|
|
997
|
+
};
|
|
998
|
+
exports.se_SearchMessagesCommand = se_SearchMessagesCommand;
|
|
959
999
|
const se_SendGiphyCommand = async (input, context) => {
|
|
960
1000
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
961
1001
|
const headers = {
|
|
@@ -1911,6 +1951,39 @@ const de_RenameSectionCommand = async (output, context) => {
|
|
|
1911
1951
|
return contents;
|
|
1912
1952
|
};
|
|
1913
1953
|
exports.de_RenameSectionCommand = de_RenameSectionCommand;
|
|
1954
|
+
const de_SearchChannelsCommand = async (output, context) => {
|
|
1955
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1956
|
+
return de_CommandError(output, context);
|
|
1957
|
+
}
|
|
1958
|
+
const contents = (0, smithy_client_1.map)({
|
|
1959
|
+
$metadata: deserializeMetadata(output),
|
|
1960
|
+
});
|
|
1961
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1962
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1963
|
+
'nextCursor': smithy_client_1.expectString,
|
|
1964
|
+
'results': smithy_client_1._json,
|
|
1965
|
+
});
|
|
1966
|
+
Object.assign(contents, doc);
|
|
1967
|
+
return contents;
|
|
1968
|
+
};
|
|
1969
|
+
exports.de_SearchChannelsCommand = de_SearchChannelsCommand;
|
|
1970
|
+
const de_SearchMessagesCommand = async (output, context) => {
|
|
1971
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1972
|
+
return de_CommandError(output, context);
|
|
1973
|
+
}
|
|
1974
|
+
const contents = (0, smithy_client_1.map)({
|
|
1975
|
+
$metadata: deserializeMetadata(output),
|
|
1976
|
+
});
|
|
1977
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1978
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1979
|
+
'nextCursor': smithy_client_1.expectString,
|
|
1980
|
+
'results': smithy_client_1._json,
|
|
1981
|
+
'totalCount': smithy_client_1.expectInt32,
|
|
1982
|
+
});
|
|
1983
|
+
Object.assign(contents, doc);
|
|
1984
|
+
return contents;
|
|
1985
|
+
};
|
|
1986
|
+
exports.de_SearchMessagesCommand = de_SearchMessagesCommand;
|
|
1914
1987
|
const de_SendGiphyCommand = async (output, context) => {
|
|
1915
1988
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1916
1989
|
return de_CommandError(output, context);
|
|
@@ -2363,6 +2436,7 @@ const deserializeMetadata = (output) => ({
|
|
|
2363
2436
|
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
|
|
2364
2437
|
const _c = "company";
|
|
2365
2438
|
const _cI = "companyId";
|
|
2439
|
+
const _cIh = "channelId";
|
|
2366
2440
|
const _cIl = "clientId";
|
|
2367
2441
|
const _ca = "category";
|
|
2368
2442
|
const _cu = "cursor";
|
|
@@ -2372,6 +2446,7 @@ const _fo = "force";
|
|
|
2372
2446
|
const _fr = "from";
|
|
2373
2447
|
const _l = "limit";
|
|
2374
2448
|
const _o = "offset";
|
|
2449
|
+
const _q = "q";
|
|
2375
2450
|
const _rA = "retryAfter";
|
|
2376
2451
|
const _rL = "rateLimit";
|
|
2377
2452
|
const _rLR = "rateLimitRemaining";
|
|
@@ -2379,6 +2454,8 @@ const _rLRa = "rateLimitReset";
|
|
|
2379
2454
|
const _ra = "retry-after";
|
|
2380
2455
|
const _s = "silent";
|
|
2381
2456
|
const _se = "section";
|
|
2457
|
+
const _si = "size";
|
|
2458
|
+
const _so = "sort";
|
|
2382
2459
|
const _t = "to";
|
|
2383
2460
|
const _uI = "userId";
|
|
2384
2461
|
const _xrl = "x-ratelimit-limit";
|
package/dist-es/StreamService.js
CHANGED
|
@@ -44,6 +44,8 @@ import { PinMessageCommand, } from "./commands/PinMessageCommand";
|
|
|
44
44
|
import { QueryChannelsCommand, } from "./commands/QueryChannelsCommand";
|
|
45
45
|
import { RemoveChannelFromSectionCommand, } from "./commands/RemoveChannelFromSectionCommand";
|
|
46
46
|
import { RenameSectionCommand, } from "./commands/RenameSectionCommand";
|
|
47
|
+
import { SearchChannelsCommand, } from "./commands/SearchChannelsCommand";
|
|
48
|
+
import { SearchMessagesCommand, } from "./commands/SearchMessagesCommand";
|
|
47
49
|
import { SendGiphyCommand, } from "./commands/SendGiphyCommand";
|
|
48
50
|
import { SendMessageCommand, } from "./commands/SendMessageCommand";
|
|
49
51
|
import { SendMessageReactionCommand, } from "./commands/SendMessageReactionCommand";
|
|
@@ -104,6 +106,8 @@ const commands = {
|
|
|
104
106
|
QueryChannelsCommand,
|
|
105
107
|
RemoveChannelFromSectionCommand,
|
|
106
108
|
RenameSectionCommand,
|
|
109
|
+
SearchChannelsCommand,
|
|
110
|
+
SearchMessagesCommand,
|
|
107
111
|
SendGiphyCommand,
|
|
108
112
|
SendMessageCommand,
|
|
109
113
|
SendMessageReactionCommand,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_SearchChannelsCommand, se_SearchChannelsCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class SearchChannelsCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("StreamService", "SearchChannels", {})
|
|
12
|
+
.n("StreamServiceClient", "SearchChannelsCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_SearchChannelsCommand)
|
|
15
|
+
.de(de_SearchChannelsCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_SearchMessagesCommand, se_SearchMessagesCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class SearchMessagesCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("StreamService", "SearchMessages", {})
|
|
12
|
+
.n("StreamServiceClient", "SearchMessagesCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_SearchMessagesCommand)
|
|
15
|
+
.de(de_SearchMessagesCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -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";
|
|
@@ -348,6 +348,10 @@ export const MessageUnsetFields = {
|
|
|
348
348
|
WHATSAPP: "whatsapp",
|
|
349
349
|
WHATSAPP_STATUS: "whatsappStatus",
|
|
350
350
|
};
|
|
351
|
+
export const SearchSort = {
|
|
352
|
+
RECENCY: "recency",
|
|
353
|
+
RELEVANCE: "relevance",
|
|
354
|
+
};
|
|
351
355
|
export var SystemMessage;
|
|
352
356
|
(function (SystemMessage) {
|
|
353
357
|
SystemMessage.visit = (value, visitor) => {
|
|
@@ -2,7 +2,7 @@ import { StreamServiceServiceException as __BaseException } from "../models/Stre
|
|
|
2
2
|
import { ChannelAlreadyExistException, ChannelNotFoundException, FileNotFoundException, ForbiddenException, MarkUnreadChannelsLimitReachedException, MemberAlreadyExistException, MemberNotFoundException, MessageNotFoundException, RateLimitExceededException, SectionNotFoundException, StreamServiceException, TargetNotEligibleException, TargetNotFoundException, UnauthorizedException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
|
-
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, strictParseInt32 as __strictParseInt32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, strictParseInt32 as __strictParseInt32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
6
6
|
export const se_AddChannelMemberCommand = async (input, context) => {
|
|
7
7
|
const b = rb(input, context);
|
|
8
8
|
const headers = {
|
|
@@ -906,6 +906,44 @@ export const se_RenameSectionCommand = async (input, context) => {
|
|
|
906
906
|
.b(body);
|
|
907
907
|
return b.build();
|
|
908
908
|
};
|
|
909
|
+
export const se_SearchChannelsCommand = async (input, context) => {
|
|
910
|
+
const b = rb(input, context);
|
|
911
|
+
const headers = {};
|
|
912
|
+
b.bp("/api/v1/search/channels");
|
|
913
|
+
const query = map({
|
|
914
|
+
[_c]: [, input[_cI]],
|
|
915
|
+
[_uI]: [, input[_uI]],
|
|
916
|
+
[_q]: [, __expectNonNull(input[_q], `q`)],
|
|
917
|
+
[_si]: [() => input.size !== void 0, () => (input[_si].toString())],
|
|
918
|
+
[_cu]: [, input[_cu]],
|
|
919
|
+
});
|
|
920
|
+
let body;
|
|
921
|
+
b.m("GET")
|
|
922
|
+
.h(headers)
|
|
923
|
+
.q(query)
|
|
924
|
+
.b(body);
|
|
925
|
+
return b.build();
|
|
926
|
+
};
|
|
927
|
+
export const se_SearchMessagesCommand = async (input, context) => {
|
|
928
|
+
const b = rb(input, context);
|
|
929
|
+
const headers = {};
|
|
930
|
+
b.bp("/api/v1/search/messages");
|
|
931
|
+
const query = map({
|
|
932
|
+
[_c]: [, input[_cI]],
|
|
933
|
+
[_uI]: [, input[_uI]],
|
|
934
|
+
[_q]: [, __expectNonNull(input[_q], `q`)],
|
|
935
|
+
[_cIh]: [, input[_cIh]],
|
|
936
|
+
[_si]: [() => input.size !== void 0, () => (input[_si].toString())],
|
|
937
|
+
[_cu]: [, input[_cu]],
|
|
938
|
+
[_so]: [, input[_so]],
|
|
939
|
+
});
|
|
940
|
+
let body;
|
|
941
|
+
b.m("GET")
|
|
942
|
+
.h(headers)
|
|
943
|
+
.q(query)
|
|
944
|
+
.b(body);
|
|
945
|
+
return b.build();
|
|
946
|
+
};
|
|
909
947
|
export const se_SendGiphyCommand = async (input, context) => {
|
|
910
948
|
const b = rb(input, context);
|
|
911
949
|
const headers = {
|
|
@@ -1803,6 +1841,37 @@ export const de_RenameSectionCommand = async (output, context) => {
|
|
|
1803
1841
|
Object.assign(contents, doc);
|
|
1804
1842
|
return contents;
|
|
1805
1843
|
};
|
|
1844
|
+
export const de_SearchChannelsCommand = async (output, context) => {
|
|
1845
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1846
|
+
return de_CommandError(output, context);
|
|
1847
|
+
}
|
|
1848
|
+
const contents = map({
|
|
1849
|
+
$metadata: deserializeMetadata(output),
|
|
1850
|
+
});
|
|
1851
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1852
|
+
const doc = take(data, {
|
|
1853
|
+
'nextCursor': __expectString,
|
|
1854
|
+
'results': _json,
|
|
1855
|
+
});
|
|
1856
|
+
Object.assign(contents, doc);
|
|
1857
|
+
return contents;
|
|
1858
|
+
};
|
|
1859
|
+
export const de_SearchMessagesCommand = async (output, context) => {
|
|
1860
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1861
|
+
return de_CommandError(output, context);
|
|
1862
|
+
}
|
|
1863
|
+
const contents = map({
|
|
1864
|
+
$metadata: deserializeMetadata(output),
|
|
1865
|
+
});
|
|
1866
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1867
|
+
const doc = take(data, {
|
|
1868
|
+
'nextCursor': __expectString,
|
|
1869
|
+
'results': _json,
|
|
1870
|
+
'totalCount': __expectInt32,
|
|
1871
|
+
});
|
|
1872
|
+
Object.assign(contents, doc);
|
|
1873
|
+
return contents;
|
|
1874
|
+
};
|
|
1806
1875
|
export const de_SendGiphyCommand = async (output, context) => {
|
|
1807
1876
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1808
1877
|
return de_CommandError(output, context);
|
|
@@ -2242,6 +2311,7 @@ const deserializeMetadata = (output) => ({
|
|
|
2242
2311
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
|
|
2243
2312
|
const _c = "company";
|
|
2244
2313
|
const _cI = "companyId";
|
|
2314
|
+
const _cIh = "channelId";
|
|
2245
2315
|
const _cIl = "clientId";
|
|
2246
2316
|
const _ca = "category";
|
|
2247
2317
|
const _cu = "cursor";
|
|
@@ -2251,6 +2321,7 @@ const _fo = "force";
|
|
|
2251
2321
|
const _fr = "from";
|
|
2252
2322
|
const _l = "limit";
|
|
2253
2323
|
const _o = "offset";
|
|
2324
|
+
const _q = "q";
|
|
2254
2325
|
const _rA = "retryAfter";
|
|
2255
2326
|
const _rL = "rateLimit";
|
|
2256
2327
|
const _rLR = "rateLimitRemaining";
|
|
@@ -2258,6 +2329,8 @@ const _rLRa = "rateLimitReset";
|
|
|
2258
2329
|
const _ra = "retry-after";
|
|
2259
2330
|
const _s = "silent";
|
|
2260
2331
|
const _se = "section";
|
|
2332
|
+
const _si = "size";
|
|
2333
|
+
const _so = "sort";
|
|
2261
2334
|
const _t = "to";
|
|
2262
2335
|
const _uI = "userId";
|
|
2263
2336
|
const _xrl = "x-ratelimit-limit";
|
|
@@ -44,6 +44,8 @@ import { PinMessageCommandInput, PinMessageCommandOutput } from "./commands/PinM
|
|
|
44
44
|
import { QueryChannelsCommandInput, QueryChannelsCommandOutput } from "./commands/QueryChannelsCommand";
|
|
45
45
|
import { RemoveChannelFromSectionCommandInput, RemoveChannelFromSectionCommandOutput } from "./commands/RemoveChannelFromSectionCommand";
|
|
46
46
|
import { RenameSectionCommandInput, RenameSectionCommandOutput } from "./commands/RenameSectionCommand";
|
|
47
|
+
import { SearchChannelsCommandInput, SearchChannelsCommandOutput } from "./commands/SearchChannelsCommand";
|
|
48
|
+
import { SearchMessagesCommandInput, SearchMessagesCommandOutput } from "./commands/SearchMessagesCommand";
|
|
47
49
|
import { SendGiphyCommandInput, SendGiphyCommandOutput } from "./commands/SendGiphyCommand";
|
|
48
50
|
import { SendMessageCommandInput, SendMessageCommandOutput } from "./commands/SendMessageCommand";
|
|
49
51
|
import { SendMessageReactionCommandInput, SendMessageReactionCommandOutput } from "./commands/SendMessageReactionCommand";
|
|
@@ -336,6 +338,18 @@ export interface StreamService {
|
|
|
336
338
|
renameSection(args: RenameSectionCommandInput, options?: __HttpHandlerOptions): Promise<RenameSectionCommandOutput>;
|
|
337
339
|
renameSection(args: RenameSectionCommandInput, cb: (err: any, data?: RenameSectionCommandOutput) => void): void;
|
|
338
340
|
renameSection(args: RenameSectionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RenameSectionCommandOutput) => void): void;
|
|
341
|
+
/**
|
|
342
|
+
* @see {@link SearchChannelsCommand}
|
|
343
|
+
*/
|
|
344
|
+
searchChannels(args: SearchChannelsCommandInput, options?: __HttpHandlerOptions): Promise<SearchChannelsCommandOutput>;
|
|
345
|
+
searchChannels(args: SearchChannelsCommandInput, cb: (err: any, data?: SearchChannelsCommandOutput) => void): void;
|
|
346
|
+
searchChannels(args: SearchChannelsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchChannelsCommandOutput) => void): void;
|
|
347
|
+
/**
|
|
348
|
+
* @see {@link SearchMessagesCommand}
|
|
349
|
+
*/
|
|
350
|
+
searchMessages(args: SearchMessagesCommandInput, options?: __HttpHandlerOptions): Promise<SearchMessagesCommandOutput>;
|
|
351
|
+
searchMessages(args: SearchMessagesCommandInput, cb: (err: any, data?: SearchMessagesCommandOutput) => void): void;
|
|
352
|
+
searchMessages(args: SearchMessagesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchMessagesCommandOutput) => void): void;
|
|
339
353
|
/**
|
|
340
354
|
* @see {@link SendGiphyCommand}
|
|
341
355
|
*/
|
|
@@ -43,6 +43,8 @@ import { PinMessageCommandInput, PinMessageCommandOutput } from "./commands/PinM
|
|
|
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";
|
|
@@ -67,11 +69,11 @@ export { __Client };
|
|
|
67
69
|
/**
|
|
68
70
|
* @public
|
|
69
71
|
*/
|
|
70
|
-
export type ServiceInputTypes = AddChannelMemberCommandInput | AddChannelMembersCommandInput | AssignChannelCommandInput | CreateGroupChannelCommandInput | CreateKiteChannelCommandInput | CreateSectionCommandInput | DeleteChannelCommandInput | DeleteChannelMemberCommandInput | DeleteMessageCommandInput | DeleteMessageReactionCommandInput | DeleteSectionCommandInput | GetChannelCommandInput | GetChannelMemberCommandInput | GetDirectChannelIdCommandInput | GetFilePresignedDownloadUrlCommandInput | GetInboxCommandInput | GetMessageCommandInput | GetOrCreateDirectChannelCommandInput | GetOrCreateSmsChannelCommandInput | GetOrCreateTelephonyChannelCommandInput | GetOrCreateWhatsAppChannelCommandInput | GetSmsChannelIdCommandInput | GetTelephonyChannelIdCommandInput | GetTokenCommandInput | GetUploadedFileInfoCommandInput | GetWhatsAppChannelIdCommandInput | HideChannelCommandInput | JoinChannelCommandInput | LeaveChannelCommandInput | ListChannelMembersCommandInput | ListChannelMembersReadStatusCommandInput | ListChannelsCommandInput | ListMentionsCommandInput | ListMessagesCommandInput | MarkReadCommandInput | MarkUnreadCommandInput | MoveChannelToSectionCommandInput | MuteChannelCommandInput | PartialUpdateChannelCommandInput | PartialUpdateMessageCommandInput | PinChannelCommandInput | PinMessageCommandInput | QueryChannelsCommandInput | RemoveChannelFromSectionCommandInput | RenameSectionCommandInput | SendGiphyCommandInput | SendMessageCommandInput | SendMessageReactionCommandInput | SendSystemMessageCommandInput | SendTypingStartCommandInput | SendTypingStopCommandInput | ShowChannelCommandInput | UnmuteChannelCommandInput | UnpinChannelCommandInput | UnpinMessageCommandInput | UpdateChannelCommandInput | UpdateMessageCommandInput | UploadFileCommandInput;
|
|
72
|
+
export type ServiceInputTypes = AddChannelMemberCommandInput | AddChannelMembersCommandInput | AssignChannelCommandInput | CreateGroupChannelCommandInput | CreateKiteChannelCommandInput | CreateSectionCommandInput | DeleteChannelCommandInput | DeleteChannelMemberCommandInput | DeleteMessageCommandInput | DeleteMessageReactionCommandInput | DeleteSectionCommandInput | GetChannelCommandInput | GetChannelMemberCommandInput | GetDirectChannelIdCommandInput | GetFilePresignedDownloadUrlCommandInput | GetInboxCommandInput | GetMessageCommandInput | GetOrCreateDirectChannelCommandInput | GetOrCreateSmsChannelCommandInput | GetOrCreateTelephonyChannelCommandInput | GetOrCreateWhatsAppChannelCommandInput | GetSmsChannelIdCommandInput | GetTelephonyChannelIdCommandInput | GetTokenCommandInput | GetUploadedFileInfoCommandInput | GetWhatsAppChannelIdCommandInput | HideChannelCommandInput | JoinChannelCommandInput | LeaveChannelCommandInput | ListChannelMembersCommandInput | ListChannelMembersReadStatusCommandInput | ListChannelsCommandInput | ListMentionsCommandInput | ListMessagesCommandInput | MarkReadCommandInput | MarkUnreadCommandInput | MoveChannelToSectionCommandInput | MuteChannelCommandInput | PartialUpdateChannelCommandInput | PartialUpdateMessageCommandInput | PinChannelCommandInput | PinMessageCommandInput | QueryChannelsCommandInput | RemoveChannelFromSectionCommandInput | RenameSectionCommandInput | SearchChannelsCommandInput | SearchMessagesCommandInput | SendGiphyCommandInput | SendMessageCommandInput | SendMessageReactionCommandInput | SendSystemMessageCommandInput | SendTypingStartCommandInput | SendTypingStopCommandInput | ShowChannelCommandInput | UnmuteChannelCommandInput | UnpinChannelCommandInput | UnpinMessageCommandInput | UpdateChannelCommandInput | UpdateMessageCommandInput | UploadFileCommandInput;
|
|
71
73
|
/**
|
|
72
74
|
* @public
|
|
73
75
|
*/
|
|
74
|
-
export type ServiceOutputTypes = AddChannelMemberCommandOutput | AddChannelMembersCommandOutput | AssignChannelCommandOutput | CreateGroupChannelCommandOutput | CreateKiteChannelCommandOutput | CreateSectionCommandOutput | DeleteChannelCommandOutput | DeleteChannelMemberCommandOutput | DeleteMessageCommandOutput | DeleteMessageReactionCommandOutput | DeleteSectionCommandOutput | GetChannelCommandOutput | GetChannelMemberCommandOutput | GetDirectChannelIdCommandOutput | GetFilePresignedDownloadUrlCommandOutput | GetInboxCommandOutput | GetMessageCommandOutput | GetOrCreateDirectChannelCommandOutput | GetOrCreateSmsChannelCommandOutput | GetOrCreateTelephonyChannelCommandOutput | GetOrCreateWhatsAppChannelCommandOutput | GetSmsChannelIdCommandOutput | GetTelephonyChannelIdCommandOutput | GetTokenCommandOutput | GetUploadedFileInfoCommandOutput | GetWhatsAppChannelIdCommandOutput | HideChannelCommandOutput | JoinChannelCommandOutput | LeaveChannelCommandOutput | ListChannelMembersCommandOutput | ListChannelMembersReadStatusCommandOutput | ListChannelsCommandOutput | ListMentionsCommandOutput | ListMessagesCommandOutput | MarkReadCommandOutput | MarkUnreadCommandOutput | MoveChannelToSectionCommandOutput | MuteChannelCommandOutput | PartialUpdateChannelCommandOutput | PartialUpdateMessageCommandOutput | PinChannelCommandOutput | PinMessageCommandOutput | QueryChannelsCommandOutput | RemoveChannelFromSectionCommandOutput | RenameSectionCommandOutput | SendGiphyCommandOutput | SendMessageCommandOutput | SendMessageReactionCommandOutput | SendSystemMessageCommandOutput | SendTypingStartCommandOutput | SendTypingStopCommandOutput | ShowChannelCommandOutput | UnmuteChannelCommandOutput | UnpinChannelCommandOutput | UnpinMessageCommandOutput | UpdateChannelCommandOutput | UpdateMessageCommandOutput | UploadFileCommandOutput;
|
|
76
|
+
export type ServiceOutputTypes = AddChannelMemberCommandOutput | AddChannelMembersCommandOutput | AssignChannelCommandOutput | CreateGroupChannelCommandOutput | CreateKiteChannelCommandOutput | CreateSectionCommandOutput | DeleteChannelCommandOutput | DeleteChannelMemberCommandOutput | DeleteMessageCommandOutput | DeleteMessageReactionCommandOutput | DeleteSectionCommandOutput | GetChannelCommandOutput | GetChannelMemberCommandOutput | GetDirectChannelIdCommandOutput | GetFilePresignedDownloadUrlCommandOutput | GetInboxCommandOutput | GetMessageCommandOutput | GetOrCreateDirectChannelCommandOutput | GetOrCreateSmsChannelCommandOutput | GetOrCreateTelephonyChannelCommandOutput | GetOrCreateWhatsAppChannelCommandOutput | GetSmsChannelIdCommandOutput | GetTelephonyChannelIdCommandOutput | GetTokenCommandOutput | GetUploadedFileInfoCommandOutput | GetWhatsAppChannelIdCommandOutput | HideChannelCommandOutput | JoinChannelCommandOutput | LeaveChannelCommandOutput | ListChannelMembersCommandOutput | ListChannelMembersReadStatusCommandOutput | ListChannelsCommandOutput | ListMentionsCommandOutput | ListMessagesCommandOutput | MarkReadCommandOutput | MarkUnreadCommandOutput | MoveChannelToSectionCommandOutput | MuteChannelCommandOutput | PartialUpdateChannelCommandOutput | PartialUpdateMessageCommandOutput | PinChannelCommandOutput | PinMessageCommandOutput | QueryChannelsCommandOutput | RemoveChannelFromSectionCommandOutput | RenameSectionCommandOutput | SearchChannelsCommandOutput | SearchMessagesCommandOutput | SendGiphyCommandOutput | SendMessageCommandOutput | SendMessageReactionCommandOutput | SendSystemMessageCommandOutput | SendTypingStartCommandOutput | SendTypingStopCommandOutput | ShowChannelCommandOutput | UnmuteChannelCommandOutput | UnpinChannelCommandOutput | UnpinMessageCommandOutput | UpdateChannelCommandOutput | UpdateMessageCommandOutput | UploadFileCommandOutput;
|
|
75
77
|
/**
|
|
76
78
|
* @public
|
|
77
79
|
*/
|
|
@@ -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
|
+
}
|
|
@@ -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";
|
|
@@ -3336,6 +3336,150 @@ export interface RenameSectionOutput {
|
|
|
3336
3336
|
*/
|
|
3337
3337
|
section: Section;
|
|
3338
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
|
+
}
|
|
3339
3483
|
/**
|
|
3340
3484
|
* @public
|
|
3341
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",
|