@moq/net 0.4.7 → 0.22.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 (664) hide show
  1. package/README.md +7 -1
  2. package/announce.d.ts +1 -1
  3. package/announce.d.ts.map +1 -1
  4. package/announce.js +1 -2
  5. package/announce.js.map +1 -1
  6. package/announced.d.ts +51 -47
  7. package/announced.d.ts.map +1 -1
  8. package/announced.js +183 -32
  9. package/announced.js.map +1 -1
  10. package/announced.test-util.d.ts +2 -0
  11. package/announced.test-util.d.ts.map +1 -0
  12. package/announced.test-util.js +27 -0
  13. package/announced.test-util.js.map +1 -0
  14. package/auth.d.ts +64 -0
  15. package/auth.d.ts.map +1 -0
  16. package/auth.js +20 -0
  17. package/auth.js.map +1 -0
  18. package/auth_gate.d.ts +2 -0
  19. package/auth_gate.d.ts.map +1 -0
  20. package/auth_gate.js +24 -0
  21. package/auth_gate.js.map +1 -0
  22. package/auth_session.d.ts +49 -0
  23. package/auth_session.d.ts.map +1 -0
  24. package/auth_session.js +1097 -0
  25. package/auth_session.js.map +1 -0
  26. package/bandwidth.d.ts +129 -25
  27. package/bandwidth.d.ts.map +1 -1
  28. package/bandwidth.js +410 -139
  29. package/bandwidth.js.map +1 -1
  30. package/bandwidth_api.d.ts +1 -1
  31. package/bandwidth_api.d.ts.map +1 -1
  32. package/bandwidth_api.js +1 -2
  33. package/bandwidth_api.js.map +1 -1
  34. package/broadcast.d.ts +64 -38
  35. package/broadcast.d.ts.map +1 -1
  36. package/broadcast.js +556 -173
  37. package/broadcast.js.map +1 -1
  38. package/cache.d.ts +103 -0
  39. package/cache.d.ts.map +1 -0
  40. package/cache.js +254 -0
  41. package/cache.js.map +1 -0
  42. package/claim.test-util.d.ts +5 -0
  43. package/claim.test-util.d.ts.map +1 -0
  44. package/claim.test-util.js +13 -0
  45. package/claim.test-util.js.map +1 -0
  46. package/connection/accept.d.ts +21 -13
  47. package/connection/accept.d.ts.map +1 -1
  48. package/connection/accept.js +97 -130
  49. package/connection/accept.js.map +1 -1
  50. package/connection/browser.d.ts.map +1 -1
  51. package/connection/browser.js +28 -20
  52. package/connection/browser.js.map +1 -1
  53. package/connection/connect.d.ts +120 -24
  54. package/connection/connect.d.ts.map +1 -1
  55. package/connection/connect.js +535 -217
  56. package/connection/connect.js.map +1 -1
  57. package/connection/dials.d.ts +45 -0
  58. package/connection/dials.d.ts.map +1 -0
  59. package/connection/dials.js +109 -0
  60. package/connection/dials.js.map +1 -0
  61. package/connection/endpoint.d.ts +60 -0
  62. package/connection/endpoint.d.ts.map +1 -0
  63. package/connection/endpoint.js +114 -0
  64. package/connection/endpoint.js.map +1 -0
  65. package/connection/forward.d.ts +7 -1
  66. package/connection/forward.d.ts.map +1 -1
  67. package/connection/forward.js +265 -81
  68. package/connection/forward.js.map +1 -1
  69. package/connection/goaway.d.ts +16 -9
  70. package/connection/goaway.d.ts.map +1 -1
  71. package/connection/goaway.js +22 -95
  72. package/connection/goaway.js.map +1 -1
  73. package/connection/handshake.d.ts +34 -8
  74. package/connection/handshake.d.ts.map +1 -1
  75. package/connection/handshake.js +97 -21
  76. package/connection/handshake.js.map +1 -1
  77. package/connection/index.d.ts +4 -7
  78. package/connection/index.d.ts.map +1 -1
  79. package/connection/index.js +1 -3
  80. package/connection/index.js.map +1 -1
  81. package/connection/liveness.d.ts +14 -0
  82. package/connection/liveness.d.ts.map +1 -0
  83. package/connection/liveness.js +30 -0
  84. package/connection/liveness.js.map +1 -0
  85. package/connection/pool.d.ts +142 -63
  86. package/connection/pool.d.ts.map +1 -1
  87. package/connection/pool.js +281 -118
  88. package/connection/pool.js.map +1 -1
  89. package/connection/reload.d.ts +60 -12
  90. package/connection/reload.d.ts.map +1 -1
  91. package/connection/reload.js +859 -234
  92. package/connection/reload.js.map +1 -1
  93. package/connection/session.d.ts +91 -0
  94. package/connection/session.d.ts.map +1 -0
  95. package/connection/session.js +2 -0
  96. package/connection/session.js.map +1 -0
  97. package/connection/stats.d.ts +20 -11
  98. package/connection/stats.d.ts.map +1 -1
  99. package/connection/stats.js +64 -9
  100. package/connection/stats.js.map +1 -1
  101. package/connection/ticker.d.ts +4 -0
  102. package/connection/ticker.d.ts.map +1 -0
  103. package/connection/ticker.js +66 -0
  104. package/connection/ticker.js.map +1 -0
  105. package/connection/tokens.d.ts +2 -0
  106. package/connection/tokens.d.ts.map +1 -0
  107. package/connection/tokens.js +404 -0
  108. package/connection/tokens.js.map +1 -0
  109. package/connection/transport.d.ts.map +1 -1
  110. package/connection/transport.js +4 -5
  111. package/connection/transport.js.map +1 -1
  112. package/connection/withdrawal.d.ts +2 -0
  113. package/connection/withdrawal.d.ts.map +1 -0
  114. package/connection/withdrawal.js +23 -0
  115. package/connection/withdrawal.js.map +1 -0
  116. package/consume.js +213 -47
  117. package/consume.js.map +1 -1
  118. package/cover.d.ts +59 -0
  119. package/cover.d.ts.map +1 -0
  120. package/cover.js +375 -0
  121. package/cover.js.map +1 -0
  122. package/datagram.d.ts +70 -11
  123. package/datagram.d.ts.map +1 -1
  124. package/datagram.js +317 -2
  125. package/datagram.js.map +1 -1
  126. package/datagram_stream.d.ts +18 -0
  127. package/datagram_stream.d.ts.map +1 -0
  128. package/datagram_stream.js +67 -0
  129. package/datagram_stream.js.map +1 -0
  130. package/defined.test-util.d.ts +2 -0
  131. package/defined.test-util.d.ts.map +1 -0
  132. package/defined.test-util.js +7 -0
  133. package/defined.test-util.js.map +1 -0
  134. package/delivered.d.ts +75 -0
  135. package/delivered.d.ts.map +1 -0
  136. package/delivered.js +228 -0
  137. package/delivered.js.map +1 -0
  138. package/demand.d.ts +173 -0
  139. package/demand.d.ts.map +1 -0
  140. package/demand.js +582 -0
  141. package/demand.js.map +1 -0
  142. package/drops.d.ts +93 -0
  143. package/drops.d.ts.map +1 -0
  144. package/drops.js +283 -0
  145. package/drops.js.map +1 -0
  146. package/error.d.ts +120 -21
  147. package/error.d.ts.map +1 -1
  148. package/error.js +230 -38
  149. package/error.js.map +1 -1
  150. package/errors.d.ts +2 -2
  151. package/errors.d.ts.map +1 -1
  152. package/errors.js +2 -3
  153. package/errors.js.map +1 -1
  154. package/fill.d.ts +174 -0
  155. package/fill.d.ts.map +1 -0
  156. package/fill.js +760 -0
  157. package/fill.js.map +1 -0
  158. package/flate/decoder.d.ts +2 -0
  159. package/flate/decoder.d.ts.map +1 -0
  160. package/flate/decoder.js +63 -0
  161. package/flate/decoder.js.map +1 -0
  162. package/flate/encoder.d.ts +2 -0
  163. package/flate/encoder.d.ts.map +1 -0
  164. package/flate/encoder.js +64 -0
  165. package/flate/encoder.js.map +1 -0
  166. package/flate/group.d.ts +34 -0
  167. package/flate/group.d.ts.map +1 -0
  168. package/flate/group.js +140 -0
  169. package/flate/group.js.map +1 -0
  170. package/frame.d.ts +80 -0
  171. package/frame.d.ts.map +1 -0
  172. package/frame.js +296 -0
  173. package/frame.js.map +1 -0
  174. package/frame.test-util.d.ts +5 -0
  175. package/frame.test-util.d.ts.map +1 -0
  176. package/frame.test-util.js +9 -0
  177. package/frame.test-util.js.map +1 -0
  178. package/group.d.ts +108 -45
  179. package/group.d.ts.map +1 -1
  180. package/group.js +1616 -308
  181. package/group.js.map +1 -1
  182. package/group_api.d.ts +7 -0
  183. package/group_api.d.ts.map +1 -0
  184. package/group_api.js +7 -0
  185. package/group_api.js.map +1 -0
  186. package/hop.d.ts +62 -76
  187. package/hop.d.ts.map +1 -1
  188. package/hop.js +92 -65
  189. package/hop.js.map +1 -1
  190. package/identity.d.ts +39 -0
  191. package/identity.d.ts.map +1 -0
  192. package/identity.js +47 -0
  193. package/identity.js.map +1 -0
  194. package/ietf/active_count.d.ts +2 -0
  195. package/ietf/active_count.d.ts.map +1 -0
  196. package/ietf/active_count.js +30 -0
  197. package/ietf/active_count.js.map +1 -0
  198. package/ietf/aliases.js +69 -36
  199. package/ietf/aliases.js.map +1 -1
  200. package/ietf/cluster.d.ts +3 -3
  201. package/ietf/cluster.js +14 -55
  202. package/ietf/cluster.js.map +1 -1
  203. package/ietf/connection.d.ts +1 -31
  204. package/ietf/connection.d.ts.map +1 -1
  205. package/ietf/connection.js +305 -144
  206. package/ietf/connection.js.map +1 -1
  207. package/ietf/datagram.d.ts +60 -0
  208. package/ietf/datagram.d.ts.map +1 -0
  209. package/ietf/datagram.js +152 -0
  210. package/ietf/datagram.js.map +1 -0
  211. package/ietf/error.d.ts +3 -3
  212. package/ietf/error.js +82 -101
  213. package/ietf/error.js.map +1 -1
  214. package/ietf/fetch.d.ts +93 -37
  215. package/ietf/fetch.d.ts.map +1 -1
  216. package/ietf/fetch.js +172 -94
  217. package/ietf/fetch.js.map +1 -1
  218. package/ietf/filter.d.ts +21 -31
  219. package/ietf/filter.d.ts.map +1 -1
  220. package/ietf/filter.js +140 -172
  221. package/ietf/filter.js.map +1 -1
  222. package/ietf/goaway.d.ts +12 -10
  223. package/ietf/goaway.d.ts.map +1 -1
  224. package/ietf/goaway.js +22 -36
  225. package/ietf/goaway.js.map +1 -1
  226. package/ietf/hidden.js +1 -2
  227. package/ietf/hidden.js.map +1 -1
  228. package/ietf/index.d.ts +8 -20
  229. package/ietf/index.d.ts.map +1 -1
  230. package/ietf/index.js +4 -15
  231. package/ietf/index.js.map +1 -1
  232. package/ietf/join.d.ts +7 -0
  233. package/ietf/join.d.ts.map +1 -0
  234. package/ietf/join.js +234 -0
  235. package/ietf/join.js.map +1 -0
  236. package/ietf/message.d.ts +18 -2
  237. package/ietf/message.d.ts.map +1 -1
  238. package/ietf/message.js +60 -41
  239. package/ietf/message.js.map +1 -1
  240. package/ietf/message.test-util.d.ts +6 -0
  241. package/ietf/message.test-util.d.ts.map +1 -0
  242. package/ietf/message.test-util.js +13 -0
  243. package/ietf/message.test-util.js.map +1 -0
  244. package/ietf/namespace.d.ts +19 -5
  245. package/ietf/namespace.d.ts.map +1 -1
  246. package/ietf/namespace.js +78 -27
  247. package/ietf/namespace.js.map +1 -1
  248. package/ietf/object.d.ts +195 -33
  249. package/ietf/object.d.ts.map +1 -1
  250. package/ietf/object.js +405 -179
  251. package/ietf/object.js.map +1 -1
  252. package/ietf/parameters.d.ts +25 -45
  253. package/ietf/parameters.d.ts.map +1 -1
  254. package/ietf/parameters.js +260 -473
  255. package/ietf/parameters.js.map +1 -1
  256. package/ietf/priority.d.ts +17 -2
  257. package/ietf/priority.d.ts.map +1 -1
  258. package/ietf/priority.js +19 -5
  259. package/ietf/priority.js.map +1 -1
  260. package/ietf/properties.d.ts +6 -5
  261. package/ietf/properties.d.ts.map +1 -1
  262. package/ietf/properties.js +78 -49
  263. package/ietf/properties.js.map +1 -1
  264. package/ietf/publish.d.ts +25 -33
  265. package/ietf/publish.d.ts.map +1 -1
  266. package/ietf/publish.js +45 -140
  267. package/ietf/publish.js.map +1 -1
  268. package/ietf/publish_namespace.d.ts +49 -72
  269. package/ietf/publish_namespace.d.ts.map +1 -1
  270. package/ietf/publish_namespace.js +66 -185
  271. package/ietf/publish_namespace.js.map +1 -1
  272. package/ietf/publisher.js +1800 -601
  273. package/ietf/publisher.js.map +1 -1
  274. package/ietf/range.d.ts +2 -0
  275. package/ietf/range.d.ts.map +1 -0
  276. package/ietf/range.js +222 -0
  277. package/ietf/range.js.map +1 -0
  278. package/ietf/request.d.ts +6 -30
  279. package/ietf/request.d.ts.map +1 -1
  280. package/ietf/request.js +41 -79
  281. package/ietf/request.js.map +1 -1
  282. package/ietf/request_stream.d.ts +1 -6
  283. package/ietf/request_stream.d.ts.map +1 -1
  284. package/ietf/request_stream.js +306 -17
  285. package/ietf/request_stream.js.map +1 -1
  286. package/ietf/session.d.ts +41 -0
  287. package/ietf/session.d.ts.map +1 -0
  288. package/ietf/session.js +65 -0
  289. package/ietf/session.js.map +1 -0
  290. package/ietf/setup.d.ts +5 -30
  291. package/ietf/setup.d.ts.map +1 -1
  292. package/ietf/setup.js +6 -118
  293. package/ietf/setup.js.map +1 -1
  294. package/ietf/setup_options.d.ts +31 -0
  295. package/ietf/setup_options.d.ts.map +1 -0
  296. package/ietf/setup_options.js +138 -0
  297. package/ietf/setup_options.js.map +1 -0
  298. package/ietf/solicit.js +4 -15
  299. package/ietf/solicit.js.map +1 -1
  300. package/ietf/subscribe.d.ts +52 -45
  301. package/ietf/subscribe.d.ts.map +1 -1
  302. package/ietf/subscribe.js +118 -240
  303. package/ietf/subscribe.js.map +1 -1
  304. package/ietf/subscribe_namespace.d.ts +16 -79
  305. package/ietf/subscribe_namespace.d.ts.map +1 -1
  306. package/ietf/subscribe_namespace.js +30 -202
  307. package/ietf/subscribe_namespace.js.map +1 -1
  308. package/ietf/subscriber.js +1839 -537
  309. package/ietf/subscriber.js.map +1 -1
  310. package/ietf/token.js +105 -28
  311. package/ietf/token.js.map +1 -1
  312. package/ietf/track.d.ts +27 -24
  313. package/ietf/track.d.ts.map +1 -1
  314. package/ietf/track.js +48 -62
  315. package/ietf/track.js.map +1 -1
  316. package/ietf/version.d.ts +13 -42
  317. package/ietf/version.d.ts.map +1 -1
  318. package/ietf/version.js +22 -49
  319. package/ietf/version.js.map +1 -1
  320. package/implementation.d.ts +2 -0
  321. package/implementation.d.ts.map +1 -0
  322. package/implementation.js +5 -0
  323. package/implementation.js.map +1 -0
  324. package/index.d.ts +34 -19
  325. package/index.d.ts.map +1 -1
  326. package/index.js +19 -7
  327. package/index.js.map +1 -1
  328. package/internal.d.ts +1515 -67
  329. package/internal.d.ts.map +1 -1
  330. package/internal.js +557 -80
  331. package/internal.js.map +1 -1
  332. package/ledger.d.ts +23 -0
  333. package/ledger.d.ts.map +1 -0
  334. package/ledger.js +247 -0
  335. package/ledger.js.map +1 -0
  336. package/listing.d.ts +132 -0
  337. package/listing.d.ts.map +1 -0
  338. package/listing.js +486 -0
  339. package/listing.js.map +1 -0
  340. package/lite/announce.d.ts +127 -66
  341. package/lite/announce.d.ts.map +1 -1
  342. package/lite/announce.js +384 -159
  343. package/lite/announce.js.map +1 -1
  344. package/lite/announce_stream.d.ts +2 -0
  345. package/lite/announce_stream.d.ts.map +1 -0
  346. package/lite/announce_stream.js +92 -0
  347. package/lite/announce_stream.js.map +1 -0
  348. package/lite/answer.d.ts +22 -0
  349. package/lite/answer.d.ts.map +1 -0
  350. package/lite/answer.js +301 -0
  351. package/lite/answer.js.map +1 -0
  352. package/lite/auth.d.ts +45 -0
  353. package/lite/auth.d.ts.map +1 -0
  354. package/lite/auth.js +204 -0
  355. package/lite/auth.js.map +1 -0
  356. package/lite/compat.d.ts +31 -0
  357. package/lite/compat.d.ts.map +1 -0
  358. package/lite/compat.js +86 -0
  359. package/lite/compat.js.map +1 -0
  360. package/lite/connection.d.ts +1 -45
  361. package/lite/connection.d.ts.map +1 -1
  362. package/lite/connection.js +360 -78
  363. package/lite/connection.js.map +1 -1
  364. package/lite/datagram-end.d.ts +26 -0
  365. package/lite/datagram-end.d.ts.map +1 -0
  366. package/lite/datagram-end.js +30 -0
  367. package/lite/datagram-end.js.map +1 -0
  368. package/lite/datagram.d.ts +73 -8
  369. package/lite/datagram.d.ts.map +1 -1
  370. package/lite/datagram.js +144 -10
  371. package/lite/datagram.js.map +1 -1
  372. package/lite/duration.d.ts +6 -0
  373. package/lite/duration.d.ts.map +1 -0
  374. package/lite/duration.js +14 -0
  375. package/lite/duration.js.map +1 -0
  376. package/lite/error.d.ts +9 -0
  377. package/lite/error.d.ts.map +1 -0
  378. package/lite/error.js +24 -0
  379. package/lite/error.js.map +1 -0
  380. package/lite/fills.d.ts +162 -0
  381. package/lite/fills.d.ts.map +1 -0
  382. package/lite/fills.js +486 -0
  383. package/lite/fills.js.map +1 -0
  384. package/lite/fit.d.ts +49 -0
  385. package/lite/fit.d.ts.map +1 -0
  386. package/lite/fit.js +305 -0
  387. package/lite/fit.js.map +1 -0
  388. package/lite/goaway.d.ts +2 -2
  389. package/lite/goaway.d.ts.map +1 -1
  390. package/lite/goaway.js +5 -14
  391. package/lite/goaway.js.map +1 -1
  392. package/lite/group.d.ts +67 -16
  393. package/lite/group.d.ts.map +1 -1
  394. package/lite/group.js +108 -31
  395. package/lite/group.js.map +1 -1
  396. package/lite/identity.d.ts +25 -0
  397. package/lite/identity.d.ts.map +1 -0
  398. package/lite/identity.js +79 -0
  399. package/lite/identity.js.map +1 -0
  400. package/lite/index.d.ts +14 -13
  401. package/lite/index.d.ts.map +1 -1
  402. package/lite/index.js +2 -2
  403. package/lite/index.js.map +1 -1
  404. package/lite/message.d.ts +10 -2
  405. package/lite/message.d.ts.map +1 -1
  406. package/lite/message.js +28 -45
  407. package/lite/message.js.map +1 -1
  408. package/lite/priority.d.ts +9 -2
  409. package/lite/priority.d.ts.map +1 -1
  410. package/lite/priority.js +11 -106
  411. package/lite/priority.js.map +1 -1
  412. package/lite/probe.d.ts +2 -2
  413. package/lite/probe.d.ts.map +1 -1
  414. package/lite/probe.js +9 -1
  415. package/lite/probe.js.map +1 -1
  416. package/lite/publisher.d.ts +10 -1
  417. package/lite/publisher.d.ts.map +1 -1
  418. package/lite/publisher.js +2548 -438
  419. package/lite/publisher.js.map +1 -1
  420. package/lite/routed.d.ts +59 -0
  421. package/lite/routed.d.ts.map +1 -0
  422. package/lite/routed.js +564 -0
  423. package/lite/routed.js.map +1 -0
  424. package/lite/session.d.ts +2 -28
  425. package/lite/session.d.ts.map +1 -1
  426. package/lite/session.js +0 -100
  427. package/lite/session.js.map +1 -1
  428. package/lite/setup.d.ts +32 -5
  429. package/lite/setup.d.ts.map +1 -1
  430. package/lite/setup.js +95 -22
  431. package/lite/setup.js.map +1 -1
  432. package/lite/stream.d.ts +5 -11
  433. package/lite/stream.d.ts.map +1 -1
  434. package/lite/stream.js +5 -2
  435. package/lite/stream.js.map +1 -1
  436. package/lite/subscribe.d.ts +478 -78
  437. package/lite/subscribe.d.ts.map +1 -1
  438. package/lite/subscribe.js +1373 -143
  439. package/lite/subscribe.js.map +1 -1
  440. package/lite/subscriber.d.ts +7 -44
  441. package/lite/subscriber.d.ts.map +1 -1
  442. package/lite/subscriber.js +3290 -516
  443. package/lite/subscriber.js.map +1 -1
  444. package/lite/track.d.ts +27 -12
  445. package/lite/track.d.ts.map +1 -1
  446. package/lite/track.js +116 -38
  447. package/lite/track.js.map +1 -1
  448. package/lite/tracks.d.ts +55 -0
  449. package/lite/tracks.d.ts.map +1 -0
  450. package/lite/tracks.js +114 -0
  451. package/lite/tracks.js.map +1 -0
  452. package/lite/version.d.ts +132 -24
  453. package/lite/version.d.ts.map +1 -1
  454. package/lite/version.js +378 -34
  455. package/lite/version.js.map +1 -1
  456. package/meta.d.ts +77 -0
  457. package/meta.d.ts.map +1 -0
  458. package/meta.js +130 -0
  459. package/meta.js.map +1 -0
  460. package/meta_api.d.ts +7 -0
  461. package/meta_api.d.ts.map +1 -0
  462. package/meta_api.js +7 -0
  463. package/meta_api.js.map +1 -0
  464. package/mint.d.ts +28 -0
  465. package/mint.d.ts.map +1 -0
  466. package/mint.js +66 -0
  467. package/mint.js.map +1 -0
  468. package/open.d.ts +63 -0
  469. package/open.d.ts.map +1 -0
  470. package/open.js +250 -0
  471. package/open.js.map +1 -0
  472. package/origin.d.ts +394 -142
  473. package/origin.d.ts.map +1 -1
  474. package/origin.js +2533 -687
  475. package/origin.js.map +1 -1
  476. package/package.json +8 -13
  477. package/path.d.ts +51 -51
  478. package/path.d.ts.map +1 -1
  479. package/path.js +210 -58
  480. package/path.js.map +1 -1
  481. package/payload.d.ts +33 -0
  482. package/payload.d.ts.map +1 -0
  483. package/payload.js +65 -0
  484. package/payload.js.map +1 -0
  485. package/prefix.d.ts +152 -0
  486. package/prefix.d.ts.map +1 -0
  487. package/prefix.js +349 -0
  488. package/prefix.js.map +1 -0
  489. package/priority.d.ts +8 -0
  490. package/priority.d.ts.map +1 -0
  491. package/priority.js +185 -0
  492. package/priority.js.map +1 -0
  493. package/queue.d.ts +2 -0
  494. package/queue.d.ts.map +1 -0
  495. package/queue.js +46 -0
  496. package/queue.js.map +1 -0
  497. package/ranges.d.ts +36 -0
  498. package/ranges.d.ts.map +1 -0
  499. package/ranges.js +312 -0
  500. package/ranges.js.map +1 -0
  501. package/rescale.d.ts +24 -0
  502. package/rescale.d.ts.map +1 -0
  503. package/rescale.js +39 -0
  504. package/rescale.js.map +1 -0
  505. package/resume.d.ts +55 -0
  506. package/resume.d.ts.map +1 -0
  507. package/resume.js +4173 -0
  508. package/resume.js.map +1 -0
  509. package/resume.test-util.d.ts +2 -0
  510. package/resume.test-util.d.ts.map +1 -0
  511. package/resume.test-util.js +25 -0
  512. package/resume.test-util.js.map +1 -0
  513. package/skips.d.ts +48 -0
  514. package/skips.d.ts.map +1 -0
  515. package/skips.js +182 -0
  516. package/skips.js.map +1 -0
  517. package/stream.d.ts +78 -40
  518. package/stream.d.ts.map +1 -1
  519. package/stream.js +236 -93
  520. package/stream.js.map +1 -1
  521. package/subscription.test-util.d.ts +2 -0
  522. package/subscription.test-util.d.ts.map +1 -0
  523. package/subscription.test-util.js +49 -0
  524. package/subscription.test-util.js.map +1 -0
  525. package/tail.d.ts +23 -14
  526. package/tail.d.ts.map +1 -1
  527. package/tail.js +224 -98
  528. package/tail.js.map +1 -1
  529. package/time.d.ts +41 -102
  530. package/time.d.ts.map +1 -1
  531. package/time.js +129 -92
  532. package/time.js.map +1 -1
  533. package/timed.d.ts +21 -0
  534. package/timed.d.ts.map +1 -0
  535. package/timed.js +2 -0
  536. package/timed.js.map +1 -0
  537. package/track.d.ts +578 -246
  538. package/track.d.ts.map +1 -1
  539. package/track.js +7306 -772
  540. package/track.js.map +1 -1
  541. package/track_api.d.ts +7 -0
  542. package/track_api.d.ts.map +1 -0
  543. package/track_api.js +7 -0
  544. package/track_api.js.map +1 -0
  545. package/util/abort.d.ts +1 -0
  546. package/util/abort.d.ts.map +1 -1
  547. package/util/abort.js +23 -2
  548. package/util/abort.js.map +1 -1
  549. package/util/announce.d.ts +4 -0
  550. package/util/announce.d.ts.map +1 -0
  551. package/util/announce.js +11 -0
  552. package/util/announce.js.map +1 -0
  553. package/util/bigint.d.ts +3 -0
  554. package/util/bigint.d.ts.map +1 -0
  555. package/util/bigint.js +8 -0
  556. package/util/bigint.js.map +1 -0
  557. package/util/change.d.ts +12 -0
  558. package/util/change.d.ts.map +1 -0
  559. package/util/change.js +18 -0
  560. package/util/change.js.map +1 -0
  561. package/util/deadline.d.ts +2 -0
  562. package/util/deadline.d.ts.map +1 -0
  563. package/util/deadline.js +108 -0
  564. package/util/deadline.js.map +1 -0
  565. package/util/decode_error.d.ts +3 -0
  566. package/util/decode_error.d.ts.map +1 -0
  567. package/util/decode_error.js +11 -0
  568. package/util/decode_error.js.map +1 -0
  569. package/util/demand.d.ts +8 -0
  570. package/util/demand.d.ts.map +1 -0
  571. package/util/demand.js +24 -0
  572. package/util/demand.js.map +1 -0
  573. package/util/given_up.d.ts +2 -0
  574. package/util/given_up.d.ts.map +1 -0
  575. package/util/given_up.js +101 -0
  576. package/util/given_up.js.map +1 -0
  577. package/util/hex.d.ts +6 -0
  578. package/util/hex.d.ts.map +1 -1
  579. package/util/hex.js +19 -5
  580. package/util/hex.js.map +1 -1
  581. package/util/key.d.ts +15 -0
  582. package/util/key.d.ts.map +1 -0
  583. package/util/key.js +38 -0
  584. package/util/key.js.map +1 -0
  585. package/util/limits.d.ts +2 -0
  586. package/util/limits.d.ts.map +1 -0
  587. package/util/limits.js +76 -0
  588. package/util/limits.js.map +1 -0
  589. package/util/observed.d.ts +23 -0
  590. package/util/observed.d.ts.map +1 -0
  591. package/util/observed.js +122 -0
  592. package/util/observed.js.map +1 -0
  593. package/util/sorted.d.ts +2 -0
  594. package/util/sorted.d.ts.map +1 -0
  595. package/util/sorted.js +149 -0
  596. package/util/sorted.js.map +1 -0
  597. package/util/timeout.d.ts +2 -1
  598. package/util/timeout.d.ts.map +1 -1
  599. package/util/timeout.js +13 -10
  600. package/util/timeout.js.map +1 -1
  601. package/util/timer.d.ts +2 -0
  602. package/util/timer.d.ts.map +1 -0
  603. package/util/timer.js +19 -0
  604. package/util/timer.js.map +1 -0
  605. package/util/u64.js +0 -1
  606. package/util/utf8.d.ts +2 -0
  607. package/util/utf8.d.ts.map +1 -1
  608. package/util/utf8.js +7 -2
  609. package/util/utf8.js.map +1 -1
  610. package/util/varint.d.ts.map +1 -1
  611. package/util/varint.js +8 -2
  612. package/util/varint.js.map +1 -1
  613. package/util/watch.d.ts +8 -0
  614. package/util/watch.d.ts.map +1 -0
  615. package/util/watch.js +38 -0
  616. package/util/watch.js.map +1 -0
  617. package/util/yield.d.ts +2 -0
  618. package/util/yield.d.ts.map +1 -0
  619. package/util/yield.js +31 -0
  620. package/util/yield.js.map +1 -0
  621. package/varint.d.ts +0 -29
  622. package/varint.d.ts.map +1 -1
  623. package/varint.js +7 -29
  624. package/varint.js.map +1 -1
  625. package/varint_api.d.ts +7 -0
  626. package/varint_api.d.ts.map +1 -0
  627. package/varint_api.js +7 -0
  628. package/varint_api.js.map +1 -0
  629. package/version.d.ts +2 -0
  630. package/version.d.ts.map +1 -0
  631. package/version.js +4 -0
  632. package/version.js.map +1 -0
  633. package/window.d.ts +570 -0
  634. package/window.d.ts.map +1 -0
  635. package/window.js +1677 -0
  636. package/window.js.map +1 -0
  637. package/wire.d.ts +150 -35
  638. package/wire.d.ts.map +1 -1
  639. package/wire.js +27 -1
  640. package/wire.js.map +1 -1
  641. package/connection/established.d.ts +0 -53
  642. package/connection/established.d.ts.map +0 -1
  643. package/connection/established.js +0 -3
  644. package/connection/established.js.map +0 -1
  645. package/ietf/adapter.d.ts +0 -75
  646. package/ietf/adapter.d.ts.map +0 -1
  647. package/ietf/adapter.js +0 -700
  648. package/ietf/adapter.js.map +0 -1
  649. package/lite/datagram_stream.d.ts +0 -8
  650. package/lite/datagram_stream.d.ts.map +0 -1
  651. package/lite/datagram_stream.js +0 -44
  652. package/lite/datagram_stream.js.map +0 -1
  653. package/lite/fetch.d.ts +0 -28
  654. package/lite/fetch.d.ts.map +0 -1
  655. package/lite/fetch.js +0 -79
  656. package/lite/fetch.js.map +0 -1
  657. package/util/log.d.ts +0 -5
  658. package/util/log.d.ts.map +0 -1
  659. package/util/log.js +0 -17
  660. package/util/log.js.map +0 -1
  661. package/zod.d.ts +0 -13
  662. package/zod.d.ts.map +0 -1
  663. package/zod.js +0 -19
  664. package/zod.js.map +0 -1
@@ -1,52 +1,346 @@
1
- import * as Path from "../path";
2
- import type { Reader, Writer } from "../stream";
3
- import { Version } from "./version";
1
+ import type * as Identity from "../identity.ts";
2
+ import { type Hole } from "../internal.ts";
3
+ import * as Path from "../path.ts";
4
+ import type { Reader, Writer } from "../stream.ts";
5
+ import type { Order, Position, Range, Start } from "../track.ts";
6
+ import { Version } from "./version.ts";
7
+ /** The span SUBSCRIBE and SUBSCRIBE_UPDATE carry, with inclusive ends. */
8
+ interface Span {
9
+ startGroup?: bigint;
10
+ startFrame: number;
11
+ endGroup?: bigint;
12
+ endFrame?: number;
13
+ }
14
+ /**
15
+ * One end of a lite-07 range: a model time (`time`), a group by its start (`absolute`), or a live
16
+ * join (`live`), as the Rust `lite::Anchor` holds. A group's start is its time, so `absolute` goes
17
+ * out as a time, an end (exclusive) as the time just before it, and decodes as one. One partway
18
+ * through the group, at a nonzero `frame`, goes out as a Position: a start from that frame, an end
19
+ * before it. A live join is a start only, and so is one already placed (`joined`).
20
+ */
21
+ export type WireAnchor = {
22
+ absolute: bigint;
23
+ frame?: number;
24
+ time?: never;
25
+ live?: never;
26
+ joined?: never;
27
+ } | {
28
+ time: bigint;
29
+ absolute?: never;
30
+ live?: never;
31
+ joined?: never;
32
+ } | {
33
+ live: WireLive;
34
+ absolute?: never;
35
+ time?: never;
36
+ joined?: never;
37
+ } | {
38
+ joined: WireJoined;
39
+ absolute?: never;
40
+ time?: never;
41
+ live?: never;
42
+ };
43
+ /**
44
+ * A live join already placed, on the wire: the group it starts at by its start, the frame there,
45
+ * 0 for the whole group, and the `max` its groups expire past, `null` for no limit beyond the
46
+ * publisher's, in whole milliseconds. A route switch asks a new upstream for a join an earlier one
47
+ * placed so. Lite-07 only. Mirrors the Rust `lite::Anchor::Joined`.
48
+ */
49
+ export interface WireJoined {
50
+ absolute: bigint;
51
+ frame: number;
52
+ max: number | null;
53
+ }
54
+ /**
55
+ * A live join on the wire: its lag `min` behind the live edge, `null` for no lag limit, and the
56
+ * `max` its groups expire past, `null` for no limit beyond the publisher's, both in whole
57
+ * milliseconds.
58
+ */
59
+ export interface WireLive {
60
+ min: number | null;
61
+ max: number | null;
62
+ }
63
+ /**
64
+ * A lite-07 range as the wire carries it; see {@link WireAnchor}. Its `priority` and `order` say
65
+ * how urgently and in what order its groups go out, absent for 0 and descending.
66
+ */
67
+ export interface WireRange {
68
+ start?: WireAnchor;
69
+ end?: WireAnchor;
70
+ priority?: number;
71
+ order?: Order;
72
+ }
73
+ /** A lite-07 range's priority and group order. Mirrors the Rust `lite::Policy`. */
74
+ export interface Policy {
75
+ priority: number;
76
+ order: Order;
77
+ }
78
+ /** The policy `range` carries. */
79
+ export declare function policyOf(range: WireRange): Policy;
80
+ /** `range` under `policy`, which it omits where it is the default. */
81
+ export declare function withPolicy(range: WireRange, policy: Partial<Policy>): WireRange;
82
+ /**
83
+ * What a subscription of `ranges` asks as a whole, for a wire or a sender without a policy per
84
+ * range: the highest priority, newest first if any range at that priority is. Mirrors the Rust
85
+ * `Policy::of`.
86
+ */
87
+ export declare function subscriptionPolicy(ranges: readonly WireRange[]): Policy;
88
+ /** A lite-07 subscription's policies: its own as a whole, and each live range's. Mirrors the Rust `Steer`. */
89
+ export interface Steer {
90
+ /** The subscription's as a whole, which a group no live range with a policy wants goes out at. */
91
+ whole: Policy;
92
+ /**
93
+ * The policy and budget in milliseconds of the live range with Range ID `id`, as the latest
94
+ * update left it, undefined once retired.
95
+ */
96
+ steering(id: bigint): {
97
+ policy: Policy;
98
+ budget: number;
99
+ } | undefined;
100
+ }
101
+ /**
102
+ * The policy a group goes out at, `covers` being the Range IDs covering it, each at its current
103
+ * budget, and `aged` the widest budget it is known to have aged past: the highest priority
104
+ * among the ranges still wanting it, at that priority's order, descending breaking a tie. The
105
+ * subscription's whole when no range with a policy wants it. `lasts` is the budget whose aging may
106
+ * lower that policy, undefined once none can: a range ranked below it wanting the group longer.
107
+ * Mirrors the Rust `Steer::serving`.
108
+ */
109
+ export declare function groupPolicy(steer: Steer, covers: readonly bigint[], aged?: number): {
110
+ policy: Policy;
111
+ lasts?: number;
112
+ };
113
+ /**
114
+ * A lite-07 SUBSCRIBE_UPDATE's change to a live range in place, which keeps where it started: its
115
+ * new policy, and a live join's new `max` in milliseconds, `null` for no limit and for any other
116
+ * range. Mirrors the Rust `lite::Retune`.
117
+ */
118
+ export interface Retune extends Policy {
119
+ max: number | null;
120
+ }
4
121
  /**
5
- * Exclusive model/local cap from a decoded inclusive last group.
122
+ * The wire form of model `ranges`: the same times, a time being a group start, and live joins by lag
123
+ * and max, or, `placed` already at a group by index, as `joined` there (see {@link WireJoined}).
124
+ */
125
+ export declare function toWireRanges(ranges: readonly Range[], placed?: ReadonlyMap<number, bigint>): WireRange[];
126
+ /**
127
+ * The model ranges a decoded SUBSCRIBE or SUBSCRIBE_UPDATE asks for: its lite-07 list, or the one
128
+ * span an older wire carries, whole groups either way. Mirrors the Rust `Bounds::new`.
129
+ *
130
+ * A group ID is a group's start, so an absolute anchor and a time anchor both name one: a time
131
+ * start resolves to the group containing it. An older wire means its start as the first group
132
+ * starting at or after it, which the publisher's floor keeps (see `cursorFloor`), and its span with
133
+ * no start takes `legacy` (see {@link legacyStart}).
134
+ */
135
+ export declare function requestedRanges(msg: Span & {
136
+ ranges?: WireRange[];
137
+ priority?: number;
138
+ order?: Order;
139
+ }, legacy?: Start): Range[];
140
+ /**
141
+ * The start a span with none takes on a `version` before lite-07, where one `Subscriber Max Age`
142
+ * (`maxDelay` milliseconds, `null` for none) bounds the whole subscription; undefined on lite-07,
143
+ * which carries one on each live start instead, and for the oldest group.
6
144
  *
7
- * The wire's `Group End` is inclusive once decoded; the track model and `setGroups` are
8
- * exclusive. `undefined` stays unbounded.
145
+ * An absent start takes every group still within that max age, or every group with none, as
146
+ * lite-01/02 never carry one. Lite-06 resolves it there. Before lite-06 an absent start is the
147
+ * latest group, which the publisher places as the floor once the source's feed says where it
148
+ * starts (see `cursorFloor`). A named start with a max age is a live join placed there; without
149
+ * one, a history floor bounded by the publisher's max age. Mirrors the Rust `Bounds::legacy`.
150
+ */
151
+ export declare function legacyStart(version: Version, maxDelay: number | null): Start | undefined;
152
+ /**
153
+ * The group each live join already placed among the ranges `msg` asks for starts at, by its index:
154
+ * a lite-07 {@link WireJoined}, or an older wire's named start under a max age (see
155
+ * {@link requestedRanges}). See `Subscription.placed`.
156
+ */
157
+ export declare function requestedPlaced(msg: Span & {
158
+ ranges?: WireRange[];
159
+ }, legacy?: Start): Map<number, bigint>;
160
+ /** The model range one lite-07 range asks for; see {@link requestedRanges}. */
161
+ export declare function requestedRange(range: WireRange): Range;
162
+ /**
163
+ * Lite-07 `ranges` and the one span covering every one of them, which the subscriber narrows
164
+ * again. A range covers whole groups but for a Position start (see {@link positionFrames}),
165
+ * whose frame the span keeps when the span starts there. The publisher reads every Position
166
+ * from the ranges themselves.
167
+ */
168
+ export declare function spanOf(version: Version, ranges: readonly WireRange[]): Span & {
169
+ ranges: WireRange[];
170
+ };
171
+ /**
172
+ * The group a lite-07 range starts at and the exclusive group it ends before, either undefined
173
+ * when it has none: a time is the start of the group it names, inclusive as an end.
174
+ */
175
+ export declare function rangeBounds(range: WireRange): [bigint | undefined, bigint | undefined];
176
+ /**
177
+ * How a lite-07 subscription's live ranges, as its subscriber asked them, count toward a fetch,
178
+ * by Range ID, tallied as they come and go so an edit costs only the ranges it names. Mirrors
179
+ * the Rust `Prefs::fetches`.
180
+ */
181
+ export declare class ExactRanges {
182
+ #private;
183
+ /** The ranges a SUBSCRIBE asked, keyed by their positions, which are their Range IDs. */
184
+ constructor(ranges: readonly WireRange[]);
185
+ /** Hold `range` under `id`, replacing any range held there. */
186
+ set(id: bigint, range: WireRange): void;
187
+ /** Drop the range held under `id`, if any. */
188
+ delete(id: bigint): void;
189
+ /**
190
+ * Whether the ranges read only named groups, a fetch: none of them other ranges, and at least
191
+ * one not empty. Mirrors the Rust `Subscription::exact_bounded`.
192
+ */
193
+ fetches(): boolean;
194
+ }
195
+ /**
196
+ * The span from group `start`, at frame `startFrame` of it, up to the exclusive group `end`, either
197
+ * group undefined for none.
198
+ */
199
+ export declare function spanBetween(version: Version, start: bigint | undefined, end: bigint | undefined, startFrame?: number): Span;
200
+ /**
201
+ * The first frame each lite-07 Position start asks its group from, by group, for each group no
202
+ * other range may cover: a group is delivered once, so one another range covers goes whole.
203
+ * A peer may send thousands of ranges, so this sorts their bounds once rather than scanning
204
+ * them per Position.
205
+ */
206
+ export declare function positionFrames(ranges: readonly WireRange[]): Map<bigint, number>;
207
+ /**
208
+ * The frame each lite-07 Position end stops its group before, by group, for each group no other
209
+ * range may cover, as {@link positionFrames} keeps starts. Mirrors the Rust `stops`.
210
+ */
211
+ export declare function positionStops(ranges: readonly WireRange[]): Map<bigint, number>;
212
+ /**
213
+ * The ranges `msg` carries on lite-07: its list, or else the one span it encodes as its only
214
+ * range, in whole groups.
215
+ */
216
+ export declare function rangesOf(msg: Span & {
217
+ ranges?: WireRange[];
218
+ }): WireRange[];
219
+ /** The bytes `value` takes as a lite-07 varint, which counts leading ones. */
220
+ export declare function varintSize(value: number | bigint): number;
221
+ /** The bytes a lite-07 range takes on the wire, whose varints count leading ones. */
222
+ export declare function rangeSize(range: WireRange): number;
223
+ /**
224
+ * A received update's ranges resolved by Range ID: the ones retired, then each one added, then
225
+ * each live join retuned as it now reads. Mirrors the Rust `Applied`.
226
+ */
227
+ export interface Applied {
228
+ retired: bigint[];
229
+ added: [bigint, WireRange][];
230
+ retuned: [bigint, WireRange][];
231
+ }
232
+ /**
233
+ * What a live lite-07 range asks for: the demand's groups, which set where the live feed is, where
234
+ * the publisher starts a time start a copy's readers wait on (a probe), or a fill's groups.
9
235
  */
10
- export declare function exclusiveGroupEnd(inclusive?: number): number | undefined;
11
- /** The error for a requested range the wire cannot carry; see {@link emptyRange}. */
236
+ export type RangeKind = "demand" | "probe" | "fill";
237
+ /**
238
+ * A subscription's live ranges by Range ID, which both ends of a Subscribe Stream keep: the
239
+ * subscriber to write each update as an edit, the publisher to resolve one. Mirrors the Rust
240
+ * `LiveRanges`.
241
+ *
242
+ * The SUBSCRIBE's ranges take Range IDs from 0 in order, and each range an update adds takes the
243
+ * next. Before lite-07 an update replaces the list, numbered afresh.
244
+ */
245
+ export declare class LiveRanges {
246
+ #private;
247
+ /** The ranges a SUBSCRIBE carried. */
248
+ constructor(version: Version, ranges: readonly WireRange[]);
249
+ /** The Range ID the next range added takes. */
250
+ next(): bigint;
251
+ /** The live range with Range ID `id`. */
252
+ get(id: bigint): WireRange | undefined;
253
+ /** Whether `id` was ever assigned. */
254
+ assigned(id: bigint): boolean;
255
+ /** Every live Range ID, in order. */
256
+ ids(): bigint[];
257
+ /** Every live range, in Range ID order. */
258
+ ranges(): WireRange[];
259
+ /** Every live range with its Range ID, in order. */
260
+ entries(): [bigint, WireRange][];
261
+ /**
262
+ * Apply a received lite-07 `update`'s edit, returning it by Range ID: the ranges retired, then
263
+ * each added with the Range ID it took, then each live join retuned to its new max in place,
264
+ * costing the ranges it names. Throws {@link ProtocolViolation} for an edit it cannot apply.
265
+ * Before lite-07 an update restates its ranges, so nothing is numbered and the edit is empty.
266
+ * Mirrors the Rust `LiveRanges::apply`.
267
+ */
268
+ apply(update: SubscribeUpdate): Applied;
269
+ /**
270
+ * The edit that turns the live ranges into `ranges`, which become the live ones: the Range IDs
271
+ * to retire and the ranges to add. A range already live keeps its Range ID, so an update that
272
+ * changes one range sends only that one, and the publisher keeps where the rest resolved.
273
+ * Before lite-07 replaced ranges take fresh Range IDs.
274
+ *
275
+ * `ranges` are the demand's, then `kinds.probes` probes, then `kinds.fills` asking for fills,
276
+ * and `kinds.kindOf` names what each live one asks for: a probe or a fill asking for what a
277
+ * demand range does still takes a range of its own, so each Range ID stays one kind's.
278
+ * `fillIds` and `probeIds` are the Range IDs the added ones of each took. The live ranges in
279
+ * `renew` are retired and added again even when wanted, so the publisher resolves them afresh.
280
+ * A range wanted again under another policy, or a live join under another max, as the same
281
+ * kind, is retuned in place, keeping its Range ID and so where it was placed. Mirrors the Rust
282
+ * `SubStream::edit`.
283
+ */
284
+ edit(ranges: readonly WireRange[], kinds?: {
285
+ probes?: number;
286
+ fills?: number;
287
+ kindOf?: (id: bigint) => RangeKind;
288
+ }, renew?: ReadonlySet<bigint>): {
289
+ remove: bigint[];
290
+ add: WireRange[];
291
+ retune: [bigint, Retune][];
292
+ fillIds: bigint[];
293
+ probeIds: bigint[];
294
+ };
295
+ }
296
+ /** The error for a requested range the wire cannot carry: one asking for nothing. */
12
297
  export declare const EMPTY_RANGE = "empty subscription range cannot be encoded";
13
298
  /**
14
299
  * Inclusive last group a Subscribe message carries, from an exclusive model end.
15
300
  *
16
301
  * Empty (`0`) cannot be encoded: the wire's 0 means unbounded. Callers refuse an empty
17
- * requested range with {@link emptyRange} before reaching here.
302
+ * requested range before reaching here.
18
303
  */
19
- export declare function inclusiveGroupEnd(exclusive?: number): number | undefined;
20
- /**
21
- * Whether a requested range asks for nothing.
22
- *
23
- * The wire has no encoding for one: its bounds are inclusive, so flooring the end would
24
- * either hand back the group the caller excluded (0 means unbounded) or invert the
25
- * range once the two bounds meet. An absent start is the live edge, so it only empties
26
- * the range when the end is 0.
27
- */
28
- export declare function emptyRange({ startGroup, endGroup }: {
29
- startGroup?: number;
30
- endGroup?: number;
31
- }): boolean;
304
+ export declare function inclusiveGroupEnd(exclusive?: bigint): bigint | undefined;
32
305
  export declare class SubscribeUpdate {
33
306
  #private;
307
+ /** A refresh request for this group or later, judged against the local track's refresh. */
308
+ wantedGroup?: bigint;
34
309
  priority: number;
35
- /** Subscriber max latency in milliseconds; zero skips once a newer group is available. */
36
- maxAge: number;
37
- startGroup?: number;
38
- endGroup?: number;
310
+ /** See {@link Subscribe.order}. */
311
+ order: Order;
312
+ /** See {@link Subscribe.maxDelay}. */
313
+ maxDelay: number | null;
314
+ startGroup?: bigint;
315
+ endGroup?: bigint;
39
316
  /** See {@link Subscribe.startFrame}. */
40
317
  startFrame: number;
41
318
  /** See {@link Subscribe.endFrame}. */
42
319
  endFrame?: number;
320
+ /**
321
+ * See {@link Subscribe.ranges}. On lite-07 the wire carries the ranges to add, after retiring
322
+ * {@link remove}; {@link LiveRanges.apply} resolves a received update to every live range.
323
+ */
324
+ ranges?: WireRange[];
325
+ /** Lite-07: the Range IDs of the live ranges to retire before adding {@link ranges}. */
326
+ remove?: bigint[];
327
+ /**
328
+ * Lite-07: each live range to give a new policy, and a live join a new max, in place, keeping
329
+ * where it was placed, by Range ID.
330
+ */
331
+ retune?: [bigint, Retune][];
43
332
  constructor(props: {
44
333
  priority: number;
45
- maxAge?: number;
46
- startGroup?: number;
47
- endGroup?: number;
334
+ wantedGroup?: bigint;
335
+ order?: Order;
336
+ maxDelay?: number | null;
337
+ startGroup?: bigint;
338
+ endGroup?: bigint;
48
339
  startFrame?: number;
49
340
  endFrame?: number;
341
+ ranges?: WireRange[];
342
+ remove?: bigint[];
343
+ retune?: [bigint, Retune][];
50
344
  });
51
345
  encode(w: Writer, version: Version): Promise<void>;
52
346
  static decode(r: Reader, version: Version): Promise<SubscribeUpdate>;
@@ -56,12 +350,24 @@ export declare class Subscribe {
56
350
  #private;
57
351
  id: bigint;
58
352
  broadcast: Path.Valid;
353
+ /** The publisher identity the subscriber expects. Lite-07+. */
354
+ identity?: Identity.Valid;
59
355
  track: string;
60
356
  priority: number;
61
- /** Subscriber max latency in milliseconds; zero skips once a newer group is available. */
62
- maxAge: number;
63
- startGroup?: number;
64
- endGroup?: number;
357
+ /**
358
+ * Which pending group to send first. Lite-07+; earlier wires decode as descending and
359
+ * cannot ask for anything else.
360
+ */
361
+ order: Order;
362
+ /**
363
+ * The `Subscriber Max Age` before lite-07, in milliseconds, `null` for no limit beyond the
364
+ * publisher's; zero skips once a newer group is available. Lite-01/02 carry none and decode as
365
+ * `null`. Lite-07 carries a max on each live start instead, so this is ignored there and decodes
366
+ * as `null`.
367
+ */
368
+ maxDelay: number | null;
369
+ startGroup?: bigint;
370
+ endGroup?: bigint;
65
371
  /**
66
372
  * First frame to deliver within `startGroup`'s group; 0 is the whole group.
67
373
  * Lite-06+. It qualifies the named group, so it needs `startGroup` to name one
@@ -73,16 +379,31 @@ export declare class Subscribe {
73
379
  * whole group. Lite-06+, and meaningless without an explicit `endGroup`.
74
380
  */
75
381
  endFrame?: number;
382
+ /**
383
+ * Every range. Lite-07 encodes these in place of the span when given, and older versions
384
+ * the span alone; decoding a lite-07 list fills them alongside the span covering them all.
385
+ */
386
+ ranges?: WireRange[];
387
+ /**
388
+ * Whether each frame is delivered as its header alone, without its payload, for the
389
+ * subscription's whole life. Lite-07+: an earlier wire cannot carry it, so encoding one there
390
+ * throws rather than asking for the payload.
391
+ */
392
+ meta: boolean;
76
393
  constructor(props: {
77
394
  id: bigint;
78
395
  broadcast: Path.Valid;
396
+ identity?: Identity.Valid;
79
397
  track: string;
80
398
  priority: number;
81
- maxAge?: number;
82
- startGroup?: number;
83
- endGroup?: number;
399
+ order?: Order;
400
+ maxDelay?: number | null;
401
+ startGroup?: bigint;
402
+ endGroup?: bigint;
84
403
  startFrame?: number;
85
404
  endFrame?: number;
405
+ ranges?: WireRange[];
406
+ meta?: boolean;
86
407
  });
87
408
  encode(w: Writer, version: Version): Promise<void>;
88
409
  static decode(r: Reader, version: Version): Promise<Subscribe>;
@@ -96,72 +417,141 @@ export declare class Subscribe {
96
417
  export declare class SubscribeOk {
97
418
  #private;
98
419
  priority: number;
99
- /** Accepted subscriber max latency in milliseconds. */
100
- maxAge: number;
101
- startGroup?: number;
102
- endGroup?: number;
103
- constructor({ priority, maxAge, startGroup, endGroup, }: {
420
+ /** Accepted subscriber max delay in milliseconds. */
421
+ maxDelay: number;
422
+ startGroup?: bigint;
423
+ endGroup?: bigint;
424
+ constructor({ priority, maxDelay, startGroup, endGroup, }: {
104
425
  priority?: number;
105
- maxAge?: number;
106
- startGroup?: number;
107
- endGroup?: number;
426
+ maxDelay?: number;
427
+ startGroup?: bigint;
428
+ endGroup?: bigint;
108
429
  });
109
430
  encode(w: Writer, version: Version): Promise<void>;
110
431
  static decode(r: Reader, version: Version): Promise<SubscribeOk>;
111
432
  }
433
+ /** The publisher's largest position, as SUBSCRIBE_START reports it. Mirrors the Rust `Largest`. */
434
+ export interface Largest {
435
+ /** The newest group and its last frame so far. */
436
+ position: Position;
437
+ /** The group ended at that frame, so no frame follows it: a reader knows at once that it isn't the live one. */
438
+ ended: boolean;
439
+ }
112
440
  /**
113
- * Resolves the absolute start group of a Draft-05+ subscription. The first message
114
- * the publisher sends, once the start group is known. A value greater than the
115
- * requested start implicitly drops the leading range.
441
+ * What a SUBSCRIBE_START knows of the track's largest position: `"unknown"` when the answering
442
+ * hop has yet to learn it, `"empty"` for a track with no group yet, or the {@link Largest}.
443
+ * Mirrors the Rust `Edge`.
444
+ */
445
+ export type Edge = "unknown" | "empty" | Largest;
446
+ /**
447
+ * Says where one range of a Draft-05+ subscription starts, once the publisher resolves it. Before
448
+ * lite-07 one answers the subscription's one range; lite-07 answers each range by Range ID, from
449
+ * the SUBSCRIBE or an update, along with what the publisher knows of the largest position. A start
450
+ * above the requested one implicitly drops the groups below it.
116
451
  *
117
- * There is no start frame: a partial group is only served to a subscriber that asked
118
- * for one, so delivery begins either at the requested `startFrame` (when this is the
119
- * requested group) or at frame 0 (when the publisher resolved to a later one).
452
+ * There is no start frame: a partial group is only served to a subscriber that asked for
453
+ * one, so a range begins at its requested frame when it starts at its requested group,
454
+ * and at frame 0 of a later one otherwise.
120
455
  */
121
456
  export declare class SubscribeStart {
122
- group: number;
123
- constructor(group: number);
124
- encode(w: Writer): Promise<void>;
125
- static decode(r: Reader): Promise<SubscribeStart>;
457
+ /** The range's Range ID; 0 before lite-07, whose one range has none on the wire. */
458
+ id: bigint;
459
+ /** The group its delivery starts at, `undefined` for a range with no group there. */
460
+ start?: bigint;
461
+ /** What the publisher knows of the largest position; always `"unknown"` before lite-07. */
462
+ largest: Edge;
463
+ constructor(props: {
464
+ id: bigint;
465
+ start?: bigint;
466
+ largest: Edge;
467
+ });
468
+ encode(w: Writer, version: Version): Promise<void>;
469
+ static decode(r: Reader, version: Version): Promise<SubscribeStart>;
126
470
  }
127
471
  /**
128
- * Signals that no group at or after `group` (exclusive upper bound) will be produced
129
- * on a Draft-05+ subscription. `0` means the track ended before producing any groups.
472
+ * SUBSCRIBE_END: no group at or after `group` (exclusive upper bound) will be produced on a
473
+ * Draft-05+ subscription. `0` means the track ended before producing any groups.
130
474
  */
131
475
  export declare class SubscribeEnd {
132
- /** The exclusive final group sequence: the first sequence that will never be produced. */
133
- group: number;
134
- /**
135
- * The number of group streams the publisher opened for this subscription.
136
- * Draft-07+ only; not on the wire before, where it decodes as 0.
137
- */
138
- streams: number;
139
- constructor(group: number, streams?: number);
140
- encode(w: Writer, version: Version): Promise<void>;
141
- static decode(r: Reader, version: Version): Promise<SubscribeEnd>;
476
+ /** The exclusive final group key: the first key that will never be produced. */
477
+ group: bigint;
478
+ constructor(group: bigint);
479
+ encode(w: Writer, _version: Version): Promise<void>;
480
+ static decode(r: Reader, _version: Version): Promise<SubscribeEnd>;
142
481
  }
482
+ /**
483
+ * Names groups this subscription will not deliver, and nothing more: not found here, expired
484
+ * under the publisher's own max age, or reset where the GROUP header may be lost. On lite-07 it
485
+ * speaks for this subscription alone, so a reader still owed a group asks for it afresh; before
486
+ * lite-07 it carries an application code (read and dropped) and reads as stale.
487
+ *
488
+ * Draft-03+; publishers send it on Draft-05 and later.
489
+ */
143
490
  export declare class SubscribeDrop {
144
- #private;
145
- start: number;
146
- end: number;
147
- error: number;
491
+ /** The first dropped group key. */
492
+ start: bigint;
493
+ /** One past the last dropped group key. */
494
+ end: bigint;
495
+ constructor(props: {
496
+ start: bigint;
497
+ end: bigint;
498
+ });
499
+ encode(w: Writer, version: Version): Promise<void>;
500
+ static decode(r: Reader, version: Version): Promise<SubscribeDrop>;
501
+ }
502
+ /**
503
+ * Names group starts the publisher declared never produced: permanent, and it supersedes a copy
504
+ * that did not finish the group. Lite-07+.
505
+ */
506
+ export declare class SubscribeSkip {
507
+ /** The first skipped group key. */
508
+ start: bigint;
509
+ /** One past the last skipped group key. */
510
+ end: bigint;
148
511
  constructor(props: {
149
- start: number;
150
- end: number;
151
- error: number;
512
+ start: bigint;
513
+ end: bigint;
152
514
  });
153
- encode(w: Writer): Promise<void>;
154
- static decode(r: Reader): Promise<SubscribeDrop>;
515
+ encode(w: Writer, version: Version): Promise<void>;
516
+ static decode(r: Reader, version: Version): Promise<SubscribeSkip>;
155
517
  }
518
+ /**
519
+ * Names groups judged stale under a finite `Max Age`, so only a reader no wider settles on them;
520
+ * a wider one asks for them on a request of its own. Lite-07+.
521
+ */
522
+ export declare class SubscribeOld {
523
+ /** The first stale group key. */
524
+ start: bigint;
525
+ /** One past the last stale group key. */
526
+ end: bigint;
527
+ /** The `Max Age` in milliseconds the groups were judged stale under. */
528
+ maxAge: number;
529
+ constructor(props: {
530
+ start: bigint;
531
+ end: bigint;
532
+ maxAge: number;
533
+ });
534
+ encode(w: Writer, version: Version): Promise<void>;
535
+ static decode(r: Reader, version: Version): Promise<SubscribeOld>;
536
+ }
537
+ /**
538
+ * The response giving up `[start, end)` as `hole`, as `version` carries it. Before lite-07 every
539
+ * one is a drop. A skip is a skip; a stale verdict names the finite budget it was judged under,
540
+ * and an `old` with no verdict of its own names `unjudged`, the narrowest finite live-join max
541
+ * age; with neither, or for anything else, it is a drop. Mirrors the Rust
542
+ * `SubscribeResponse::given_up`.
543
+ */
544
+ export declare function givenUp(start: bigint, end: bigint, hole: Hole, unjudged: number | undefined, version: Version): SubscribeResponse;
156
545
  /**
157
546
  * A response message on the subscribe stream, prefixed with a type discriminator
158
547
  * on Draft-03+.
159
548
  *
160
549
  * The discriminator is version-dependent:
161
550
  * - Draft-03/04: `0x0` SUBSCRIBE_OK, `0x1` SUBSCRIBE_DROP.
162
- * - Draft-05/06: `0x0` SUBSCRIBE_START, `0x1` SUBSCRIBE_END, `0x2` SUBSCRIBE_DROP
163
- * (SUBSCRIBE_OK was removed; acceptance is implicit).
164
- * - Draft-07+: `0x0` SUBSCRIBE_START, `0x1` SUBSCRIBE_END (SUBSCRIBE_DROP was removed).
551
+ * - Draft-05/06: `0x0` SUBSCRIBE_START, `0x1` SUBSCRIBE_END, `0x2` SUBSCRIBE_DROP (SUBSCRIBE_OK
552
+ * was removed; acceptance is implicit).
553
+ * - Lite-07+: `0x1` SUBSCRIBE_END, `0x2` SUBSCRIBE_DROP, `0x3` SUBSCRIBE_SKIP, `0x4`
554
+ * SUBSCRIBE_START (one per range), and `0x5` SUBSCRIBE_OLD; `0x0` is unused.
165
555
  */
166
556
  export type SubscribeResponse = {
167
557
  ok: SubscribeOk;
@@ -171,9 +561,19 @@ export type SubscribeResponse = {
171
561
  end: SubscribeEnd;
172
562
  } | {
173
563
  drop: SubscribeDrop;
564
+ } | {
565
+ skip: SubscribeSkip;
566
+ } | {
567
+ old: SubscribeOld;
174
568
  };
175
569
  export declare function encodeSubscribeResponse(w: Writer, resp: SubscribeResponse, version: Version): Promise<void>;
176
570
  export declare function decodeSubscribeResponse(r: Reader, version: Version): Promise<SubscribeResponse>;
571
+ /**
572
+ * Whether the next response `r` holds whole, without reading the stream, is a lite-07
573
+ * SUBSCRIBE_START, so a subscriber applying a burst of them can take the next before applying.
574
+ */
575
+ export declare function startBuffered(r: Reader, version: Version): boolean;
177
576
  /** Like {@link decodeSubscribeResponse} but resolves `undefined` on a clean FIN. */
178
577
  export declare function decodeSubscribeResponseMaybe(r: Reader, version: Version): Promise<SubscribeResponse | undefined>;
578
+ export {};
179
579
  //# sourceMappingURL=subscribe.d.ts.map