stream-chat 10.0.0-rc.21 → 10.0.0-rc.23

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 (269) hide show
  1. package/dist/cjs/index.browser.js +2196 -3902
  2. package/dist/cjs/index.browser.js.map +3 -3
  3. package/dist/cjs/index.node.js +2197 -3902
  4. package/dist/cjs/index.node.js.map +3 -3
  5. package/dist/esm/index.mjs +2199 -3905
  6. package/dist/esm/index.mjs.map +4 -4
  7. package/dist/types/ChannelManager.d.ts +120 -233
  8. package/dist/types/CooldownTimer.d.ts +8 -23
  9. package/dist/types/EventHandlerPipeline.d.ts +17 -37
  10. package/dist/types/LiveLocationManager.d.ts +22 -50
  11. package/dist/types/api-client.d.ts +9 -14
  12. package/dist/types/channel.d.ts +253 -448
  13. package/dist/types/channel_state.d.ts +48 -95
  14. package/dist/types/client.d.ts +245 -370
  15. package/dist/types/client_state.d.ts +1 -3
  16. package/dist/types/configuration/ConfigController.d.ts +30 -124
  17. package/dist/types/configuration/InstanceConfigurationRegistry.d.ts +31 -123
  18. package/dist/types/configuration/keys.d.ts +5 -19
  19. package/dist/types/configuration/shape.d.ts +12 -29
  20. package/dist/types/configuration/types.d.ts +59 -87
  21. package/dist/types/configuration/utils/applyInstanceConfiguration.d.ts +13 -35
  22. package/dist/types/configuration/utils/copyConfigPatch.d.ts +8 -0
  23. package/dist/types/configuration/utils/declarativeSlices.d.ts +5 -16
  24. package/dist/types/configuration/utils/deepFreezeConfig.d.ts +3 -17
  25. package/dist/types/configuration/utils/serverAuthority.d.ts +9 -29
  26. package/dist/types/connection/ConnectionIdManager.d.ts +18 -40
  27. package/dist/types/connection/ConnectionRecoveryManager.d.ts +29 -120
  28. package/dist/types/connection/networkConnection/NetworkConnectionObserver.d.ts +32 -103
  29. package/dist/types/connection/networkConnection/reporters.d.ts +9 -32
  30. package/dist/types/connection/networkConnection/types.d.ts +12 -27
  31. package/dist/types/connection/wsConnection/StableWSConnection.d.ts +37 -116
  32. package/dist/types/connection/wsConnection/WSConnection.d.ts +41 -104
  33. package/dist/types/connection/wsConnection/WSConnectionFallback.d.ts +8 -16
  34. package/dist/types/connection/wsConnection/config.d.ts +8 -28
  35. package/dist/types/connection/wsConnection/types.d.ts +17 -70
  36. package/dist/types/entityStore/EntityStore.d.ts +153 -113
  37. package/dist/types/entityStore/StoreBackedItemIndex.d.ts +13 -46
  38. package/dist/types/errors.d.ts +7 -19
  39. package/dist/types/gen/chat/ChannelApi.d.ts +2 -1
  40. package/dist/types/gen/chat/ChatApi.d.ts +28 -14
  41. package/dist/types/gen/models/index.d.ts +769 -86
  42. package/dist/types/gen/moderation/ModerationApi.d.ts +4 -4
  43. package/dist/types/index.d.ts +2 -4
  44. package/dist/types/languageNames.d.ts +9 -24
  45. package/dist/types/logger.d.ts +1 -3
  46. package/dist/types/messageComposer/LocationComposer.d.ts +1 -1
  47. package/dist/types/messageComposer/attachmentIdentity.d.ts +1 -6
  48. package/dist/types/messageComposer/attachmentManager.d.ts +10 -32
  49. package/dist/types/messageComposer/attachmentUtils.d.ts +3 -14
  50. package/dist/types/messageComposer/configuration/configuration.d.ts +2 -5
  51. package/dist/types/messageComposer/configuration/types.d.ts +29 -56
  52. package/dist/types/messageComposer/linkPreviewsManager.d.ts +6 -9
  53. package/dist/types/messageComposer/messageComposer.d.ts +30 -164
  54. package/dist/types/messageComposer/middleware/attachmentManager/postUpload/attachmentEnrichment.d.ts +4 -14
  55. package/dist/types/messageComposer/middleware/messageComposer/attachments.d.ts +2 -9
  56. package/dist/types/messageComposer/middleware/pollComposer/types.d.ts +2 -4
  57. package/dist/types/messageComposer/middleware/pollComposer/validation.d.ts +7 -19
  58. package/dist/types/messageComposer/middleware/textComposer/commands.d.ts +9 -0
  59. package/dist/types/messageComposer/middleware/textComposer/mentions.d.ts +11 -18
  60. package/dist/types/messageComposer/middleware/textComposer/textMiddlewareUtils.d.ts +9 -3
  61. package/dist/types/messageComposer/middleware/textComposer/types.d.ts +1 -6
  62. package/dist/types/messageComposer/pollComposer.d.ts +8 -4
  63. package/dist/types/messageComposer/textComposer.d.ts +3 -9
  64. package/dist/types/messageComposer/types.d.ts +5 -8
  65. package/dist/types/messageDelivery/MessageDeliveryReporter.d.ts +25 -79
  66. package/dist/types/messageDelivery/MessageReceiptsTracker.d.ts +15 -82
  67. package/dist/types/messageOperations/FailedSendCache.d.ts +4 -9
  68. package/dist/types/messageOperations/MessageOperationStatePolicy.d.ts +10 -20
  69. package/dist/types/messageOperations/MessageOperations.d.ts +20 -40
  70. package/dist/types/messageOperations/applyReactionLocally.d.ts +5 -22
  71. package/dist/types/messageOperations/createMessageOperations.d.ts +3 -5
  72. package/dist/types/messageOperations/reflectReactionEvent.d.ts +5 -13
  73. package/dist/types/messageOperations/sendOrdering.d.ts +4 -7
  74. package/dist/types/messageOperations/settlePendingAttachmentUploads.d.ts +7 -15
  75. package/dist/types/messageOperations/types.d.ts +15 -30
  76. package/dist/types/middleware.d.ts +7 -5
  77. package/dist/types/moderation.d.ts +21 -14
  78. package/dist/types/notifications/NotificationManager.d.ts +8 -31
  79. package/dist/types/notifications/types.d.ts +19 -59
  80. package/dist/types/offline-support/offline_support_api.d.ts +145 -539
  81. package/dist/types/offline-support/offline_sync_manager.d.ts +18 -42
  82. package/dist/types/offline-support/queueableOperations.d.ts +24 -52
  83. package/dist/types/offline-support/types.d.ts +24 -187
  84. package/dist/types/pagination/ItemIndex.d.ts +4 -12
  85. package/dist/types/pagination/cursorDerivation/aroundPaginationFlags.d.ts +13 -0
  86. package/dist/types/pagination/cursorDerivation/createdAtAroundPaginationFlags.d.ts +2 -4
  87. package/dist/types/pagination/cursorDerivation/linearPaginationFlags.d.ts +2 -3
  88. package/dist/types/pagination/paginators/BasePaginator.d.ts +235 -622
  89. package/dist/types/pagination/paginators/ChannelPaginator.d.ts +67 -125
  90. package/dist/types/pagination/paginators/MessageIntervalPaginator.d.ts +133 -292
  91. package/dist/types/pagination/paginators/MessagePaginator.d.ts +69 -118
  92. package/dist/types/pagination/paginators/PinnedMessagePaginator.d.ts +7 -26
  93. package/dist/types/pagination/paginators/ReminderPaginator.d.ts +2 -2
  94. package/dist/types/pagination/paginators/ThreadPaginator.d.ts +15 -23
  95. package/dist/types/pagination/paginators/UserGroupPaginator.d.ts +2 -6
  96. package/dist/types/pagination/sortCompiler.d.ts +11 -22
  97. package/dist/types/pagination/utility.normalization.d.ts +5 -23
  98. package/dist/types/pagination/utility.search.d.ts +3 -8
  99. package/dist/types/poll.d.ts +14 -14
  100. package/dist/types/poll_manager.d.ts +11 -2
  101. package/dist/types/poll_optimistic_votes.d.ts +10 -14
  102. package/dist/types/reminders/Reminder.d.ts +4 -4
  103. package/dist/types/reminders/ReminderManager.d.ts +7 -20
  104. package/dist/types/search/BaseSearchSource.d.ts +7 -12
  105. package/dist/types/search/ChannelSearchSource.d.ts +7 -7
  106. package/dist/types/search/MessageSearchSource.d.ts +7 -9
  107. package/dist/types/search/SearchController.d.ts +17 -22
  108. package/dist/types/search/types.d.ts +6 -10
  109. package/dist/types/signing.d.ts +12 -3
  110. package/dist/types/thread.d.ts +23 -71
  111. package/dist/types/thread_manager.d.ts +45 -70
  112. package/dist/types/token_manager.d.ts +8 -13
  113. package/dist/types/types.d.ts +64 -125
  114. package/dist/types/types.utility.d.ts +3 -3
  115. package/dist/types/upload-utils.d.ts +5 -10
  116. package/dist/types/uploadManager.d.ts +17 -45
  117. package/dist/types/utils/FixedSizeQueueCache.d.ts +6 -11
  118. package/dist/types/utils/WithSubscriptions.d.ts +5 -15
  119. package/dist/types/utils/concurrency.d.ts +11 -19
  120. package/dist/types/utils/mergeWith/mergeWith.d.ts +8 -11
  121. package/dist/types/utils/mergeWith/mergeWithCore.d.ts +5 -13
  122. package/dist/types/utils/mergeWith/mergeWithDiff.d.ts +22 -0
  123. package/dist/types/utils/objectPath.d.ts +6 -41
  124. package/dist/types/utils/retryable.d.ts +8 -12
  125. package/dist/types/utils/throttling/throttle.d.ts +8 -23
  126. package/dist/types/utils/time.d.ts +24 -64
  127. package/dist/types/utils.d.ts +40 -86
  128. package/package.json +7 -2
  129. package/src/ChannelManager.ts +159 -300
  130. package/src/CooldownTimer.ts +11 -29
  131. package/src/EventHandlerPipeline.ts +21 -44
  132. package/src/LiveLocationManager.ts +35 -74
  133. package/src/api-client.ts +43 -61
  134. package/src/campaign.ts +1 -1
  135. package/src/channel.ts +396 -749
  136. package/src/channel_batch_updater.ts +1 -1
  137. package/src/channel_state.ts +50 -105
  138. package/src/client.ts +360 -588
  139. package/src/client_state.ts +1 -6
  140. package/src/configuration/ConfigController.ts +41 -157
  141. package/src/configuration/InstanceConfigurationRegistry.ts +42 -171
  142. package/src/configuration/index.ts +1 -1
  143. package/src/configuration/keys.ts +13 -32
  144. package/src/configuration/shape.ts +67 -70
  145. package/src/configuration/types.ts +60 -100
  146. package/src/configuration/utils/applyInstanceConfiguration.ts +21 -53
  147. package/src/configuration/utils/copyConfigPatch.ts +11 -32
  148. package/src/configuration/utils/declarativeSlices.ts +9 -39
  149. package/src/configuration/utils/deepFreezeConfig.ts +3 -17
  150. package/src/configuration/utils/index.ts +2 -4
  151. package/src/configuration/utils/serverAuthority.ts +20 -68
  152. package/src/connection/ConnectionIdManager.ts +20 -49
  153. package/src/connection/ConnectionRecoveryManager.ts +51 -178
  154. package/src/connection/networkConnection/NetworkConnectionObserver.ts +37 -114
  155. package/src/connection/networkConnection/reporters.ts +9 -36
  156. package/src/connection/networkConnection/types.ts +12 -27
  157. package/src/connection/wsConnection/StableWSConnection.ts +73 -193
  158. package/src/connection/wsConnection/WSConnection.ts +56 -131
  159. package/src/connection/wsConnection/WSConnectionFallback.ts +22 -31
  160. package/src/connection/wsConnection/config.ts +13 -48
  161. package/src/connection/wsConnection/types.ts +17 -70
  162. package/src/constants.ts +4 -4
  163. package/src/entityStore/EntityStore.ts +162 -167
  164. package/src/entityStore/StoreBackedItemIndex.ts +14 -47
  165. package/src/errors.ts +7 -19
  166. package/src/formatMessageMemo.ts +3 -9
  167. package/src/gen/chat/ChannelApi.ts +19 -0
  168. package/src/gen/chat/ChatApi.ts +87 -13
  169. package/src/gen/models/index.ts +793 -71
  170. package/src/gen/moderation/ModerationApi.ts +0 -4
  171. package/src/index.ts +10 -14
  172. package/src/languageNames.ts +9 -24
  173. package/src/logger.ts +1 -3
  174. package/src/messageComposer/LocationComposer.ts +7 -23
  175. package/src/messageComposer/MessageComposerEffectHandlers.ts +1 -2
  176. package/src/messageComposer/attachmentIdentity.ts +2 -13
  177. package/src/messageComposer/attachmentManager.ts +17 -63
  178. package/src/messageComposer/attachmentUtils.ts +3 -17
  179. package/src/messageComposer/configuration/configuration.ts +5 -8
  180. package/src/messageComposer/configuration/types.ts +29 -56
  181. package/src/messageComposer/fileUtils.ts +1 -1
  182. package/src/messageComposer/linkPreviewsManager.ts +8 -20
  183. package/src/messageComposer/messageComposer.ts +54 -222
  184. package/src/messageComposer/middleware/attachmentManager/postUpload/attachmentEnrichment.ts +4 -16
  185. package/src/messageComposer/middleware/attachmentManager/postUpload/uploadErrorHandler.ts +1 -2
  186. package/src/messageComposer/middleware/messageComposer/attachments.ts +14 -40
  187. package/src/messageComposer/middleware/messageComposer/linkPreviews.ts +3 -4
  188. package/src/messageComposer/middleware/messageComposer/textComposer.ts +1 -1
  189. package/src/messageComposer/middleware/messageComposer/userDataInjection.ts +4 -11
  190. package/src/messageComposer/middleware/pollComposer/state.ts +2 -2
  191. package/src/messageComposer/middleware/pollComposer/types.ts +2 -4
  192. package/src/messageComposer/middleware/pollComposer/validation.ts +8 -26
  193. package/src/messageComposer/middleware/textComposer/TextComposerMiddlewareExecutor.ts +1 -6
  194. package/src/messageComposer/middleware/textComposer/commandUtils.ts +1 -2
  195. package/src/messageComposer/middleware/textComposer/commands.ts +11 -16
  196. package/src/messageComposer/middleware/textComposer/mentions.ts +32 -70
  197. package/src/messageComposer/middleware/textComposer/textMiddlewareUtils.ts +10 -4
  198. package/src/messageComposer/middleware/textComposer/types.ts +1 -6
  199. package/src/messageComposer/pollComposer.ts +11 -8
  200. package/src/messageComposer/textComposer.ts +9 -59
  201. package/src/messageComposer/types.ts +9 -12
  202. package/src/messageDelivery/MessageDeliveryReporter.ts +60 -113
  203. package/src/messageDelivery/MessageReceiptsTracker.ts +21 -105
  204. package/src/messageOperations/FailedSendCache.ts +4 -9
  205. package/src/messageOperations/MessageOperationStatePolicy.ts +40 -67
  206. package/src/messageOperations/MessageOperations.ts +33 -62
  207. package/src/messageOperations/applyReactionLocally.ts +9 -28
  208. package/src/messageOperations/createMessageOperations.ts +17 -33
  209. package/src/messageOperations/reflectReactionEvent.ts +5 -13
  210. package/src/messageOperations/sendOrdering.ts +4 -7
  211. package/src/messageOperations/settlePendingAttachmentUploads.ts +10 -21
  212. package/src/messageOperations/types.ts +15 -30
  213. package/src/middleware.ts +7 -10
  214. package/src/moderation.ts +25 -21
  215. package/src/notifications/NotificationManager.ts +11 -35
  216. package/src/notifications/types.ts +19 -59
  217. package/src/offline-support/offline_support_api.ts +178 -608
  218. package/src/offline-support/offline_sync_manager.ts +25 -69
  219. package/src/offline-support/queueableOperations.ts +31 -84
  220. package/src/offline-support/types.ts +25 -188
  221. package/src/pagination/ItemIndex.ts +4 -12
  222. package/src/pagination/cursorDerivation/aroundPaginationFlags.ts +29 -0
  223. package/src/pagination/cursorDerivation/createdAtAroundPaginationFlags.ts +13 -62
  224. package/src/pagination/cursorDerivation/idAroundPaginationFlags.ts +11 -39
  225. package/src/pagination/cursorDerivation/linearPaginationFlags.ts +4 -6
  226. package/src/pagination/filterCompiler.ts +11 -25
  227. package/src/pagination/paginators/BasePaginator.ts +422 -976
  228. package/src/pagination/paginators/ChannelPaginator.ts +130 -190
  229. package/src/pagination/paginators/MessageIntervalPaginator.ts +226 -457
  230. package/src/pagination/paginators/MessagePaginator.ts +135 -175
  231. package/src/pagination/paginators/PinnedMessagePaginator.ts +13 -38
  232. package/src/pagination/paginators/ReminderPaginator.ts +12 -15
  233. package/src/pagination/paginators/ThreadPaginator.ts +16 -26
  234. package/src/pagination/paginators/UserGroupPaginator.ts +6 -17
  235. package/src/pagination/paginators/stateThrottling.ts +5 -10
  236. package/src/pagination/sortCompiler.ts +23 -50
  237. package/src/pagination/utility.normalization.ts +8 -30
  238. package/src/pagination/utility.search.ts +4 -11
  239. package/src/poll.ts +19 -19
  240. package/src/poll_manager.ts +16 -20
  241. package/src/poll_optimistic_votes.ts +17 -22
  242. package/src/reminders/Reminder.ts +5 -6
  243. package/src/reminders/ReminderManager.ts +9 -34
  244. package/src/reminders/ReminderTimer.ts +1 -2
  245. package/src/search/BaseSearchSource.ts +14 -29
  246. package/src/search/ChannelSearchSource.ts +8 -8
  247. package/src/search/MessageSearchSource.ts +19 -25
  248. package/src/search/SearchController.ts +18 -24
  249. package/src/search/types.ts +6 -10
  250. package/src/segment.ts +1 -1
  251. package/src/signing.ts +23 -3
  252. package/src/thread.ts +72 -173
  253. package/src/thread_manager.ts +59 -76
  254. package/src/token_manager.ts +11 -21
  255. package/src/types.ts +78 -126
  256. package/src/types.utility.ts +3 -3
  257. package/src/upload-utils.ts +5 -10
  258. package/src/uploadManager.ts +22 -54
  259. package/src/utils/FixedSizeQueueCache.ts +13 -21
  260. package/src/utils/WithSubscriptions.ts +5 -15
  261. package/src/utils/concurrency.ts +16 -55
  262. package/src/utils/mergeWith/mergeWith.ts +10 -13
  263. package/src/utils/mergeWith/mergeWithCore.ts +24 -81
  264. package/src/utils/mergeWith/mergeWithDiff.ts +15 -33
  265. package/src/utils/objectPath.ts +6 -41
  266. package/src/utils/retryable.ts +10 -14
  267. package/src/utils/throttling/throttle.ts +9 -25
  268. package/src/utils/time.ts +26 -66
  269. package/src/utils.ts +72 -128
@@ -1,5 +1,6 @@
1
1
  import type { StreamChat } from './client';
2
- import type { CreatePollRequest, LocalMessage, MessageResponse, QueryPollsFilters, QueryPollsOptions, SortParamRequest } from './types';
2
+ import type { CreatePollRequest, LocalMessage, MessageResponse, StreamRequestOptions } from './types';
3
+ import type { QueryPollsRequest } from './gen/models';
3
4
  import { Poll } from './poll';
4
5
  import { WithSubscriptions } from './utils/WithSubscriptions';
5
6
  export declare class PollManager extends WithSubscriptions {
@@ -13,7 +14,15 @@ export declare class PollManager extends WithSubscriptions {
13
14
  registerSubscriptions: () => void;
14
15
  createPoll: (poll: CreatePollRequest) => Promise<Poll | undefined>;
15
16
  getPoll: (id: string) => Promise<Poll | undefined>;
16
- queryPolls: (filter: QueryPollsFilters, sort?: SortParamRequest[], options?: QueryPollsOptions) => Promise<{
17
+ /**
18
+ * Queries polls and caches them as `Poll` instances. Takes the same request as `client.queryPolls`.
19
+ *
20
+ * @param request - The filter, sort and pagination of the query (optional).
21
+ * @param requestOptions - Per-request options such as an abort `signal`. Never serialized
22
+ * into the request (optional).
23
+ * @returns The `Poll` instances and the cursor of the next page.
24
+ */
25
+ queryPolls: (request?: QueryPollsRequest, requestOptions?: StreamRequestOptions) => Promise<{
17
26
  polls: (Poll | undefined)[];
18
27
  next: string | undefined;
19
28
  }>;
@@ -3,12 +3,11 @@ import type { Poll, PollState } from './poll';
3
3
  import type { PollResponseData, PollVoteResponseData } from './types';
4
4
  type OptionId = string;
5
5
  /**
6
- * Optimistic updates for the current user's votes on a poll. Vote changes are shown right away.
7
- * While any of them is not confirmed by its WS event, vote events are only stored, as the server
8
- * state they carry does not contain the pending changes yet. Once all are confirmed (a failed
9
- * request counts as confirmed), the server's vote state is shown, which also reverts failed changes.
10
- * Vote requests are sent one after another, so the server applies them in the order they were made.
11
- * A lost WS event is recovered from after CATCH_UP_TIMEOUT_MS (see applySucceededChanges).
6
+ * Optimistic updates for the current user's votes on a poll. While any change awaits its WS event,
7
+ * vote events are only stored (the state they carry lacks the pending changes). Once all are
8
+ * confirmed (a failed request counts as confirmed), the server's vote state is shown, which reverts
9
+ * failed changes. A lost WS event is recovered from after CATCH_UP_TIMEOUT_MS (see
10
+ * applySucceededChanges).
12
11
  */
13
12
  export declare class OptimisticPollVotes {
14
13
  private serverVoteState;
@@ -40,20 +39,17 @@ export declare class OptimisticPollVotes {
40
39
  private settleWithoutEvent;
41
40
  private createPlaceholderVote;
42
41
  /**
43
- * The server id of a vote to remove, once everything sent before the removal has finished. Casts
44
- * and removals of an option alternate, so the option's last succeeded change tells: a cast is the
45
- * vote being removed (e.g. a placeholder), a removal means the cast in between failed. Without
46
- * one, the server's own vote of the option is the vote being removed.
42
+ * The server ID of the vote to remove. Casts and removals of an option alternate, so the option's
43
+ * last succeeded change tells: a cast is the vote being removed (e.g. a placeholder), a removal
44
+ * means the cast in between failed. Without one, the server's own vote of the option is used.
47
45
  */
48
46
  private getServerVoteId;
49
47
  private takeServerVoteState;
50
48
  private scheduleCatchUp;
51
49
  /**
52
50
  * A WS event of an own vote change got lost, so the server's own votes are stale. All requests
53
- * have finished (the timeout starts once nothing is left to send and a new request cancels it),
54
- * so applying the succeeded changes in order gives the server's own votes (changes whose events
55
- * did arrive end up the same). They are shown with the vote counts of the last WS event, which
56
- * contain the other users' votes too.
51
+ * have finished, so replaying the succeeded changes in order gives the server's own votes. They
52
+ * are shown with the vote counts of the last WS event, which include other users' votes.
57
53
  */
58
54
  private applySucceededChanges;
59
55
  }
@@ -3,10 +3,10 @@ import { StateStore } from '@stream-io/state-store';
3
3
  import type { ReminderTimerConfig } from './ReminderTimer';
4
4
  import type { MessageResponse, ReminderResponseData, TimestampNS, UserResponse } from '../types';
5
5
  /**
6
- * Milliseconds until `remindAt`, negative once it has passed.
6
+ * Computes the time left until a reminder is due.
7
7
  *
8
- * @param remindAt - Unix nanoseconds, as the API sends it. The subtraction happens in the wire unit
9
- * and is converted once, so the returned duration stays in the milliseconds `setTimeout` speaks.
8
+ * @param remindAt - Unix nanoseconds, as the API sends it.
9
+ * @returns Milliseconds until `remindAt`, negative once it has passed.
10
10
  */
11
11
  export declare const timeLeftMs: (remindAt: TimestampNS) => number;
12
12
  export type ReminderResponseBaseOrResponse = ReminderResponseData;
@@ -18,7 +18,7 @@ export type ReminderState = {
18
18
  message_id: string;
19
19
  /** Unix nanoseconds, as the API sends it. */
20
20
  remind_at: TimestampNS | null;
21
- /** A duration, so milliseconds — see {@link timeLeftMs}. */
21
+ /** Milliseconds. See {@link timeLeftMs}. */
22
22
  timeLeftMs: number | null;
23
23
  /** Unix nanoseconds, as the API sends it. */
24
24
  updated_at: TimestampNS;
@@ -22,36 +22,23 @@ export type ReminderManagerOptions = {
22
22
  };
23
23
  export declare class ReminderManager extends WithSubscriptions {
24
24
  private client;
25
- /** The shared configuration machinery — see {@link ConfigController}. */
26
25
  private readonly configController;
27
- /**
28
- * Resolved configuration, as a store — the shape every configurable class exposes
29
- * (`configState` / `config` / `updateConfig`). Delegates rather than holding a copy, so the field and
30
- * the controller's store cannot drift.
31
- */
32
26
  get configState(): StateStore<ReminderManagerConfig>;
33
27
  state: StateStore<ReminderManagerState>;
34
28
  paginator: ReminderPaginator;
35
29
  constructor({ client, config }: ReminderManagerOptions);
30
+ get config(): Readonly<ReminderManagerConfig>;
36
31
  /**
37
- * The current resolved configuration. `Readonly` because the value is the store's live object —
38
- * assigning to a field of it would change state without notifying anyone. Use {@link updateConfig}.
32
+ * Merges a partial configuration into the resolved config.
33
+ *
34
+ * @param config - Fields to merge into the resolved config.
39
35
  */
40
- get config(): Readonly<ReminderManagerConfig>;
41
36
  updateConfig(config: Partial<ReminderManagerConfig>): void;
42
37
  /**
43
- * Rebuilds the resolved configuration from package defaults plus the declarative slice.
44
- *
45
- * The derivation entry point every configurable entity exposes, so the owner routes a slice here and
46
- * knows nothing about ReminderManager's defaults or merge semantics. This logic used to live in the owner,
47
- * which is how `reset()` became a no-op for the client key (F4) and how a registered
48
- * `notifications.sortComparator` became unremovable (G8) — an owner writing another object's
49
- * derivation gets that object's rules wrong sooner or later.
38
+ * Re-derives the configuration from the declarative slice.
50
39
  *
51
- * Routed through {@link updateConfig} rather than replacing the store, which is exact here because
52
- * every field of `ReminderManagerConfig` is required and present in the defaults, so a patch naming all of
53
- * them amounts to a replacement. `NotificationManager` cannot do this — its `sortComparator` is
54
- * optional with no default, so a patch can never remove one — which is why it replaces outright.
40
+ * @param config - The declarative slice. Leave it out to rebuild from the defaults and the
41
+ * constructor's `config`.
55
42
  */
56
43
  initializeConfig(config?: Partial<ReminderManagerConfig>): void;
57
44
  get stopTimerRefreshBoundaryMs(): number;
@@ -2,10 +2,8 @@ import { StateStore } from '@stream-io/state-store';
2
2
  import { type DebouncedFunc } from '../utils';
3
3
  import type { QueryReturnValue, SearchSourceOptions, SearchSourceState, SearchSourceType } from './types';
4
4
  /**
5
- * Passed to a search source's `query()`. Carries a cancellation handle and makes no
6
- * claim that the query performs a request: a source may resolve from local data and
7
- * ignore the signal. Where a source does issue requests, forward this straight through
8
- * as the request options.
5
+ * Passed to a search source's `query()`. A source that issues requests forwards it as the request
6
+ * options; one that resolves from local data may ignore the signal.
9
7
  */
10
8
  export type SearchQueryOptions = {
11
9
  /** Aborted once a newer query supersedes this one. */
@@ -22,10 +20,7 @@ interface ISearchSource<T = any> {
22
20
  activate(): void;
23
21
  canExecuteQuery(newSearchString?: string): boolean;
24
22
  deactivate(): void;
25
- /**
26
- * Releases what the source holds outside itself. Optional; a source that holds nothing outside
27
- * itself leaves it out.
28
- */
23
+ /** Releases what the source holds outside itself. */
29
24
  dispose?(): void;
30
25
  readonly hasNext: boolean;
31
26
  readonly hasResults: boolean;
@@ -36,7 +31,7 @@ interface ISearchSource<T = any> {
36
31
  readonly lastQueryError: Error | undefined;
37
32
  readonly next: string | undefined | null;
38
33
  readonly offset: number | undefined;
39
- /** Takes again what {@link ISearchSource.dispose} released. Optional, like `dispose`. */
34
+ /** Takes again what {@link ISearchSource.dispose} released. */
40
35
  registerSubscriptions?(): void;
41
36
  resetState(): void;
42
37
  readonly searchQuery: string;
@@ -68,7 +63,7 @@ declare abstract class BaseSearchSourceBase<T, R extends void | Promise<void>> i
68
63
  setDebounceOptions: (options?: DebounceOptions) => void;
69
64
  /**
70
65
  * Short queries match too much and are slow server-side, so they get a longer debounce.
71
- * Resolved per call, which is what lets the interval switch as the user keeps typing.
66
+ * Resolved per call, so the interval switches as the user keeps typing.
72
67
  */
73
68
  protected getDebounceMs: (searchString?: string) => number;
74
69
  /**
@@ -101,11 +96,11 @@ declare abstract class BaseSearchSourceBase<T, R extends void | Promise<void>> i
101
96
  resetStateAndActivate(): void;
102
97
  }
103
98
  export declare abstract class BaseSearchSource<T> extends BaseSearchSourceBase<T, Promise<void>> implements SearchSource<T> {
104
- /** Aborts the in-flight request, if any, once a newer query is dispatched. */
99
+ /** Aborted when a newer query is dispatched. */
105
100
  protected queryAbortController: AbortController | null;
106
101
  protected abstract query(searchQuery: string, options?: SearchQueryOptions): Promise<QueryReturnValue<T>>;
107
102
  protected abstract filterQueryResults(items: T[]): T[] | Promise<T[]>;
108
- /** Aborts the in-flight request, if any. Returns true when one was aborted. */
103
+ /** Returns true when a request was aborted. */
109
104
  protected abortInFlightQuery(): boolean;
110
105
  resetState(): void;
111
106
  executeQuery(newSearchString?: string): Promise<void>;
@@ -14,8 +14,8 @@ export type ChannelSearchSourceOptions = SearchSourceOptions & {
14
14
  filters?: ChannelFilters;
15
15
  sort?: SortParamRequest[];
16
16
  /**
17
- * Query options. Results are not watched unless `watch: true` is passed: not watched channels serve as a preview,
18
- * and opening one is what watches it.
17
+ * Query options. Results are not watched unless `watch: true`: they are previews, and opening
18
+ * one watches it.
19
19
  */
20
20
  searchOptions?: Omit<ChannelOptions, 'limit' | 'offset'>;
21
21
  };
@@ -29,14 +29,14 @@ export declare class ChannelSearchSource<TFilterContext extends CustomContext =
29
29
  private removeClaim?;
30
30
  constructor(client: StreamChat, options?: ChannelSearchSourceOptions, filterBuilderOptions?: FilterBuilderOptions<ChannelFilters, ChannelSearchSourceFilterBuilderContext<TFilterContext>>);
31
31
  /**
32
- * While the search is active its results are on screen, so they count as used in the channel store
33
- * (see `EntityStore.addClaim`). Follows `isActive`; also called by
34
- * `SearchController.registerSubscriptions()` to take the registration again after `dispose()`.
32
+ * While active, the results count as used in the channel store (see `EntityStore.addClaim`).
33
+ * Follows `isActive`; `SearchController.registerSubscriptions()` also calls it to re-register
34
+ * after `dispose()`.
35
35
  */
36
36
  registerSubscriptions(): void;
37
37
  /**
38
- * Removes the registration that keeps the results in the channel store, so a source that is
39
- * dropped while active doesn't keep them, or itself, alive. A later activation registers again.
38
+ * Removes the channel-store claim, so the results' channels are no longer held and a dropped
39
+ * source can be collected.
40
40
  */
41
41
  dispose(): void;
42
42
  protected query(searchQuery: string, queryOptions?: SearchQueryOptions): Promise<{
@@ -36,9 +36,8 @@ export type MessageSearchSourceOptions = SearchSourceOptions & {
36
36
  channelQueryFilters?: ChannelFilters;
37
37
  channelQuerySort?: SortParamRequest[];
38
38
  /**
39
- * Options for the follow-up query that hydrates unknown channels. Those channels are not watched
40
- * unless `watch: true` is passed: a result is a preview, and opening one is what watches its
41
- * channel.
39
+ * Options for the follow-up query that hydrates unknown channels. They are not watched unless
40
+ * `watch: true`: a result is a preview, and opening one watches its channel.
42
41
  */
43
42
  channelQueryOptions?: Omit<ChannelOptions, 'limit' | 'offset'>;
44
43
  };
@@ -57,15 +56,14 @@ export declare class MessageSearchSource<TContexts extends MessageSearchSourceCo
57
56
  private removeClaim?;
58
57
  constructor(client: StreamChat, options?: MessageSearchSourceOptions, filterBuilderOptions?: MessageSearchSourceFilterBuilderOptions<TContexts>);
59
58
  /**
60
- * While the search is active its results are on screen, so the channels they were found in count
61
- * as used in the channel store (see `EntityStore.addClaim`), and stay the instances the results
62
- * open. Follows `isActive`; also called by `SearchController.registerSubscriptions()` to take the
63
- * registration again after `dispose()`.
59
+ * While active, the channels the results come from count as used in the channel store (see
60
+ * `EntityStore.addClaim`), so they stay the instances the results open. Follows `isActive`;
61
+ * `SearchController.registerSubscriptions()` also calls it to re-register after `dispose()`.
64
62
  */
65
63
  registerSubscriptions(): void;
66
64
  /**
67
- * Removes the registration that keeps the results' channels in the channel store, so a source that
68
- * is dropped while active doesn't keep them, or itself, alive. A later activation registers again.
65
+ * Removes the channel-store claim, so the results' channels are no longer held and a dropped
66
+ * source can be collected.
69
67
  */
70
68
  dispose(): void;
71
69
  private resultChannels;
@@ -7,16 +7,13 @@ export type SearchControllerState = {
7
7
  sources: SearchSource[];
8
8
  };
9
9
  export type SearchControllerConfig = {
10
+ /** Keeps exactly one source active. Defaults to `true`. */
10
11
  keepSingleActiveSource: boolean;
11
12
  };
12
13
  export type SearchControllerOptions = {
13
14
  /**
14
- * Required for this controller to take part in `client.config`.
15
- *
16
- * It is the one configurable class this package never constructs — an app or a downstream SDK does
17
- * (`<Chat>` in `stream-chat-react`) — so there is no other route by which it could find the
18
- * configuration registry. Left out, the controller still works and `updateConfig` still applies;
19
- * only the declarative key and its setup function go unheard.
15
+ * Needed to take part in `client.config`. Without it the controller still works, but the
16
+ * declarative `searchController` key and its setup function are not applied.
20
17
  */
21
18
  client?: StreamChat;
22
19
  config?: Partial<SearchControllerConfig>;
@@ -25,38 +22,36 @@ export type SearchControllerOptions = {
25
22
  export declare const DEFAULT_SEARCH_CONTROLLER_CONFIG: SearchControllerConfig;
26
23
  export declare class SearchController {
27
24
  state: StateStore<SearchControllerState>;
28
- /** The shared configuration machinery — see {@link ConfigController}. */
29
25
  private readonly configController;
30
26
  private readonly client?;
31
- /** Teardown for the configuration subscription, when this controller was given a client. */
32
27
  private unsubscribeConfiguration?;
33
- /**
34
- * Resolved configuration, as a store so consumers can react to it — the same shape every configurable
35
- * class exposes (`configState` for the store, {@link config} for the current value).
36
- */
37
28
  get configState(): StateStore<SearchControllerConfig>;
38
29
  constructor({ client, config, sources }?: SearchControllerOptions);
39
30
  private subscribeConfiguration;
40
31
  /**
41
32
  * Takes again what {@link SearchController.dispose} released: the configuration subscription and
42
- * whatever each source holds outside itself. A no-op for what is already held, so a UI can call it
43
- * on every mount, including a remount of the same instance after its cleanup disposed it.
33
+ * what each source holds outside itself. A no-op for what is already held, so a UI can call it on
34
+ * every mount.
44
35
  */
45
36
  registerSubscriptions(): void;
46
37
  /**
47
- * Releases the configuration subscription, running the setup function's teardown, and what each
48
- * source holds outside itself, such as a channel search's hold on its results in the channel
49
- * store. {@link SearchController.registerSubscriptions} takes them again.
38
+ * Releases the configuration subscription (running the setup function's teardown) and what each
39
+ * source holds outside itself. {@link SearchController.registerSubscriptions} takes them again.
50
40
  */
51
41
  dispose(): void;
42
+ get config(): Readonly<SearchControllerConfig>;
52
43
  /**
53
- * The current resolved configuration. `Readonly` because the value is the store's live object —
54
- * assigning to a field of it would change state without notifying anyone. Use {@link updateConfig}.
44
+ * Merges a partial configuration into the resolved config.
45
+ *
46
+ * @param config - Fields to merge into the resolved config.
55
47
  */
56
- get config(): Readonly<SearchControllerConfig>;
57
- /** Merges a partial configuration into the resolved config and notifies subscribers. */
58
48
  updateConfig(config: Partial<SearchControllerConfig>): void;
59
- /** Rebuilds the resolved configuration from package defaults plus the declarative slice. */
49
+ /**
50
+ * Re-derives the configuration from the declarative slice.
51
+ *
52
+ * @param config - The declarative slice. Leave it out to rebuild from the defaults and the
53
+ * constructor's `config`.
54
+ */
60
55
  initializeConfig(config?: Partial<SearchControllerConfig>): void;
61
56
  get hasNext(): boolean;
62
57
  get sources(): SearchSource<any>[];
@@ -9,25 +9,21 @@ export type SearchSourceState<T = any> = {
9
9
  offset?: number;
10
10
  };
11
11
  export type SearchSourceOptions = {
12
- /**
13
- * Legacy single debounce interval. When set, it applies to both short and long queries,
14
- * unless overridden by `shortQueryDebounceMs` / `longQueryDebounceMs`.
15
- */
12
+ /** Debounce interval for short and long queries, unless overridden by the options below. */
16
13
  debounceMs?: number;
17
14
  /**
18
- * Debounce interval for queries no longer than `shortQueryMaxLength`. Such queries have
19
- * low selectivity and are expensive server-side, so they are debounced harder.
20
- * Defaults to 500ms.
15
+ * Debounce interval for queries no longer than `shortQueryMaxLength` (low selectivity, expensive
16
+ * server-side). Defaults to `debounceMs`, else 500ms.
21
17
  */
22
18
  shortQueryDebounceMs?: number;
23
- /** Debounce interval for queries longer than `shortQueryMaxLength`. Defaults to 300ms. */
19
+ /** Debounce interval for longer queries. Defaults to `debounceMs`, else 300ms. */
24
20
  longQueryDebounceMs?: number;
25
21
  /** Query length (inclusive) that still counts as short. Defaults to 2. */
26
22
  shortQueryMaxLength?: number;
27
23
  pageSize?: number;
28
- /** When `true`, the source can execute queries with an empty search string (defaults to `false`). */
24
+ /** Allows queries with an empty search string. Defaults to `false`. */
29
25
  allowEmptySearchString?: boolean;
30
- /** When `true`, previously loaded items are cleared at the start of a new search query (defaults to `true`). */
26
+ /** Clears loaded items when a new search query starts. Defaults to `true`. */
31
27
  resetOnNewSearchQuery?: boolean;
32
28
  };
33
29
  export type SearchSourceType = 'channels' | 'users' | 'messages' | (string & {});
@@ -1,7 +1,16 @@
1
1
  /**
2
- * Decodes a JWT token and returns the embedded `user_id`.
2
+ * Decodes a JWT and returns the embedded `user_id`. The signature is not verified.
3
3
  *
4
- * @param token - The JWT token to decode.
5
- * @returns The `user_id` extracted from the token's payload, or an empty string when the token is malformed.
4
+ * @param token - The JWT to decode.
5
+ * @returns The `user_id` from the token's payload, or an empty string when the token does not have
6
+ * three dot-separated segments.
6
7
  */
7
8
  export declare function UserFromToken(token: string): string;
9
+ /**
10
+ * Creates a development token for `userId`: an unsigned JWT the API accepts only while the app
11
+ * has auth checks disabled (`disable_auth_checks`). Never use one in production.
12
+ *
13
+ * @param userId - The ID of the user the token is for.
14
+ * @returns The development token.
15
+ */
16
+ export declare function DevToken(userId: string): string;
@@ -11,10 +11,7 @@ import type { MergeNewestPageOptions } from './pagination';
11
11
  import type { ThreadDeclarativeConfig } from './configuration/types';
12
12
  import type { PipelineEvent } from './EventHandlerPipeline';
13
13
  export type ThreadState = {
14
- /**
15
- * Determines if the thread is currently opened and on-screen. When the thread is active,
16
- * all new messages are immediately marked as read.
17
- */
14
+ /** Whether the thread is open and on-screen. While active, new messages are marked read. */
18
15
  active: boolean;
19
16
  channel: Channel;
20
17
  /** Unix nanoseconds, as the API sends it. */
@@ -24,10 +21,7 @@ export type ThreadState = {
24
21
  deletedAt: TimestampNS | null;
25
22
  isLoading: boolean;
26
23
  isStateStale: boolean;
27
- /**
28
- * Thread is identified by and has a one-to-one relation with its parent message.
29
- * We use parent message id as a thread id.
30
- */
24
+ /** A thread maps one-to-one to its parent message, whose ID is the thread ID. */
31
25
  parentMessage: LocalMessage;
32
26
  participants: ThreadStateResponse['thread_participants'];
33
27
  read: ThreadReadState;
@@ -54,14 +48,9 @@ export type ThreadConfig = {
54
48
  markReadRequest?: CustomThreadMarkReadRequestFn;
55
49
  };
56
50
  };
57
- /**
58
- * Empty because every field of `ThreadConfig` is optional — a thread's own configuration is one handler
59
- * wide. Declared and frozen anyway, so the entity carries the same defaults layer as every other
60
- * configurable class rather than a special case.
61
- */
51
+ /** Empty: every field of `ThreadConfig` is optional. */
62
52
  export declare const DEFAULT_THREAD_CONFIG: ThreadConfig;
63
53
  export declare class Thread extends WithSubscriptions {
64
- /** The shared configuration machinery — see {@link ConfigController}. */
65
54
  private readonly configController;
66
55
  readonly state: StateStore<ThreadState>;
67
56
  readonly id: string;
@@ -70,7 +59,6 @@ export declare class Thread extends WithSubscriptions {
70
59
  readonly messagePaginator: MessagePaginator;
71
60
  private client;
72
61
  private failedRepliesMap;
73
- /** How many activations (`activate()` calls) have not been released yet. */
74
62
  private _activeRefCount;
75
63
  constructor({ client, threadData, channel, parentMessage, draft, }: {
76
64
  client: StreamChat;
@@ -80,55 +68,35 @@ export declare class Thread extends WithSubscriptions {
80
68
  draft?: DraftResponse;
81
69
  });
82
70
  /**
83
- * Derives this thread's configuration — and its reply paginator's — from the declarative slice.
84
- *
85
- * Called by the constructor and by `client.config.reset()`. The thread owns only its own
86
- * `requestHandlers`; the paginator derives its own configuration.
71
+ * Derives this thread's configuration, and its reply paginator's, from the declarative slice.
72
+ * Called by the constructor and by `client.config.reset()`.
87
73
  */
88
74
  initializeConfig(declarativeConfig?: ThreadDeclarativeConfig): void;
89
- /**
90
- * Resolved configuration as a store, so consumers can react to it — the shape every configurable class
91
- * exposes.
92
- */
93
75
  get configState(): StateStore<ThreadConfig>;
76
+ get config(): Readonly<ThreadConfig>;
94
77
  /**
95
- * This thread's resolved configuration. `Readonly` because the value is the store's live object —
96
- * assigning to a field of it would change state without notifying anyone. Use {@link updateConfig}.
78
+ * Merges a partial configuration into the resolved config.
79
+ *
80
+ * @param config - The fields to change.
97
81
  */
98
- get config(): Readonly<ThreadConfig>;
99
- /** Merges a partial configuration into the resolved config and notifies subscribers. */
100
82
  updateConfig(config: Partial<ThreadConfig>): void;
101
83
  get channel(): Channel;
102
84
  get hasStaleState(): boolean;
103
85
  get ownUnreadCount(): number;
104
86
  /**
105
- * Declares that a consumer is displaying this thread, and returns the function that ends it, as
106
- * `channel.activate()` does. Refcounted, as one `Thread` can be held by several consumers at once,
107
- * so it stays active until the last one releases. Each call gets its own release, and calling a
108
- * release again does nothing, so a consumer can't end another one's activation.
109
- *
110
- * `active` is also what {@link ConnectionRecoveryManager} filters on to decide which threads to
111
- * reload on reconnect, so an activation that is never released costs more than a missed auto-read.
87
+ * Declares that a consumer is displaying this thread and returns the function that ends it (as
88
+ * `channel.activate()`). Refcounted: the thread stays active until the last release, and each
89
+ * release is idempotent. `active` selects the threads reloaded on reconnect, so release it.
112
90
  *
113
- * The first activation also keeps the thread in `client.threads` for the rest of the session:
114
- * it stays subscribed and resolvable through `client.threads.get(id)` after it is released,
115
- * whether or not the thread list holds it. Reopening it therefore needs no fetch unless it went stale.
91
+ * The first activation keeps the thread in `client.threads` for the session, subscribed and
92
+ * resolvable through `client.threads.get(id)` after release.
116
93
  */
117
94
  activate: () => (() => void);
118
95
  /**
119
- * Re-queries this thread's replies, sized to the loaded window, and reconciles them in place — the
120
- * thread analogue of {@link Channel.reload}, and what connection recovery calls for every active
121
- * thread.
122
- *
123
- * Preserves failed (unsent) replies. They are read out of the reply paginator rather than out of
124
- * `failedRepliesMap`, because that map is only written by `upsertReplyLocally`, whose callers are
125
- * this thread's own subscriptions and the offline-DB path resolved through `client.threads.get` —
126
- * neither of which covers a thread that was never activated or listed. Reading the paginator
127
- * is true for registered and unregistered threads alike. An overlap merge keeps them anyway (the
128
- * reconcile's provenance guard never prunes a non-server message); only a disjoint rebuild can drop
129
- * them, so any that actually fell out are re-ingested below.
130
- *
131
- * Rethrows, except for a not-found answer on a thread that never had replies (see the catch).
96
+ * Re-queries the replies, sized to the loaded window, and reconciles them in place (the thread
97
+ * analogue of {@link Channel.reload}; recovery calls it for active threads). Failed replies are
98
+ * kept, read from the reply paginator since `failedRepliesMap` misses threads never activated or
99
+ * listed. Rethrows, except for a not-found answer on a thread that never had replies.
132
100
  */
133
101
  reload: () => Promise<void>;
134
102
  hydrateState: (thread: Thread, options?: {
@@ -136,27 +104,11 @@ export declare class Thread extends WithSubscriptions {
136
104
  }) => void;
137
105
  registerSubscriptions: () => void;
138
106
  /**
139
- * Subscribes this thread to the `'thread'` configuration key. Registered through
140
- * `WithSubscriptions`, so `unregisterSubscriptions()` runs the setup function's teardown.
141
- *
142
- * **This is where `Thread` differs from `Channel`,** which subscribes from its constructor. Everything
143
- * below follows from that, and applies to a thread that never calls `registerSubscriptions()`:
144
- *
145
- * - no *setup function* runs for it — matching how `MessageComposer` already behaves;
146
- * - it sees the declarative slice **as it stood when the thread was constructed**, because the
147
- * constructor applies it directly, but no *later* `client.config.set({ thread: … })` or
148
- * `set({ messagePaginator: … })` reaches it;
149
- * - it is absent from the registry's `liveInstances`, so `client.config.reset()` skips it, and
150
- * `hasLiveInstances('thread')` does not count it when deciding whether to warn about a
151
- * construction-only path registered too late.
152
- *
153
- * So read "declarative configuration is unaffected" as *at construction only*. A thread registered
154
- * with a `ThreadManager` that has itself registered is covered — the manager calls
155
- * `registerSubscriptions()` on every thread the list holds or that is active — so the common path
156
- * is fine. A thread that is neither, or held by an unregistered manager, is not.
157
- *
158
- * The alternative — applying the setup function at construction — would break the teardown symmetry
159
- * `WithSubscriptions` provides, which is why the asymmetry stands.
107
+ * Subscribes to the `'thread'` configuration key. Unlike `Channel`, which subscribes in its
108
+ * constructor, a thread that never registers sees the declarative slice only as of construction:
109
+ * no setup function runs, later `client.config.set` calls miss it and `client.config.reset()`
110
+ * skips it. `ThreadManager` registers the threads it holds (listed, `ensure()`d or active) while
111
+ * its own subscriptions are registered.
160
112
  */
161
113
  private subscribeThreadSetupStateChange;
162
114
  handleThreadUpdated: (event: EventPayload<"thread.updated">) => void;