@moqtap/codec 0.10.0 → 0.11.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/CHANGELOG.md +147 -0
- package/dist/auth-redaction-DsdLq4Qs.d.cts +102 -0
- package/dist/auth-redaction-DsdLq4Qs.d.ts +102 -0
- package/dist/{chunk-RYKQXBG6.cjs → chunk-27K5BUAG.cjs} +481 -517
- package/dist/{chunk-WCPENYNE.js → chunk-3RNQMGKA.js} +359 -390
- package/dist/{chunk-TSUZ6GJV.js → chunk-5AWIXOLB.js} +438 -469
- package/dist/{chunk-4XLYCT5Q.cjs → chunk-5IMHJIAZ.cjs} +52 -2
- package/dist/{chunk-KTNERCTZ.cjs → chunk-5JGZCKJO.cjs} +488 -518
- package/dist/{chunk-WCTMPDUX.cjs → chunk-73K4OSAN.cjs} +401 -432
- package/dist/{chunk-N2V7Z37J.js → chunk-7VQKRGRD.js} +19 -3
- package/dist/{chunk-BIBMDTU5.cjs → chunk-A3UCQOIB.cjs} +486 -517
- package/dist/{chunk-K2B3OVFK.js → chunk-A7PDMVXM.js} +24 -3
- package/dist/{chunk-VZHL2U2N.cjs → chunk-A7VQO6YC.cjs} +54 -38
- package/dist/{chunk-AQ445VV7.cjs → chunk-ACQHZLRZ.cjs} +66 -46
- package/dist/{chunk-L5DRACXS.js → chunk-BBICOMW6.js} +25 -3
- package/dist/{chunk-T4VWPKDG.cjs → chunk-BNIUVOCJ.cjs} +529 -599
- package/dist/{chunk-UKKDOOUO.cjs → chunk-CNC6ANS4.cjs} +58 -37
- package/dist/{chunk-OZRK73NQ.js → chunk-FDLQSWHK.js} +433 -469
- package/dist/{chunk-IJAF6PAY.js → chunk-FFNOE4UR.js} +19 -3
- package/dist/{chunk-CZNW3R5E.cjs → chunk-GMENT63T.cjs} +54 -38
- package/dist/{chunk-XCRCAUGI.cjs → chunk-HM7BLRVP.cjs} +291 -297
- package/dist/{chunk-XHAP2YST.js → chunk-HZONHFNO.js} +19 -3
- package/dist/{chunk-SDJTSMOW.cjs → chunk-ILYABWDK.cjs} +60 -38
- package/dist/{chunk-IDV2JYJ6.cjs → chunk-KRSFTZVO.cjs} +56 -40
- package/dist/{chunk-RIIA4ALQ.cjs → chunk-KSPH6KMH.cjs} +54 -38
- package/dist/{chunk-OUNN4IQB.cjs → chunk-KTY4LAUV.cjs} +482 -497
- package/dist/{chunk-RZTLQAKF.js → chunk-OJNLJT5D.js} +0 -1
- package/dist/{chunk-FT3HDNIB.js → chunk-PJK2ZS3I.js} +467 -537
- package/dist/{chunk-G53WYUXL.js → chunk-PSMZKHOC.js} +441 -456
- package/dist/{chunk-7RE6KSIY.cjs → chunk-Q5JQGHWY.cjs} +0 -1
- package/dist/{chunk-BX2N7TZM.js → chunk-SQTUQY5E.js} +31 -11
- package/dist/{chunk-CF5DDD3Q.js → chunk-WCRLAKDW.js} +239 -245
- package/dist/{chunk-KYVTM5VI.js → chunk-WL2YUEXH.js} +19 -3
- package/dist/{chunk-KGDVC4O6.js → chunk-YCNIVZS7.js} +439 -469
- package/dist/{chunk-KLPWJU6W.js → chunk-YRZQVNZO.js} +50 -0
- package/dist/{codec-CFWu5KVT.d.cts → codec-76xzrLTL.d.cts} +21 -2
- package/dist/{codec-gl4_QEva.d.ts → codec-8p40WdLg.d.ts} +20 -1
- package/dist/{codec-Dl_QIXMz.d.ts → codec-BN2Bu0KI.d.ts} +20 -1
- package/dist/{codec-Bux_Q40X.d.ts → codec-Bb6GKTrv.d.ts} +21 -2
- package/dist/{codec-EvybrBuY.d.cts → codec-BgpfHoAd.d.cts} +20 -1
- package/dist/{codec-alVA27Uc.d.ts → codec-BkheTXO7.d.ts} +20 -1
- package/dist/{codec-Czejcmxr.d.cts → codec-BwVDkokh.d.cts} +21 -2
- package/dist/{codec-BrTi4K7r.d.cts → codec-C5s1eBJX.d.cts} +21 -2
- package/dist/codec-CM5yd6n3.d.ts +38 -0
- package/dist/{codec-CWnf8mn_.d.cts → codec-Cb8HC3XV.d.cts} +21 -2
- package/dist/codec-Clu_skx8.d.cts +38 -0
- package/dist/{codec-DzkdW4kO.d.cts → codec-CpOpemR8.d.cts} +20 -1
- package/dist/{codec-CXCjya_G.d.cts → codec-Cshdl9Tt.d.cts} +20 -1
- package/dist/{codec-f7vxeVIS.d.cts → codec-DELe00w_.d.cts} +21 -2
- package/dist/{codec-DNmiG2e0.d.cts → codec-DHzKAUCa.d.cts} +20 -1
- package/dist/{codec--CVeqGQv.d.ts → codec-DdVBtvx7.d.ts} +20 -1
- package/dist/{codec-CBdOIfMY.d.ts → codec-DlxGuYMv.d.ts} +21 -2
- package/dist/{codec-BNy5syCU.d.ts → codec-DxtgPxJS.d.ts} +20 -1
- package/dist/{codec-guzqtfMk.d.cts → codec-GAY4lybi.d.cts} +20 -1
- package/dist/{codec-Cfo_z5ET.d.cts → codec-I8u2pfS4.d.cts} +20 -1
- package/dist/{codec-BxQTybUX.d.cts → codec-XLrnreeu.d.cts} +21 -2
- package/dist/{codec-DOmAmFkI.d.ts → codec-c0YEwwWn.d.ts} +20 -1
- package/dist/{codec-DaXjRrOV.d.ts → codec-ejDu-va6.d.ts} +21 -2
- package/dist/{codec-C3mdsGx3.d.ts → codec-kaBUzdpV.d.ts} +21 -2
- package/dist/{codec-CwZ6OCPP.d.ts → codec-mVYqkIUF.d.ts} +21 -2
- package/dist/{codec-08ZOr5wI.d.ts → codec-qSbO5nOa.d.ts} +21 -2
- package/dist/{codec-Cm3D261p.d.ts → codec-yYKGOipj.d.ts} +20 -1
- package/dist/{codec-Bd60SGKH.d.cts → codec-zfzg9uiy.d.cts} +20 -1
- package/dist/draft07.cjs +48 -4
- package/dist/draft07.d.cts +42 -2
- package/dist/draft07.d.ts +42 -2
- package/dist/draft07.js +49 -5
- package/dist/draft08.cjs +76 -3
- package/dist/draft08.d.cts +70 -2
- package/dist/draft08.d.ts +70 -2
- package/dist/draft08.js +77 -4
- package/dist/draft09.cjs +76 -3
- package/dist/draft09.d.cts +70 -2
- package/dist/draft09.d.ts +70 -2
- package/dist/draft09.js +77 -4
- package/dist/draft10.cjs +76 -3
- package/dist/draft10.d.cts +70 -2
- package/dist/draft10.d.ts +70 -2
- package/dist/draft10.js +77 -4
- package/dist/draft11.cjs +104 -3
- package/dist/draft11.d.cts +98 -2
- package/dist/draft11.d.ts +98 -2
- package/dist/draft11.js +105 -4
- package/dist/draft12.cjs +113 -3
- package/dist/draft12.d.cts +107 -2
- package/dist/draft12.d.ts +107 -2
- package/dist/draft12.js +114 -4
- package/dist/draft13.cjs +105 -3
- package/dist/draft13.d.cts +99 -2
- package/dist/draft13.d.ts +99 -2
- package/dist/draft13.js +106 -4
- package/dist/draft14.cjs +107 -3
- package/dist/draft14.d.cts +101 -28
- package/dist/draft14.d.ts +101 -28
- package/dist/draft14.js +108 -4
- package/dist/draft15-session.d.cts +1 -1
- package/dist/draft15-session.d.ts +1 -1
- package/dist/draft15.cjs +69 -3
- package/dist/draft15.d.cts +65 -22
- package/dist/draft15.d.ts +65 -22
- package/dist/draft15.js +70 -4
- package/dist/draft16-session.cjs +2 -2
- package/dist/draft16-session.d.cts +1 -1
- package/dist/draft16-session.d.ts +1 -1
- package/dist/draft16-session.js +1 -1
- package/dist/draft16.cjs +76 -8
- package/dist/draft16.d.cts +67 -13
- package/dist/draft16.d.ts +67 -13
- package/dist/draft16.js +73 -5
- package/dist/draft17-session.d.cts +1 -1
- package/dist/draft17-session.d.ts +1 -1
- package/dist/draft17.cjs +77 -3
- package/dist/draft17.d.cts +73 -4
- package/dist/draft17.d.ts +73 -4
- package/dist/draft17.js +78 -4
- package/dist/draft18-session.d.cts +1 -1
- package/dist/draft18-session.d.ts +1 -1
- package/dist/draft18.cjs +8 -3
- package/dist/draft18.d.cts +4 -3
- package/dist/draft18.d.ts +4 -3
- package/dist/draft18.js +9 -4
- package/dist/draft19-session.d.cts +1 -1
- package/dist/draft19-session.d.ts +1 -1
- package/dist/draft19.cjs +11 -4
- package/dist/draft19.d.cts +4 -3
- package/dist/draft19.d.ts +4 -3
- package/dist/draft19.js +12 -5
- package/dist/draft20-session.d.cts +1 -1
- package/dist/draft20-session.d.ts +1 -1
- package/dist/draft20.cjs +8 -3
- package/dist/draft20.d.cts +4 -3
- package/dist/draft20.d.ts +4 -3
- package/dist/draft20.js +9 -4
- package/dist/index.cjs +30 -30
- package/dist/index.d.cts +21 -20
- package/dist/index.d.ts +21 -20
- package/dist/index.js +15 -15
- package/dist/session.cjs +2 -2
- package/dist/session.d.cts +6 -6
- package/dist/session.d.ts +6 -6
- package/dist/session.js +1 -1
- package/dist/{types-C1rxh-id.d.cts → types-Btp416jt.d.cts} +8 -0
- package/dist/{types-C1rxh-id.d.ts → types-Btp416jt.d.ts} +8 -0
- package/dist/{types-CZTzbIzQ.d.cts → types-BxTL1NXw.d.cts} +7 -0
- package/dist/{types-CZTzbIzQ.d.ts → types-BxTL1NXw.d.ts} +7 -0
- package/dist/{types-pShrs3fN.d.cts → types-CuibHYcf.d.cts} +7 -0
- package/dist/{types-pShrs3fN.d.ts → types-CuibHYcf.d.ts} +7 -0
- package/dist/{types-CY-QWxd-.d.cts → types-CwN7AEoL.d.cts} +13 -1
- package/dist/{types-CY-QWxd-.d.ts → types-CwN7AEoL.d.ts} +13 -1
- package/dist/{types-D4bmW8rY.d.cts → types-DAnalt5K.d.cts} +7 -0
- package/dist/{types-D4bmW8rY.d.ts → types-DAnalt5K.d.ts} +7 -0
- package/dist/{types-Bg86GGVZ.d.cts → types-DxXNP32l.d.cts} +8 -0
- package/dist/{types-Bg86GGVZ.d.ts → types-DxXNP32l.d.ts} +8 -0
- package/package.json +3 -3
- package/src/core/auth-redaction.ts +192 -0
- package/src/drafts/draft07/codec.ts +40 -0
- package/src/drafts/draft07/error-codes.ts +44 -0
- package/src/drafts/draft07/index.ts +15 -0
- package/src/drafts/draft08/codec.ts +40 -0
- package/src/drafts/draft08/error-codes.ts +76 -0
- package/src/drafts/draft08/index.ts +21 -0
- package/src/drafts/draft09/codec.ts +40 -0
- package/src/drafts/draft09/error-codes.ts +76 -0
- package/src/drafts/draft09/index.ts +21 -0
- package/src/drafts/draft10/codec.ts +40 -0
- package/src/drafts/draft10/error-codes.ts +76 -0
- package/src/drafts/draft10/index.ts +21 -0
- package/src/drafts/draft11/codec.ts +60 -0
- package/src/drafts/draft11/error-codes.ts +106 -0
- package/src/drafts/draft11/index.ts +23 -0
- package/src/drafts/draft12/codec.ts +61 -0
- package/src/drafts/draft12/error-codes.ts +116 -0
- package/src/drafts/draft12/index.ts +25 -0
- package/src/drafts/draft13/codec.ts +69 -11
- package/src/drafts/draft13/error-codes.ts +107 -0
- package/src/drafts/draft13/index.ts +23 -0
- package/src/drafts/draft13/types.ts +1 -1
- package/src/drafts/draft14/codec.ts +65 -4
- package/src/drafts/draft14/data-streams.ts +331 -259
- package/src/drafts/draft14/error-codes.ts +109 -0
- package/src/drafts/draft14/index.ts +23 -0
- package/src/drafts/draft15/codec.ts +65 -8
- package/src/drafts/draft15/data-streams.ts +489 -444
- package/src/drafts/draft15/error-codes.ts +66 -0
- package/src/drafts/draft15/index.ts +15 -0
- package/src/drafts/draft15/types.ts +7 -0
- package/src/drafts/draft16/codec.ts +146 -52
- package/src/drafts/draft16/data-streams.ts +513 -442
- package/src/drafts/draft16/error-codes.ts +68 -0
- package/src/drafts/draft16/index.ts +15 -0
- package/src/drafts/draft16/messages.ts +4 -4
- package/src/drafts/draft16/session-fsm.ts +0 -1
- package/src/drafts/draft16/types.ts +22 -8
- package/src/drafts/draft17/codec.ts +73 -12
- package/src/drafts/draft17/data-streams.ts +567 -488
- package/src/drafts/draft17/index.ts +15 -0
- package/src/drafts/draft17/types.ts +7 -0
- package/src/drafts/draft18/codec.ts +66 -9
- package/src/drafts/draft18/data-streams.ts +570 -482
- package/src/drafts/draft18/index.ts +3 -0
- package/src/drafts/draft18/types.ts +16 -8
- package/src/drafts/draft19/codec.ts +70 -10
- package/src/drafts/draft19/data-streams.ts +570 -482
- package/src/drafts/draft19/error-codes.ts +3 -1
- package/src/drafts/draft19/index.ts +3 -0
- package/src/drafts/draft19/messages.ts +3 -1
- package/src/drafts/draft19/types.ts +22 -11
- package/src/drafts/draft20/codec.ts +90 -23
- package/src/drafts/draft20/data-streams.ts +610 -563
- package/src/drafts/draft20/index.ts +3 -0
- package/src/drafts/draft20/types.ts +14 -2
- package/dist/codec-BJ7BHuiZ.d.ts +0 -18
- package/dist/codec-C6Mx4bwz.d.cts +0 -18
package/dist/draft13.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.js';
|
|
2
|
+
export { D as Draft13Codec, c as createDraft13Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-c0YEwwWn.js';
|
|
2
3
|
import { b as Draft13DataStream, c as DatagramObject, F as FetchStream, S as SubgroupStream, a as Draft13MessageType, D as Draft13Message } from './types-DjxexghA.js';
|
|
3
4
|
export { A as AuthorizationToken, d as DataStreamEvent, e as DataStreamHeader, f as Draft13Announce, g as Draft13AnnounceCancel, h as Draft13AnnounceError, i as Draft13AnnounceOk, j as Draft13BaseMessage, k as Draft13ClientSetup, l as Draft13Fetch, m as Draft13FetchCancel, n as Draft13FetchError, o as Draft13FetchOk, p as Draft13GoAway, q as Draft13MaxRequestId, r as Draft13Params, s as Draft13Publish, t as Draft13PublishError, u as Draft13PublishOk, v as Draft13RequestsBlocked, w as Draft13ServerSetup, x as Draft13SetupParams, y as Draft13Subscribe, z as Draft13SubscribeDone, B as Draft13SubscribeError, C as Draft13SubscribeNamespace, E as Draft13SubscribeNamespaceError, G as Draft13SubscribeNamespaceOk, H as Draft13SubscribeOk, I as Draft13SubscribeUpdate, J as Draft13TrackStatus, K as Draft13TrackStatusError, L as Draft13TrackStatusOk, M as Draft13Unannounce, N as Draft13Unsubscribe, O as Draft13UnsubscribeNamespace, P as FetchObjectPayload, Q as FetchStreamHeader, R as JoiningFetch, T as LargestLocation, U as ObjectPayload, V as StandaloneFetch, W as SubgroupStreamHeader, X as UnknownParam } from './types-DjxexghA.js';
|
|
4
5
|
export { createDraft13SessionState } from './draft13-session.js';
|
|
@@ -14,6 +15,102 @@ declare function decodeDatagram(bytes: Uint8Array): DecodeResult<DatagramObject>
|
|
|
14
15
|
declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
|
|
15
16
|
declare function decodeDataStream(streamType: 'subgroup' | 'datagram' | 'fetch', bytes: Uint8Array): DecodeResult<Draft13DataStream>;
|
|
16
17
|
|
|
18
|
+
declare const SessionErrorCode: {
|
|
19
|
+
readonly NoError: 0n;
|
|
20
|
+
readonly InternalError: 1n;
|
|
21
|
+
readonly Unauthorized: 2n;
|
|
22
|
+
readonly ProtocolViolation: 3n;
|
|
23
|
+
readonly InvalidRequestId: 4n;
|
|
24
|
+
readonly DuplicateTrackAlias: 5n;
|
|
25
|
+
readonly KeyValueFormattingError: 6n;
|
|
26
|
+
readonly TooManyRequests: 7n;
|
|
27
|
+
readonly InvalidPath: 8n;
|
|
28
|
+
readonly MalformedPath: 9n;
|
|
29
|
+
readonly GoawayTimeout: 16n;
|
|
30
|
+
readonly ControlMessageTimeout: 17n;
|
|
31
|
+
readonly DataStreamTimeout: 18n;
|
|
32
|
+
readonly AuthTokenCacheOverflow: 19n;
|
|
33
|
+
readonly DuplicateAuthTokenAlias: 20n;
|
|
34
|
+
readonly VersionNegotiationFailed: 21n;
|
|
35
|
+
readonly MalformedAuthToken: 22n;
|
|
36
|
+
readonly UnknownAuthTokenAlias: 23n;
|
|
37
|
+
readonly ExpiredAuthToken: 24n;
|
|
38
|
+
};
|
|
39
|
+
type SessionErrorCodeValue = (typeof SessionErrorCode)[keyof typeof SessionErrorCode];
|
|
40
|
+
declare const SubscribeErrorCode: {
|
|
41
|
+
readonly InternalError: 0n;
|
|
42
|
+
readonly Unauthorized: 1n;
|
|
43
|
+
readonly Timeout: 2n;
|
|
44
|
+
readonly NotSupported: 3n;
|
|
45
|
+
readonly TrackDoesNotExist: 4n;
|
|
46
|
+
readonly InvalidRange: 5n;
|
|
47
|
+
readonly MalformedAuthToken: 16n;
|
|
48
|
+
readonly ExpiredAuthToken: 18n;
|
|
49
|
+
};
|
|
50
|
+
type SubscribeErrorCodeValue = (typeof SubscribeErrorCode)[keyof typeof SubscribeErrorCode];
|
|
51
|
+
declare const SubscribeDoneStatusCode: {
|
|
52
|
+
readonly InternalError: 0n;
|
|
53
|
+
readonly Unauthorized: 1n;
|
|
54
|
+
readonly TrackEnded: 2n;
|
|
55
|
+
readonly SubscriptionEnded: 3n;
|
|
56
|
+
readonly GoingAway: 4n;
|
|
57
|
+
readonly Expired: 5n;
|
|
58
|
+
readonly TooFarBehind: 6n;
|
|
59
|
+
readonly MalformedTrack: 7n;
|
|
60
|
+
};
|
|
61
|
+
type SubscribeDoneStatusCodeValue = (typeof SubscribeDoneStatusCode)[keyof typeof SubscribeDoneStatusCode];
|
|
62
|
+
declare const PublishErrorCode: {
|
|
63
|
+
readonly InternalError: 0n;
|
|
64
|
+
readonly Unauthorized: 1n;
|
|
65
|
+
readonly Timeout: 2n;
|
|
66
|
+
readonly NotSupported: 3n;
|
|
67
|
+
readonly Uninterested: 4n;
|
|
68
|
+
};
|
|
69
|
+
type PublishErrorCodeValue = (typeof PublishErrorCode)[keyof typeof PublishErrorCode];
|
|
70
|
+
declare const FetchErrorCode: {
|
|
71
|
+
readonly InternalError: 0n;
|
|
72
|
+
readonly Unauthorized: 1n;
|
|
73
|
+
readonly Timeout: 2n;
|
|
74
|
+
readonly NotSupported: 3n;
|
|
75
|
+
readonly TrackDoesNotExist: 4n;
|
|
76
|
+
readonly InvalidRange: 5n;
|
|
77
|
+
readonly NoObjects: 6n;
|
|
78
|
+
readonly InvalidJoiningRequestId: 7n;
|
|
79
|
+
readonly UnknownStatusInRange: 8n;
|
|
80
|
+
readonly MalformedTrack: 9n;
|
|
81
|
+
readonly MalformedAuthToken: 16n;
|
|
82
|
+
readonly ExpiredAuthToken: 18n;
|
|
83
|
+
};
|
|
84
|
+
type FetchErrorCodeValue = (typeof FetchErrorCode)[keyof typeof FetchErrorCode];
|
|
85
|
+
declare const AnnounceErrorCode: {
|
|
86
|
+
readonly InternalError: 0n;
|
|
87
|
+
readonly Unauthorized: 1n;
|
|
88
|
+
readonly Timeout: 2n;
|
|
89
|
+
readonly NotSupported: 3n;
|
|
90
|
+
readonly Uninterested: 4n;
|
|
91
|
+
readonly MalformedAuthToken: 16n;
|
|
92
|
+
readonly ExpiredAuthToken: 18n;
|
|
93
|
+
};
|
|
94
|
+
type AnnounceErrorCodeValue = (typeof AnnounceErrorCode)[keyof typeof AnnounceErrorCode];
|
|
95
|
+
declare const SubscribeNamespaceErrorCode: {
|
|
96
|
+
readonly InternalError: 0n;
|
|
97
|
+
readonly Unauthorized: 1n;
|
|
98
|
+
readonly Timeout: 2n;
|
|
99
|
+
readonly NotSupported: 3n;
|
|
100
|
+
readonly NamespacePrefixUnknown: 4n;
|
|
101
|
+
readonly NamespacePrefixOverlap: 5n;
|
|
102
|
+
readonly MalformedAuthToken: 16n;
|
|
103
|
+
readonly ExpiredAuthToken: 18n;
|
|
104
|
+
};
|
|
105
|
+
type SubscribeNamespaceErrorCodeValue = (typeof SubscribeNamespaceErrorCode)[keyof typeof SubscribeNamespaceErrorCode];
|
|
106
|
+
declare const StreamResetErrorCode: {
|
|
107
|
+
readonly InternalError: 0n;
|
|
108
|
+
readonly Cancelled: 1n;
|
|
109
|
+
readonly DeliveryTimeout: 2n;
|
|
110
|
+
readonly SessionClosed: 3n;
|
|
111
|
+
};
|
|
112
|
+
type StreamResetErrorCodeValue = (typeof StreamResetErrorCode)[keyof typeof StreamResetErrorCode];
|
|
113
|
+
|
|
17
114
|
declare const MSG_SUBSCRIBE_UPDATE = 2n;
|
|
18
115
|
declare const MSG_SUBSCRIBE = 3n;
|
|
19
116
|
declare const MSG_SUBSCRIBE_OK = 4n;
|
|
@@ -115,4 +212,4 @@ declare class Draft13SessionFSM {
|
|
|
115
212
|
|
|
116
213
|
declare const DRAFT_VERSION = 4278190093n;
|
|
117
214
|
|
|
118
|
-
export { AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, Draft13DataStream, Draft13Message, Draft13MessageType, Draft13SessionFSM, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_REQUEST_ID, MSG_PUBLISH, MSG_PUBLISH_ERROR, MSG_PUBLISH_OK, MSG_REQUESTS_BLOCKED, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_NAMESPACE_ERROR, MSG_SUBSCRIBE_NAMESPACE_OK, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_ERROR, MSG_TRACK_STATUS_OK, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_NAMESPACE, PARAM_AUTHORIZATION_TOKEN, PARAM_DELIVERY_TIMEOUT, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_REQUEST_ID, SETUP_PARAM_PATH, SessionPhase, SubgroupStream, SubscriptionState, TransitionResult, VARINT_FRAMED_MESSAGES, ValidationResult, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|
|
215
|
+
export { AnnounceErrorCode, type AnnounceErrorCodeValue, AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, Draft13DataStream, Draft13Message, Draft13MessageType, Draft13SessionFSM, FetchErrorCode, type FetchErrorCodeValue, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_REQUEST_ID, MSG_PUBLISH, MSG_PUBLISH_ERROR, MSG_PUBLISH_OK, MSG_REQUESTS_BLOCKED, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_NAMESPACE_ERROR, MSG_SUBSCRIBE_NAMESPACE_OK, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_ERROR, MSG_TRACK_STATUS_OK, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_NAMESPACE, PARAM_AUTHORIZATION_TOKEN, PARAM_DELIVERY_TIMEOUT, PublishErrorCode, type PublishErrorCodeValue, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_REQUEST_ID, SETUP_PARAM_PATH, SessionErrorCode, type SessionErrorCodeValue, SessionPhase, StreamResetErrorCode, type StreamResetErrorCodeValue, SubgroupStream, SubscribeDoneStatusCode, type SubscribeDoneStatusCodeValue, SubscribeErrorCode, type SubscribeErrorCodeValue, SubscribeNamespaceErrorCode, type SubscribeNamespaceErrorCodeValue, SubscriptionState, TransitionResult, VARINT_FRAMED_MESSAGES, ValidationResult, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|
package/dist/draft13.js
CHANGED
|
@@ -46,8 +46,9 @@ import {
|
|
|
46
46
|
encodeDatagram,
|
|
47
47
|
encodeFetchStream,
|
|
48
48
|
encodeMessage,
|
|
49
|
-
encodeSubgroupStream
|
|
50
|
-
|
|
49
|
+
encodeSubgroupStream,
|
|
50
|
+
redactAuthTokens
|
|
51
|
+
} from "./chunk-SQTUQY5E.js";
|
|
51
52
|
import {
|
|
52
53
|
BIDIRECTIONAL_MESSAGES,
|
|
53
54
|
CLIENT_ONLY_MESSAGES,
|
|
@@ -58,16 +59,109 @@ import {
|
|
|
58
59
|
getLegalIncoming,
|
|
59
60
|
getLegalOutgoing
|
|
60
61
|
} from "./chunk-2A57DRXV.js";
|
|
61
|
-
import
|
|
62
|
+
import {
|
|
63
|
+
REDACTION_FILL
|
|
64
|
+
} from "./chunk-YRZQVNZO.js";
|
|
65
|
+
|
|
66
|
+
// src/drafts/draft13/error-codes.ts
|
|
67
|
+
var SessionErrorCode = {
|
|
68
|
+
NoError: 0x0n,
|
|
69
|
+
InternalError: 0x1n,
|
|
70
|
+
Unauthorized: 0x2n,
|
|
71
|
+
ProtocolViolation: 0x3n,
|
|
72
|
+
InvalidRequestId: 0x4n,
|
|
73
|
+
DuplicateTrackAlias: 0x5n,
|
|
74
|
+
KeyValueFormattingError: 0x6n,
|
|
75
|
+
TooManyRequests: 0x7n,
|
|
76
|
+
InvalidPath: 0x8n,
|
|
77
|
+
MalformedPath: 0x9n,
|
|
78
|
+
GoawayTimeout: 0x10n,
|
|
79
|
+
ControlMessageTimeout: 0x11n,
|
|
80
|
+
DataStreamTimeout: 0x12n,
|
|
81
|
+
AuthTokenCacheOverflow: 0x13n,
|
|
82
|
+
DuplicateAuthTokenAlias: 0x14n,
|
|
83
|
+
VersionNegotiationFailed: 0x15n,
|
|
84
|
+
MalformedAuthToken: 0x16n,
|
|
85
|
+
UnknownAuthTokenAlias: 0x17n,
|
|
86
|
+
ExpiredAuthToken: 0x18n
|
|
87
|
+
};
|
|
88
|
+
var SubscribeErrorCode = {
|
|
89
|
+
InternalError: 0x0n,
|
|
90
|
+
Unauthorized: 0x1n,
|
|
91
|
+
Timeout: 0x2n,
|
|
92
|
+
NotSupported: 0x3n,
|
|
93
|
+
TrackDoesNotExist: 0x4n,
|
|
94
|
+
InvalidRange: 0x5n,
|
|
95
|
+
MalformedAuthToken: 0x10n,
|
|
96
|
+
ExpiredAuthToken: 0x12n
|
|
97
|
+
};
|
|
98
|
+
var SubscribeDoneStatusCode = {
|
|
99
|
+
InternalError: 0x0n,
|
|
100
|
+
Unauthorized: 0x1n,
|
|
101
|
+
TrackEnded: 0x2n,
|
|
102
|
+
SubscriptionEnded: 0x3n,
|
|
103
|
+
GoingAway: 0x4n,
|
|
104
|
+
Expired: 0x5n,
|
|
105
|
+
TooFarBehind: 0x6n,
|
|
106
|
+
MalformedTrack: 0x7n
|
|
107
|
+
};
|
|
108
|
+
var PublishErrorCode = {
|
|
109
|
+
InternalError: 0x0n,
|
|
110
|
+
Unauthorized: 0x1n,
|
|
111
|
+
Timeout: 0x2n,
|
|
112
|
+
NotSupported: 0x3n,
|
|
113
|
+
Uninterested: 0x4n
|
|
114
|
+
};
|
|
115
|
+
var FetchErrorCode = {
|
|
116
|
+
InternalError: 0x0n,
|
|
117
|
+
Unauthorized: 0x1n,
|
|
118
|
+
Timeout: 0x2n,
|
|
119
|
+
NotSupported: 0x3n,
|
|
120
|
+
TrackDoesNotExist: 0x4n,
|
|
121
|
+
InvalidRange: 0x5n,
|
|
122
|
+
NoObjects: 0x6n,
|
|
123
|
+
InvalidJoiningRequestId: 0x7n,
|
|
124
|
+
UnknownStatusInRange: 0x8n,
|
|
125
|
+
MalformedTrack: 0x9n,
|
|
126
|
+
MalformedAuthToken: 0x10n,
|
|
127
|
+
ExpiredAuthToken: 0x12n
|
|
128
|
+
};
|
|
129
|
+
var AnnounceErrorCode = {
|
|
130
|
+
InternalError: 0x0n,
|
|
131
|
+
Unauthorized: 0x1n,
|
|
132
|
+
Timeout: 0x2n,
|
|
133
|
+
NotSupported: 0x3n,
|
|
134
|
+
Uninterested: 0x4n,
|
|
135
|
+
MalformedAuthToken: 0x10n,
|
|
136
|
+
ExpiredAuthToken: 0x12n
|
|
137
|
+
};
|
|
138
|
+
var SubscribeNamespaceErrorCode = {
|
|
139
|
+
InternalError: 0x0n,
|
|
140
|
+
Unauthorized: 0x1n,
|
|
141
|
+
Timeout: 0x2n,
|
|
142
|
+
NotSupported: 0x3n,
|
|
143
|
+
NamespacePrefixUnknown: 0x4n,
|
|
144
|
+
NamespacePrefixOverlap: 0x5n,
|
|
145
|
+
MalformedAuthToken: 0x10n,
|
|
146
|
+
ExpiredAuthToken: 0x12n
|
|
147
|
+
};
|
|
148
|
+
var StreamResetErrorCode = {
|
|
149
|
+
InternalError: 0x0n,
|
|
150
|
+
Cancelled: 0x1n,
|
|
151
|
+
DeliveryTimeout: 0x2n,
|
|
152
|
+
SessionClosed: 0x3n
|
|
153
|
+
};
|
|
62
154
|
|
|
63
155
|
// src/drafts/draft13/index.ts
|
|
64
156
|
var DRAFT_VERSION = 0xff00000dn;
|
|
65
157
|
export {
|
|
158
|
+
AnnounceErrorCode,
|
|
66
159
|
BIDIRECTIONAL_MESSAGES,
|
|
67
160
|
CLIENT_ONLY_MESSAGES,
|
|
68
161
|
CONTROL_MESSAGES,
|
|
69
162
|
DRAFT_VERSION,
|
|
70
163
|
Draft13SessionFSM,
|
|
164
|
+
FetchErrorCode,
|
|
71
165
|
MESSAGE_ID_MAP,
|
|
72
166
|
MESSAGE_TYPE_MAP,
|
|
73
167
|
MSG_ANNOUNCE,
|
|
@@ -102,9 +196,16 @@ export {
|
|
|
102
196
|
MSG_UNSUBSCRIBE_NAMESPACE,
|
|
103
197
|
PARAM_AUTHORIZATION_TOKEN,
|
|
104
198
|
PARAM_DELIVERY_TIMEOUT,
|
|
199
|
+
PublishErrorCode,
|
|
200
|
+
REDACTION_FILL,
|
|
105
201
|
SERVER_ONLY_MESSAGES,
|
|
106
202
|
SETUP_PARAM_MAX_REQUEST_ID,
|
|
107
203
|
SETUP_PARAM_PATH,
|
|
204
|
+
SessionErrorCode,
|
|
205
|
+
StreamResetErrorCode,
|
|
206
|
+
SubscribeDoneStatusCode,
|
|
207
|
+
SubscribeErrorCode,
|
|
208
|
+
SubscribeNamespaceErrorCode,
|
|
108
209
|
VARINT_FRAMED_MESSAGES,
|
|
109
210
|
createDraft13Codec,
|
|
110
211
|
createDraft13SessionState,
|
|
@@ -119,5 +220,6 @@ export {
|
|
|
119
220
|
encodeMessage,
|
|
120
221
|
encodeSubgroupStream,
|
|
121
222
|
getLegalIncoming,
|
|
122
|
-
getLegalOutgoing
|
|
223
|
+
getLegalOutgoing,
|
|
224
|
+
redactAuthTokens
|
|
123
225
|
};
|
package/dist/draft14.cjs
CHANGED
|
@@ -52,7 +52,8 @@
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
|
|
56
|
+
var _chunkHM7BLRVPcjs = require('./chunk-HM7BLRVP.cjs');
|
|
56
57
|
|
|
57
58
|
|
|
58
59
|
|
|
@@ -63,7 +64,100 @@ var _chunkXCRCAUGIcjs = require('./chunk-XCRCAUGI.cjs');
|
|
|
63
64
|
|
|
64
65
|
|
|
65
66
|
var _chunkE65QKRSNcjs = require('./chunk-E65QKRSN.cjs');
|
|
66
|
-
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
var _chunk5IMHJIAZcjs = require('./chunk-5IMHJIAZ.cjs');
|
|
70
|
+
|
|
71
|
+
// src/drafts/draft14/error-codes.ts
|
|
72
|
+
var SessionErrorCode = {
|
|
73
|
+
NoError: 0x0n,
|
|
74
|
+
InternalError: 0x1n,
|
|
75
|
+
Unauthorized: 0x2n,
|
|
76
|
+
ProtocolViolation: 0x3n,
|
|
77
|
+
InvalidRequestId: 0x4n,
|
|
78
|
+
DuplicateTrackAlias: 0x5n,
|
|
79
|
+
KeyValueFormattingError: 0x6n,
|
|
80
|
+
TooManyRequests: 0x7n,
|
|
81
|
+
InvalidPath: 0x8n,
|
|
82
|
+
MalformedPath: 0x9n,
|
|
83
|
+
GoawayTimeout: 0x10n,
|
|
84
|
+
ControlMessageTimeout: 0x11n,
|
|
85
|
+
DataStreamTimeout: 0x12n,
|
|
86
|
+
AuthTokenCacheOverflow: 0x13n,
|
|
87
|
+
DuplicateAuthTokenAlias: 0x14n,
|
|
88
|
+
VersionNegotiationFailed: 0x15n,
|
|
89
|
+
MalformedAuthToken: 0x16n,
|
|
90
|
+
UnknownAuthTokenAlias: 0x17n,
|
|
91
|
+
ExpiredAuthToken: 0x18n,
|
|
92
|
+
InvalidAuthority: 0x19n,
|
|
93
|
+
MalformedAuthority: 0x1an
|
|
94
|
+
};
|
|
95
|
+
var SubscribeErrorCode = {
|
|
96
|
+
InternalError: 0x0n,
|
|
97
|
+
Unauthorized: 0x1n,
|
|
98
|
+
Timeout: 0x2n,
|
|
99
|
+
NotSupported: 0x3n,
|
|
100
|
+
TrackDoesNotExist: 0x4n,
|
|
101
|
+
InvalidRange: 0x5n,
|
|
102
|
+
MalformedAuthToken: 0x10n,
|
|
103
|
+
ExpiredAuthToken: 0x12n
|
|
104
|
+
};
|
|
105
|
+
var PublishDoneStatusCode = {
|
|
106
|
+
InternalError: 0x0n,
|
|
107
|
+
Unauthorized: 0x1n,
|
|
108
|
+
TrackEnded: 0x2n,
|
|
109
|
+
SubscriptionEnded: 0x3n,
|
|
110
|
+
GoingAway: 0x4n,
|
|
111
|
+
Expired: 0x5n,
|
|
112
|
+
TooFarBehind: 0x6n,
|
|
113
|
+
MalformedTrack: 0x7n
|
|
114
|
+
};
|
|
115
|
+
var PublishErrorCode = {
|
|
116
|
+
InternalError: 0x0n,
|
|
117
|
+
Unauthorized: 0x1n,
|
|
118
|
+
Timeout: 0x2n,
|
|
119
|
+
NotSupported: 0x3n,
|
|
120
|
+
Uninterested: 0x4n
|
|
121
|
+
};
|
|
122
|
+
var FetchErrorCode = {
|
|
123
|
+
InternalError: 0x0n,
|
|
124
|
+
Unauthorized: 0x1n,
|
|
125
|
+
Timeout: 0x2n,
|
|
126
|
+
NotSupported: 0x3n,
|
|
127
|
+
TrackDoesNotExist: 0x4n,
|
|
128
|
+
InvalidRange: 0x5n,
|
|
129
|
+
NoObjects: 0x6n,
|
|
130
|
+
InvalidJoiningRequestId: 0x7n,
|
|
131
|
+
UnknownStatusInRange: 0x8n,
|
|
132
|
+
MalformedTrack: 0x9n,
|
|
133
|
+
MalformedAuthToken: 0x10n,
|
|
134
|
+
ExpiredAuthToken: 0x12n
|
|
135
|
+
};
|
|
136
|
+
var AnnounceErrorCode = {
|
|
137
|
+
InternalError: 0x0n,
|
|
138
|
+
Unauthorized: 0x1n,
|
|
139
|
+
Timeout: 0x2n,
|
|
140
|
+
NotSupported: 0x3n,
|
|
141
|
+
Uninterested: 0x4n,
|
|
142
|
+
MalformedAuthToken: 0x10n,
|
|
143
|
+
ExpiredAuthToken: 0x12n
|
|
144
|
+
};
|
|
145
|
+
var SubscribeNamespaceErrorCode = {
|
|
146
|
+
InternalError: 0x0n,
|
|
147
|
+
Unauthorized: 0x1n,
|
|
148
|
+
Timeout: 0x2n,
|
|
149
|
+
NotSupported: 0x3n,
|
|
150
|
+
NamespacePrefixUnknown: 0x4n,
|
|
151
|
+
NamespacePrefixOverlap: 0x5n,
|
|
152
|
+
MalformedAuthToken: 0x10n,
|
|
153
|
+
ExpiredAuthToken: 0x12n
|
|
154
|
+
};
|
|
155
|
+
var DataStreamResetErrorCode = {
|
|
156
|
+
InternalError: 0x0n,
|
|
157
|
+
Cancelled: 0x1n,
|
|
158
|
+
DeliveryTimeout: 0x2n,
|
|
159
|
+
SessionClosed: 0x3n
|
|
160
|
+
};
|
|
67
161
|
|
|
68
162
|
// src/drafts/draft14/index.ts
|
|
69
163
|
var DRAFT_VERSION = 0xff00000en;
|
|
@@ -130,4 +224,14 @@ var DRAFT_VERSION = 0xff00000en;
|
|
|
130
224
|
|
|
131
225
|
|
|
132
226
|
|
|
133
|
-
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
exports.AnnounceErrorCode = AnnounceErrorCode; exports.BIDIRECTIONAL_MESSAGES = _chunkE65QKRSNcjs.BIDIRECTIONAL_MESSAGES; exports.CLIENT_ONLY_MESSAGES = _chunkE65QKRSNcjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkE65QKRSNcjs.CONTROL_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.DataStreamResetErrorCode = DataStreamResetErrorCode; exports.Draft14SessionFSM = _chunkE65QKRSNcjs.Draft14SessionFSM; exports.FetchErrorCode = FetchErrorCode; exports.FetchType = _chunkHM7BLRVPcjs.FetchType; exports.FilterType = _chunkHM7BLRVPcjs.FilterType; exports.GroupOrder = _chunkHM7BLRVPcjs.GroupOrder; exports.MESSAGE_ID_MAP = _chunkHM7BLRVPcjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunkHM7BLRVPcjs.MESSAGE_TYPE_MAP; exports.MSG_CLIENT_SETUP = _chunkHM7BLRVPcjs.MSG_CLIENT_SETUP; exports.MSG_FETCH = _chunkHM7BLRVPcjs.MSG_FETCH; exports.MSG_FETCH_CANCEL = _chunkHM7BLRVPcjs.MSG_FETCH_CANCEL; exports.MSG_FETCH_ERROR = _chunkHM7BLRVPcjs.MSG_FETCH_ERROR; exports.MSG_FETCH_OK = _chunkHM7BLRVPcjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunkHM7BLRVPcjs.MSG_GOAWAY; exports.MSG_MAX_REQUEST_ID = _chunkHM7BLRVPcjs.MSG_MAX_REQUEST_ID; exports.MSG_PUBLISH = _chunkHM7BLRVPcjs.MSG_PUBLISH; exports.MSG_PUBLISH_DONE = _chunkHM7BLRVPcjs.MSG_PUBLISH_DONE; exports.MSG_PUBLISH_ERROR = _chunkHM7BLRVPcjs.MSG_PUBLISH_ERROR; exports.MSG_PUBLISH_NAMESPACE = _chunkHM7BLRVPcjs.MSG_PUBLISH_NAMESPACE; exports.MSG_PUBLISH_NAMESPACE_CANCEL = _chunkHM7BLRVPcjs.MSG_PUBLISH_NAMESPACE_CANCEL; exports.MSG_PUBLISH_NAMESPACE_DONE = _chunkHM7BLRVPcjs.MSG_PUBLISH_NAMESPACE_DONE; exports.MSG_PUBLISH_NAMESPACE_ERROR = _chunkHM7BLRVPcjs.MSG_PUBLISH_NAMESPACE_ERROR; exports.MSG_PUBLISH_NAMESPACE_OK = _chunkHM7BLRVPcjs.MSG_PUBLISH_NAMESPACE_OK; exports.MSG_PUBLISH_OK = _chunkHM7BLRVPcjs.MSG_PUBLISH_OK; exports.MSG_REQUESTS_BLOCKED = _chunkHM7BLRVPcjs.MSG_REQUESTS_BLOCKED; exports.MSG_SERVER_SETUP = _chunkHM7BLRVPcjs.MSG_SERVER_SETUP; exports.MSG_SUBSCRIBE = _chunkHM7BLRVPcjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBE_ERROR = _chunkHM7BLRVPcjs.MSG_SUBSCRIBE_ERROR; exports.MSG_SUBSCRIBE_NAMESPACE = _chunkHM7BLRVPcjs.MSG_SUBSCRIBE_NAMESPACE; exports.MSG_SUBSCRIBE_NAMESPACE_ERROR = _chunkHM7BLRVPcjs.MSG_SUBSCRIBE_NAMESPACE_ERROR; exports.MSG_SUBSCRIBE_NAMESPACE_OK = _chunkHM7BLRVPcjs.MSG_SUBSCRIBE_NAMESPACE_OK; exports.MSG_SUBSCRIBE_OK = _chunkHM7BLRVPcjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_UPDATE = _chunkHM7BLRVPcjs.MSG_SUBSCRIBE_UPDATE; exports.MSG_TRACK_STATUS = _chunkHM7BLRVPcjs.MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_ERROR = _chunkHM7BLRVPcjs.MSG_TRACK_STATUS_ERROR; exports.MSG_TRACK_STATUS_OK = _chunkHM7BLRVPcjs.MSG_TRACK_STATUS_OK; exports.MSG_UNSUBSCRIBE = _chunkHM7BLRVPcjs.MSG_UNSUBSCRIBE; exports.MSG_UNSUBSCRIBE_NAMESPACE = _chunkHM7BLRVPcjs.MSG_UNSUBSCRIBE_NAMESPACE; exports.PARAM_MAX_REQUEST_ID = _chunkHM7BLRVPcjs.PARAM_MAX_REQUEST_ID; exports.PARAM_MOQT_IMPLEMENTATION = _chunkHM7BLRVPcjs.PARAM_MOQT_IMPLEMENTATION; exports.PARAM_PATH = _chunkHM7BLRVPcjs.PARAM_PATH; exports.PARAM_ROLE = _chunkHM7BLRVPcjs.PARAM_ROLE; exports.PublishDoneStatusCode = PublishDoneStatusCode; exports.PublishErrorCode = PublishErrorCode; exports.REDACTION_FILL = _chunk5IMHJIAZcjs.REDACTION_FILL; exports.SERVER_ONLY_MESSAGES = _chunkE65QKRSNcjs.SERVER_ONLY_MESSAGES; exports.SessionErrorCode = SessionErrorCode; exports.SubscribeErrorCode = SubscribeErrorCode; exports.SubscribeNamespaceErrorCode = SubscribeNamespaceErrorCode; exports.createDataStreamDecoder = _chunkHM7BLRVPcjs.createDataStreamDecoder; exports.createDraft14Codec = _chunkHM7BLRVPcjs.createDraft14Codec; exports.createDraft14SessionState = _chunkE65QKRSNcjs.createDraft14SessionState; exports.createFetchStreamDecoder = _chunkHM7BLRVPcjs.createFetchStreamDecoder; exports.createStreamDecoder = _chunkHM7BLRVPcjs.createStreamDecoder; exports.createSubgroupStreamDecoder = _chunkHM7BLRVPcjs.createSubgroupStreamDecoder; exports.decodeDataStream = _chunkHM7BLRVPcjs.decodeDataStream; exports.decodeDatagram = _chunkHM7BLRVPcjs.decodeDatagram; exports.decodeFetchStream = _chunkHM7BLRVPcjs.decodeFetchStream; exports.decodeMessage = _chunkHM7BLRVPcjs.decodeMessage; exports.decodeSubgroupStream = _chunkHM7BLRVPcjs.decodeSubgroupStream; exports.encodeDatagram = _chunkHM7BLRVPcjs.encodeDatagram; exports.encodeFetchStream = _chunkHM7BLRVPcjs.encodeFetchStream; exports.encodeMessage = _chunkHM7BLRVPcjs.encodeMessage; exports.encodeSubgroupStream = _chunkHM7BLRVPcjs.encodeSubgroupStream; exports.getLegalIncoming = _chunkE65QKRSNcjs.getLegalIncoming; exports.getLegalOutgoing = _chunkE65QKRSNcjs.getLegalOutgoing; exports.redactAuthTokens = _chunkHM7BLRVPcjs.redactAuthTokens;
|
package/dist/draft14.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.cjs';
|
|
2
|
+
export { D as Draft14Codec, c as createDraft14Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-zfzg9uiy.cjs';
|
|
2
3
|
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft14DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft14MessageType, D as Draft14Message } from './types-CmqT0jUf.cjs';
|
|
3
4
|
export { A as AuthorizationToken, g as DataStreamHeader, h as Draft14BaseMessage, i as Draft14ClientSetup, j as Draft14Fetch, k as Draft14FetchCancel, l as Draft14FetchError, m as Draft14FetchOk, n as Draft14GoAway, o as Draft14MaxRequestId, p as Draft14Params, q as Draft14Publish, r as Draft14PublishDone, s as Draft14PublishError, t as Draft14PublishNamespace, u as Draft14PublishNamespaceCancel, v as Draft14PublishNamespaceDone, w as Draft14PublishNamespaceError, x as Draft14PublishNamespaceOk, y as Draft14PublishOk, z as Draft14RequestsBlocked, B as Draft14ServerSetup, C as Draft14Subscribe, E as Draft14SubscribeError, G as Draft14SubscribeNamespace, H as Draft14SubscribeNamespaceError, I as Draft14SubscribeNamespaceOk, J as Draft14SubscribeOk, K as Draft14SubscribeUpdate, L as Draft14TrackStatus, M as Draft14TrackStatusError, N as Draft14TrackStatusOk, P as Draft14Unsubscribe, Q as Draft14UnsubscribeNamespace, R as FetchObjectPayload, T as FetchType, U as FetchTypeValue, V as FilterType, W as FilterTypeValue, X as GroupOrder, Y as GroupOrderValue, Z as Location, _ as UnknownParam } from './types-CmqT0jUf.cjs';
|
|
4
5
|
export { createDraft14SessionState } from './draft14-session.cjs';
|
|
@@ -23,43 +24,115 @@ declare function encodeDatagram(dg: DatagramObject): Uint8Array;
|
|
|
23
24
|
* [ObjectStatus], Payload.
|
|
24
25
|
*/
|
|
25
26
|
declare function encodeFetchStream(stream: FetchStream): Uint8Array;
|
|
26
|
-
/**
|
|
27
|
-
* Decode a subgroup data stream from raw bytes.
|
|
28
|
-
* Accepts types 0x10-0x15 and 0x18-0x1D. Delta-decodes Object IDs.
|
|
29
|
-
*/
|
|
30
27
|
declare function decodeSubgroupStream(bytes: Uint8Array): DecodeResult<SubgroupStream>;
|
|
31
|
-
/**
|
|
32
|
-
* Decode a datagram object from raw bytes.
|
|
33
|
-
* Accepts types 0x00-0x07 and 0x20-0x21.
|
|
34
|
-
*/
|
|
35
28
|
declare function decodeDatagram(bytes: Uint8Array): DecodeResult<DatagramObject>;
|
|
36
|
-
/**
|
|
37
|
-
* Decode a fetch data stream from raw bytes.
|
|
38
|
-
* Draft-14 fetch: type 0x05, per-object has all fields (no serialization flags).
|
|
39
|
-
*/
|
|
40
29
|
declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
|
|
41
30
|
/**
|
|
42
31
|
* Decode a data stream, dispatching by stream type.
|
|
43
32
|
*/
|
|
44
33
|
declare function decodeDataStream(streamType: 'subgroup' | 'datagram' | 'fetch', bytes: Uint8Array): DecodeResult<Draft14DataStream>;
|
|
45
|
-
/**
|
|
46
|
-
* Create a TransformStream that decodes a subgroup data stream.
|
|
47
|
-
* First emits a SubgroupStreamHeader, then emits ObjectPayload events.
|
|
48
|
-
* Accepts types 0x10-0x1D. Delta-decodes Object IDs.
|
|
49
|
-
*/
|
|
50
34
|
declare function createSubgroupStreamDecoder(): TransformStream<Uint8Array, SubgroupStreamHeader | ObjectPayload>;
|
|
51
|
-
/**
|
|
52
|
-
* Create a TransformStream that decodes a fetch data stream.
|
|
53
|
-
* First emits a FetchStreamHeader, then emits FetchObjectPayload events.
|
|
54
|
-
* Draft-14 fetch: type 0x05, per-object has all fields.
|
|
55
|
-
*/
|
|
56
35
|
declare function createFetchStreamDecoder(): TransformStream<Uint8Array, FetchStreamHeader | ObjectPayload>;
|
|
57
|
-
/**
|
|
58
|
-
* Create a unified auto-detecting data stream decoder.
|
|
59
|
-
* Reads the stream type varint: 0x10-0x1D = subgroup, 0x05 = fetch.
|
|
60
|
-
*/
|
|
61
36
|
declare function createDataStreamDecoder(): TransformStream<Uint8Array, DataStreamEvent>;
|
|
62
37
|
|
|
38
|
+
declare const SessionErrorCode: {
|
|
39
|
+
readonly NoError: 0n;
|
|
40
|
+
readonly InternalError: 1n;
|
|
41
|
+
readonly Unauthorized: 2n;
|
|
42
|
+
readonly ProtocolViolation: 3n;
|
|
43
|
+
readonly InvalidRequestId: 4n;
|
|
44
|
+
readonly DuplicateTrackAlias: 5n;
|
|
45
|
+
readonly KeyValueFormattingError: 6n;
|
|
46
|
+
readonly TooManyRequests: 7n;
|
|
47
|
+
readonly InvalidPath: 8n;
|
|
48
|
+
readonly MalformedPath: 9n;
|
|
49
|
+
readonly GoawayTimeout: 16n;
|
|
50
|
+
readonly ControlMessageTimeout: 17n;
|
|
51
|
+
readonly DataStreamTimeout: 18n;
|
|
52
|
+
readonly AuthTokenCacheOverflow: 19n;
|
|
53
|
+
readonly DuplicateAuthTokenAlias: 20n;
|
|
54
|
+
readonly VersionNegotiationFailed: 21n;
|
|
55
|
+
readonly MalformedAuthToken: 22n;
|
|
56
|
+
readonly UnknownAuthTokenAlias: 23n;
|
|
57
|
+
readonly ExpiredAuthToken: 24n;
|
|
58
|
+
readonly InvalidAuthority: 25n;
|
|
59
|
+
readonly MalformedAuthority: 26n;
|
|
60
|
+
};
|
|
61
|
+
type SessionErrorCodeValue = (typeof SessionErrorCode)[keyof typeof SessionErrorCode];
|
|
62
|
+
declare const SubscribeErrorCode: {
|
|
63
|
+
readonly InternalError: 0n;
|
|
64
|
+
readonly Unauthorized: 1n;
|
|
65
|
+
readonly Timeout: 2n;
|
|
66
|
+
readonly NotSupported: 3n;
|
|
67
|
+
readonly TrackDoesNotExist: 4n;
|
|
68
|
+
readonly InvalidRange: 5n;
|
|
69
|
+
readonly MalformedAuthToken: 16n;
|
|
70
|
+
readonly ExpiredAuthToken: 18n;
|
|
71
|
+
};
|
|
72
|
+
type SubscribeErrorCodeValue = (typeof SubscribeErrorCode)[keyof typeof SubscribeErrorCode];
|
|
73
|
+
declare const PublishDoneStatusCode: {
|
|
74
|
+
readonly InternalError: 0n;
|
|
75
|
+
readonly Unauthorized: 1n;
|
|
76
|
+
readonly TrackEnded: 2n;
|
|
77
|
+
readonly SubscriptionEnded: 3n;
|
|
78
|
+
readonly GoingAway: 4n;
|
|
79
|
+
readonly Expired: 5n;
|
|
80
|
+
readonly TooFarBehind: 6n;
|
|
81
|
+
readonly MalformedTrack: 7n;
|
|
82
|
+
};
|
|
83
|
+
type PublishDoneStatusCodeValue = (typeof PublishDoneStatusCode)[keyof typeof PublishDoneStatusCode];
|
|
84
|
+
declare const PublishErrorCode: {
|
|
85
|
+
readonly InternalError: 0n;
|
|
86
|
+
readonly Unauthorized: 1n;
|
|
87
|
+
readonly Timeout: 2n;
|
|
88
|
+
readonly NotSupported: 3n;
|
|
89
|
+
readonly Uninterested: 4n;
|
|
90
|
+
};
|
|
91
|
+
type PublishErrorCodeValue = (typeof PublishErrorCode)[keyof typeof PublishErrorCode];
|
|
92
|
+
declare const FetchErrorCode: {
|
|
93
|
+
readonly InternalError: 0n;
|
|
94
|
+
readonly Unauthorized: 1n;
|
|
95
|
+
readonly Timeout: 2n;
|
|
96
|
+
readonly NotSupported: 3n;
|
|
97
|
+
readonly TrackDoesNotExist: 4n;
|
|
98
|
+
readonly InvalidRange: 5n;
|
|
99
|
+
readonly NoObjects: 6n;
|
|
100
|
+
readonly InvalidJoiningRequestId: 7n;
|
|
101
|
+
readonly UnknownStatusInRange: 8n;
|
|
102
|
+
readonly MalformedTrack: 9n;
|
|
103
|
+
readonly MalformedAuthToken: 16n;
|
|
104
|
+
readonly ExpiredAuthToken: 18n;
|
|
105
|
+
};
|
|
106
|
+
type FetchErrorCodeValue = (typeof FetchErrorCode)[keyof typeof FetchErrorCode];
|
|
107
|
+
declare const AnnounceErrorCode: {
|
|
108
|
+
readonly InternalError: 0n;
|
|
109
|
+
readonly Unauthorized: 1n;
|
|
110
|
+
readonly Timeout: 2n;
|
|
111
|
+
readonly NotSupported: 3n;
|
|
112
|
+
readonly Uninterested: 4n;
|
|
113
|
+
readonly MalformedAuthToken: 16n;
|
|
114
|
+
readonly ExpiredAuthToken: 18n;
|
|
115
|
+
};
|
|
116
|
+
type AnnounceErrorCodeValue = (typeof AnnounceErrorCode)[keyof typeof AnnounceErrorCode];
|
|
117
|
+
declare const SubscribeNamespaceErrorCode: {
|
|
118
|
+
readonly InternalError: 0n;
|
|
119
|
+
readonly Unauthorized: 1n;
|
|
120
|
+
readonly Timeout: 2n;
|
|
121
|
+
readonly NotSupported: 3n;
|
|
122
|
+
readonly NamespacePrefixUnknown: 4n;
|
|
123
|
+
readonly NamespacePrefixOverlap: 5n;
|
|
124
|
+
readonly MalformedAuthToken: 16n;
|
|
125
|
+
readonly ExpiredAuthToken: 18n;
|
|
126
|
+
};
|
|
127
|
+
type SubscribeNamespaceErrorCodeValue = (typeof SubscribeNamespaceErrorCode)[keyof typeof SubscribeNamespaceErrorCode];
|
|
128
|
+
declare const DataStreamResetErrorCode: {
|
|
129
|
+
readonly InternalError: 0n;
|
|
130
|
+
readonly Cancelled: 1n;
|
|
131
|
+
readonly DeliveryTimeout: 2n;
|
|
132
|
+
readonly SessionClosed: 3n;
|
|
133
|
+
};
|
|
134
|
+
type DataStreamResetErrorCodeValue = (typeof DataStreamResetErrorCode)[keyof typeof DataStreamResetErrorCode];
|
|
135
|
+
|
|
63
136
|
declare const MSG_SUBSCRIBE_UPDATE = 2n;
|
|
64
137
|
declare const MSG_SUBSCRIBE = 3n;
|
|
65
138
|
declare const MSG_SUBSCRIBE_OK = 4n;
|
|
@@ -162,4 +235,4 @@ declare class Draft14SessionFSM {
|
|
|
162
235
|
|
|
163
236
|
declare const DRAFT_VERSION = 4278190094n;
|
|
164
237
|
|
|
165
|
-
export { BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DataStreamEvent, DatagramObject, Draft14DataStream, Draft14Message, Draft14MessageType, Draft14SessionFSM, FetchState, FetchStream, FetchStreamHeader, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_REQUEST_ID, MSG_PUBLISH, MSG_PUBLISH_DONE, MSG_PUBLISH_ERROR, MSG_PUBLISH_NAMESPACE, MSG_PUBLISH_NAMESPACE_CANCEL, MSG_PUBLISH_NAMESPACE_DONE, MSG_PUBLISH_NAMESPACE_ERROR, MSG_PUBLISH_NAMESPACE_OK, MSG_PUBLISH_OK, MSG_REQUESTS_BLOCKED, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_NAMESPACE_ERROR, MSG_SUBSCRIBE_NAMESPACE_OK, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_ERROR, MSG_TRACK_STATUS_OK, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_NAMESPACE, ObjectPayload, PARAM_MAX_REQUEST_ID, PARAM_MOQT_IMPLEMENTATION, PARAM_PATH, PARAM_ROLE, PublishState, SERVER_ONLY_MESSAGES, SessionPhase, SubgroupStream, SubgroupStreamHeader, SubscriptionState, TransitionResult, ValidationResult, createDataStreamDecoder, createFetchStreamDecoder, createSubgroupStreamDecoder, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|
|
238
|
+
export { AnnounceErrorCode, type AnnounceErrorCodeValue, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DataStreamEvent, DataStreamResetErrorCode, type DataStreamResetErrorCodeValue, DatagramObject, Draft14DataStream, Draft14Message, Draft14MessageType, Draft14SessionFSM, FetchErrorCode, type FetchErrorCodeValue, FetchState, FetchStream, FetchStreamHeader, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_REQUEST_ID, MSG_PUBLISH, MSG_PUBLISH_DONE, MSG_PUBLISH_ERROR, MSG_PUBLISH_NAMESPACE, MSG_PUBLISH_NAMESPACE_CANCEL, MSG_PUBLISH_NAMESPACE_DONE, MSG_PUBLISH_NAMESPACE_ERROR, MSG_PUBLISH_NAMESPACE_OK, MSG_PUBLISH_OK, MSG_REQUESTS_BLOCKED, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_NAMESPACE_ERROR, MSG_SUBSCRIBE_NAMESPACE_OK, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_ERROR, MSG_TRACK_STATUS_OK, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_NAMESPACE, ObjectPayload, PARAM_MAX_REQUEST_ID, PARAM_MOQT_IMPLEMENTATION, PARAM_PATH, PARAM_ROLE, PublishDoneStatusCode, type PublishDoneStatusCodeValue, PublishErrorCode, type PublishErrorCodeValue, PublishState, SERVER_ONLY_MESSAGES, SessionErrorCode, type SessionErrorCodeValue, SessionPhase, SubgroupStream, SubgroupStreamHeader, SubscribeErrorCode, type SubscribeErrorCodeValue, SubscribeNamespaceErrorCode, type SubscribeNamespaceErrorCodeValue, SubscriptionState, TransitionResult, ValidationResult, createDataStreamDecoder, createFetchStreamDecoder, createSubgroupStreamDecoder, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|