moqtail 0.7.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 +514 -0
- package/dist/byte_buffer-BOK6VPTF.d.cts +864 -0
- package/dist/byte_buffer-BOK6VPTF.d.ts +864 -0
- package/dist/client/index.cjs +7785 -0
- package/dist/client/index.d.cts +1665 -0
- package/dist/client/index.d.ts +1665 -0
- package/dist/client/index.js +7767 -0
- package/dist/index.cjs +8559 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8459 -0
- package/dist/model/index.cjs +4759 -0
- package/dist/model/index.d.cts +362 -0
- package/dist/model/index.d.ts +362 -0
- package/dist/model/index.js +4645 -0
- package/dist/util/index.cjs +1799 -0
- package/dist/util/index.d.cts +205 -0
- package/dist/util/index.d.ts +205 -0
- package/dist/util/index.js +1789 -0
- package/dist/version_parameter-CgEPNuUt.d.ts +1660 -0
- package/dist/version_parameter-DCE9_itC.d.cts +1660 -0
- package/package.json +97 -0
|
@@ -0,0 +1,1660 @@
|
|
|
1
|
+
import { e as FetchHeaderType, F as FrozenByteBuffer, B as BaseByteBuffer, S as SubgroupHeaderType, m as FullTrackName, c as Tuple, K as KeyValuePair, R as ReasonPhrase, L as Location } from './byte_buffer-BOK6VPTF.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Copyright 2025 The MOQtail Authors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
declare class FetchHeader {
|
|
20
|
+
readonly type: FetchHeaderType;
|
|
21
|
+
readonly requestId: bigint;
|
|
22
|
+
constructor(type: FetchHeaderType, requestId: bigint | number);
|
|
23
|
+
serialize(): FrozenByteBuffer;
|
|
24
|
+
static deserialize(buf: BaseByteBuffer): FetchHeader;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Copyright 2025 The MOQtail Authors
|
|
29
|
+
*
|
|
30
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
31
|
+
* you may not use this file except in compliance with the License.
|
|
32
|
+
* You may obtain a copy of the License at
|
|
33
|
+
*
|
|
34
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
35
|
+
*
|
|
36
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
37
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
38
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
39
|
+
* See the License for the specific language governing permissions and
|
|
40
|
+
* limitations under the License.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
declare class SubgroupHeader {
|
|
44
|
+
readonly type: SubgroupHeaderType;
|
|
45
|
+
readonly publisherPriority: number;
|
|
46
|
+
readonly subgroupId: bigint | undefined;
|
|
47
|
+
readonly trackAlias: bigint;
|
|
48
|
+
readonly groupId: bigint;
|
|
49
|
+
constructor(type: SubgroupHeaderType, trackAlias: bigint | number, groupId: bigint | number, subgroupId: bigint | number | undefined, publisherPriority: number);
|
|
50
|
+
serialize(): FrozenByteBuffer;
|
|
51
|
+
static deserialize(buf: BaseByteBuffer): SubgroupHeader;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Copyright 2025 The MOQtail Authors
|
|
56
|
+
*
|
|
57
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
58
|
+
* you may not use this file except in compliance with the License.
|
|
59
|
+
* You may obtain a copy of the License at
|
|
60
|
+
*
|
|
61
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
62
|
+
*
|
|
63
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
64
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
65
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
66
|
+
* See the License for the specific language governing permissions and
|
|
67
|
+
* limitations under the License.
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A bidirectional map between requestId (bigint) and full track names.
|
|
72
|
+
* Used to efficiently look up either by requestId or by name, enforcing uniqueness.
|
|
73
|
+
*
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
declare class RequestIdMap {
|
|
77
|
+
private requestIdToName;
|
|
78
|
+
private nameToRequestId;
|
|
79
|
+
/**
|
|
80
|
+
* @public
|
|
81
|
+
* Adds a mapping between a requestId and a full track name.
|
|
82
|
+
*
|
|
83
|
+
* @param requestId - The requestId to associate.
|
|
84
|
+
* @param name - The full track name to associate.
|
|
85
|
+
* @throws :{@link RequestIdError} if the requestId or name is already mapped to a different value.
|
|
86
|
+
*/
|
|
87
|
+
addMapping(requestId: bigint, name: FullTrackName): void;
|
|
88
|
+
/**
|
|
89
|
+
* @public
|
|
90
|
+
* Gets the full track name for a given requestId.
|
|
91
|
+
*
|
|
92
|
+
* @param requestId - The requestId to look up.
|
|
93
|
+
* @returns The associated full track name.
|
|
94
|
+
* @throws :{@link RequestIdError} if the requestId does not exist.
|
|
95
|
+
*/
|
|
96
|
+
getNameByRequestId(requestId: bigint): FullTrackName;
|
|
97
|
+
/**
|
|
98
|
+
* @public
|
|
99
|
+
* Gets the requestId for a given full track name.
|
|
100
|
+
*
|
|
101
|
+
* @param name - The full track name to look up.
|
|
102
|
+
* @returns The associated requestId.
|
|
103
|
+
* @throws :{@link RequestIdError} if the name does not exist.
|
|
104
|
+
*/
|
|
105
|
+
getRequestIdByName(name: FullTrackName): bigint;
|
|
106
|
+
/**
|
|
107
|
+
* @public
|
|
108
|
+
* Removes a mapping by requestId.
|
|
109
|
+
*
|
|
110
|
+
* @param requestId - The requestId to remove.
|
|
111
|
+
* @returns The removed full track name, or undefined if not found.
|
|
112
|
+
*/
|
|
113
|
+
removeMappingByRequestId(requestId: bigint): FullTrackName | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* @public
|
|
116
|
+
* Removes a mapping by full track name.
|
|
117
|
+
*
|
|
118
|
+
* @param name - The full track name to remove.
|
|
119
|
+
* @returns The removed requestId, or undefined if not found.
|
|
120
|
+
*/
|
|
121
|
+
removeMappingByName(name: FullTrackName): bigint | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* @public
|
|
124
|
+
* Checks if the map contains a given requestId.
|
|
125
|
+
*
|
|
126
|
+
* @param requestId - The requestId to check.
|
|
127
|
+
* @returns True if the requestId exists, false otherwise.
|
|
128
|
+
*/
|
|
129
|
+
containsRequestId(requestId: bigint): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* @public
|
|
132
|
+
* Checks if the map contains a given full track name.
|
|
133
|
+
*
|
|
134
|
+
* @param name - The full track name to check.
|
|
135
|
+
* @returns True if the name exists, false otherwise.
|
|
136
|
+
*/
|
|
137
|
+
containsName(name: FullTrackName): boolean;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Copyright 2025 The MOQtail Authors
|
|
142
|
+
*
|
|
143
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
144
|
+
* you may not use this file except in compliance with the License.
|
|
145
|
+
* You may obtain a copy of the License at
|
|
146
|
+
*
|
|
147
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
148
|
+
*
|
|
149
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
150
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
151
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
152
|
+
* See the License for the specific language governing permissions and
|
|
153
|
+
* limitations under the License.
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
type Header = FetchHeader | SubgroupHeader;
|
|
157
|
+
declare namespace Header {
|
|
158
|
+
function newFetch(...args: ConstructorParameters<typeof FetchHeader>): Header;
|
|
159
|
+
function newSubgroup(...args: ConstructorParameters<typeof SubgroupHeader>): Header;
|
|
160
|
+
function isFetch(header: Header): header is FetchHeader;
|
|
161
|
+
function isSubgroup(header: Header): header is SubgroupHeader;
|
|
162
|
+
function serialize(header: Header): FrozenByteBuffer;
|
|
163
|
+
function deserialize(buf: BaseByteBuffer): Header;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Copyright 2025 The MOQtail Authors
|
|
168
|
+
*
|
|
169
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
170
|
+
* you may not use this file except in compliance with the License.
|
|
171
|
+
* You may obtain a copy of the License at
|
|
172
|
+
*
|
|
173
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
174
|
+
*
|
|
175
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
176
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
177
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
178
|
+
* See the License for the specific language governing permissions and
|
|
179
|
+
* limitations under the License.
|
|
180
|
+
*/
|
|
181
|
+
/**
|
|
182
|
+
* 32 bit MOQT Draft-14 version number exchanged in {@link ClientSetup} and {@link ServerSetup}
|
|
183
|
+
*/
|
|
184
|
+
declare const DRAFT_14 = 4278190094;
|
|
185
|
+
/**
|
|
186
|
+
* @public
|
|
187
|
+
* Control message types for MOQT protocol.
|
|
188
|
+
* Each value corresponds to a specific control frame.
|
|
189
|
+
*/
|
|
190
|
+
declare enum ControlMessageType {
|
|
191
|
+
ReservedSetupV00 = 1,
|
|
192
|
+
ReservedClientSetupV10 = 64,
|
|
193
|
+
ReservedServerSetupV10 = 65,
|
|
194
|
+
ClientSetup = 32,
|
|
195
|
+
ServerSetup = 33,
|
|
196
|
+
GoAway = 16,
|
|
197
|
+
MaxRequestId = 21,
|
|
198
|
+
RequestsBlocked = 26,
|
|
199
|
+
Subscribe = 3,
|
|
200
|
+
SubscribeOk = 4,
|
|
201
|
+
SubscribeError = 5,
|
|
202
|
+
Unsubscribe = 10,
|
|
203
|
+
SubscribeUpdate = 2,
|
|
204
|
+
PublishDone = 11,
|
|
205
|
+
Fetch = 22,
|
|
206
|
+
FetchOk = 24,
|
|
207
|
+
FetchError = 25,
|
|
208
|
+
FetchCancel = 23,
|
|
209
|
+
TrackStatus = 13,
|
|
210
|
+
TrackStatusOk = 14,
|
|
211
|
+
TrackStatusError = 15,
|
|
212
|
+
PublishNamespace = 6,
|
|
213
|
+
PublishNamespaceOk = 7,
|
|
214
|
+
PublishNamespaceError = 8,
|
|
215
|
+
PublishNamespaceDone = 9,
|
|
216
|
+
PublishNamespaceCancel = 12,
|
|
217
|
+
SubscribeNamespace = 17,
|
|
218
|
+
SubscribeNamespaceOk = 18,
|
|
219
|
+
SubscribeNamespaceError = 19,
|
|
220
|
+
UnsubscribeNamespace = 20,
|
|
221
|
+
Publish = 29,
|
|
222
|
+
PublishOk = 30,
|
|
223
|
+
PublishError = 31,
|
|
224
|
+
Switch = 34
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Converts a bigint value to a ControlMessageType enum.
|
|
228
|
+
* @param v - The bigint value.
|
|
229
|
+
* @returns The corresponding ControlMessageType.
|
|
230
|
+
* @throws Error if the value is not a valid control message type.
|
|
231
|
+
*/
|
|
232
|
+
declare function controlMessageTypeFromBigInt(v: bigint): ControlMessageType;
|
|
233
|
+
/**
|
|
234
|
+
* @public
|
|
235
|
+
* Error codes for PublishNamespace control messages.
|
|
236
|
+
*/
|
|
237
|
+
declare enum PublishNamespaceErrorCode {
|
|
238
|
+
InternalError = 0,
|
|
239
|
+
Unauthorized = 1,
|
|
240
|
+
Timeout = 2,
|
|
241
|
+
NotSupported = 3,
|
|
242
|
+
Uninterested = 4,
|
|
243
|
+
MalformedAuthToken = 16,
|
|
244
|
+
UnknownAuthTokenAlias = 17,
|
|
245
|
+
ExpiredAuthToken = 18
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Converts a bigint value to an enum.
|
|
249
|
+
* @param v - The bigint value.
|
|
250
|
+
* @returns The corresponding PublishNamespaceErrorCode.
|
|
251
|
+
* @throws Error if the value is not a valid announce error code.
|
|
252
|
+
*/
|
|
253
|
+
declare function publishNamespaceErrorCodeFromBigInt(v: bigint): PublishNamespaceErrorCode;
|
|
254
|
+
/**
|
|
255
|
+
* @public
|
|
256
|
+
* Filter types for subscription requests.
|
|
257
|
+
*/
|
|
258
|
+
declare enum FilterType {
|
|
259
|
+
NextGroupStart = 1,
|
|
260
|
+
LatestObject = 2,
|
|
261
|
+
AbsoluteStart = 3,
|
|
262
|
+
AbsoluteRange = 4
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Converts a bigint value to a FilterType enum.
|
|
266
|
+
* @param v - The bigint value.
|
|
267
|
+
* @returns The corresponding FilterType.
|
|
268
|
+
* @throws Error if the value is not a valid filter type.
|
|
269
|
+
*/
|
|
270
|
+
declare function filterTypeFromBigInt(v: bigint): FilterType;
|
|
271
|
+
/**
|
|
272
|
+
* @public
|
|
273
|
+
* Fetch request types for MOQT protocol.
|
|
274
|
+
*/
|
|
275
|
+
declare enum FetchType {
|
|
276
|
+
StandAlone = 1,
|
|
277
|
+
Relative = 2,
|
|
278
|
+
Absolute = 3
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Converts a bigint value to a FetchType enum.
|
|
282
|
+
* @param v - The bigint value.
|
|
283
|
+
* @returns The corresponding FetchType.
|
|
284
|
+
* @throws CastingError if the value is not a valid fetch type.
|
|
285
|
+
*/
|
|
286
|
+
declare function fetchTypeFromBigInt(v: bigint): FetchType;
|
|
287
|
+
/**
|
|
288
|
+
* @public
|
|
289
|
+
* Group ordering options for object delivery.
|
|
290
|
+
*/
|
|
291
|
+
declare enum GroupOrder {
|
|
292
|
+
Original = 0,
|
|
293
|
+
Ascending = 1,
|
|
294
|
+
Descending = 2
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Converts a number value to a GroupOrder enum.
|
|
298
|
+
* @param v - The number value.
|
|
299
|
+
* @returns The corresponding GroupOrder.
|
|
300
|
+
* @throws CastingError if the value is not a valid group order.
|
|
301
|
+
*/
|
|
302
|
+
declare function groupOrderFromNumber(v: number): GroupOrder;
|
|
303
|
+
/**
|
|
304
|
+
* @public
|
|
305
|
+
* Error codes for Subscribe control messages.
|
|
306
|
+
*/
|
|
307
|
+
declare enum SubscribeErrorCode {
|
|
308
|
+
InternalError = 0,
|
|
309
|
+
Unauthorized = 1,
|
|
310
|
+
Timeout = 2,
|
|
311
|
+
NotSupported = 3,
|
|
312
|
+
TrackDoesNotExist = 4,
|
|
313
|
+
InvalidRange = 5,
|
|
314
|
+
MalformedAuthToken = 16,
|
|
315
|
+
ExpiredAuthToken = 18
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Converts a bigint value to a SubscribeErrorCode enum.
|
|
319
|
+
* @param v - The bigint value.
|
|
320
|
+
* @returns The corresponding SubscribeErrorCode.
|
|
321
|
+
* @throws Error if the value is not a valid subscribe error code.
|
|
322
|
+
*/
|
|
323
|
+
declare function subscribeErrorCodeFromBigInt(v: bigint): SubscribeErrorCode;
|
|
324
|
+
/**
|
|
325
|
+
* @public
|
|
326
|
+
* Error codes for Fetch control messages.
|
|
327
|
+
*/
|
|
328
|
+
declare enum FetchErrorCode {
|
|
329
|
+
InternalError = 0,
|
|
330
|
+
Unauthorized = 1,
|
|
331
|
+
Timeout = 2,
|
|
332
|
+
NotSupported = 3,
|
|
333
|
+
TrackDoesNotExist = 4,
|
|
334
|
+
InvalidRange = 5,
|
|
335
|
+
NoObjects = 6,
|
|
336
|
+
InvalidJoiningRequestId = 7,
|
|
337
|
+
UnknownStatusInRange = 8,
|
|
338
|
+
MalformedTrack = 9,
|
|
339
|
+
MalformedAuthToken = 16,
|
|
340
|
+
ExpiredAuthToken = 18
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Converts a bigint value to a FetchErrorCode enum.
|
|
344
|
+
* @param v - The bigint value.
|
|
345
|
+
* @returns The corresponding FetchErrorCode.
|
|
346
|
+
* @throws CastingError if the value is not a valid fetch error code.
|
|
347
|
+
*/
|
|
348
|
+
declare function fetchErrorCodeFromBigInt(v: bigint): FetchErrorCode;
|
|
349
|
+
/**
|
|
350
|
+
* @public
|
|
351
|
+
* Status codes for track status responses.
|
|
352
|
+
*/
|
|
353
|
+
declare enum TrackStatusCode {
|
|
354
|
+
InProgress = 0,
|
|
355
|
+
DoesNotExist = 1,
|
|
356
|
+
NotYetBegun = 2,
|
|
357
|
+
Finished = 3,
|
|
358
|
+
RelayUnavailable = 4
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Converts a bigint value to a TrackStatusCode enum.
|
|
362
|
+
* @param v - The bigint value.
|
|
363
|
+
* @returns The corresponding TrackStatusCode.
|
|
364
|
+
* @throws Error if the value is not a valid track status code.
|
|
365
|
+
*/
|
|
366
|
+
declare function trackStatusCodeFromBigInt(v: bigint): TrackStatusCode;
|
|
367
|
+
/**
|
|
368
|
+
* @public
|
|
369
|
+
* Error codes for SubscribeNamespace control messages.
|
|
370
|
+
*/
|
|
371
|
+
declare enum SubscribeNamespaceErrorCode {
|
|
372
|
+
InternalError = 0,
|
|
373
|
+
Unauthorized = 1,
|
|
374
|
+
Timeout = 2,
|
|
375
|
+
NotSupported = 3,
|
|
376
|
+
NamespacePrefixUnknown = 4,
|
|
377
|
+
NamespacePrefixOverlap = 5,
|
|
378
|
+
MalformedAuthToken = 16,
|
|
379
|
+
ExpiredAuthToken = 18
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Converts a bigint value to a SubscribeNamespaceErrorCode enum.
|
|
383
|
+
* @param v - The bigint value.
|
|
384
|
+
* @returns The corresponding SubscribeNamespaceErrorCode.
|
|
385
|
+
* @throws Error if the value is not a valid subscribe announces error code.
|
|
386
|
+
*/
|
|
387
|
+
declare function subscribeNamespaceErrorCodeFromBigInt(v: bigint): SubscribeNamespaceErrorCode;
|
|
388
|
+
/**
|
|
389
|
+
* @public
|
|
390
|
+
* Status codes for PublishDone control messages.
|
|
391
|
+
*/
|
|
392
|
+
declare enum PublishDoneStatusCode {
|
|
393
|
+
InternalError = 0,
|
|
394
|
+
Unauthorized = 1,
|
|
395
|
+
TrackEnded = 2,
|
|
396
|
+
SubscriptionEnded = 3,
|
|
397
|
+
GoingAway = 4,
|
|
398
|
+
Expired = 5,
|
|
399
|
+
TooFarBehind = 6
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Converts a bigint value to a PublishDoneStatusCode enum.
|
|
403
|
+
* @param v - The bigint value.
|
|
404
|
+
* @returns The corresponding PublishDoneStatusCode.
|
|
405
|
+
* @throws Error if the value is not a valid subscribe done status code.
|
|
406
|
+
*/
|
|
407
|
+
declare function publishDoneStatusCodeFromBigInt(v: bigint): PublishDoneStatusCode;
|
|
408
|
+
/**
|
|
409
|
+
* @public
|
|
410
|
+
* Error codes for Publish control messages.
|
|
411
|
+
*/
|
|
412
|
+
declare enum PublishErrorCode {
|
|
413
|
+
InternalError = 0,
|
|
414
|
+
Unauthorized = 1,
|
|
415
|
+
Timeout = 2,
|
|
416
|
+
NotSupported = 3,
|
|
417
|
+
InvalidNamespace = 4,
|
|
418
|
+
InvalidTrackName = 5,
|
|
419
|
+
MalformedAuthToken = 16,
|
|
420
|
+
UnknownAuthTokenAlias = 17,
|
|
421
|
+
ExpiredAuthToken = 18
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Converts a bigint value to a PublishErrorCode enum.
|
|
425
|
+
* @param v - The bigint value.
|
|
426
|
+
* @returns The corresponding PublishErrorCode.
|
|
427
|
+
* @throws Error if the value is not a valid publish error code.
|
|
428
|
+
*/
|
|
429
|
+
declare function publishErrorCodeFromBigInt(v: bigint): PublishErrorCode;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Copyright 2025 The MOQtail Authors
|
|
433
|
+
*
|
|
434
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
435
|
+
* you may not use this file except in compliance with the License.
|
|
436
|
+
* You may obtain a copy of the License at
|
|
437
|
+
*
|
|
438
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
439
|
+
*
|
|
440
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
441
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
442
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
443
|
+
* See the License for the specific language governing permissions and
|
|
444
|
+
* limitations under the License.
|
|
445
|
+
*/
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Represents a protocol PublishNamespace message, used to announce a track and its parameters.
|
|
449
|
+
*
|
|
450
|
+
* @public
|
|
451
|
+
*/
|
|
452
|
+
declare class PublishNamespace {
|
|
453
|
+
readonly requestId: bigint;
|
|
454
|
+
readonly trackNamespace: Tuple;
|
|
455
|
+
readonly parameters: KeyValuePair[];
|
|
456
|
+
/**
|
|
457
|
+
* @public
|
|
458
|
+
* Constructs a PublishNamespace message.
|
|
459
|
+
*
|
|
460
|
+
* @param requestId - The request ID for this publish namespace message.
|
|
461
|
+
* @param trackNamespace - The track namespace as a Tuple.
|
|
462
|
+
* @param parameters - The list of key-value parameters for the track.
|
|
463
|
+
*/
|
|
464
|
+
constructor(requestId: bigint, trackNamespace: Tuple, parameters: KeyValuePair[]);
|
|
465
|
+
/**
|
|
466
|
+
* @public
|
|
467
|
+
* Gets the message type for this PublishNamespace message.
|
|
468
|
+
*
|
|
469
|
+
* @returns The ControlMessageType.Announce value.
|
|
470
|
+
*/
|
|
471
|
+
getType(): ControlMessageType;
|
|
472
|
+
/**
|
|
473
|
+
* @public
|
|
474
|
+
* Serializes the PublishNamespace message into a {@link FrozenByteBuffer}.
|
|
475
|
+
*
|
|
476
|
+
* @returns The serialized buffer.
|
|
477
|
+
* @throws :{@link LengthExceedsMaxError} If the payload exceeds 65535 bytes.
|
|
478
|
+
*/
|
|
479
|
+
serialize(): FrozenByteBuffer;
|
|
480
|
+
/**
|
|
481
|
+
* @public
|
|
482
|
+
* Parses a PublishNamespace message from the given buffer.
|
|
483
|
+
*
|
|
484
|
+
* @param buf - The buffer to parse from.
|
|
485
|
+
* @returns The parsed PublishNamespace message.
|
|
486
|
+
* @throws :{@link NotEnoughBytesError} If the buffer does not contain enough bytes.
|
|
487
|
+
*/
|
|
488
|
+
static parsePayload(buf: BaseByteBuffer): PublishNamespace;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Copyright 2025 The MOQtail Authors
|
|
493
|
+
*
|
|
494
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
495
|
+
* you may not use this file except in compliance with the License.
|
|
496
|
+
* You may obtain a copy of the License at
|
|
497
|
+
*
|
|
498
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
499
|
+
*
|
|
500
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
501
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
502
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
503
|
+
* See the License for the specific language governing permissions and
|
|
504
|
+
* limitations under the License.
|
|
505
|
+
*/
|
|
506
|
+
|
|
507
|
+
declare class PublishNamespaceCancel {
|
|
508
|
+
readonly trackNamespace: Tuple;
|
|
509
|
+
readonly errorCode: PublishNamespaceErrorCode;
|
|
510
|
+
readonly reasonPhrase: ReasonPhrase;
|
|
511
|
+
constructor(trackNamespace: Tuple, errorCode: PublishNamespaceErrorCode, reasonPhrase: ReasonPhrase);
|
|
512
|
+
getType(): ControlMessageType;
|
|
513
|
+
serialize(): FrozenByteBuffer;
|
|
514
|
+
static parsePayload(buf: BaseByteBuffer): PublishNamespaceCancel;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Copyright 2025 The MOQtail Authors
|
|
519
|
+
*
|
|
520
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
521
|
+
* you may not use this file except in compliance with the License.
|
|
522
|
+
* You may obtain a copy of the License at
|
|
523
|
+
*
|
|
524
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
525
|
+
*
|
|
526
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
527
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
528
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
529
|
+
* See the License for the specific language governing permissions and
|
|
530
|
+
* limitations under the License.
|
|
531
|
+
*/
|
|
532
|
+
|
|
533
|
+
declare class PublishNamespaceError {
|
|
534
|
+
readonly requestId: bigint;
|
|
535
|
+
readonly errorCode: PublishNamespaceErrorCode;
|
|
536
|
+
readonly reasonPhrase: ReasonPhrase;
|
|
537
|
+
constructor(requestId: bigint, errorCode: PublishNamespaceErrorCode, reasonPhrase: ReasonPhrase);
|
|
538
|
+
getType(): ControlMessageType;
|
|
539
|
+
serialize(): FrozenByteBuffer;
|
|
540
|
+
static parsePayload(buf: BaseByteBuffer): PublishNamespaceError;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Copyright 2025 The MOQtail Authors
|
|
545
|
+
*
|
|
546
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
547
|
+
* you may not use this file except in compliance with the License.
|
|
548
|
+
* You may obtain a copy of the License at
|
|
549
|
+
*
|
|
550
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
551
|
+
*
|
|
552
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
553
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
554
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
555
|
+
* See the License for the specific language governing permissions and
|
|
556
|
+
* limitations under the License.
|
|
557
|
+
*/
|
|
558
|
+
|
|
559
|
+
declare class PublishNamespaceOk {
|
|
560
|
+
readonly requestId: bigint;
|
|
561
|
+
constructor(requestId: bigint | number);
|
|
562
|
+
getType(): ControlMessageType;
|
|
563
|
+
serialize(): FrozenByteBuffer;
|
|
564
|
+
static parsePayload(buf: BaseByteBuffer): PublishNamespaceOk;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Copyright 2025 The MOQtail Authors
|
|
569
|
+
*
|
|
570
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
571
|
+
* you may not use this file except in compliance with the License.
|
|
572
|
+
* You may obtain a copy of the License at
|
|
573
|
+
*
|
|
574
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
575
|
+
*
|
|
576
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
577
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
578
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
579
|
+
* See the License for the specific language governing permissions and
|
|
580
|
+
* limitations under the License.
|
|
581
|
+
*/
|
|
582
|
+
|
|
583
|
+
declare class ClientSetup {
|
|
584
|
+
readonly supportedVersions: number[];
|
|
585
|
+
readonly setupParameters: KeyValuePair[];
|
|
586
|
+
constructor(supportedVersions: number[], setupParameters: KeyValuePair[]);
|
|
587
|
+
getType(): ControlMessageType;
|
|
588
|
+
serialize(): FrozenByteBuffer;
|
|
589
|
+
static parsePayload(buf: BaseByteBuffer): ClientSetup;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Copyright 2025 The MOQtail Authors
|
|
594
|
+
*
|
|
595
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
596
|
+
* you may not use this file except in compliance with the License.
|
|
597
|
+
* You may obtain a copy of the License at
|
|
598
|
+
*
|
|
599
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
600
|
+
*
|
|
601
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
602
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
603
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
604
|
+
* See the License for the specific language governing permissions and
|
|
605
|
+
* limitations under the License.
|
|
606
|
+
*/
|
|
607
|
+
|
|
608
|
+
declare class Fetch {
|
|
609
|
+
readonly requestId: bigint;
|
|
610
|
+
readonly subscriberPriority: number;
|
|
611
|
+
readonly groupOrder: GroupOrder;
|
|
612
|
+
readonly typeAndProps: {
|
|
613
|
+
readonly type: FetchType.StandAlone;
|
|
614
|
+
readonly props: {
|
|
615
|
+
fullTrackName: FullTrackName;
|
|
616
|
+
startLocation: Location;
|
|
617
|
+
endLocation: Location;
|
|
618
|
+
};
|
|
619
|
+
} | {
|
|
620
|
+
readonly type: FetchType.Relative;
|
|
621
|
+
readonly props: {
|
|
622
|
+
joiningRequestId: bigint;
|
|
623
|
+
joiningStart: bigint;
|
|
624
|
+
};
|
|
625
|
+
} | {
|
|
626
|
+
readonly type: FetchType.Absolute;
|
|
627
|
+
readonly props: {
|
|
628
|
+
joiningRequestId: bigint;
|
|
629
|
+
joiningStart: bigint;
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
readonly parameters: KeyValuePair[];
|
|
633
|
+
constructor(requestId: bigint, subscriberPriority: number, groupOrder: GroupOrder, typeAndProps: {
|
|
634
|
+
readonly type: FetchType.StandAlone;
|
|
635
|
+
readonly props: {
|
|
636
|
+
fullTrackName: FullTrackName;
|
|
637
|
+
startLocation: Location;
|
|
638
|
+
endLocation: Location;
|
|
639
|
+
};
|
|
640
|
+
} | {
|
|
641
|
+
readonly type: FetchType.Relative;
|
|
642
|
+
readonly props: {
|
|
643
|
+
joiningRequestId: bigint;
|
|
644
|
+
joiningStart: bigint;
|
|
645
|
+
};
|
|
646
|
+
} | {
|
|
647
|
+
readonly type: FetchType.Absolute;
|
|
648
|
+
readonly props: {
|
|
649
|
+
joiningRequestId: bigint;
|
|
650
|
+
joiningStart: bigint;
|
|
651
|
+
};
|
|
652
|
+
}, parameters: KeyValuePair[]);
|
|
653
|
+
getType(): ControlMessageType;
|
|
654
|
+
serialize(): FrozenByteBuffer;
|
|
655
|
+
static parsePayload(buf: BaseByteBuffer): Fetch;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Copyright 2025 The MOQtail Authors
|
|
660
|
+
*
|
|
661
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
662
|
+
* you may not use this file except in compliance with the License.
|
|
663
|
+
* You may obtain a copy of the License at
|
|
664
|
+
*
|
|
665
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
666
|
+
*
|
|
667
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
668
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
669
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
670
|
+
* See the License for the specific language governing permissions and
|
|
671
|
+
* limitations under the License.
|
|
672
|
+
*/
|
|
673
|
+
|
|
674
|
+
declare class FetchCancel {
|
|
675
|
+
readonly requestId: bigint;
|
|
676
|
+
constructor(requestId: bigint | number);
|
|
677
|
+
getType(): ControlMessageType;
|
|
678
|
+
serialize(): FrozenByteBuffer;
|
|
679
|
+
static parsePayload(buf: BaseByteBuffer): FetchCancel;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Copyright 2025 The MOQtail Authors
|
|
684
|
+
*
|
|
685
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
686
|
+
* you may not use this file except in compliance with the License.
|
|
687
|
+
* You may obtain a copy of the License at
|
|
688
|
+
*
|
|
689
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
690
|
+
*
|
|
691
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
692
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
693
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
694
|
+
* See the License for the specific language governing permissions and
|
|
695
|
+
* limitations under the License.
|
|
696
|
+
*/
|
|
697
|
+
|
|
698
|
+
declare class FetchError {
|
|
699
|
+
readonly requestId: bigint;
|
|
700
|
+
readonly errorCode: FetchErrorCode;
|
|
701
|
+
readonly reasonPhrase: ReasonPhrase;
|
|
702
|
+
constructor(requestId: bigint, errorCode: FetchErrorCode, reasonPhrase: ReasonPhrase);
|
|
703
|
+
getType(): ControlMessageType;
|
|
704
|
+
serialize(): FrozenByteBuffer;
|
|
705
|
+
static parsePayload(buf: BaseByteBuffer): FetchError;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Copyright 2025 The MOQtail Authors
|
|
710
|
+
*
|
|
711
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
712
|
+
* you may not use this file except in compliance with the License.
|
|
713
|
+
* You may obtain a copy of the License at
|
|
714
|
+
*
|
|
715
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
716
|
+
*
|
|
717
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
718
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
719
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
720
|
+
* See the License for the specific language governing permissions and
|
|
721
|
+
* limitations under the License.
|
|
722
|
+
*/
|
|
723
|
+
|
|
724
|
+
declare class FetchOk {
|
|
725
|
+
readonly requestId: bigint;
|
|
726
|
+
readonly groupOrder: GroupOrder;
|
|
727
|
+
readonly endOfTrack: boolean;
|
|
728
|
+
readonly endLocation: Location;
|
|
729
|
+
readonly parameters: KeyValuePair[];
|
|
730
|
+
private constructor();
|
|
731
|
+
static newAscending(requestId: bigint | number, endOfTrack: boolean, endLocation: Location, parameters: KeyValuePair[]): FetchOk;
|
|
732
|
+
static newDescending(requestId: bigint | number, endOfTrack: boolean, endLocation: Location, parameters: KeyValuePair[]): FetchOk;
|
|
733
|
+
serialize(): FrozenByteBuffer;
|
|
734
|
+
static parsePayload(buf: BaseByteBuffer): FetchOk;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Copyright 2025 The MOQtail Authors
|
|
739
|
+
*
|
|
740
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
741
|
+
* you may not use this file except in compliance with the License.
|
|
742
|
+
* You may obtain a copy of the License at
|
|
743
|
+
*
|
|
744
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
745
|
+
*
|
|
746
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
747
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
748
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
749
|
+
* See the License for the specific language governing permissions and
|
|
750
|
+
* limitations under the License.
|
|
751
|
+
*/
|
|
752
|
+
|
|
753
|
+
declare class GoAway {
|
|
754
|
+
newSessionUri?: string | undefined;
|
|
755
|
+
constructor(newSessionUri?: string);
|
|
756
|
+
static getType(): ControlMessageType;
|
|
757
|
+
serialize(): FrozenByteBuffer;
|
|
758
|
+
static parsePayload(buf: BaseByteBuffer): GoAway;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Copyright 2025 The MOQtail Authors
|
|
763
|
+
*
|
|
764
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
765
|
+
* you may not use this file except in compliance with the License.
|
|
766
|
+
* You may obtain a copy of the License at
|
|
767
|
+
*
|
|
768
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
769
|
+
*
|
|
770
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
771
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
772
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
773
|
+
* See the License for the specific language governing permissions and
|
|
774
|
+
* limitations under the License.
|
|
775
|
+
*/
|
|
776
|
+
|
|
777
|
+
declare class MaxRequestId$1 {
|
|
778
|
+
readonly requestId: bigint;
|
|
779
|
+
constructor(requestId: bigint | number);
|
|
780
|
+
getType(): ControlMessageType;
|
|
781
|
+
serialize(): FrozenByteBuffer;
|
|
782
|
+
static parsePayload(buf: BaseByteBuffer): MaxRequestId$1;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Copyright 2025 The MOQtail Authors
|
|
787
|
+
*
|
|
788
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
789
|
+
* you may not use this file except in compliance with the License.
|
|
790
|
+
* You may obtain a copy of the License at
|
|
791
|
+
*
|
|
792
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
793
|
+
*
|
|
794
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
795
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
796
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
797
|
+
* See the License for the specific language governing permissions and
|
|
798
|
+
* limitations under the License.
|
|
799
|
+
*/
|
|
800
|
+
|
|
801
|
+
declare class ServerSetup {
|
|
802
|
+
readonly selectedVersion: number;
|
|
803
|
+
readonly setupParameters: KeyValuePair[];
|
|
804
|
+
constructor(selectedVersion: number, setupParameters: KeyValuePair[]);
|
|
805
|
+
getType(): ControlMessageType;
|
|
806
|
+
serialize(): FrozenByteBuffer;
|
|
807
|
+
static parsePayload(buf: BaseByteBuffer): ServerSetup;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Copyright 2025 The MOQtail Authors
|
|
812
|
+
*
|
|
813
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
814
|
+
* you may not use this file except in compliance with the License.
|
|
815
|
+
* You may obtain a copy of the License at
|
|
816
|
+
*
|
|
817
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
818
|
+
*
|
|
819
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
820
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
821
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
822
|
+
* See the License for the specific language governing permissions and
|
|
823
|
+
* limitations under the License.
|
|
824
|
+
*/
|
|
825
|
+
|
|
826
|
+
declare class Subscribe {
|
|
827
|
+
requestId: bigint;
|
|
828
|
+
fullTrackName: FullTrackName;
|
|
829
|
+
subscriberPriority: number;
|
|
830
|
+
groupOrder: GroupOrder;
|
|
831
|
+
forward: boolean;
|
|
832
|
+
filterType: FilterType;
|
|
833
|
+
startLocation: Location | undefined;
|
|
834
|
+
endGroup: bigint | undefined;
|
|
835
|
+
parameters: KeyValuePair[];
|
|
836
|
+
private constructor();
|
|
837
|
+
static newNextGroupStart(requestId: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, parameters: KeyValuePair[]): Subscribe;
|
|
838
|
+
static newLatestObject(requestId: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, parameters: KeyValuePair[]): Subscribe;
|
|
839
|
+
static newAbsoluteStart(requestId: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, parameters: KeyValuePair[]): Subscribe;
|
|
840
|
+
static newAbsoluteRange(requestId: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, endGroup: bigint, parameters: KeyValuePair[]): Subscribe;
|
|
841
|
+
serialize(): FrozenByteBuffer;
|
|
842
|
+
static parsePayload(buf: BaseByteBuffer): Subscribe;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Copyright 2025 The MOQtail Authors
|
|
847
|
+
*
|
|
848
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
849
|
+
* you may not use this file except in compliance with the License.
|
|
850
|
+
* You may obtain a copy of the License at
|
|
851
|
+
*
|
|
852
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
853
|
+
*
|
|
854
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
855
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
856
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
857
|
+
* See the License for the specific language governing permissions and
|
|
858
|
+
* limitations under the License.
|
|
859
|
+
*/
|
|
860
|
+
|
|
861
|
+
declare class PublishDone {
|
|
862
|
+
readonly requestId: bigint;
|
|
863
|
+
readonly statusCode: PublishDoneStatusCode;
|
|
864
|
+
readonly streamCount: bigint;
|
|
865
|
+
readonly errorReason: ReasonPhrase;
|
|
866
|
+
constructor(requestId: bigint, statusCode: PublishDoneStatusCode, streamCount: bigint, errorReason: ReasonPhrase);
|
|
867
|
+
static new(requestId: bigint | number, statusCode: PublishDoneStatusCode, streamCount: bigint, errorReason: ReasonPhrase): PublishDone;
|
|
868
|
+
getType(): ControlMessageType;
|
|
869
|
+
serialize(): FrozenByteBuffer;
|
|
870
|
+
static parsePayload(buf: BaseByteBuffer): PublishDone;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Copyright 2025 The MOQtail Authors
|
|
875
|
+
*
|
|
876
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
877
|
+
* you may not use this file except in compliance with the License.
|
|
878
|
+
* You may obtain a copy of the License at
|
|
879
|
+
*
|
|
880
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
881
|
+
*
|
|
882
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
883
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
884
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
885
|
+
* See the License for the specific language governing permissions and
|
|
886
|
+
* limitations under the License.
|
|
887
|
+
*/
|
|
888
|
+
|
|
889
|
+
declare class Publish {
|
|
890
|
+
readonly requestId: bigint;
|
|
891
|
+
readonly trackNamespace: Tuple;
|
|
892
|
+
readonly trackName: string;
|
|
893
|
+
readonly trackAlias: bigint;
|
|
894
|
+
readonly groupOrder: number;
|
|
895
|
+
readonly contentExists: number;
|
|
896
|
+
readonly largestLocation: Location | undefined;
|
|
897
|
+
readonly forward: number;
|
|
898
|
+
readonly parameters: KeyValuePair[];
|
|
899
|
+
constructor(requestId: bigint, trackNamespace: Tuple, trackName: string, trackAlias: bigint, groupOrder: number, contentExists: number, largestLocation: Location | undefined, forward: number, parameters: KeyValuePair[]);
|
|
900
|
+
static new(requestId: bigint | number, trackNamespace: Tuple, trackName: string, trackAlias: bigint | number, groupOrder: number, contentExists: number, largestLocation: Location | undefined, forward: number, parameters: KeyValuePair[]): Publish;
|
|
901
|
+
getType(): ControlMessageType;
|
|
902
|
+
serialize(): FrozenByteBuffer;
|
|
903
|
+
static parsePayload(buf: BaseByteBuffer): Publish;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Copyright 2025 The MOQtail Authors
|
|
908
|
+
*
|
|
909
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
910
|
+
* you may not use this file except in compliance with the License.
|
|
911
|
+
* You may obtain a copy of the License at
|
|
912
|
+
*
|
|
913
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
914
|
+
*
|
|
915
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
916
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
917
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
918
|
+
* See the License for the specific language governing permissions and
|
|
919
|
+
* limitations under the License.
|
|
920
|
+
*/
|
|
921
|
+
|
|
922
|
+
declare class PublishOk {
|
|
923
|
+
readonly requestId: bigint;
|
|
924
|
+
readonly forward: number;
|
|
925
|
+
readonly subscriberPriority: number;
|
|
926
|
+
readonly groupOrder: number;
|
|
927
|
+
readonly filterType: FilterType;
|
|
928
|
+
readonly startLocation: Location | undefined;
|
|
929
|
+
readonly endGroup: bigint | undefined;
|
|
930
|
+
readonly parameters: KeyValuePair[];
|
|
931
|
+
constructor(requestId: bigint, forward: number, subscriberPriority: number, groupOrder: number, filterType: FilterType, startLocation: Location | undefined, endGroup: bigint | undefined, parameters: KeyValuePair[]);
|
|
932
|
+
static new(requestId: bigint | number, forward: number, subscriberPriority: number, groupOrder: number, filterType: FilterType, startLocation: Location | undefined, endGroup: bigint | number | undefined, parameters: KeyValuePair[]): PublishOk;
|
|
933
|
+
getType(): ControlMessageType;
|
|
934
|
+
serialize(): FrozenByteBuffer;
|
|
935
|
+
static parsePayload(buf: BaseByteBuffer): PublishOk;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* Copyright 2025 The MOQtail Authors
|
|
940
|
+
*
|
|
941
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
942
|
+
* you may not use this file except in compliance with the License.
|
|
943
|
+
* You may obtain a copy of the License at
|
|
944
|
+
*
|
|
945
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
946
|
+
*
|
|
947
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
948
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
949
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
950
|
+
* See the License for the specific language governing permissions and
|
|
951
|
+
* limitations under the License.
|
|
952
|
+
*/
|
|
953
|
+
|
|
954
|
+
declare class PublishError {
|
|
955
|
+
readonly requestId: bigint;
|
|
956
|
+
readonly errorCode: PublishErrorCode;
|
|
957
|
+
readonly errorReason: ReasonPhrase;
|
|
958
|
+
constructor(requestId: bigint, errorCode: PublishErrorCode, errorReason: ReasonPhrase);
|
|
959
|
+
static new(requestId: bigint | number, errorCode: PublishErrorCode, errorReason: ReasonPhrase): PublishError;
|
|
960
|
+
getType(): ControlMessageType;
|
|
961
|
+
serialize(): FrozenByteBuffer;
|
|
962
|
+
static parsePayload(buf: BaseByteBuffer): PublishError;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Copyright 2025 The MOQtail Authors
|
|
967
|
+
*
|
|
968
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
969
|
+
* you may not use this file except in compliance with the License.
|
|
970
|
+
* You may obtain a copy of the License at
|
|
971
|
+
*
|
|
972
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
973
|
+
*
|
|
974
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
975
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
976
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
977
|
+
* See the License for the specific language governing permissions and
|
|
978
|
+
* limitations under the License.
|
|
979
|
+
*/
|
|
980
|
+
|
|
981
|
+
declare class SubscribeError {
|
|
982
|
+
readonly requestId: bigint;
|
|
983
|
+
readonly errorCode: SubscribeErrorCode;
|
|
984
|
+
readonly errorReason: ReasonPhrase;
|
|
985
|
+
constructor(requestId: bigint, errorCode: SubscribeErrorCode, errorReason: ReasonPhrase);
|
|
986
|
+
static new(requestId: bigint | number, errorCode: SubscribeErrorCode, errorReason: ReasonPhrase): SubscribeError;
|
|
987
|
+
getType(): ControlMessageType;
|
|
988
|
+
serialize(): FrozenByteBuffer;
|
|
989
|
+
static parsePayload(buf: BaseByteBuffer): SubscribeError;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Copyright 2025 The MOQtail Authors
|
|
994
|
+
*
|
|
995
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
996
|
+
* you may not use this file except in compliance with the License.
|
|
997
|
+
* You may obtain a copy of the License at
|
|
998
|
+
*
|
|
999
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1000
|
+
*
|
|
1001
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1002
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1003
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1004
|
+
* See the License for the specific language governing permissions and
|
|
1005
|
+
* limitations under the License.
|
|
1006
|
+
*/
|
|
1007
|
+
|
|
1008
|
+
declare class SubscribeOk {
|
|
1009
|
+
requestId: bigint;
|
|
1010
|
+
trackAlias: bigint;
|
|
1011
|
+
expires: bigint;
|
|
1012
|
+
groupOrder: GroupOrder;
|
|
1013
|
+
contentExists: boolean;
|
|
1014
|
+
largestLocation?: Location | undefined;
|
|
1015
|
+
parameters: KeyValuePair[];
|
|
1016
|
+
private constructor();
|
|
1017
|
+
static newAscendingNoContent(requestId: bigint, trackAlias: bigint, expires: bigint, parameters: KeyValuePair[]): SubscribeOk;
|
|
1018
|
+
static newDescendingNoContent(requestId: bigint, trackAlias: bigint, expires: bigint, parameters: KeyValuePair[]): SubscribeOk;
|
|
1019
|
+
static newAscendingWithContent(requestId: bigint, trackAlias: bigint, expires: bigint, largestLocation: Location, parameters: KeyValuePair[]): SubscribeOk;
|
|
1020
|
+
static newDescendingWithContent(requestId: bigint, trackAlias: bigint, expires: bigint, largestLocation: Location, parameters: KeyValuePair[]): SubscribeOk;
|
|
1021
|
+
serialize(): FrozenByteBuffer;
|
|
1022
|
+
static parsePayload(buf: BaseByteBuffer): SubscribeOk;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Copyright 2025 The MOQtail Authors
|
|
1027
|
+
*
|
|
1028
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1029
|
+
* you may not use this file except in compliance with the License.
|
|
1030
|
+
* You may obtain a copy of the License at
|
|
1031
|
+
*
|
|
1032
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1033
|
+
*
|
|
1034
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1035
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1036
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1037
|
+
* See the License for the specific language governing permissions and
|
|
1038
|
+
* limitations under the License.
|
|
1039
|
+
*/
|
|
1040
|
+
|
|
1041
|
+
declare class SubscribeUpdate {
|
|
1042
|
+
requestId: bigint;
|
|
1043
|
+
subscriptionRequestId: bigint;
|
|
1044
|
+
startLocation: Location;
|
|
1045
|
+
endGroup: bigint;
|
|
1046
|
+
subscriberPriority: number;
|
|
1047
|
+
forward: boolean;
|
|
1048
|
+
parameters: KeyValuePair[];
|
|
1049
|
+
constructor(requestId: bigint, subscriptionRequestId: bigint, startLocation: Location, endGroup: bigint, subscriberPriority: number, forward: boolean, parameters: KeyValuePair[]);
|
|
1050
|
+
serialize(): FrozenByteBuffer;
|
|
1051
|
+
static parsePayload(buf: BaseByteBuffer): SubscribeUpdate;
|
|
1052
|
+
equals(other: SubscribeUpdate): boolean;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Copyright 2025 The MOQtail Authors
|
|
1057
|
+
*
|
|
1058
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1059
|
+
* you may not use this file except in compliance with the License.
|
|
1060
|
+
* You may obtain a copy of the License at
|
|
1061
|
+
*
|
|
1062
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1063
|
+
*
|
|
1064
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1065
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1066
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1067
|
+
* See the License for the specific language governing permissions and
|
|
1068
|
+
* limitations under the License.
|
|
1069
|
+
*/
|
|
1070
|
+
|
|
1071
|
+
declare class RequestsBlocked {
|
|
1072
|
+
readonly maximumRequestId: bigint;
|
|
1073
|
+
constructor(maximumRequestId: bigint | number);
|
|
1074
|
+
getType(): ControlMessageType;
|
|
1075
|
+
serialize(): FrozenByteBuffer;
|
|
1076
|
+
static parsePayload(buf: BaseByteBuffer): RequestsBlocked;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* Copyright 2025 The MOQtail Authors
|
|
1081
|
+
*
|
|
1082
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1083
|
+
* you may not use this file except in compliance with the License.
|
|
1084
|
+
* You may obtain a copy of the License at
|
|
1085
|
+
*
|
|
1086
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1087
|
+
*
|
|
1088
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1089
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1090
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1091
|
+
* See the License for the specific language governing permissions and
|
|
1092
|
+
* limitations under the License.
|
|
1093
|
+
*/
|
|
1094
|
+
|
|
1095
|
+
declare class TrackStatus {
|
|
1096
|
+
requestId: bigint;
|
|
1097
|
+
trackAlias: bigint;
|
|
1098
|
+
fullTrackName: FullTrackName;
|
|
1099
|
+
subscriberPriority: number;
|
|
1100
|
+
groupOrder: GroupOrder;
|
|
1101
|
+
forward: boolean;
|
|
1102
|
+
filterType: FilterType;
|
|
1103
|
+
startLocation: Location | undefined;
|
|
1104
|
+
endGroup: bigint | undefined;
|
|
1105
|
+
subscribeParameters: KeyValuePair[];
|
|
1106
|
+
private constructor();
|
|
1107
|
+
static newNextGroupStart(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, subscribeParameters: KeyValuePair[]): TrackStatus;
|
|
1108
|
+
static newLatestObject(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, subscribeParameters: KeyValuePair[]): TrackStatus;
|
|
1109
|
+
static newAbsoluteStart(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, subscribeParameters: KeyValuePair[]): TrackStatus;
|
|
1110
|
+
static newAbsoluteRange(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, endGroup: bigint, subscribeParameters: KeyValuePair[]): TrackStatus;
|
|
1111
|
+
serialize(): FrozenByteBuffer;
|
|
1112
|
+
static parsePayload(buf: BaseByteBuffer): TrackStatus;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* Copyright 2025 The MOQtail Authors
|
|
1117
|
+
*
|
|
1118
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1119
|
+
* you may not use this file except in compliance with the License.
|
|
1120
|
+
* You may obtain a copy of the License at
|
|
1121
|
+
*
|
|
1122
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1123
|
+
*
|
|
1124
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1125
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1126
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1127
|
+
* See the License for the specific language governing permissions and
|
|
1128
|
+
* limitations under the License.
|
|
1129
|
+
*/
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* @public
|
|
1133
|
+
* Represents a protocol PublishNamespaceDone message, used to unpublish a track namespace.
|
|
1134
|
+
*/
|
|
1135
|
+
declare class PublishNamespaceDone {
|
|
1136
|
+
readonly trackNamespace: Tuple;
|
|
1137
|
+
/**
|
|
1138
|
+
* Constructs a PublishNamespaceDone message.
|
|
1139
|
+
* @param trackNamespace - The track namespace to unpublish.
|
|
1140
|
+
*/
|
|
1141
|
+
constructor(trackNamespace: Tuple);
|
|
1142
|
+
/**
|
|
1143
|
+
* Gets the control message type for this PublishNamespaceDone message.
|
|
1144
|
+
* @returns The ControlMessageType.PublishNamespaceDone enum value.
|
|
1145
|
+
*/
|
|
1146
|
+
getType(): ControlMessageType;
|
|
1147
|
+
/**
|
|
1148
|
+
* Serializes the PublishNamespaceDone message to a frozen byte buffer.
|
|
1149
|
+
* @returns The serialized message as a FrozenByteBuffer.
|
|
1150
|
+
* @throws :{@link LengthExceedsMaxError} If the payload exceeds 65535 bytes.
|
|
1151
|
+
*/
|
|
1152
|
+
serialize(): FrozenByteBuffer;
|
|
1153
|
+
/**
|
|
1154
|
+
* Parses a PublishNamespaceDone message payload from a buffer.
|
|
1155
|
+
* @param buf - The buffer containing the payload.
|
|
1156
|
+
* @returns The parsed PublishNamespaceDone message.
|
|
1157
|
+
*/
|
|
1158
|
+
static parsePayload(buf: BaseByteBuffer): PublishNamespaceDone;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* Copyright 2025 The MOQtail Authors
|
|
1163
|
+
*
|
|
1164
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1165
|
+
* you may not use this file except in compliance with the License.
|
|
1166
|
+
* You may obtain a copy of the License at
|
|
1167
|
+
*
|
|
1168
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1169
|
+
*
|
|
1170
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1171
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1172
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1173
|
+
* See the License for the specific language governing permissions and
|
|
1174
|
+
* limitations under the License.
|
|
1175
|
+
*/
|
|
1176
|
+
|
|
1177
|
+
declare class Unsubscribe {
|
|
1178
|
+
readonly requestId: bigint;
|
|
1179
|
+
constructor(requestId: bigint | number);
|
|
1180
|
+
getType(): ControlMessageType;
|
|
1181
|
+
serialize(): FrozenByteBuffer;
|
|
1182
|
+
static parsePayload(buf: BaseByteBuffer): Unsubscribe;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* Copyright 2025 The MOQtail Authors
|
|
1187
|
+
*
|
|
1188
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1189
|
+
* you may not use this file except in compliance with the License.
|
|
1190
|
+
* You may obtain a copy of the License at
|
|
1191
|
+
*
|
|
1192
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1193
|
+
*
|
|
1194
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1195
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1196
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1197
|
+
* See the License for the specific language governing permissions and
|
|
1198
|
+
* limitations under the License.
|
|
1199
|
+
*/
|
|
1200
|
+
|
|
1201
|
+
declare class SubscribeNamespace {
|
|
1202
|
+
readonly requestId: bigint;
|
|
1203
|
+
readonly trackNamespacePrefix: Tuple;
|
|
1204
|
+
readonly parameters: KeyValuePair[];
|
|
1205
|
+
constructor(requestId: bigint, trackNamespacePrefix: Tuple, parameters: KeyValuePair[]);
|
|
1206
|
+
getType(): ControlMessageType;
|
|
1207
|
+
serialize(): FrozenByteBuffer;
|
|
1208
|
+
static parsePayload(buf: BaseByteBuffer): SubscribeNamespace;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* Copyright 2025 The MOQtail Authors
|
|
1213
|
+
*
|
|
1214
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1215
|
+
* you may not use this file except in compliance with the License.
|
|
1216
|
+
* You may obtain a copy of the License at
|
|
1217
|
+
*
|
|
1218
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1219
|
+
*
|
|
1220
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1221
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1222
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1223
|
+
* See the License for the specific language governing permissions and
|
|
1224
|
+
* limitations under the License.
|
|
1225
|
+
*/
|
|
1226
|
+
|
|
1227
|
+
declare class SubscribeNamespaceOk {
|
|
1228
|
+
readonly requestId: bigint;
|
|
1229
|
+
constructor(requestId: bigint | number);
|
|
1230
|
+
getType(): ControlMessageType;
|
|
1231
|
+
serialize(): FrozenByteBuffer;
|
|
1232
|
+
static parsePayload(buf: BaseByteBuffer): SubscribeNamespaceOk;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* Copyright 2025 The MOQtail Authors
|
|
1237
|
+
*
|
|
1238
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1239
|
+
* you may not use this file except in compliance with the License.
|
|
1240
|
+
* You may obtain a copy of the License at
|
|
1241
|
+
*
|
|
1242
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1243
|
+
*
|
|
1244
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1245
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1246
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1247
|
+
* See the License for the specific language governing permissions and
|
|
1248
|
+
* limitations under the License.
|
|
1249
|
+
*/
|
|
1250
|
+
|
|
1251
|
+
declare class SubscribeNamespaceError {
|
|
1252
|
+
readonly requestId: bigint;
|
|
1253
|
+
readonly errorCode: SubscribeNamespaceErrorCode;
|
|
1254
|
+
readonly reasonPhrase: ReasonPhrase;
|
|
1255
|
+
constructor(requestId: bigint, errorCode: SubscribeNamespaceErrorCode, reasonPhrase: ReasonPhrase);
|
|
1256
|
+
getType(): ControlMessageType;
|
|
1257
|
+
serialize(): FrozenByteBuffer;
|
|
1258
|
+
static parsePayload(buf: BaseByteBuffer): SubscribeNamespaceError;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Copyright 2025 The MOQtail Authors
|
|
1263
|
+
*
|
|
1264
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1265
|
+
* you may not use this file except in compliance with the License.
|
|
1266
|
+
* You may obtain a copy of the License at
|
|
1267
|
+
*
|
|
1268
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1269
|
+
*
|
|
1270
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1271
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1272
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1273
|
+
* See the License for the specific language governing permissions and
|
|
1274
|
+
* limitations under the License.
|
|
1275
|
+
*/
|
|
1276
|
+
|
|
1277
|
+
declare class UnsubscribeNamespace {
|
|
1278
|
+
readonly trackNamespacePrefix: Tuple;
|
|
1279
|
+
constructor(trackNamespacePrefix: Tuple);
|
|
1280
|
+
getType(): ControlMessageType;
|
|
1281
|
+
serialize(): FrozenByteBuffer;
|
|
1282
|
+
static parsePayload(buf: BaseByteBuffer): UnsubscribeNamespace;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Copyright 2025 The MOQtail Authors
|
|
1287
|
+
*
|
|
1288
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1289
|
+
* you may not use this file except in compliance with the License.
|
|
1290
|
+
* You may obtain a copy of the License at
|
|
1291
|
+
*
|
|
1292
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1293
|
+
*
|
|
1294
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1295
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1296
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1297
|
+
* See the License for the specific language governing permissions and
|
|
1298
|
+
* limitations under the License.
|
|
1299
|
+
*/
|
|
1300
|
+
|
|
1301
|
+
declare class TrackStatusOk {
|
|
1302
|
+
requestId: bigint;
|
|
1303
|
+
expires: bigint;
|
|
1304
|
+
groupOrder: GroupOrder;
|
|
1305
|
+
contentExists: boolean;
|
|
1306
|
+
largestLocation?: Location | undefined;
|
|
1307
|
+
subscribeParameters: KeyValuePair[];
|
|
1308
|
+
private constructor();
|
|
1309
|
+
static newAscendingNoContent(requestId: bigint, expires: bigint, subscribeParameters: KeyValuePair[]): TrackStatusOk;
|
|
1310
|
+
static newDescendingNoContent(requestId: bigint, expires: bigint, subscribeParameters: KeyValuePair[]): TrackStatusOk;
|
|
1311
|
+
static newAscendingWithContent(requestId: bigint, expires: bigint, largestLocation: Location, subscribeParameters: KeyValuePair[]): TrackStatusOk;
|
|
1312
|
+
static newDescendingWithContent(requestId: bigint, expires: bigint, largestLocation: Location, subscribeParameters: KeyValuePair[]): TrackStatusOk;
|
|
1313
|
+
serialize(): FrozenByteBuffer;
|
|
1314
|
+
static parsePayload(buf: BaseByteBuffer): TrackStatusOk;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* Copyright 2025 The MOQtail Authors
|
|
1319
|
+
*
|
|
1320
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1321
|
+
* you may not use this file except in compliance with the License.
|
|
1322
|
+
* You may obtain a copy of the License at
|
|
1323
|
+
*
|
|
1324
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1325
|
+
*
|
|
1326
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1327
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1328
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1329
|
+
* See the License for the specific language governing permissions and
|
|
1330
|
+
* limitations under the License.
|
|
1331
|
+
*/
|
|
1332
|
+
|
|
1333
|
+
declare class TrackStatusError {
|
|
1334
|
+
readonly requestId: bigint;
|
|
1335
|
+
readonly errorCode: SubscribeErrorCode;
|
|
1336
|
+
readonly errorReason: ReasonPhrase;
|
|
1337
|
+
readonly trackAlias: bigint;
|
|
1338
|
+
constructor(requestId: bigint, errorCode: SubscribeErrorCode, errorReason: ReasonPhrase, trackAlias: bigint);
|
|
1339
|
+
static new(requestId: bigint | number, errorCode: SubscribeErrorCode, errorReason: ReasonPhrase, trackAlias: bigint): TrackStatusError;
|
|
1340
|
+
getType(): ControlMessageType;
|
|
1341
|
+
serialize(): FrozenByteBuffer;
|
|
1342
|
+
static parsePayload(buf: BaseByteBuffer): TrackStatusError;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* Copyright 2025 The MOQtail Authors
|
|
1347
|
+
*
|
|
1348
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1349
|
+
* you may not use this file except in compliance with the License.
|
|
1350
|
+
* You may obtain a copy of the License at
|
|
1351
|
+
*
|
|
1352
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1353
|
+
*
|
|
1354
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1355
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1356
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1357
|
+
* See the License for the specific language governing permissions and
|
|
1358
|
+
* limitations under the License.
|
|
1359
|
+
*/
|
|
1360
|
+
|
|
1361
|
+
type ControlMessage = Publish | PublishError | PublishOk | PublishDone | PublishNamespace | PublishNamespaceCancel | PublishNamespaceError | PublishNamespaceOk | ClientSetup | Fetch | FetchCancel | FetchError | FetchOk | GoAway | MaxRequestId$1 | ServerSetup | Subscribe | SubscribeError | SubscribeOk | SubscribeUpdate | RequestsBlocked | TrackStatus | TrackStatusOk | TrackStatusError | PublishNamespaceDone | Unsubscribe | SubscribeNamespace | SubscribeNamespaceOk | SubscribeNamespaceError | UnsubscribeNamespace;
|
|
1362
|
+
declare namespace ControlMessage {
|
|
1363
|
+
function deserialize(buf: FrozenByteBuffer): ControlMessage;
|
|
1364
|
+
function serialize(msg: ControlMessage): FrozenByteBuffer;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* Copyright 2025 The MOQtail Authors
|
|
1369
|
+
*
|
|
1370
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1371
|
+
* you may not use this file except in compliance with the License.
|
|
1372
|
+
* You may obtain a copy of the License at
|
|
1373
|
+
*
|
|
1374
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1375
|
+
*
|
|
1376
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1377
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1378
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1379
|
+
* See the License for the specific language governing permissions and
|
|
1380
|
+
* limitations under the License.
|
|
1381
|
+
*/
|
|
1382
|
+
declare enum CommonType {
|
|
1383
|
+
AuthorizationToken = 3
|
|
1384
|
+
}
|
|
1385
|
+
declare function commonTypeFromNumber(value: number): CommonType;
|
|
1386
|
+
declare enum SetupParameterType {
|
|
1387
|
+
Path = 1,
|
|
1388
|
+
MaxRequestId = 2,
|
|
1389
|
+
MaxAuthTokenCacheSize = 4
|
|
1390
|
+
}
|
|
1391
|
+
declare function setupParameterTypeFromNumber(value: number): SetupParameterType;
|
|
1392
|
+
declare enum VersionSpecificParameterType {
|
|
1393
|
+
AuthorizationToken = 1,
|
|
1394
|
+
DeliveryTimeout = 2,
|
|
1395
|
+
MaxCacheDuration = 4
|
|
1396
|
+
}
|
|
1397
|
+
declare function versionSpecificParameterTypeFromNumber(value: number): VersionSpecificParameterType;
|
|
1398
|
+
declare enum TokenAliasType {
|
|
1399
|
+
Delete = 0,
|
|
1400
|
+
Register = 1,
|
|
1401
|
+
UseAlias = 2,
|
|
1402
|
+
UseValue = 3
|
|
1403
|
+
}
|
|
1404
|
+
declare function tokenAliasTypeFromNumber(value: number): TokenAliasType;
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Copyright 2025 The MOQtail Authors
|
|
1408
|
+
*
|
|
1409
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1410
|
+
* you may not use this file except in compliance with the License.
|
|
1411
|
+
* You may obtain a copy of the License at
|
|
1412
|
+
*
|
|
1413
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1414
|
+
*
|
|
1415
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1416
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1417
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1418
|
+
* See the License for the specific language governing permissions and
|
|
1419
|
+
* limitations under the License.
|
|
1420
|
+
*/
|
|
1421
|
+
|
|
1422
|
+
interface Parameter {
|
|
1423
|
+
toKeyValuePair(): KeyValuePair;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* Copyright 2025 The MOQtail Authors
|
|
1428
|
+
*
|
|
1429
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1430
|
+
* you may not use this file except in compliance with the License.
|
|
1431
|
+
* You may obtain a copy of the License at
|
|
1432
|
+
*
|
|
1433
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1434
|
+
*
|
|
1435
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1436
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1437
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1438
|
+
* See the License for the specific language governing permissions and
|
|
1439
|
+
* limitations under the License.
|
|
1440
|
+
*/
|
|
1441
|
+
|
|
1442
|
+
declare class MaxRequestId implements Parameter {
|
|
1443
|
+
readonly maxId: bigint;
|
|
1444
|
+
static readonly TYPE = SetupParameterType.MaxRequestId;
|
|
1445
|
+
constructor(maxId: bigint);
|
|
1446
|
+
toKeyValuePair(): KeyValuePair;
|
|
1447
|
+
static fromKeyValuePair(pair: KeyValuePair): MaxRequestId | undefined;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* Copyright 2025 The MOQtail Authors
|
|
1452
|
+
*
|
|
1453
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1454
|
+
* you may not use this file except in compliance with the License.
|
|
1455
|
+
* You may obtain a copy of the License at
|
|
1456
|
+
*
|
|
1457
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1458
|
+
*
|
|
1459
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1460
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1461
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1462
|
+
* See the License for the specific language governing permissions and
|
|
1463
|
+
* limitations under the License.
|
|
1464
|
+
*/
|
|
1465
|
+
|
|
1466
|
+
declare class Path implements Parameter {
|
|
1467
|
+
readonly moqtPath: string;
|
|
1468
|
+
static readonly TYPE = SetupParameterType.Path;
|
|
1469
|
+
constructor(moqtPath: string);
|
|
1470
|
+
toKeyValuePair(): KeyValuePair;
|
|
1471
|
+
static fromKeyValuePair(pair: KeyValuePair): Path | undefined;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* Copyright 2025 The MOQtail Authors
|
|
1476
|
+
*
|
|
1477
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1478
|
+
* you may not use this file except in compliance with the License.
|
|
1479
|
+
* You may obtain a copy of the License at
|
|
1480
|
+
*
|
|
1481
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1482
|
+
*
|
|
1483
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1484
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1485
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1486
|
+
* See the License for the specific language governing permissions and
|
|
1487
|
+
* limitations under the License.
|
|
1488
|
+
*/
|
|
1489
|
+
|
|
1490
|
+
declare class MaxAuthTokenCacheSize implements Parameter {
|
|
1491
|
+
readonly maxSize: bigint;
|
|
1492
|
+
static readonly TYPE = SetupParameterType.MaxAuthTokenCacheSize;
|
|
1493
|
+
constructor(maxSize: bigint);
|
|
1494
|
+
toKeyValuePair(): KeyValuePair;
|
|
1495
|
+
static fromKeyValuePair(pair: KeyValuePair): MaxAuthTokenCacheSize | undefined;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
/**
|
|
1499
|
+
* Copyright 2025 The MOQtail Authors
|
|
1500
|
+
*
|
|
1501
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1502
|
+
* you may not use this file except in compliance with the License.
|
|
1503
|
+
* You may obtain a copy of the License at
|
|
1504
|
+
*
|
|
1505
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1506
|
+
*
|
|
1507
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1508
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1509
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1510
|
+
* See the License for the specific language governing permissions and
|
|
1511
|
+
* limitations under the License.
|
|
1512
|
+
*/
|
|
1513
|
+
|
|
1514
|
+
type AuthTokenVariant = {
|
|
1515
|
+
aliasType: TokenAliasType.Delete;
|
|
1516
|
+
tokenAlias: bigint;
|
|
1517
|
+
} | {
|
|
1518
|
+
aliasType: TokenAliasType.Register;
|
|
1519
|
+
tokenAlias: bigint;
|
|
1520
|
+
tokenType: bigint;
|
|
1521
|
+
tokenValue: Uint8Array;
|
|
1522
|
+
} | {
|
|
1523
|
+
aliasType: TokenAliasType.UseAlias;
|
|
1524
|
+
tokenAlias: bigint;
|
|
1525
|
+
} | {
|
|
1526
|
+
aliasType: TokenAliasType.UseValue;
|
|
1527
|
+
tokenType: bigint;
|
|
1528
|
+
tokenValue: Uint8Array;
|
|
1529
|
+
};
|
|
1530
|
+
declare class AuthorizationToken implements Parameter {
|
|
1531
|
+
readonly variant: AuthTokenVariant;
|
|
1532
|
+
static readonly TYPE = CommonType.AuthorizationToken;
|
|
1533
|
+
private constructor();
|
|
1534
|
+
static newDelete(tokenAlias: bigint | number): AuthorizationToken;
|
|
1535
|
+
static newRegister(tokenAlias: bigint | number, tokenType: bigint | number, tokenValue: Uint8Array): AuthorizationToken;
|
|
1536
|
+
static newUseAlias(tokenAlias: bigint | number): AuthorizationToken;
|
|
1537
|
+
static newUseValue(tokenType: bigint | number, tokenValue: Uint8Array): AuthorizationToken;
|
|
1538
|
+
toKeyValuePair(): KeyValuePair;
|
|
1539
|
+
static fromKeyValuePair(pair: KeyValuePair): AuthorizationToken | undefined;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
/**
|
|
1543
|
+
* Copyright 2025 The MOQtail Authors
|
|
1544
|
+
*
|
|
1545
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1546
|
+
* you may not use this file except in compliance with the License.
|
|
1547
|
+
* You may obtain a copy of the License at
|
|
1548
|
+
*
|
|
1549
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1550
|
+
*
|
|
1551
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1552
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1553
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1554
|
+
* See the License for the specific language governing permissions and
|
|
1555
|
+
* limitations under the License.
|
|
1556
|
+
*/
|
|
1557
|
+
|
|
1558
|
+
type SetupParameter = Path | MaxRequestId | MaxAuthTokenCacheSize | AuthorizationToken;
|
|
1559
|
+
declare namespace SetupParameter {
|
|
1560
|
+
function fromKeyValuePair(pair: KeyValuePair): SetupParameter | undefined;
|
|
1561
|
+
function toKeyValuePair(param: SetupParameter): KeyValuePair;
|
|
1562
|
+
function isPath(param: SetupParameter): param is Path;
|
|
1563
|
+
function isMaxRequestId(param: SetupParameter): param is MaxRequestId;
|
|
1564
|
+
function isMaxAuthTokenCacheSize(param: SetupParameter): param is MaxAuthTokenCacheSize;
|
|
1565
|
+
function isAuthorizationToken(param: SetupParameter): param is AuthorizationToken;
|
|
1566
|
+
}
|
|
1567
|
+
declare class SetupParameters {
|
|
1568
|
+
private kvps;
|
|
1569
|
+
addMaxAuthTokenCacheSize(maxSize: bigint | number): this;
|
|
1570
|
+
addMaxRequestId(maxId: bigint | number): this;
|
|
1571
|
+
addPath(moqtPath: string): this;
|
|
1572
|
+
addAuthorizationToken(auth: AuthorizationToken): this;
|
|
1573
|
+
addRaw(pair: KeyValuePair): this;
|
|
1574
|
+
build(): KeyValuePair[];
|
|
1575
|
+
static fromKeyValuePairs(kvps: KeyValuePair[]): SetupParameter[];
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
/**
|
|
1579
|
+
* Copyright 2025 The MOQtail Authors
|
|
1580
|
+
*
|
|
1581
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1582
|
+
* you may not use this file except in compliance with the License.
|
|
1583
|
+
* You may obtain a copy of the License at
|
|
1584
|
+
*
|
|
1585
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1586
|
+
*
|
|
1587
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1588
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1589
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1590
|
+
* See the License for the specific language governing permissions and
|
|
1591
|
+
* limitations under the License.
|
|
1592
|
+
*/
|
|
1593
|
+
|
|
1594
|
+
declare class DeliveryTimeout implements Parameter {
|
|
1595
|
+
readonly objectTimeout: bigint;
|
|
1596
|
+
static readonly TYPE = VersionSpecificParameterType.DeliveryTimeout;
|
|
1597
|
+
constructor(objectTimeout: bigint);
|
|
1598
|
+
toKeyValuePair(): KeyValuePair;
|
|
1599
|
+
static fromKeyValuePair(pair: KeyValuePair): DeliveryTimeout | undefined;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* Copyright 2025 The MOQtail Authors
|
|
1604
|
+
*
|
|
1605
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1606
|
+
* you may not use this file except in compliance with the License.
|
|
1607
|
+
* You may obtain a copy of the License at
|
|
1608
|
+
*
|
|
1609
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1610
|
+
*
|
|
1611
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1612
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1613
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1614
|
+
* See the License for the specific language governing permissions and
|
|
1615
|
+
* limitations under the License.
|
|
1616
|
+
*/
|
|
1617
|
+
|
|
1618
|
+
declare class MaxCacheDuration implements Parameter {
|
|
1619
|
+
readonly duration: bigint;
|
|
1620
|
+
static readonly TYPE = VersionSpecificParameterType.MaxCacheDuration;
|
|
1621
|
+
constructor(duration: bigint);
|
|
1622
|
+
toKeyValuePair(): KeyValuePair;
|
|
1623
|
+
static fromKeyValuePair(pair: KeyValuePair): MaxCacheDuration | undefined;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
/**
|
|
1627
|
+
* Copyright 2025 The MOQtail Authors
|
|
1628
|
+
*
|
|
1629
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1630
|
+
* you may not use this file except in compliance with the License.
|
|
1631
|
+
* You may obtain a copy of the License at
|
|
1632
|
+
*
|
|
1633
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1634
|
+
*
|
|
1635
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1636
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1637
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1638
|
+
* See the License for the specific language governing permissions and
|
|
1639
|
+
* limitations under the License.
|
|
1640
|
+
*/
|
|
1641
|
+
|
|
1642
|
+
type VersionSpecificParameter = MaxCacheDuration | DeliveryTimeout | AuthorizationToken;
|
|
1643
|
+
declare namespace VersionSpecificParameter {
|
|
1644
|
+
function fromKeyValuePair(pair: KeyValuePair): VersionSpecificParameter | undefined;
|
|
1645
|
+
function toKeyValuePair(param: VersionSpecificParameter): KeyValuePair;
|
|
1646
|
+
function isMaxCacheDuration(param: VersionSpecificParameter): param is MaxCacheDuration;
|
|
1647
|
+
function isDeliveryTimeout(param: VersionSpecificParameter): param is DeliveryTimeout;
|
|
1648
|
+
function isAuthorizationToken(param: VersionSpecificParameter): param is AuthorizationToken;
|
|
1649
|
+
}
|
|
1650
|
+
declare class VersionSpecificParameters {
|
|
1651
|
+
private kvps;
|
|
1652
|
+
addMaxCacheDuration(duration: bigint | number): this;
|
|
1653
|
+
addDeliveryTimeout(timeout: bigint | number): this;
|
|
1654
|
+
addAuthorizationToken(auth: AuthorizationToken): this;
|
|
1655
|
+
addRaw(pair: KeyValuePair): this;
|
|
1656
|
+
build(): KeyValuePair[];
|
|
1657
|
+
static fromKeyValuePairs(kvps: KeyValuePair[]): VersionSpecificParameter[];
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
export { UnsubscribeNamespace as $, FetchOk as A, GoAway as B, ClientSetup as C, DRAFT_14 as D, ServerSetup as E, FilterType as F, GroupOrder as G, SubscribeNamespace as H, SubscribeNamespaceError as I, SubscribeNamespaceOk as J, PublishDone as K, Publish as L, MaxRequestId$1 as M, PublishError as N, PublishOk as O, PublishNamespace as P, SubscribeError as Q, RequestsBlocked as R, Subscribe as S, TrackStatusCode as T, SubscribeOk as U, SubscribeUpdate as V, TrackStatus as W, TrackStatusError as X, TrackStatusOk as Y, PublishNamespaceDone as Z, Unsubscribe as _, PublishNamespaceError as a, FetchHeader as a0, SubgroupHeader as a1, RequestIdMap as a2, Header as a3, SetupParameter as a4, SetupParameters as a5, VersionSpecificParameter as a6, VersionSpecificParameters as a7, type Parameter as a8, CommonType as a9, commonTypeFromNumber as aa, SetupParameterType as ab, setupParameterTypeFromNumber as ac, VersionSpecificParameterType as ad, versionSpecificParameterTypeFromNumber as ae, TokenAliasType as af, tokenAliasTypeFromNumber as ag, type AuthTokenVariant as ah, AuthorizationToken as ai, MaxRequestId as aj, Path as ak, MaxAuthTokenCacheSize as al, DeliveryTimeout as am, MaxCacheDuration as an, PublishNamespaceOk as b, PublishNamespaceCancel as c, ControlMessageType as d, controlMessageTypeFromBigInt as e, PublishNamespaceErrorCode as f, filterTypeFromBigInt as g, FetchType as h, fetchTypeFromBigInt as i, groupOrderFromNumber as j, SubscribeErrorCode as k, FetchErrorCode as l, fetchErrorCodeFromBigInt as m, SubscribeNamespaceErrorCode as n, subscribeNamespaceErrorCodeFromBigInt as o, publishNamespaceErrorCodeFromBigInt as p, PublishDoneStatusCode as q, publishDoneStatusCodeFromBigInt as r, subscribeErrorCodeFromBigInt as s, trackStatusCodeFromBigInt as t, PublishErrorCode as u, publishErrorCodeFromBigInt as v, ControlMessage as w, Fetch as x, FetchCancel as y, FetchError as z };
|