@wildix/stream-client 4.0.4 → 4.0.6

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SearchSort = exports.MessageUnsetFields = exports.MentionsFilter = exports.GroupChannelUnsetOptions = exports.FileCategory = exports.DownloadStrategy = exports.SectionType = exports.TargetNotEligibleReason = exports.MessageWhatsAppStatus = exports.MessageSmsStatus = exports.GroupChannelCreationEventType = exports.ChannelsFilter = exports.ChannelWhatsAppStatus = exports.MessageType = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelType = exports.ChannelAccess = exports.AttachmentType = exports.AssignChannelVariant = exports.ChannelMemberRole = exports.ButtonVariant = void 0;
3
+ exports.SearchSort = exports.MessageUnsetFields = exports.MessageAnchor = exports.MentionsFilter = exports.GroupChannelUnsetOptions = exports.FileCategory = exports.DownloadStrategy = exports.SectionType = exports.TargetNotEligibleReason = exports.MessageWhatsAppStatus = exports.MessageSmsStatus = exports.GroupChannelCreationEventType = exports.ChannelsFilter = exports.ChannelWhatsAppStatus = exports.MessageType = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelType = exports.ChannelAccess = exports.AttachmentType = exports.AssignChannelVariant = exports.ChannelMemberRole = exports.ButtonVariant = void 0;
4
4
  exports.ButtonVariant = {
5
5
  CONTAINED: "contained",
6
6
  OUTLINED: "outlined",
@@ -105,6 +105,9 @@ exports.GroupChannelUnsetOptions = {
105
105
  exports.MentionsFilter = {
106
106
  UNREAD: "unread",
107
107
  };
108
+ exports.MessageAnchor = {
109
+ FIRST_UNREAD: "firstUnread",
110
+ };
108
111
  exports.MessageUnsetFields = {
109
112
  ATTACHMENTS: "attachments",
110
113
  ELEMENTS: "elements",
@@ -276,6 +276,7 @@ const _aT = "attachmentTypes";
276
276
  const _ac = "access";
277
277
  const _act = "action";
278
278
  const _acti = "actions";
279
+ const _an = "anchor";
279
280
  const _at = "attendees";
280
281
  const _att = "attachments";
281
282
  const _b = "broadcast";
@@ -313,6 +314,7 @@ const _ex = "external";
313
314
  const _exp = "expires";
314
315
  const _f = "file";
315
316
  const _fI = "fsId";
317
+ const _fUVS = "firstUnreadVisibleSeq";
316
318
  const _fi = "filter";
317
319
  const _fo = "forward";
318
320
  const _for = "force";
@@ -344,6 +346,7 @@ const _lAA = "lastActivityAt";
344
346
  const _lM = "lastMessage";
345
347
  const _lR = "latestReactions";
346
348
  const _lRA = "lastReadAt";
349
+ const _lRTS = "lastReadTimelineSeq";
347
350
  const _lRVS = "lastReadVisibleSeq";
348
351
  const _li = "link";
349
352
  const _m = "message";
@@ -915,8 +918,8 @@ exports.InboxChannel$ = [3, n1, _IC,
915
918
  ];
916
919
  exports.InboxState$ = [3, n1, _IS,
917
920
  0,
918
- [_sIe, _uC, _mUC, _hi, _mu, _pin, _lRVS, _lRA, _mU, _uMA],
919
- [64 | 0, 1, 1, 2, 2, 2, 1, 0, 0, 1], 6
921
+ [_sIe, _uC, _mUC, _hi, _mu, _pin, _lRVS, _lRTS, _lRA, _mU, _uMA],
922
+ [64 | 0, 1, 1, 2, 2, 2, 1, 1, 0, 0, 1], 6
920
923
  ];
921
924
  exports.InitialMessage$ = [3, n1, _IM,
922
925
  0,
@@ -990,18 +993,18 @@ exports.ListMentionsOutput$ = [3, n1, _LMO,
990
993
  ];
991
994
  exports.ListMessagesInput$ = [3, n1, _LMIi,
992
995
  0,
993
- [_cI, _cIo, _uI, _fr, _to_],
994
- [[0, 1], [0, { [_hQ]: _co }], [0, { [_hQ]: _uI }], [1, { [_hQ]: _fr }], [1, { [_hQ]: _to_ }]], 1
996
+ [_cI, _cIo, _uI, _fr, _to_, _an],
997
+ [[0, 1], [0, { [_hQ]: _co }], [0, { [_hQ]: _uI }], [1, { [_hQ]: _fr }], [1, { [_hQ]: _to_ }], [0, { [_hQ]: _an }]], 1
995
998
  ];
996
999
  exports.ListMessagesOutput$ = [3, n1, _LMOi,
997
1000
  0,
998
- [_mes],
999
- [() => MessageList], 1
1001
+ [_mes, _fUVS],
1002
+ [() => MessageList, 1], 1
1000
1003
  ];
1001
1004
  exports.MarkReadInput$ = [3, n1, _MRI,
1002
1005
  0,
1003
- [_cI, _cIo, _uI, _lRVS],
1004
- [[0, 1], [0, { [_hQ]: _co }], [0, { [_hQ]: _uI }], 1], 1
1006
+ [_cI, _cIo, _uI, _lRVS, _mIe],
1007
+ [[0, 1], [0, { [_hQ]: _co }], [0, { [_hQ]: _uI }], 1, 0], 1
1005
1008
  ];
1006
1009
  exports.MarkReadOutput$ = [3, n1, _MRO,
1007
1010
  0,
@@ -102,6 +102,9 @@ export const GroupChannelUnsetOptions = {
102
102
  export const MentionsFilter = {
103
103
  UNREAD: "unread",
104
104
  };
105
+ export const MessageAnchor = {
106
+ FIRST_UNREAD: "firstUnread",
107
+ };
105
108
  export const MessageUnsetFields = {
106
109
  ATTACHMENTS: "attachments",
107
110
  ELEMENTS: "elements",
@@ -269,6 +269,7 @@ const _aT = "attachmentTypes";
269
269
  const _ac = "access";
270
270
  const _act = "action";
271
271
  const _acti = "actions";
272
+ const _an = "anchor";
272
273
  const _at = "attendees";
273
274
  const _att = "attachments";
274
275
  const _b = "broadcast";
@@ -306,6 +307,7 @@ const _ex = "external";
306
307
  const _exp = "expires";
307
308
  const _f = "file";
308
309
  const _fI = "fsId";
310
+ const _fUVS = "firstUnreadVisibleSeq";
309
311
  const _fi = "filter";
310
312
  const _fo = "forward";
311
313
  const _for = "force";
@@ -337,6 +339,7 @@ const _lAA = "lastActivityAt";
337
339
  const _lM = "lastMessage";
338
340
  const _lR = "latestReactions";
339
341
  const _lRA = "lastReadAt";
342
+ const _lRTS = "lastReadTimelineSeq";
340
343
  const _lRVS = "lastReadVisibleSeq";
341
344
  const _li = "link";
342
345
  const _m = "message";
@@ -908,8 +911,8 @@ export var InboxChannel$ = [3, n1, _IC,
908
911
  ];
909
912
  export var InboxState$ = [3, n1, _IS,
910
913
  0,
911
- [_sIe, _uC, _mUC, _hi, _mu, _pin, _lRVS, _lRA, _mU, _uMA],
912
- [64 | 0, 1, 1, 2, 2, 2, 1, 0, 0, 1], 6
914
+ [_sIe, _uC, _mUC, _hi, _mu, _pin, _lRVS, _lRTS, _lRA, _mU, _uMA],
915
+ [64 | 0, 1, 1, 2, 2, 2, 1, 1, 0, 0, 1], 6
913
916
  ];
914
917
  export var InitialMessage$ = [3, n1, _IM,
915
918
  0,
@@ -983,18 +986,18 @@ export var ListMentionsOutput$ = [3, n1, _LMO,
983
986
  ];
984
987
  export var ListMessagesInput$ = [3, n1, _LMIi,
985
988
  0,
986
- [_cI, _cIo, _uI, _fr, _to_],
987
- [[0, 1], [0, { [_hQ]: _co }], [0, { [_hQ]: _uI }], [1, { [_hQ]: _fr }], [1, { [_hQ]: _to_ }]], 1
989
+ [_cI, _cIo, _uI, _fr, _to_, _an],
990
+ [[0, 1], [0, { [_hQ]: _co }], [0, { [_hQ]: _uI }], [1, { [_hQ]: _fr }], [1, { [_hQ]: _to_ }], [0, { [_hQ]: _an }]], 1
988
991
  ];
989
992
  export var ListMessagesOutput$ = [3, n1, _LMOi,
990
993
  0,
991
- [_mes],
992
- [() => MessageList], 1
994
+ [_mes, _fUVS],
995
+ [() => MessageList, 1], 1
993
996
  ];
994
997
  export var MarkReadInput$ = [3, n1, _MRI,
995
998
  0,
996
- [_cI, _cIo, _uI, _lRVS],
997
- [[0, 1], [0, { [_hQ]: _co }], [0, { [_hQ]: _uI }], 1], 1
999
+ [_cI, _cIo, _uI, _lRVS, _mIe],
1000
+ [[0, 1], [0, { [_hQ]: _co }], [0, { [_hQ]: _uI }], 1, 0], 1
998
1001
  ];
999
1002
  export var MarkReadOutput$ = [3, n1, _MRO,
1000
1003
  0,
@@ -120,6 +120,7 @@ declare const GetInboxCommand_base: {
120
120
  * // unreadCount: Number("int"), // required
121
121
  * // mentionUnreadCount: Number("int"), // required
122
122
  * // lastReadVisibleSeq: Number("long"),
123
+ * // lastReadTimelineSeq: Number("long"),
123
124
  * // lastReadAt: "STRING_VALUE",
124
125
  * // hidden: true || false, // required
125
126
  * // muted: true || false, // required
@@ -123,6 +123,7 @@ declare const ListChannelsCommand_base: {
123
123
  * // unreadCount: Number("int"), // required
124
124
  * // mentionUnreadCount: Number("int"), // required
125
125
  * // lastReadVisibleSeq: Number("long"),
126
+ * // lastReadTimelineSeq: Number("long"),
126
127
  * // lastReadAt: "STRING_VALUE",
127
128
  * // hidden: true || false, // required
128
129
  * // muted: true || false, // required
@@ -42,6 +42,7 @@ declare const ListMessagesCommand_base: {
42
42
  * channelId: "STRING_VALUE", // required
43
43
  * from: Number("long"),
44
44
  * to: Number("long"),
45
+ * anchor: "firstUnread",
45
46
  * };
46
47
  * const command = new ListMessagesCommand(input);
47
48
  * const response = await client.send(command);
@@ -153,6 +154,7 @@ declare const ListMessagesCommand_base: {
153
154
  * // event: "STRING_VALUE",
154
155
  * // },
155
156
  * // ],
157
+ * // firstUnreadVisibleSeq: Number("long"),
156
158
  * // };
157
159
  *
158
160
  * ```
@@ -41,6 +41,7 @@ declare const MarkReadCommand_base: {
41
41
  * userId: "STRING_VALUE",
42
42
  * channelId: "STRING_VALUE", // required
43
43
  * lastReadVisibleSeq: Number("long"),
44
+ * messageId: "STRING_VALUE",
44
45
  * };
45
46
  * const command = new MarkReadCommand(input);
46
47
  * const response = await client.send(command);
@@ -52,6 +53,7 @@ declare const MarkReadCommand_base: {
52
53
  * // unreadCount: Number("int"), // required
53
54
  * // mentionUnreadCount: Number("int"), // required
54
55
  * // lastReadVisibleSeq: Number("long"),
56
+ * // lastReadTimelineSeq: Number("long"),
55
57
  * // lastReadAt: "STRING_VALUE",
56
58
  * // hidden: true || false, // required
57
59
  * // muted: true || false, // required
@@ -54,6 +54,7 @@ declare const MarkUnreadCommand_base: {
54
54
  * // unreadCount: Number("int"), // required
55
55
  * // mentionUnreadCount: Number("int"), // required
56
56
  * // lastReadVisibleSeq: Number("long"),
57
+ * // lastReadTimelineSeq: Number("long"),
57
58
  * // lastReadAt: "STRING_VALUE",
58
59
  * // hidden: true || false, // required
59
60
  * // muted: true || false, // required
@@ -52,6 +52,7 @@ declare const MoveChannelToSectionCommand_base: {
52
52
  * // unreadCount: Number("int"), // required
53
53
  * // mentionUnreadCount: Number("int"), // required
54
54
  * // lastReadVisibleSeq: Number("long"),
55
+ * // lastReadTimelineSeq: Number("long"),
55
56
  * // lastReadAt: "STRING_VALUE",
56
57
  * // hidden: true || false, // required
57
58
  * // muted: true || false, // required
@@ -52,6 +52,7 @@ declare const MuteChannelCommand_base: {
52
52
  * // unreadCount: Number("int"), // required
53
53
  * // mentionUnreadCount: Number("int"), // required
54
54
  * // lastReadVisibleSeq: Number("long"),
55
+ * // lastReadTimelineSeq: Number("long"),
55
56
  * // lastReadAt: "STRING_VALUE",
56
57
  * // hidden: true || false, // required
57
58
  * // muted: true || false, // required
@@ -125,6 +125,7 @@ declare const QueryChannelsCommand_base: {
125
125
  * // unreadCount: Number("int"), // required
126
126
  * // mentionUnreadCount: Number("int"), // required
127
127
  * // lastReadVisibleSeq: Number("long"),
128
+ * // lastReadTimelineSeq: Number("long"),
128
129
  * // lastReadAt: "STRING_VALUE",
129
130
  * // hidden: true || false, // required
130
131
  * // muted: true || false, // required
@@ -52,6 +52,7 @@ declare const RemoveChannelFromSectionCommand_base: {
52
52
  * // unreadCount: Number("int"), // required
53
53
  * // mentionUnreadCount: Number("int"), // required
54
54
  * // lastReadVisibleSeq: Number("long"),
55
+ * // lastReadTimelineSeq: Number("long"),
55
56
  * // lastReadAt: "STRING_VALUE",
56
57
  * // hidden: true || false, // required
57
58
  * // muted: true || false, // required
@@ -51,6 +51,7 @@ declare const UnmuteChannelCommand_base: {
51
51
  * // unreadCount: Number("int"), // required
52
52
  * // mentionUnreadCount: Number("int"), // required
53
53
  * // lastReadVisibleSeq: Number("long"),
54
+ * // lastReadTimelineSeq: Number("long"),
54
55
  * // lastReadAt: "STRING_VALUE",
55
56
  * // hidden: true || false, // required
56
57
  * // muted: true || false, // required
@@ -277,6 +277,20 @@ export declare const MentionsFilter: {
277
277
  * @public
278
278
  */
279
279
  export type MentionsFilter = (typeof MentionsFilter)[keyof typeof MentionsFilter];
280
+ /**
281
+ * @public
282
+ * @enum
283
+ */
284
+ export declare const MessageAnchor: {
285
+ /**
286
+ * Return a bounded window starting at the caller's first unread message, resolved from their authoritative read cursor. `from`/`to` are ignored.
287
+ */
288
+ readonly FIRST_UNREAD: "firstUnread";
289
+ };
290
+ /**
291
+ * @public
292
+ */
293
+ export type MessageAnchor = (typeof MessageAnchor)[keyof typeof MessageAnchor];
280
294
  /**
281
295
  * @public
282
296
  * @enum
@@ -1,4 +1,4 @@
1
- import type { AssignChannelVariant, AttachmentType, ButtonVariant, ChannelAccess, ChannelContextEventAttendeeStatus, ChannelContextSource, ChannelMemberRole, ChannelsFilter, ChannelType, ChannelWhatsAppStatus, DownloadStrategy, FileCategory, GroupChannelCreationEventType, GroupChannelUnsetOptions, MentionsFilter, MessageSmsStatus, MessageType, MessageUnsetFields, MessageWhatsAppStatus, SearchSort, SectionType } from "./enums";
1
+ import type { AssignChannelVariant, AttachmentType, ButtonVariant, ChannelAccess, ChannelContextEventAttendeeStatus, ChannelContextSource, ChannelMemberRole, ChannelsFilter, ChannelType, ChannelWhatsAppStatus, DownloadStrategy, FileCategory, GroupChannelCreationEventType, GroupChannelUnsetOptions, MentionsFilter, MessageAnchor, MessageSmsStatus, MessageType, MessageUnsetFields, MessageWhatsAppStatus, SearchSort, SectionType } from "./enums";
2
2
  /**
3
3
  * @public
4
4
  */
@@ -1528,6 +1528,11 @@ export interface InboxState {
1528
1528
  * @public
1529
1529
  */
1530
1530
  lastReadVisibleSeq?: number | undefined;
1531
+ /**
1532
+ * Timeline anchor paired with lastReadVisibleSeq: the timelineSeq boundary of the read cursor. Every read message has timelineSeq <= this; the first unread visible message has timelineSeq > this. Absent until the cursor is next written. Use as ListMessages(from:) to jump to the first unread message.
1533
+ * @public
1534
+ */
1535
+ lastReadTimelineSeq?: number | undefined;
1531
1536
  /**
1532
1537
  * Timestamp of the most recent read event.
1533
1538
  * @public
@@ -2404,6 +2409,11 @@ export interface ListMessagesInput {
2404
2409
  * @public
2405
2410
  */
2406
2411
  to?: number | undefined;
2412
+ /**
2413
+ * Server-resolved starting point. `firstUnread` returns a window beginning at the caller's first unread message (from their read cursor), so a channel can open positioned on it in one request; `from`/`to` are ignored when set.
2414
+ * @public
2415
+ */
2416
+ anchor?: MessageAnchor | undefined;
2407
2417
  }
2408
2418
  /**
2409
2419
  * @public
@@ -2414,6 +2424,11 @@ export interface ListMessagesOutput {
2414
2424
  * @public
2415
2425
  */
2416
2426
  messages: Message[];
2427
+ /**
2428
+ * Present on an `anchor=firstUnread` response: the `visibleSeq` of the caller's first unread message, resolved from their authoritative read cursor. Absent when the channel is fully read.
2429
+ * @public
2430
+ */
2431
+ firstUnreadVisibleSeq?: number | undefined;
2417
2432
  }
2418
2433
  /**
2419
2434
  * @public
@@ -2435,6 +2450,11 @@ export interface MarkReadInput {
2435
2450
  * @public
2436
2451
  */
2437
2452
  lastReadVisibleSeq?: number | undefined;
2453
+ /**
2454
+ * Message the user read up to. Authoritative when present: resolves both the read pointer (its visibleSeq) and the timeline anchor (its timelineSeq).
2455
+ * @public
2456
+ */
2457
+ messageId?: string | undefined;
2438
2458
  }
2439
2459
  /**
2440
2460
  * @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": "4.0.4",
4
+ "version": "4.0.6",
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",
@@ -54,4 +54,4 @@
54
54
  "react-native": {
55
55
  "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
56
56
  }
57
- }
57
+ }