@moq/net 0.4.8 → 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.
- package/README.md +7 -1
- package/announce.d.ts +1 -1
- package/announce.d.ts.map +1 -1
- package/announce.js +1 -1
- package/announce.js.map +1 -1
- package/announced.d.ts +51 -47
- package/announced.d.ts.map +1 -1
- package/announced.js +183 -31
- package/announced.js.map +1 -1
- package/announced.test-util.d.ts +2 -0
- package/announced.test-util.d.ts.map +1 -0
- package/announced.test-util.js +27 -0
- package/announced.test-util.js.map +1 -0
- package/auth.d.ts +64 -0
- package/auth.d.ts.map +1 -0
- package/auth.js +20 -0
- package/auth.js.map +1 -0
- package/auth_gate.d.ts +2 -0
- package/auth_gate.d.ts.map +1 -0
- package/auth_gate.js +24 -0
- package/auth_gate.js.map +1 -0
- package/auth_session.d.ts +49 -0
- package/auth_session.d.ts.map +1 -0
- package/auth_session.js +1097 -0
- package/auth_session.js.map +1 -0
- package/bandwidth.d.ts +129 -25
- package/bandwidth.d.ts.map +1 -1
- package/bandwidth.js +410 -138
- package/bandwidth.js.map +1 -1
- package/bandwidth_api.d.ts +1 -1
- package/bandwidth_api.d.ts.map +1 -1
- package/bandwidth_api.js +1 -1
- package/bandwidth_api.js.map +1 -1
- package/broadcast.d.ts +62 -36
- package/broadcast.d.ts.map +1 -1
- package/broadcast.js +556 -172
- package/broadcast.js.map +1 -1
- package/cache.d.ts +103 -0
- package/cache.d.ts.map +1 -0
- package/cache.js +254 -0
- package/cache.js.map +1 -0
- package/claim.test-util.d.ts +5 -0
- package/claim.test-util.d.ts.map +1 -0
- package/claim.test-util.js +13 -0
- package/claim.test-util.js.map +1 -0
- package/connection/accept.d.ts +20 -12
- package/connection/accept.d.ts.map +1 -1
- package/connection/accept.js +97 -129
- package/connection/accept.js.map +1 -1
- package/connection/browser.d.ts.map +1 -1
- package/connection/browser.js +28 -19
- package/connection/browser.js.map +1 -1
- package/connection/connect.d.ts +119 -23
- package/connection/connect.d.ts.map +1 -1
- package/connection/connect.js +535 -216
- package/connection/connect.js.map +1 -1
- package/connection/dials.d.ts +45 -0
- package/connection/dials.d.ts.map +1 -0
- package/connection/dials.js +109 -0
- package/connection/dials.js.map +1 -0
- package/connection/endpoint.d.ts +60 -0
- package/connection/endpoint.d.ts.map +1 -0
- package/connection/endpoint.js +114 -0
- package/connection/endpoint.js.map +1 -0
- package/connection/forward.d.ts +7 -1
- package/connection/forward.d.ts.map +1 -1
- package/connection/forward.js +265 -80
- package/connection/forward.js.map +1 -1
- package/connection/goaway.d.ts +16 -9
- package/connection/goaway.d.ts.map +1 -1
- package/connection/goaway.js +22 -108
- package/connection/goaway.js.map +1 -1
- package/connection/handshake.d.ts +32 -6
- package/connection/handshake.d.ts.map +1 -1
- package/connection/handshake.js +97 -20
- package/connection/handshake.js.map +1 -1
- package/connection/index.d.ts +3 -6
- package/connection/index.d.ts.map +1 -1
- package/connection/index.js +1 -2
- package/connection/index.js.map +1 -1
- package/connection/liveness.d.ts +14 -0
- package/connection/liveness.d.ts.map +1 -0
- package/connection/liveness.js +30 -0
- package/connection/liveness.js.map +1 -0
- package/connection/pool.d.ts +137 -58
- package/connection/pool.d.ts.map +1 -1
- package/connection/pool.js +281 -117
- package/connection/pool.js.map +1 -1
- package/connection/reload.d.ts +60 -12
- package/connection/reload.d.ts.map +1 -1
- package/connection/reload.js +859 -233
- package/connection/reload.js.map +1 -1
- package/connection/session.d.ts +91 -0
- package/connection/session.d.ts.map +1 -0
- package/connection/session.js +2 -0
- package/connection/session.js.map +1 -0
- package/connection/stats.d.ts +20 -11
- package/connection/stats.d.ts.map +1 -1
- package/connection/stats.js +64 -8
- package/connection/stats.js.map +1 -1
- package/connection/ticker.d.ts +4 -0
- package/connection/ticker.d.ts.map +1 -0
- package/connection/ticker.js +66 -0
- package/connection/ticker.js.map +1 -0
- package/connection/tokens.d.ts +2 -0
- package/connection/tokens.d.ts.map +1 -0
- package/connection/tokens.js +404 -0
- package/connection/tokens.js.map +1 -0
- package/connection/transport.d.ts.map +1 -1
- package/connection/transport.js +4 -4
- package/connection/transport.js.map +1 -1
- package/connection/withdrawal.d.ts +2 -0
- package/connection/withdrawal.d.ts.map +1 -0
- package/connection/withdrawal.js +23 -0
- package/connection/withdrawal.js.map +1 -0
- package/consume.js +213 -46
- package/consume.js.map +1 -1
- package/cover.d.ts +59 -0
- package/cover.d.ts.map +1 -0
- package/cover.js +375 -0
- package/cover.js.map +1 -0
- package/datagram.d.ts +70 -11
- package/datagram.d.ts.map +1 -1
- package/datagram.js +317 -1
- package/datagram.js.map +1 -1
- package/datagram_stream.d.ts +18 -0
- package/datagram_stream.d.ts.map +1 -0
- package/datagram_stream.js +67 -0
- package/datagram_stream.js.map +1 -0
- package/defined.test-util.d.ts +2 -0
- package/defined.test-util.d.ts.map +1 -0
- package/defined.test-util.js +7 -0
- package/defined.test-util.js.map +1 -0
- package/delivered.d.ts +75 -0
- package/delivered.d.ts.map +1 -0
- package/delivered.js +228 -0
- package/delivered.js.map +1 -0
- package/demand.d.ts +173 -0
- package/demand.d.ts.map +1 -0
- package/demand.js +582 -0
- package/demand.js.map +1 -0
- package/drops.d.ts +93 -0
- package/drops.d.ts.map +1 -0
- package/drops.js +283 -0
- package/drops.js.map +1 -0
- package/error.d.ts +120 -21
- package/error.d.ts.map +1 -1
- package/error.js +230 -37
- package/error.js.map +1 -1
- package/errors.d.ts +2 -2
- package/errors.d.ts.map +1 -1
- package/errors.js +2 -2
- package/errors.js.map +1 -1
- package/fill.d.ts +174 -0
- package/fill.d.ts.map +1 -0
- package/fill.js +760 -0
- package/fill.js.map +1 -0
- package/flate/decoder.d.ts +2 -0
- package/flate/decoder.d.ts.map +1 -0
- package/flate/decoder.js +63 -0
- package/flate/decoder.js.map +1 -0
- package/flate/encoder.d.ts +2 -0
- package/flate/encoder.d.ts.map +1 -0
- package/flate/encoder.js +64 -0
- package/flate/encoder.js.map +1 -0
- package/flate/group.d.ts +34 -0
- package/flate/group.d.ts.map +1 -0
- package/flate/group.js +140 -0
- package/flate/group.js.map +1 -0
- package/frame.d.ts +80 -0
- package/frame.d.ts.map +1 -0
- package/frame.js +296 -0
- package/frame.js.map +1 -0
- package/frame.test-util.d.ts +5 -0
- package/frame.test-util.d.ts.map +1 -0
- package/frame.test-util.js +9 -0
- package/frame.test-util.js.map +1 -0
- package/group.d.ts +108 -45
- package/group.d.ts.map +1 -1
- package/group.js +1616 -307
- package/group.js.map +1 -1
- package/group_api.d.ts +7 -0
- package/group_api.d.ts.map +1 -0
- package/group_api.js +7 -0
- package/group_api.js.map +1 -0
- package/hop.d.ts +62 -76
- package/hop.d.ts.map +1 -1
- package/hop.js +92 -64
- package/hop.js.map +1 -1
- package/identity.d.ts +39 -0
- package/identity.d.ts.map +1 -0
- package/identity.js +47 -0
- package/identity.js.map +1 -0
- package/ietf/active_count.d.ts +2 -0
- package/ietf/active_count.d.ts.map +1 -0
- package/ietf/active_count.js +30 -0
- package/ietf/active_count.js.map +1 -0
- package/ietf/aliases.js +69 -35
- package/ietf/aliases.js.map +1 -1
- package/ietf/cluster.d.ts +3 -3
- package/ietf/cluster.js +14 -62
- package/ietf/cluster.js.map +1 -1
- package/ietf/connection.d.ts +1 -31
- package/ietf/connection.d.ts.map +1 -1
- package/ietf/connection.js +305 -143
- package/ietf/connection.js.map +1 -1
- package/ietf/datagram.d.ts +60 -0
- package/ietf/datagram.d.ts.map +1 -0
- package/ietf/datagram.js +152 -0
- package/ietf/datagram.js.map +1 -0
- package/ietf/error.d.ts +3 -3
- package/ietf/error.js +82 -100
- package/ietf/error.js.map +1 -1
- package/ietf/fetch.d.ts +91 -35
- package/ietf/fetch.d.ts.map +1 -1
- package/ietf/fetch.js +172 -93
- package/ietf/fetch.js.map +1 -1
- package/ietf/filter.d.ts +20 -30
- package/ietf/filter.d.ts.map +1 -1
- package/ietf/filter.js +140 -171
- package/ietf/filter.js.map +1 -1
- package/ietf/goaway.d.ts +11 -9
- package/ietf/goaway.d.ts.map +1 -1
- package/ietf/goaway.js +22 -35
- package/ietf/goaway.js.map +1 -1
- package/ietf/hidden.js +1 -1
- package/ietf/hidden.js.map +1 -1
- package/ietf/index.d.ts +2 -14
- package/ietf/index.d.ts.map +1 -1
- package/ietf/index.js +4 -14
- package/ietf/index.js.map +1 -1
- package/ietf/join.d.ts +7 -0
- package/ietf/join.d.ts.map +1 -0
- package/ietf/join.js +234 -0
- package/ietf/join.js.map +1 -0
- package/ietf/message.d.ts +18 -2
- package/ietf/message.d.ts.map +1 -1
- package/ietf/message.js +60 -40
- package/ietf/message.js.map +1 -1
- package/ietf/message.test-util.d.ts +6 -0
- package/ietf/message.test-util.d.ts.map +1 -0
- package/ietf/message.test-util.js +13 -0
- package/ietf/message.test-util.js.map +1 -0
- package/ietf/namespace.d.ts +17 -3
- package/ietf/namespace.d.ts.map +1 -1
- package/ietf/namespace.js +78 -26
- package/ietf/namespace.js.map +1 -1
- package/ietf/object.d.ts +194 -32
- package/ietf/object.d.ts.map +1 -1
- package/ietf/object.js +405 -178
- package/ietf/object.js.map +1 -1
- package/ietf/parameters.d.ts +22 -42
- package/ietf/parameters.d.ts.map +1 -1
- package/ietf/parameters.js +260 -472
- package/ietf/parameters.js.map +1 -1
- package/ietf/priority.d.ts +17 -2
- package/ietf/priority.d.ts.map +1 -1
- package/ietf/priority.js +19 -4
- package/ietf/priority.js.map +1 -1
- package/ietf/properties.d.ts +5 -4
- package/ietf/properties.d.ts.map +1 -1
- package/ietf/properties.js +78 -48
- package/ietf/properties.js.map +1 -1
- package/ietf/publish.d.ts +22 -30
- package/ietf/publish.d.ts.map +1 -1
- package/ietf/publish.js +45 -139
- package/ietf/publish.js.map +1 -1
- package/ietf/publish_namespace.d.ts +46 -69
- package/ietf/publish_namespace.d.ts.map +1 -1
- package/ietf/publish_namespace.js +66 -184
- package/ietf/publish_namespace.js.map +1 -1
- package/ietf/publisher.js +1800 -600
- package/ietf/publisher.js.map +1 -1
- package/ietf/range.d.ts +2 -0
- package/ietf/range.d.ts.map +1 -0
- package/ietf/range.js +222 -0
- package/ietf/range.js.map +1 -0
- package/ietf/request.d.ts +3 -27
- package/ietf/request.d.ts.map +1 -1
- package/ietf/request.js +41 -78
- package/ietf/request.js.map +1 -1
- package/ietf/request_stream.d.ts +1 -6
- package/ietf/request_stream.d.ts.map +1 -1
- package/ietf/request_stream.js +306 -16
- package/ietf/request_stream.js.map +1 -1
- package/ietf/session.d.ts +41 -0
- package/ietf/session.d.ts.map +1 -0
- package/ietf/session.js +65 -0
- package/ietf/session.js.map +1 -0
- package/ietf/setup.d.ts +4 -29
- package/ietf/setup.d.ts.map +1 -1
- package/ietf/setup.js +6 -117
- package/ietf/setup.js.map +1 -1
- package/ietf/setup_options.d.ts +31 -0
- package/ietf/setup_options.d.ts.map +1 -0
- package/ietf/setup_options.js +138 -0
- package/ietf/setup_options.js.map +1 -0
- package/ietf/solicit.js +4 -14
- package/ietf/solicit.js.map +1 -1
- package/ietf/subscribe.d.ts +48 -41
- package/ietf/subscribe.d.ts.map +1 -1
- package/ietf/subscribe.js +118 -239
- package/ietf/subscribe.js.map +1 -1
- package/ietf/subscribe_namespace.d.ts +13 -76
- package/ietf/subscribe_namespace.d.ts.map +1 -1
- package/ietf/subscribe_namespace.js +30 -201
- package/ietf/subscribe_namespace.js.map +1 -1
- package/ietf/subscriber.js +1839 -536
- package/ietf/subscriber.js.map +1 -1
- package/ietf/token.js +105 -27
- package/ietf/token.js.map +1 -1
- package/ietf/track.d.ts +25 -22
- package/ietf/track.d.ts.map +1 -1
- package/ietf/track.js +48 -61
- package/ietf/track.js.map +1 -1
- package/ietf/version.d.ts +13 -42
- package/ietf/version.d.ts.map +1 -1
- package/ietf/version.js +22 -48
- package/ietf/version.js.map +1 -1
- package/implementation.d.ts +2 -0
- package/implementation.d.ts.map +1 -0
- package/implementation.js +5 -0
- package/implementation.js.map +1 -0
- package/index.d.ts +25 -10
- package/index.d.ts.map +1 -1
- package/index.js +19 -6
- package/index.js.map +1 -1
- package/internal.d.ts +1512 -64
- package/internal.d.ts.map +1 -1
- package/internal.js +557 -79
- package/internal.js.map +1 -1
- package/ledger.d.ts +23 -0
- package/ledger.d.ts.map +1 -0
- package/ledger.js +247 -0
- package/ledger.js.map +1 -0
- package/listing.d.ts +132 -0
- package/listing.d.ts.map +1 -0
- package/listing.js +486 -0
- package/listing.js.map +1 -0
- package/lite/announce.d.ts +124 -63
- package/lite/announce.d.ts.map +1 -1
- package/lite/announce.js +384 -158
- package/lite/announce.js.map +1 -1
- package/lite/announce_stream.d.ts +2 -0
- package/lite/announce_stream.d.ts.map +1 -0
- package/lite/announce_stream.js +92 -0
- package/lite/announce_stream.js.map +1 -0
- package/lite/answer.d.ts +22 -0
- package/lite/answer.d.ts.map +1 -0
- package/lite/answer.js +301 -0
- package/lite/answer.js.map +1 -0
- package/lite/auth.d.ts +45 -0
- package/lite/auth.d.ts.map +1 -0
- package/lite/auth.js +204 -0
- package/lite/auth.js.map +1 -0
- package/lite/compat.d.ts +31 -0
- package/lite/compat.d.ts.map +1 -0
- package/lite/compat.js +86 -0
- package/lite/compat.js.map +1 -0
- package/lite/connection.d.ts +1 -45
- package/lite/connection.d.ts.map +1 -1
- package/lite/connection.js +360 -77
- package/lite/connection.js.map +1 -1
- package/lite/datagram-end.d.ts +26 -0
- package/lite/datagram-end.d.ts.map +1 -0
- package/lite/datagram-end.js +30 -0
- package/lite/datagram-end.js.map +1 -0
- package/lite/datagram.d.ts +73 -8
- package/lite/datagram.d.ts.map +1 -1
- package/lite/datagram.js +144 -9
- package/lite/datagram.js.map +1 -1
- package/lite/duration.d.ts +6 -0
- package/lite/duration.d.ts.map +1 -0
- package/lite/duration.js +14 -0
- package/lite/duration.js.map +1 -0
- package/lite/error.d.ts +9 -0
- package/lite/error.d.ts.map +1 -0
- package/lite/error.js +24 -0
- package/lite/error.js.map +1 -0
- package/lite/fills.d.ts +162 -0
- package/lite/fills.d.ts.map +1 -0
- package/lite/fills.js +486 -0
- package/lite/fills.js.map +1 -0
- package/lite/fit.d.ts +49 -0
- package/lite/fit.d.ts.map +1 -0
- package/lite/fit.js +305 -0
- package/lite/fit.js.map +1 -0
- package/lite/goaway.d.ts +1 -1
- package/lite/goaway.d.ts.map +1 -1
- package/lite/goaway.js +5 -13
- package/lite/goaway.js.map +1 -1
- package/lite/group.d.ts +64 -13
- package/lite/group.d.ts.map +1 -1
- package/lite/group.js +108 -30
- package/lite/group.js.map +1 -1
- package/lite/identity.d.ts +25 -0
- package/lite/identity.d.ts.map +1 -0
- package/lite/identity.js +79 -0
- package/lite/identity.js.map +1 -0
- package/lite/index.d.ts +2 -1
- package/lite/index.d.ts.map +1 -1
- package/lite/index.js +2 -1
- package/lite/index.js.map +1 -1
- package/lite/message.d.ts +9 -1
- package/lite/message.d.ts.map +1 -1
- package/lite/message.js +28 -44
- package/lite/message.js.map +1 -1
- package/lite/priority.d.ts +9 -2
- package/lite/priority.d.ts.map +1 -1
- package/lite/priority.js +11 -105
- package/lite/priority.js.map +1 -1
- package/lite/probe.d.ts.map +1 -1
- package/lite/probe.js +9 -0
- package/lite/probe.js.map +1 -1
- package/lite/publisher.d.ts +10 -1
- package/lite/publisher.d.ts.map +1 -1
- package/lite/publisher.js +2548 -437
- package/lite/publisher.js.map +1 -1
- package/lite/routed.d.ts +59 -0
- package/lite/routed.d.ts.map +1 -0
- package/lite/routed.js +564 -0
- package/lite/routed.js.map +1 -0
- package/lite/session.d.ts +1 -27
- package/lite/session.d.ts.map +1 -1
- package/lite/session.js +0 -99
- package/lite/session.js.map +1 -1
- package/lite/setup.d.ts +29 -2
- package/lite/setup.d.ts.map +1 -1
- package/lite/setup.js +95 -21
- package/lite/setup.js.map +1 -1
- package/lite/stream.d.ts +5 -11
- package/lite/stream.d.ts.map +1 -1
- package/lite/stream.js +5 -1
- package/lite/stream.js.map +1 -1
- package/lite/subscribe.d.ts +475 -75
- package/lite/subscribe.d.ts.map +1 -1
- package/lite/subscribe.js +1373 -142
- package/lite/subscribe.js.map +1 -1
- package/lite/subscriber.d.ts +7 -44
- package/lite/subscriber.d.ts.map +1 -1
- package/lite/subscriber.js +3290 -515
- package/lite/subscriber.js.map +1 -1
- package/lite/track.d.ts +24 -9
- package/lite/track.d.ts.map +1 -1
- package/lite/track.js +116 -37
- package/lite/track.js.map +1 -1
- package/lite/tracks.d.ts +55 -0
- package/lite/tracks.d.ts.map +1 -0
- package/lite/tracks.js +114 -0
- package/lite/tracks.js.map +1 -0
- package/lite/version.d.ts +132 -24
- package/lite/version.d.ts.map +1 -1
- package/lite/version.js +378 -33
- package/lite/version.js.map +1 -1
- package/meta.d.ts +77 -0
- package/meta.d.ts.map +1 -0
- package/meta.js +130 -0
- package/meta.js.map +1 -0
- package/meta_api.d.ts +7 -0
- package/meta_api.d.ts.map +1 -0
- package/meta_api.js +7 -0
- package/meta_api.js.map +1 -0
- package/mint.d.ts +28 -0
- package/mint.d.ts.map +1 -0
- package/mint.js +66 -0
- package/mint.js.map +1 -0
- package/open.d.ts +63 -0
- package/open.d.ts.map +1 -0
- package/open.js +250 -0
- package/open.js.map +1 -0
- package/origin.d.ts +392 -140
- package/origin.d.ts.map +1 -1
- package/origin.js +2533 -686
- package/origin.js.map +1 -1
- package/package.json +8 -13
- package/path.d.ts +51 -51
- package/path.d.ts.map +1 -1
- package/path.js +210 -57
- package/path.js.map +1 -1
- package/payload.d.ts +33 -0
- package/payload.d.ts.map +1 -0
- package/payload.js +65 -0
- package/payload.js.map +1 -0
- package/prefix.d.ts +152 -0
- package/prefix.d.ts.map +1 -0
- package/prefix.js +349 -0
- package/prefix.js.map +1 -0
- package/priority.d.ts +8 -0
- package/priority.d.ts.map +1 -0
- package/priority.js +185 -0
- package/priority.js.map +1 -0
- package/queue.d.ts +2 -0
- package/queue.d.ts.map +1 -0
- package/queue.js +46 -0
- package/queue.js.map +1 -0
- package/ranges.d.ts +36 -0
- package/ranges.d.ts.map +1 -0
- package/ranges.js +312 -0
- package/ranges.js.map +1 -0
- package/rescale.d.ts +24 -0
- package/rescale.d.ts.map +1 -0
- package/rescale.js +39 -0
- package/rescale.js.map +1 -0
- package/resume.d.ts +55 -0
- package/resume.d.ts.map +1 -0
- package/resume.js +4173 -0
- package/resume.js.map +1 -0
- package/resume.test-util.d.ts +2 -0
- package/resume.test-util.d.ts.map +1 -0
- package/resume.test-util.js +25 -0
- package/resume.test-util.js.map +1 -0
- package/skips.d.ts +48 -0
- package/skips.d.ts.map +1 -0
- package/skips.js +182 -0
- package/skips.js.map +1 -0
- package/stream.d.ts +75 -37
- package/stream.d.ts.map +1 -1
- package/stream.js +236 -92
- package/stream.js.map +1 -1
- package/subscription.test-util.d.ts +2 -0
- package/subscription.test-util.d.ts.map +1 -0
- package/subscription.test-util.js +49 -0
- package/subscription.test-util.js.map +1 -0
- package/tail.d.ts +23 -14
- package/tail.d.ts.map +1 -1
- package/tail.js +224 -97
- package/tail.js.map +1 -1
- package/time.d.ts +41 -102
- package/time.d.ts.map +1 -1
- package/time.js +129 -91
- package/time.js.map +1 -1
- package/timed.d.ts +21 -0
- package/timed.d.ts.map +1 -0
- package/timed.js +2 -0
- package/timed.js.map +1 -0
- package/track.d.ts +577 -245
- package/track.d.ts.map +1 -1
- package/track.js +7306 -771
- package/track.js.map +1 -1
- package/track_api.d.ts +7 -0
- package/track_api.d.ts.map +1 -0
- package/track_api.js +7 -0
- package/track_api.js.map +1 -0
- package/util/abort.d.ts +1 -0
- package/util/abort.d.ts.map +1 -1
- package/util/abort.js +23 -1
- package/util/abort.js.map +1 -1
- package/util/announce.d.ts +4 -0
- package/util/announce.d.ts.map +1 -0
- package/util/announce.js +11 -0
- package/util/announce.js.map +1 -0
- package/util/bigint.d.ts +3 -0
- package/util/bigint.d.ts.map +1 -0
- package/util/bigint.js +8 -0
- package/util/bigint.js.map +1 -0
- package/util/change.d.ts +12 -0
- package/util/change.d.ts.map +1 -0
- package/util/change.js +18 -0
- package/util/change.js.map +1 -0
- package/util/deadline.d.ts +2 -0
- package/util/deadline.d.ts.map +1 -0
- package/util/deadline.js +108 -0
- package/util/deadline.js.map +1 -0
- package/util/decode_error.d.ts +3 -0
- package/util/decode_error.d.ts.map +1 -0
- package/util/decode_error.js +11 -0
- package/util/decode_error.js.map +1 -0
- package/util/demand.d.ts +8 -0
- package/util/demand.d.ts.map +1 -0
- package/util/demand.js +24 -0
- package/util/demand.js.map +1 -0
- package/util/given_up.d.ts +2 -0
- package/util/given_up.d.ts.map +1 -0
- package/util/given_up.js +101 -0
- package/util/given_up.js.map +1 -0
- package/util/hex.d.ts +6 -0
- package/util/hex.d.ts.map +1 -1
- package/util/hex.js +19 -4
- package/util/hex.js.map +1 -1
- package/util/key.d.ts +15 -0
- package/util/key.d.ts.map +1 -0
- package/util/key.js +38 -0
- package/util/key.js.map +1 -0
- package/util/limits.d.ts +2 -0
- package/util/limits.d.ts.map +1 -0
- package/util/limits.js +76 -0
- package/util/limits.js.map +1 -0
- package/util/observed.d.ts +23 -0
- package/util/observed.d.ts.map +1 -0
- package/util/observed.js +122 -0
- package/util/observed.js.map +1 -0
- package/util/sorted.d.ts +2 -0
- package/util/sorted.d.ts.map +1 -0
- package/util/sorted.js +149 -0
- package/util/sorted.js.map +1 -0
- package/util/timeout.d.ts +2 -1
- package/util/timeout.d.ts.map +1 -1
- package/util/timeout.js +13 -9
- package/util/timeout.js.map +1 -1
- package/util/timer.d.ts +2 -0
- package/util/timer.d.ts.map +1 -0
- package/util/timer.js +19 -0
- package/util/timer.js.map +1 -0
- package/util/utf8.d.ts +2 -0
- package/util/utf8.d.ts.map +1 -1
- package/util/utf8.js +7 -1
- package/util/utf8.js.map +1 -1
- package/util/varint.d.ts.map +1 -1
- package/util/varint.js +8 -1
- package/util/varint.js.map +1 -1
- package/util/watch.d.ts +8 -0
- package/util/watch.d.ts.map +1 -0
- package/util/watch.js +38 -0
- package/util/watch.js.map +1 -0
- package/util/yield.d.ts +2 -0
- package/util/yield.d.ts.map +1 -0
- package/util/yield.js +31 -0
- package/util/yield.js.map +1 -0
- package/varint.d.ts +0 -29
- package/varint.d.ts.map +1 -1
- package/varint.js +7 -28
- package/varint.js.map +1 -1
- package/varint_api.d.ts +7 -0
- package/varint_api.d.ts.map +1 -0
- package/varint_api.js +7 -0
- package/varint_api.js.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +4 -0
- package/version.js.map +1 -0
- package/window.d.ts +570 -0
- package/window.d.ts.map +1 -0
- package/window.js +1677 -0
- package/window.js.map +1 -0
- package/wire.d.ts +145 -30
- package/wire.d.ts.map +1 -1
- package/wire.js +27 -0
- package/wire.js.map +1 -1
- package/connection/established.d.ts +0 -53
- package/connection/established.d.ts.map +0 -1
- package/connection/established.js +0 -2
- package/connection/established.js.map +0 -1
- package/ietf/adapter.d.ts +0 -75
- package/ietf/adapter.d.ts.map +0 -1
- package/ietf/adapter.js +0 -699
- package/ietf/adapter.js.map +0 -1
- package/lite/datagram_stream.d.ts +0 -8
- package/lite/datagram_stream.d.ts.map +0 -1
- package/lite/datagram_stream.js +0 -43
- package/lite/datagram_stream.js.map +0 -1
- package/lite/fetch.d.ts +0 -28
- package/lite/fetch.d.ts.map +0 -1
- package/lite/fetch.js +0 -78
- package/lite/fetch.js.map +0 -1
- package/util/log.d.ts +0 -5
- package/util/log.d.ts.map +0 -1
- package/util/log.js +0 -16
- package/util/log.js.map +0 -1
- package/zod.d.ts +0 -13
- package/zod.d.ts.map +0 -1
- package/zod.js +0 -18
- package/zod.js.map +0 -1
package/lite/subscribe.d.ts
CHANGED
|
@@ -1,52 +1,346 @@
|
|
|
1
|
+
import type * as Identity from "../identity.ts";
|
|
2
|
+
import { type Hole } from "../internal.ts";
|
|
1
3
|
import * as Path from "../path.ts";
|
|
2
4
|
import type { Reader, Writer } from "../stream.ts";
|
|
5
|
+
import type { Order, Position, Range, Start } from "../track.ts";
|
|
3
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
|
-
*
|
|
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
|
-
*
|
|
8
|
-
*
|
|
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
|
|
11
|
-
/**
|
|
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
|
|
302
|
+
* requested range before reaching here.
|
|
18
303
|
*/
|
|
19
|
-
export declare function inclusiveGroupEnd(exclusive?:
|
|
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
|
-
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
|
100
|
-
|
|
101
|
-
startGroup?:
|
|
102
|
-
endGroup?:
|
|
103
|
-
constructor({ priority,
|
|
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
|
-
|
|
106
|
-
startGroup?:
|
|
107
|
-
endGroup?:
|
|
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
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
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
|
-
*
|
|
119
|
-
*
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
-
*
|
|
129
|
-
*
|
|
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
|
|
133
|
-
group:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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
|
-
|
|
145
|
-
start:
|
|
146
|
-
|
|
147
|
-
|
|
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:
|
|
150
|
-
end:
|
|
151
|
-
error: number;
|
|
512
|
+
start: bigint;
|
|
513
|
+
end: bigint;
|
|
152
514
|
});
|
|
153
|
-
encode(w: Writer): Promise<void>;
|
|
154
|
-
static decode(r: Reader): Promise<
|
|
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
|
-
*
|
|
164
|
-
* -
|
|
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
|