moqtail 0.13.0 → 0.14.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 +43 -0
- package/dist/{client-BzncAN14.mjs → client-BW1agDFV.mjs} +1268 -686
- package/dist/{client-DahXR3l4.cjs → client-Z7egUKTO.cjs} +1240 -628
- package/dist/client.cjs +6 -1
- package/dist/client.d.cts +583 -331
- package/dist/client.d.mts +583 -331
- package/dist/client.mjs +2 -2
- package/dist/{index-C8pNnaj0.d.cts → index-DBbxKcc1.d.cts} +594 -357
- package/dist/{index-C8pNnaj0.d.mts → index-DBbxKcc1.d.mts} +594 -357
- package/dist/index.cjs +30 -16
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/model.cjs +1139 -489
- package/dist/model.d.cts +2 -2
- package/dist/model.d.mts +2 -2
- package/dist/model.mjs +1116 -475
- package/package.json +1 -1
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* - If `typeValue` is **odd**, the value is a binary blob (`Uint8Array`) with a maximum length of 65535 bytes.
|
|
8
8
|
*
|
|
9
9
|
* Use {@link KeyValuePair.tryNewVarInt} for varint pairs and {@link KeyValuePair.tryNewBytes} for blob pairs.
|
|
10
|
+
* A Type whose own namespace fixes the value encoding overrides the parity rule; see
|
|
11
|
+
* {@link KeyValuePair.newBytes}.
|
|
10
12
|
*/
|
|
11
13
|
declare class KeyValuePair {
|
|
12
14
|
/**
|
|
@@ -36,6 +38,13 @@ declare class KeyValuePair {
|
|
|
36
38
|
* @throws KeyValueFormattingError if typeValue is not even.
|
|
37
39
|
*/
|
|
38
40
|
static tryNewVarInt(typeValue: bigint | number, value: bigint | number): KeyValuePair;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a varint KeyValuePair for a Type whose namespace defines a numeric value
|
|
43
|
+
* regardless of parity. Prefer {@link KeyValuePair.tryNewVarInt}.
|
|
44
|
+
* @param typeValue - The key/type identifier; parity is not checked.
|
|
45
|
+
* @param value - The varint value.
|
|
46
|
+
*/
|
|
47
|
+
static newVarInt(typeValue: bigint | number, value: bigint | number): KeyValuePair;
|
|
39
48
|
/**
|
|
40
49
|
* Creates a new blob KeyValuePair.
|
|
41
50
|
* @param typeValue - Must be odd.
|
|
@@ -45,6 +54,14 @@ declare class KeyValuePair {
|
|
|
45
54
|
* @throws LengthExceedsMaxError if value length exceeds 65535 bytes.
|
|
46
55
|
*/
|
|
47
56
|
static tryNewBytes(typeValue: bigint | number, value: Uint8Array): KeyValuePair;
|
|
57
|
+
/**
|
|
58
|
+
* Creates a blob KeyValuePair for a Type whose namespace defines a byte-string
|
|
59
|
+
* value regardless of parity. Prefer {@link KeyValuePair.tryNewBytes}.
|
|
60
|
+
* @param typeValue - The key/type identifier; parity is not checked.
|
|
61
|
+
* @param value - The binary blob value.
|
|
62
|
+
* @throws LengthExceedsMaxError if value length exceeds 65535 bytes.
|
|
63
|
+
*/
|
|
64
|
+
static newBytes(typeValue: bigint | number, value: Uint8Array): KeyValuePair;
|
|
48
65
|
/**
|
|
49
66
|
* Serializes this key-value pair to a frozen byte buffer.
|
|
50
67
|
* Equivalent to {@link KeyValuePair.serializeDelta} with `prevType = 0n`.
|
|
@@ -86,6 +103,13 @@ declare class KeyValuePair {
|
|
|
86
103
|
* @param typeValue - The already-decoded Type.
|
|
87
104
|
*/
|
|
88
105
|
static deserializeValue(buf: BaseByteBuffer, typeValue: bigint): KeyValuePair;
|
|
106
|
+
/**
|
|
107
|
+
* Reads a length-prefixed byte-string Value, independent of Type parity.
|
|
108
|
+
* @param buf - The buffer to read from.
|
|
109
|
+
* @param typeValue - The already-decoded Type.
|
|
110
|
+
* @throws LengthExceedsMaxError if the length exceeds 65535 bytes.
|
|
111
|
+
*/
|
|
112
|
+
static deserializeBytesValue(buf: BaseByteBuffer, typeValue: bigint): KeyValuePair;
|
|
89
113
|
/**
|
|
90
114
|
* Checks if this pair is equal to another.
|
|
91
115
|
* @param other - The other KeyValuePair.
|
|
@@ -108,7 +132,7 @@ declare function deserializeKvpList(buf: BaseByteBuffer, count: number | bigint)
|
|
|
108
132
|
*/
|
|
109
133
|
declare function deserializeKvpListUntilEmpty(buf: BaseByteBuffer): KeyValuePair[];
|
|
110
134
|
/**
|
|
111
|
-
* Checks if the KeyValuePair
|
|
135
|
+
* Checks if the KeyValuePair carries a varint value.
|
|
112
136
|
* @param pair - The KeyValuePair to check.
|
|
113
137
|
* @returns True if value is a varint.
|
|
114
138
|
*/
|
|
@@ -116,7 +140,7 @@ declare function isVarInt(pair: KeyValuePair): pair is KeyValuePair & {
|
|
|
116
140
|
value: bigint;
|
|
117
141
|
};
|
|
118
142
|
/**
|
|
119
|
-
* Checks if the KeyValuePair
|
|
143
|
+
* Checks if the KeyValuePair carries a blob value.
|
|
120
144
|
* @param pair - The KeyValuePair to check.
|
|
121
145
|
* @returns True if value is a Uint8Array.
|
|
122
146
|
*/
|
|
@@ -347,7 +371,7 @@ declare class ReasonPhrase {
|
|
|
347
371
|
*/
|
|
348
372
|
/**
|
|
349
373
|
* @public
|
|
350
|
-
* Object datagram types for MOQT objects
|
|
374
|
+
* Object datagram types for MOQT objects.
|
|
351
375
|
*
|
|
352
376
|
* Type bit layout (form 0b00X0XXXX):
|
|
353
377
|
* - Bit 0 (0x01): PROPERTIES - Properties field present
|
|
@@ -635,7 +659,7 @@ declare namespace ObjectStatus {
|
|
|
635
659
|
//#endregion
|
|
636
660
|
//#region src/model/data/datagram.d.ts
|
|
637
661
|
/**
|
|
638
|
-
* Represents a unified OBJECT_DATAGRAM message
|
|
662
|
+
* Represents a unified OBJECT_DATAGRAM message.
|
|
639
663
|
*
|
|
640
664
|
* Type bit layout (form 0b00X0XXXX):
|
|
641
665
|
* - Bit 0 (0x01): PROPERTIES
|
|
@@ -701,18 +725,7 @@ declare class FetchHeader {
|
|
|
701
725
|
declare const SUPPORTED_VERSIONS: string[];
|
|
702
726
|
/**
|
|
703
727
|
* @public
|
|
704
|
-
* Control message types
|
|
705
|
-
*
|
|
706
|
-
* The comment on each member is the Stream column: `Control` is the control stream
|
|
707
|
-
* (§3.3), `Request` a bidirectional request stream, and `First` means the message MUST
|
|
708
|
-
* be the first on a new request stream.
|
|
709
|
-
*
|
|
710
|
-
* Table 5 reserves `0x01` (SETUP for version 00), `0x40`/`0x41` (CLIENT_SETUP /
|
|
711
|
-
* SERVER_SETUP for versions 10 and below) and `0x20`/`0x21` (CLIENT_SETUP /
|
|
712
|
-
* SERVER_SETUP for versions 16 and below — folded into Setup by #256). All five stay
|
|
713
|
-
* in the enum as documentation, but `tryFrom` rejects every RESERVED codepoint, which
|
|
714
|
-
* is what §10 requires — an endpoint receiving an unknown message type MUST close the
|
|
715
|
-
* session.
|
|
728
|
+
* Control message types.
|
|
716
729
|
*/
|
|
717
730
|
declare enum ControlMessageType {
|
|
718
731
|
ReservedSetupV00 = 1,
|
|
@@ -761,9 +774,7 @@ declare enum ControlMessageType {
|
|
|
761
774
|
// Request, First
|
|
762
775
|
PublishOk = 30,
|
|
763
776
|
// Request; an alias of RequestOk (§10.5), not its own body
|
|
764
|
-
|
|
765
|
-
// Request
|
|
766
|
-
Switch = 34
|
|
777
|
+
PublishSkipped = 15
|
|
767
778
|
}
|
|
768
779
|
/**
|
|
769
780
|
* Converts a bigint value to a ControlMessageType enum.
|
|
@@ -790,40 +801,37 @@ declare namespace ControlMessageType {
|
|
|
790
801
|
}
|
|
791
802
|
/**
|
|
792
803
|
* @public
|
|
793
|
-
*
|
|
794
|
-
*/
|
|
795
|
-
declare enum
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
/**
|
|
802
|
-
|
|
804
|
+
* Which fields of a LOCATION_FILTER follow its type, and how they are read.
|
|
805
|
+
*/
|
|
806
|
+
declare enum LocationFilterType {
|
|
807
|
+
/** No filter: every Object passes. */
|
|
808
|
+
None = 0,
|
|
809
|
+
/** Starts StartGroup groups before the Next Group. */
|
|
810
|
+
RelativeStart = 1,
|
|
811
|
+
AbsoluteStart = 2,
|
|
812
|
+
/** Ends with the last Object of the End Group. */
|
|
813
|
+
AbsoluteStartGroupEnd = 3,
|
|
814
|
+
/** Ends with End Object of the End Group. */
|
|
815
|
+
AbsoluteRange = 4,
|
|
816
|
+
/** Starts at the Object after the Largest Object. */
|
|
817
|
+
NextObject = 5
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Converts a bigint value to a LocationFilterType enum.
|
|
803
821
|
* @param v - The bigint value.
|
|
804
|
-
* @returns The corresponding
|
|
805
|
-
* @throws InvalidEnumValue if the value is not a valid
|
|
822
|
+
* @returns The corresponding LocationFilterType.
|
|
823
|
+
* @throws InvalidEnumValue if the value is not a valid Location Filter Type.
|
|
806
824
|
*/
|
|
807
|
-
declare namespace
|
|
808
|
-
function tryFrom(v: bigint):
|
|
825
|
+
declare namespace LocationFilterType {
|
|
826
|
+
function tryFrom(v: bigint): LocationFilterType;
|
|
809
827
|
}
|
|
810
828
|
/**
|
|
811
829
|
* @public
|
|
812
|
-
*
|
|
813
|
-
*/
|
|
814
|
-
declare enum FetchType {
|
|
815
|
-
Standalone = 1,
|
|
816
|
-
Relative = 2,
|
|
817
|
-
Absolute = 3
|
|
818
|
-
}
|
|
819
|
-
/**
|
|
820
|
-
* Converts a bigint value to a FetchType enum.
|
|
821
|
-
* @param v - The bigint value.
|
|
822
|
-
* @returns The corresponding FetchType.
|
|
823
|
-
* @throws InvalidEnumValue if the value is not a valid fetch type.
|
|
830
|
+
* Switch modes for subscription switching requests.
|
|
824
831
|
*/
|
|
825
|
-
declare
|
|
826
|
-
|
|
832
|
+
declare enum SwitchMode {
|
|
833
|
+
Hard = 0,
|
|
834
|
+
Soft = 1
|
|
827
835
|
}
|
|
828
836
|
/**
|
|
829
837
|
* @public
|
|
@@ -871,7 +879,6 @@ declare enum PublishDoneStatusCode {
|
|
|
871
879
|
InternalError = 0,
|
|
872
880
|
Unauthorized = 1,
|
|
873
881
|
TrackEnded = 2,
|
|
874
|
-
SubscriptionEnded = 3,
|
|
875
882
|
GoingAway = 4,
|
|
876
883
|
TooFarBehind = 5,
|
|
877
884
|
Expired = 6,
|
|
@@ -912,13 +919,14 @@ declare enum RequestErrorCode {
|
|
|
912
919
|
DoesNotExist = 16,
|
|
913
920
|
InvalidRange = 17,
|
|
914
921
|
MalformedTrack = 18,
|
|
915
|
-
DuplicateSubscription = 25,
|
|
916
922
|
Uninterested = 32,
|
|
917
923
|
PrefixOverlap = 48,
|
|
918
924
|
NamespaceTooLarge = 49,
|
|
919
|
-
|
|
925
|
+
InvalidSwitch = 50,
|
|
920
926
|
UnsupportedExtension = 51,
|
|
921
|
-
Redirect = 52
|
|
927
|
+
Redirect = 52,
|
|
928
|
+
ConflictingFilters = 53,
|
|
929
|
+
InvalidFilter = 54
|
|
922
930
|
}
|
|
923
931
|
/**
|
|
924
932
|
* Converts a bigint value to a RequestErrorCode enum.
|
|
@@ -989,7 +997,7 @@ declare const MAX_FULL_TRACK_NAME_LENGTH = 4096;
|
|
|
989
997
|
* Fully-qualified track identifier = hierarchical namespace (tuple) + leaf name bytes.
|
|
990
998
|
*
|
|
991
999
|
* Constraints enforced (throws {@link TrackNameError}):
|
|
992
|
-
* - Namespace tuple field count: 0 .. {@link MAX_NAMESPACE_TUPLE_COUNT} (
|
|
1000
|
+
* - Namespace tuple field count: 0 .. {@link MAX_NAMESPACE_TUPLE_COUNT} (an empty namespace is legal).
|
|
993
1001
|
* - Total serialized length (namespace tuple + raw name bytes) less than or equals {@link MAX_FULL_TRACK_NAME_LENGTH} bytes.
|
|
994
1002
|
*
|
|
995
1003
|
* Namespace input may be:
|
|
@@ -1083,7 +1091,7 @@ declare class MoqtObject {
|
|
|
1083
1091
|
static newWithPayload(fullTrackName: FullTrackName, location: Location, publisherPriority: number, objectForwardingPreference: ObjectForwardingPreference, subgroupId: bigint | number | null, properties: KeyValuePair[] | null, payload: Uint8Array): MoqtObject;
|
|
1084
1092
|
static newWithStatus(fullTrackName: FullTrackName, location: Location, publisherPriority: number, objectForwardingPreference: ObjectForwardingPreference, subgroupId: bigint | number | null, properties: KeyValuePair[] | null, objectStatus: ObjectStatus): MoqtObject;
|
|
1085
1093
|
/**
|
|
1086
|
-
* Create a MoqtObject from a Datagram
|
|
1094
|
+
* Create a MoqtObject from a Datagram.
|
|
1087
1095
|
* @param datagram - The received Datagram.
|
|
1088
1096
|
* @param fullTrackName - The resolved full track name.
|
|
1089
1097
|
* @param defaultPriority - The default publisher priority from the control message (used when DEFAULT_PRIORITY bit is set).
|
|
@@ -1098,7 +1106,7 @@ declare class MoqtObject {
|
|
|
1098
1106
|
static fromFetchObject(fetchObject: FetchObject, fullTrackName: FullTrackName): MoqtObject;
|
|
1099
1107
|
static fromSubgroupObject(subgroupObject: SubgroupObject, groupId: bigint | number, publisherPriority: number | undefined, subgroupId: bigint | number | null, fullTrackName: FullTrackName): MoqtObject;
|
|
1100
1108
|
/**
|
|
1101
|
-
* Convert to Datagram for wire transmission
|
|
1109
|
+
* Convert to Datagram for wire transmission.
|
|
1102
1110
|
* Automatically creates a payload or status Datagram based on the object's state.
|
|
1103
1111
|
* @param trackAlias - The track alias to use.
|
|
1104
1112
|
* @param endOfGroup - Whether this is the last object in the group (only for payload datagrams).
|
|
@@ -1266,8 +1274,7 @@ declare class ByteBuffer extends BaseByteBuffer {
|
|
|
1266
1274
|
putU16(v: number): void;
|
|
1267
1275
|
/**
|
|
1268
1276
|
/**
|
|
1269
|
-
* Encode a MOQT
|
|
1270
|
-
* See section 1.4.1 https://datatracker.ietf.org/doc/draft-ietf-moq-transport/
|
|
1277
|
+
* Encode a MOQT varint using the minimal length.
|
|
1271
1278
|
*/
|
|
1272
1279
|
putVI(v: bigint | number): void;
|
|
1273
1280
|
putBytes(src: Uint8Array): void;
|
|
@@ -1285,24 +1292,22 @@ declare class FrozenByteBuffer extends BaseByteBuffer {
|
|
|
1285
1292
|
get length(): number;
|
|
1286
1293
|
}
|
|
1287
1294
|
//#endregion
|
|
1288
|
-
//#region src/model/control/
|
|
1295
|
+
//#region src/model/control/publish_skipped.d.ts
|
|
1289
1296
|
/**
|
|
1290
1297
|
* @public
|
|
1291
|
-
*
|
|
1292
|
-
* would start a subscription to a track under a SUBSCRIBE_TRACKS namespace
|
|
1293
|
-
* is blocked by the peer's bidirectional stream limit. It MUST NOT send PUBLISH for
|
|
1294
|
-
* that track until the limit lifts (§10.20).
|
|
1298
|
+
* PUBLISH_SKIPPED (0xF): a publisher tells the peer it cannot send the PUBLISH that
|
|
1299
|
+
* would start a subscription to a track under a SUBSCRIBE_TRACKS namespace.
|
|
1295
1300
|
*
|
|
1296
1301
|
* Sent on the SUBSCRIBE_TRACKS response stream, so only the namespace suffix after that
|
|
1297
1302
|
* subscription's prefix is carried.
|
|
1298
1303
|
*/
|
|
1299
|
-
declare class
|
|
1304
|
+
declare class PublishSkipped {
|
|
1300
1305
|
readonly trackNamespaceSuffix: Tuple;
|
|
1301
1306
|
readonly trackName: Uint8Array;
|
|
1302
1307
|
constructor(trackNamespaceSuffix: Tuple, trackName: Uint8Array);
|
|
1303
1308
|
getType(): ControlMessageType;
|
|
1304
1309
|
serialize(): FrozenByteBuffer;
|
|
1305
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
1310
|
+
static parsePayload(buf: BaseByteBuffer): PublishSkipped;
|
|
1306
1311
|
}
|
|
1307
1312
|
//#endregion
|
|
1308
1313
|
//#region src/model/parameter/constant.d.ts
|
|
@@ -1325,9 +1330,11 @@ declare enum SetupOptionType {
|
|
|
1325
1330
|
Path = 1,
|
|
1326
1331
|
AuthorizationToken = 3,
|
|
1327
1332
|
MaxAuthTokenCacheSize = 4,
|
|
1328
|
-
/** Raw-QUIC only. Client-only; MUST NOT be sent over WebTransport
|
|
1333
|
+
/** Raw-QUIC only. Client-only; MUST NOT be sent over WebTransport. */
|
|
1329
1334
|
Authority = 5,
|
|
1335
|
+
MaxFilterRanges = 6,
|
|
1330
1336
|
MoqtImplementation = 7,
|
|
1337
|
+
MaxRequestUpdates = 8,
|
|
1331
1338
|
/**
|
|
1332
1339
|
* PROVISIONAL: sender-side track switching is not an adopted extension, so this
|
|
1333
1340
|
* codepoint is absent from the registry the conformance fixture tracks. It sits in the
|
|
@@ -1346,8 +1353,15 @@ declare enum MessageParameterType {
|
|
|
1346
1353
|
FillTimeout = 10,
|
|
1347
1354
|
Forward = 16,
|
|
1348
1355
|
SubscriberPriority = 32,
|
|
1349
|
-
|
|
1356
|
+
LocationFilter = 33,
|
|
1350
1357
|
GroupOrder = 34,
|
|
1358
|
+
FillParameters = 35,
|
|
1359
|
+
SwitchFrom = 36,
|
|
1360
|
+
SubgroupFilter = 37,
|
|
1361
|
+
ObjectIdFilter = 38,
|
|
1362
|
+
PriorityFilter = 39,
|
|
1363
|
+
ObjectPropertyFilter = 40,
|
|
1364
|
+
TrackPropertyFilter = 41,
|
|
1351
1365
|
NewGroupRequest = 50,
|
|
1352
1366
|
/**
|
|
1353
1367
|
* Registered codepoint with no typed parameter yet: its consumer is REQUEST_UPDATE for
|
|
@@ -1355,6 +1369,7 @@ declare enum MessageParameterType {
|
|
|
1355
1369
|
* varint its even Type implies.
|
|
1356
1370
|
*/
|
|
1357
1371
|
TrackNamespacePrefix = 52,
|
|
1372
|
+
IncludeProperties = 53,
|
|
1358
1373
|
/**
|
|
1359
1374
|
* PROVISIONAL: sender-side track switching is not an adopted extension, so this
|
|
1360
1375
|
* codepoint is absent from the registry the conformance fixture tracks; see its
|
|
@@ -1488,6 +1503,22 @@ declare class Forward implements Parameter {
|
|
|
1488
1503
|
static fromKeyValuePair(pair: KeyValuePair): Forward | undefined;
|
|
1489
1504
|
}
|
|
1490
1505
|
//#endregion
|
|
1506
|
+
//#region src/model/parameter/message/include_properties.d.ts
|
|
1507
|
+
/**
|
|
1508
|
+
* Whether the response carries Track Properties: the OK answering a SUBSCRIBE,
|
|
1509
|
+
* TRACK_STATUS or FETCH, or each PUBLISH a SUBSCRIBE_TRACKS brings. With 0 the
|
|
1510
|
+
* Track Properties field is still there, but empty.
|
|
1511
|
+
* Allowed wire values: 0 or 1; any other value is a PROTOCOL_VIOLATION.
|
|
1512
|
+
* Default (when omitted) is 1 (include them).
|
|
1513
|
+
*/
|
|
1514
|
+
declare class IncludeProperties implements Parameter {
|
|
1515
|
+
readonly include: boolean;
|
|
1516
|
+
static readonly TYPE = MessageParameterType.IncludeProperties;
|
|
1517
|
+
constructor(include: boolean);
|
|
1518
|
+
toKeyValuePair(): KeyValuePair;
|
|
1519
|
+
static fromKeyValuePair(pair: KeyValuePair): IncludeProperties | undefined;
|
|
1520
|
+
}
|
|
1521
|
+
//#endregion
|
|
1491
1522
|
//#region src/model/parameter/message/group_order_param.d.ts
|
|
1492
1523
|
/**
|
|
1493
1524
|
* How to prioritize Objects from different groups (Ascending=0x1 or Descending=0x2).
|
|
@@ -1569,7 +1600,7 @@ interface MoqtFragment {
|
|
|
1569
1600
|
}
|
|
1570
1601
|
/**
|
|
1571
1602
|
* @public
|
|
1572
|
-
* A parsed `moqt://authority/path[?query][#fragment]` URI
|
|
1603
|
+
* A parsed `moqt://authority/path[?query][#fragment]` URI.
|
|
1573
1604
|
*
|
|
1574
1605
|
* `moqt-URI = "moqt" "://" authority path-abempty [ "?" query ]`, with an optional
|
|
1575
1606
|
* local-only fragment. `authority` is `host[:port]`; `path` keeps its leading `/`
|
|
@@ -1665,7 +1696,7 @@ declare class NewGroupRequest implements Parameter {
|
|
|
1665
1696
|
*
|
|
1666
1697
|
* PROVISIONAL: sender-side track switching is not an adopted extension, so
|
|
1667
1698
|
* this parameter has no codepoint in the registry the conformance fixture
|
|
1668
|
-
* tracks (`dev/conformance/
|
|
1699
|
+
* tracks (`dev/conformance/draft22`) and is never asserted against it. Id 0 is
|
|
1669
1700
|
* the default allocation every implementation runs; other ids select an
|
|
1670
1701
|
* algorithm specific to one implementation.
|
|
1671
1702
|
*/
|
|
@@ -1706,24 +1737,330 @@ declare class SubscriberPriority implements Parameter {
|
|
|
1706
1737
|
static fromKeyValuePair(pair: KeyValuePair): SubscriberPriority | undefined;
|
|
1707
1738
|
}
|
|
1708
1739
|
//#endregion
|
|
1709
|
-
//#region src/model/parameter/message/
|
|
1740
|
+
//#region src/model/parameter/message/location_filter.d.ts
|
|
1710
1741
|
/**
|
|
1711
|
-
*
|
|
1712
|
-
*
|
|
1742
|
+
* The range of Locations a subscription or fetch selects. The Location Filter
|
|
1743
|
+
* Type decides which fields are set, and the value is not length-prefixed.
|
|
1744
|
+
*
|
|
1745
|
+
* Every Group here is absolute, except `startGroup` of a
|
|
1746
|
+
* {@link (LocationFilterType:enum).RelativeStart}, which counts back from the Next
|
|
1747
|
+
* Group: 0 is the Next Group, 1 the current one. The wire carries the End Group
|
|
1748
|
+
* as a delta from the Start Group; that is undone on the way in and redone on
|
|
1749
|
+
* the way out.
|
|
1750
|
+
*
|
|
1751
|
+
* If omitted from SUBSCRIBE or FETCH, the subscription or fetch is unfiltered.
|
|
1713
1752
|
* If omitted from REQUEST_UPDATE, the value is unchanged.
|
|
1714
1753
|
*/
|
|
1715
|
-
declare class
|
|
1716
|
-
readonly filterType:
|
|
1717
|
-
readonly
|
|
1754
|
+
declare class LocationFilter implements Parameter {
|
|
1755
|
+
readonly filterType: LocationFilterType;
|
|
1756
|
+
readonly startGroup?: bigint | undefined;
|
|
1757
|
+
readonly startObject?: bigint | undefined;
|
|
1718
1758
|
readonly endGroup?: bigint | undefined;
|
|
1719
|
-
|
|
1720
|
-
|
|
1759
|
+
readonly endObject?: bigint | undefined;
|
|
1760
|
+
static readonly TYPE = MessageParameterType.LocationFilter;
|
|
1761
|
+
/**
|
|
1762
|
+
* @throws :{@link ProtocolViolationError} When a field the type calls for is
|
|
1763
|
+
* missing, or the End Group is before the Start Group.
|
|
1764
|
+
*/
|
|
1765
|
+
constructor(filterType: LocationFilterType, startGroup?: bigint | undefined, startObject?: bigint | undefined, endGroup?: bigint | undefined, endObject?: bigint | undefined);
|
|
1766
|
+
/**
|
|
1767
|
+
* The first Location the filter passes, given the track's Largest Object, or
|
|
1768
|
+
* `undefined` when there is no filter. A relative start that would fall before
|
|
1769
|
+
* group 0 is group 0; a track with nothing published yet starts a relative
|
|
1770
|
+
* filter at `{0,0}`.
|
|
1771
|
+
*/
|
|
1772
|
+
startLocation(largest?: Location): Location | undefined;
|
|
1773
|
+
/** The Start Location an absolute filter carries; `undefined` for the others. */
|
|
1774
|
+
get absoluteStart(): Location | undefined;
|
|
1775
|
+
/**
|
|
1776
|
+
* The last Location the filter passes, inclusive, or `undefined` when it is
|
|
1777
|
+
* open-ended. A Group End is the whole of that group, so its Object is 2^64-1.
|
|
1778
|
+
*/
|
|
1779
|
+
endLocation(): Location | undefined;
|
|
1780
|
+
/**
|
|
1781
|
+
* The inclusive range the filter selects under the rules for a Fetch, which
|
|
1782
|
+
* never reach past the Largest Object: an open end is the Largest Object, and
|
|
1783
|
+
* no filter at all is the whole track up to it.
|
|
1784
|
+
*
|
|
1785
|
+
* `undefined` when that range is empty, which includes a track with nothing
|
|
1786
|
+
* published yet and a Next Object filter, whose start is always past the
|
|
1787
|
+
* Largest Object.
|
|
1788
|
+
*/
|
|
1789
|
+
fetchRange(largest?: Location): {
|
|
1790
|
+
start: Location;
|
|
1791
|
+
end: Location;
|
|
1792
|
+
} | undefined;
|
|
1793
|
+
/** The Location Filter Type and its fields, without the Parameter Type. */
|
|
1794
|
+
serializeValue(): Uint8Array;
|
|
1795
|
+
/**
|
|
1796
|
+
* Reads a Location Filter Type and exactly the fields it calls for.
|
|
1797
|
+
* @throws :{@link ProtocolViolationError} For an unknown Location Filter Type,
|
|
1798
|
+
* or an End Group past 2^64-1.
|
|
1799
|
+
*/
|
|
1800
|
+
static deserializeValue(buf: BaseByteBuffer): LocationFilter;
|
|
1801
|
+
toKeyValuePair(): KeyValuePair;
|
|
1802
|
+
static fromKeyValuePair(pair: KeyValuePair): LocationFilter | undefined;
|
|
1803
|
+
}
|
|
1804
|
+
//#endregion
|
|
1805
|
+
//#region src/model/parameter/message/switch_from.d.ts
|
|
1806
|
+
/**
|
|
1807
|
+
* Identifies the subscription being replaced by a switch request.
|
|
1808
|
+
* The value is two varints followed by a flags byte: bit 7 (MSB) is Publish Done;
|
|
1809
|
+
* bits 0 through 6 are reserved and must be zero.
|
|
1810
|
+
*/
|
|
1811
|
+
declare class SwitchFrom implements Parameter {
|
|
1812
|
+
readonly requestId: bigint;
|
|
1813
|
+
readonly mode: SwitchMode;
|
|
1814
|
+
readonly publishDone: boolean;
|
|
1815
|
+
static readonly TYPE = MessageParameterType.SwitchFrom;
|
|
1816
|
+
constructor(requestId: bigint, mode: SwitchMode, publishDone: boolean);
|
|
1721
1817
|
toKeyValuePair(): KeyValuePair;
|
|
1722
|
-
static fromKeyValuePair(pair: KeyValuePair):
|
|
1818
|
+
static fromKeyValuePair(pair: KeyValuePair): SwitchFrom | undefined;
|
|
1819
|
+
}
|
|
1820
|
+
//#endregion
|
|
1821
|
+
//#region src/model/parameter/message/fill_parameters.d.ts
|
|
1822
|
+
/**
|
|
1823
|
+
* Requests a fill fetch stream, and overrides for it. An omitted parameter keeps
|
|
1824
|
+
* the value it has for the live subscription; an omitted LOCATION_FILTER fills
|
|
1825
|
+
* over the subscription's own.
|
|
1826
|
+
*/
|
|
1827
|
+
declare class FillParameters implements Parameter {
|
|
1828
|
+
readonly parameters: MessageParameter[];
|
|
1829
|
+
static readonly TYPE = MessageParameterType.FillParameters;
|
|
1830
|
+
constructor(parameters: MessageParameter[]);
|
|
1831
|
+
toKeyValuePair(): KeyValuePair;
|
|
1832
|
+
static fromKeyValuePair(pair: KeyValuePair): FillParameters | undefined;
|
|
1833
|
+
}
|
|
1834
|
+
//#endregion
|
|
1835
|
+
//#region src/model/error/error.d.ts
|
|
1836
|
+
/**
|
|
1837
|
+
* Copyright 2025 The MOQtail Authors
|
|
1838
|
+
*
|
|
1839
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1840
|
+
* you may not use this file except in compliance with the License.
|
|
1841
|
+
* You may obtain a copy of the License at
|
|
1842
|
+
*
|
|
1843
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1844
|
+
*
|
|
1845
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1846
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1847
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1848
|
+
* See the License for the specific language governing permissions and
|
|
1849
|
+
* limitations under the License.
|
|
1850
|
+
*/
|
|
1851
|
+
/**
|
|
1852
|
+
* Base class for all MOQtail errors.
|
|
1853
|
+
*/
|
|
1854
|
+
declare class MOQtailError extends Error {
|
|
1855
|
+
constructor(cause?: string);
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* Not enough bytes in buffer to satisfy a read.
|
|
1859
|
+
*/
|
|
1860
|
+
declare class NotEnoughBytesError extends MOQtailError {
|
|
1861
|
+
context: string;
|
|
1862
|
+
needed: number;
|
|
1863
|
+
available: number;
|
|
1864
|
+
constructor(context: string, needed: number, available: number);
|
|
1865
|
+
}
|
|
1866
|
+
/**
|
|
1867
|
+
* Cannot cast between two incompatible types.
|
|
1868
|
+
*/
|
|
1869
|
+
declare class CastingError extends MOQtailError {
|
|
1870
|
+
context: string;
|
|
1871
|
+
fromType: string;
|
|
1872
|
+
toType: string;
|
|
1873
|
+
details: string;
|
|
1874
|
+
constructor(context: string, fromType: string, toType: string, details: string);
|
|
1875
|
+
}
|
|
1876
|
+
/**
|
|
1877
|
+
* Value too large to encode as varint.
|
|
1878
|
+
*/
|
|
1879
|
+
declare class VarIntOverflowError extends MOQtailError {
|
|
1880
|
+
context: string;
|
|
1881
|
+
value: number;
|
|
1882
|
+
constructor(context: string, value: number);
|
|
1883
|
+
}
|
|
1884
|
+
/**
|
|
1885
|
+
* Length exceeds maximum allowed by protocol.
|
|
1886
|
+
*/
|
|
1887
|
+
declare class LengthExceedsMaxError extends MOQtailError {
|
|
1888
|
+
context: string;
|
|
1889
|
+
max: number;
|
|
1890
|
+
len: number;
|
|
1891
|
+
constructor(context: string, max: number, len: number);
|
|
1892
|
+
}
|
|
1893
|
+
/**
|
|
1894
|
+
* Key/value formatting error.
|
|
1895
|
+
*/
|
|
1896
|
+
declare class KeyValueFormattingError extends MOQtailError {
|
|
1897
|
+
context: string;
|
|
1898
|
+
constructor(context: string);
|
|
1899
|
+
}
|
|
1900
|
+
/**
|
|
1901
|
+
* Invalid discriminant or type tag.
|
|
1902
|
+
*/
|
|
1903
|
+
declare class InvalidTypeError extends MOQtailError {
|
|
1904
|
+
context: string;
|
|
1905
|
+
details: string;
|
|
1906
|
+
constructor(context: string, details: string);
|
|
1907
|
+
}
|
|
1908
|
+
/**
|
|
1909
|
+
* Invalid enum discriminant / value encountered when mapping to a protocol enum.
|
|
1910
|
+
*/
|
|
1911
|
+
declare class InvalidEnumValue extends MOQtailError {
|
|
1912
|
+
context: string;
|
|
1913
|
+
value: bigint | number;
|
|
1914
|
+
constructor(context: string, value: bigint | number);
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Invalid UTF-8 encountered in a string or bytes field.
|
|
1918
|
+
*/
|
|
1919
|
+
declare class InvalidUTF8Error extends MOQtailError {
|
|
1920
|
+
context: string;
|
|
1921
|
+
details: string;
|
|
1922
|
+
constructor(context: string, details: string);
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* Generic protocol violation.
|
|
1926
|
+
*/
|
|
1927
|
+
declare class ProtocolViolationError extends MOQtailError {
|
|
1928
|
+
context: string;
|
|
1929
|
+
details: string;
|
|
1930
|
+
constructor(context: string, details: string);
|
|
1931
|
+
}
|
|
1932
|
+
/**
|
|
1933
|
+
* Track naming error.
|
|
1934
|
+
*/
|
|
1935
|
+
declare class TrackNameError extends MOQtailError {
|
|
1936
|
+
context: string;
|
|
1937
|
+
details: string;
|
|
1938
|
+
constructor(context: string, details: string);
|
|
1939
|
+
}
|
|
1940
|
+
/**
|
|
1941
|
+
* Request ID error.
|
|
1942
|
+
*/
|
|
1943
|
+
declare class RequestIdError extends MOQtailError {
|
|
1944
|
+
context: string;
|
|
1945
|
+
details: string;
|
|
1946
|
+
constructor(context: string, details: string);
|
|
1947
|
+
}
|
|
1948
|
+
/**
|
|
1949
|
+
* Operation timed out.
|
|
1950
|
+
*/
|
|
1951
|
+
declare class TimeoutError extends MOQtailError {
|
|
1952
|
+
context: string;
|
|
1953
|
+
constructor(context: string);
|
|
1954
|
+
}
|
|
1955
|
+
/**
|
|
1956
|
+
* Internal error.
|
|
1957
|
+
*/
|
|
1958
|
+
declare class InternalError extends MOQtailError {
|
|
1959
|
+
context: string;
|
|
1960
|
+
details: string;
|
|
1961
|
+
constructor(context: string, details: string);
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Connection terminated.
|
|
1965
|
+
*/
|
|
1966
|
+
declare class TerminationError extends MOQtailError {
|
|
1967
|
+
context: string;
|
|
1968
|
+
terminationCode: number;
|
|
1969
|
+
constructor(context: string, terminationCode: number);
|
|
1970
|
+
}
|
|
1971
|
+
//#endregion
|
|
1972
|
+
//#region src/model/parameter/message/range_filter.d.ts
|
|
1973
|
+
/**
|
|
1974
|
+
* What a Range Filter selects on. Each kind is its own parameter type, and the two
|
|
1975
|
+
* property kinds also name the Property they read.
|
|
1976
|
+
*/
|
|
1977
|
+
declare enum RangeFilterKind {
|
|
1978
|
+
Subgroup = 37,
|
|
1979
|
+
ObjectId = 38,
|
|
1980
|
+
/** Publisher Priority, which is a single byte. */
|
|
1981
|
+
Priority = 39,
|
|
1982
|
+
ObjectProperty = 40,
|
|
1983
|
+
/** Selects tracks rather than Objects, so it only rides SUBSCRIBE_TRACKS. */
|
|
1984
|
+
TrackProperty = 41
|
|
1985
|
+
}
|
|
1986
|
+
declare namespace RangeFilterKind {
|
|
1987
|
+
/** Whether the filter carries a Property Type after its SetID. */
|
|
1988
|
+
function hasPropertyType(kind: RangeFilterKind): boolean;
|
|
1989
|
+
function isRangeFilterType(typeValue: bigint | number): boolean;
|
|
1990
|
+
}
|
|
1991
|
+
/** An inclusive range of values. An open-ended range has no `end`. */
|
|
1992
|
+
interface Range {
|
|
1993
|
+
readonly start: bigint;
|
|
1994
|
+
readonly end?: bigint;
|
|
1995
|
+
}
|
|
1996
|
+
/**
|
|
1997
|
+
* A Range as the wire carries it: the Start as a delta from the End before it, the
|
|
1998
|
+
* End as a delta from its own Start.
|
|
1999
|
+
*/
|
|
2000
|
+
type RangeDelta = readonly [start: bigint, end?: bigint];
|
|
2001
|
+
/**
|
|
2002
|
+
* A Range Filter that cannot be honoured. A peer that sends one is answered with
|
|
2003
|
+
* REQUEST_ERROR INVALID_FILTER rather than a closed session: the request is
|
|
2004
|
+
* well-formed, it just asks for something that cannot be applied.
|
|
2005
|
+
*/
|
|
2006
|
+
declare class InvalidFilterError extends MOQtailError {
|
|
2007
|
+
readonly context: string;
|
|
2008
|
+
readonly details: string;
|
|
2009
|
+
constructor(context: string, details: string);
|
|
2010
|
+
}
|
|
2011
|
+
/**
|
|
2012
|
+
* Delta-encodes ascending `ranges`. Only the last may be open-ended.
|
|
2013
|
+
* @throws :{@link InvalidFilterError} When the ranges do not ascend.
|
|
2014
|
+
*/
|
|
2015
|
+
declare function encodeRanges(ranges: readonly Range[]): RangeDelta[];
|
|
2016
|
+
/**
|
|
2017
|
+
* One Range Filter parameter. Unlike other parameters it may repeat in a message,
|
|
2018
|
+
* once per SetID (and Property Type).
|
|
2019
|
+
*
|
|
2020
|
+
* Without a `setId` it is the zero-length form, which in REQUEST_UPDATE removes the
|
|
2021
|
+
* filters of its kind.
|
|
2022
|
+
*
|
|
2023
|
+
* The Ranges are held as the wire's deltas and only added back by {@link
|
|
2024
|
+
* RangeFilter.ranges}: a sum past 2^64-1 is answered with a REQUEST_ERROR for the
|
|
2025
|
+
* request that carried it, which a parser that rejected it could not do.
|
|
2026
|
+
*/
|
|
2027
|
+
declare class RangeFilter implements Parameter {
|
|
2028
|
+
readonly kind: RangeFilterKind;
|
|
2029
|
+
readonly setId?: number | undefined;
|
|
2030
|
+
readonly propertyType?: bigint | undefined;
|
|
2031
|
+
readonly deltas: readonly RangeDelta[];
|
|
2032
|
+
/**
|
|
2033
|
+
* @throws :{@link ProtocolViolationError} When the Property Type's presence does not
|
|
2034
|
+
* match the kind, or a removal carries anything but its kind.
|
|
2035
|
+
*/
|
|
2036
|
+
constructor(kind: RangeFilterKind, setId?: number | undefined, propertyType?: bigint | undefined, deltas?: readonly RangeDelta[]);
|
|
2037
|
+
/** The zero-length form, which removes the filters of its kind. */
|
|
2038
|
+
get isRemoval(): boolean;
|
|
2039
|
+
/** How many Ranges the filter holds, which is what a peer's range limit counts. */
|
|
2040
|
+
get rangeCount(): number;
|
|
2041
|
+
/**
|
|
2042
|
+
* The Ranges with their deltas added back.
|
|
2043
|
+
* @throws :{@link InvalidFilterError} When a bound exceeds 2^64-1.
|
|
2044
|
+
*/
|
|
2045
|
+
ranges(): Range[];
|
|
2046
|
+
/**
|
|
2047
|
+
* The Ranges, once everything a filter of this kind has to satisfy holds.
|
|
2048
|
+
* @throws :{@link InvalidFilterError} For an odd Property Type, a priority above
|
|
2049
|
+
* 255, or a bound past 2^64-1.
|
|
2050
|
+
*/
|
|
2051
|
+
validate(): Range[];
|
|
2052
|
+
/** The SetID, Property Type if any, and the Ranges, without the Type or Length. */
|
|
2053
|
+
serializeValue(): Uint8Array;
|
|
2054
|
+
toKeyValuePair(): KeyValuePair;
|
|
2055
|
+
/**
|
|
2056
|
+
* Decodes a Range Filter value. The Value ends with the last Range, so a Start
|
|
2057
|
+
* with nothing after it is an open-ended last Range.
|
|
2058
|
+
*/
|
|
2059
|
+
static fromKeyValuePair(pair: KeyValuePair): RangeFilter | undefined;
|
|
1723
2060
|
}
|
|
1724
2061
|
//#endregion
|
|
1725
2062
|
//#region src/model/parameter/message_parameter.d.ts
|
|
1726
|
-
type MessageParameter = ObjectDeliveryTimeout | SubgroupDeliveryTimeout | RendezvousTimeout | FillTimeout | AuthorizationToken | Expires | LargestObject | Forward | SubscriberPriority | GroupOrderParam |
|
|
2063
|
+
type MessageParameter = ObjectDeliveryTimeout | SubgroupDeliveryTimeout | RendezvousTimeout | FillTimeout | AuthorizationToken | Expires | LargestObject | Forward | SubscriberPriority | GroupOrderParam | LocationFilter | NewGroupRequest | SwitchFrom | FillParameters | RangeFilter | IncludeProperties | SwitchingSetAssignment;
|
|
1727
2064
|
declare namespace MessageParameter {
|
|
1728
2065
|
/**
|
|
1729
2066
|
* Parses a single KeyValuePair into a MessageParameter.
|
|
@@ -1745,8 +2082,30 @@ declare namespace MessageParameter {
|
|
|
1745
2082
|
function isSwitchingSetAssignment(param: MessageParameter): param is SwitchingSetAssignment;
|
|
1746
2083
|
/** The negotiated Group Order, or {@link (GroupOrder:enum).Original} when unparameterized. */
|
|
1747
2084
|
function groupOrderOf(params: readonly MessageParameter[]): GroupOrder;
|
|
1748
|
-
function
|
|
2085
|
+
function isLocationFilter(param: MessageParameter): param is LocationFilter;
|
|
1749
2086
|
function isNewGroupRequest(param: MessageParameter): param is NewGroupRequest;
|
|
2087
|
+
function isSwitchFrom(param: MessageParameter): param is SwitchFrom;
|
|
2088
|
+
function isFillParameters(param: MessageParameter): param is FillParameters;
|
|
2089
|
+
function isRangeFilter(param: MessageParameter): param is RangeFilter;
|
|
2090
|
+
/**
|
|
2091
|
+
* Whether `params` carry a Range Filter, either directly or inside FILL_PARAMETERS,
|
|
2092
|
+
* removals included. An endpoint that allows no filter ranges rejects any of them.
|
|
2093
|
+
*/
|
|
2094
|
+
function carriesRangeFilter(params: readonly MessageParameter[]): boolean;
|
|
2095
|
+
function isIncludeProperties(param: MessageParameter): param is IncludeProperties;
|
|
2096
|
+
/**
|
|
2097
|
+
* The parameters a PUBLISH answering a SUBSCRIBE_TRACKS states: the request's
|
|
2098
|
+
* settings that a PUBLISH can carry (FORWARD, GROUP_ORDER, LOCATION_FILTER), which
|
|
2099
|
+
* are the new subscription's initial settings. AUTHORIZATION_TOKEN is never copied.
|
|
2100
|
+
* The Range Filters, FILL_PARAMETERS and INCLUDE_PROPERTIES cannot go in a PUBLISH;
|
|
2101
|
+
* they are the publisher's to apply.
|
|
2102
|
+
*/
|
|
2103
|
+
function publishParametersFor(subscribeTracks: readonly MessageParameter[]): MessageParameter[];
|
|
2104
|
+
/**
|
|
2105
|
+
* Whether a request's response should carry Track Properties: false only when it
|
|
2106
|
+
* has INCLUDE_PROPERTIES set to 0.
|
|
2107
|
+
*/
|
|
2108
|
+
function includesProperties(params: readonly MessageParameter[]): boolean;
|
|
1750
2109
|
}
|
|
1751
2110
|
/**
|
|
1752
2111
|
* Builder for constructing a list of MessageParameters.
|
|
@@ -1762,10 +2121,14 @@ declare class MessageParameters {
|
|
|
1762
2121
|
addAuthorizationToken(token: AuthorizationToken): this;
|
|
1763
2122
|
addExpires(expires: bigint | number): this;
|
|
1764
2123
|
addForward(forward: boolean): this;
|
|
2124
|
+
addIncludeProperties(include: boolean): this;
|
|
1765
2125
|
addSubscriberPriority(priority: number): this;
|
|
1766
2126
|
addGroupOrder(order: GroupOrderParam['order']): this;
|
|
1767
|
-
|
|
2127
|
+
addLocationFilter(filter: LocationFilter): this;
|
|
1768
2128
|
addNewGroupRequest(group: bigint | number): this;
|
|
2129
|
+
addSwitchFrom(requestId: bigint | number, mode: SwitchMode, publishDone: boolean): this;
|
|
2130
|
+
addFillParameters(parameters: MessageParameter[]): this;
|
|
2131
|
+
addRangeFilter(filter: RangeFilter): this;
|
|
1769
2132
|
build(): MessageParameter[];
|
|
1770
2133
|
/**
|
|
1771
2134
|
* Parses an array of KeyValuePairs into a list of MessageParameters.
|
|
@@ -1786,8 +2149,12 @@ declare function serializeMessageParameterKvps(items: KeyValuePair[]): FrozenByt
|
|
|
1786
2149
|
declare function deserializeMessageParameterKvps(buf: BaseByteBuffer, count: number | bigint): KeyValuePair[];
|
|
1787
2150
|
/**
|
|
1788
2151
|
* Applies a set of parameter updates to an existing parameter list.
|
|
1789
|
-
*
|
|
1790
|
-
*
|
|
2152
|
+
*
|
|
2153
|
+
* A Type the update leaves out keeps its value. A Type it carries is replaced
|
|
2154
|
+
* outright, every instance of it: a Range Filter can repeat, and an update that
|
|
2155
|
+
* names a filter kind states the whole of that kind, so one left over from before
|
|
2156
|
+
* would quietly widen or narrow what the subscriber asked for. A zero-length Range
|
|
2157
|
+
* Filter replaces its kind with nothing.
|
|
1791
2158
|
*/
|
|
1792
2159
|
declare function applyMessageParameterUpdate(current: MessageParameter[], updates: MessageParameter[]): void;
|
|
1793
2160
|
//#endregion
|
|
@@ -1866,11 +2233,10 @@ declare class NamespaceDone {
|
|
|
1866
2233
|
//#endregion
|
|
1867
2234
|
//#region src/model/control/setup.d.ts
|
|
1868
2235
|
/**
|
|
1869
|
-
* The first message each endpoint sends on its control stream
|
|
2236
|
+
* The first message each endpoint sends on its control stream.
|
|
1870
2237
|
*
|
|
1871
2238
|
* Both peers send the same message; there are no separate client and server forms and
|
|
1872
|
-
* no version fields, since version negotiation happens over ALPN
|
|
1873
|
-
* CLIENT_SETUP / SERVER_SETUP.
|
|
2239
|
+
* no version fields, since version negotiation happens over ALPN.
|
|
1874
2240
|
*
|
|
1875
2241
|
* Some options are client-only (see {@link SetupOptionType}); whether a peer is
|
|
1876
2242
|
* allowed to send a given option depends on which side it is and on the transport,
|
|
@@ -1888,47 +2254,14 @@ declare class Setup {
|
|
|
1888
2254
|
//#region src/model/control/fetch.d.ts
|
|
1889
2255
|
declare class Fetch {
|
|
1890
2256
|
readonly requestId: bigint;
|
|
1891
|
-
readonly
|
|
1892
|
-
readonly type: FetchType.Standalone;
|
|
1893
|
-
readonly props: {
|
|
1894
|
-
fullTrackName: FullTrackName;
|
|
1895
|
-
startLocation: Location;
|
|
1896
|
-
endLocation: Location;
|
|
1897
|
-
};
|
|
1898
|
-
} | {
|
|
1899
|
-
readonly type: FetchType.Relative;
|
|
1900
|
-
readonly props: {
|
|
1901
|
-
joiningRequestId: bigint;
|
|
1902
|
-
joiningStart: bigint;
|
|
1903
|
-
};
|
|
1904
|
-
} | {
|
|
1905
|
-
readonly type: FetchType.Absolute;
|
|
1906
|
-
readonly props: {
|
|
1907
|
-
joiningRequestId: bigint;
|
|
1908
|
-
joiningStart: bigint;
|
|
1909
|
-
};
|
|
1910
|
-
};
|
|
2257
|
+
readonly fullTrackName: FullTrackName;
|
|
1911
2258
|
readonly parameters: MessageParameter[];
|
|
1912
|
-
constructor(requestId: bigint,
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
};
|
|
1919
|
-
} | {
|
|
1920
|
-
readonly type: FetchType.Relative;
|
|
1921
|
-
readonly props: {
|
|
1922
|
-
joiningRequestId: bigint;
|
|
1923
|
-
joiningStart: bigint;
|
|
1924
|
-
};
|
|
1925
|
-
} | {
|
|
1926
|
-
readonly type: FetchType.Absolute;
|
|
1927
|
-
readonly props: {
|
|
1928
|
-
joiningRequestId: bigint;
|
|
1929
|
-
joiningStart: bigint;
|
|
1930
|
-
};
|
|
1931
|
-
}, parameters: MessageParameter[]);
|
|
2259
|
+
constructor(requestId: bigint, fullTrackName: FullTrackName, parameters: MessageParameter[]);
|
|
2260
|
+
/**
|
|
2261
|
+
* The requested range. A FETCH without a LOCATION_FILTER parameter asks for the
|
|
2262
|
+
* whole track up to the Largest Object, the same as a {@link (LocationFilterType:enum).None} filter.
|
|
2263
|
+
*/
|
|
2264
|
+
get locationFilter(): LocationFilter;
|
|
1932
2265
|
getType(): ControlMessageType;
|
|
1933
2266
|
serialize(): FrozenByteBuffer;
|
|
1934
2267
|
static parsePayload(buf: BaseByteBuffer): Fetch;
|
|
@@ -1980,11 +2313,8 @@ interface PropertyRange {
|
|
|
1980
2313
|
}
|
|
1981
2314
|
/**
|
|
1982
2315
|
* @public
|
|
1983
|
-
* Registration-policy ranges for the Property Type space
|
|
2316
|
+
* Registration-policy ranges for the Property Type space.
|
|
1984
2317
|
*
|
|
1985
|
-
* §2.5 gives the 1-byte application-specific range as `0x38-0x3F`; that is stale text
|
|
1986
|
-
* from before draft-18's varint change, which made the 1-byte space `0x00-0x7F`.
|
|
1987
|
-
* §15.8 is the correct table and is what these constants follow.
|
|
1988
2318
|
*/
|
|
1989
2319
|
declare const PropertyRanges: {
|
|
1990
2320
|
/** Standards Action or IESG Approval (1-byte encoding). */readonly StandardsAction: {
|
|
@@ -2098,10 +2428,13 @@ declare namespace TrackProperty {
|
|
|
2098
2428
|
*/
|
|
2099
2429
|
declare class FetchOk {
|
|
2100
2430
|
readonly endOfTrack: boolean;
|
|
2431
|
+
/** The last Location the response covers, inclusive. Object 2^64-1 is all of that group. */
|
|
2101
2432
|
readonly endLocation: Location;
|
|
2102
2433
|
readonly parameters: MessageParameter[];
|
|
2103
2434
|
readonly trackProperties: TrackProperty[];
|
|
2104
|
-
constructor(endOfTrack: boolean,
|
|
2435
|
+
constructor(endOfTrack: boolean, /** The last Location the response covers, inclusive. Object 2^64-1 is all of that group. */
|
|
2436
|
+
|
|
2437
|
+
endLocation: Location, parameters: MessageParameter[], trackProperties?: TrackProperty[]);
|
|
2105
2438
|
getType(): ControlMessageType;
|
|
2106
2439
|
serialize(): FrozenByteBuffer;
|
|
2107
2440
|
static parsePayload(buf: BaseByteBuffer): FetchOk;
|
|
@@ -2112,7 +2445,7 @@ declare class FetchOk {
|
|
|
2112
2445
|
declare const MAX_NEW_SESSION_URI_LENGTH = 8192;
|
|
2113
2446
|
/**
|
|
2114
2447
|
* GOAWAY (0x10) winds down a session, or — on a request stream — migrates that one
|
|
2115
|
-
* request
|
|
2448
|
+
* request.
|
|
2116
2449
|
*/
|
|
2117
2450
|
declare class GoAway {
|
|
2118
2451
|
newSessionUri?: string | undefined;
|
|
@@ -2122,12 +2455,7 @@ declare class GoAway {
|
|
|
2122
2455
|
* on a request stream it resets the stream with `GOING_AWAY`.
|
|
2123
2456
|
*/
|
|
2124
2457
|
readonly timeout: bigint;
|
|
2125
|
-
|
|
2126
|
-
* The smallest peer Request ID that was not or might not have been processed. Present
|
|
2127
|
-
* only on the control stream, so a GOAWAY migrating a single request omits it.
|
|
2128
|
-
*/
|
|
2129
|
-
readonly requestId?: bigint | undefined;
|
|
2130
|
-
constructor(newSessionUri?: string, timeout?: bigint, requestId?: bigint);
|
|
2458
|
+
constructor(newSessionUri?: string, timeout?: bigint);
|
|
2131
2459
|
getType(): ControlMessageType;
|
|
2132
2460
|
serialize(): FrozenByteBuffer;
|
|
2133
2461
|
static parsePayload(buf: BaseByteBuffer): GoAway;
|
|
@@ -2138,11 +2466,7 @@ declare class Subscribe {
|
|
|
2138
2466
|
requestId: bigint;
|
|
2139
2467
|
fullTrackName: FullTrackName;
|
|
2140
2468
|
parameters: MessageParameter[];
|
|
2141
|
-
|
|
2142
|
-
static newNextGroupStart(requestId: bigint, fullTrackName: FullTrackName, parameters: MessageParameter[]): Subscribe;
|
|
2143
|
-
static newLatestObject(requestId: bigint, fullTrackName: FullTrackName, parameters: MessageParameter[]): Subscribe;
|
|
2144
|
-
static newAbsoluteStart(requestId: bigint, fullTrackName: FullTrackName, startLocation: Location, parameters: MessageParameter[]): Subscribe;
|
|
2145
|
-
static newAbsoluteRange(requestId: bigint, fullTrackName: FullTrackName, startLocation: Location, endGroup: bigint, parameters: MessageParameter[]): Subscribe;
|
|
2469
|
+
constructor(requestId: bigint, fullTrackName: FullTrackName, parameters: MessageParameter[]);
|
|
2146
2470
|
getType(): ControlMessageType;
|
|
2147
2471
|
serialize(): FrozenByteBuffer;
|
|
2148
2472
|
static parsePayload(buf: BaseByteBuffer): Subscribe;
|
|
@@ -2153,6 +2477,11 @@ declare class PublishDone {
|
|
|
2153
2477
|
readonly statusCode: PublishDoneStatusCode;
|
|
2154
2478
|
readonly streamCount: bigint;
|
|
2155
2479
|
readonly errorReason: ReasonPhrase;
|
|
2480
|
+
/**
|
|
2481
|
+
* The Stream Count a publisher sends when it cannot name the exact number of streams
|
|
2482
|
+
* it opened. Receivers fall back on a timeout to end the subscription.
|
|
2483
|
+
*/
|
|
2484
|
+
static readonly UNKNOWN_STREAM_COUNT: bigint;
|
|
2156
2485
|
constructor(statusCode: PublishDoneStatusCode, streamCount: bigint, errorReason: ReasonPhrase);
|
|
2157
2486
|
static new(statusCode: PublishDoneStatusCode, streamCount: bigint, errorReason: ReasonPhrase): PublishDone;
|
|
2158
2487
|
getType(): ControlMessageType;
|
|
@@ -2209,15 +2538,9 @@ declare class TrackStatus {
|
|
|
2209
2538
|
subscriberPriority: number;
|
|
2210
2539
|
groupOrder: GroupOrder;
|
|
2211
2540
|
forward: boolean;
|
|
2212
|
-
|
|
2213
|
-
startLocation: Location | undefined;
|
|
2214
|
-
endGroup: bigint | undefined;
|
|
2541
|
+
locationFilter: LocationFilter;
|
|
2215
2542
|
subscribeParameters: MessageParameter[];
|
|
2216
|
-
|
|
2217
|
-
static newNextGroupStart(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, subscribeParameters: MessageParameter[]): TrackStatus;
|
|
2218
|
-
static newLatestObject(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, subscribeParameters: MessageParameter[]): TrackStatus;
|
|
2219
|
-
static newAbsoluteStart(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, subscribeParameters: MessageParameter[]): TrackStatus;
|
|
2220
|
-
static newAbsoluteRange(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, endGroup: bigint, subscribeParameters: MessageParameter[]): TrackStatus;
|
|
2543
|
+
constructor(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, locationFilter: LocationFilter, subscribeParameters: MessageParameter[]);
|
|
2221
2544
|
getType(): ControlMessageType;
|
|
2222
2545
|
serialize(): FrozenByteBuffer;
|
|
2223
2546
|
static parsePayload(buf: BaseByteBuffer): TrackStatus;
|
|
@@ -2252,18 +2575,6 @@ declare class SubscribeTracks {
|
|
|
2252
2575
|
static parsePayload(buf: BaseByteBuffer): SubscribeTracks;
|
|
2253
2576
|
}
|
|
2254
2577
|
//#endregion
|
|
2255
|
-
//#region src/model/control/switch.d.ts
|
|
2256
|
-
declare class Switch {
|
|
2257
|
-
requestId: bigint;
|
|
2258
|
-
fullTrackName: FullTrackName;
|
|
2259
|
-
subscriptionRequestId: bigint;
|
|
2260
|
-
parameters: KeyValuePair[];
|
|
2261
|
-
constructor(requestId: bigint, fullTrackName: FullTrackName, subscriptionRequestId: bigint, parameters: KeyValuePair[]);
|
|
2262
|
-
getType(): ControlMessageType;
|
|
2263
|
-
serialize(): FrozenByteBuffer;
|
|
2264
|
-
static parsePayload(buf: BaseByteBuffer): Switch;
|
|
2265
|
-
}
|
|
2266
|
-
//#endregion
|
|
2267
2578
|
//#region src/model/control/request_ok.d.ts
|
|
2268
2579
|
/**
|
|
2269
2580
|
* @public
|
|
@@ -2272,13 +2583,12 @@ declare class Switch {
|
|
|
2272
2583
|
* names (PUBLISH_OK, TRACK_STATUS_OK, ...) are shorthands for logging, not distinct
|
|
2273
2584
|
* messages. SUBSCRIBE_OK (0x4) and FETCH_OK (0x18) do keep bodies of their own.
|
|
2274
2585
|
*
|
|
2275
|
-
* It carries no Request ID: the request stream it arrives on identifies the request
|
|
2276
|
-
* (§10.1).
|
|
2586
|
+
* It carries no Request ID: the request stream it arrives on identifies the request.
|
|
2277
2587
|
*/
|
|
2278
2588
|
declare class RequestOk {
|
|
2279
2589
|
readonly parameters: MessageParameter[];
|
|
2280
2590
|
/**
|
|
2281
|
-
*
|
|
2591
|
+
* Track Properties, which the trailing bytes of the payload carry with no
|
|
2282
2592
|
* count of their own. Populated only in TRACK_STATUS_OK; empty for every other request
|
|
2283
2593
|
* type — see {@link RequestOk.validateTrackProperties}.
|
|
2284
2594
|
*/
|
|
@@ -2324,12 +2634,58 @@ declare class RequestError {
|
|
|
2324
2634
|
}
|
|
2325
2635
|
//#endregion
|
|
2326
2636
|
//#region src/model/control/control_message.d.ts
|
|
2327
|
-
type ControlMessage = Publish |
|
|
2637
|
+
type ControlMessage = Publish | PublishSkipped | PublishDone | PublishNamespace | Namespace | NamespaceDone | Setup | Fetch | FetchOk | GoAway | Subscribe | RequestError | SubscribeOk | RequestUpdate | TrackStatus | SubscribeNamespace | SubscribeTracks | RequestOk;
|
|
2328
2638
|
declare namespace ControlMessage {
|
|
2329
2639
|
function deserialize(buf: FrozenByteBuffer): ControlMessage;
|
|
2330
2640
|
function serialize(msg: ControlMessage): FrozenByteBuffer;
|
|
2331
2641
|
}
|
|
2332
2642
|
//#endregion
|
|
2643
|
+
//#region src/model/error/stream_reset.d.ts
|
|
2644
|
+
/**
|
|
2645
|
+
* Copyright 2026 The MOQtail Authors
|
|
2646
|
+
*
|
|
2647
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2648
|
+
* you may not use this file except in compliance with the License.
|
|
2649
|
+
* You may obtain a copy of the License at
|
|
2650
|
+
*
|
|
2651
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2652
|
+
*
|
|
2653
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2654
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2655
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2656
|
+
* See the License for the specific language governing permissions and
|
|
2657
|
+
* limitations under the License.
|
|
2658
|
+
*/
|
|
2659
|
+
/**
|
|
2660
|
+
* @public
|
|
2661
|
+
* Codes carried when resetting a request stream or sending STOP_SENDING on one.
|
|
2662
|
+
*
|
|
2663
|
+
* A separate registry from {@link (RequestErrorCode:enum)}, which disagrees with it on
|
|
2664
|
+
* the same names: `GOING_AWAY` is `0x4` here but `0x6` there.
|
|
2665
|
+
*/
|
|
2666
|
+
declare enum StreamResetCode {
|
|
2667
|
+
InternalError = 0,
|
|
2668
|
+
Cancelled = 1,
|
|
2669
|
+
DeliveryTimeout = 2,
|
|
2670
|
+
SessionClosed = 3,
|
|
2671
|
+
GoingAway = 4,
|
|
2672
|
+
TooFarBehind = 5,
|
|
2673
|
+
UnknownObjectStatus = 6,
|
|
2674
|
+
ExpiredAuthToken = 7,
|
|
2675
|
+
ExcessiveLoad = 9,
|
|
2676
|
+
MalformedTrack = 18
|
|
2677
|
+
}
|
|
2678
|
+
declare namespace StreamResetCode {
|
|
2679
|
+
/**
|
|
2680
|
+
* Converts a numeric application error code to a StreamResetCode. The code is a
|
|
2681
|
+
* `number` because that is what the transport reports it as
|
|
2682
|
+
* (`WebTransportError.streamErrorCode`, an `unsigned long`).
|
|
2683
|
+
*
|
|
2684
|
+
* @throws :{@link InvalidEnumValue} if the code is not a defined stream reset code.
|
|
2685
|
+
*/
|
|
2686
|
+
function tryFrom(code: number): StreamResetCode;
|
|
2687
|
+
}
|
|
2688
|
+
//#endregion
|
|
2333
2689
|
//#region src/model/catalog/cmsf.d.ts
|
|
2334
2690
|
/**
|
|
2335
2691
|
* Copyright 2026 The MOQtail Authors
|
|
@@ -2381,143 +2737,6 @@ declare class CMSFCatalog {
|
|
|
2381
2737
|
private extractTrackName;
|
|
2382
2738
|
}
|
|
2383
2739
|
//#endregion
|
|
2384
|
-
//#region src/model/error/error.d.ts
|
|
2385
|
-
/**
|
|
2386
|
-
* Copyright 2025 The MOQtail Authors
|
|
2387
|
-
*
|
|
2388
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2389
|
-
* you may not use this file except in compliance with the License.
|
|
2390
|
-
* You may obtain a copy of the License at
|
|
2391
|
-
*
|
|
2392
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2393
|
-
*
|
|
2394
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2395
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2396
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2397
|
-
* See the License for the specific language governing permissions and
|
|
2398
|
-
* limitations under the License.
|
|
2399
|
-
*/
|
|
2400
|
-
/**
|
|
2401
|
-
* Base class for all MOQtail errors.
|
|
2402
|
-
*/
|
|
2403
|
-
declare class MOQtailError extends Error {
|
|
2404
|
-
constructor(cause?: string);
|
|
2405
|
-
}
|
|
2406
|
-
/**
|
|
2407
|
-
* Not enough bytes in buffer to satisfy a read.
|
|
2408
|
-
*/
|
|
2409
|
-
declare class NotEnoughBytesError extends MOQtailError {
|
|
2410
|
-
context: string;
|
|
2411
|
-
needed: number;
|
|
2412
|
-
available: number;
|
|
2413
|
-
constructor(context: string, needed: number, available: number);
|
|
2414
|
-
}
|
|
2415
|
-
/**
|
|
2416
|
-
* Cannot cast between two incompatible types.
|
|
2417
|
-
*/
|
|
2418
|
-
declare class CastingError extends MOQtailError {
|
|
2419
|
-
context: string;
|
|
2420
|
-
fromType: string;
|
|
2421
|
-
toType: string;
|
|
2422
|
-
details: string;
|
|
2423
|
-
constructor(context: string, fromType: string, toType: string, details: string);
|
|
2424
|
-
}
|
|
2425
|
-
/**
|
|
2426
|
-
* Value too large to encode as varint.
|
|
2427
|
-
*/
|
|
2428
|
-
declare class VarIntOverflowError extends MOQtailError {
|
|
2429
|
-
context: string;
|
|
2430
|
-
value: number;
|
|
2431
|
-
constructor(context: string, value: number);
|
|
2432
|
-
}
|
|
2433
|
-
/**
|
|
2434
|
-
* Length exceeds maximum allowed by protocol.
|
|
2435
|
-
*/
|
|
2436
|
-
declare class LengthExceedsMaxError extends MOQtailError {
|
|
2437
|
-
context: string;
|
|
2438
|
-
max: number;
|
|
2439
|
-
len: number;
|
|
2440
|
-
constructor(context: string, max: number, len: number);
|
|
2441
|
-
}
|
|
2442
|
-
/**
|
|
2443
|
-
* Key/value formatting error.
|
|
2444
|
-
*/
|
|
2445
|
-
declare class KeyValueFormattingError extends MOQtailError {
|
|
2446
|
-
context: string;
|
|
2447
|
-
constructor(context: string);
|
|
2448
|
-
}
|
|
2449
|
-
/**
|
|
2450
|
-
* Invalid discriminant or type tag.
|
|
2451
|
-
*/
|
|
2452
|
-
declare class InvalidTypeError extends MOQtailError {
|
|
2453
|
-
context: string;
|
|
2454
|
-
details: string;
|
|
2455
|
-
constructor(context: string, details: string);
|
|
2456
|
-
}
|
|
2457
|
-
/**
|
|
2458
|
-
* Invalid enum discriminant / value encountered when mapping to a protocol enum.
|
|
2459
|
-
*/
|
|
2460
|
-
declare class InvalidEnumValue extends MOQtailError {
|
|
2461
|
-
context: string;
|
|
2462
|
-
value: bigint | number;
|
|
2463
|
-
constructor(context: string, value: bigint | number);
|
|
2464
|
-
}
|
|
2465
|
-
/**
|
|
2466
|
-
* Invalid UTF-8 encountered in a string or bytes field.
|
|
2467
|
-
*/
|
|
2468
|
-
declare class InvalidUTF8Error extends MOQtailError {
|
|
2469
|
-
context: string;
|
|
2470
|
-
details: string;
|
|
2471
|
-
constructor(context: string, details: string);
|
|
2472
|
-
}
|
|
2473
|
-
/**
|
|
2474
|
-
* Generic protocol violation.
|
|
2475
|
-
*/
|
|
2476
|
-
declare class ProtocolViolationError extends MOQtailError {
|
|
2477
|
-
context: string;
|
|
2478
|
-
details: string;
|
|
2479
|
-
constructor(context: string, details: string);
|
|
2480
|
-
}
|
|
2481
|
-
/**
|
|
2482
|
-
* Track naming error.
|
|
2483
|
-
*/
|
|
2484
|
-
declare class TrackNameError extends MOQtailError {
|
|
2485
|
-
context: string;
|
|
2486
|
-
details: string;
|
|
2487
|
-
constructor(context: string, details: string);
|
|
2488
|
-
}
|
|
2489
|
-
/**
|
|
2490
|
-
* Request ID error.
|
|
2491
|
-
*/
|
|
2492
|
-
declare class RequestIdError extends MOQtailError {
|
|
2493
|
-
context: string;
|
|
2494
|
-
details: string;
|
|
2495
|
-
constructor(context: string, details: string);
|
|
2496
|
-
}
|
|
2497
|
-
/**
|
|
2498
|
-
* Operation timed out.
|
|
2499
|
-
*/
|
|
2500
|
-
declare class TimeoutError extends MOQtailError {
|
|
2501
|
-
context: string;
|
|
2502
|
-
constructor(context: string);
|
|
2503
|
-
}
|
|
2504
|
-
/**
|
|
2505
|
-
* Internal error.
|
|
2506
|
-
*/
|
|
2507
|
-
declare class InternalError extends MOQtailError {
|
|
2508
|
-
context: string;
|
|
2509
|
-
details: string;
|
|
2510
|
-
constructor(context: string, details: string);
|
|
2511
|
-
}
|
|
2512
|
-
/**
|
|
2513
|
-
* Connection terminated.
|
|
2514
|
-
*/
|
|
2515
|
-
declare class TerminationError extends MOQtailError {
|
|
2516
|
-
context: string;
|
|
2517
|
-
terminationCode: number;
|
|
2518
|
-
constructor(context: string, terminationCode: number);
|
|
2519
|
-
}
|
|
2520
|
-
//#endregion
|
|
2521
2740
|
//#region src/model/error/constant.d.ts
|
|
2522
2741
|
/**
|
|
2523
2742
|
* Copyright 2025 The MOQtail Authors
|
|
@@ -2549,12 +2768,12 @@ declare enum TerminationCode {
|
|
|
2549
2768
|
DATA_STREAM_TIMEOUT = 18,
|
|
2550
2769
|
AUTH_TOKEN_CACHE_OVERFLOW = 19,
|
|
2551
2770
|
DUPLICATE_AUTH_TOKEN_ALIAS = 20,
|
|
2552
|
-
VERSION_NEGOTIATION_FAILED = 21,
|
|
2553
2771
|
MALFORMED_AUTH_TOKEN = 22,
|
|
2554
2772
|
UNKNOWN_AUTH_TOKEN_ALIAS = 23,
|
|
2555
2773
|
EXPIRED_AUTH_TOKEN = 24,
|
|
2556
2774
|
INVALID_AUTHORITY = 25,
|
|
2557
|
-
MALFORMED_AUTHORITY = 26
|
|
2775
|
+
MALFORMED_AUTHORITY = 26,
|
|
2776
|
+
TOO_MANY_REQUEST_UPDATES = 27
|
|
2558
2777
|
}
|
|
2559
2778
|
declare namespace TerminationCode {
|
|
2560
2779
|
/**
|
|
@@ -2566,53 +2785,6 @@ declare namespace TerminationCode {
|
|
|
2566
2785
|
function tryFrom(code: number): TerminationCode;
|
|
2567
2786
|
}
|
|
2568
2787
|
//#endregion
|
|
2569
|
-
//#region src/model/error/stream_reset.d.ts
|
|
2570
|
-
/**
|
|
2571
|
-
* Copyright 2026 The MOQtail Authors
|
|
2572
|
-
*
|
|
2573
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2574
|
-
* you may not use this file except in compliance with the License.
|
|
2575
|
-
* You may obtain a copy of the License at
|
|
2576
|
-
*
|
|
2577
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2578
|
-
*
|
|
2579
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2580
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2581
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2582
|
-
* See the License for the specific language governing permissions and
|
|
2583
|
-
* limitations under the License.
|
|
2584
|
-
*/
|
|
2585
|
-
/**
|
|
2586
|
-
* @public
|
|
2587
|
-
* Codes carried when resetting a request stream or sending STOP_SENDING on one, per
|
|
2588
|
-
* draft-18 §3.3.3.
|
|
2589
|
-
*
|
|
2590
|
-
* A separate registry from {@link (RequestErrorCode:enum)}, which disagrees with it on
|
|
2591
|
-
* the same names: `GOING_AWAY` is `0x4` here but `0x6` there.
|
|
2592
|
-
*/
|
|
2593
|
-
declare enum StreamResetCode {
|
|
2594
|
-
InternalError = 0,
|
|
2595
|
-
Cancelled = 1,
|
|
2596
|
-
DeliveryTimeout = 2,
|
|
2597
|
-
SessionClosed = 3,
|
|
2598
|
-
GoingAway = 4,
|
|
2599
|
-
TooFarBehind = 5,
|
|
2600
|
-
UnknownObjectStatus = 6,
|
|
2601
|
-
ExpiredAuthToken = 7,
|
|
2602
|
-
ExcessiveLoad = 9,
|
|
2603
|
-
MalformedTrack = 18
|
|
2604
|
-
}
|
|
2605
|
-
declare namespace StreamResetCode {
|
|
2606
|
-
/**
|
|
2607
|
-
* Converts a numeric application error code to a StreamResetCode. The code is a
|
|
2608
|
-
* `number` because that is what the transport reports it as
|
|
2609
|
-
* (`WebTransportError.streamErrorCode`, an `unsigned long`).
|
|
2610
|
-
*
|
|
2611
|
-
* @throws :{@link InvalidEnumValue} if the code is not a defined stream reset code.
|
|
2612
|
-
*/
|
|
2613
|
-
function tryFrom(code: number): StreamResetCode;
|
|
2614
|
-
}
|
|
2615
|
-
//#endregion
|
|
2616
2788
|
//#region src/model/property/timestamp.d.ts
|
|
2617
2789
|
declare class Timestamp {
|
|
2618
2790
|
readonly timestamp: bigint;
|
|
@@ -2741,7 +2913,7 @@ declare class MaxAuthTokenCacheSize implements Parameter {
|
|
|
2741
2913
|
//#region src/model/parameter/setup/authority.d.ts
|
|
2742
2914
|
/**
|
|
2743
2915
|
* Raw-QUIC only: the authority component of the `moqt://` URI, carried in SETUP because
|
|
2744
|
-
* there is no HTTP CONNECT to carry it
|
|
2916
|
+
* there is no HTTP CONNECT to carry it.
|
|
2745
2917
|
*
|
|
2746
2918
|
* Client-only; MUST NOT be sent by a server or over WebTransport. moqtail-ts always
|
|
2747
2919
|
* connects over WebTransport, so its own handshake never sends this — see
|
|
@@ -2755,10 +2927,24 @@ declare class Authority implements Parameter {
|
|
|
2755
2927
|
static fromKeyValuePair(pair: KeyValuePair): Authority | undefined;
|
|
2756
2928
|
}
|
|
2757
2929
|
//#endregion
|
|
2930
|
+
//#region src/model/parameter/setup/max_filter_ranges.d.ts
|
|
2931
|
+
/**
|
|
2932
|
+
* Limits the total number of Ranges the peer may have across all Range filter parameters
|
|
2933
|
+
* of a single subscription or fetch. Zero, the default when absent, means the peer may
|
|
2934
|
+
* not send Range filters at all.
|
|
2935
|
+
*/
|
|
2936
|
+
declare class MaxFilterRanges implements Parameter {
|
|
2937
|
+
readonly value: bigint;
|
|
2938
|
+
static readonly TYPE = SetupOptionType.MaxFilterRanges;
|
|
2939
|
+
constructor(value: bigint);
|
|
2940
|
+
toKeyValuePair(): KeyValuePair;
|
|
2941
|
+
static fromKeyValuePair(pair: KeyValuePair): MaxFilterRanges | undefined;
|
|
2942
|
+
}
|
|
2943
|
+
//#endregion
|
|
2758
2944
|
//#region src/model/parameter/setup/moqt_implementation.d.ts
|
|
2759
2945
|
/**
|
|
2760
|
-
* Free-form implementation identification string, e.g. for logging and debugging
|
|
2761
|
-
*
|
|
2946
|
+
* Free-form implementation identification string, e.g. for logging and debugging.
|
|
2947
|
+
* Either peer may send it.
|
|
2762
2948
|
*/
|
|
2763
2949
|
declare class MoqtImplementation implements Parameter {
|
|
2764
2950
|
readonly info: string;
|
|
@@ -2768,13 +2954,27 @@ declare class MoqtImplementation implements Parameter {
|
|
|
2768
2954
|
static fromKeyValuePair(pair: KeyValuePair): MoqtImplementation | undefined;
|
|
2769
2955
|
}
|
|
2770
2956
|
//#endregion
|
|
2957
|
+
//#region src/model/parameter/setup/max_request_updates.d.ts
|
|
2958
|
+
/**
|
|
2959
|
+
* Maximum number of outstanding REQUEST_UPDATEs per request stream: an update counts
|
|
2960
|
+
* until its REQUEST_OK or REQUEST_ERROR arrives. Zero, the default when absent, means
|
|
2961
|
+
* no limit. Receiving one past the limit closes the session with TOO_MANY_REQUEST_UPDATES.
|
|
2962
|
+
*/
|
|
2963
|
+
declare class MaxRequestUpdates implements Parameter {
|
|
2964
|
+
readonly value: bigint;
|
|
2965
|
+
static readonly TYPE = SetupOptionType.MaxRequestUpdates;
|
|
2966
|
+
constructor(value: bigint);
|
|
2967
|
+
toKeyValuePair(): KeyValuePair;
|
|
2968
|
+
static fromKeyValuePair(pair: KeyValuePair): MaxRequestUpdates | undefined;
|
|
2969
|
+
}
|
|
2970
|
+
//#endregion
|
|
2771
2971
|
//#region src/model/parameter/setup/ssts_algorithms.d.ts
|
|
2772
2972
|
/**
|
|
2773
2973
|
* The sender-side track switching (SSTS) algorithms this endpoint supports.
|
|
2774
2974
|
*
|
|
2775
2975
|
* PROVISIONAL: sender-side track switching is not an adopted extension, so
|
|
2776
2976
|
* this option has no codepoint in the registry the conformance fixture tracks
|
|
2777
|
-
* (`dev/conformance/
|
|
2977
|
+
* (`dev/conformance/draft22`) and is never asserted against it. An empty list
|
|
2778
2978
|
* — or the absence of the option — prohibits the use of SSTS.
|
|
2779
2979
|
*/
|
|
2780
2980
|
declare class SstsAlgorithms implements Parameter {
|
|
@@ -2786,7 +2986,7 @@ declare class SstsAlgorithms implements Parameter {
|
|
|
2786
2986
|
}
|
|
2787
2987
|
//#endregion
|
|
2788
2988
|
//#region src/model/parameter/setup_option.d.ts
|
|
2789
|
-
type SetupOption = Path | MaxAuthTokenCacheSize | AuthorizationToken | Authority | MoqtImplementation | SstsAlgorithms;
|
|
2989
|
+
type SetupOption = Path | MaxAuthTokenCacheSize | AuthorizationToken | Authority | MaxFilterRanges | MoqtImplementation | MaxRequestUpdates | SstsAlgorithms;
|
|
2790
2990
|
declare namespace SetupOption {
|
|
2791
2991
|
function fromKeyValuePair(pair: KeyValuePair): SetupOption | undefined;
|
|
2792
2992
|
function toKeyValuePair(param: SetupOption): KeyValuePair;
|
|
@@ -2794,6 +2994,8 @@ declare namespace SetupOption {
|
|
|
2794
2994
|
function isMaxAuthTokenCacheSize(param: SetupOption): param is MaxAuthTokenCacheSize;
|
|
2795
2995
|
function isAuthorizationToken(param: SetupOption): param is AuthorizationToken;
|
|
2796
2996
|
function isAuthority(param: SetupOption): param is Authority;
|
|
2997
|
+
function isMaxFilterRanges(param: SetupOption): param is MaxFilterRanges;
|
|
2998
|
+
function isMaxRequestUpdates(param: SetupOption): param is MaxRequestUpdates;
|
|
2797
2999
|
function isMoqtImplementation(param: SetupOption): param is MoqtImplementation;
|
|
2798
3000
|
function isSstsAlgorithms(param: SetupOption): param is SstsAlgorithms;
|
|
2799
3001
|
}
|
|
@@ -2804,6 +3006,8 @@ declare class SetupOptions {
|
|
|
2804
3006
|
addMaxAuthTokenCacheSize(maxSize: bigint | number): this;
|
|
2805
3007
|
addPath(moqtPath: string): this;
|
|
2806
3008
|
addAuthorizationToken(auth: AuthorizationToken): this;
|
|
3009
|
+
addMaxFilterRanges(value: bigint | number): this;
|
|
3010
|
+
addMaxRequestUpdates(value: bigint | number): this;
|
|
2807
3011
|
addMoqtImplementation(info: string): this;
|
|
2808
3012
|
addSstsAlgorithms(algorithms: (bigint | number)[]): this;
|
|
2809
3013
|
addRaw(pair: KeyValuePair): this;
|
|
@@ -2811,4 +3015,37 @@ declare class SetupOptions {
|
|
|
2811
3015
|
static fromKeyValuePairs(kvps: KeyValuePair[]): SetupOption[];
|
|
2812
3016
|
}
|
|
2813
3017
|
//#endregion
|
|
2814
|
-
|
|
3018
|
+
//#region src/model/parameter/message/combined_filter.d.ts
|
|
3019
|
+
/**
|
|
3020
|
+
* The object filter a request's Range Filters add up to.
|
|
3021
|
+
*
|
|
3022
|
+
* Ranges within one filter are OR'd, filters sharing a SetID are AND'd, and the
|
|
3023
|
+
* SetIDs are OR'd with each other. No filter at all passes every Object.
|
|
3024
|
+
*/
|
|
3025
|
+
declare class CombinedFilter {
|
|
3026
|
+
#private;
|
|
3027
|
+
/** How many Ranges the filters hold, which is what a range limit counts. */
|
|
3028
|
+
readonly rangeCount: number;
|
|
3029
|
+
/**
|
|
3030
|
+
* Builds the filter from every Range Filter in `params`; anything else, and a
|
|
3031
|
+
* zero-length removal, is ignored.
|
|
3032
|
+
*
|
|
3033
|
+
* @throws :{@link InvalidFilterError} For a filter that cannot be applied: one
|
|
3034
|
+
* that repeats a Type, SetID and Property Type already given, one with an odd
|
|
3035
|
+
* Property Type, a priority above 255 or a bound past 2^64-1, or a track filter,
|
|
3036
|
+
* which selects tracks rather than Objects.
|
|
3037
|
+
*/
|
|
3038
|
+
constructor(params: readonly MessageParameter[]);
|
|
3039
|
+
/** Whether the filter passes everything. */
|
|
3040
|
+
get isEmpty(): boolean;
|
|
3041
|
+
/**
|
|
3042
|
+
* Whether `obj` passes.
|
|
3043
|
+
*
|
|
3044
|
+
* @param subgroupId - The Subgroup ID `obj` travels in. It is passed in because an
|
|
3045
|
+
* Object whose Subgroup ID is its subgroup's first Object ID does not know it
|
|
3046
|
+
* itself. `null` — a datagram — has no subgroup, so no subgroup filter passes it.
|
|
3047
|
+
*/
|
|
3048
|
+
matches(obj: MoqtObject, subgroupId?: bigint | null): boolean;
|
|
3049
|
+
}
|
|
3050
|
+
//#endregion
|
|
3051
|
+
export { PropertyRange as $, isVarInt as $n, Expires as $t, RequestError as A, LocationFilterType as An, RequestIdError as At, GoAway as B, ObjectDatagramType as Bn, NewGroupRequest as Bt, Timestamp as C, MAX_FULL_TRACK_NAME_LENGTH as Cn, InvalidTypeError as Ct, CMSFTrack as D, FetchObjectContext as Dn, MOQtailError as Dt, CMSFCatalog as E, FetchObject as En, LengthExceedsMaxError as Et, RequestUpdate as F, TrackStatusCode as Fn, FillParameters as Ft, DynamicGroupsProperty as G, ReasonPhrase as Gn, resolveTransportUrl as Gt, FetchOk as H, ObjectStatus as Hn, Redirect as Ht, SubscribeOk as I, FetchHeader as In, SwitchFrom as It, ObjectDeliveryTimeoutProperty as J, Location as Jn, greaseValue as Jt, ImmutablePropertiesTrackProperty as K, Tuple as Kn, GREASE_BASE as Kt, Publish as L, Datagram as Ln, LocationFilter as Lt, SubscribeTracks as M, RequestErrorCode as Mn, TimeoutError as Mt, SubscribeNamespace as N, SUPPORTED_VERSIONS as Nn, TrackNameError as Nt, StreamResetCode as O, ControlMessageType as On, NotEnoughBytesError as Ot, TrackStatus as P, SwitchMode as Pn, VarIntOverflowError as Pt, LOCPropertyId as Q, isBytes as Qn, Forward as Qt, PublishDone as R, DEFAULT_PUBLISHER_PRIORITY as Rn, SubscriberPriority as Rt, Timescale as S, FullTrackName as Sn, InvalidEnumValue as St, CMSF as T, EndOfRangeKind as Tn, KeyValueFormattingError as Tt, DefaultPublisherGroupOrderProperty as U, SubgroupHeaderType as Un, MoqtFragment as Ut, MAX_NEW_SESSION_URI_LENGTH as V, ObjectForwardingPreference as Vn, LargestObject as Vt, DefaultPublisherPriorityProperty as W, MAX_REASON_PHRASE_LEN as Wn, MoqtUrl as Wt, TrackProperty as X, deserializeKvpList as Xn, GroupOrderParam as Xt, SubgroupDeliveryTimeoutProperty as Y, KeyValuePair as Yn, isGrease as Yt, UnknownTrackProperty as Z, deserializeKvpListUntilEmpty as Zn, IncludeProperties as Zt, LOCProperties as _, Header as _n, RangeFilter as _t, SstsAlgorithms as a, AuthorizationToken as an, Setup as at, AudioLevel as b, MoqtObject as bn, CastingError as bt, MaxFilterRanges as c, SetupOptionType as cn, PublishNamespace as ct, Path as d, setupOptionTypeFromNumber as dn, applyMessageParameterUpdate as dt, SubgroupDeliveryTimeout as en, serializeKvpList as er, PropertyRanges as et, ImmutablePropertiesObjectProperty as f, tokenAliasTypeFromNumber as fn, deserializeMessageParameterKvps as ft, UnknownObjectProperty as g, FrozenByteBuffer as gn, RangeDelta as gt, PriorObjectIdGapProperty as h, ByteBuffer as hn, Range as ht, assertNoAuthorityOverWebTransport as i, AuthTokenVariant as in, Fetch as it, RequestOk as j, PublishDoneStatusCode as jn, TerminationError as jt, ControlMessage as k, GroupOrder as kn, ProtocolViolationError as kt, Authority as l, TokenAliasType as ln, MessageParameter as lt, PriorGroupIdGapProperty as m, BaseByteBuffer as mn, InvalidFilterError as mt, SetupOption as n, ObjectDeliveryTimeout as nn, isApplicationSpecificProperty as nt, MaxRequestUpdates as o, Parameter as on, NamespaceDone as ot, ObjectProperty as p, PublishSkipped as pn, serializeMessageParameterKvps as pt, MaxCacheDurationProperty as q, TupleField as qn, GREASE_STEP as qt, SetupOptions as r, FillTimeout as rn, locPropertyIdFromNumber as rt, MoqtImplementation as s, MessageParameterType as sn, Namespace as st, CombinedFilter as t, RendezvousTimeout as tn, TrackPropertyType as tt, MaxAuthTokenCacheSize as u, messageParameterTypeFromNumber as un, MessageParameters as ut, LOCProperty as v, RequestIdMap as vn, RangeFilterKind as vt, TerminationCode as w, MAX_NAMESPACE_TUPLE_COUNT as wn, InvalidUTF8Error as wt, VideoFrameMarking as x, SubgroupObject as xn, InternalError as xt, VideoConfig as y, SubgroupHeader as yn, encodeRanges as yt, Subscribe as z, FetchHeaderType as zn, SwitchingSetAssignment as zt };
|