stream-chat 10.0.0-rc.8 → 10.0.0

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 (366) hide show
  1. package/README.md +7 -6
  2. package/dist/cjs/index.browser.js +22095 -22290
  3. package/dist/cjs/index.browser.js.map +4 -4
  4. package/dist/cjs/index.node.js +22143 -22298
  5. package/dist/cjs/index.node.js.map +4 -4
  6. package/dist/esm/index.mjs +22093 -22288
  7. package/dist/esm/index.mjs.map +4 -4
  8. package/dist/types/ChannelManager.d.ts +216 -135
  9. package/dist/types/CooldownTimer.d.ts +16 -27
  10. package/dist/types/EventHandlerPipeline.d.ts +18 -38
  11. package/dist/types/LiveLocationManager.d.ts +25 -47
  12. package/dist/types/api-client.d.ts +17 -5
  13. package/dist/types/channel.d.ts +435 -500
  14. package/dist/types/channel_state.d.ts +72 -112
  15. package/dist/types/client.d.ts +323 -440
  16. package/dist/types/client_state.d.ts +1 -3
  17. package/dist/types/configuration/ConfigController.d.ts +31 -125
  18. package/dist/types/configuration/InstanceConfigurationRegistry.d.ts +32 -124
  19. package/dist/types/configuration/keys.d.ts +5 -19
  20. package/dist/types/configuration/shape.d.ts +12 -29
  21. package/dist/types/configuration/types.d.ts +64 -79
  22. package/dist/types/configuration/utils/applyInstanceConfiguration.d.ts +14 -36
  23. package/dist/types/configuration/utils/copyConfigPatch.d.ts +8 -0
  24. package/dist/types/configuration/utils/declarativeSlices.d.ts +5 -16
  25. package/dist/types/configuration/utils/deepFreezeConfig.d.ts +3 -17
  26. package/dist/types/configuration/utils/serverAuthority.d.ts +9 -29
  27. package/dist/types/connection/ConnectionIdManager.d.ts +45 -0
  28. package/dist/types/connection/ConnectionRecoveryManager.d.ts +84 -0
  29. package/dist/types/connection/index.d.ts +4 -0
  30. package/dist/types/connection/networkConnection/NetworkConnectionObserver.d.ts +82 -0
  31. package/dist/types/connection/networkConnection/index.d.ts +3 -0
  32. package/dist/types/connection/networkConnection/reporters.d.ts +20 -0
  33. package/dist/types/connection/networkConnection/types.d.ts +40 -0
  34. package/dist/types/connection/wsConnection/StableWSConnection.d.ts +137 -0
  35. package/dist/types/connection/wsConnection/WSConnection.d.ts +105 -0
  36. package/dist/types/connection/wsConnection/WSConnectionFallback.d.ts +47 -0
  37. package/dist/types/connection/wsConnection/config.d.ts +31 -0
  38. package/dist/types/connection/wsConnection/index.d.ts +4 -0
  39. package/dist/types/connection/wsConnection/types.d.ts +46 -0
  40. package/dist/types/constants.d.ts +3 -1
  41. package/dist/types/custom_types.d.ts +0 -2
  42. package/dist/types/entityStore/EntityStore.d.ts +226 -65
  43. package/dist/types/entityStore/StoreBackedItemIndex.d.ts +19 -33
  44. package/dist/types/entityStore/index.d.ts +0 -1
  45. package/dist/types/errors.d.ts +16 -19
  46. package/dist/types/formatMessageMemo.d.ts +5 -0
  47. package/dist/types/gen/chat/ChannelApi.d.ts +5 -1
  48. package/dist/types/gen/chat/ChatApi.d.ts +149 -105
  49. package/dist/types/gen/models/index.d.ts +2540 -698
  50. package/dist/types/gen/models/timestamp-guard.d.ts +22 -0
  51. package/dist/types/gen/moderation/ModerationApi.d.ts +37 -14
  52. package/dist/types/index.d.ts +10 -5
  53. package/dist/types/{i18n/languageNames.d.ts → languageNames.d.ts} +9 -24
  54. package/dist/types/logger.d.ts +1 -3
  55. package/dist/types/messageComposer/CustomDataManager.d.ts +7 -1
  56. package/dist/types/messageComposer/LocationComposer.d.ts +8 -2
  57. package/dist/types/messageComposer/attachmentIdentity.d.ts +24 -0
  58. package/dist/types/messageComposer/attachmentManager.d.ts +52 -24
  59. package/dist/types/messageComposer/attachmentUtils.d.ts +23 -0
  60. package/dist/types/messageComposer/configuration/configuration.d.ts +2 -5
  61. package/dist/types/messageComposer/configuration/types.d.ts +38 -50
  62. package/dist/types/messageComposer/index.d.ts +1 -0
  63. package/dist/types/messageComposer/linkPreviewsManager.d.ts +12 -9
  64. package/dist/types/messageComposer/messageComposer.d.ts +60 -123
  65. package/dist/types/messageComposer/middleware/attachmentManager/postUpload/attachmentEnrichment.d.ts +10 -1
  66. package/dist/types/messageComposer/middleware/messageComposer/attachments.d.ts +4 -0
  67. package/dist/types/messageComposer/middleware/messageComposer/commandInjection.d.ts +5 -0
  68. package/dist/types/messageComposer/middleware/messageComposer/index.d.ts +2 -0
  69. package/dist/types/messageComposer/middleware/messageComposer/pollOnly.d.ts +6 -0
  70. package/dist/types/messageComposer/middleware/messageComposer/userDataInjection.d.ts +5 -0
  71. package/dist/types/messageComposer/middleware/pollComposer/types.d.ts +2 -4
  72. package/dist/types/messageComposer/middleware/pollComposer/validation.d.ts +7 -19
  73. package/dist/types/messageComposer/middleware/textComposer/commandUtils.d.ts +4 -0
  74. package/dist/types/messageComposer/middleware/textComposer/commands.d.ts +11 -2
  75. package/dist/types/messageComposer/middleware/textComposer/mentions.d.ts +20 -19
  76. package/dist/types/messageComposer/middleware/textComposer/textMiddlewareUtils.d.ts +9 -3
  77. package/dist/types/messageComposer/middleware/textComposer/types.d.ts +1 -6
  78. package/dist/types/messageComposer/pollComposer.d.ts +15 -5
  79. package/dist/types/messageComposer/textComposer.d.ts +14 -7
  80. package/dist/types/messageComposer/types.d.ts +27 -7
  81. package/dist/types/messageDelivery/MessageDeliveryReporter.d.ts +27 -80
  82. package/dist/types/messageDelivery/MessageReceiptsTracker.d.ts +43 -73
  83. package/dist/types/messageOperations/FailedSendCache.d.ts +29 -0
  84. package/dist/types/messageOperations/MessageOperationStatePolicy.d.ts +16 -22
  85. package/dist/types/messageOperations/MessageOperations.d.ts +63 -34
  86. package/dist/types/messageOperations/applyReactionLocally.d.ts +15 -0
  87. package/dist/types/messageOperations/createMessageOperations.d.ts +9 -0
  88. package/dist/types/messageOperations/index.d.ts +6 -4
  89. package/dist/types/messageOperations/reflectReactionEvent.d.ts +16 -0
  90. package/dist/types/messageOperations/sendOrdering.d.ts +14 -0
  91. package/dist/types/messageOperations/settlePendingAttachmentUploads.d.ts +20 -0
  92. package/dist/types/messageOperations/types.d.ts +43 -14
  93. package/dist/types/middleware.d.ts +10 -0
  94. package/dist/types/moderation.d.ts +21 -14
  95. package/dist/types/notifications/NotificationManager.d.ts +10 -23
  96. package/dist/types/notifications/types.d.ts +21 -57
  97. package/dist/types/offline-support/offline_support_api.d.ts +150 -528
  98. package/dist/types/offline-support/offline_sync_manager.d.ts +21 -42
  99. package/dist/types/offline-support/queueableOperations.d.ts +35 -37
  100. package/dist/types/offline-support/types.d.ts +40 -185
  101. package/dist/types/pagination/FilterBuilder.d.ts +1 -18
  102. package/dist/types/pagination/ItemIndex.d.ts +4 -12
  103. package/dist/types/pagination/cursorDerivation/aroundPaginationFlags.d.ts +13 -0
  104. package/dist/types/pagination/cursorDerivation/createdAtAroundPaginationFlags.d.ts +4 -5
  105. package/dist/types/pagination/cursorDerivation/linearPaginationFlags.d.ts +19 -5
  106. package/dist/types/pagination/index.d.ts +1 -0
  107. package/dist/types/pagination/paginators/BasePaginator.d.ts +604 -550
  108. package/dist/types/pagination/paginators/ChannelPaginator.d.ts +123 -106
  109. package/dist/types/pagination/paginators/MessageIntervalPaginator.d.ts +576 -327
  110. package/dist/types/pagination/paginators/MessagePaginator.d.ts +237 -131
  111. package/dist/types/pagination/paginators/PinnedMessagePaginator.d.ts +15 -26
  112. package/dist/types/pagination/paginators/ReminderPaginator.d.ts +4 -3
  113. package/dist/types/pagination/paginators/ThreadPaginator.d.ts +44 -0
  114. package/dist/types/pagination/paginators/UserGroupPaginator.d.ts +5 -8
  115. package/dist/types/pagination/paginators/index.d.ts +1 -0
  116. package/dist/types/pagination/sortCompiler.d.ts +11 -22
  117. package/dist/types/pagination/utility.normalization.d.ts +8 -13
  118. package/dist/types/pagination/utility.search.d.ts +3 -8
  119. package/dist/types/poll.d.ts +35 -8
  120. package/dist/types/poll_manager.d.ts +12 -2
  121. package/dist/types/poll_optimistic_votes.d.ts +57 -0
  122. package/dist/types/reminders/Reminder.d.ts +17 -7
  123. package/dist/types/reminders/ReminderManager.d.ts +13 -25
  124. package/dist/types/search/BaseSearchSource.d.ts +10 -8
  125. package/dist/types/search/ChannelSearchSource.d.ts +16 -0
  126. package/dist/types/search/MessageSearchSource.d.ts +17 -0
  127. package/dist/types/search/SearchController.d.ts +26 -28
  128. package/dist/types/search/types.d.ts +6 -10
  129. package/dist/types/signing.d.ts +12 -3
  130. package/dist/types/thread.d.ts +67 -129
  131. package/dist/types/thread_manager.d.ts +95 -66
  132. package/dist/types/token_manager.d.ts +8 -13
  133. package/dist/types/types.d.ts +81 -197
  134. package/dist/types/types.utility.d.ts +3 -3
  135. package/dist/types/upload-utils.d.ts +5 -10
  136. package/dist/types/uploadManager.d.ts +31 -11
  137. package/dist/types/utils/FixedSizeQueueCache.d.ts +8 -11
  138. package/dist/types/utils/WithSubscriptions.d.ts +6 -16
  139. package/dist/types/utils/abort.d.ts +17 -0
  140. package/dist/types/utils/concurrency.d.ts +12 -20
  141. package/dist/types/utils/mergeWith/mergeWith.d.ts +8 -11
  142. package/dist/types/utils/mergeWith/mergeWithCore.d.ts +5 -13
  143. package/dist/types/utils/mergeWith/mergeWithDiff.d.ts +22 -0
  144. package/dist/types/utils/objectPath.d.ts +6 -41
  145. package/dist/types/utils/retryable.d.ts +8 -12
  146. package/dist/types/utils/throttling/throttle.d.ts +8 -23
  147. package/dist/types/utils/time.d.ts +45 -0
  148. package/dist/types/utils.d.ts +74 -93
  149. package/package.json +14 -40
  150. package/src/ChannelManager.ts +494 -303
  151. package/src/CooldownTimer.ts +46 -59
  152. package/src/EventHandlerPipeline.ts +22 -45
  153. package/src/LiveLocationManager.ts +99 -91
  154. package/src/api-client.ts +113 -50
  155. package/src/campaign.ts +1 -1
  156. package/src/channel.ts +1098 -1351
  157. package/src/channel_batch_updater.ts +1 -1
  158. package/src/channel_state.ts +81 -174
  159. package/src/client.ts +755 -970
  160. package/src/client_state.ts +3 -8
  161. package/src/configuration/ConfigController.ts +42 -158
  162. package/src/configuration/InstanceConfigurationRegistry.ts +43 -172
  163. package/src/configuration/index.ts +1 -1
  164. package/src/configuration/keys.ts +13 -32
  165. package/src/configuration/shape.ts +169 -59
  166. package/src/configuration/types.ts +69 -92
  167. package/src/configuration/utils/applyInstanceConfiguration.ts +22 -54
  168. package/src/configuration/utils/copyConfigPatch.ts +11 -32
  169. package/src/configuration/utils/declarativeSlices.ts +9 -39
  170. package/src/configuration/utils/deepFreezeConfig.ts +3 -17
  171. package/src/configuration/utils/index.ts +2 -4
  172. package/src/configuration/utils/serverAuthority.ts +20 -68
  173. package/src/connection/ConnectionIdManager.ts +111 -0
  174. package/src/connection/ConnectionRecoveryManager.ts +257 -0
  175. package/src/connection/index.ts +4 -0
  176. package/src/connection/networkConnection/NetworkConnectionObserver.ts +204 -0
  177. package/src/connection/networkConnection/index.ts +3 -0
  178. package/src/connection/networkConnection/reporters.ts +58 -0
  179. package/src/connection/networkConnection/types.ts +45 -0
  180. package/src/{connection.ts → connection/wsConnection/StableWSConnection.ts} +230 -231
  181. package/src/connection/wsConnection/WSConnection.ts +270 -0
  182. package/src/connection/wsConnection/WSConnectionFallback.ts +250 -0
  183. package/src/connection/wsConnection/config.ts +73 -0
  184. package/src/connection/wsConnection/index.ts +4 -0
  185. package/src/connection/wsConnection/types.ts +48 -0
  186. package/src/constants.ts +7 -5
  187. package/src/custom_types.ts +0 -1
  188. package/src/entityStore/EntityStore.ts +415 -79
  189. package/src/entityStore/StoreBackedItemIndex.ts +37 -41
  190. package/src/entityStore/index.ts +0 -1
  191. package/src/errors.ts +39 -20
  192. package/src/formatMessageMemo.ts +17 -0
  193. package/src/gen/chat/ChannelApi.ts +122 -36
  194. package/src/gen/chat/ChatApi.ts +578 -1752
  195. package/src/gen/models/index.ts +2566 -3440
  196. package/src/gen/models/timestamp-guard.ts +27 -0
  197. package/src/gen/moderation/ModerationApi.ts +183 -406
  198. package/src/index.ts +32 -10
  199. package/src/languageNames.ts +88 -0
  200. package/src/logger.ts +1 -3
  201. package/src/messageComposer/CustomDataManager.ts +19 -6
  202. package/src/messageComposer/LocationComposer.ts +49 -9
  203. package/src/messageComposer/MessageComposerEffectHandlers.ts +1 -2
  204. package/src/messageComposer/attachmentIdentity.ts +54 -0
  205. package/src/messageComposer/attachmentManager.ts +170 -185
  206. package/src/messageComposer/attachmentUtils.ts +44 -0
  207. package/src/messageComposer/configuration/configuration.ts +15 -8
  208. package/src/messageComposer/configuration/types.ts +38 -50
  209. package/src/messageComposer/fileUtils.ts +1 -1
  210. package/src/messageComposer/index.ts +1 -0
  211. package/src/messageComposer/linkPreviewsManager.ts +18 -21
  212. package/src/messageComposer/messageComposer.ts +234 -179
  213. package/src/messageComposer/middleware/attachmentManager/postUpload/AttachmentPostUploadMiddlewareExecutor.ts +1 -1
  214. package/src/messageComposer/middleware/attachmentManager/postUpload/attachmentEnrichment.ts +46 -33
  215. package/src/messageComposer/middleware/attachmentManager/postUpload/uploadErrorHandler.ts +4 -1
  216. package/src/messageComposer/middleware/attachmentManager/preUpload/blockedUploadNotification.ts +1 -1
  217. package/src/messageComposer/middleware/messageComposer/MessageComposerMiddlewareExecutor.ts +6 -0
  218. package/src/messageComposer/middleware/messageComposer/attachments.ts +76 -5
  219. package/src/messageComposer/middleware/messageComposer/commandInjection.ts +10 -4
  220. package/src/messageComposer/middleware/messageComposer/customData.ts +17 -5
  221. package/src/messageComposer/middleware/messageComposer/index.ts +2 -0
  222. package/src/messageComposer/middleware/messageComposer/linkPreviews.ts +22 -12
  223. package/src/messageComposer/middleware/messageComposer/pollOnly.ts +9 -1
  224. package/src/messageComposer/middleware/messageComposer/sharedLocation.ts +7 -2
  225. package/src/messageComposer/middleware/messageComposer/textComposer.ts +1 -1
  226. package/src/messageComposer/middleware/messageComposer/userDataInjection.ts +12 -12
  227. package/src/messageComposer/middleware/pollComposer/state.ts +2 -2
  228. package/src/messageComposer/middleware/pollComposer/types.ts +2 -4
  229. package/src/messageComposer/middleware/pollComposer/validation.ts +8 -26
  230. package/src/messageComposer/middleware/textComposer/TextComposerMiddlewareExecutor.ts +8 -6
  231. package/src/messageComposer/middleware/textComposer/commandUtils.ts +10 -3
  232. package/src/messageComposer/middleware/textComposer/commands.ts +11 -16
  233. package/src/messageComposer/middleware/textComposer/mentions.ts +32 -70
  234. package/src/messageComposer/middleware/textComposer/textMiddlewareUtils.ts +10 -4
  235. package/src/messageComposer/middleware/textComposer/types.ts +1 -6
  236. package/src/messageComposer/pollComposer.ts +21 -9
  237. package/src/messageComposer/textComposer.ts +37 -57
  238. package/src/messageComposer/types.ts +39 -11
  239. package/src/messageDelivery/MessageDeliveryReporter.ts +86 -124
  240. package/src/messageDelivery/MessageReceiptsTracker.ts +122 -139
  241. package/src/messageOperations/FailedSendCache.ts +85 -0
  242. package/src/messageOperations/MessageOperationStatePolicy.ts +124 -116
  243. package/src/messageOperations/MessageOperations.ts +297 -175
  244. package/src/{entityStore → messageOperations}/applyReactionLocally.ts +13 -25
  245. package/src/messageOperations/createMessageOperations.ts +176 -0
  246. package/src/messageOperations/index.ts +6 -14
  247. package/src/messageOperations/reflectReactionEvent.ts +43 -0
  248. package/src/messageOperations/sendOrdering.ts +25 -0
  249. package/src/messageOperations/settlePendingAttachmentUploads.ts +98 -0
  250. package/src/messageOperations/types.ts +51 -13
  251. package/src/middleware.ts +13 -5
  252. package/src/moderation.ts +25 -21
  253. package/src/notifications/NotificationManager.ts +19 -28
  254. package/src/notifications/types.ts +21 -57
  255. package/src/offline-support/offline_support_api.ts +231 -681
  256. package/src/offline-support/offline_sync_manager.ts +51 -90
  257. package/src/offline-support/queueableOperations.ts +98 -73
  258. package/src/offline-support/types.ts +43 -185
  259. package/src/pagination/FilterBuilder.ts +1 -22
  260. package/src/pagination/ItemIndex.ts +4 -12
  261. package/src/pagination/cursorDerivation/aroundPaginationFlags.ts +29 -0
  262. package/src/pagination/cursorDerivation/createdAtAroundPaginationFlags.ts +17 -62
  263. package/src/pagination/cursorDerivation/idAroundPaginationFlags.ts +11 -39
  264. package/src/pagination/cursorDerivation/linearPaginationFlags.ts +53 -33
  265. package/src/pagination/filterCompiler.ts +11 -25
  266. package/src/pagination/index.ts +1 -0
  267. package/src/pagination/paginators/BasePaginator.ts +1415 -1041
  268. package/src/pagination/paginators/ChannelPaginator.ts +481 -219
  269. package/src/pagination/paginators/MessageIntervalPaginator.ts +1362 -775
  270. package/src/pagination/paginators/MessagePaginator.ts +521 -240
  271. package/src/pagination/paginators/PinnedMessagePaginator.ts +32 -40
  272. package/src/pagination/paginators/ReminderPaginator.ts +21 -16
  273. package/src/pagination/paginators/ThreadPaginator.ts +170 -0
  274. package/src/pagination/paginators/UserGroupPaginator.ts +18 -15
  275. package/src/pagination/paginators/index.ts +1 -0
  276. package/src/pagination/paginators/stateThrottling.ts +5 -10
  277. package/src/pagination/sortCompiler.ts +23 -50
  278. package/src/pagination/utility.normalization.ts +17 -24
  279. package/src/pagination/utility.search.ts +4 -11
  280. package/src/poll.ts +183 -102
  281. package/src/poll_manager.ts +24 -22
  282. package/src/poll_optimistic_votes.ts +335 -0
  283. package/src/reminders/Reminder.ts +33 -16
  284. package/src/reminders/ReminderManager.ts +23 -56
  285. package/src/reminders/ReminderTimer.ts +6 -6
  286. package/src/search/BaseSearchSource.ts +19 -25
  287. package/src/search/ChannelSearchSource.ts +43 -1
  288. package/src/search/MessageSearchSource.ts +77 -13
  289. package/src/search/SearchController.ts +39 -36
  290. package/src/search/types.ts +6 -10
  291. package/src/segment.ts +1 -1
  292. package/src/signing.ts +23 -3
  293. package/src/thread.ts +430 -712
  294. package/src/thread_manager.ts +300 -234
  295. package/src/token_manager.ts +12 -22
  296. package/src/types.ts +102 -214
  297. package/src/types.utility.ts +3 -3
  298. package/src/upload-utils.ts +5 -10
  299. package/src/uploadManager.ts +64 -18
  300. package/src/utils/FixedSizeQueueCache.ts +18 -21
  301. package/src/utils/WithSubscriptions.ts +6 -16
  302. package/src/utils/abort.ts +45 -0
  303. package/src/utils/concurrency.ts +16 -55
  304. package/src/utils/mergeWith/mergeWith.ts +10 -13
  305. package/src/utils/mergeWith/mergeWithCore.ts +24 -81
  306. package/src/utils/mergeWith/mergeWithDiff.ts +15 -33
  307. package/src/utils/objectPath.ts +6 -41
  308. package/src/utils/retryable.ts +10 -14
  309. package/src/utils/throttling/throttle.ts +9 -25
  310. package/src/utils/time.ts +64 -0
  311. package/src/utils.ts +227 -174
  312. package/codegen/i18n/callSites.ts +0 -126
  313. package/codegen/i18n/generate.ts +0 -226
  314. package/codegen/i18n/guards.ts +0 -178
  315. package/codegen/i18n/index.ts +0 -29
  316. package/codegen/i18n/stringMaps.ts +0 -91
  317. package/codegen/i18n/types.ts +0 -100
  318. package/dist/cjs/i18n.browser.js +0 -1131
  319. package/dist/cjs/i18n.browser.js.map +0 -7
  320. package/dist/cjs/i18n.node.js +0 -1160
  321. package/dist/cjs/i18n.node.js.map +0 -7
  322. package/dist/esm/i18n-codegen.mjs +0 -409
  323. package/dist/esm/i18n-codegen.mjs.map +0 -7
  324. package/dist/esm/i18n.mjs +0 -1098
  325. package/dist/esm/i18n.mjs.map +0 -7
  326. package/dist/types/ConnectionRecoveryManager.d.ts +0 -156
  327. package/dist/types/connection.d.ts +0 -139
  328. package/dist/types/entityStore/applyReactionLocally.d.ts +0 -26
  329. package/dist/types/gen/model-decoders/decoders.d.ts +0 -3
  330. package/dist/types/gen/model-decoders/event-decoder-mapping.d.ts +0 -6
  331. package/dist/types/i18n/Streami18n.d.ts +0 -168
  332. package/dist/types/i18n/TranslationBuilder.d.ts +0 -70
  333. package/dist/types/i18n/TranslationStore.d.ts +0 -57
  334. package/dist/types/i18n/dayjs.d.ts +0 -104
  335. package/dist/types/i18n/formatters.d.ts +0 -91
  336. package/dist/types/i18n/index.d.ts +0 -15
  337. package/dist/types/i18n/translator.d.ts +0 -29
  338. package/dist/types/i18n/types.d.ts +0 -262
  339. package/dist/types/i18n-codegen/callSites.d.ts +0 -10
  340. package/dist/types/i18n-codegen/generate.d.ts +0 -15
  341. package/dist/types/i18n-codegen/guards.d.ts +0 -61
  342. package/dist/types/i18n-codegen/index.d.ts +0 -29
  343. package/dist/types/i18n-codegen/stringMaps.d.ts +0 -14
  344. package/dist/types/i18n-codegen/types.d.ts +0 -94
  345. package/dist/types/insights.d.ts +0 -56
  346. package/dist/types/messageOperations/optimistic.d.ts +0 -118
  347. package/dist/types/messageOperations/persistence.d.ts +0 -21
  348. package/dist/types/pagination/utility.queryChannel.d.ts +0 -26
  349. package/dist/types/store.d.ts +0 -125
  350. package/src/ConnectionRecoveryManager.ts +0 -293
  351. package/src/gen/model-decoders/decoders.ts +0 -2710
  352. package/src/gen/model-decoders/event-decoder-mapping.ts +0 -198
  353. package/src/i18n/Streami18n.ts +0 -520
  354. package/src/i18n/TranslationBuilder.ts +0 -176
  355. package/src/i18n/TranslationStore.ts +0 -96
  356. package/src/i18n/dayjs.ts +0 -228
  357. package/src/i18n/formatters.ts +0 -461
  358. package/src/i18n/index.ts +0 -15
  359. package/src/i18n/languageNames.ts +0 -103
  360. package/src/i18n/translator.ts +0 -76
  361. package/src/i18n/types.ts +0 -375
  362. package/src/insights.ts +0 -82
  363. package/src/messageOperations/optimistic.ts +0 -249
  364. package/src/messageOperations/persistence.ts +0 -40
  365. package/src/pagination/utility.queryChannel.ts +0 -84
  366. package/src/store.ts +0 -304
@@ -1,28 +1,17 @@
1
1
  /**
2
- * Holds the configuration an integrator registers for classes the SDK constructs on their behalf —
3
- * `Channel`, `Thread`, `MessageComposer` and the client's own managers. Reached as `client.config`.
2
+ * Holds the configuration an integrator registers for classes the SDK constructs (`Channel`, `Thread`,
3
+ * `MessageComposer`, the client's managers). Reached as `client.config`, one per client. Not to be
4
+ * confused with `client.channelServerConfigs` (server-provided channel configs).
4
5
  *
5
- * Not to be confused with `client.channelServerConfigs`, which holds the **server-provided channel configs**.
6
+ * Two ways in: `set(tree)` / `setConfig(key, subtree)` register values, and `setSetupFunction(key, fn)`
7
+ * is the escape hatch for behaviour a value cannot express. Declarative configuration applies first, so
8
+ * a setup function wins for the same field.
6
9
  *
7
- * There are two ways in, over one mechanism:
8
- *
9
- * - `set(tree)` / `setConfig(key, subtree)` — declarative values (page sizes, throttles, feature
10
- * flags). The primary surface.
11
- * - `setSetupFunction(key, fn)` — an imperative escape hatch for behaviour that cannot be expressed as
12
- * a value (middleware, comparators, custom request logic).
13
- *
14
- * Declarative configuration is applied before the setup function, so a setup function always wins for
15
- * the same field.
16
- *
17
- * The key space is **fixed** by this package: `InstanceConfigTree` and `InstanceSetupFunctionArgs` are type
18
- * aliases, so a key can be neither misspelled into existence nor added by module augmentation. Stores are
19
- * still created lazily, because for any key the setter and the subscriber can arrive in either order.
20
- *
21
- * One service per client, not a singleton: a process-global registry would leak configuration between
22
- * clients, which breaks tests and apps that connect as more than one user.
10
+ * The key space is closed by the types. Stores are created lazily, since a setter and a subscriber for
11
+ * a key can arrive in either order.
23
12
  */
24
13
 
25
- import { StateStore } from '../store';
14
+ import { StateStore } from '@stream-io/state-store';
26
15
  import { chatLoggerSystem } from '../logger';
27
16
  import { mergeWith } from '../utils/mergeWith';
28
17
  import { isEqual } from '../utils/mergeWith/mergeWithCore';
@@ -43,92 +32,41 @@ import type { DeepPartial } from '../types.utility';
43
32
  const logger = chatLoggerSystem.getLogger('instance-configuration');
44
33
 
45
34
  /**
46
- * Registered by `applyInstanceConfiguration` on behalf of one live instance. The service holds these
47
- * so `reset` can reach every live instance of a key, and so the registry can tell whether a key has any
48
- * live instance at all.
35
+ * A live instance registered by `applyInstanceConfiguration`, so `reset` can reach it and the registry
36
+ * can tell whether a key has any live instance.
49
37
  *
50
38
  * @internal
51
39
  */
52
- /**
53
- * A handle to one live instance that derives configuration from a key.
54
- *
55
- * Deliberately just the re-derivation hook rather than the instance itself: the registry never reads an
56
- * instance's configuration, it only needs a way to tell the instance to rebuild.
57
- */
58
40
  export type ConfiguredInstance = {
59
- /** The instance's own `initializeConfig`, bound. Invoked by `reset` after both slots are cleared. */
41
+ /** The instance's `initializeConfig`, bound. Invoked by `reset` after both slots are cleared. */
60
42
  reinitializeConfig?: () => void;
61
43
  };
62
44
 
63
- // Stores are keyed by an open string, so their value types cannot be correlated with the key at this
64
- // level. Callers narrow through `getSetupState` / `getConfigState`.
45
+ // Keyed by plain string, so value types cannot be tied to the key here. Callers narrow through
46
+ // `getSetupState` / `getConfigState`.
65
47
  type AnySetupStore = StateStore<InstanceSetupState<InstanceSetupKey>>;
66
48
  type AnyConfigStore = StateStore<InstanceConfigState<InstanceConfigKey>>;
67
49
 
68
50
  export class InstanceConfigurationRegistry {
69
51
  /**
70
- * **Setup functions** — the second of the two ways to configure, known as *tier 2* because tier 2 is
71
- * applied after tier 1 and therefore wins for the same field. Keyed by configuration key: the function
72
- * registered for `'channel'`, `'messageComposer'` and so on, each wrapped in a store so that registering
73
- * a setup function is observable.
74
- *
75
- * A setup function receives the instance and may do anything, including the things plain data cannot
76
- * express — branch on the instance, install middleware, swap another function in. Declarative
77
- * configuration ({@link configStates}) is the other way, and carries values only.
78
- *
79
- * A store rather than a bare function because timing is not guaranteed in either direction. Instances
80
- * subscribe to the store for the relevant key, so a setup function registered after those instances were
81
- * built still reaches every one of them, and an instance built afterwards picks up the setup function
82
- * already sitting in the store.
83
- *
84
- * Entries appear on first access through {@link getSetupState}, never up front — the key space is open,
85
- * so the full set of keys is not knowable here.
52
+ * Setup function per key, each in a store so that instances built before or after a registration both
53
+ * see it. Applied after declarative configuration, so it wins for the same field.
86
54
  */
87
55
  private setupStates = new Map<string, AnySetupStore>();
88
56
 
89
57
  /**
90
- * **Declarative configuration** — the first of the two ways to configure, known as *tier 1* because
91
- * tier 1 is applied before tier 2 and is therefore the layer a setup function overrides. Keyed by
92
- * configuration key: the subtree registered through {@link InstanceConfigurationRegistry.set} or
93
- * {@link InstanceConfigurationRegistry.setConfig}, `null` until a caller registers something.
94
- *
95
- * Plain data, no code — the ordinary way to configure, and the reason a configuration tree can be
96
- * written as JSON. Anything needing code goes through a setup function ({@link setupStates}).
97
- *
98
- * These stores hold **registered intent only** — the values an integrator asked for. The value an
99
- * instance ended up with lives on the instance itself, as `configState`, after defaults, construction
100
- * arguments, the setup function and the server's restrictions have all been applied. Reading a
101
- * declarative store answers "what was asked for", never "what is in effect".
102
- *
103
- * Entries appear on first access through {@link getConfigState}, matching `setupStates`.
58
+ * Registered declarative values per key (`null` until set). Registered intent only: the value in
59
+ * effect is the instance's own `configState`.
104
60
  */
105
61
  private configStates = new Map<string, AnyConfigStore>();
106
62
 
107
63
  /**
108
- * The instances currently alive that derive configuration from each key — a `Channel` under
109
- * `'channel'`, a `MessageComposer` under `'messageComposer'`, and so on. `applyInstanceConfiguration`
110
- * adds an entry when an instance is constructed, and the callback returned by
111
- * {@link registerInstance} removes the entry when that instance is disposed of. Liveness is the whole
112
- * point of the map: a disposed instance must neither be re-derived nor counted.
113
- *
114
- * A single instance appears under several keys, because registration also covers every key named in
115
- * `alsoWatch` — a `Channel` is registered under `'channel'`, `'messagePaginator'` and
116
- * `'messageOperations'`. {@link reset} de-duplicates across keys so that one reset re-derives each
117
- * instance once rather than once per key.
118
- *
119
- * Two features read the map. {@link reset} walks the registered instances and makes each one re-derive,
120
- * once both configuration slots are cleared. {@link hasLiveInstances} answers the narrower question
121
- * "have instances already been built for this key?", which is what separates a construction-only path
122
- * registered too late — worth a warning, because already-built instances will never see the value — from
123
- * the same path registered before construction, where the value applies normally.
64
+ * Live instances per key. One instance sits under several keys when it passes `alsoWatch`, and `reset`
65
+ * de-duplicates across them.
124
66
  */
125
67
  private liveInstances = new Map<string, Set<ConfiguredInstance>>();
126
68
 
127
- /**
128
- * The setup-function store for a key, created on first access. Lazy creation is a correctness
129
- * requirement rather than an optimization: for a key the SDK does not define, neither the setter nor
130
- * the subscriber can be assumed to come first.
131
- */
69
+ /** The setup-function store for a key, created on first access. */
132
70
  getSetupState<K extends InstanceSetupKey>(key: K): StateStore<InstanceSetupState<K>> {
133
71
  let store = this.setupStates.get(key);
134
72
  if (!store) {
@@ -152,10 +90,6 @@ export class InstanceConfigurationRegistry {
152
90
  return store as unknown as StateStore<InstanceConfigState<K>>;
153
91
  }
154
92
 
155
- // -------------------------------------------------------------------------
156
- // Tier 2 — setup functions
157
- // -------------------------------------------------------------------------
158
-
159
93
  /**
160
94
  * Registers the setup function for a key, replacing any previous one (whose teardown runs first) and
161
95
  * applying it to every live instance. Pass `null` to clear.
@@ -172,18 +106,12 @@ export class InstanceConfigurationRegistry {
172
106
  return this.getSetupState(key).getLatestValue().setupFunction;
173
107
  }
174
108
 
175
- // -------------------------------------------------------------------------
176
- // Tier 1 — declarative configuration
177
- // -------------------------------------------------------------------------
178
-
179
109
  /**
180
110
  * Registers declarative configuration for several keys at once. Deep-merges into whatever is already
181
111
  * registered, so a later call only affects the paths it names.
182
112
  */
183
113
  set(tree: DeepPartial<InstanceConfigTree>): void {
184
114
  for (const [key, subtree] of Object.entries(tree)) {
185
- // Skip absent entries but keep going — one empty or unrecognized entry must never discard the
186
- // rest of the tree.
187
115
  if (subtree === undefined || subtree === null) continue;
188
116
  this.setConfig(
189
117
  key as InstanceConfigKey,
@@ -204,11 +132,8 @@ export class InstanceConfigurationRegistry {
204
132
  const current = store.getLatestValue().config;
205
133
  const next = mergeWith(
206
134
  { ...((current ?? {}) as Record<string, unknown>) },
207
- // Copied at the boundary. `mergeWith` reuses a source subtree verbatim where the target has nothing,
208
- // and on a first registration the target is empty — so without this the registry aliased the caller's
209
- // objects, and a later `patch.text.maxLengthOnSend = 5` changed resolved configuration behind every
210
- // live instance's back, with no notification. Functions and class instances pass through by reference,
211
- // which is what a caller hands over rather than a structure to merge into.
135
+ // Copied because `mergeWith` reuses source subtrees verbatim, which would alias the caller's
136
+ // objects. Functions and class instances pass through by reference.
212
137
  copyConfigPatch(config) as unknown as object,
213
138
  ) as DeepPartial<InstanceConfigOf<K>>;
214
139
 
@@ -222,22 +147,12 @@ export class InstanceConfigurationRegistry {
222
147
  }
223
148
 
224
149
  /**
225
- * Everything currently registered, as one tree.
226
- *
227
- * Built for the case `getConfig(key)` cannot serve: enumerating what has been configured without
228
- * knowing the keys up front — a settings UI, a diagnostic dump, or a test asserting that every
229
- * configurable thing has a place in the tree.
230
- *
231
- * Includes custom keys alongside the built-in ones, since both are equally real. Keys with nothing
232
- * registered are omitted rather than emitted as `{}`, so an empty result means "nothing configured"
233
- * instead of "five empty subtrees". This is *registered intent*, not resolved values — for those, read
234
- * the instance's `config`.
150
+ * Everything currently registered, as one tree. Keys with nothing registered are omitted. This is
151
+ * registered intent, not resolved values: for those, read the instance's `config`.
235
152
  */
236
153
  getTree(): DeepPartial<InstanceConfigTree> {
237
154
  const tree: Record<string, unknown> = {};
238
155
 
239
- // The store map is keyed by a plain string — every entry was created through a typed setter, so the
240
- // cast recovers what the type system already guaranteed at the call site.
241
156
  for (const key of this.configStates.keys() as Iterable<InstanceConfigKey>) {
242
157
  const config = this.getConfigState(key).getLatestValue().config;
243
158
  if (config && Object.keys(config).length > 0) tree[key] = config;
@@ -246,23 +161,12 @@ export class InstanceConfigurationRegistry {
246
161
  return tree as DeepPartial<InstanceConfigTree>;
247
162
  }
248
163
 
249
- // -------------------------------------------------------------------------
250
- // Reset
251
- // -------------------------------------------------------------------------
252
-
253
164
  /**
254
- * Returns the given key — or every key that has been touched — to its baseline: clears the
255
- * declarative configuration, clears the setup function (running its teardown), then has every live
256
- * instance re-derive its configuration from current inputs.
257
- *
258
- * Re-derivation, rather than restoring a saved copy, is what makes this recover a known state even
259
- * when a setup function's teardown was incomplete; teardowns are integrator-written. It also
260
- * re-installs constructor-set behaviour (a `PinnedMessagePaginator`'s `doRequest` and comparators)
261
- * that no snapshot of configuration values could have restored.
165
+ * Returns the key (or every touched key) to its baseline: clears declarative configuration and the
166
+ * setup function (running its teardown), then has every live instance re-derive its configuration.
262
167
  *
263
- * This does **not** undo setup-function changes made *outside* the configuration surface — inserted
264
- * middleware, added subscriptions. The contract is that configuration returns to its derived
265
- * baseline, not that the object returns to factory state.
168
+ * Does not undo what a setup function changed outside the configuration surface (inserted
169
+ * middleware, added subscriptions).
266
170
  */
267
171
  reset(key?: InstanceConfigKey): void {
268
172
  const keys =
@@ -280,25 +184,16 @@ export class InstanceConfigurationRegistry {
280
184
  this.getConfigState(currentKey as InstanceConfigKey).partialNext({
281
185
  config: null,
282
186
  });
283
- // Clearing the setup function runs its teardown through the subscription in
284
- // `applyInstanceConfiguration`. Teardown first, re-derivation last, so a buggy teardown cannot
285
- // undo the re-derivation.
286
- //
287
- // Read rather than created: a configuration-only key such as `messagePaginator` has no setup
288
- // function, and anything subscribed to one already has a store in this map.
187
+ // Teardown runs through the subscription in `applyInstanceConfiguration`, before re-derivation.
188
+ // Read, not created: a configuration-only key such as `messagePaginator` has no setup function.
289
189
  this.setupStates.get(currentKey)?.partialNext({ setupFunction: null });
290
190
  }
291
191
  } finally {
292
192
  this.resetting = false;
293
193
  }
294
194
 
295
- // Every slot is cleared before anything re-derives, and each instance runs **once** even when it is
296
- // registered under several keys — a `Channel` is registered under `channel`, `messagePaginator` and
297
- // `messageOperations`.
298
- //
299
- // Both halves of that need {@link isResetting}. Without it the loop above re-derives an instance as
300
- // each key is cleared, so it derives against a *half-cleared* tree — the opposite of "every slot is
301
- // cleared first" — and once per populated key rather than once in total.
195
+ // Every slot is cleared before anything re-derives, and each instance re-derives once even when it
196
+ // is registered under several keys. `isResetting` keeps the clearing loop from re-deriving early.
302
197
  const instancesToReinitialize = new Set<ConfiguredInstance>();
303
198
  for (const currentKey of keys) {
304
199
  for (const instance of this.liveInstances.get(currentKey) ?? []) {
@@ -318,13 +213,8 @@ export class InstanceConfigurationRegistry {
318
213
  private resetting = false;
319
214
 
320
215
  /**
321
- * Whether {@link reset} is currently clearing slots.
322
- *
323
- * `applyInstanceConfiguration` reads it to skip the per-key notifications the clearing loop emits: an
324
- * instance that supplied a `reinitializeConfig` is guaranteed exactly one re-derivation in reset's final
325
- * phase, so reacting to each individual clear would only re-derive it repeatedly, and against a tree
326
- * that is not finished being cleared. Teardown is *not* skipped — it lives in the helper's closure and
327
- * has no other route.
216
+ * Whether {@link reset} is clearing slots. `applyInstanceConfiguration` uses it to skip the per-key
217
+ * notifications for instances that reset re-derives itself.
328
218
  *
329
219
  * @internal
330
220
  */
@@ -332,10 +222,6 @@ export class InstanceConfigurationRegistry {
332
222
  return this.resetting;
333
223
  }
334
224
 
335
- // -------------------------------------------------------------------------
336
- // Consumer registry
337
- // -------------------------------------------------------------------------
338
-
339
225
  /**
340
226
  * Called by `applyInstanceConfiguration`. Returns the deregistration function.
341
227
  *
@@ -362,17 +248,10 @@ export class InstanceConfigurationRegistry {
362
248
  return (this.liveInstances.get(key)?.size ?? 0) > 0;
363
249
  }
364
250
 
365
- // -------------------------------------------------------------------------
366
- // Diagnostics
367
- // -------------------------------------------------------------------------
368
-
369
251
  /**
370
- * The key space is closed by the types, so a misspelling is a compile error — but a JavaScript caller, or
371
- * a cast past the types, can still reach this with a key nothing will ever read.
372
- *
373
- * Warns rather than throwing, because a throw here would turn a no-op registration into a crash for a
374
- * caller the types already warned. The live-instance check keeps it quiet for a key whose owner has not
375
- * been constructed yet, which is the normal ordering.
252
+ * Warns, rather than throws, when a key this package does not define (a JavaScript caller or a
253
+ * cast) is registered while no live instance uses it. Quiet once an instance has subscribed under
254
+ * the key.
376
255
  */
377
256
  private warnIfKeyLooksUnknown(key: InstanceConfigKey): void {
378
257
  if ((INSTANCE_CONFIG_TREE_KEYS as readonly string[]).includes(key)) return;
@@ -387,21 +266,14 @@ export class InstanceConfigurationRegistry {
387
266
  }
388
267
 
389
268
  /**
390
- * Paths read once during construction cannot take effect on instances that already exist. That is
391
- * precisely detectable, so it warns — the one `warn` in this API, because unlike the debug-level
392
- * diagnostics it fires only when configuration genuinely did not apply.
393
- *
394
- * Only paths whose value actually **moves** warn. Re-registering a value identical to the one already
395
- * stored changes nothing, so there is nothing that failed to apply and nothing to report — and without
396
- * this, a settings UI that applies on every keystroke, or any `set()` on a render path, produced one
397
- * warning per call about a value that had not changed. Measured before the guard: 100 identical
398
- * `setConfig` calls, 100 warnings.
269
+ * Warns when paths read once during construction are registered after instances exist, since those
270
+ * instances will not see them. Only paths whose registered value changes warn.
399
271
  */
400
272
  private warnAboutLateConstructionOnlyPaths(
401
273
  key: InstanceConfigKey,
402
274
  config: DeepPartial<InstanceConfigOf<InstanceSetupKey>>,
403
275
  ): void {
404
- if (!this.hasLiveInstances(key)) return; // nothing constructed yet — these will apply
276
+ if (!this.hasLiveInstances(key)) return; // nothing constructed yet: these will apply
405
277
 
406
278
  const paths = CONSTRUCTION_ONLY_CONFIG_PATHS[key];
407
279
  if (!paths || !isWalkableRecord(config)) return;
@@ -411,9 +283,8 @@ export class InstanceConfigurationRegistry {
411
283
 
412
284
  const late = paths.filter((path) => {
413
285
  if (!hasPath(config, path)) return false;
414
- // Compared against what is registered rather than what the instance resolved to: this diagnostic is
415
- // about a *registration* arriving too late, and the instance's own value may legitimately differ
416
- // (a setup function or the server may have moved it).
286
+ // Compared against what is registered, not what the instance resolved to (which a setup function
287
+ // or the server may have moved).
417
288
  if (!registered || !hasPath(registered, path)) return true;
418
289
  return !isEqual(getPath(registered, path), getPath(config, path));
419
290
  });
@@ -1,7 +1,7 @@
1
1
  export * from './shape';
2
2
  export * from './types';
3
3
  export * from './utils';
4
- // The service is reached as `client.config`, never constructed by integrators — export the type only.
4
+ // Reached as `client.config`, never constructed by integrators: export the type only.
5
5
  export type {
6
6
  ConfiguredInstance,
7
7
  InstanceConfigurationRegistry,
@@ -1,17 +1,8 @@
1
1
  import type { InstanceConfigTree, InstanceSetupFunctionArgs } from './types';
2
2
 
3
3
  /**
4
- * The configuration key space, as values rather than types — which is why these live here and not in
5
- * `types.ts`: that module is types only, and a constant in it is invisible to anyone scanning for
6
- * runtime behaviour.
7
- */
8
-
9
- /**
10
- * The keys this package wires itself, i.e. the ones that take a setup function. Used to scope
11
- * diagnostics only; the key space is closed by the types, so there is nothing here to reject.
12
- *
13
- * Exported for the settings UI in `examples/vite`, which enumerates the tree. Diagnostics rather than
14
- * API: the contents track whatever this package happens to wire, so they can change in a minor.
4
+ * The keys that take a setup function. Exported for settings UIs that enumerate the tree; the contents
5
+ * track what this package wires, so they can change in a minor.
15
6
  *
16
7
  * @internal
17
8
  */
@@ -25,14 +16,9 @@ export const BUILT_IN_INSTANCE_KEYS: readonly (keyof InstanceSetupFunctionArgs)[
25
16
  ];
26
17
 
27
18
  /**
28
- * Every key of the declarative configuration tree.
29
- *
30
- * Distinct from {@link BUILT_IN_INSTANCE_KEYS}, which lists keys that take a *setup function* — that set
31
- * omits `messagePaginator`, which is configuration-only. Typed as an exhaustive `Record` rather than a
32
- * bare array so adding a key to {@link InstanceConfigTree} fails the build until it is listed here, which
33
- * is what keeps the two from drifting.
34
- *
35
- * The exported array is diagnostics, not API — a new key is a minor, and this list grows with it.
19
+ * Every key of the declarative tree, including configuration-only ones such as `messagePaginator`
20
+ * (unlike {@link BUILT_IN_INSTANCE_KEYS}). An exhaustive `Record`, so adding a key to
21
+ * {@link InstanceConfigTree} fails the build until it is listed here.
36
22
  *
37
23
  * @internal
38
24
  */
@@ -52,25 +38,20 @@ export const INSTANCE_CONFIG_TREE_KEYS = Object.keys(
52
38
  ).sort() as readonly (keyof InstanceConfigTree)[];
53
39
 
54
40
  /**
55
- * Dot-paths, per key, that are read once during construction. Configuration registered *before* an
56
- * instance is built reaches these through constructor options; registered afterwards it cannot, so the
57
- * appliers warn rather than fail silently.
58
- *
59
- * `stateThrottleMs` and `debounceMs` are read once too but are **not** listed, because a late change to
60
- * either is re-applied by the config controller's change hook.
61
- *
62
- * Exported for the settings UI, which flags these paths. Diagnostics rather than API: the set tracks
63
- * which fields happen to be read once, so it can change in a minor.
41
+ * Dot-paths, per key, read once during construction. Registered after an instance exists they cannot
42
+ * take effect, so the registry warns. `stateThrottleMs` and `debounceMs` are not listed: a late change
43
+ * is re-applied by the config controller's change hook. Exported for settings UIs that flag these paths.
64
44
  *
65
45
  * @internal
66
46
  */
67
47
  export const CONSTRUCTION_ONLY_CONFIG_PATHS: Readonly<Record<string, readonly string[]>> =
68
48
  {
69
- // The shared key needs its own entry: paths here are relative to the key's own subtree, and the
70
- // warning is looked up by top-level key. Without this, setting `unreadReferencePolicy` through
71
- // `messagePaginator` was silent while the identical field under `channel`/`thread` warned — the same
72
- // read-once field, warned through one route and not the other.
49
+ // The shared key needs its own entry: paths are relative to the key's subtree, and the warning is
50
+ // looked up by top-level key.
73
51
  messagePaginator: ['initialCursor', 'initialOffset', 'unreadReferencePolicy'],
52
+ // Consumed while the client is constructed (axios instance, base URL, notification manager).
53
+ // `browser` and `persistUserOnConnectionFailure` are read when needed, so they are not listed.
54
+ client: ['axiosRequestConfig', 'baseURL', 'notificationManager'],
74
55
  channel: [
75
56
  'messagePaginator.initialCursor',
76
57
  'messagePaginator.initialOffset',