@moqtap/codec 0.11.0 → 0.12.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 +28 -0
- package/README.md +3 -2
- package/dist/{auth-redaction-DsdLq4Qs.d.cts → auth-redaction-B9JJOlIY.d.cts} +0 -2
- package/dist/{auth-redaction-DsdLq4Qs.d.ts → auth-redaction-B9JJOlIY.d.ts} +0 -2
- package/dist/chunk-OBATJBNL.cjs +868 -0
- package/dist/chunk-T2TCLZZV.js +2304 -0
- package/dist/chunk-WB65UG7G.cjs +2304 -0
- package/dist/chunk-XPCBPACE.js +868 -0
- package/dist/{codec-c0YEwwWn.d.ts → codec-B-oUU-cp.d.ts} +2 -2
- package/dist/{codec-DHzKAUCa.d.cts → codec-B3RpCI9k.d.cts} +2 -2
- package/dist/{codec-Clu_skx8.d.cts → codec-B5pcOS3m.d.cts} +2 -2
- package/dist/{codec-DxtgPxJS.d.ts → codec-BLjxwK2f.d.ts} +2 -2
- package/dist/{codec-BkheTXO7.d.ts → codec-BV3CL_3m.d.ts} +2 -2
- package/dist/{codec-Bb6GKTrv.d.ts → codec-BYCDWgED.d.ts} +2 -2
- package/dist/{codec-ejDu-va6.d.ts → codec-Bwqq7ZQT.d.ts} +2 -2
- package/dist/{codec-76xzrLTL.d.cts → codec-BzWxOFby.d.cts} +2 -2
- package/dist/{codec-CM5yd6n3.d.ts → codec-C-nJhNNl.d.ts} +2 -2
- package/dist/{codec-BgpfHoAd.d.cts → codec-C11VEPbQ.d.cts} +2 -2
- package/dist/codec-C9U0Vzy9.d.cts +68 -0
- package/dist/{codec-yYKGOipj.d.ts → codec-CCx22jnd.d.ts} +2 -2
- package/dist/{codec-mVYqkIUF.d.ts → codec-CP3zkfTv.d.ts} +2 -2
- package/dist/{codec-qSbO5nOa.d.ts → codec-CRmOLDpt.d.ts} +2 -2
- package/dist/{codec-CpOpemR8.d.cts → codec-CUu56DDU.d.cts} +2 -2
- package/dist/codec-Cb8mUre3.d.ts +68 -0
- package/dist/{codec-DELe00w_.d.cts → codec-CemqAQdR.d.cts} +2 -2
- package/dist/{codec-8p40WdLg.d.ts → codec-CxMvsVMS.d.ts} +2 -2
- package/dist/{codec-zfzg9uiy.d.cts → codec-DIgMVTi4.d.cts} +2 -2
- package/dist/{codec-DdVBtvx7.d.ts → codec-DYzozF68.d.ts} +2 -2
- package/dist/{codec-kaBUzdpV.d.ts → codec-D_O9zxax.d.ts} +2 -2
- package/dist/{codec-XLrnreeu.d.cts → codec-Ddc-QxV6.d.cts} +2 -2
- package/dist/{codec-C5s1eBJX.d.cts → codec-DoojMl2z.d.cts} +2 -2
- package/dist/{codec-DlxGuYMv.d.ts → codec-DqdjiOQF.d.ts} +2 -2
- package/dist/{codec-Cshdl9Tt.d.cts → codec-Dstemwrq.d.cts} +2 -2
- package/dist/{codec-BN2Bu0KI.d.ts → codec-Dt6nuejp.d.ts} +2 -2
- package/dist/{codec-BwVDkokh.d.cts → codec-DuYhd8fP.d.cts} +2 -2
- package/dist/{codec-I8u2pfS4.d.cts → codec-DwNOFgPU.d.cts} +2 -2
- package/dist/{codec-GAY4lybi.d.cts → codec-l01BpNhF.d.cts} +2 -2
- package/dist/{codec-Cb8HC3XV.d.cts → codec-psN2vB6I.d.cts} +2 -2
- package/dist/draft07-session.d.cts +3 -3
- package/dist/draft07-session.d.ts +3 -3
- package/dist/draft07.d.cts +4 -4
- package/dist/draft07.d.ts +4 -4
- package/dist/draft08-session.d.cts +3 -3
- package/dist/draft08-session.d.ts +3 -3
- package/dist/draft08.d.cts +5 -5
- package/dist/draft08.d.ts +5 -5
- package/dist/draft09-session.d.cts +3 -3
- package/dist/draft09-session.d.ts +3 -3
- package/dist/draft09.d.cts +5 -5
- package/dist/draft09.d.ts +5 -5
- package/dist/draft10-session.d.cts +3 -3
- package/dist/draft10-session.d.ts +3 -3
- package/dist/draft10.d.cts +5 -5
- package/dist/draft10.d.ts +5 -5
- package/dist/draft11-session.d.cts +3 -3
- package/dist/draft11-session.d.ts +3 -3
- package/dist/draft11.d.cts +5 -5
- package/dist/draft11.d.ts +5 -5
- package/dist/draft12-session.d.cts +3 -3
- package/dist/draft12-session.d.ts +3 -3
- package/dist/draft12.d.cts +5 -5
- package/dist/draft12.d.ts +5 -5
- package/dist/draft13-session.d.cts +3 -3
- package/dist/draft13-session.d.ts +3 -3
- package/dist/draft13.d.cts +5 -5
- package/dist/draft13.d.ts +5 -5
- package/dist/draft14-session.d.cts +3 -3
- package/dist/draft14-session.d.ts +3 -3
- package/dist/draft14.d.cts +5 -5
- package/dist/draft14.d.ts +5 -5
- package/dist/draft15-session.d.cts +3 -3
- package/dist/draft15-session.d.ts +3 -3
- package/dist/draft15.d.cts +5 -5
- package/dist/draft15.d.ts +5 -5
- package/dist/draft16-session.d.cts +3 -3
- package/dist/draft16-session.d.ts +3 -3
- package/dist/draft16.d.cts +5 -5
- package/dist/draft16.d.ts +5 -5
- package/dist/draft17-session.d.cts +3 -3
- package/dist/draft17-session.d.ts +3 -3
- package/dist/draft17.d.cts +4 -4
- package/dist/draft17.d.ts +4 -4
- package/dist/draft18-session.d.cts +3 -3
- package/dist/draft18-session.d.ts +3 -3
- package/dist/draft18.d.cts +4 -4
- package/dist/draft18.d.ts +4 -4
- package/dist/draft19-session.d.cts +3 -3
- package/dist/draft19-session.d.ts +3 -3
- package/dist/draft19.d.cts +4 -4
- package/dist/draft19.d.ts +4 -4
- package/dist/draft20-session.d.cts +3 -3
- package/dist/draft20-session.d.ts +3 -3
- package/dist/draft20.d.cts +4 -4
- package/dist/draft20.d.ts +4 -4
- package/dist/draft21-session.cjs +8 -0
- package/dist/draft21-session.d.cts +195 -0
- package/dist/draft21-session.d.ts +195 -0
- package/dist/draft21-session.js +8 -0
- package/dist/draft21.cjs +222 -0
- package/dist/draft21.d.cts +176 -0
- package/dist/draft21.d.ts +176 -0
- package/dist/draft21.js +222 -0
- package/dist/index.cjs +7 -1
- package/dist/index.d.cts +23 -18
- package/dist/index.d.ts +23 -18
- package/dist/index.js +7 -1
- package/dist/{session-types-Dn7b3RZM.d.ts → session-types-Cxx7W8zZ.d.ts} +1 -1
- package/dist/{session-types-B9idsih-.d.cts → session-types-DZkI_qFG.d.cts} +1 -1
- package/dist/session.cjs +5 -1
- package/dist/session.d.cts +5 -3
- package/dist/session.d.ts +5 -3
- package/dist/session.js +5 -1
- package/dist/{types-DG5_iKuv.d.cts → types-2NisMA8_.d.cts} +1 -1
- package/dist/{types-DG5_iKuv.d.ts → types-2NisMA8_.d.ts} +1 -1
- package/dist/types-DDwidj2d.d.cts +371 -0
- package/dist/types-DDwidj2d.d.ts +371 -0
- package/package.json +14 -2
- package/src/core/auth-redaction.ts +0 -2
- package/src/core/types.ts +1 -0
- package/src/drafts/draft19/codec.ts +1 -1
- package/src/drafts/draft20/codec.ts +1 -1
- package/src/drafts/draft21/codec.ts +1816 -0
- package/src/drafts/draft21/data-streams.ts +1338 -0
- package/src/drafts/draft21/error-codes.ts +135 -0
- package/src/drafts/draft21/index.ts +168 -0
- package/src/drafts/draft21/messages.ts +68 -0
- package/src/drafts/draft21/rules.ts +107 -0
- package/src/drafts/draft21/session-fsm.ts +1063 -0
- package/src/drafts/draft21/session.ts +21 -0
- package/src/drafts/draft21/types.ts +473 -0
- package/src/index.ts +9 -1
- package/src/session.ts +4 -0
package/dist/draft21.cjs
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
var _chunkWB65UG7Gcjs = require('./chunk-WB65UG7G.cjs');
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
var _chunkOBATJBNLcjs = require('./chunk-OBATJBNL.cjs');
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
var _chunk5IMHJIAZcjs = require('./chunk-5IMHJIAZ.cjs');
|
|
62
|
+
|
|
63
|
+
// src/drafts/draft21/error-codes.ts
|
|
64
|
+
var SessionTerminationCode = {
|
|
65
|
+
NoError: 0x0n,
|
|
66
|
+
InternalError: 0x1n,
|
|
67
|
+
Unauthorized: 0x2n,
|
|
68
|
+
ProtocolViolation: 0x3n,
|
|
69
|
+
InvalidRequestId: 0x4n,
|
|
70
|
+
DuplicateTrackAlias: 0x5n,
|
|
71
|
+
KeyValueFormattingError: 0x6n,
|
|
72
|
+
InvalidPath: 0x8n,
|
|
73
|
+
MalformedPath: 0x9n,
|
|
74
|
+
GoawayTimeout: 0x10n,
|
|
75
|
+
ControlMessageTimeout: 0x11n,
|
|
76
|
+
DataStreamTimeout: 0x12n,
|
|
77
|
+
AuthTokenCacheOverflow: 0x13n,
|
|
78
|
+
DuplicateAuthTokenAlias: 0x14n,
|
|
79
|
+
// 0x15 VERSION_NEGOTIATION_FAILED — REMOVED in draft-20. Version negotiation
|
|
80
|
+
// moved to ALPN / WT-Available-Protocols in draft-15, so there is no longer a
|
|
81
|
+
// SETUP-time negotiation that can fail. See RETIRED_SESSION_TERMINATION_CODES.
|
|
82
|
+
MalformedAuthToken: 0x16n,
|
|
83
|
+
UnknownAuthTokenAlias: 0x17n,
|
|
84
|
+
ExpiredAuthToken: 0x18n,
|
|
85
|
+
InvalidAuthority: 0x19n,
|
|
86
|
+
MalformedAuthority: 0x1an,
|
|
87
|
+
TooManyRequestUpdates: 0x1bn
|
|
88
|
+
};
|
|
89
|
+
var RequestErrorCode = {
|
|
90
|
+
InternalError: 0x0n,
|
|
91
|
+
Unauthorized: 0x1n,
|
|
92
|
+
Timeout: 0x2n,
|
|
93
|
+
NotSupported: 0x3n,
|
|
94
|
+
MalformedAuthToken: 0x4n,
|
|
95
|
+
ExpiredAuthToken: 0x5n,
|
|
96
|
+
GoingAway: 0x6n,
|
|
97
|
+
ExcessiveLoad: 0x9n,
|
|
98
|
+
DoesNotExist: 0x10n,
|
|
99
|
+
InvalidRange: 0x11n,
|
|
100
|
+
MalformedTrack: 0x12n,
|
|
101
|
+
Uninterested: 0x20n,
|
|
102
|
+
PrefixOverlap: 0x30n,
|
|
103
|
+
NamespaceTooLarge: 0x31n,
|
|
104
|
+
// 0x32 INVALID_JOINING_REQUEST_ID — REMOVED in draft-20 along with the whole
|
|
105
|
+
// joining-fetch mechanism (draft-19 Section 10.12.2). A draft-21 FETCH names
|
|
106
|
+
// its own track inline and never references another request, so there is no
|
|
107
|
+
// joining Request ID left to be invalid. See RETIRED_REQUEST_ERROR_CODES.
|
|
108
|
+
UnsupportedExtension: 0x33n,
|
|
109
|
+
Redirect: 0x34n,
|
|
110
|
+
ConflictingFilters: 0x35n,
|
|
111
|
+
InvalidFilter: 0x36n
|
|
112
|
+
};
|
|
113
|
+
var PublishDoneCode = {
|
|
114
|
+
InternalError: 0x0n,
|
|
115
|
+
Unauthorized: 0x1n,
|
|
116
|
+
TrackEnded: 0x2n,
|
|
117
|
+
// 0x3 SUBSCRIPTION_ENDED — REMOVED in draft-20. The behaviour went with it:
|
|
118
|
+
// Section 3.3.1 now says "A publisher does not end a subscription solely
|
|
119
|
+
// because the Largest Object advances past the end of the current Location
|
|
120
|
+
// Filter", which is the only thing this code used to report.
|
|
121
|
+
// See RETIRED_PUBLISH_DONE_CODES.
|
|
122
|
+
GoingAway: 0x4n,
|
|
123
|
+
TooFarBehind: 0x5n,
|
|
124
|
+
Expired: 0x6n,
|
|
125
|
+
UpdateFailed: 0x8n,
|
|
126
|
+
ExcessiveLoad: 0x9n,
|
|
127
|
+
MalformedTrack: 0x12n
|
|
128
|
+
};
|
|
129
|
+
var DataStreamResetCode = {
|
|
130
|
+
InternalError: 0x0n,
|
|
131
|
+
Cancelled: 0x1n,
|
|
132
|
+
DeliveryTimeout: 0x2n,
|
|
133
|
+
SessionClosed: 0x3n,
|
|
134
|
+
GoingAway: 0x4n,
|
|
135
|
+
TooFarBehind: 0x5n,
|
|
136
|
+
UnknownObjectStatus: 0x6n,
|
|
137
|
+
ExpiredAuthToken: 0x7n,
|
|
138
|
+
ExcessiveLoad: 0x9n,
|
|
139
|
+
MalformedTrack: 0x12n
|
|
140
|
+
};
|
|
141
|
+
var RETIRED_SESSION_TERMINATION_CODES = /* @__PURE__ */ new Set([
|
|
142
|
+
0x15n
|
|
143
|
+
// VERSION_NEGOTIATION_FAILED (draft-19 Section 3.5)
|
|
144
|
+
]);
|
|
145
|
+
var RETIRED_REQUEST_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
146
|
+
0x32n
|
|
147
|
+
// INVALID_JOINING_REQUEST_ID (draft-19 Section 10.6.2)
|
|
148
|
+
]);
|
|
149
|
+
var RETIRED_PUBLISH_DONE_CODES = /* @__PURE__ */ new Set([
|
|
150
|
+
0x3n
|
|
151
|
+
// SUBSCRIPTION_ENDED (draft-19 Section 10.11)
|
|
152
|
+
]);
|
|
153
|
+
|
|
154
|
+
// src/drafts/draft21/index.ts
|
|
155
|
+
var PROTOCOL_STRING = "moqt-21";
|
|
156
|
+
var DRAFT_VERSION = 0xff000015n;
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
exports.BIDIRECTIONAL_MESSAGES = _chunkOBATJBNLcjs.BIDIRECTIONAL_MESSAGES; exports.CLIENT_ONLY_MESSAGES = _chunkOBATJBNLcjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkOBATJBNLcjs.CONTROL_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.DataStreamResetCode = DataStreamResetCode; exports.Draft21SessionFSM = _chunkOBATJBNLcjs.Draft21SessionFSM; exports.MESSAGE_ID_MAP = _chunkWB65UG7Gcjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunkWB65UG7Gcjs.MESSAGE_TYPE_MAP; exports.MSG_FETCH = _chunkWB65UG7Gcjs.MSG_FETCH; exports.MSG_FETCH_OK = _chunkWB65UG7Gcjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunkWB65UG7Gcjs.MSG_GOAWAY; exports.MSG_NAMESPACE = _chunkWB65UG7Gcjs.MSG_NAMESPACE; exports.MSG_NAMESPACE_DONE = _chunkWB65UG7Gcjs.MSG_NAMESPACE_DONE; exports.MSG_PUBLISH = _chunkWB65UG7Gcjs.MSG_PUBLISH; exports.MSG_PUBLISH_DONE = _chunkWB65UG7Gcjs.MSG_PUBLISH_DONE; exports.MSG_PUBLISH_NAMESPACE = _chunkWB65UG7Gcjs.MSG_PUBLISH_NAMESPACE; exports.MSG_PUBLISH_OK = _chunkWB65UG7Gcjs.MSG_PUBLISH_OK; exports.MSG_PUBLISH_SKIPPED = _chunkWB65UG7Gcjs.MSG_PUBLISH_SKIPPED; exports.MSG_PUBLISH_STATE_NOTIFY = _chunkWB65UG7Gcjs.MSG_PUBLISH_STATE_NOTIFY; exports.MSG_REQUEST_ERROR = _chunkWB65UG7Gcjs.MSG_REQUEST_ERROR; exports.MSG_REQUEST_OK = _chunkWB65UG7Gcjs.MSG_REQUEST_OK; exports.MSG_REQUEST_UPDATE = _chunkWB65UG7Gcjs.MSG_REQUEST_UPDATE; exports.MSG_SETUP = _chunkWB65UG7Gcjs.MSG_SETUP; exports.MSG_SUBSCRIBE = _chunkWB65UG7Gcjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBE_NAMESPACE = _chunkWB65UG7Gcjs.MSG_SUBSCRIBE_NAMESPACE; exports.MSG_SUBSCRIBE_OK = _chunkWB65UG7Gcjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_TRACKS = _chunkWB65UG7Gcjs.MSG_SUBSCRIBE_TRACKS; exports.MSG_TRACK_STATUS = _chunkWB65UG7Gcjs.MSG_TRACK_STATUS; exports.PROTOCOL_STRING = PROTOCOL_STRING; exports.PublishDoneCode = PublishDoneCode; exports.REDACTION_FILL = _chunk5IMHJIAZcjs.REDACTION_FILL; exports.REQUEST_STREAM_OPENERS = _chunkOBATJBNLcjs.REQUEST_STREAM_OPENERS; exports.RETIRED_PUBLISH_DONE_CODES = RETIRED_PUBLISH_DONE_CODES; exports.RETIRED_REQUEST_ERROR_CODES = RETIRED_REQUEST_ERROR_CODES; exports.RETIRED_SESSION_TERMINATION_CODES = RETIRED_SESSION_TERMINATION_CODES; exports.RequestErrorCode = RequestErrorCode; exports.SERVER_ONLY_MESSAGES = _chunkOBATJBNLcjs.SERVER_ONLY_MESSAGES; exports.SETUP_OPT_AUTHORITY = _chunkWB65UG7Gcjs.SETUP_OPT_AUTHORITY; exports.SETUP_OPT_AUTHORIZATION_TOKEN = _chunkWB65UG7Gcjs.SETUP_OPT_AUTHORIZATION_TOKEN; exports.SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE = _chunkWB65UG7Gcjs.SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE; exports.SETUP_OPT_MAX_FILTER_RANGES = _chunkWB65UG7Gcjs.SETUP_OPT_MAX_FILTER_RANGES; exports.SETUP_OPT_MAX_REQUEST_UPDATES = _chunkWB65UG7Gcjs.SETUP_OPT_MAX_REQUEST_UPDATES; exports.SETUP_OPT_MOQT_IMPLEMENTATION = _chunkWB65UG7Gcjs.SETUP_OPT_MOQT_IMPLEMENTATION; exports.SETUP_OPT_PATH = _chunkWB65UG7Gcjs.SETUP_OPT_PATH; exports.SessionTerminationCode = SessionTerminationCode; exports.UNKNOWN_STREAM_COUNT = _chunkWB65UG7Gcjs.UNKNOWN_STREAM_COUNT; exports.createDataStreamDecoder = _chunkWB65UG7Gcjs.createDataStreamDecoder; exports.createDraft21Codec = _chunkWB65UG7Gcjs.createDraft21Codec; exports.createDraft21SessionState = _chunkOBATJBNLcjs.createDraft21SessionState; exports.createFetchStreamDecoder = _chunkWB65UG7Gcjs.createFetchStreamDecoder; exports.createStreamDecoder = _chunkWB65UG7Gcjs.createStreamDecoder; exports.createSubgroupStreamDecoder = _chunkWB65UG7Gcjs.createSubgroupStreamDecoder; exports.decodeDataStream = _chunkWB65UG7Gcjs.decodeDataStream; exports.decodeDatagram = _chunkWB65UG7Gcjs.decodeDatagram; exports.decodeFetchStream = _chunkWB65UG7Gcjs.decodeFetchStream; exports.decodeMessage = _chunkWB65UG7Gcjs.decodeMessage; exports.decodeSubgroupStream = _chunkWB65UG7Gcjs.decodeSubgroupStream; exports.encodeDatagram = _chunkWB65UG7Gcjs.encodeDatagram; exports.encodeFetchStream = _chunkWB65UG7Gcjs.encodeFetchStream; exports.encodeMessage = _chunkWB65UG7Gcjs.encodeMessage; exports.encodeSubgroupStream = _chunkWB65UG7Gcjs.encodeSubgroupStream; exports.getLegalIncoming = _chunkOBATJBNLcjs.getLegalIncoming; exports.getLegalOutgoing = _chunkOBATJBNLcjs.getLegalOutgoing; exports.redactAuthTokens = _chunkWB65UG7Gcjs.redactAuthTokens;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-B9JJOlIY.cjs';
|
|
2
|
+
export { D as Draft21Codec, U as UNKNOWN_STREAM_COUNT, c as createDraft21Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-C9U0Vzy9.cjs';
|
|
3
|
+
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft21DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft21MessageType } from './types-DDwidj2d.cjs';
|
|
4
|
+
export { g as DataStreamHeader, h as Draft21BaseMessage, i as Draft21Fetch, j as Draft21FetchOk, k as Draft21FillParameters, l as Draft21GoAway, D as Draft21Message, m as Draft21Namespace, n as Draft21NamespaceDone, o as Draft21Params, p as Draft21Publish, q as Draft21PublishDone, r as Draft21PublishNamespace, s as Draft21PublishSkipped, t as Draft21PublishStateNotify, u as Draft21RequestError, v as Draft21RequestOk, w as Draft21RequestUpdate, x as Draft21Setup, y as Draft21SetupOptions, z as Draft21Subscribe, A as Draft21SubscribeNamespace, B as Draft21SubscribeOk, C as Draft21SubscribeTracks, E as Draft21TrackProperties, G as Draft21TrackStatus, H as FetchObjectPayload, L as LargestObject, I as LocationFilter, R as RangeFilter, J as RangeFilterRange, K as Redirect, U as UnknownParam } from './types-DDwidj2d.cjs';
|
|
5
|
+
export { Draft21SessionFSM, FillFetchStreamPhase, FillFetchStreamState, PublisherSide, RequestKind, createDraft21SessionState } from './draft21-session.cjs';
|
|
6
|
+
export { P as ProtocolViolation, g as SessionPhase, h as SideEffect, T as TransitionResult, V as ValidationResult } from './session-types-DZkI_qFG.cjs';
|
|
7
|
+
import { b as DecodeResult } from './types-2NisMA8_.cjs';
|
|
8
|
+
|
|
9
|
+
declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
|
|
10
|
+
declare function encodeDatagram(dg: DatagramObject): Uint8Array;
|
|
11
|
+
declare function encodeFetchStream(stream: FetchStream): Uint8Array;
|
|
12
|
+
declare function decodeSubgroupStream(bytes: Uint8Array): DecodeResult<SubgroupStream>;
|
|
13
|
+
declare function decodeDatagram(bytes: Uint8Array): DecodeResult<DatagramObject>;
|
|
14
|
+
declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
|
|
15
|
+
declare function decodeDataStream(streamType: 'subgroup' | 'datagram' | 'fetch', bytes: Uint8Array): DecodeResult<Draft21DataStream>;
|
|
16
|
+
declare function createSubgroupStreamDecoder(): TransformStream<Uint8Array, SubgroupStreamHeader | ObjectPayload>;
|
|
17
|
+
declare function createFetchStreamDecoder(): TransformStream<Uint8Array, FetchStreamHeader | ObjectPayload>;
|
|
18
|
+
declare function createDataStreamDecoder(): TransformStream<Uint8Array, DataStreamEvent>;
|
|
19
|
+
|
|
20
|
+
/** draft-21 Section 16.11.1, Table 18 (prose Section 6.6). */
|
|
21
|
+
declare const SessionTerminationCode: {
|
|
22
|
+
readonly NoError: 0n;
|
|
23
|
+
readonly InternalError: 1n;
|
|
24
|
+
readonly Unauthorized: 2n;
|
|
25
|
+
readonly ProtocolViolation: 3n;
|
|
26
|
+
readonly InvalidRequestId: 4n;
|
|
27
|
+
readonly DuplicateTrackAlias: 5n;
|
|
28
|
+
readonly KeyValueFormattingError: 6n;
|
|
29
|
+
readonly InvalidPath: 8n;
|
|
30
|
+
readonly MalformedPath: 9n;
|
|
31
|
+
readonly GoawayTimeout: 16n;
|
|
32
|
+
readonly ControlMessageTimeout: 17n;
|
|
33
|
+
readonly DataStreamTimeout: 18n;
|
|
34
|
+
readonly AuthTokenCacheOverflow: 19n;
|
|
35
|
+
readonly DuplicateAuthTokenAlias: 20n;
|
|
36
|
+
readonly MalformedAuthToken: 22n;
|
|
37
|
+
readonly UnknownAuthTokenAlias: 23n;
|
|
38
|
+
readonly ExpiredAuthToken: 24n;
|
|
39
|
+
readonly InvalidAuthority: 25n;
|
|
40
|
+
readonly MalformedAuthority: 26n;
|
|
41
|
+
readonly TooManyRequestUpdates: 27n;
|
|
42
|
+
};
|
|
43
|
+
type SessionTerminationCodeValue = (typeof SessionTerminationCode)[keyof typeof SessionTerminationCode];
|
|
44
|
+
/** draft-21 Section 16.11.2, Table 19 (prose Section 9.4.2). */
|
|
45
|
+
declare const RequestErrorCode: {
|
|
46
|
+
readonly InternalError: 0n;
|
|
47
|
+
readonly Unauthorized: 1n;
|
|
48
|
+
readonly Timeout: 2n;
|
|
49
|
+
readonly NotSupported: 3n;
|
|
50
|
+
readonly MalformedAuthToken: 4n;
|
|
51
|
+
readonly ExpiredAuthToken: 5n;
|
|
52
|
+
readonly GoingAway: 6n;
|
|
53
|
+
readonly ExcessiveLoad: 9n;
|
|
54
|
+
readonly DoesNotExist: 16n;
|
|
55
|
+
readonly InvalidRange: 17n;
|
|
56
|
+
readonly MalformedTrack: 18n;
|
|
57
|
+
readonly Uninterested: 32n;
|
|
58
|
+
readonly PrefixOverlap: 48n;
|
|
59
|
+
readonly NamespaceTooLarge: 49n;
|
|
60
|
+
readonly UnsupportedExtension: 51n;
|
|
61
|
+
readonly Redirect: 52n;
|
|
62
|
+
readonly ConflictingFilters: 53n;
|
|
63
|
+
readonly InvalidFilter: 54n;
|
|
64
|
+
};
|
|
65
|
+
type RequestErrorCodeValue = (typeof RequestErrorCode)[keyof typeof RequestErrorCode];
|
|
66
|
+
/** draft-21 Section 16.11.3, Table 20 (prose Section 9.9). */
|
|
67
|
+
declare const PublishDoneCode: {
|
|
68
|
+
readonly InternalError: 0n;
|
|
69
|
+
readonly Unauthorized: 1n;
|
|
70
|
+
readonly TrackEnded: 2n;
|
|
71
|
+
readonly GoingAway: 4n;
|
|
72
|
+
readonly TooFarBehind: 5n;
|
|
73
|
+
readonly Expired: 6n;
|
|
74
|
+
readonly UpdateFailed: 8n;
|
|
75
|
+
readonly ExcessiveLoad: 9n;
|
|
76
|
+
readonly MalformedTrack: 18n;
|
|
77
|
+
};
|
|
78
|
+
type PublishDoneCodeValue = (typeof PublishDoneCode)[keyof typeof PublishDoneCode];
|
|
79
|
+
/** draft-21 Section 16.11.4, Table 21 (prose Section 12.5) — unchanged from draft-19. */
|
|
80
|
+
declare const DataStreamResetCode: {
|
|
81
|
+
readonly InternalError: 0n;
|
|
82
|
+
readonly Cancelled: 1n;
|
|
83
|
+
readonly DeliveryTimeout: 2n;
|
|
84
|
+
readonly SessionClosed: 3n;
|
|
85
|
+
readonly GoingAway: 4n;
|
|
86
|
+
readonly TooFarBehind: 5n;
|
|
87
|
+
readonly UnknownObjectStatus: 6n;
|
|
88
|
+
readonly ExpiredAuthToken: 7n;
|
|
89
|
+
readonly ExcessiveLoad: 9n;
|
|
90
|
+
readonly MalformedTrack: 18n;
|
|
91
|
+
};
|
|
92
|
+
type DataStreamResetCodeValue = (typeof DataStreamResetCode)[keyof typeof DataStreamResetCode];
|
|
93
|
+
declare const RETIRED_SESSION_TERMINATION_CODES: ReadonlySet<bigint>;
|
|
94
|
+
declare const RETIRED_REQUEST_ERROR_CODES: ReadonlySet<bigint>;
|
|
95
|
+
declare const RETIRED_PUBLISH_DONE_CODES: ReadonlySet<bigint>;
|
|
96
|
+
|
|
97
|
+
declare const MSG_REQUEST_UPDATE = 2n;
|
|
98
|
+
declare const MSG_SUBSCRIBE = 3n;
|
|
99
|
+
declare const MSG_SUBSCRIBE_OK = 4n;
|
|
100
|
+
declare const MSG_REQUEST_ERROR = 5n;
|
|
101
|
+
declare const MSG_PUBLISH_NAMESPACE = 6n;
|
|
102
|
+
declare const MSG_REQUEST_OK = 7n;
|
|
103
|
+
declare const MSG_NAMESPACE = 8n;
|
|
104
|
+
declare const MSG_PUBLISH_DONE = 11n;
|
|
105
|
+
declare const MSG_TRACK_STATUS = 13n;
|
|
106
|
+
declare const MSG_NAMESPACE_DONE = 14n;
|
|
107
|
+
declare const MSG_PUBLISH_SKIPPED = 15n;
|
|
108
|
+
declare const MSG_GOAWAY = 16n;
|
|
109
|
+
declare const MSG_FETCH = 22n;
|
|
110
|
+
declare const MSG_FETCH_OK = 24n;
|
|
111
|
+
declare const MSG_PUBLISH = 29n;
|
|
112
|
+
/** NEW in draft-20 — Section 9.10. Unilateral publisher→subscriber notification. */
|
|
113
|
+
declare const MSG_PUBLISH_STATE_NOTIFY = 34n;
|
|
114
|
+
declare const MSG_PUBLISH_OK = 7n;
|
|
115
|
+
declare const MSG_SUBSCRIBE_NAMESPACE = 80n;
|
|
116
|
+
declare const MSG_SUBSCRIBE_TRACKS = 81n;
|
|
117
|
+
declare const MSG_SETUP = 12032n;
|
|
118
|
+
declare const SETUP_OPT_PATH = 1n;
|
|
119
|
+
declare const SETUP_OPT_AUTHORIZATION_TOKEN = 3n;
|
|
120
|
+
declare const SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE = 4n;
|
|
121
|
+
declare const SETUP_OPT_AUTHORITY = 5n;
|
|
122
|
+
declare const SETUP_OPT_MAX_FILTER_RANGES = 6n;
|
|
123
|
+
declare const SETUP_OPT_MOQT_IMPLEMENTATION = 7n;
|
|
124
|
+
declare const SETUP_OPT_MAX_REQUEST_UPDATES = 8n;
|
|
125
|
+
declare const MESSAGE_TYPE_MAP: ReadonlyMap<bigint, string>;
|
|
126
|
+
declare const MESSAGE_ID_MAP: ReadonlyMap<string, bigint>;
|
|
127
|
+
|
|
128
|
+
declare const CONTROL_MESSAGES: ReadonlySet<Draft21MessageType>;
|
|
129
|
+
declare const CLIENT_ONLY_MESSAGES: ReadonlySet<Draft21MessageType>;
|
|
130
|
+
declare const SERVER_ONLY_MESSAGES: ReadonlySet<Draft21MessageType>;
|
|
131
|
+
declare const BIDIRECTIONAL_MESSAGES: ReadonlySet<Draft21MessageType>;
|
|
132
|
+
/**
|
|
133
|
+
* The seven message types that may be the FIRST message on a new bidirectional
|
|
134
|
+
* (request) stream — draft-21 Section 6.3, and the rows marked "First" in the
|
|
135
|
+
* Section 9 registry. Unchanged from draft-19.
|
|
136
|
+
*
|
|
137
|
+
* "Bidirectional streams MUST NOT begin with any other message type unless
|
|
138
|
+
* negotiated. If they do, the peer MUST close the Session with a
|
|
139
|
+
* PROTOCOL_VIOLATION." Note GOAWAY (0x10) is marked "Control, Request" but not
|
|
140
|
+
* "First": it may travel on either kind of stream but may never open one.
|
|
141
|
+
*/
|
|
142
|
+
declare const REQUEST_STREAM_OPENERS: ReadonlySet<Draft21MessageType>;
|
|
143
|
+
declare function getLegalOutgoing(phase: string, _role: 'client' | 'server'): Set<Draft21MessageType>;
|
|
144
|
+
declare function getLegalIncoming(phase: string, role: 'client' | 'server'): Set<Draft21MessageType>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Draft-21's real identifier is the protocol string `moqt-21`.
|
|
148
|
+
*
|
|
149
|
+
* draft-21 Section 6.2: "MOQT uses ALPN in QUIC and 'WT-Available-Protocols' in
|
|
150
|
+
* WebTransport to perform version negotiation. […] ALPNs used to identify IETF
|
|
151
|
+
* drafts are created by appending the draft number to 'moqt-'. […] Note: Draft
|
|
152
|
+
* versions prior to -15 all used moq-00 ALPN, followed by version negotiation
|
|
153
|
+
* in the SETUP messages."
|
|
154
|
+
*
|
|
155
|
+
* So this is what a draft-21 peer actually negotiates with, and it is the only
|
|
156
|
+
* identifier that appears anywhere in a draft-21 session.
|
|
157
|
+
*/
|
|
158
|
+
declare const PROTOCOL_STRING = "moqt-21";
|
|
159
|
+
/**
|
|
160
|
+
* The `0xff000000 + N` identifier for draft 20.
|
|
161
|
+
*
|
|
162
|
+
* **This is a derived identifier, not an observed wire value.** No draft-21
|
|
163
|
+
* peer ever sends it. The `0xff0000NN` scheme belonged to the SETUP-time
|
|
164
|
+
* version negotiation that drafts before -15 used; from draft-15 on the version
|
|
165
|
+
* is negotiated by ALPN / `WT-Available-Protocols` and no version number
|
|
166
|
+
* appears on the wire at all. It is kept only so that code indexing drafts by a
|
|
167
|
+
* numeric key — {@link DRAFT_VERSIONS} in the package root, trace formats,
|
|
168
|
+
* anything that predates the change — has a stable key for draft-21.
|
|
169
|
+
*
|
|
170
|
+
* Anything that reports a version to a user should report
|
|
171
|
+
* {@link PROTOCOL_STRING} instead, and should not claim to have observed this
|
|
172
|
+
* number.
|
|
173
|
+
*/
|
|
174
|
+
declare const DRAFT_VERSION = 4278190101n;
|
|
175
|
+
|
|
176
|
+
export { BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DataStreamEvent, DataStreamResetCode, type DataStreamResetCodeValue, DatagramObject, Draft21DataStream, Draft21MessageType, FetchStream, FetchStreamHeader, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_FETCH, MSG_FETCH_OK, MSG_GOAWAY, MSG_NAMESPACE, MSG_NAMESPACE_DONE, MSG_PUBLISH, MSG_PUBLISH_DONE, MSG_PUBLISH_NAMESPACE, MSG_PUBLISH_OK, MSG_PUBLISH_SKIPPED, MSG_PUBLISH_STATE_NOTIFY, MSG_REQUEST_ERROR, MSG_REQUEST_OK, MSG_REQUEST_UPDATE, MSG_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_TRACKS, MSG_TRACK_STATUS, ObjectPayload, PROTOCOL_STRING, PublishDoneCode, type PublishDoneCodeValue, REQUEST_STREAM_OPENERS, RETIRED_PUBLISH_DONE_CODES, RETIRED_REQUEST_ERROR_CODES, RETIRED_SESSION_TERMINATION_CODES, RequestErrorCode, type RequestErrorCodeValue, SERVER_ONLY_MESSAGES, SETUP_OPT_AUTHORITY, SETUP_OPT_AUTHORIZATION_TOKEN, SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE, SETUP_OPT_MAX_FILTER_RANGES, SETUP_OPT_MAX_REQUEST_UPDATES, SETUP_OPT_MOQT_IMPLEMENTATION, SETUP_OPT_PATH, SessionTerminationCode, type SessionTerminationCodeValue, SubgroupStream, SubgroupStreamHeader, createDataStreamDecoder, createFetchStreamDecoder, createSubgroupStreamDecoder, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-B9JJOlIY.js';
|
|
2
|
+
export { D as Draft21Codec, U as UNKNOWN_STREAM_COUNT, c as createDraft21Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-Cb8mUre3.js';
|
|
3
|
+
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft21DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft21MessageType } from './types-DDwidj2d.js';
|
|
4
|
+
export { g as DataStreamHeader, h as Draft21BaseMessage, i as Draft21Fetch, j as Draft21FetchOk, k as Draft21FillParameters, l as Draft21GoAway, D as Draft21Message, m as Draft21Namespace, n as Draft21NamespaceDone, o as Draft21Params, p as Draft21Publish, q as Draft21PublishDone, r as Draft21PublishNamespace, s as Draft21PublishSkipped, t as Draft21PublishStateNotify, u as Draft21RequestError, v as Draft21RequestOk, w as Draft21RequestUpdate, x as Draft21Setup, y as Draft21SetupOptions, z as Draft21Subscribe, A as Draft21SubscribeNamespace, B as Draft21SubscribeOk, C as Draft21SubscribeTracks, E as Draft21TrackProperties, G as Draft21TrackStatus, H as FetchObjectPayload, L as LargestObject, I as LocationFilter, R as RangeFilter, J as RangeFilterRange, K as Redirect, U as UnknownParam } from './types-DDwidj2d.js';
|
|
5
|
+
export { Draft21SessionFSM, FillFetchStreamPhase, FillFetchStreamState, PublisherSide, RequestKind, createDraft21SessionState } from './draft21-session.js';
|
|
6
|
+
export { P as ProtocolViolation, g as SessionPhase, h as SideEffect, T as TransitionResult, V as ValidationResult } from './session-types-Cxx7W8zZ.js';
|
|
7
|
+
import { b as DecodeResult } from './types-2NisMA8_.js';
|
|
8
|
+
|
|
9
|
+
declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
|
|
10
|
+
declare function encodeDatagram(dg: DatagramObject): Uint8Array;
|
|
11
|
+
declare function encodeFetchStream(stream: FetchStream): Uint8Array;
|
|
12
|
+
declare function decodeSubgroupStream(bytes: Uint8Array): DecodeResult<SubgroupStream>;
|
|
13
|
+
declare function decodeDatagram(bytes: Uint8Array): DecodeResult<DatagramObject>;
|
|
14
|
+
declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
|
|
15
|
+
declare function decodeDataStream(streamType: 'subgroup' | 'datagram' | 'fetch', bytes: Uint8Array): DecodeResult<Draft21DataStream>;
|
|
16
|
+
declare function createSubgroupStreamDecoder(): TransformStream<Uint8Array, SubgroupStreamHeader | ObjectPayload>;
|
|
17
|
+
declare function createFetchStreamDecoder(): TransformStream<Uint8Array, FetchStreamHeader | ObjectPayload>;
|
|
18
|
+
declare function createDataStreamDecoder(): TransformStream<Uint8Array, DataStreamEvent>;
|
|
19
|
+
|
|
20
|
+
/** draft-21 Section 16.11.1, Table 18 (prose Section 6.6). */
|
|
21
|
+
declare const SessionTerminationCode: {
|
|
22
|
+
readonly NoError: 0n;
|
|
23
|
+
readonly InternalError: 1n;
|
|
24
|
+
readonly Unauthorized: 2n;
|
|
25
|
+
readonly ProtocolViolation: 3n;
|
|
26
|
+
readonly InvalidRequestId: 4n;
|
|
27
|
+
readonly DuplicateTrackAlias: 5n;
|
|
28
|
+
readonly KeyValueFormattingError: 6n;
|
|
29
|
+
readonly InvalidPath: 8n;
|
|
30
|
+
readonly MalformedPath: 9n;
|
|
31
|
+
readonly GoawayTimeout: 16n;
|
|
32
|
+
readonly ControlMessageTimeout: 17n;
|
|
33
|
+
readonly DataStreamTimeout: 18n;
|
|
34
|
+
readonly AuthTokenCacheOverflow: 19n;
|
|
35
|
+
readonly DuplicateAuthTokenAlias: 20n;
|
|
36
|
+
readonly MalformedAuthToken: 22n;
|
|
37
|
+
readonly UnknownAuthTokenAlias: 23n;
|
|
38
|
+
readonly ExpiredAuthToken: 24n;
|
|
39
|
+
readonly InvalidAuthority: 25n;
|
|
40
|
+
readonly MalformedAuthority: 26n;
|
|
41
|
+
readonly TooManyRequestUpdates: 27n;
|
|
42
|
+
};
|
|
43
|
+
type SessionTerminationCodeValue = (typeof SessionTerminationCode)[keyof typeof SessionTerminationCode];
|
|
44
|
+
/** draft-21 Section 16.11.2, Table 19 (prose Section 9.4.2). */
|
|
45
|
+
declare const RequestErrorCode: {
|
|
46
|
+
readonly InternalError: 0n;
|
|
47
|
+
readonly Unauthorized: 1n;
|
|
48
|
+
readonly Timeout: 2n;
|
|
49
|
+
readonly NotSupported: 3n;
|
|
50
|
+
readonly MalformedAuthToken: 4n;
|
|
51
|
+
readonly ExpiredAuthToken: 5n;
|
|
52
|
+
readonly GoingAway: 6n;
|
|
53
|
+
readonly ExcessiveLoad: 9n;
|
|
54
|
+
readonly DoesNotExist: 16n;
|
|
55
|
+
readonly InvalidRange: 17n;
|
|
56
|
+
readonly MalformedTrack: 18n;
|
|
57
|
+
readonly Uninterested: 32n;
|
|
58
|
+
readonly PrefixOverlap: 48n;
|
|
59
|
+
readonly NamespaceTooLarge: 49n;
|
|
60
|
+
readonly UnsupportedExtension: 51n;
|
|
61
|
+
readonly Redirect: 52n;
|
|
62
|
+
readonly ConflictingFilters: 53n;
|
|
63
|
+
readonly InvalidFilter: 54n;
|
|
64
|
+
};
|
|
65
|
+
type RequestErrorCodeValue = (typeof RequestErrorCode)[keyof typeof RequestErrorCode];
|
|
66
|
+
/** draft-21 Section 16.11.3, Table 20 (prose Section 9.9). */
|
|
67
|
+
declare const PublishDoneCode: {
|
|
68
|
+
readonly InternalError: 0n;
|
|
69
|
+
readonly Unauthorized: 1n;
|
|
70
|
+
readonly TrackEnded: 2n;
|
|
71
|
+
readonly GoingAway: 4n;
|
|
72
|
+
readonly TooFarBehind: 5n;
|
|
73
|
+
readonly Expired: 6n;
|
|
74
|
+
readonly UpdateFailed: 8n;
|
|
75
|
+
readonly ExcessiveLoad: 9n;
|
|
76
|
+
readonly MalformedTrack: 18n;
|
|
77
|
+
};
|
|
78
|
+
type PublishDoneCodeValue = (typeof PublishDoneCode)[keyof typeof PublishDoneCode];
|
|
79
|
+
/** draft-21 Section 16.11.4, Table 21 (prose Section 12.5) — unchanged from draft-19. */
|
|
80
|
+
declare const DataStreamResetCode: {
|
|
81
|
+
readonly InternalError: 0n;
|
|
82
|
+
readonly Cancelled: 1n;
|
|
83
|
+
readonly DeliveryTimeout: 2n;
|
|
84
|
+
readonly SessionClosed: 3n;
|
|
85
|
+
readonly GoingAway: 4n;
|
|
86
|
+
readonly TooFarBehind: 5n;
|
|
87
|
+
readonly UnknownObjectStatus: 6n;
|
|
88
|
+
readonly ExpiredAuthToken: 7n;
|
|
89
|
+
readonly ExcessiveLoad: 9n;
|
|
90
|
+
readonly MalformedTrack: 18n;
|
|
91
|
+
};
|
|
92
|
+
type DataStreamResetCodeValue = (typeof DataStreamResetCode)[keyof typeof DataStreamResetCode];
|
|
93
|
+
declare const RETIRED_SESSION_TERMINATION_CODES: ReadonlySet<bigint>;
|
|
94
|
+
declare const RETIRED_REQUEST_ERROR_CODES: ReadonlySet<bigint>;
|
|
95
|
+
declare const RETIRED_PUBLISH_DONE_CODES: ReadonlySet<bigint>;
|
|
96
|
+
|
|
97
|
+
declare const MSG_REQUEST_UPDATE = 2n;
|
|
98
|
+
declare const MSG_SUBSCRIBE = 3n;
|
|
99
|
+
declare const MSG_SUBSCRIBE_OK = 4n;
|
|
100
|
+
declare const MSG_REQUEST_ERROR = 5n;
|
|
101
|
+
declare const MSG_PUBLISH_NAMESPACE = 6n;
|
|
102
|
+
declare const MSG_REQUEST_OK = 7n;
|
|
103
|
+
declare const MSG_NAMESPACE = 8n;
|
|
104
|
+
declare const MSG_PUBLISH_DONE = 11n;
|
|
105
|
+
declare const MSG_TRACK_STATUS = 13n;
|
|
106
|
+
declare const MSG_NAMESPACE_DONE = 14n;
|
|
107
|
+
declare const MSG_PUBLISH_SKIPPED = 15n;
|
|
108
|
+
declare const MSG_GOAWAY = 16n;
|
|
109
|
+
declare const MSG_FETCH = 22n;
|
|
110
|
+
declare const MSG_FETCH_OK = 24n;
|
|
111
|
+
declare const MSG_PUBLISH = 29n;
|
|
112
|
+
/** NEW in draft-20 — Section 9.10. Unilateral publisher→subscriber notification. */
|
|
113
|
+
declare const MSG_PUBLISH_STATE_NOTIFY = 34n;
|
|
114
|
+
declare const MSG_PUBLISH_OK = 7n;
|
|
115
|
+
declare const MSG_SUBSCRIBE_NAMESPACE = 80n;
|
|
116
|
+
declare const MSG_SUBSCRIBE_TRACKS = 81n;
|
|
117
|
+
declare const MSG_SETUP = 12032n;
|
|
118
|
+
declare const SETUP_OPT_PATH = 1n;
|
|
119
|
+
declare const SETUP_OPT_AUTHORIZATION_TOKEN = 3n;
|
|
120
|
+
declare const SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE = 4n;
|
|
121
|
+
declare const SETUP_OPT_AUTHORITY = 5n;
|
|
122
|
+
declare const SETUP_OPT_MAX_FILTER_RANGES = 6n;
|
|
123
|
+
declare const SETUP_OPT_MOQT_IMPLEMENTATION = 7n;
|
|
124
|
+
declare const SETUP_OPT_MAX_REQUEST_UPDATES = 8n;
|
|
125
|
+
declare const MESSAGE_TYPE_MAP: ReadonlyMap<bigint, string>;
|
|
126
|
+
declare const MESSAGE_ID_MAP: ReadonlyMap<string, bigint>;
|
|
127
|
+
|
|
128
|
+
declare const CONTROL_MESSAGES: ReadonlySet<Draft21MessageType>;
|
|
129
|
+
declare const CLIENT_ONLY_MESSAGES: ReadonlySet<Draft21MessageType>;
|
|
130
|
+
declare const SERVER_ONLY_MESSAGES: ReadonlySet<Draft21MessageType>;
|
|
131
|
+
declare const BIDIRECTIONAL_MESSAGES: ReadonlySet<Draft21MessageType>;
|
|
132
|
+
/**
|
|
133
|
+
* The seven message types that may be the FIRST message on a new bidirectional
|
|
134
|
+
* (request) stream — draft-21 Section 6.3, and the rows marked "First" in the
|
|
135
|
+
* Section 9 registry. Unchanged from draft-19.
|
|
136
|
+
*
|
|
137
|
+
* "Bidirectional streams MUST NOT begin with any other message type unless
|
|
138
|
+
* negotiated. If they do, the peer MUST close the Session with a
|
|
139
|
+
* PROTOCOL_VIOLATION." Note GOAWAY (0x10) is marked "Control, Request" but not
|
|
140
|
+
* "First": it may travel on either kind of stream but may never open one.
|
|
141
|
+
*/
|
|
142
|
+
declare const REQUEST_STREAM_OPENERS: ReadonlySet<Draft21MessageType>;
|
|
143
|
+
declare function getLegalOutgoing(phase: string, _role: 'client' | 'server'): Set<Draft21MessageType>;
|
|
144
|
+
declare function getLegalIncoming(phase: string, role: 'client' | 'server'): Set<Draft21MessageType>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Draft-21's real identifier is the protocol string `moqt-21`.
|
|
148
|
+
*
|
|
149
|
+
* draft-21 Section 6.2: "MOQT uses ALPN in QUIC and 'WT-Available-Protocols' in
|
|
150
|
+
* WebTransport to perform version negotiation. […] ALPNs used to identify IETF
|
|
151
|
+
* drafts are created by appending the draft number to 'moqt-'. […] Note: Draft
|
|
152
|
+
* versions prior to -15 all used moq-00 ALPN, followed by version negotiation
|
|
153
|
+
* in the SETUP messages."
|
|
154
|
+
*
|
|
155
|
+
* So this is what a draft-21 peer actually negotiates with, and it is the only
|
|
156
|
+
* identifier that appears anywhere in a draft-21 session.
|
|
157
|
+
*/
|
|
158
|
+
declare const PROTOCOL_STRING = "moqt-21";
|
|
159
|
+
/**
|
|
160
|
+
* The `0xff000000 + N` identifier for draft 20.
|
|
161
|
+
*
|
|
162
|
+
* **This is a derived identifier, not an observed wire value.** No draft-21
|
|
163
|
+
* peer ever sends it. The `0xff0000NN` scheme belonged to the SETUP-time
|
|
164
|
+
* version negotiation that drafts before -15 used; from draft-15 on the version
|
|
165
|
+
* is negotiated by ALPN / `WT-Available-Protocols` and no version number
|
|
166
|
+
* appears on the wire at all. It is kept only so that code indexing drafts by a
|
|
167
|
+
* numeric key — {@link DRAFT_VERSIONS} in the package root, trace formats,
|
|
168
|
+
* anything that predates the change — has a stable key for draft-21.
|
|
169
|
+
*
|
|
170
|
+
* Anything that reports a version to a user should report
|
|
171
|
+
* {@link PROTOCOL_STRING} instead, and should not claim to have observed this
|
|
172
|
+
* number.
|
|
173
|
+
*/
|
|
174
|
+
declare const DRAFT_VERSION = 4278190101n;
|
|
175
|
+
|
|
176
|
+
export { BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DataStreamEvent, DataStreamResetCode, type DataStreamResetCodeValue, DatagramObject, Draft21DataStream, Draft21MessageType, FetchStream, FetchStreamHeader, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_FETCH, MSG_FETCH_OK, MSG_GOAWAY, MSG_NAMESPACE, MSG_NAMESPACE_DONE, MSG_PUBLISH, MSG_PUBLISH_DONE, MSG_PUBLISH_NAMESPACE, MSG_PUBLISH_OK, MSG_PUBLISH_SKIPPED, MSG_PUBLISH_STATE_NOTIFY, MSG_REQUEST_ERROR, MSG_REQUEST_OK, MSG_REQUEST_UPDATE, MSG_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_TRACKS, MSG_TRACK_STATUS, ObjectPayload, PROTOCOL_STRING, PublishDoneCode, type PublishDoneCodeValue, REQUEST_STREAM_OPENERS, RETIRED_PUBLISH_DONE_CODES, RETIRED_REQUEST_ERROR_CODES, RETIRED_SESSION_TERMINATION_CODES, RequestErrorCode, type RequestErrorCodeValue, SERVER_ONLY_MESSAGES, SETUP_OPT_AUTHORITY, SETUP_OPT_AUTHORIZATION_TOKEN, SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE, SETUP_OPT_MAX_FILTER_RANGES, SETUP_OPT_MAX_REQUEST_UPDATES, SETUP_OPT_MOQT_IMPLEMENTATION, SETUP_OPT_PATH, SessionTerminationCode, type SessionTerminationCodeValue, SubgroupStream, SubgroupStreamHeader, createDataStreamDecoder, createFetchStreamDecoder, createSubgroupStreamDecoder, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|