@wildix/stream-client 0.0.14 → 0.0.15
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/models/models_0.js +7 -1
- package/dist-cjs/protocols/Aws_restJson1.js +13 -2
- package/dist-es/models/models_0.js +6 -0
- package/dist-es/protocols/Aws_restJson1.js +13 -2
- package/dist-types/StreamService.d.ts +2 -0
- package/dist-types/commands/SearchChannelsCommand.d.ts +5 -2
- package/dist-types/commands/SearchMessagesCommand.d.ts +9 -2
- package/dist-types/models/models_0.d.ts +61 -17
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
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.AttachmentType = 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";
|
|
@@ -153,6 +153,12 @@ exports.AssignChannelVariant = {
|
|
|
153
153
|
SELECTED: "SELECTED",
|
|
154
154
|
SKIP: "SKIP",
|
|
155
155
|
};
|
|
156
|
+
exports.AttachmentType = {
|
|
157
|
+
AUDIO: "audio",
|
|
158
|
+
FILE: "file",
|
|
159
|
+
IMAGE: "image",
|
|
160
|
+
VIDEO: "video",
|
|
161
|
+
};
|
|
156
162
|
exports.ChannelAccess = {
|
|
157
163
|
PRIVATE: "private",
|
|
158
164
|
PUBLIC: "public",
|
|
@@ -963,9 +963,12 @@ const se_SearchChannelsCommand = async (input, context) => {
|
|
|
963
963
|
const query = (0, smithy_client_1.map)({
|
|
964
964
|
[_c]: [, input[_cI]],
|
|
965
965
|
[_uI]: [, input[_uI]],
|
|
966
|
-
[_q]: [,
|
|
966
|
+
[_q]: [, input[_q]],
|
|
967
|
+
[_mI]: [, input[_mI]],
|
|
968
|
+
[_cT]: [, input[_cT]],
|
|
967
969
|
[_si]: [() => input.size !== void 0, () => (input[_si].toString())],
|
|
968
970
|
[_cu]: [, input[_cu]],
|
|
971
|
+
[_so]: [, input[_so]],
|
|
969
972
|
});
|
|
970
973
|
let body;
|
|
971
974
|
b.m("GET")
|
|
@@ -982,8 +985,11 @@ const se_SearchMessagesCommand = async (input, context) => {
|
|
|
982
985
|
const query = (0, smithy_client_1.map)({
|
|
983
986
|
[_c]: [, input[_cI]],
|
|
984
987
|
[_uI]: [, input[_uI]],
|
|
985
|
-
[_q]: [,
|
|
988
|
+
[_q]: [, input[_q]],
|
|
986
989
|
[_cIh]: [, input[_cIh]],
|
|
990
|
+
[_hA]: [() => input.hasAttachments !== void 0, () => (input[_hA].toString())],
|
|
991
|
+
[_aT]: [() => input.attachmentTypes !== void 0, () => ((input[_aT] || []))],
|
|
992
|
+
[_mT]: [() => input.mimeTypes !== void 0, () => ((input[_mT] || []))],
|
|
987
993
|
[_si]: [() => input.size !== void 0, () => (input[_si].toString())],
|
|
988
994
|
[_cu]: [, input[_cu]],
|
|
989
995
|
[_so]: [, input[_so]],
|
|
@@ -2434,17 +2440,22 @@ const deserializeMetadata = (output) => ({
|
|
|
2434
2440
|
cfId: output.headers["x-amz-cf-id"],
|
|
2435
2441
|
});
|
|
2436
2442
|
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
|
|
2443
|
+
const _aT = "attachmentTypes";
|
|
2437
2444
|
const _c = "company";
|
|
2438
2445
|
const _cI = "companyId";
|
|
2439
2446
|
const _cIh = "channelId";
|
|
2440
2447
|
const _cIl = "clientId";
|
|
2448
|
+
const _cT = "channelType";
|
|
2441
2449
|
const _ca = "category";
|
|
2442
2450
|
const _cu = "cursor";
|
|
2443
2451
|
const _d = "download";
|
|
2444
2452
|
const _f = "filter";
|
|
2445
2453
|
const _fo = "force";
|
|
2446
2454
|
const _fr = "from";
|
|
2455
|
+
const _hA = "hasAttachments";
|
|
2447
2456
|
const _l = "limit";
|
|
2457
|
+
const _mI = "memberId";
|
|
2458
|
+
const _mT = "mimeTypes";
|
|
2448
2459
|
const _o = "offset";
|
|
2449
2460
|
const _q = "q";
|
|
2450
2461
|
const _rA = "retryAfter";
|
|
@@ -143,6 +143,12 @@ export const AssignChannelVariant = {
|
|
|
143
143
|
SELECTED: "SELECTED",
|
|
144
144
|
SKIP: "SKIP",
|
|
145
145
|
};
|
|
146
|
+
export const AttachmentType = {
|
|
147
|
+
AUDIO: "audio",
|
|
148
|
+
FILE: "file",
|
|
149
|
+
IMAGE: "image",
|
|
150
|
+
VIDEO: "video",
|
|
151
|
+
};
|
|
146
152
|
export const ChannelAccess = {
|
|
147
153
|
PRIVATE: "private",
|
|
148
154
|
PUBLIC: "public",
|
|
@@ -913,9 +913,12 @@ export const se_SearchChannelsCommand = async (input, context) => {
|
|
|
913
913
|
const query = map({
|
|
914
914
|
[_c]: [, input[_cI]],
|
|
915
915
|
[_uI]: [, input[_uI]],
|
|
916
|
-
[_q]: [,
|
|
916
|
+
[_q]: [, input[_q]],
|
|
917
|
+
[_mI]: [, input[_mI]],
|
|
918
|
+
[_cT]: [, input[_cT]],
|
|
917
919
|
[_si]: [() => input.size !== void 0, () => (input[_si].toString())],
|
|
918
920
|
[_cu]: [, input[_cu]],
|
|
921
|
+
[_so]: [, input[_so]],
|
|
919
922
|
});
|
|
920
923
|
let body;
|
|
921
924
|
b.m("GET")
|
|
@@ -931,8 +934,11 @@ export const se_SearchMessagesCommand = async (input, context) => {
|
|
|
931
934
|
const query = map({
|
|
932
935
|
[_c]: [, input[_cI]],
|
|
933
936
|
[_uI]: [, input[_uI]],
|
|
934
|
-
[_q]: [,
|
|
937
|
+
[_q]: [, input[_q]],
|
|
935
938
|
[_cIh]: [, input[_cIh]],
|
|
939
|
+
[_hA]: [() => input.hasAttachments !== void 0, () => (input[_hA].toString())],
|
|
940
|
+
[_aT]: [() => input.attachmentTypes !== void 0, () => ((input[_aT] || []))],
|
|
941
|
+
[_mT]: [() => input.mimeTypes !== void 0, () => ((input[_mT] || []))],
|
|
936
942
|
[_si]: [() => input.size !== void 0, () => (input[_si].toString())],
|
|
937
943
|
[_cu]: [, input[_cu]],
|
|
938
944
|
[_so]: [, input[_so]],
|
|
@@ -2309,17 +2315,22 @@ const deserializeMetadata = (output) => ({
|
|
|
2309
2315
|
cfId: output.headers["x-amz-cf-id"],
|
|
2310
2316
|
});
|
|
2311
2317
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
|
|
2318
|
+
const _aT = "attachmentTypes";
|
|
2312
2319
|
const _c = "company";
|
|
2313
2320
|
const _cI = "companyId";
|
|
2314
2321
|
const _cIh = "channelId";
|
|
2315
2322
|
const _cIl = "clientId";
|
|
2323
|
+
const _cT = "channelType";
|
|
2316
2324
|
const _ca = "category";
|
|
2317
2325
|
const _cu = "cursor";
|
|
2318
2326
|
const _d = "download";
|
|
2319
2327
|
const _f = "filter";
|
|
2320
2328
|
const _fo = "force";
|
|
2321
2329
|
const _fr = "from";
|
|
2330
|
+
const _hA = "hasAttachments";
|
|
2322
2331
|
const _l = "limit";
|
|
2332
|
+
const _mI = "memberId";
|
|
2333
|
+
const _mT = "mimeTypes";
|
|
2323
2334
|
const _o = "offset";
|
|
2324
2335
|
const _q = "q";
|
|
2325
2336
|
const _rA = "retryAfter";
|
|
@@ -341,12 +341,14 @@ export interface StreamService {
|
|
|
341
341
|
/**
|
|
342
342
|
* @see {@link SearchChannelsCommand}
|
|
343
343
|
*/
|
|
344
|
+
searchChannels(): Promise<SearchChannelsCommandOutput>;
|
|
344
345
|
searchChannels(args: SearchChannelsCommandInput, options?: __HttpHandlerOptions): Promise<SearchChannelsCommandOutput>;
|
|
345
346
|
searchChannels(args: SearchChannelsCommandInput, cb: (err: any, data?: SearchChannelsCommandOutput) => void): void;
|
|
346
347
|
searchChannels(args: SearchChannelsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchChannelsCommandOutput) => void): void;
|
|
347
348
|
/**
|
|
348
349
|
* @see {@link SearchMessagesCommand}
|
|
349
350
|
*/
|
|
351
|
+
searchMessages(): Promise<SearchMessagesCommandOutput>;
|
|
350
352
|
searchMessages(args: SearchMessagesCommandInput, options?: __HttpHandlerOptions): Promise<SearchMessagesCommandOutput>;
|
|
351
353
|
searchMessages(args: SearchMessagesCommandInput, cb: (err: any, data?: SearchMessagesCommandOutput) => void): void;
|
|
352
354
|
searchMessages(args: SearchMessagesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchMessagesCommandOutput) => void): void;
|
|
@@ -23,7 +23,7 @@ export interface SearchChannelsCommandOutput extends SearchChannelsOutput, __Met
|
|
|
23
23
|
}
|
|
24
24
|
declare const SearchChannelsCommand_base: {
|
|
25
25
|
new (input: SearchChannelsCommandInput): import("@smithy/smithy-client").CommandImpl<SearchChannelsCommandInput, SearchChannelsCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
-
new (
|
|
26
|
+
new (...[input]: [] | [SearchChannelsCommandInput]): import("@smithy/smithy-client").CommandImpl<SearchChannelsCommandInput, SearchChannelsCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
@@ -37,9 +37,12 @@ declare const SearchChannelsCommand_base: {
|
|
|
37
37
|
* const input = { // SearchChannelsInput
|
|
38
38
|
* companyId: "STRING_VALUE",
|
|
39
39
|
* userId: "STRING_VALUE",
|
|
40
|
-
* q: "STRING_VALUE",
|
|
40
|
+
* q: "STRING_VALUE",
|
|
41
|
+
* memberId: "STRING_VALUE",
|
|
42
|
+
* channelType: "direct" || "group",
|
|
41
43
|
* size: Number("int"),
|
|
42
44
|
* cursor: "STRING_VALUE",
|
|
45
|
+
* sort: "relevance" || "recency" || "recency_asc",
|
|
43
46
|
* };
|
|
44
47
|
* const command = new SearchChannelsCommand(input);
|
|
45
48
|
* const response = await client.send(command);
|
|
@@ -23,7 +23,7 @@ export interface SearchMessagesCommandOutput extends SearchMessagesOutput, __Met
|
|
|
23
23
|
}
|
|
24
24
|
declare const SearchMessagesCommand_base: {
|
|
25
25
|
new (input: SearchMessagesCommandInput): import("@smithy/smithy-client").CommandImpl<SearchMessagesCommandInput, SearchMessagesCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
-
new (
|
|
26
|
+
new (...[input]: [] | [SearchMessagesCommandInput]): import("@smithy/smithy-client").CommandImpl<SearchMessagesCommandInput, SearchMessagesCommandOutput, StreamServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
@@ -37,8 +37,15 @@ declare const SearchMessagesCommand_base: {
|
|
|
37
37
|
* const input = { // SearchMessagesInput
|
|
38
38
|
* companyId: "STRING_VALUE",
|
|
39
39
|
* userId: "STRING_VALUE",
|
|
40
|
-
* q: "STRING_VALUE",
|
|
40
|
+
* q: "STRING_VALUE",
|
|
41
41
|
* channelId: "STRING_VALUE",
|
|
42
|
+
* hasAttachments: true || false,
|
|
43
|
+
* attachmentTypes: [ // AttachmentTypeList
|
|
44
|
+
* "image" || "video" || "audio" || "file",
|
|
45
|
+
* ],
|
|
46
|
+
* mimeTypes: [ // MimeTypeList
|
|
47
|
+
* "STRING_VALUE",
|
|
48
|
+
* ],
|
|
42
49
|
* size: Number("int"),
|
|
43
50
|
* cursor: "STRING_VALUE",
|
|
44
51
|
* sort: "relevance" || "recency" || "recency_asc",
|
|
@@ -441,6 +441,20 @@ export interface AssignChannelOutput {
|
|
|
441
441
|
assigneeId?: string | undefined;
|
|
442
442
|
serviceUri?: string | undefined;
|
|
443
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
* @public
|
|
446
|
+
* @enum
|
|
447
|
+
*/
|
|
448
|
+
export declare const AttachmentType: {
|
|
449
|
+
readonly AUDIO: "audio";
|
|
450
|
+
readonly FILE: "file";
|
|
451
|
+
readonly IMAGE: "image";
|
|
452
|
+
readonly VIDEO: "video";
|
|
453
|
+
};
|
|
454
|
+
/**
|
|
455
|
+
* @public
|
|
456
|
+
*/
|
|
457
|
+
export type AttachmentType = typeof AttachmentType[keyof typeof AttachmentType];
|
|
444
458
|
/**
|
|
445
459
|
* @public
|
|
446
460
|
* @enum
|
|
@@ -3352,6 +3366,19 @@ export interface SearchChannelHit {
|
|
|
3352
3366
|
*/
|
|
3353
3367
|
highlights?: (string)[] | undefined;
|
|
3354
3368
|
}
|
|
3369
|
+
/**
|
|
3370
|
+
* @public
|
|
3371
|
+
* @enum
|
|
3372
|
+
*/
|
|
3373
|
+
export declare const SearchSort: {
|
|
3374
|
+
readonly RECENCY: "recency";
|
|
3375
|
+
readonly RECENCY_ASC: "recency_asc";
|
|
3376
|
+
readonly RELEVANCE: "relevance";
|
|
3377
|
+
};
|
|
3378
|
+
/**
|
|
3379
|
+
* @public
|
|
3380
|
+
*/
|
|
3381
|
+
export type SearchSort = typeof SearchSort[keyof typeof SearchSort];
|
|
3355
3382
|
/**
|
|
3356
3383
|
* @public
|
|
3357
3384
|
*/
|
|
@@ -3367,10 +3394,20 @@ export interface SearchChannelsInput {
|
|
|
3367
3394
|
*/
|
|
3368
3395
|
userId?: string | undefined;
|
|
3369
3396
|
/**
|
|
3370
|
-
* Search text.
|
|
3397
|
+
* Search text. Optional when `memberId` is provided (then lists shared channels).
|
|
3398
|
+
* @public
|
|
3399
|
+
*/
|
|
3400
|
+
q?: string | undefined;
|
|
3401
|
+
/**
|
|
3402
|
+
* Restrict to channels that also contain this member. Combined with the caller, returns channels both users belong to.
|
|
3403
|
+
* @public
|
|
3404
|
+
*/
|
|
3405
|
+
memberId?: string | undefined;
|
|
3406
|
+
/**
|
|
3407
|
+
* Restrict results to this channel type.
|
|
3371
3408
|
* @public
|
|
3372
3409
|
*/
|
|
3373
|
-
|
|
3410
|
+
channelType?: ChannelType | undefined;
|
|
3374
3411
|
/**
|
|
3375
3412
|
* Page size. Default 20, max 50.
|
|
3376
3413
|
* @public
|
|
@@ -3381,6 +3418,11 @@ export interface SearchChannelsInput {
|
|
|
3381
3418
|
* @public
|
|
3382
3419
|
*/
|
|
3383
3420
|
cursor?: string | undefined;
|
|
3421
|
+
/**
|
|
3422
|
+
* Result ordering. `relevance` (default with `q`) or `recency` (newest activity first, default without `q`).
|
|
3423
|
+
* @public
|
|
3424
|
+
*/
|
|
3425
|
+
sort?: SearchSort | undefined;
|
|
3384
3426
|
}
|
|
3385
3427
|
/**
|
|
3386
3428
|
* @public
|
|
@@ -3413,19 +3455,6 @@ export interface SearchMessageHit {
|
|
|
3413
3455
|
*/
|
|
3414
3456
|
highlights?: (string)[] | undefined;
|
|
3415
3457
|
}
|
|
3416
|
-
/**
|
|
3417
|
-
* @public
|
|
3418
|
-
* @enum
|
|
3419
|
-
*/
|
|
3420
|
-
export declare const SearchSort: {
|
|
3421
|
-
readonly RECENCY: "recency";
|
|
3422
|
-
readonly RECENCY_ASC: "recency_asc";
|
|
3423
|
-
readonly RELEVANCE: "relevance";
|
|
3424
|
-
};
|
|
3425
|
-
/**
|
|
3426
|
-
* @public
|
|
3427
|
-
*/
|
|
3428
|
-
export type SearchSort = typeof SearchSort[keyof typeof SearchSort];
|
|
3429
3458
|
/**
|
|
3430
3459
|
* @public
|
|
3431
3460
|
*/
|
|
@@ -3441,15 +3470,30 @@ export interface SearchMessagesInput {
|
|
|
3441
3470
|
*/
|
|
3442
3471
|
userId?: string | undefined;
|
|
3443
3472
|
/**
|
|
3444
|
-
* Search text.
|
|
3473
|
+
* Search text. Optional when an attachment filter (`hasAttachments`/`attachmentTypes`/`mimeTypes`) is provided.
|
|
3445
3474
|
* @public
|
|
3446
3475
|
*/
|
|
3447
|
-
q
|
|
3476
|
+
q?: string | undefined;
|
|
3448
3477
|
/**
|
|
3449
3478
|
* When set, restricts the search to this channel (in-channel search).
|
|
3450
3479
|
* @public
|
|
3451
3480
|
*/
|
|
3452
3481
|
channelId?: string | undefined;
|
|
3482
|
+
/**
|
|
3483
|
+
* When true, matches only messages that have at least one attachment.
|
|
3484
|
+
* @public
|
|
3485
|
+
*/
|
|
3486
|
+
hasAttachments?: boolean | undefined;
|
|
3487
|
+
/**
|
|
3488
|
+
* Restrict to attachments of these coarse categories. `file` means any non-image/video/audio attachment.
|
|
3489
|
+
* @public
|
|
3490
|
+
*/
|
|
3491
|
+
attachmentTypes?: (AttachmentType)[] | undefined;
|
|
3492
|
+
/**
|
|
3493
|
+
* Restrict to attachments whose MIME type is one of these exact values.
|
|
3494
|
+
* @public
|
|
3495
|
+
*/
|
|
3496
|
+
mimeTypes?: (string)[] | undefined;
|
|
3453
3497
|
/**
|
|
3454
3498
|
* Page size. Default 20, max 50.
|
|
3455
3499
|
* @public
|
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.15",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -80,4 +80,4 @@
|
|
|
80
80
|
"react-native": {
|
|
81
81
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
82
82
|
}
|
|
83
|
-
}
|
|
83
|
+
}
|