@wildix/stream-client 0.0.1

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 (79) hide show
  1. package/dist-cjs/StreamService.js +35 -0
  2. package/dist-cjs/StreamServiceClient.js +42 -0
  3. package/dist-cjs/commands/AddReactionCommand.js +21 -0
  4. package/dist-cjs/commands/DeleteMessageCommand.js +21 -0
  5. package/dist-cjs/commands/EditMessageCommand.js +21 -0
  6. package/dist-cjs/commands/GetInboxCommand.js +21 -0
  7. package/dist-cjs/commands/GetMessageCommand.js +21 -0
  8. package/dist-cjs/commands/ListChannelsCommand.js +21 -0
  9. package/dist-cjs/commands/ListMentionsCommand.js +21 -0
  10. package/dist-cjs/commands/ListMessagesCommand.js +21 -0
  11. package/dist-cjs/commands/PinMessageCommand.js +21 -0
  12. package/dist-cjs/commands/RemoveReactionCommand.js +21 -0
  13. package/dist-cjs/commands/SendMessageCommand.js +21 -0
  14. package/dist-cjs/commands/UnpinMessageCommand.js +21 -0
  15. package/dist-cjs/commands/index.js +15 -0
  16. package/dist-cjs/extensionConfiguration.js +2 -0
  17. package/dist-cjs/index.js +10 -0
  18. package/dist-cjs/models/StreamServiceServiceException.js +12 -0
  19. package/dist-cjs/models/index.js +4 -0
  20. package/dist-cjs/models/models_0.js +123 -0
  21. package/dist-cjs/protocols/Aws_restJson1.js +579 -0
  22. package/dist-cjs/runtimeConfig.browser.js +32 -0
  23. package/dist-cjs/runtimeConfig.js +37 -0
  24. package/dist-cjs/runtimeConfig.native.js +15 -0
  25. package/dist-cjs/runtimeConfig.shared.js +21 -0
  26. package/dist-cjs/runtimeExtensions.js +11 -0
  27. package/dist-es/StreamService.js +31 -0
  28. package/dist-es/StreamServiceClient.js +38 -0
  29. package/dist-es/commands/AddReactionCommand.js +17 -0
  30. package/dist-es/commands/DeleteMessageCommand.js +17 -0
  31. package/dist-es/commands/EditMessageCommand.js +17 -0
  32. package/dist-es/commands/GetInboxCommand.js +17 -0
  33. package/dist-es/commands/GetMessageCommand.js +17 -0
  34. package/dist-es/commands/ListChannelsCommand.js +17 -0
  35. package/dist-es/commands/ListMentionsCommand.js +17 -0
  36. package/dist-es/commands/ListMessagesCommand.js +17 -0
  37. package/dist-es/commands/PinMessageCommand.js +17 -0
  38. package/dist-es/commands/RemoveReactionCommand.js +17 -0
  39. package/dist-es/commands/SendMessageCommand.js +17 -0
  40. package/dist-es/commands/UnpinMessageCommand.js +17 -0
  41. package/dist-es/commands/index.js +12 -0
  42. package/dist-es/extensionConfiguration.js +1 -0
  43. package/dist-es/index.js +5 -0
  44. package/dist-es/models/StreamServiceServiceException.js +8 -0
  45. package/dist-es/models/index.js +1 -0
  46. package/dist-es/models/models_0.js +113 -0
  47. package/dist-es/protocols/Aws_restJson1.js +552 -0
  48. package/dist-es/runtimeConfig.browser.js +27 -0
  49. package/dist-es/runtimeConfig.js +32 -0
  50. package/dist-es/runtimeConfig.native.js +11 -0
  51. package/dist-es/runtimeConfig.shared.js +17 -0
  52. package/dist-es/runtimeExtensions.js +7 -0
  53. package/dist-types/StreamService.d.ts +96 -0
  54. package/dist-types/StreamServiceClient.d.ts +157 -0
  55. package/dist-types/commands/AddReactionCommand.d.ts +137 -0
  56. package/dist-types/commands/DeleteMessageCommand.d.ts +87 -0
  57. package/dist-types/commands/EditMessageCommand.d.ts +151 -0
  58. package/dist-types/commands/GetInboxCommand.d.ts +129 -0
  59. package/dist-types/commands/GetMessageCommand.d.ts +136 -0
  60. package/dist-types/commands/ListChannelsCommand.d.ts +119 -0
  61. package/dist-types/commands/ListMentionsCommand.d.ts +153 -0
  62. package/dist-types/commands/ListMessagesCommand.d.ts +137 -0
  63. package/dist-types/commands/PinMessageCommand.d.ts +136 -0
  64. package/dist-types/commands/RemoveReactionCommand.d.ts +137 -0
  65. package/dist-types/commands/SendMessageCommand.d.ts +160 -0
  66. package/dist-types/commands/UnpinMessageCommand.d.ts +136 -0
  67. package/dist-types/commands/index.d.ts +12 -0
  68. package/dist-types/extensionConfiguration.d.ts +7 -0
  69. package/dist-types/index.d.ts +7 -0
  70. package/dist-types/models/StreamServiceServiceException.d.ts +14 -0
  71. package/dist-types/models/index.d.ts +1 -0
  72. package/dist-types/models/models_0.d.ts +1113 -0
  73. package/dist-types/protocols/Aws_restJson1.d.ts +110 -0
  74. package/dist-types/runtimeConfig.browser.d.ts +38 -0
  75. package/dist-types/runtimeConfig.d.ts +38 -0
  76. package/dist-types/runtimeConfig.native.d.ts +37 -0
  77. package/dist-types/runtimeConfig.shared.d.ts +15 -0
  78. package/dist-types/runtimeExtensions.d.ts +17 -0
  79. package/package.json +83 -0
@@ -0,0 +1,1113 @@
1
+ import { StreamServiceServiceException as __BaseException } from "./StreamServiceServiceException";
2
+ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
3
+ /**
4
+ * @public
5
+ */
6
+ export declare class ForbiddenException extends __BaseException {
7
+ readonly name: "ForbiddenException";
8
+ readonly $fault: "client";
9
+ /**
10
+ * @internal
11
+ */
12
+ constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
13
+ }
14
+ /**
15
+ * @public
16
+ */
17
+ export declare class InternalServerError extends __BaseException {
18
+ readonly name: "InternalServerError";
19
+ readonly $fault: "server";
20
+ /**
21
+ * @internal
22
+ */
23
+ constructor(opts: __ExceptionOptionType<InternalServerError, __BaseException>);
24
+ }
25
+ /**
26
+ * @public
27
+ */
28
+ export declare class RateLimitExceededException extends __BaseException {
29
+ readonly name: "RateLimitExceededException";
30
+ readonly $fault: "client";
31
+ /**
32
+ * Displays the applicable rate limits for the current request.
33
+ * @public
34
+ */
35
+ rateLimit?: string | undefined;
36
+ /**
37
+ * Indicates how many requests a user can still make within the current time window.
38
+ * @public
39
+ */
40
+ rateLimitRemaining?: number | undefined;
41
+ /**
42
+ * Shows the time in seconds until the rate limit resets.
43
+ * @public
44
+ */
45
+ rateLimitReset?: number | undefined;
46
+ /**
47
+ * Displays how many seconds the user agent should wait before making a follow-up request.
48
+ * @public
49
+ */
50
+ retryAfter?: number | undefined;
51
+ /**
52
+ * @internal
53
+ */
54
+ constructor(opts: __ExceptionOptionType<RateLimitExceededException, __BaseException>);
55
+ }
56
+ /**
57
+ * @public
58
+ */
59
+ export declare class UnauthorizedException extends __BaseException {
60
+ readonly name: "UnauthorizedException";
61
+ readonly $fault: "client";
62
+ /**
63
+ * @internal
64
+ */
65
+ constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
66
+ }
67
+ /**
68
+ * @public
69
+ */
70
+ export declare class ValidationException extends __BaseException {
71
+ readonly name: "ValidationException";
72
+ readonly $fault: "client";
73
+ /**
74
+ * @internal
75
+ */
76
+ constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
77
+ }
78
+ /**
79
+ * @public
80
+ */
81
+ export interface AddReactionInput {
82
+ /**
83
+ * The unique identifier of the tenant when a service token is used.
84
+ * @public
85
+ */
86
+ companyId?: string | undefined;
87
+ /**
88
+ * The unique identifier of the user when a service or PBX token is used.
89
+ * @public
90
+ */
91
+ userId?: string | undefined;
92
+ channelId: string;
93
+ messageId: string;
94
+ /**
95
+ * Reaction key. Free-form lowercase identifier (e.g. `thumbsup`, `heart`).
96
+ * @public
97
+ */
98
+ type: string;
99
+ }
100
+ /**
101
+ * File attached to a message as returned by listing and lookup endpoints.
102
+ * @public
103
+ */
104
+ export interface MessageAttachment {
105
+ /**
106
+ * Identifier of the stored file in the file service. Returned by the upload flow and referenced verbatim on the message row.
107
+ * @public
108
+ */
109
+ fsId: string;
110
+ /**
111
+ * MIME type.
112
+ * @public
113
+ */
114
+ mime?: string | undefined;
115
+ /**
116
+ * Original file name.
117
+ * @public
118
+ */
119
+ name: string;
120
+ /**
121
+ * File size in bytes.
122
+ * @public
123
+ */
124
+ size: number;
125
+ /**
126
+ * Image or video width in pixels.
127
+ * @public
128
+ */
129
+ width?: number | undefined;
130
+ /**
131
+ * Image or video height in pixels.
132
+ * @public
133
+ */
134
+ height?: number | undefined;
135
+ /**
136
+ * Thumbnail URL when available.
137
+ * @public
138
+ */
139
+ thumbnail?: string | undefined;
140
+ /**
141
+ * Attachment identifier within the message.
142
+ * @public
143
+ */
144
+ id: string;
145
+ }
146
+ /**
147
+ * Reference to the original forwarded message.
148
+ * @public
149
+ */
150
+ export interface MessageForward {
151
+ channelId: string;
152
+ messageId: string;
153
+ /**
154
+ * Author of the original message.
155
+ * @public
156
+ */
157
+ userId: string;
158
+ /**
159
+ * Creation timestamp of the original message.
160
+ * @public
161
+ */
162
+ forwardedAt: string;
163
+ }
164
+ /**
165
+ * @public
166
+ * @enum
167
+ */
168
+ export declare const MessageType: {
169
+ readonly REGULAR: "regular";
170
+ readonly SYSTEM: "system";
171
+ };
172
+ /**
173
+ * @public
174
+ */
175
+ export type MessageType = typeof MessageType[keyof typeof MessageType];
176
+ /**
177
+ * Reference to a quoted message.
178
+ * @public
179
+ */
180
+ export interface MessageQuote {
181
+ channelId: string;
182
+ messageId: string;
183
+ /**
184
+ * Author of the quoted message.
185
+ * @public
186
+ */
187
+ userId: string;
188
+ /**
189
+ * Text body captured at quote time.
190
+ * @public
191
+ */
192
+ text?: string | undefined;
193
+ /**
194
+ * ISO-8601 UTC timestamp with millisecond precision (e.g. `2026-05-07T05:35:00.000Z`).
195
+ * @public
196
+ */
197
+ createdAt: string;
198
+ }
199
+ /**
200
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
201
+ * @public
202
+ */
203
+ export interface Message {
204
+ messageId: string;
205
+ /**
206
+ * Author of the message.
207
+ * @public
208
+ */
209
+ userId: string;
210
+ /**
211
+ * Type of message row.
212
+ * @public
213
+ */
214
+ messageType: MessageType;
215
+ /**
216
+ * Text body. Empty for attachment-only or deleted messages.
217
+ * @public
218
+ */
219
+ text?: string | undefined;
220
+ /**
221
+ * Attached files.
222
+ * @public
223
+ */
224
+ attachments: (MessageAttachment)[];
225
+ /**
226
+ * Users directly mentioned in the message.
227
+ * @public
228
+ */
229
+ mentions: (string)[];
230
+ /**
231
+ * Quoted message reference.
232
+ * @public
233
+ */
234
+ quote?: MessageQuote | undefined;
235
+ /**
236
+ * Forwarded message reference.
237
+ * @public
238
+ */
239
+ forward?: MessageForward | undefined;
240
+ /**
241
+ * Per-emoji reaction counters. Keys are reaction type ids (e.g. `thumbsup`).
242
+ * @public
243
+ */
244
+ reactionCounts: Record<string, number>;
245
+ /**
246
+ * True when the message is currently pinned at channel scope.
247
+ * @public
248
+ */
249
+ pinned: boolean;
250
+ /**
251
+ * Timestamp at which the message was pinned. Absent when not pinned.
252
+ * @public
253
+ */
254
+ pinnedAt?: string | undefined;
255
+ /**
256
+ * User that pinned the message. Absent when not pinned.
257
+ * @public
258
+ */
259
+ pinnedBy?: string | undefined;
260
+ /**
261
+ * True when the message is system-generated.
262
+ * @public
263
+ */
264
+ system: boolean;
265
+ /**
266
+ * Monotonic per-channel sequence covering every channel mutation. Used to page the channel timeline.
267
+ * @public
268
+ */
269
+ timelineSeq: number;
270
+ /**
271
+ * Monotonic per-channel sequence covering only visible messages. Used for unread counts and read pointers.
272
+ * @public
273
+ */
274
+ visibleSeq: number;
275
+ /**
276
+ * Channel version. Increments on every channel mutation.
277
+ * @public
278
+ */
279
+ channelVersion: number;
280
+ /**
281
+ * Message version. Increments on every message mutation.
282
+ * @public
283
+ */
284
+ messageVersion: number;
285
+ /**
286
+ * ISO-8601 UTC timestamp with millisecond precision (e.g. `2026-05-07T05:35:00.000Z`).
287
+ * @public
288
+ */
289
+ createdAt: string;
290
+ /**
291
+ * Timestamp of the most recent edit.
292
+ * @public
293
+ */
294
+ editedAt?: string | undefined;
295
+ /**
296
+ * Tombstone timestamp.
297
+ * @public
298
+ */
299
+ deletedAt?: string | undefined;
300
+ }
301
+ /**
302
+ * @public
303
+ */
304
+ export interface AddReactionOutput {
305
+ /**
306
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
307
+ * @public
308
+ */
309
+ message: Message;
310
+ }
311
+ /**
312
+ * @public
313
+ */
314
+ export declare class ChannelNotFoundException extends __BaseException {
315
+ readonly name: "ChannelNotFoundException";
316
+ readonly $fault: "client";
317
+ /**
318
+ * @internal
319
+ */
320
+ constructor(opts: __ExceptionOptionType<ChannelNotFoundException, __BaseException>);
321
+ }
322
+ /**
323
+ * @public
324
+ */
325
+ export declare class MessageNotFoundException extends __BaseException {
326
+ readonly name: "MessageNotFoundException";
327
+ readonly $fault: "client";
328
+ /**
329
+ * @internal
330
+ */
331
+ constructor(opts: __ExceptionOptionType<MessageNotFoundException, __BaseException>);
332
+ }
333
+ /**
334
+ * @public
335
+ * @enum
336
+ */
337
+ export declare const ChannelsFilter: {
338
+ /**
339
+ * Archived (hidden) channels.
340
+ */
341
+ readonly ARCHIVED: "archived";
342
+ /**
343
+ * Non-archived channels with at least one unread message.
344
+ */
345
+ readonly UNREAD: "unread";
346
+ };
347
+ /**
348
+ * @public
349
+ */
350
+ export type ChannelsFilter = typeof ChannelsFilter[keyof typeof ChannelsFilter];
351
+ /**
352
+ * @public
353
+ * @enum
354
+ */
355
+ export declare const ChannelType: {
356
+ readonly DIRECT: "direct";
357
+ readonly EXTERNAL: "external";
358
+ readonly GROUP: "group";
359
+ };
360
+ /**
361
+ * @public
362
+ */
363
+ export type ChannelType = typeof ChannelType[keyof typeof ChannelType];
364
+ /**
365
+ * @public
366
+ */
367
+ export interface DeleteMessageInput {
368
+ /**
369
+ * The unique identifier of the tenant when a service token is used.
370
+ * @public
371
+ */
372
+ companyId?: string | undefined;
373
+ /**
374
+ * The unique identifier of the user when a service or PBX token is used.
375
+ * @public
376
+ */
377
+ userId?: string | undefined;
378
+ channelId: string;
379
+ messageId: string;
380
+ }
381
+ /**
382
+ * @public
383
+ */
384
+ export interface DeleteMessageOutput {
385
+ }
386
+ /**
387
+ * Attachment record supplied by the client when sending or editing a message. The server assigns the attachment `id` after persistence.
388
+ * @public
389
+ */
390
+ export interface MessageAttachmentRequest {
391
+ /**
392
+ * Identifier of the stored file in the file service. Returned by the upload flow and referenced verbatim on the message row.
393
+ * @public
394
+ */
395
+ fsId: string;
396
+ /**
397
+ * MIME type.
398
+ * @public
399
+ */
400
+ mime?: string | undefined;
401
+ /**
402
+ * Original file name.
403
+ * @public
404
+ */
405
+ name: string;
406
+ /**
407
+ * File size in bytes.
408
+ * @public
409
+ */
410
+ size: number;
411
+ /**
412
+ * Image or video width in pixels.
413
+ * @public
414
+ */
415
+ width?: number | undefined;
416
+ /**
417
+ * Image or video height in pixels.
418
+ * @public
419
+ */
420
+ height?: number | undefined;
421
+ /**
422
+ * Thumbnail URL when available.
423
+ * @public
424
+ */
425
+ thumbnail?: string | undefined;
426
+ }
427
+ /**
428
+ * @public
429
+ */
430
+ export interface EditMessageInput {
431
+ /**
432
+ * The unique identifier of the tenant when a service token is used.
433
+ * @public
434
+ */
435
+ companyId?: string | undefined;
436
+ /**
437
+ * The unique identifier of the user when a service or PBX token is used.
438
+ * @public
439
+ */
440
+ userId?: string | undefined;
441
+ channelId: string;
442
+ messageId: string;
443
+ /**
444
+ * New text body. Server rejects payloads that would empty both `text` and `attachments`.
445
+ * @public
446
+ */
447
+ text?: string | undefined;
448
+ /**
449
+ * New attachment list. Replaces the previous list when provided.
450
+ * @public
451
+ */
452
+ attachments?: (MessageAttachmentRequest)[] | undefined;
453
+ /**
454
+ * New mention list. Replaces the previous list when provided. Edits never advance unread counters.
455
+ * @public
456
+ */
457
+ mentions?: (string)[] | undefined;
458
+ }
459
+ /**
460
+ * @public
461
+ */
462
+ export interface EditMessageOutput {
463
+ /**
464
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
465
+ * @public
466
+ */
467
+ message: Message;
468
+ }
469
+ /**
470
+ * @public
471
+ */
472
+ export interface GetInboxInput {
473
+ /**
474
+ * The unique identifier of the tenant when a service token is used.
475
+ * @public
476
+ */
477
+ companyId?: string | undefined;
478
+ /**
479
+ * The unique identifier of the user when a service or PBX token is used.
480
+ * @public
481
+ */
482
+ userId?: string | undefined;
483
+ }
484
+ /**
485
+ * Per-user inbox state for a channel: mute and hide flags, unread counters, and read pointers.
486
+ * @public
487
+ */
488
+ export interface InboxState {
489
+ /**
490
+ * Sections that include this channel.
491
+ * @public
492
+ */
493
+ sectionIds: (string)[];
494
+ /**
495
+ * Number of unread visible messages.
496
+ * @public
497
+ */
498
+ unreadCount: number;
499
+ /**
500
+ * Number of unread mentions of the current user.
501
+ * @public
502
+ */
503
+ mentionUnreadCount: number;
504
+ /**
505
+ * Highest `visibleSeq` the user has read in this channel.
506
+ * @public
507
+ */
508
+ lastReadVisibleSeq?: number | undefined;
509
+ /**
510
+ * Timestamp of the most recent read event.
511
+ * @public
512
+ */
513
+ lastReadAt?: string | undefined;
514
+ /**
515
+ * True when the channel is hidden (archived).
516
+ * @public
517
+ */
518
+ hidden: boolean;
519
+ /**
520
+ * True when the channel is muted.
521
+ * @public
522
+ */
523
+ muted: boolean;
524
+ /**
525
+ * Expiry timestamp for a temporary mute.
526
+ * @public
527
+ */
528
+ mutedUntil?: string | undefined;
529
+ /**
530
+ * `visibleSeq` from which the user manually marked the channel as unread.
531
+ * @public
532
+ */
533
+ unreadMarkAt?: number | undefined;
534
+ }
535
+ /**
536
+ * Preview of the most recent visible message in a channel.
537
+ * @public
538
+ */
539
+ export interface LastMessagePreview {
540
+ messageId: string;
541
+ /**
542
+ * Author of the message.
543
+ * @public
544
+ */
545
+ userId: string;
546
+ /**
547
+ * Text body of the message. Absent for attachment-only or deleted messages.
548
+ * @public
549
+ */
550
+ text?: string | undefined;
551
+ /**
552
+ * Creation timestamp of the message.
553
+ * @public
554
+ */
555
+ createdAt: string;
556
+ }
557
+ /**
558
+ * Channel item returned by inbox and channel listings. Includes per-user inbox state and last-message preview.
559
+ * @public
560
+ */
561
+ export interface InboxChannel {
562
+ channelId: string;
563
+ /**
564
+ * Type of channel.
565
+ * @public
566
+ */
567
+ channelType: ChannelType;
568
+ /**
569
+ * Channel subject.
570
+ * @public
571
+ */
572
+ subject?: string | undefined;
573
+ /**
574
+ * Channel picture URL.
575
+ * @public
576
+ */
577
+ picture?: string | undefined;
578
+ /**
579
+ * Current number of members.
580
+ * @public
581
+ */
582
+ memberCount: number;
583
+ /**
584
+ * Channel creation timestamp.
585
+ * @public
586
+ */
587
+ createdAt: string;
588
+ /**
589
+ * User that created the channel.
590
+ * @public
591
+ */
592
+ createdBy: string;
593
+ /**
594
+ * Timestamp of the last channel mutation.
595
+ * @public
596
+ */
597
+ updatedAt: string;
598
+ /**
599
+ * Channel version. Increments on every channel mutation.
600
+ * @public
601
+ */
602
+ channelVersion: number;
603
+ /**
604
+ * Timestamp of the last activity. Drives inbox ordering.
605
+ * @public
606
+ */
607
+ lastActivityAt: string;
608
+ /**
609
+ * Last visible message preview. Absent for empty channels.
610
+ * @public
611
+ */
612
+ lastMessage?: LastMessagePreview | undefined;
613
+ /**
614
+ * Per-user inbox state for a channel: mute and hide flags, unread counters, and read pointers.
615
+ * @public
616
+ */
617
+ inbox: InboxState;
618
+ }
619
+ /**
620
+ * @public
621
+ * @enum
622
+ */
623
+ export declare const SectionType: {
624
+ /**
625
+ * Custom section created by the user.
626
+ */
627
+ readonly CUSTOM: "custom";
628
+ /**
629
+ * System section maintained by the backend.
630
+ */
631
+ readonly SYSTEM: "system";
632
+ };
633
+ /**
634
+ * @public
635
+ */
636
+ export type SectionType = typeof SectionType[keyof typeof SectionType];
637
+ /**
638
+ * Aggregated unread counters for an inbox section.
639
+ * @public
640
+ */
641
+ export interface SectionUnreadCounters {
642
+ /**
643
+ * Unmuted channels with at least one unread message.
644
+ * @public
645
+ */
646
+ unmutedUnreadChannelCount: number;
647
+ /**
648
+ * Total unread messages across unmuted channels.
649
+ * @public
650
+ */
651
+ unmutedUnreadMessageCount: number;
652
+ /**
653
+ * Total unread messages across muted channels.
654
+ * @public
655
+ */
656
+ mutedUnreadMessageCount: number;
657
+ /**
658
+ * Unread direct mentions of the current user.
659
+ * @public
660
+ */
661
+ unreadMentionCount: number;
662
+ }
663
+ /**
664
+ * Inbox section with metadata, channel count, and unread counters.
665
+ * @public
666
+ */
667
+ export interface Section {
668
+ /**
669
+ * Identifier of an inbox section. System ids: `all`, `direct`, `group`, `external`, `mentions`. Custom ids are user-defined.
670
+ * @public
671
+ */
672
+ sectionId: string;
673
+ /**
674
+ * Display name of the section.
675
+ * @public
676
+ */
677
+ name: string;
678
+ /**
679
+ * Whether the section is system-managed or user-defined.
680
+ * @public
681
+ */
682
+ type: SectionType;
683
+ /**
684
+ * Total channels assigned to this section.
685
+ * @public
686
+ */
687
+ channelCount: number;
688
+ /**
689
+ * Aggregated unread counters for an inbox section.
690
+ * @public
691
+ */
692
+ unread: SectionUnreadCounters;
693
+ }
694
+ /**
695
+ * @public
696
+ */
697
+ export interface GetInboxOutput {
698
+ /**
699
+ * Recent channels with per-user state and last-message preview.
700
+ * @public
701
+ */
702
+ channels: (InboxChannel)[];
703
+ /**
704
+ * Inbox sections with channel counts and unread counters.
705
+ * @public
706
+ */
707
+ sections: (Section)[];
708
+ }
709
+ /**
710
+ * @public
711
+ */
712
+ export interface GetMessageInput {
713
+ /**
714
+ * The unique identifier of the tenant when a service token is used.
715
+ * @public
716
+ */
717
+ companyId?: string | undefined;
718
+ /**
719
+ * The unique identifier of the user when a service or PBX token is used.
720
+ * @public
721
+ */
722
+ userId?: string | undefined;
723
+ channelId: string;
724
+ messageId: string;
725
+ }
726
+ /**
727
+ * @public
728
+ */
729
+ export interface GetMessageOutput {
730
+ /**
731
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
732
+ * @public
733
+ */
734
+ message: Message;
735
+ }
736
+ /**
737
+ * @public
738
+ */
739
+ export interface ListChannelsInput {
740
+ /**
741
+ * The unique identifier of the tenant when a service token is used.
742
+ * @public
743
+ */
744
+ companyId?: string | undefined;
745
+ /**
746
+ * The unique identifier of the user when a service or PBX token is used.
747
+ * @public
748
+ */
749
+ userId?: string | undefined;
750
+ /**
751
+ * Section to list. Defaults to `all`.
752
+ * @public
753
+ */
754
+ section?: string | undefined;
755
+ /**
756
+ * Optional refinement applied on top of the section.
757
+ * @public
758
+ */
759
+ filter?: ChannelsFilter | undefined;
760
+ /**
761
+ * Opaque continuation token from the previous response.
762
+ * @public
763
+ */
764
+ cursor?: string | undefined;
765
+ }
766
+ /**
767
+ * @public
768
+ */
769
+ export interface ListChannelsOutput {
770
+ /**
771
+ * Ordered page of channels for the requested section.
772
+ * @public
773
+ */
774
+ channels: (InboxChannel)[];
775
+ /**
776
+ * Cursor for the next page. Absent when there are no more pages.
777
+ * @public
778
+ */
779
+ nextCursor?: string | undefined;
780
+ }
781
+ /**
782
+ * @public
783
+ * @enum
784
+ */
785
+ export declare const MentionsFilter: {
786
+ /**
787
+ * Unread mentions only.
788
+ */
789
+ readonly UNREAD: "unread";
790
+ };
791
+ /**
792
+ * @public
793
+ */
794
+ export type MentionsFilter = typeof MentionsFilter[keyof typeof MentionsFilter];
795
+ /**
796
+ * @public
797
+ */
798
+ export interface ListMentionsInput {
799
+ /**
800
+ * The unique identifier of the tenant when a service token is used.
801
+ * @public
802
+ */
803
+ companyId?: string | undefined;
804
+ /**
805
+ * The unique identifier of the user when a service or PBX token is used.
806
+ * @public
807
+ */
808
+ userId?: string | undefined;
809
+ /**
810
+ * Optional refinement.
811
+ * @public
812
+ */
813
+ filter?: MentionsFilter | undefined;
814
+ /**
815
+ * Opaque continuation token from the previous response.
816
+ * @public
817
+ */
818
+ cursor?: string | undefined;
819
+ }
820
+ /**
821
+ * Compact channel preview returned alongside a mention entry.
822
+ * @public
823
+ */
824
+ export interface MentionChannelPreview {
825
+ channelId: string;
826
+ /**
827
+ * Type of channel.
828
+ * @public
829
+ */
830
+ channelType: ChannelType;
831
+ /**
832
+ * Channel subject.
833
+ * @public
834
+ */
835
+ subject?: string | undefined;
836
+ /**
837
+ * Channel picture URL.
838
+ * @public
839
+ */
840
+ picture?: string | undefined;
841
+ /**
842
+ * Current number of members.
843
+ * @public
844
+ */
845
+ memberCount: number;
846
+ /**
847
+ * Channel version. Increments on every channel mutation.
848
+ * @public
849
+ */
850
+ channelVersion: number;
851
+ /**
852
+ * ISO-8601 UTC timestamp with millisecond precision (e.g. `2026-05-07T05:35:00.000Z`).
853
+ * @public
854
+ */
855
+ lastActivityAt: string;
856
+ }
857
+ /**
858
+ * Mention entry. Identifies a message that mentioned the current user, with the user's read state and an embedded copy of the message and its channel.
859
+ * @public
860
+ */
861
+ export interface MentionEntry {
862
+ channelId: string;
863
+ messageId: string;
864
+ /**
865
+ * Monotonic per-channel sequence covering every channel mutation. Used to page the channel timeline.
866
+ * @public
867
+ */
868
+ timelineSeq: number;
869
+ /**
870
+ * Monotonic per-channel sequence covering only visible messages. Used for unread counts and read pointers.
871
+ * @public
872
+ */
873
+ visibleSeq?: number | undefined;
874
+ /**
875
+ * Timestamp at which the mention was recorded.
876
+ * @public
877
+ */
878
+ mentionAddedAt: string;
879
+ /**
880
+ * True when the user has read this mention.
881
+ * @public
882
+ */
883
+ read: boolean;
884
+ /**
885
+ * Timestamp at which the mention was read.
886
+ * @public
887
+ */
888
+ readAt?: string | undefined;
889
+ /**
890
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
891
+ * @public
892
+ */
893
+ message: Message;
894
+ /**
895
+ * Compact channel preview returned alongside a mention entry.
896
+ * @public
897
+ */
898
+ channel: MentionChannelPreview;
899
+ }
900
+ /**
901
+ * @public
902
+ */
903
+ export interface ListMentionsOutput {
904
+ /**
905
+ * Mentions ordered by most recent `mentionAddedAt` first.
906
+ * @public
907
+ */
908
+ mentions: (MentionEntry)[];
909
+ /**
910
+ * Cursor for the next page. Absent when there are no more pages.
911
+ * @public
912
+ */
913
+ nextCursor?: string | undefined;
914
+ }
915
+ /**
916
+ * @public
917
+ */
918
+ export interface ListMessagesInput {
919
+ /**
920
+ * The unique identifier of the tenant when a service token is used.
921
+ * @public
922
+ */
923
+ companyId?: string | undefined;
924
+ /**
925
+ * The unique identifier of the user when a service or PBX token is used.
926
+ * @public
927
+ */
928
+ userId?: string | undefined;
929
+ channelId: string;
930
+ /**
931
+ * Optional inclusive lower bound on `timelineSeq`. Combine with `to` for a bounded window, or use alone to scroll forward from a known anchor.
932
+ * @public
933
+ */
934
+ from?: number | undefined;
935
+ /**
936
+ * Optional inclusive upper bound on `timelineSeq`. Combine with `from` for a bounded window, or use alone to scroll back from a known anchor.
937
+ * @public
938
+ */
939
+ to?: number | undefined;
940
+ }
941
+ /**
942
+ * @public
943
+ */
944
+ export interface ListMessagesOutput {
945
+ /**
946
+ * Messages ordered newest-first by `timelineSeq`.
947
+ * @public
948
+ */
949
+ messages: (Message)[];
950
+ }
951
+ /**
952
+ * Forward reference supplied by the client. The server resolves the original author and snapshot fields at write time.
953
+ * @public
954
+ */
955
+ export interface MessageForwardRef {
956
+ channelId: string;
957
+ messageId: string;
958
+ }
959
+ /**
960
+ * Quote reference supplied by the client. The server resolves the author and snapshot fields at write time.
961
+ * @public
962
+ */
963
+ export interface MessageQuoteRef {
964
+ channelId: string;
965
+ messageId: string;
966
+ }
967
+ /**
968
+ * @public
969
+ */
970
+ export interface PinMessageInput {
971
+ /**
972
+ * The unique identifier of the tenant when a service token is used.
973
+ * @public
974
+ */
975
+ companyId?: string | undefined;
976
+ /**
977
+ * The unique identifier of the user when a service or PBX token is used.
978
+ * @public
979
+ */
980
+ userId?: string | undefined;
981
+ channelId: string;
982
+ messageId: string;
983
+ }
984
+ /**
985
+ * @public
986
+ */
987
+ export interface PinMessageOutput {
988
+ /**
989
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
990
+ * @public
991
+ */
992
+ message: Message;
993
+ }
994
+ /**
995
+ * @public
996
+ */
997
+ export interface RemoveReactionInput {
998
+ /**
999
+ * The unique identifier of the tenant when a service token is used.
1000
+ * @public
1001
+ */
1002
+ companyId?: string | undefined;
1003
+ /**
1004
+ * The unique identifier of the user when a service or PBX token is used.
1005
+ * @public
1006
+ */
1007
+ userId?: string | undefined;
1008
+ channelId: string;
1009
+ messageId: string;
1010
+ /**
1011
+ * Reaction key. Free-form lowercase identifier (e.g. `thumbsup`, `heart`).
1012
+ * @public
1013
+ */
1014
+ type: string;
1015
+ }
1016
+ /**
1017
+ * @public
1018
+ */
1019
+ export interface RemoveReactionOutput {
1020
+ /**
1021
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
1022
+ * @public
1023
+ */
1024
+ message: Message;
1025
+ }
1026
+ /**
1027
+ * @public
1028
+ */
1029
+ export interface SendMessageInput {
1030
+ /**
1031
+ * The unique identifier of the tenant when a service token is used.
1032
+ * @public
1033
+ */
1034
+ companyId?: string | undefined;
1035
+ /**
1036
+ * The unique identifier of the user when a service or PBX token is used.
1037
+ * @public
1038
+ */
1039
+ userId?: string | undefined;
1040
+ channelId: string;
1041
+ /**
1042
+ * Rendering hint for the message.
1043
+ * @public
1044
+ */
1045
+ messageType?: MessageType | undefined;
1046
+ /**
1047
+ * Text body. Required unless `attachments` is non-empty.
1048
+ * @public
1049
+ */
1050
+ text?: string | undefined;
1051
+ /**
1052
+ * Pre-uploaded file references. Required unless `text` is provided.
1053
+ * @public
1054
+ */
1055
+ attachments?: (MessageAttachmentRequest)[] | undefined;
1056
+ /**
1057
+ * Direct `@user` ids. `@all`, `@here`, and `@channel` are not supported.
1058
+ * @public
1059
+ */
1060
+ mentions?: (string)[] | undefined;
1061
+ /**
1062
+ * Reply context referencing a quoted message.
1063
+ * @public
1064
+ */
1065
+ quote?: MessageQuoteRef | undefined;
1066
+ /**
1067
+ * Source reference for a forwarded message.
1068
+ * @public
1069
+ */
1070
+ forward?: MessageForwardRef | undefined;
1071
+ /**
1072
+ * Backend / S2S only flag. User requests carrying `system: true` are rejected.
1073
+ * @public
1074
+ */
1075
+ system?: boolean | undefined;
1076
+ }
1077
+ /**
1078
+ * @public
1079
+ */
1080
+ export interface SendMessageOutput {
1081
+ /**
1082
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
1083
+ * @public
1084
+ */
1085
+ message: Message;
1086
+ }
1087
+ /**
1088
+ * @public
1089
+ */
1090
+ export interface UnpinMessageInput {
1091
+ /**
1092
+ * The unique identifier of the tenant when a service token is used.
1093
+ * @public
1094
+ */
1095
+ companyId?: string | undefined;
1096
+ /**
1097
+ * The unique identifier of the user when a service or PBX token is used.
1098
+ * @public
1099
+ */
1100
+ userId?: string | undefined;
1101
+ channelId: string;
1102
+ messageId: string;
1103
+ }
1104
+ /**
1105
+ * @public
1106
+ */
1107
+ export interface UnpinMessageOutput {
1108
+ /**
1109
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
1110
+ * @public
1111
+ */
1112
+ message: Message;
1113
+ }