@wildix/stream-client 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist-cjs/StreamService.js +4 -0
  2. package/dist-cjs/commands/SearchChannelsCommand.js +21 -0
  3. package/dist-cjs/commands/SearchMessagesCommand.js +21 -0
  4. package/dist-cjs/commands/index.js +2 -0
  5. package/dist-cjs/models/models_0.js +6 -1
  6. package/dist-cjs/protocols/Aws_restJson1.js +80 -3
  7. package/dist-es/StreamService.js +4 -0
  8. package/dist-es/commands/SearchChannelsCommand.js +17 -0
  9. package/dist-es/commands/SearchMessagesCommand.js +17 -0
  10. package/dist-es/commands/index.js +2 -0
  11. package/dist-es/models/models_0.js +5 -0
  12. package/dist-es/protocols/Aws_restJson1.js +74 -1
  13. package/dist-types/StreamService.d.ts +14 -0
  14. package/dist-types/StreamServiceClient.d.ts +4 -2
  15. package/dist-types/commands/AddChannelMemberCommand.d.ts +1 -3
  16. package/dist-types/commands/AddChannelMembersCommand.d.ts +1 -3
  17. package/dist-types/commands/AssignChannelCommand.d.ts +1 -3
  18. package/dist-types/commands/CreateGroupChannelCommand.d.ts +1 -4
  19. package/dist-types/commands/CreateKiteChannelCommand.d.ts +1 -4
  20. package/dist-types/commands/CreateSectionCommand.d.ts +1 -3
  21. package/dist-types/commands/DeleteChannelCommand.d.ts +1 -3
  22. package/dist-types/commands/DeleteChannelMemberCommand.d.ts +1 -3
  23. package/dist-types/commands/DeleteMessageCommand.d.ts +1 -3
  24. package/dist-types/commands/DeleteMessageReactionCommand.d.ts +1 -3
  25. package/dist-types/commands/DeleteSectionCommand.d.ts +1 -3
  26. package/dist-types/commands/GetChannelCommand.d.ts +1 -4
  27. package/dist-types/commands/GetChannelMemberCommand.d.ts +1 -3
  28. package/dist-types/commands/GetDirectChannelIdCommand.d.ts +1 -3
  29. package/dist-types/commands/GetFilePresignedDownloadUrlCommand.d.ts +1 -3
  30. package/dist-types/commands/GetInboxCommand.d.ts +1 -4
  31. package/dist-types/commands/GetMessageCommand.d.ts +1 -3
  32. package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +1 -4
  33. package/dist-types/commands/GetOrCreateSmsChannelCommand.d.ts +1 -4
  34. package/dist-types/commands/GetOrCreateTelephonyChannelCommand.d.ts +1 -4
  35. package/dist-types/commands/GetOrCreateWhatsAppChannelCommand.d.ts +1 -4
  36. package/dist-types/commands/GetSmsChannelIdCommand.d.ts +1 -3
  37. package/dist-types/commands/GetTelephonyChannelIdCommand.d.ts +1 -3
  38. package/dist-types/commands/GetTokenCommand.d.ts +1 -3
  39. package/dist-types/commands/GetUploadedFileInfoCommand.d.ts +1 -3
  40. package/dist-types/commands/GetWhatsAppChannelIdCommand.d.ts +1 -3
  41. package/dist-types/commands/HideChannelCommand.d.ts +1 -3
  42. package/dist-types/commands/JoinChannelCommand.d.ts +1 -4
  43. package/dist-types/commands/LeaveChannelCommand.d.ts +1 -3
  44. package/dist-types/commands/ListChannelMembersCommand.d.ts +1 -3
  45. package/dist-types/commands/ListChannelMembersReadStatusCommand.d.ts +1 -3
  46. package/dist-types/commands/ListChannelsCommand.d.ts +1 -4
  47. package/dist-types/commands/ListMentionsCommand.d.ts +1 -3
  48. package/dist-types/commands/ListMessagesCommand.d.ts +1 -3
  49. package/dist-types/commands/MarkReadCommand.d.ts +1 -3
  50. package/dist-types/commands/MarkUnreadCommand.d.ts +1 -3
  51. package/dist-types/commands/MoveChannelToSectionCommand.d.ts +1 -3
  52. package/dist-types/commands/MuteChannelCommand.d.ts +1 -3
  53. package/dist-types/commands/PartialUpdateChannelCommand.d.ts +1 -4
  54. package/dist-types/commands/PartialUpdateMessageCommand.d.ts +1 -3
  55. package/dist-types/commands/PinChannelCommand.d.ts +1 -3
  56. package/dist-types/commands/PinMessageCommand.d.ts +1 -3
  57. package/dist-types/commands/QueryChannelsCommand.d.ts +1 -4
  58. package/dist-types/commands/RemoveChannelFromSectionCommand.d.ts +1 -3
  59. package/dist-types/commands/RenameSectionCommand.d.ts +1 -3
  60. package/dist-types/commands/SearchChannelsCommand.d.ts +159 -0
  61. package/dist-types/commands/SearchMessagesCommand.d.ts +204 -0
  62. package/dist-types/commands/SendGiphyCommand.d.ts +1 -3
  63. package/dist-types/commands/SendMessageCommand.d.ts +1 -3
  64. package/dist-types/commands/SendMessageReactionCommand.d.ts +1 -3
  65. package/dist-types/commands/SendSystemMessageCommand.d.ts +1 -3
  66. package/dist-types/commands/SendTypingStartCommand.d.ts +1 -3
  67. package/dist-types/commands/SendTypingStopCommand.d.ts +1 -3
  68. package/dist-types/commands/ShowChannelCommand.d.ts +1 -3
  69. package/dist-types/commands/UnmuteChannelCommand.d.ts +1 -3
  70. package/dist-types/commands/UnpinChannelCommand.d.ts +1 -3
  71. package/dist-types/commands/UnpinMessageCommand.d.ts +1 -3
  72. package/dist-types/commands/UpdateChannelCommand.d.ts +1 -4
  73. package/dist-types/commands/UpdateMessageCommand.d.ts +1 -3
  74. package/dist-types/commands/UploadFileCommand.d.ts +1 -3
  75. package/dist-types/commands/index.d.ts +2 -0
  76. package/dist-types/models/models_0.d.ts +145 -5
  77. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  78. package/dist-types/runtimeConfig.browser.d.ts +1 -3
  79. package/dist-types/runtimeConfig.d.ts +1 -3
  80. package/dist-types/runtimeConfig.native.d.ts +1 -3
  81. package/package.json +2 -2
@@ -562,11 +562,6 @@ export interface LastMessagePreview {
562
562
  * @public
563
563
  */
564
564
  text?: string | undefined;
565
- /**
566
- * System event identifier for client rendering.
567
- * @public
568
- */
569
- event?: string | undefined;
570
565
  /**
571
566
  * Creation timestamp of the message.
572
567
  * @public
@@ -3341,6 +3336,151 @@ export interface RenameSectionOutput {
3341
3336
  */
3342
3337
  section: Section;
3343
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 RECENCY_ASC: "recency_asc";
3418
+ readonly RELEVANCE: "relevance";
3419
+ };
3420
+ /**
3421
+ * @public
3422
+ */
3423
+ export type SearchSort = typeof SearchSort[keyof typeof SearchSort];
3424
+ /**
3425
+ * @public
3426
+ */
3427
+ export interface SearchMessagesInput {
3428
+ /**
3429
+ * The unique identifier of the tenant when a service token is used.
3430
+ * @public
3431
+ */
3432
+ companyId?: string | undefined;
3433
+ /**
3434
+ * The unique identifier of the user when a service or PBX token is used.
3435
+ * @public
3436
+ */
3437
+ userId?: string | undefined;
3438
+ /**
3439
+ * Search text.
3440
+ * @public
3441
+ */
3442
+ q: string;
3443
+ /**
3444
+ * When set, restricts the search to this channel (in-channel search).
3445
+ * @public
3446
+ */
3447
+ channelId?: string | undefined;
3448
+ /**
3449
+ * Page size. Default 20, max 50.
3450
+ * @public
3451
+ */
3452
+ size?: number | undefined;
3453
+ /**
3454
+ * Opaque continuation token from the previous response.
3455
+ * @public
3456
+ */
3457
+ cursor?: string | undefined;
3458
+ /**
3459
+ * Result ordering. `relevance` (default), `recency` (newest first), or `recency_asc` (oldest first).
3460
+ * @public
3461
+ */
3462
+ sort?: SearchSort | undefined;
3463
+ }
3464
+ /**
3465
+ * @public
3466
+ */
3467
+ export interface SearchMessagesOutput {
3468
+ /**
3469
+ * Matching messages, access-filtered and ordered by the requested sort.
3470
+ * @public
3471
+ */
3472
+ results: (SearchMessageHit)[];
3473
+ /**
3474
+ * Total OpenSearch hit count before the visibility post-filter; approximate.
3475
+ * @public
3476
+ */
3477
+ totalCount?: number | undefined;
3478
+ /**
3479
+ * Cursor for the next page. Absent when there are no more pages.
3480
+ * @public
3481
+ */
3482
+ nextCursor?: string | undefined;
3483
+ }
3344
3484
  /**
3345
3485
  * @public
3346
3486
  */
@@ -43,6 +43,8 @@ import { PinMessageCommandInput, PinMessageCommandOutput } from "../commands/Pin
43
43
  import { QueryChannelsCommandInput, QueryChannelsCommandOutput } from "../commands/QueryChannelsCommand";
44
44
  import { RemoveChannelFromSectionCommandInput, RemoveChannelFromSectionCommandOutput } from "../commands/RemoveChannelFromSectionCommand";
45
45
  import { RenameSectionCommandInput, RenameSectionCommandOutput } from "../commands/RenameSectionCommand";
46
+ import { SearchChannelsCommandInput, SearchChannelsCommandOutput } from "../commands/SearchChannelsCommand";
47
+ import { SearchMessagesCommandInput, SearchMessagesCommandOutput } from "../commands/SearchMessagesCommand";
46
48
  import { SendGiphyCommandInput, SendGiphyCommandOutput } from "../commands/SendGiphyCommand";
47
49
  import { SendMessageCommandInput, SendMessageCommandOutput } from "../commands/SendMessageCommand";
48
50
  import { SendMessageReactionCommandInput, SendMessageReactionCommandOutput } from "../commands/SendMessageReactionCommand";
@@ -238,6 +240,14 @@ export declare const se_RemoveChannelFromSectionCommand: (input: RemoveChannelFr
238
240
  * serializeAws_restJson1RenameSectionCommand
239
241
  */
240
242
  export declare const se_RenameSectionCommand: (input: RenameSectionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
243
+ /**
244
+ * serializeAws_restJson1SearchChannelsCommand
245
+ */
246
+ export declare const se_SearchChannelsCommand: (input: SearchChannelsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
247
+ /**
248
+ * serializeAws_restJson1SearchMessagesCommand
249
+ */
250
+ export declare const se_SearchMessagesCommand: (input: SearchMessagesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
241
251
  /**
242
252
  * serializeAws_restJson1SendGiphyCommand
243
253
  */
@@ -470,6 +480,14 @@ export declare const de_RemoveChannelFromSectionCommand: (output: __HttpResponse
470
480
  * deserializeAws_restJson1RenameSectionCommand
471
481
  */
472
482
  export declare const de_RenameSectionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RenameSectionCommandOutput>;
483
+ /**
484
+ * deserializeAws_restJson1SearchChannelsCommand
485
+ */
486
+ export declare const de_SearchChannelsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SearchChannelsCommandOutput>;
487
+ /**
488
+ * deserializeAws_restJson1SearchMessagesCommand
489
+ */
490
+ export declare const de_SearchMessagesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SearchMessagesCommandOutput>;
473
491
  /**
474
492
  * deserializeAws_restJson1SendGiphyCommand
475
493
  */
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler";
4
2
  import { StreamServiceClientConfig } from "./StreamServiceClient";
5
3
  /**
@@ -14,7 +12,7 @@ export declare const getRuntimeConfig: (config: StreamServiceClientConfig) => {
14
12
  requestHandler: import("@smithy/protocol-http").HttpHandler<any> | RequestHandler;
15
13
  retryMode: string | import("@smithy/types").Provider<string>;
16
14
  sha256: import("@smithy/types").HashConstructor;
17
- streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream<any> | ReadableStream<any> | Blob) => Promise<Uint8Array>;
15
+ streamCollector: import("@smithy/types").StreamCollector;
18
16
  serviceRegion?: "eu-1" | "us-1" | undefined;
19
17
  env?: "stage" | "stable" | "prod" | undefined;
20
18
  token: import("@wildix/smithy-utils").TokenProvider;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler";
4
2
  import { StreamServiceClientConfig } from "./StreamServiceClient";
5
3
  /**
@@ -14,7 +12,7 @@ export declare const getRuntimeConfig: (config: StreamServiceClientConfig) => {
14
12
  requestHandler: RequestHandler | import("@smithy/protocol-http").HttpHandler<any>;
15
13
  retryMode: string | import("@smithy/types").Provider<string>;
16
14
  sha256: import("@smithy/types").HashConstructor;
17
- streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream<any> | ReadableStream<any> | Blob) => Promise<Uint8Array>;
15
+ streamCollector: import("@smithy/types").StreamCollector;
18
16
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
19
17
  serviceRegion?: "eu-1" | "us-1" | undefined;
20
18
  env?: "stage" | "stable" | "prod" | undefined;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { StreamServiceClientConfig } from "./StreamServiceClient";
4
2
  /**
5
3
  * @internal
@@ -21,7 +19,7 @@ export declare const getRuntimeConfig: (config: StreamServiceClientConfig) => {
21
19
  apiVersion: string;
22
20
  urlParser: import("@smithy/types").UrlParser;
23
21
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
24
- streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream<any> | ReadableStream<any> | Blob) => Promise<Uint8Array>;
22
+ streamCollector: import("@smithy/types").StreamCollector;
25
23
  base64Decoder: import("@smithy/types").Decoder;
26
24
  base64Encoder: (_input: string | Uint8Array) => string;
27
25
  utf8Decoder: import("@smithy/types").Decoder;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/stream-client",
3
3
  "description": "@wildix/stream-client client",
4
- "version": "0.0.12",
4
+ "version": "0.0.13",
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
+ }