doover-js 0.10.1 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. package/README.md +79 -0
  2. package/dist/apis/_args.js +5 -5
  3. package/dist/apis/agents-api.d.ts +4 -4
  4. package/dist/apis/agents-api.js +2 -2
  5. package/dist/apis/aggregates-api.d.ts +4 -4
  6. package/dist/apis/aggregates-api.js +5 -5
  7. package/dist/apis/alarms-api.d.ts +8 -2
  8. package/dist/apis/alarms-api.js +9 -2
  9. package/dist/apis/channels-api.d.ts +3 -3
  10. package/dist/apis/channels-api.js +6 -6
  11. package/dist/apis/connections-api.d.ts +2 -2
  12. package/dist/apis/connections-api.js +6 -6
  13. package/dist/apis/messages-api.d.ts +4 -4
  14. package/dist/apis/messages-api.js +11 -11
  15. package/dist/apis/notifications-api.d.ts +21 -2
  16. package/dist/apis/notifications-api.js +20 -3
  17. package/dist/apis/organisations-api.d.ts +2 -2
  18. package/dist/apis/permissions-api.d.ts +2 -2
  19. package/dist/apis/permissions-api.js +3 -3
  20. package/dist/apis/processors-api.d.ts +2 -2
  21. package/dist/apis/turn-api.d.ts +2 -2
  22. package/dist/apis/users-api.d.ts +2 -2
  23. package/dist/auth/auth-store.d.ts +1 -1
  24. package/dist/auth/build-auth.d.ts +3 -3
  25. package/dist/auth/build-auth.js +8 -8
  26. package/dist/auth/cookie-auth.d.ts +1 -1
  27. package/dist/auth/cookie-auth.js +2 -2
  28. package/dist/auth/doover-auth.d.ts +2 -2
  29. package/dist/auth/doover-token-auth.d.ts +3 -3
  30. package/dist/auth/doover-token-auth.js +13 -13
  31. package/dist/auth/index.d.ts +10 -0
  32. package/dist/auth/index.js +15 -0
  33. package/dist/client/data-client.d.ts +14 -14
  34. package/dist/client/doover-client.d.ts +7 -7
  35. package/dist/client/doover-client.js +42 -42
  36. package/dist/client/errors.d.ts +2 -2
  37. package/dist/client/errors.js +4 -4
  38. package/dist/client/index.d.ts +4 -0
  39. package/dist/client/index.js +9 -0
  40. package/dist/client/local-agent-client.d.ts +3 -3
  41. package/dist/client/local-agent-client.js +19 -19
  42. package/dist/client/multiplex-client.d.ts +5 -5
  43. package/dist/client/multiplex-client.js +28 -25
  44. package/dist/client/multiplex-gateway.d.ts +3 -3
  45. package/dist/client/multiplex-merge.d.ts +1 -1
  46. package/dist/client/offline-cache.d.ts +2 -2
  47. package/dist/client/offline-cache.js +16 -16
  48. package/dist/client/provenance.d.ts +1 -1
  49. package/dist/client/request-options.d.ts +1 -1
  50. package/dist/client/singleton.d.ts +2 -2
  51. package/dist/client/singleton.js +2 -2
  52. package/dist/client/status-tracker.d.ts +1 -1
  53. package/dist/esm/apis/_args.d.ts +16 -0
  54. package/dist/esm/apis/_args.js +27 -0
  55. package/dist/esm/apis/agents-api.d.ts +196 -0
  56. package/dist/esm/apis/agents-api.js +327 -0
  57. package/dist/esm/apis/aggregates-api.d.ts +67 -0
  58. package/dist/esm/apis/aggregates-api.js +64 -0
  59. package/dist/esm/apis/alarms-api.d.ts +48 -0
  60. package/dist/esm/apis/alarms-api.js +75 -0
  61. package/dist/esm/apis/channels-api.d.ts +83 -0
  62. package/dist/esm/apis/channels-api.js +65 -0
  63. package/dist/esm/apis/connections-api.d.ts +45 -0
  64. package/dist/esm/apis/connections-api.js +44 -0
  65. package/dist/esm/apis/messages-api.d.ts +128 -0
  66. package/dist/esm/apis/messages-api.js +179 -0
  67. package/dist/esm/apis/notifications-api.d.ts +94 -0
  68. package/dist/esm/apis/notifications-api.js +153 -0
  69. package/dist/esm/apis/organisations-api.d.ts +26 -0
  70. package/dist/esm/apis/organisations-api.js +41 -0
  71. package/dist/esm/apis/permissions-api.d.ts +17 -0
  72. package/dist/esm/apis/permissions-api.js +23 -0
  73. package/dist/esm/apis/processors-api.d.ts +56 -0
  74. package/dist/esm/apis/processors-api.js +97 -0
  75. package/dist/esm/apis/turn-api.d.ts +7 -0
  76. package/dist/esm/apis/turn-api.js +8 -0
  77. package/dist/esm/apis/users-api.d.ts +8 -0
  78. package/dist/esm/apis/users-api.js +9 -0
  79. package/dist/esm/auth/auth-profile.d.ts +45 -0
  80. package/dist/esm/auth/auth-profile.js +68 -0
  81. package/dist/esm/auth/auth-store.d.ts +14 -0
  82. package/dist/esm/auth/build-auth.d.ts +38 -0
  83. package/dist/esm/auth/build-auth.js +92 -0
  84. package/dist/esm/auth/cookie-auth.d.ts +91 -0
  85. package/dist/esm/auth/cookie-auth.js +196 -0
  86. package/dist/esm/auth/doover-auth.d.ts +52 -0
  87. package/dist/esm/auth/doover-auth.js +28 -0
  88. package/dist/esm/auth/doover-token-auth.d.ts +39 -0
  89. package/dist/esm/auth/doover-token-auth.js +217 -0
  90. package/dist/esm/auth/errors.d.ts +3 -0
  91. package/dist/esm/auth/errors.js +6 -0
  92. package/dist/esm/auth/index.d.ts +10 -0
  93. package/dist/esm/auth/index.js +6 -0
  94. package/dist/esm/auth/jwt.d.ts +6 -0
  95. package/dist/esm/auth/jwt.js +26 -0
  96. package/dist/esm/client/capabilities.d.ts +10 -0
  97. package/dist/esm/client/capabilities.js +42 -0
  98. package/dist/esm/client/data-client.d.ts +104 -0
  99. package/dist/esm/client/doover-client.d.ts +46 -0
  100. package/dist/esm/client/doover-client.js +94 -0
  101. package/dist/esm/client/errors.d.ts +32 -0
  102. package/dist/esm/client/errors.js +64 -0
  103. package/dist/esm/client/index.d.ts +4 -0
  104. package/dist/esm/client/index.js +2 -0
  105. package/dist/esm/client/local-agent-client.d.ts +65 -0
  106. package/dist/esm/client/local-agent-client.js +225 -0
  107. package/dist/esm/client/multiplex-client.d.ts +165 -0
  108. package/dist/esm/client/multiplex-client.js +842 -0
  109. package/dist/esm/client/multiplex-gateway.d.ts +49 -0
  110. package/dist/esm/client/multiplex-gateway.js +110 -0
  111. package/dist/esm/client/multiplex-merge.d.ts +12 -0
  112. package/dist/esm/client/multiplex-merge.js +38 -0
  113. package/dist/esm/client/offline-cache.d.ts +162 -0
  114. package/dist/esm/client/offline-cache.js +757 -0
  115. package/dist/esm/client/provenance.d.ts +60 -0
  116. package/dist/esm/client/provenance.js +108 -0
  117. package/dist/esm/client/request-options.d.ts +23 -0
  118. package/dist/esm/client/request-options.js +23 -0
  119. package/dist/esm/client/singleton.d.ts +26 -0
  120. package/dist/esm/client/singleton.js +54 -0
  121. package/dist/esm/client/stats.d.ts +79 -0
  122. package/dist/esm/client/stats.js +155 -0
  123. package/dist/esm/client/status-tracker.d.ts +24 -0
  124. package/dist/esm/client/status-tracker.js +86 -0
  125. package/dist/esm/gateway/gateway-client.d.ts +86 -0
  126. package/dist/esm/gateway/gateway-client.js +463 -0
  127. package/dist/esm/gateway/index.d.ts +3 -0
  128. package/dist/esm/gateway/index.js +1 -0
  129. package/dist/esm/gateway/types.d.ts +142 -0
  130. package/dist/esm/http/errors.d.ts +19 -0
  131. package/dist/esm/http/errors.js +22 -0
  132. package/dist/esm/http/index.d.ts +3 -0
  133. package/dist/esm/http/index.js +2 -0
  134. package/dist/esm/http/rest-client.d.ts +62 -0
  135. package/dist/esm/http/rest-client.js +181 -0
  136. package/dist/esm/index.d.ts +62 -0
  137. package/dist/esm/index.js +37 -0
  138. package/dist/esm/node/config-manager.d.ts +34 -0
  139. package/dist/esm/node/config-manager.js +140 -0
  140. package/dist/esm/node/index.d.ts +1 -0
  141. package/dist/esm/node/index.js +1 -0
  142. package/dist/esm/package.json +1 -0
  143. package/dist/esm/react/context.d.ts +23 -0
  144. package/dist/esm/react/context.js +28 -0
  145. package/dist/esm/react/index.d.ts +38 -0
  146. package/dist/esm/react/index.js +21 -0
  147. package/dist/esm/react/messageRangeStore.d.ts +93 -0
  148. package/dist/esm/react/messageRangeStore.js +140 -0
  149. package/dist/esm/react/sharedQueryClient.d.ts +21 -0
  150. package/dist/esm/react/sharedQueryClient.js +35 -0
  151. package/dist/esm/react/useAgentChannel.d.ts +8 -0
  152. package/dist/esm/react/useAgentChannel.js +9 -0
  153. package/dist/esm/react/useAgentConnections.d.ts +8 -0
  154. package/dist/esm/react/useAgentConnections.js +20 -0
  155. package/dist/esm/react/useAgentTokenState.d.ts +70 -0
  156. package/dist/esm/react/useAgentTokenState.js +127 -0
  157. package/dist/esm/react/useChannelAggregate.d.ts +64 -0
  158. package/dist/esm/react/useChannelAggregate.js +77 -0
  159. package/dist/esm/react/useChannelMessage.d.ts +45 -0
  160. package/dist/esm/react/useChannelMessage.js +79 -0
  161. package/dist/esm/react/useChannelMessages.d.ts +83 -0
  162. package/dist/esm/react/useChannelMessages.js +214 -0
  163. package/dist/esm/react/useChannelSubscription.d.ts +27 -0
  164. package/dist/esm/react/useChannelSubscription.js +30 -0
  165. package/dist/esm/react/useClientStatus.d.ts +10 -0
  166. package/dist/esm/react/useClientStatus.js +19 -0
  167. package/dist/esm/react/useConnectionState.d.ts +26 -0
  168. package/dist/esm/react/useConnectionState.js +45 -0
  169. package/dist/esm/react/useDeviceMap.d.ts +109 -0
  170. package/dist/esm/react/useDeviceMap.js +59 -0
  171. package/dist/esm/react/useInvocationLogs.d.ts +23 -0
  172. package/dist/esm/react/useInvocationLogs.js +37 -0
  173. package/dist/esm/react/useMultiAgentAggregates.d.ts +38 -0
  174. package/dist/esm/react/useMultiAgentAggregates.js +104 -0
  175. package/dist/esm/react/useMultiAgentChannelMessages.d.ts +79 -0
  176. package/dist/esm/react/useMultiAgentChannelMessages.js +169 -0
  177. package/dist/esm/react/useOfflineStatus.d.ts +8 -0
  178. package/dist/esm/react/useOfflineStatus.js +23 -0
  179. package/dist/esm/react/useSendMessage.d.ts +16 -0
  180. package/dist/esm/react/useSendMessage.js +26 -0
  181. package/dist/esm/react/useSendRpc.d.ts +68 -0
  182. package/dist/esm/react/useSendRpc.js +164 -0
  183. package/dist/esm/react/useTurnCredentials.d.ts +12 -0
  184. package/dist/esm/react/useTurnCredentials.js +22 -0
  185. package/dist/esm/react/useUpdateAggregate.d.ts +27 -0
  186. package/dist/esm/react/useUpdateAggregate.js +39 -0
  187. package/dist/esm/react/useUpdateMessage.d.ts +38 -0
  188. package/dist/esm/react/useUpdateMessage.js +36 -0
  189. package/dist/esm/refine/index.d.ts +72 -0
  190. package/dist/esm/refine/index.js +215 -0
  191. package/dist/esm/rpc/errors.d.ts +10 -0
  192. package/dist/esm/rpc/errors.js +19 -0
  193. package/dist/esm/rpc/index.d.ts +3 -0
  194. package/dist/esm/rpc/index.js +2 -0
  195. package/dist/esm/rpc/rpc-dispatcher.d.ts +41 -0
  196. package/dist/esm/rpc/rpc-dispatcher.js +141 -0
  197. package/dist/esm/types/audit.d.ts +53 -0
  198. package/dist/esm/types/audit.js +11 -0
  199. package/dist/esm/types/batch.d.ts +85 -0
  200. package/dist/esm/types/batch.js +42 -0
  201. package/dist/esm/types/common.d.ts +250 -0
  202. package/dist/esm/types/connection.d.ts +72 -0
  203. package/dist/esm/types/connection.js +7 -0
  204. package/dist/esm/types/index.d.ts +9 -0
  205. package/dist/esm/types/openapi.d.ts +195 -0
  206. package/dist/esm/types/provenance.d.ts +45 -0
  207. package/dist/esm/types/viewer.d.ts +122 -0
  208. package/dist/esm/utils/snowflake.d.ts +21 -0
  209. package/dist/esm/utils/snowflake.js +33 -0
  210. package/dist/esm/viewer/doover-data-provider.d.ts +90 -0
  211. package/dist/esm/viewer/doover-data-provider.js +189 -0
  212. package/dist/esm/viewer/path-parsing.d.ts +5 -0
  213. package/dist/esm/viewer/path-parsing.js +35 -0
  214. package/dist/gateway/gateway-client.d.ts +5 -5
  215. package/dist/gateway/gateway-client.js +5 -5
  216. package/dist/gateway/index.d.ts +3 -0
  217. package/dist/gateway/index.js +5 -0
  218. package/dist/gateway/types.d.ts +1 -1
  219. package/dist/http/index.d.ts +3 -0
  220. package/dist/http/index.js +9 -0
  221. package/dist/http/rest-client.d.ts +3 -3
  222. package/dist/http/rest-client.js +2 -2
  223. package/dist/index.d.ts +62 -62
  224. package/dist/index.js +88 -88
  225. package/dist/node/config-manager.d.ts +2 -2
  226. package/dist/node/config-manager.js +5 -5
  227. package/dist/node/index.d.ts +1 -1
  228. package/dist/node/index.js +2 -2
  229. package/dist/react/context.d.ts +1 -1
  230. package/dist/react/index.d.ts +38 -38
  231. package/dist/react/index.js +59 -59
  232. package/dist/react/messageRangeStore.d.ts +1 -1
  233. package/dist/react/useAgentChannel.d.ts +3 -3
  234. package/dist/react/useAgentChannel.js +2 -2
  235. package/dist/react/useAgentConnections.d.ts +1 -1
  236. package/dist/react/useAgentConnections.js +2 -2
  237. package/dist/react/useAgentTokenState.d.ts +3 -3
  238. package/dist/react/useAgentTokenState.js +8 -8
  239. package/dist/react/useChannelAggregate.d.ts +3 -3
  240. package/dist/react/useChannelAggregate.js +8 -8
  241. package/dist/react/useChannelMessage.d.ts +2 -2
  242. package/dist/react/useChannelMessage.js +4 -4
  243. package/dist/react/useChannelMessages.d.ts +3 -3
  244. package/dist/react/useChannelMessages.js +10 -10
  245. package/dist/react/useChannelSubscription.d.ts +2 -2
  246. package/dist/react/useChannelSubscription.js +2 -2
  247. package/dist/react/useClientStatus.d.ts +1 -1
  248. package/dist/react/useClientStatus.js +2 -2
  249. package/dist/react/useConnectionState.js +2 -2
  250. package/dist/react/useDeviceMap.js +2 -2
  251. package/dist/react/useInvocationLogs.d.ts +1 -1
  252. package/dist/react/useInvocationLogs.js +2 -2
  253. package/dist/react/useMultiAgentAggregates.d.ts +1 -1
  254. package/dist/react/useMultiAgentAggregates.js +5 -5
  255. package/dist/react/useMultiAgentChannelMessages.d.ts +1 -1
  256. package/dist/react/useMultiAgentChannelMessages.js +2 -2
  257. package/dist/react/useOfflineStatus.d.ts +2 -2
  258. package/dist/react/useOfflineStatus.js +2 -2
  259. package/dist/react/useSendMessage.d.ts +2 -2
  260. package/dist/react/useSendMessage.js +2 -2
  261. package/dist/react/useSendRpc.d.ts +2 -2
  262. package/dist/react/useSendRpc.js +2 -2
  263. package/dist/react/useTurnCredentials.d.ts +2 -2
  264. package/dist/react/useTurnCredentials.js +2 -2
  265. package/dist/react/useUpdateAggregate.d.ts +3 -3
  266. package/dist/react/useUpdateAggregate.js +4 -4
  267. package/dist/react/useUpdateMessage.d.ts +2 -2
  268. package/dist/react/useUpdateMessage.js +2 -2
  269. package/dist/refine/index.d.ts +1 -1
  270. package/dist/rpc/errors.d.ts +1 -1
  271. package/dist/rpc/index.d.ts +3 -0
  272. package/dist/rpc/index.js +7 -0
  273. package/dist/rpc/rpc-dispatcher.d.ts +4 -4
  274. package/dist/rpc/rpc-dispatcher.js +2 -2
  275. package/dist/types/common.d.ts +48 -1
  276. package/dist/types/index.d.ts +9 -0
  277. package/dist/types/index.js +2 -0
  278. package/dist/types/openapi.d.ts +30 -4
  279. package/dist/types/viewer.d.ts +2 -2
  280. package/dist/viewer/doover-data-provider.d.ts +10 -10
  281. package/dist/viewer/doover-data-provider.js +25 -25
  282. package/dist/viewer/path-parsing.d.ts +1 -1
  283. package/package.json +795 -8
  284. package/dist/test/api-args.test.js +0 -48
  285. package/dist/test/api-overloads.test.d.ts +0 -9
  286. package/dist/test/api-overloads.test.js +0 -330
  287. package/dist/test/apis.test.js +0 -381
  288. package/dist/test/auth.test.js +0 -708
  289. package/dist/test/batch-apis.test.js +0 -183
  290. package/dist/test/capabilities.test.js +0 -27
  291. package/dist/test/config-manager.test.js +0 -160
  292. package/dist/test/data-client-errors.test.js +0 -24
  293. package/dist/test/data-client-shape.test.js +0 -28
  294. package/dist/test/doover-client-dataclient.test.d.ts +0 -1
  295. package/dist/test/doover-client-dataclient.test.js +0 -58
  296. package/dist/test/doover-client-provenance.test.d.ts +0 -1
  297. package/dist/test/doover-client-provenance.test.js +0 -32
  298. package/dist/test/doover-client.test.d.ts +0 -1
  299. package/dist/test/doover-client.test.js +0 -42
  300. package/dist/test/doover-data-provider.test.d.ts +0 -1
  301. package/dist/test/doover-data-provider.test.js +0 -657
  302. package/dist/test/exports.test.d.ts +0 -1
  303. package/dist/test/exports.test.js +0 -80
  304. package/dist/test/gateway-client.test.d.ts +0 -1
  305. package/dist/test/gateway-client.test.js +0 -474
  306. package/dist/test/gateway-provenance.test.d.ts +0 -1
  307. package/dist/test/gateway-provenance.test.js +0 -29
  308. package/dist/test/gateway-subscriptions.test.d.ts +0 -1
  309. package/dist/test/gateway-subscriptions.test.js +0 -95
  310. package/dist/test/helpers.d.ts +0 -32
  311. package/dist/test/helpers.js +0 -115
  312. package/dist/test/local-agent-client.test.d.ts +0 -1
  313. package/dist/test/local-agent-client.test.js +0 -202
  314. package/dist/test/message-range-store.test.d.ts +0 -1
  315. package/dist/test/message-range-store.test.js +0 -183
  316. package/dist/test/multiplex-capabilities.test.d.ts +0 -1
  317. package/dist/test/multiplex-capabilities.test.js +0 -37
  318. package/dist/test/multiplex-conflicts.test.d.ts +0 -1
  319. package/dist/test/multiplex-conflicts.test.js +0 -35
  320. package/dist/test/multiplex-gateway.test.d.ts +0 -1
  321. package/dist/test/multiplex-gateway.test.js +0 -103
  322. package/dist/test/multiplex-merge.test.d.ts +0 -1
  323. package/dist/test/multiplex-merge.test.js +0 -19
  324. package/dist/test/multiplex-noncore.test.d.ts +0 -1
  325. package/dist/test/multiplex-noncore.test.js +0 -82
  326. package/dist/test/multiplex-passthrough.test.d.ts +0 -1
  327. package/dist/test/multiplex-passthrough.test.js +0 -35
  328. package/dist/test/multiplex-reads.test.d.ts +0 -1
  329. package/dist/test/multiplex-reads.test.js +0 -87
  330. package/dist/test/multiplex-registry.test.d.ts +0 -1
  331. package/dist/test/multiplex-registry.test.js +0 -81
  332. package/dist/test/multiplex-routing.test.d.ts +0 -1
  333. package/dist/test/multiplex-routing.test.js +0 -45
  334. package/dist/test/multiplex-status.test.d.ts +0 -1
  335. package/dist/test/multiplex-status.test.js +0 -63
  336. package/dist/test/multiplex-writes.test.d.ts +0 -1
  337. package/dist/test/multiplex-writes.test.js +0 -93
  338. package/dist/test/offline-cache.test.d.ts +0 -1
  339. package/dist/test/offline-cache.test.js +0 -289
  340. package/dist/test/provenance-regression.test.d.ts +0 -1
  341. package/dist/test/provenance-regression.test.js +0 -45
  342. package/dist/test/provenance-stamper.test.d.ts +0 -1
  343. package/dist/test/provenance-stamper.test.js +0 -41
  344. package/dist/test/provenance-type.test.d.ts +0 -1
  345. package/dist/test/provenance-type.test.js +0 -15
  346. package/dist/test/react-channel-messages-forward.test.d.ts +0 -1
  347. package/dist/test/react-channel-messages-forward.test.js +0 -139
  348. package/dist/test/react-channel-messages-range.test.d.ts +0 -1
  349. package/dist/test/react-channel-messages-range.test.js +0 -109
  350. package/dist/test/react-client-status.test.d.ts +0 -1
  351. package/dist/test/react-client-status.test.js +0 -35
  352. package/dist/test/react-dataclient.test.d.ts +0 -1
  353. package/dist/test/react-dataclient.test.js +0 -28
  354. package/dist/test/react-exports.test.d.ts +0 -1
  355. package/dist/test/react-exports.test.js +0 -46
  356. package/dist/test/react-multiagent-messages.test.d.ts +0 -1
  357. package/dist/test/react-multiagent-messages.test.js +0 -113
  358. package/dist/test/react-sources-option.test.d.ts +0 -1
  359. package/dist/test/react-sources-option.test.js +0 -41
  360. package/dist/test/react.test.d.ts +0 -1
  361. package/dist/test/react.test.js +0 -482
  362. package/dist/test/refine.test.d.ts +0 -1
  363. package/dist/test/refine.test.js +0 -71
  364. package/dist/test/rest-client.test.d.ts +0 -1
  365. package/dist/test/rest-client.test.js +0 -197
  366. package/dist/test/rpc-dispatcher.test.d.ts +0 -1
  367. package/dist/test/rpc-dispatcher.test.js +0 -251
  368. package/dist/test/singleton.test.d.ts +0 -1
  369. package/dist/test/singleton.test.js +0 -62
  370. package/dist/test/stats-rpc.test.d.ts +0 -1
  371. package/dist/test/stats-rpc.test.js +0 -69
  372. package/dist/test/status-tracker.test.d.ts +0 -1
  373. package/dist/test/status-tracker.test.js +0 -85
  374. package/dist/test/users-api.test.d.ts +0 -1
  375. package/dist/test/users-api.test.js +0 -19
  376. package/dist/test/utils.test.d.ts +0 -1
  377. package/dist/test/utils.test.js +0 -64
  378. /package/dist/{test/api-args.test.d.ts → esm/auth/auth-store.js} +0 -0
  379. /package/dist/{test/apis.test.d.ts → esm/client/data-client.js} +0 -0
  380. /package/dist/{test/auth.test.d.ts → esm/gateway/types.js} +0 -0
  381. /package/dist/{test/batch-apis.test.d.ts → esm/types/common.js} +0 -0
  382. /package/dist/{test/capabilities.test.d.ts → esm/types/index.js} +0 -0
  383. /package/dist/{test/config-manager.test.d.ts → esm/types/openapi.js} +0 -0
  384. /package/dist/{test/data-client-errors.test.d.ts → esm/types/provenance.js} +0 -0
  385. /package/dist/{test/data-client-shape.test.d.ts → esm/types/viewer.js} +0 -0
package/README.md CHANGED
@@ -2,6 +2,85 @@
2
2
 
3
3
  TypeScript client for Doover.
4
4
 
5
+ ## Tree shaking and smaller imports
6
+
7
+ The package publishes native ES modules for `import` and CommonJS for `require`.
8
+ Production bundlers can remove unused exports from the ESM build. Keep your
9
+ application's imports as ESM until bundling, and enable the bundler's production
10
+ optimisations. CommonJS consumers retain compatibility and can use the focused
11
+ entry points to load less code.
12
+
13
+ Applications that use the shared cloud client can keep their startup pattern:
14
+
15
+ ```ts
16
+ import { getDooverClient } from "doover-js/client";
17
+
18
+ const client = getDooverClient(config);
19
+ ```
20
+
21
+ This entry point shares the root entry's singleton and excludes offline, local,
22
+ multiplex, and React implementations from the cloud startup bundle.
23
+
24
+ ```ts
25
+ import { extractSnowflakeId } from "doover-js/utils";
26
+ import { RestClient } from "doover-js/http";
27
+ import { ChannelsApi } from "doover-js/apis/channels";
28
+
29
+ const rest = new RestClient({
30
+ dataRestUrl: "https://example.com/api",
31
+ controlApiUrl: "https://example.com/control",
32
+ dataWssUrl: "wss://example.com/gateway",
33
+ });
34
+ const channels = new ChannelsApi(rest);
35
+ const items = await channels.listChannels("my-agent");
36
+ ```
37
+
38
+ This composition uses ambient cookies. For token auth or cookie refresh, pass an
39
+ auth instance from `doover-js/auth` as the second argument to `RestClient`.
40
+ `RestClient` does not build auth from token fields in its configuration.
41
+ The low-level API classes return server data directly. They do not add the
42
+ `DataClient` provenance, status, or capability behaviour supplied by `DooverClient`.
43
+
44
+ | Import path | Use |
45
+ | --- | --- |
46
+ | `doover-js/client` | Cloud `DooverClient`, singleton helpers, and client types |
47
+ | `doover-js/local` | `LocalAgentClient` |
48
+ | `doover-js/multiplex` | `MultiplexClient` |
49
+ | `doover-js/offline` | Offline wrapper and storage adapter |
50
+ | `doover-js/http`, `doover-js/auth`, `doover-js/gateway`, `doover-js/rpc` | Individual transports and auth |
51
+ | `doover-js/apis/<resource>` | `agents`, `aggregates`, `alarms`, `channels`, `connections`, `messages`, `notifications`, `organisations`, `permissions`, `processors`, `turn`, or `users` |
52
+ | `doover-js/utils`, `doover-js/batch` | Snowflake and batch helpers |
53
+ | `doover-js/types` | Shared types, used with `import type` |
54
+ | `doover-js/capabilities`, `doover-js/errors`, `doover-js/request-options`, `doover-js/stats` | Shared client helpers |
55
+ | `doover-js/viewer` | Legacy `DooverDataProvider` |
56
+ | `doover-js/react/context` | `DooverProvider` and `useDooverClient`, without React Query |
57
+ | `doover-js/react/<hook>` | Each exported hook module, such as `useClientStatus` or `useChannelMessages` |
58
+ | `doover-js/react/sharedQueryClient` | Shared query client helpers |
59
+ | `doover-js/node`, `doover-js/react`, `doover-js/refine` | Existing integration entry points |
60
+
61
+ Related token mutation hooks share `doover-js/react/useAgentTokenState`.
62
+ All existing root exports remain available. A named ESM import from the root can
63
+ be as small as the equivalent focused import. Importing `DooverClient` still
64
+ includes its APIs, gateway, RPC, stats, and legacy viewer because its constructor
65
+ uses them. Choosing `doover-js/client` does not remove those features.
66
+
67
+ The `module` export condition directs supporting bundlers to one ESM copy even
68
+ when dependencies mix `import` and `require`. In native Node.js, or with bundlers
69
+ that disable this condition, use one module format throughout each application
70
+ runtime. Loading both builds creates separate class identities and React contexts,
71
+ although the existing global client and query-client helpers still share their caches.
72
+ The native ESM build has named exports. Replace an implicit CommonJS default import
73
+ such as `import doover from "doover-js"` with named imports or
74
+ `import * as doover from "doover-js"` when migrating to ESM.
75
+ Use TypeScript's `node16`, `nodenext`, or `bundler` module resolution for conditional
76
+ declarations. `typesVersions` also supports legacy `node` resolution.
77
+
78
+ The [HTML optimisation plan](docs/optimisation-plan.html) contains the size
79
+ comparison, remaining costs, and proposed API changes. Run `npm run size` to build
80
+ the package, check its published entry points, and write current bundle measurements
81
+ to `docs/optimisation-sizes.json`. Run `npm test` for type checking, the existing
82
+ tests, and package compatibility and size checks.
83
+
5
84
  ## Exports
6
85
 
7
86
  ### Root (`doover-js`)
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveChannelArgs = resolveChannelArgs;
4
4
  exports.resolveAgentArgs = resolveAgentArgs;
5
- const request_options_1 = require("../client/request-options");
5
+ const request_options_js_1 = require("../client/request-options.js");
6
6
  function resolveChannelArgs(args) {
7
7
  if (typeof args[0] === "string") {
8
- const options = (0, request_options_1.isDooverRequestOptions)(args[2]) ? undefined : args[2];
8
+ const options = (0, request_options_js_1.isDooverRequestOptions)(args[2]) ? undefined : args[2];
9
9
  return {
10
10
  agentId: args[0],
11
11
  channelName: args[1],
@@ -13,7 +13,7 @@ function resolveChannelArgs(args) {
13
13
  };
14
14
  }
15
15
  const id = args[0];
16
- const options = (0, request_options_1.isDooverRequestOptions)(args[1]) ? undefined : args[1];
16
+ const options = (0, request_options_js_1.isDooverRequestOptions)(args[1]) ? undefined : args[1];
17
17
  return {
18
18
  agentId: id.agentId,
19
19
  channelName: id.channelName,
@@ -22,10 +22,10 @@ function resolveChannelArgs(args) {
22
22
  }
23
23
  function resolveAgentArgs(args) {
24
24
  if (typeof args[0] === "string") {
25
- const options = (0, request_options_1.isDooverRequestOptions)(args[1]) ? undefined : args[1];
25
+ const options = (0, request_options_js_1.isDooverRequestOptions)(args[1]) ? undefined : args[1];
26
26
  return { agentId: args[0], options: options };
27
27
  }
28
28
  const id = args[0];
29
- const options = (0, request_options_1.isDooverRequestOptions)(args[1]) ? undefined : args[1];
29
+ const options = (0, request_options_js_1.isDooverRequestOptions)(args[1]) ? undefined : args[1];
30
30
  return { agentId: id.agentId, options: options };
31
31
  }
@@ -1,7 +1,7 @@
1
- import type { AgentAggregate, BatchMessagesResponse } from "../types/openapi";
2
- import type { AgentsResponse, GetAgentsOptions } from "../types/viewer";
3
- import type { RestClient } from "../http/rest-client";
4
- import type { DooverRequestOptions } from "../client/request-options";
1
+ import type { AgentAggregate, BatchMessagesResponse } from "../types/openapi.js";
2
+ import type { AgentsResponse, GetAgentsOptions } from "../types/viewer.js";
3
+ import type { RestClient } from "../http/rest-client.js";
4
+ import type { DooverRequestOptions } from "../client/request-options.js";
5
5
  export interface MultiAgentMessagesParams {
6
6
  agent_id: string[];
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AgentsApi = void 0;
4
- const snowflake_1 = require("../utils/snowflake");
4
+ const snowflake_js_1 = require("../utils/snowflake.js");
5
5
  function isPlainObject(value) {
6
6
  return typeof value === "object" && value !== null && !Array.isArray(value);
7
7
  }
@@ -158,7 +158,7 @@ class AgentsApi {
158
158
  const { agent_id, agent_before, ...rest } = params;
159
159
  const stampTimestamps = (response) => ({
160
160
  ...response,
161
- results: response.results.map((message) => "timestamp" in message ? message : (0, snowflake_1.addTimestampToMessage)(message)),
161
+ results: response.results.map((message) => "timestamp" in message ? message : (0, snowflake_js_1.addTimestampToMessage)(message)),
162
162
  });
163
163
  if (agent_id.length <= MULTI_AGENT_CHUNK_SIZE) {
164
164
  const response = await this.rest.get(path, params);
@@ -1,7 +1,7 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { Aggregate } from "../types/openapi";
3
- import type { DooverRequestOptions } from "../client/request-options";
4
- import { type BatchAggregateResponse, type BatchAggregateUpdateItem } from "../types/batch";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { Aggregate } from "../types/openapi.js";
3
+ import type { DooverRequestOptions } from "../client/request-options.js";
4
+ import { type BatchAggregateResponse, type BatchAggregateUpdateItem } from "../types/batch.js";
5
5
  export interface AggregateMutationParams {
6
6
  suppress_response?: boolean;
7
7
  clear_attachments?: boolean;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AggregatesApi = void 0;
4
- const _args_1 = require("./_args");
5
- const batch_1 = require("../types/batch");
4
+ const _args_js_1 = require("./_args.js");
5
+ const batch_js_1 = require("../types/batch.js");
6
6
  class AggregatesApi {
7
7
  constructor(rest) {
8
8
  this.rest = rest;
@@ -17,15 +17,15 @@ class AggregatesApi {
17
17
  const responses = [];
18
18
  // Sequential: the point of batching is to stop hammering the write path,
19
19
  // so firing every chunk at once would defeat it.
20
- for (const chunk of (0, batch_1.chunkBatchItems)(items)) {
20
+ for (const chunk of (0, batch_js_1.chunkBatchItems)(items)) {
21
21
  responses.push(await this.rest.patch("/agents/aggregates", {
22
22
  items: chunk,
23
23
  }));
24
24
  }
25
- return (0, batch_1.mergeBatchResponses)(responses);
25
+ return (0, batch_js_1.mergeBatchResponses)(responses);
26
26
  }
27
27
  getAggregate(...args) {
28
- const { agentId, channelName } = (0, _args_1.resolveChannelArgs)(args);
28
+ const { agentId, channelName } = (0, _args_js_1.resolveChannelArgs)(args);
29
29
  return this._getAggregate(agentId, channelName);
30
30
  }
31
31
  _getAggregate(agentId, channelName) {
@@ -1,8 +1,14 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { Alarm, CreateAlarmRequest, PatchAlarmRequest } from "../types/openapi";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { Alarm, CreateAlarmRequest, PatchAlarmRequest } from "../types/openapi.js";
3
3
  export declare class AlarmsApi {
4
4
  private readonly rest;
5
5
  constructor(rest: RestClient);
6
+ /** Every alarm on every channel of an agent the caller can see. */
7
+ listAgentAlarms(agentId: string): Promise<Alarm[]>;
8
+ listAgentAlarms(identifier: {
9
+ agentId: string;
10
+ }): Promise<Alarm[]>;
11
+ private _listAgentAlarms;
6
12
  listAlarms(agentId: string, channelName: string): Promise<Alarm[]>;
7
13
  listAlarms(identifier: {
8
14
  agentId: string;
@@ -1,13 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AlarmsApi = void 0;
4
- const _args_1 = require("./_args");
4
+ const _args_js_1 = require("./_args.js");
5
5
  class AlarmsApi {
6
6
  constructor(rest) {
7
7
  this.rest = rest;
8
8
  }
9
+ listAgentAlarms(...args) {
10
+ const { agentId } = (0, _args_js_1.resolveAgentArgs)(args);
11
+ return this._listAgentAlarms(agentId);
12
+ }
13
+ _listAgentAlarms(agentId) {
14
+ return this.rest.get(`/agents/${agentId}/alarms`);
15
+ }
9
16
  listAlarms(...args) {
10
- const { agentId, channelName } = (0, _args_1.resolveChannelArgs)(args);
17
+ const { agentId, channelName } = (0, _args_js_1.resolveChannelArgs)(args);
11
18
  return this._listAlarms(agentId, channelName);
12
19
  }
13
20
  _listAlarms(agentId, channelName) {
@@ -1,6 +1,6 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { Channel, CreateChannelRequest, DataSeries, PutChannelRequest } from "../types/openapi";
3
- import type { DooverRequestOptions } from "../client/request-options";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { Channel, CreateChannelRequest, DataSeries, PutChannelRequest } from "../types/openapi.js";
3
+ import type { DooverRequestOptions } from "../client/request-options.js";
4
4
  export interface ListChannelsOptions {
5
5
  include_aggregate?: boolean;
6
6
  include_daily_summaries?: boolean;
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChannelsApi = void 0;
4
- const _args_1 = require("./_args");
4
+ const _args_js_1 = require("./_args.js");
5
5
  class ChannelsApi {
6
6
  constructor(rest) {
7
7
  this.rest = rest;
8
8
  }
9
9
  listChannels(...args) {
10
- const { agentId, options } = (0, _args_1.resolveAgentArgs)(args);
10
+ const { agentId, options } = (0, _args_js_1.resolveAgentArgs)(args);
11
11
  return this._listChannels(agentId, options);
12
12
  }
13
13
  _listChannels(agentId, options) {
14
14
  return this.rest.get(`/agents/${agentId}/channels`, options);
15
15
  }
16
16
  getChannel(...args) {
17
- const { agentId, channelName, options } = (0, _args_1.resolveChannelArgs)(args);
17
+ const { agentId, channelName, options } = (0, _args_js_1.resolveChannelArgs)(args);
18
18
  return this._getChannel(agentId, channelName, options);
19
19
  }
20
20
  _getChannel(agentId, channelName, options) {
@@ -45,21 +45,21 @@ class ChannelsApi {
45
45
  return this.rest.put(`/agents/${agentId}/channels/${channelName}`, body);
46
46
  }
47
47
  archiveChannel(...args) {
48
- const { agentId, channelName } = (0, _args_1.resolveChannelArgs)(args);
48
+ const { agentId, channelName } = (0, _args_js_1.resolveChannelArgs)(args);
49
49
  return this._archiveChannel(agentId, channelName);
50
50
  }
51
51
  _archiveChannel(agentId, channelName) {
52
52
  return this.rest.post(`/agents/${agentId}/channels/${channelName}/archive`, {});
53
53
  }
54
54
  unarchiveChannel(...args) {
55
- const { agentId, channelName } = (0, _args_1.resolveChannelArgs)(args);
55
+ const { agentId, channelName } = (0, _args_js_1.resolveChannelArgs)(args);
56
56
  return this._unarchiveChannel(agentId, channelName);
57
57
  }
58
58
  _unarchiveChannel(agentId, channelName) {
59
59
  return this.rest.post(`/agents/${agentId}/channels/${channelName}/unarchive`, {});
60
60
  }
61
61
  listDataSeries(...args) {
62
- const { agentId, options } = (0, _args_1.resolveAgentArgs)(args);
62
+ const { agentId, options } = (0, _args_js_1.resolveAgentArgs)(args);
63
63
  return this._listDataSeries(agentId, options);
64
64
  }
65
65
  _listDataSeries(agentId, params) {
@@ -1,5 +1,5 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { ConnectionDetails, ConnectionSubscription, ConnectionSubscriptionLog } from "../types/openapi";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { ConnectionDetails, ConnectionSubscription, ConnectionSubscriptionLog } from "../types/openapi.js";
3
3
  export interface ConnectionHistoryParams {
4
4
  before?: string;
5
5
  after?: string;
@@ -1,27 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConnectionsApi = void 0;
4
- const _args_1 = require("./_args");
4
+ const _args_js_1 = require("./_args.js");
5
5
  class ConnectionsApi {
6
6
  constructor(rest) {
7
7
  this.rest = rest;
8
8
  }
9
9
  getAgentConnections(...args) {
10
- const { agentId } = (0, _args_1.resolveAgentArgs)(args);
10
+ const { agentId } = (0, _args_js_1.resolveAgentArgs)(args);
11
11
  return this._getAgentConnections(agentId);
12
12
  }
13
13
  _getAgentConnections(agentId) {
14
14
  return this.rest.get(`/agents/${agentId}/wss_connections`);
15
15
  }
16
16
  getAgentConnectionHistory(...args) {
17
- const { agentId, options } = (0, _args_1.resolveAgentArgs)(args);
17
+ const { agentId, options } = (0, _args_js_1.resolveAgentArgs)(args);
18
18
  return this._getAgentConnectionHistory(agentId, options);
19
19
  }
20
20
  _getAgentConnectionHistory(agentId, params) {
21
21
  return this.rest.get(`/agents/${agentId}/wss_connections/history`, params);
22
22
  }
23
23
  getAgentSubscriptionHistory(...args) {
24
- const { agentId, options } = (0, _args_1.resolveAgentArgs)(args);
24
+ const { agentId, options } = (0, _args_js_1.resolveAgentArgs)(args);
25
25
  return this._getAgentSubscriptionHistory(agentId, options);
26
26
  }
27
27
  _getAgentSubscriptionHistory(agentId, params) {
@@ -31,14 +31,14 @@ class ConnectionsApi {
31
31
  return this.rest.get(`/connections/${connectionId}`);
32
32
  }
33
33
  getChannelSubscriptions(...args) {
34
- const { agentId, channelName } = (0, _args_1.resolveChannelArgs)(args);
34
+ const { agentId, channelName } = (0, _args_js_1.resolveChannelArgs)(args);
35
35
  return this._getChannelSubscriptions(agentId, channelName);
36
36
  }
37
37
  _getChannelSubscriptions(agentId, channelName) {
38
38
  return this.rest.get(`/agents/${agentId}/channels/${channelName}/subscriptions`);
39
39
  }
40
40
  syncConnection(...args) {
41
- const { agentId } = (0, _args_1.resolveAgentArgs)(args);
41
+ const { agentId } = (0, _args_js_1.resolveAgentArgs)(args);
42
42
  return this._syncConnection(agentId);
43
43
  }
44
44
  _syncConnection(agentId) {
@@ -1,7 +1,7 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { CreateMessageRequest, DataSeries, MessageStructure, UpdateMessageRequest } from "../types/openapi";
3
- import type { DooverRequestOptions } from "../client/request-options";
4
- import { type BatchCreateMessageItem, type BatchDeleteMessageItem, type BatchMessageResponse, type BatchUpdateMessageItem } from "../types/batch";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { CreateMessageRequest, DataSeries, MessageStructure, UpdateMessageRequest } from "../types/openapi.js";
3
+ import type { DooverRequestOptions } from "../client/request-options.js";
4
+ import { type BatchCreateMessageItem, type BatchDeleteMessageItem, type BatchMessageResponse, type BatchUpdateMessageItem } from "../types/batch.js";
5
5
  export interface ListMessagesParams {
6
6
  before?: string;
7
7
  /**
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MessagesApi = void 0;
4
- const snowflake_1 = require("../utils/snowflake");
5
- const _args_1 = require("./_args");
6
- const batch_1 = require("../types/batch");
4
+ const snowflake_js_1 = require("../utils/snowflake.js");
5
+ const _args_js_1 = require("./_args.js");
6
+ const batch_js_1 = require("../types/batch.js");
7
7
  function resolveListMessagesParams(params) {
8
8
  const order = params?.order ?? "desc";
9
9
  const hasAfter = params?.after !== undefined;
@@ -23,7 +23,7 @@ function resolveListMessagesParams(params) {
23
23
  return { query, order, serverAscending: true };
24
24
  }
25
25
  const query = {
26
- before: params?.before ?? (0, snowflake_1.generateSnowflakeIdAtTime)(new Date()),
26
+ before: params?.before ?? (0, snowflake_js_1.generateSnowflakeIdAtTime)(new Date()),
27
27
  limit: params?.limit ?? 10,
28
28
  };
29
29
  if (hasAfter)
@@ -37,13 +37,13 @@ class MessagesApi {
37
37
  this.rest = rest;
38
38
  }
39
39
  async listMessages(...args) {
40
- const { agentId, channelName, options } = (0, _args_1.resolveChannelArgs)(args);
40
+ const { agentId, channelName, options } = (0, _args_js_1.resolveChannelArgs)(args);
41
41
  return this._listMessages(agentId, channelName, options);
42
42
  }
43
43
  async _listMessages(agentId, channelName, params) {
44
44
  const { query, order, serverAscending } = resolveListMessagesParams(params);
45
45
  const response = await this.rest.get(`/agents/${agentId}/channels/${channelName}/messages`, query);
46
- const stamped = response.map(snowflake_1.addTimestampToMessage);
46
+ const stamped = response.map(snowflake_js_1.addTimestampToMessage);
47
47
  // The server returns newest-first for `before` and oldest-first for a bare
48
48
  // `after`; reverse only when that native order differs from what was asked.
49
49
  const wantAscending = order === "asc";
@@ -60,10 +60,10 @@ class MessagesApi {
60
60
  }
61
61
  async _postMessage(agentId, channelName, body) {
62
62
  const response = await this.rest.post(`/agents/${agentId}/channels/${channelName}/messages`, body);
63
- return (0, snowflake_1.addTimestampToMessage)(response);
63
+ return (0, snowflake_js_1.addTimestampToMessage)(response);
64
64
  }
65
65
  getTimeseries(...args) {
66
- const { agentId, channelName, options } = (0, _args_1.resolveChannelArgs)(args);
66
+ const { agentId, channelName, options } = (0, _args_js_1.resolveChannelArgs)(args);
67
67
  return this._getTimeseries(agentId, channelName, options);
68
68
  }
69
69
  _getTimeseries(agentId, channelName, params) {
@@ -81,7 +81,7 @@ class MessagesApi {
81
81
  }
82
82
  async _getMessage(agentId, channelName, messageId) {
83
83
  const response = await this.rest.get(`/agents/${agentId}/channels/${channelName}/messages/${messageId}`);
84
- return (0, snowflake_1.addTimestampToMessage)(response);
84
+ return (0, snowflake_js_1.addTimestampToMessage)(response);
85
85
  }
86
86
  putMessage(...args) {
87
87
  if (typeof args[0] === "string") {
@@ -160,7 +160,7 @@ class MessagesApi {
160
160
  return { items: [], count: 0, succeeded: 0, failed: 0 };
161
161
  }
162
162
  const responses = [];
163
- for (const chunk of (0, batch_1.chunkBatchItems)(items)) {
163
+ for (const chunk of (0, batch_js_1.chunkBatchItems)(items)) {
164
164
  // Goes through `request` rather than the verb helpers because DELETE
165
165
  // needs a body, which `rest.delete` does not accept.
166
166
  responses.push(await this.rest.request({
@@ -169,7 +169,7 @@ class MessagesApi {
169
169
  body: { items: chunk },
170
170
  }));
171
171
  }
172
- return (0, batch_1.mergeBatchResponses)(responses);
172
+ return (0, batch_js_1.mergeBatchResponses)(responses);
173
173
  }
174
174
  createMultipartPayload(jsonPayload, attachments) {
175
175
  const formData = new FormData();
@@ -1,5 +1,5 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { CreateEndpointRequest, CreateNotificationSubscriptionRequest, NotificationDataResponse, NotificationEndpoint, NotificationEndpointsResponse, NotificationSubscribersResponse, NotificationSubscriptionCreateResponse, NotificationSubscriptionsResponse, UpdateEndpointRequest, UpdateMeWebPushEndpointRequest, UpdateNotificationSubscriptionRequest } from "../types/openapi";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { CreateEndpointRequest, CreateNotificationSubscriptionRequest, NotificationDataResponse, NotificationEndpoint, NotificationEndpointSummariesResponse, NotificationEndpointsResponse, NotificationSubscribersResponse, NotificationSubscriptionCreateResponse, NotificationSubscriptionsResponse, UpdateEndpointRequest, UpdateMeWebPushEndpointRequest, UpdateNotificationSubscriptionRequest } from "../types/openapi.js";
3
3
  export declare class NotificationsApi {
4
4
  private readonly rest;
5
5
  constructor(rest: RestClient);
@@ -13,6 +13,16 @@ export declare class NotificationsApi {
13
13
  agentId: string;
14
14
  }, name?: string): Promise<NotificationEndpointsResponse>;
15
15
  private _getAgentNotificationEndpoints;
16
+ /**
17
+ * Delivery readiness for each endpoint, without addresses or credentials.
18
+ * Readable with either notification-read or manage-subscriptions rights, so
19
+ * a delegated subscription manager can list endpoints it can't otherwise see.
20
+ */
21
+ getAgentNotificationEndpointSummaries(agentId: string): Promise<NotificationEndpointSummariesResponse>;
22
+ getAgentNotificationEndpointSummaries(identifier: {
23
+ agentId: string;
24
+ }): Promise<NotificationEndpointSummariesResponse>;
25
+ private _getAgentNotificationEndpointSummaries;
16
26
  createNotificationEndpoint(agentId: string, body: CreateEndpointRequest): Promise<NotificationEndpoint>;
17
27
  createNotificationEndpoint(identifier: {
18
28
  agentId: string;
@@ -48,6 +58,15 @@ export declare class NotificationsApi {
48
58
  agentId: string;
49
59
  }, subscribed_to?: string): Promise<NotificationSubscriptionsResponse>;
50
60
  private _getAgentDefaultNotificationSubscriptions;
61
+ /**
62
+ * Update every default subscription this subscriber holds on `subscribedTo`
63
+ * at once. Omitted fields keep their current value.
64
+ */
65
+ updateDefaultNotificationSubscription(agentId: string, subscribedTo: string, body: UpdateNotificationSubscriptionRequest): Promise<unknown>;
66
+ updateDefaultNotificationSubscription(identifier: {
67
+ agentId: string;
68
+ }, subscribedTo: string, body: UpdateNotificationSubscriptionRequest): Promise<unknown>;
69
+ private _updateDefaultNotificationSubscription;
51
70
  deleteDefaultNotificationSubscription(agentId: string, subscribedTo: string): Promise<unknown>;
52
71
  deleteDefaultNotificationSubscription(identifier: {
53
72
  agentId: string;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NotificationsApi = void 0;
4
- const _args_1 = require("./_args");
4
+ const _args_js_1 = require("./_args.js");
5
5
  class NotificationsApi {
6
6
  constructor(rest) {
7
7
  this.rest = rest;
8
8
  }
9
9
  getAgentNotifications(...args) {
10
- const { agentId } = (0, _args_1.resolveAgentArgs)(args);
10
+ const { agentId } = (0, _args_js_1.resolveAgentArgs)(args);
11
11
  return this._getAgentNotifications(agentId);
12
12
  }
13
13
  _getAgentNotifications(agentId) {
@@ -23,6 +23,13 @@ class NotificationsApi {
23
23
  _getAgentNotificationEndpoints(agentId, name) {
24
24
  return this.rest.get(`/agents/${agentId}/notifications/endpoints`, { name });
25
25
  }
26
+ getAgentNotificationEndpointSummaries(...args) {
27
+ const { agentId } = (0, _args_js_1.resolveAgentArgs)(args);
28
+ return this._getAgentNotificationEndpointSummaries(agentId);
29
+ }
30
+ _getAgentNotificationEndpointSummaries(agentId) {
31
+ return this.rest.get(`/agents/${agentId}/notifications/endpoints/summary`);
32
+ }
26
33
  createNotificationEndpoint(...args) {
27
34
  if (typeof args[0] === "string") {
28
35
  return this._createNotificationEndpoint(args[0], args[1]);
@@ -93,6 +100,16 @@ class NotificationsApi {
93
100
  _getAgentDefaultNotificationSubscriptions(agentId, subscribed_to) {
94
101
  return this.rest.get(`/agents/${agentId}/notifications/subscriptions/default`, { subscribed_to });
95
102
  }
103
+ updateDefaultNotificationSubscription(...args) {
104
+ if (typeof args[0] === "string") {
105
+ return this._updateDefaultNotificationSubscription(args[0], args[1], args[2]);
106
+ }
107
+ const id = args[0];
108
+ return this._updateDefaultNotificationSubscription(id.agentId, args[1], args[2]);
109
+ }
110
+ _updateDefaultNotificationSubscription(agentId, subscribedTo, body) {
111
+ return this.rest.patch(`/agents/${agentId}/notifications/subscriptions/default/${subscribedTo}`, body);
112
+ }
96
113
  deleteDefaultNotificationSubscription(...args) {
97
114
  if (typeof args[0] === "string") {
98
115
  return this._deleteDefaultNotificationSubscription(args[0], args[1]);
@@ -124,7 +141,7 @@ class NotificationsApi {
124
141
  return this.rest.delete(`/agents/${agentId}/notifications/subscriptions/${subscriptionId}`);
125
142
  }
126
143
  getAgentNotificationSubscribers(...args) {
127
- const { agentId } = (0, _args_1.resolveAgentArgs)(args);
144
+ const { agentId } = (0, _args_js_1.resolveAgentArgs)(args);
128
145
  return this._getAgentNotificationSubscribers(agentId);
129
146
  }
130
147
  _getAgentNotificationSubscribers(agentId) {
@@ -1,5 +1,5 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { CustomerSite, Organisation, PaginatedResponse } from "../types/viewer";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { CustomerSite, Organisation, PaginatedResponse } from "../types/viewer.js";
3
3
  export interface ListOrganisationsOptions {
4
4
  page?: number;
5
5
  perPage?: number;
@@ -1,5 +1,5 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { AgentPermission, PermissionDebugResponse, SuccessListResponse, SyncPermissionRequest } from "../types/openapi";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { AgentPermission, PermissionDebugResponse, SuccessListResponse, SyncPermissionRequest } from "../types/openapi.js";
3
3
  export declare class PermissionsApi {
4
4
  private readonly rest;
5
5
  constructor(rest: RestClient);
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PermissionsApi = void 0;
4
- const _args_1 = require("./_args");
4
+ const _args_js_1 = require("./_args.js");
5
5
  class PermissionsApi {
6
6
  constructor(rest) {
7
7
  this.rest = rest;
8
8
  }
9
9
  getAgentPermission(...args) {
10
- const { agentId } = (0, _args_1.resolveAgentArgs)(args);
10
+ const { agentId } = (0, _args_js_1.resolveAgentArgs)(args);
11
11
  return this._getAgentPermission(agentId);
12
12
  }
13
13
  _getAgentPermission(agentId) {
14
14
  return this.rest.get(`/agents/${agentId}/permissions`);
15
15
  }
16
16
  getAgentPermissionDebug(...args) {
17
- const { agentId } = (0, _args_1.resolveAgentArgs)(args);
17
+ const { agentId } = (0, _args_js_1.resolveAgentArgs)(args);
18
18
  return this._getAgentPermissionDebug(agentId);
19
19
  }
20
20
  _getAgentPermissionDebug(agentId) {
@@ -1,5 +1,5 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { CreateIngestionRequest, PutScheduleRequest, PutSubscriptionRequest, ScheduleInfo, SubscriptionInfo } from "../types/openapi";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { CreateIngestionRequest, PutScheduleRequest, PutSubscriptionRequest, ScheduleInfo, SubscriptionInfo } from "../types/openapi.js";
3
3
  export declare class ProcessorsApi {
4
4
  private readonly rest;
5
5
  constructor(rest: RestClient);
@@ -1,5 +1,5 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { TurnCredential, TurnTokenRequest } from "../types/openapi";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { TurnCredential, TurnTokenRequest } from "../types/openapi.js";
3
3
  export declare class TurnApi {
4
4
  private readonly rest;
5
5
  constructor(rest: RestClient);
@@ -1,5 +1,5 @@
1
- import type { RestClient } from "../http/rest-client";
2
- import type { User } from "../types/viewer";
1
+ import type { RestClient } from "../http/rest-client.js";
2
+ import type { User } from "../types/viewer.js";
3
3
  export declare class UsersApi {
4
4
  private readonly rest;
5
5
  private readonly controlApiUrl?;
@@ -1,4 +1,4 @@
1
- import type { AuthProfile } from "./auth-profile";
1
+ import type { AuthProfile } from "./auth-profile.js";
2
2
  /**
3
3
  * Structural interface for profile stores accepted by auth classes.
4
4
  * Implementations may be backed by files (ConfigManager in the Node subpath)
@@ -1,6 +1,6 @@
1
- import type { AuthProfile } from "./auth-profile";
2
- import type { AuthProfileStore } from "./auth-store";
3
- import { DooverAuth } from "./doover-auth";
1
+ import type { AuthProfile } from "./auth-profile.js";
2
+ import type { AuthProfileStore } from "./auth-store.js";
3
+ import { DooverAuth } from "./doover-auth.js";
4
4
  /**
5
5
  * Raw auth inputs that can be provided in client configs.
6
6
  *