@moqtap/codec 0.2.3 → 0.3.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/LICENSE +21 -21
- package/README.md +100 -99
- package/dist/{chunk-RZHAPEXO.js → chunk-2A57DRXV.js} +36 -10
- package/dist/{chunk-73MWUKSJ.js → chunk-2UTVXWFF.js} +190 -102
- package/dist/{chunk-JTVCOMBI.cjs → chunk-3XKO6PCR.cjs} +290 -183
- package/dist/{chunk-ACQ4CUJP.cjs → chunk-4BDEU3D4.cjs} +237 -158
- package/dist/{chunk-4N4INRE7.cjs → chunk-4HBKHNU2.cjs} +144 -110
- package/dist/{chunk-2ZT6CVSE.js → chunk-4IVZZOY3.js} +269 -162
- package/dist/{chunk-GLBQDG4L.cjs → chunk-5O764MBD.cjs} +508 -117
- package/dist/chunk-7KBAWOBA.js +1212 -0
- package/dist/{chunk-JSQM2MG3.js → chunk-7QOPNSDF.js} +44 -12
- package/dist/{chunk-SYHW3FLI.cjs → chunk-7RE6KSIY.cjs} +28 -8
- package/dist/{chunk-YG5KJESI.js → chunk-AY6IAHUM.js} +28 -8
- package/dist/{chunk-EFM5T7OM.js → chunk-BLQDWOSG.js} +36 -10
- package/dist/{chunk-UYXTY6ZQ.cjs → chunk-E65QKRSN.cjs} +20 -12
- package/dist/{chunk-BISI45MN.cjs → chunk-EAHE3IOG.cjs} +44 -12
- package/dist/{chunk-PZBPH2D7.js → chunk-GCBFHZW6.js} +216 -137
- package/dist/{chunk-GXEW4COZ.cjs → chunk-H5NSL4MO.cjs} +36 -10
- package/dist/chunk-HZHSO7EW.cjs +1212 -0
- package/dist/{chunk-KZCYQ7ED.cjs → chunk-IILNSDEQ.cjs} +69 -41
- package/dist/{chunk-4XYGE53S.cjs → chunk-J3XCPBW3.cjs} +36 -10
- package/dist/{chunk-6AEHWULA.cjs → chunk-JKOEJZ5B.cjs} +28 -8
- package/dist/{chunk-RUPCJTC3.cjs → chunk-JL3NEW3O.cjs} +23 -1
- package/dist/{chunk-G7GI7LJA.js → chunk-LORZMJJB.js} +36 -10
- package/dist/{chunk-DUBCL3WF.cjs → chunk-LV5C6MEC.cjs} +36 -10
- package/dist/{chunk-ENURAVHI.cjs → chunk-MYXAD5JC.cjs} +44 -12
- package/dist/{chunk-FXZ2MYKJ.js → chunk-MZ7HUCGJ.js} +20 -12
- package/dist/{chunk-S74DWJE2.cjs → chunk-OKG2HT25.cjs} +277 -88
- package/dist/{chunk-BGWGVINJ.cjs → chunk-PKEOQSSZ.cjs} +144 -110
- package/dist/{chunk-2GODRVT5.js → chunk-Q46ZURKX.js} +325 -48
- package/dist/{chunk-UR6JKS56.js → chunk-Q7IGWV3P.js} +41 -9
- package/dist/{chunk-XSNX2IUJ.js → chunk-RW4UG7CN.js} +121 -87
- package/dist/{chunk-DWK5ZQZ4.js → chunk-RZTLQAKF.js} +28 -8
- package/dist/{chunk-UNS34PTA.cjs → chunk-S6IPIN66.cjs} +44 -12
- package/dist/{chunk-YIG2C3LF.cjs → chunk-SDWRXXOO.cjs} +214 -126
- package/dist/{chunk-CEH7ESNC.js → chunk-SHMA4PBY.js} +121 -87
- package/dist/{chunk-MC7W6PMI.js → chunk-U3ZVLT5L.js} +483 -135
- package/dist/{chunk-VJUUZ4W2.cjs → chunk-UJU63EFY.cjs} +374 -97
- package/dist/{chunk-7L43FE6P.js → chunk-VOU7PNHI.js} +23 -1
- package/dist/{chunk-E6E3NQYU.js → chunk-WRHGCVYN.js} +44 -12
- package/dist/{chunk-FPISPJ5N.cjs → chunk-XNWYLVGU.cjs} +529 -181
- package/dist/{chunk-U3IPZYPX.js → chunk-XS77RBY7.js} +228 -39
- package/dist/{chunk-JGG7CMSZ.cjs → chunk-XZE5R57R.cjs} +144 -110
- package/dist/{chunk-77MNXX3M.js → chunk-Y6KCSM3V.js} +121 -87
- package/dist/{chunk-TLYNOOQP.cjs → chunk-YTPZZI2M.cjs} +41 -9
- package/dist/{chunk-7DUBLRXC.js → chunk-YWRCSQBA.js} +44 -12
- package/dist/{chunk-MRJWLGYH.js → chunk-Z3VKP3PJ.js} +69 -41
- package/dist/{chunk-E6P74GDT.js → chunk-Z6U26IRI.js} +464 -73
- package/dist/{codec-FvGCxIhr.d.ts → codec-25u4_1HS.d.ts} +4 -4
- package/dist/{codec-DRcsBCsb.d.ts → codec-3Ppy_5Gd.d.ts} +4 -4
- package/dist/{codec-BdVMRMOI.d.ts → codec-BB0U8MF2.d.cts} +4 -4
- package/dist/{codec-B2cH-f5V.d.cts → codec-BHHfBTnV.d.ts} +4 -4
- package/dist/{codec-B5K73Bdj.d.ts → codec-BN6jk0Td.d.cts} +4 -4
- package/dist/{codec-R8GrCPt2.d.ts → codec-BU0gaSZm.d.ts} +4 -4
- package/dist/{codec-Bq-tLtfP.d.ts → codec-C-Yk2RNa.d.ts} +4 -4
- package/dist/codec-CFWQY9Lj.d.cts +18 -0
- package/dist/{codec-CPlK3Pi5.d.ts → codec-COy4uuPO.d.cts} +4 -4
- package/dist/codec-CewFCsEy.d.ts +18 -0
- package/dist/{codec-KXHvXZVb.d.cts → codec-Ck7ZwFF1.d.cts} +4 -4
- package/dist/{codec-DZhZSIii.d.cts → codec-D2QVSH9D.d.ts} +4 -4
- package/dist/{codec-BwFgpeQu.d.ts → codec-DDUBJGn0.d.cts} +4 -4
- package/dist/{codec-BFeliJFc.d.ts → codec-DNfml-se.d.ts} +4 -4
- package/dist/{codec-C4n1PS09.d.cts → codec-DoOGjjDq.d.cts} +4 -4
- package/dist/{codec-Bap882Fh.d.cts → codec-J7ekOSMc.d.ts} +4 -4
- package/dist/{codec-SKBeHQk7.d.ts → codec-R9TJCq-E.d.cts} +4 -4
- package/dist/{codec-DNUIgLqc.d.cts → codec-ZwV-Njt6.d.ts} +4 -4
- package/dist/{codec-HgBgHkFI.d.cts → codec-j819z_hL.d.cts} +4 -4
- package/dist/{codec-DY4QH364.d.cts → codec-w8z2j_uo.d.cts} +4 -4
- package/dist/{codec-CPvPq0sb.d.cts → codec-wtt6WF1K.d.ts} +4 -4
- package/dist/{codec-BUMjz0J4.d.cts → codec-z6_2PSzi.d.cts} +4 -4
- package/dist/draft10-session.cjs +2 -2
- package/dist/draft10-session.d.cts +6 -6
- package/dist/draft10-session.d.ts +6 -6
- package/dist/draft10-session.js +1 -1
- package/dist/draft10.cjs +8 -5
- package/dist/draft10.d.cts +14 -12
- package/dist/draft10.d.ts +14 -12
- package/dist/draft10.js +16 -13
- package/dist/draft11-session.cjs +2 -2
- package/dist/draft11-session.d.cts +6 -6
- package/dist/draft11-session.d.ts +6 -6
- package/dist/draft11-session.js +1 -1
- package/dist/draft11.cjs +8 -5
- package/dist/draft11.d.cts +14 -12
- package/dist/draft11.d.ts +14 -12
- package/dist/draft11.js +16 -13
- package/dist/draft12-session.cjs +2 -2
- package/dist/draft12-session.d.cts +6 -6
- package/dist/draft12-session.d.ts +6 -6
- package/dist/draft12-session.js +1 -1
- package/dist/draft12.cjs +8 -5
- package/dist/draft12.d.cts +16 -14
- package/dist/draft12.d.ts +16 -14
- package/dist/draft12.js +16 -13
- package/dist/draft13-session.cjs +2 -2
- package/dist/draft13-session.d.cts +6 -6
- package/dist/draft13-session.d.ts +6 -6
- package/dist/draft13-session.js +1 -1
- package/dist/draft13.cjs +8 -5
- package/dist/draft13.d.cts +16 -14
- package/dist/draft13.d.ts +16 -14
- package/dist/draft13.js +16 -13
- package/dist/draft14-session.cjs +2 -2
- package/dist/draft14-session.d.cts +6 -6
- package/dist/draft14-session.d.ts +6 -6
- package/dist/draft14-session.js +1 -1
- package/dist/draft14.cjs +14 -5
- package/dist/draft14.d.cts +14 -12
- package/dist/draft14.d.ts +14 -12
- package/dist/draft14.js +13 -4
- package/dist/draft15-session.cjs +2 -2
- package/dist/draft15-session.d.cts +6 -6
- package/dist/draft15-session.d.ts +6 -6
- package/dist/draft15-session.js +1 -1
- package/dist/draft15.cjs +8 -5
- package/dist/draft15.d.cts +14 -12
- package/dist/draft15.d.ts +14 -12
- package/dist/draft15.js +16 -13
- package/dist/draft16-session.cjs +2 -2
- package/dist/draft16-session.d.cts +6 -6
- package/dist/draft16-session.d.ts +6 -6
- package/dist/draft16-session.js +1 -1
- package/dist/draft16.cjs +8 -5
- package/dist/draft16.d.cts +14 -12
- package/dist/draft16.d.ts +14 -12
- package/dist/draft16.js +16 -13
- package/dist/draft17-session.cjs +2 -2
- package/dist/draft17-session.d.cts +7 -7
- package/dist/draft17-session.d.ts +7 -7
- package/dist/draft17-session.js +1 -1
- package/dist/draft17.cjs +8 -5
- package/dist/draft17.d.cts +11 -9
- package/dist/draft17.d.ts +11 -9
- package/dist/draft17.js +16 -13
- package/dist/draft7-session.cjs +2 -2
- package/dist/draft7-session.d.cts +6 -5
- package/dist/draft7-session.d.ts +6 -5
- package/dist/draft7-session.js +1 -1
- package/dist/draft7.cjs +71 -14
- package/dist/draft7.d.cts +53 -134
- package/dist/draft7.d.ts +53 -134
- package/dist/draft7.js +76 -19
- package/dist/draft8-session.cjs +2 -2
- package/dist/draft8-session.d.cts +6 -6
- package/dist/draft8-session.d.ts +6 -6
- package/dist/draft8-session.js +1 -1
- package/dist/draft8.cjs +8 -5
- package/dist/draft8.d.cts +14 -12
- package/dist/draft8.d.ts +14 -12
- package/dist/draft8.js +7 -4
- package/dist/draft9-session.cjs +2 -2
- package/dist/draft9-session.d.cts +6 -6
- package/dist/draft9-session.d.ts +6 -6
- package/dist/draft9-session.js +1 -1
- package/dist/draft9.cjs +8 -5
- package/dist/draft9.d.cts +14 -12
- package/dist/draft9.d.ts +14 -12
- package/dist/draft9.js +7 -4
- package/dist/index.cjs +52 -74
- package/dist/index.d.cts +41 -60
- package/dist/index.d.ts +41 -60
- package/dist/index.js +40 -62
- package/dist/{session-types-CJIFbTPd.d.ts → session-types-C7UONex5.d.cts} +28 -27
- package/dist/{session-types-Cbq8IGCP.d.cts → session-types-X-IYEGoG.d.ts} +28 -27
- package/dist/session.cjs +46 -13
- package/dist/session.d.cts +28 -9
- package/dist/session.d.ts +28 -9
- package/dist/session.js +46 -13
- package/dist/{types-DxSFvL2b.d.cts → types--Q7_DcvP.d.cts} +43 -39
- package/dist/{types-DxSFvL2b.d.ts → types--Q7_DcvP.d.ts} +43 -39
- package/dist/{types-B0FT5Qs2.d.ts → types-0IWbU9Z_.d.cts} +36 -36
- package/dist/{types-B0FT5Qs2.d.cts → types-0IWbU9Z_.d.ts} +36 -36
- package/dist/{types-gQsr0AAA.d.cts → types-B3g5G9KP.d.cts} +36 -36
- package/dist/{types-gQsr0AAA.d.ts → types-B3g5G9KP.d.ts} +36 -36
- package/dist/{types-Pme7sua0.d.cts → types-BFpFNM_m.d.cts} +57 -32
- package/dist/{types-Pme7sua0.d.ts → types-BFpFNM_m.d.ts} +57 -32
- package/dist/{types-8gUGeMgs.d.ts → types-Br7fm2mf.d.cts} +48 -26
- package/dist/{types-8gUGeMgs.d.cts → types-Br7fm2mf.d.ts} +48 -26
- package/dist/{types-BeAVNU-F.d.cts → types-C2qKTRR_.d.cts} +50 -45
- package/dist/{types-BeAVNU-F.d.ts → types-C2qKTRR_.d.ts} +50 -45
- package/dist/{types-DKpsfD3i.d.cts → types-DEaypVsD.d.cts} +115 -55
- package/dist/{types-DKpsfD3i.d.ts → types-DEaypVsD.d.ts} +115 -55
- package/dist/types-Dl4IaAHR.d.cts +282 -0
- package/dist/types-Dl4IaAHR.d.ts +282 -0
- package/dist/{types-CDa7F5ct.d.cts → types-DrQpTW1G.d.cts} +58 -50
- package/dist/{types-CDa7F5ct.d.ts → types-DrQpTW1G.d.ts} +58 -50
- package/dist/types-DuIO7cWK.d.cts +25 -0
- package/dist/types-DuIO7cWK.d.ts +25 -0
- package/dist/{types-B9A2g05r.d.cts → types-DuxfOYiO.d.cts} +47 -31
- package/dist/{types-B9A2g05r.d.ts → types-DuxfOYiO.d.ts} +47 -31
- package/dist/{types-D1dI_oTX.d.cts → types-jV1yDDBA.d.cts} +36 -36
- package/dist/{types-D1dI_oTX.d.ts → types-jV1yDDBA.d.ts} +36 -36
- package/package.json +192 -192
- package/src/core/buffer-reader.ts +130 -130
- package/src/core/buffer-writer.ts +100 -100
- package/src/core/errors.ts +1 -1
- package/src/core/hex.ts +21 -21
- package/src/core/session-types.ts +61 -59
- package/src/core/types.ts +18 -361
- package/src/drafts/draft07/codec.ts +1058 -938
- package/src/drafts/draft07/data-streams.ts +240 -240
- package/src/drafts/draft07/index.ts +124 -89
- package/src/drafts/draft07/messages.ts +76 -42
- package/src/drafts/draft07/rules.ts +107 -101
- package/src/drafts/draft07/session-fsm.ts +315 -287
- package/src/drafts/draft07/session.ts +8 -6
- package/src/drafts/draft07/types.ts +406 -72
- package/src/drafts/draft07/varint.ts +51 -51
- package/src/drafts/draft08/codec.ts +985 -953
- package/src/drafts/draft08/data-streams.ts +363 -359
- package/src/drafts/draft08/index.ts +10 -9
- package/src/drafts/draft08/messages.ts +59 -59
- package/src/drafts/draft08/rules.ts +73 -73
- package/src/drafts/draft08/session-fsm.ts +335 -303
- package/src/drafts/draft08/session.ts +6 -7
- package/src/drafts/draft08/types.ts +380 -384
- package/src/drafts/draft09/codec.ts +977 -945
- package/src/drafts/draft09/data-streams.ts +336 -332
- package/src/drafts/draft09/index.ts +10 -9
- package/src/drafts/draft09/messages.ts +59 -59
- package/src/drafts/draft09/rules.ts +73 -73
- package/src/drafts/draft09/session-fsm.ts +335 -303
- package/src/drafts/draft09/session.ts +6 -7
- package/src/drafts/draft09/types.ts +380 -384
- package/src/drafts/draft10/codec.ts +977 -945
- package/src/drafts/draft10/data-streams.ts +336 -332
- package/src/drafts/draft10/index.ts +10 -9
- package/src/drafts/draft10/messages.ts +59 -59
- package/src/drafts/draft10/rules.ts +73 -73
- package/src/drafts/draft10/session-fsm.ts +335 -303
- package/src/drafts/draft10/session.ts +6 -7
- package/src/drafts/draft10/types.ts +380 -384
- package/src/drafts/draft11/codec.ts +1054 -988
- package/src/drafts/draft11/data-streams.ts +316 -269
- package/src/drafts/draft11/index.ts +10 -9
- package/src/drafts/draft11/messages.ts +60 -59
- package/src/drafts/draft11/rules.ts +73 -73
- package/src/drafts/draft11/session-fsm.ts +359 -333
- package/src/drafts/draft11/session.ts +6 -7
- package/src/drafts/draft11/types.ts +385 -381
- package/src/drafts/draft12/codec.ts +1178 -1122
- package/src/drafts/draft12/data-streams.ts +324 -275
- package/src/drafts/draft12/index.ts +10 -9
- package/src/drafts/draft12/messages.ts +67 -66
- package/src/drafts/draft12/rules.ts +79 -79
- package/src/drafts/draft12/session-fsm.ts +384 -358
- package/src/drafts/draft12/session.ts +6 -7
- package/src/drafts/draft12/types.ts +424 -419
- package/src/drafts/draft13/codec.ts +1296 -1206
- package/src/drafts/draft13/data-streams.ts +326 -275
- package/src/drafts/draft13/index.ts +10 -9
- package/src/drafts/draft13/messages.ts +73 -68
- package/src/drafts/draft13/rules.ts +81 -81
- package/src/drafts/draft13/session-fsm.ts +392 -366
- package/src/drafts/draft13/session.ts +6 -7
- package/src/drafts/draft13/types.ts +447 -438
- package/src/drafts/draft14/codec.ts +1347 -1043
- package/src/drafts/draft14/data-streams.ts +831 -813
- package/src/drafts/draft14/index.ts +17 -9
- package/src/drafts/draft14/messages.ts +65 -65
- package/src/drafts/draft14/rules.ts +81 -81
- package/src/drafts/draft14/session-fsm.ts +415 -405
- package/src/drafts/draft14/session.ts +6 -7
- package/src/drafts/draft14/types.ts +451 -381
- package/src/drafts/draft15/codec.ts +1138 -978
- package/src/drafts/draft15/data-streams.ts +842 -794
- package/src/drafts/draft15/index.ts +10 -9
- package/src/drafts/draft15/messages.ts +54 -53
- package/src/drafts/draft15/rules.ts +67 -67
- package/src/drafts/draft15/session-fsm.ts +319 -299
- package/src/drafts/draft15/session.ts +6 -7
- package/src/drafts/draft15/types.ts +357 -339
- package/src/drafts/draft16/codec.ts +1242 -966
- package/src/drafts/draft16/data-streams.ts +835 -789
- package/src/drafts/draft16/index.ts +10 -9
- package/src/drafts/draft16/messages.ts +56 -55
- package/src/drafts/draft16/rules.ts +69 -69
- package/src/drafts/draft16/session-fsm.ts +319 -299
- package/src/drafts/draft16/session.ts +6 -7
- package/src/drafts/draft16/types.ts +386 -357
- package/src/drafts/draft17/codec.ts +1209 -971
- package/src/drafts/draft17/data-streams.ts +969 -758
- package/src/drafts/draft17/index.ts +9 -7
- package/src/drafts/draft17/messages.ts +43 -42
- package/src/drafts/draft17/rules.ts +58 -58
- package/src/drafts/draft17/session-fsm.ts +248 -216
- package/src/drafts/draft17/session.ts +5 -5
- package/src/drafts/draft17/types.ts +337 -313
- package/src/index.ts +85 -274
- package/src/session.ts +62 -23
- package/dist/chunk-FZDIEHQL.cjs +0 -1042
- package/dist/chunk-HDWJ2GDE.js +0 -24
- package/dist/chunk-KNDYS3DK.cjs +0 -24
- package/dist/chunk-N2KBF5Q2.js +0 -1042
- package/dist/types-QNXoxC9Y.d.cts +0 -236
- package/dist/types-QNXoxC9Y.d.ts +0 -236
- package/src/drafts/draft07/announce-fsm.ts +0 -2
- package/src/drafts/draft07/parameters.ts +0 -12
- package/src/drafts/draft07/subscription-fsm.ts +0 -3
|
@@ -1,30 +1,64 @@
|
|
|
1
|
+
declare const FilterType: {
|
|
2
|
+
readonly NextGroupStart: 1n;
|
|
3
|
+
readonly LargestObject: 2n;
|
|
4
|
+
readonly AbsoluteStart: 3n;
|
|
5
|
+
readonly AbsoluteRange: 4n;
|
|
6
|
+
};
|
|
7
|
+
type FilterTypeValue = (typeof FilterType)[keyof typeof FilterType];
|
|
8
|
+
declare const GroupOrder: {
|
|
9
|
+
readonly PublisherChoice: 0n;
|
|
10
|
+
readonly Ascending: 1n;
|
|
11
|
+
readonly Descending: 2n;
|
|
12
|
+
};
|
|
13
|
+
type GroupOrderValue = (typeof GroupOrder)[keyof typeof GroupOrder];
|
|
14
|
+
declare const FetchType: {
|
|
15
|
+
readonly Standalone: 1n;
|
|
16
|
+
readonly RelativeJoining: 2n;
|
|
17
|
+
readonly AbsoluteJoining: 3n;
|
|
18
|
+
};
|
|
19
|
+
type FetchTypeValue = (typeof FetchType)[keyof typeof FetchType];
|
|
1
20
|
interface UnknownParam {
|
|
2
21
|
readonly id: string;
|
|
3
22
|
readonly length: number;
|
|
4
23
|
readonly raw_hex: string;
|
|
5
24
|
}
|
|
25
|
+
interface AuthorizationToken {
|
|
26
|
+
readonly alias_type: bigint;
|
|
27
|
+
readonly token_type?: bigint;
|
|
28
|
+
readonly token_value?: string;
|
|
29
|
+
readonly token_alias?: bigint;
|
|
30
|
+
}
|
|
6
31
|
interface Draft14Params {
|
|
7
32
|
role?: bigint;
|
|
8
33
|
path?: string;
|
|
9
34
|
max_request_id?: bigint;
|
|
35
|
+
authority?: string;
|
|
36
|
+
max_auth_token_cache_size?: bigint;
|
|
37
|
+
delivery_timeout?: bigint;
|
|
38
|
+
authorization_token?: AuthorizationToken;
|
|
39
|
+
max_cache_duration?: bigint;
|
|
10
40
|
unknown?: UnknownParam[];
|
|
11
41
|
}
|
|
12
|
-
|
|
42
|
+
interface Location {
|
|
43
|
+
readonly group: bigint;
|
|
44
|
+
readonly object: bigint;
|
|
45
|
+
}
|
|
46
|
+
type Draft14MessageType = 'client_setup' | 'server_setup' | 'subscribe' | 'subscribe_ok' | 'subscribe_update' | 'subscribe_error' | 'unsubscribe' | 'publish' | 'publish_ok' | 'publish_error' | 'publish_done' | 'publish_namespace' | 'publish_namespace_ok' | 'publish_namespace_error' | 'publish_namespace_done' | 'publish_namespace_cancel' | 'subscribe_namespace' | 'subscribe_namespace_ok' | 'subscribe_namespace_error' | 'unsubscribe_namespace' | 'fetch' | 'fetch_ok' | 'fetch_error' | 'fetch_cancel' | 'track_status' | 'track_status_ok' | 'track_status_error' | 'goaway' | 'max_request_id' | 'requests_blocked';
|
|
13
47
|
interface Draft14BaseMessage {
|
|
14
48
|
readonly type: Draft14MessageType;
|
|
15
49
|
}
|
|
16
50
|
interface Draft14ClientSetup extends Draft14BaseMessage {
|
|
17
|
-
readonly type:
|
|
51
|
+
readonly type: 'client_setup';
|
|
18
52
|
readonly supported_versions: bigint[];
|
|
19
53
|
readonly parameters: Draft14Params;
|
|
20
54
|
}
|
|
21
55
|
interface Draft14ServerSetup extends Draft14BaseMessage {
|
|
22
|
-
readonly type:
|
|
56
|
+
readonly type: 'server_setup';
|
|
23
57
|
readonly selected_version: bigint;
|
|
24
58
|
readonly parameters: Draft14Params;
|
|
25
59
|
}
|
|
26
60
|
interface Draft14Subscribe extends Draft14BaseMessage {
|
|
27
|
-
readonly type:
|
|
61
|
+
readonly type: 'subscribe';
|
|
28
62
|
readonly request_id: bigint;
|
|
29
63
|
readonly track_namespace: string[];
|
|
30
64
|
readonly track_name: string;
|
|
@@ -38,19 +72,19 @@ interface Draft14Subscribe extends Draft14BaseMessage {
|
|
|
38
72
|
readonly parameters: Draft14Params;
|
|
39
73
|
}
|
|
40
74
|
interface Draft14SubscribeOk extends Draft14BaseMessage {
|
|
41
|
-
readonly type:
|
|
75
|
+
readonly type: 'subscribe_ok';
|
|
42
76
|
readonly request_id: bigint;
|
|
43
77
|
readonly track_alias: bigint;
|
|
44
78
|
readonly expires: bigint;
|
|
45
79
|
readonly group_order: bigint;
|
|
46
80
|
readonly content_exists: bigint;
|
|
47
|
-
readonly
|
|
48
|
-
readonly largest_object?: bigint;
|
|
81
|
+
readonly largest_location?: Location;
|
|
49
82
|
readonly parameters: Draft14Params;
|
|
50
83
|
}
|
|
51
84
|
interface Draft14SubscribeUpdate extends Draft14BaseMessage {
|
|
52
|
-
readonly type:
|
|
85
|
+
readonly type: 'subscribe_update';
|
|
53
86
|
readonly request_id: bigint;
|
|
87
|
+
readonly subscription_request_id: bigint;
|
|
54
88
|
readonly start_group: bigint;
|
|
55
89
|
readonly start_object: bigint;
|
|
56
90
|
readonly end_group: bigint;
|
|
@@ -59,153 +93,178 @@ interface Draft14SubscribeUpdate extends Draft14BaseMessage {
|
|
|
59
93
|
readonly parameters: Draft14Params;
|
|
60
94
|
}
|
|
61
95
|
interface Draft14SubscribeError extends Draft14BaseMessage {
|
|
62
|
-
readonly type:
|
|
96
|
+
readonly type: 'subscribe_error';
|
|
63
97
|
readonly request_id: bigint;
|
|
64
98
|
readonly error_code: bigint;
|
|
65
99
|
readonly reason_phrase: string;
|
|
66
100
|
}
|
|
67
101
|
interface Draft14Unsubscribe extends Draft14BaseMessage {
|
|
68
|
-
readonly type:
|
|
102
|
+
readonly type: 'unsubscribe';
|
|
69
103
|
readonly request_id: bigint;
|
|
70
104
|
}
|
|
71
105
|
interface Draft14Publish extends Draft14BaseMessage {
|
|
72
|
-
readonly type:
|
|
106
|
+
readonly type: 'publish';
|
|
73
107
|
readonly request_id: bigint;
|
|
74
108
|
readonly track_namespace: string[];
|
|
75
109
|
readonly track_name: string;
|
|
110
|
+
readonly track_alias: bigint;
|
|
111
|
+
readonly group_order: bigint;
|
|
112
|
+
readonly content_exists: bigint;
|
|
113
|
+
readonly largest_location?: Location;
|
|
76
114
|
readonly forward: bigint;
|
|
77
115
|
readonly parameters: Draft14Params;
|
|
78
116
|
}
|
|
79
117
|
interface Draft14PublishOk extends Draft14BaseMessage {
|
|
80
|
-
readonly type:
|
|
118
|
+
readonly type: 'publish_ok';
|
|
81
119
|
readonly request_id: bigint;
|
|
82
|
-
readonly track_alias: bigint;
|
|
83
120
|
readonly forward: bigint;
|
|
121
|
+
readonly subscriber_priority: bigint;
|
|
122
|
+
readonly group_order: bigint;
|
|
123
|
+
readonly filter_type: bigint;
|
|
124
|
+
readonly start_group?: bigint;
|
|
125
|
+
readonly start_object?: bigint;
|
|
126
|
+
readonly end_group?: bigint;
|
|
84
127
|
readonly parameters: Draft14Params;
|
|
85
128
|
}
|
|
86
129
|
interface Draft14PublishError extends Draft14BaseMessage {
|
|
87
|
-
readonly type:
|
|
130
|
+
readonly type: 'publish_error';
|
|
88
131
|
readonly request_id: bigint;
|
|
89
132
|
readonly error_code: bigint;
|
|
90
133
|
readonly reason_phrase: string;
|
|
91
134
|
}
|
|
92
135
|
interface Draft14PublishDone extends Draft14BaseMessage {
|
|
93
|
-
readonly type:
|
|
136
|
+
readonly type: 'publish_done';
|
|
94
137
|
readonly request_id: bigint;
|
|
95
138
|
readonly status_code: bigint;
|
|
139
|
+
readonly stream_count: bigint;
|
|
96
140
|
readonly reason_phrase: string;
|
|
97
141
|
}
|
|
98
142
|
interface Draft14PublishNamespace extends Draft14BaseMessage {
|
|
99
|
-
readonly type:
|
|
143
|
+
readonly type: 'publish_namespace';
|
|
100
144
|
readonly request_id: bigint;
|
|
101
145
|
readonly track_namespace: string[];
|
|
102
146
|
readonly parameters: Draft14Params;
|
|
103
147
|
}
|
|
104
148
|
interface Draft14PublishNamespaceOk extends Draft14BaseMessage {
|
|
105
|
-
readonly type:
|
|
149
|
+
readonly type: 'publish_namespace_ok';
|
|
106
150
|
readonly request_id: bigint;
|
|
107
151
|
readonly parameters: Draft14Params;
|
|
108
152
|
}
|
|
109
153
|
interface Draft14PublishNamespaceError extends Draft14BaseMessage {
|
|
110
|
-
readonly type:
|
|
154
|
+
readonly type: 'publish_namespace_error';
|
|
111
155
|
readonly request_id: bigint;
|
|
112
156
|
readonly error_code: bigint;
|
|
113
157
|
readonly reason_phrase: string;
|
|
114
158
|
}
|
|
115
159
|
interface Draft14PublishNamespaceDone extends Draft14BaseMessage {
|
|
116
|
-
readonly type:
|
|
117
|
-
readonly
|
|
118
|
-
readonly status_code: bigint;
|
|
119
|
-
readonly reason_phrase: string;
|
|
160
|
+
readonly type: 'publish_namespace_done';
|
|
161
|
+
readonly track_namespace: string[];
|
|
120
162
|
}
|
|
121
163
|
interface Draft14PublishNamespaceCancel extends Draft14BaseMessage {
|
|
122
|
-
readonly type:
|
|
123
|
-
readonly
|
|
164
|
+
readonly type: 'publish_namespace_cancel';
|
|
165
|
+
readonly track_namespace: string[];
|
|
166
|
+
readonly error_code: bigint;
|
|
167
|
+
readonly reason_phrase: string;
|
|
124
168
|
}
|
|
125
169
|
interface Draft14SubscribeNamespace extends Draft14BaseMessage {
|
|
126
|
-
readonly type:
|
|
170
|
+
readonly type: 'subscribe_namespace';
|
|
127
171
|
readonly request_id: bigint;
|
|
128
172
|
readonly namespace_prefix: string[];
|
|
129
173
|
readonly parameters: Draft14Params;
|
|
130
174
|
}
|
|
131
175
|
interface Draft14SubscribeNamespaceOk extends Draft14BaseMessage {
|
|
132
|
-
readonly type:
|
|
176
|
+
readonly type: 'subscribe_namespace_ok';
|
|
133
177
|
readonly request_id: bigint;
|
|
134
178
|
readonly parameters: Draft14Params;
|
|
135
179
|
}
|
|
136
180
|
interface Draft14SubscribeNamespaceError extends Draft14BaseMessage {
|
|
137
|
-
readonly type:
|
|
181
|
+
readonly type: 'subscribe_namespace_error';
|
|
138
182
|
readonly request_id: bigint;
|
|
139
183
|
readonly error_code: bigint;
|
|
140
184
|
readonly reason_phrase: string;
|
|
141
185
|
}
|
|
142
186
|
interface Draft14UnsubscribeNamespace extends Draft14BaseMessage {
|
|
143
|
-
readonly type:
|
|
144
|
-
readonly
|
|
187
|
+
readonly type: 'unsubscribe_namespace';
|
|
188
|
+
readonly track_namespace_prefix: string[];
|
|
145
189
|
}
|
|
146
190
|
interface Draft14Fetch extends Draft14BaseMessage {
|
|
147
|
-
readonly type:
|
|
191
|
+
readonly type: 'fetch';
|
|
148
192
|
readonly request_id: bigint;
|
|
149
|
-
readonly
|
|
150
|
-
readonly
|
|
151
|
-
readonly
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
193
|
+
readonly subscriber_priority: bigint;
|
|
194
|
+
readonly group_order: bigint;
|
|
195
|
+
readonly fetch_type: bigint;
|
|
196
|
+
readonly track_namespace?: string[];
|
|
197
|
+
readonly track_name?: string;
|
|
198
|
+
readonly start_group?: bigint;
|
|
199
|
+
readonly start_object?: bigint;
|
|
200
|
+
readonly end_group?: bigint;
|
|
201
|
+
readonly end_object?: bigint;
|
|
202
|
+
readonly joining_request_id?: bigint;
|
|
203
|
+
readonly joining_start?: bigint;
|
|
154
204
|
readonly parameters: Draft14Params;
|
|
155
205
|
}
|
|
156
206
|
interface Draft14FetchOk extends Draft14BaseMessage {
|
|
157
|
-
readonly type:
|
|
207
|
+
readonly type: 'fetch_ok';
|
|
158
208
|
readonly request_id: bigint;
|
|
159
|
-
readonly
|
|
209
|
+
readonly group_order: bigint;
|
|
160
210
|
readonly end_of_track: bigint;
|
|
211
|
+
readonly end_location: Location;
|
|
161
212
|
readonly parameters: Draft14Params;
|
|
162
213
|
}
|
|
163
214
|
interface Draft14FetchError extends Draft14BaseMessage {
|
|
164
|
-
readonly type:
|
|
215
|
+
readonly type: 'fetch_error';
|
|
165
216
|
readonly request_id: bigint;
|
|
166
217
|
readonly error_code: bigint;
|
|
167
218
|
readonly reason_phrase: string;
|
|
168
219
|
}
|
|
169
220
|
interface Draft14FetchCancel extends Draft14BaseMessage {
|
|
170
|
-
readonly type:
|
|
221
|
+
readonly type: 'fetch_cancel';
|
|
171
222
|
readonly request_id: bigint;
|
|
172
223
|
}
|
|
173
224
|
interface Draft14TrackStatus extends Draft14BaseMessage {
|
|
174
|
-
readonly type:
|
|
225
|
+
readonly type: 'track_status';
|
|
175
226
|
readonly request_id: bigint;
|
|
176
227
|
readonly track_namespace: string[];
|
|
177
228
|
readonly track_name: string;
|
|
229
|
+
readonly subscriber_priority: bigint;
|
|
230
|
+
readonly group_order: bigint;
|
|
231
|
+
readonly forward: bigint;
|
|
232
|
+
readonly filter_type: bigint;
|
|
233
|
+
readonly start_group?: bigint;
|
|
234
|
+
readonly start_object?: bigint;
|
|
178
235
|
readonly parameters: Draft14Params;
|
|
179
236
|
}
|
|
180
237
|
interface Draft14TrackStatusOk extends Draft14BaseMessage {
|
|
181
|
-
readonly type:
|
|
238
|
+
readonly type: 'track_status_ok';
|
|
182
239
|
readonly request_id: bigint;
|
|
183
|
-
readonly
|
|
184
|
-
readonly
|
|
185
|
-
readonly
|
|
240
|
+
readonly track_alias: bigint;
|
|
241
|
+
readonly expires: bigint;
|
|
242
|
+
readonly group_order: bigint;
|
|
243
|
+
readonly content_exists: bigint;
|
|
244
|
+
readonly largest_location?: Location;
|
|
186
245
|
readonly parameters: Draft14Params;
|
|
187
246
|
}
|
|
188
247
|
interface Draft14TrackStatusError extends Draft14BaseMessage {
|
|
189
|
-
readonly type:
|
|
248
|
+
readonly type: 'track_status_error';
|
|
190
249
|
readonly request_id: bigint;
|
|
191
250
|
readonly error_code: bigint;
|
|
192
251
|
readonly reason_phrase: string;
|
|
193
252
|
}
|
|
194
253
|
interface Draft14GoAway extends Draft14BaseMessage {
|
|
195
|
-
readonly type:
|
|
254
|
+
readonly type: 'goaway';
|
|
196
255
|
readonly new_session_uri: string;
|
|
197
256
|
}
|
|
198
257
|
interface Draft14MaxRequestId extends Draft14BaseMessage {
|
|
199
|
-
readonly type:
|
|
258
|
+
readonly type: 'max_request_id';
|
|
200
259
|
readonly request_id: bigint;
|
|
201
260
|
}
|
|
202
261
|
interface Draft14RequestsBlocked extends Draft14BaseMessage {
|
|
203
|
-
readonly type:
|
|
262
|
+
readonly type: 'requests_blocked';
|
|
204
263
|
readonly request_id: bigint;
|
|
205
264
|
}
|
|
206
265
|
type Draft14Message = Draft14ClientSetup | Draft14ServerSetup | Draft14Subscribe | Draft14SubscribeOk | Draft14SubscribeUpdate | Draft14SubscribeError | Draft14Unsubscribe | Draft14Publish | Draft14PublishOk | Draft14PublishError | Draft14PublishDone | Draft14PublishNamespace | Draft14PublishNamespaceOk | Draft14PublishNamespaceError | Draft14PublishNamespaceDone | Draft14PublishNamespaceCancel | Draft14SubscribeNamespace | Draft14SubscribeNamespaceOk | Draft14SubscribeNamespaceError | Draft14UnsubscribeNamespace | Draft14Fetch | Draft14FetchOk | Draft14FetchError | Draft14FetchCancel | Draft14TrackStatus | Draft14TrackStatusOk | Draft14TrackStatusError | Draft14GoAway | Draft14MaxRequestId | Draft14RequestsBlocked;
|
|
207
266
|
interface ObjectPayload {
|
|
208
|
-
readonly type:
|
|
267
|
+
readonly type: 'object';
|
|
209
268
|
readonly byteOffset: number;
|
|
210
269
|
readonly payloadByteOffset: number;
|
|
211
270
|
readonly objectId: bigint;
|
|
@@ -215,7 +274,7 @@ interface ObjectPayload {
|
|
|
215
274
|
readonly extensionData: Uint8Array;
|
|
216
275
|
}
|
|
217
276
|
interface SubgroupStream {
|
|
218
|
-
readonly type:
|
|
277
|
+
readonly type: 'subgroup';
|
|
219
278
|
readonly headerType: number;
|
|
220
279
|
readonly trackAlias: bigint;
|
|
221
280
|
readonly groupId: bigint;
|
|
@@ -224,7 +283,7 @@ interface SubgroupStream {
|
|
|
224
283
|
readonly objects: ObjectPayload[];
|
|
225
284
|
}
|
|
226
285
|
interface DatagramObject {
|
|
227
|
-
readonly type:
|
|
286
|
+
readonly type: 'datagram';
|
|
228
287
|
readonly datagramType: number;
|
|
229
288
|
readonly trackAlias: bigint;
|
|
230
289
|
readonly groupId: bigint;
|
|
@@ -232,6 +291,7 @@ interface DatagramObject {
|
|
|
232
291
|
readonly publisherPriority: number;
|
|
233
292
|
readonly endOfGroup?: boolean;
|
|
234
293
|
readonly objectStatus?: bigint;
|
|
294
|
+
readonly extensionData?: Uint8Array;
|
|
235
295
|
readonly payloadLength: number;
|
|
236
296
|
readonly payload: Uint8Array;
|
|
237
297
|
}
|
|
@@ -241,13 +301,13 @@ interface FetchObjectPayload extends ObjectPayload {
|
|
|
241
301
|
readonly publisherPriority: number;
|
|
242
302
|
}
|
|
243
303
|
interface FetchStream {
|
|
244
|
-
readonly type:
|
|
304
|
+
readonly type: 'fetch';
|
|
245
305
|
readonly requestId: bigint;
|
|
246
306
|
readonly objects: FetchObjectPayload[];
|
|
247
307
|
}
|
|
248
308
|
type Draft14DataStream = SubgroupStream | DatagramObject | FetchStream;
|
|
249
309
|
interface SubgroupStreamHeader {
|
|
250
|
-
readonly type:
|
|
310
|
+
readonly type: 'subgroup_header';
|
|
251
311
|
readonly headerType: number;
|
|
252
312
|
readonly trackAlias: bigint;
|
|
253
313
|
readonly groupId: bigint;
|
|
@@ -255,10 +315,10 @@ interface SubgroupStreamHeader {
|
|
|
255
315
|
readonly publisherPriority: number;
|
|
256
316
|
}
|
|
257
317
|
interface FetchStreamHeader {
|
|
258
|
-
readonly type:
|
|
318
|
+
readonly type: 'fetch_header';
|
|
259
319
|
readonly requestId: bigint;
|
|
260
320
|
}
|
|
261
321
|
type DataStreamHeader = SubgroupStreamHeader | FetchStreamHeader;
|
|
262
322
|
type DataStreamEvent = DataStreamHeader | ObjectPayload;
|
|
263
323
|
|
|
264
|
-
export type
|
|
324
|
+
export { type AuthorizationToken as A, type Draft14ServerSetup as B, type Draft14Subscribe as C, type Draft14Message as D, type Draft14SubscribeError as E, type FetchStreamHeader as F, type Draft14SubscribeNamespace as G, type Draft14SubscribeNamespaceError as H, type Draft14SubscribeNamespaceOk as I, type Draft14SubscribeOk as J, type Draft14SubscribeUpdate as K, type Draft14TrackStatus as L, type Draft14TrackStatusError as M, type Draft14TrackStatusOk as N, type ObjectPayload as O, type Draft14Unsubscribe as P, type Draft14UnsubscribeNamespace as Q, type FetchObjectPayload as R, type SubgroupStreamHeader as S, FetchType as T, type FetchTypeValue as U, FilterType as V, type FilterTypeValue as W, GroupOrder as X, type GroupOrderValue as Y, type Location as Z, type UnknownParam as _, type Draft14MessageType as a, type DataStreamEvent as b, type Draft14DataStream as c, type DatagramObject as d, type FetchStream as e, type SubgroupStream as f, type DataStreamHeader as g, type Draft14BaseMessage as h, type Draft14ClientSetup as i, type Draft14Fetch as j, type Draft14FetchCancel as k, type Draft14FetchError as l, type Draft14FetchOk as m, type Draft14GoAway as n, type Draft14MaxRequestId as o, type Draft14Params as p, type Draft14Publish as q, type Draft14PublishDone as r, type Draft14PublishError as s, type Draft14PublishNamespace as t, type Draft14PublishNamespaceCancel as u, type Draft14PublishNamespaceDone as v, type Draft14PublishNamespaceError as w, type Draft14PublishNamespaceOk as x, type Draft14PublishOk as y, type Draft14RequestsBlocked as z };
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
interface UnknownParam {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly length: number;
|
|
4
|
+
readonly raw_hex: string;
|
|
5
|
+
}
|
|
6
|
+
interface Draft07SetupParams {
|
|
7
|
+
role?: bigint;
|
|
8
|
+
path?: string;
|
|
9
|
+
max_subscribe_id?: bigint;
|
|
10
|
+
unknown?: UnknownParam[];
|
|
11
|
+
}
|
|
12
|
+
interface Draft07Params {
|
|
13
|
+
authorization_info?: string;
|
|
14
|
+
delivery_timeout?: bigint;
|
|
15
|
+
max_cache_duration?: bigint;
|
|
16
|
+
unknown?: UnknownParam[];
|
|
17
|
+
}
|
|
18
|
+
type Draft07MessageType = 'client_setup' | 'server_setup' | 'subscribe' | 'subscribe_ok' | 'subscribe_error' | 'subscribe_done' | 'subscribe_update' | 'unsubscribe' | 'announce' | 'announce_ok' | 'announce_error' | 'announce_cancel' | 'unannounce' | 'track_status_request' | 'track_status' | 'object_stream' | 'object_datagram' | 'stream_header_track' | 'stream_header_group' | 'stream_header_subgroup' | 'goaway' | 'subscribe_announces' | 'subscribe_announces_ok' | 'subscribe_announces_error' | 'unsubscribe_announces' | 'max_subscribe_id' | 'fetch' | 'fetch_ok' | 'fetch_error' | 'fetch_cancel';
|
|
19
|
+
interface Draft07BaseMessage {
|
|
20
|
+
readonly type: Draft07MessageType;
|
|
21
|
+
}
|
|
22
|
+
interface ClientSetup extends Draft07BaseMessage {
|
|
23
|
+
readonly type: 'client_setup';
|
|
24
|
+
readonly supported_versions: bigint[];
|
|
25
|
+
readonly parameters: Draft07SetupParams;
|
|
26
|
+
}
|
|
27
|
+
interface ServerSetup extends Draft07BaseMessage {
|
|
28
|
+
readonly type: 'server_setup';
|
|
29
|
+
readonly selected_version: bigint;
|
|
30
|
+
readonly parameters: Draft07SetupParams;
|
|
31
|
+
}
|
|
32
|
+
interface Subscribe extends Draft07BaseMessage {
|
|
33
|
+
readonly type: 'subscribe';
|
|
34
|
+
readonly subscribe_id: bigint;
|
|
35
|
+
readonly track_alias: bigint;
|
|
36
|
+
readonly track_namespace: string[];
|
|
37
|
+
readonly track_name: string;
|
|
38
|
+
readonly subscriber_priority: number;
|
|
39
|
+
readonly group_order: number;
|
|
40
|
+
readonly filter_type: bigint;
|
|
41
|
+
readonly start_group?: bigint;
|
|
42
|
+
readonly start_object?: bigint;
|
|
43
|
+
readonly end_group?: bigint;
|
|
44
|
+
readonly end_object?: bigint;
|
|
45
|
+
readonly parameters: Draft07Params;
|
|
46
|
+
}
|
|
47
|
+
interface SubscribeOk extends Draft07BaseMessage {
|
|
48
|
+
readonly type: 'subscribe_ok';
|
|
49
|
+
readonly subscribe_id: bigint;
|
|
50
|
+
readonly expires: bigint;
|
|
51
|
+
readonly group_order: number;
|
|
52
|
+
readonly content_exists: number;
|
|
53
|
+
readonly largest_group_id?: bigint;
|
|
54
|
+
readonly largest_object_id?: bigint;
|
|
55
|
+
readonly parameters: Draft07Params;
|
|
56
|
+
}
|
|
57
|
+
interface SubscribeError extends Draft07BaseMessage {
|
|
58
|
+
readonly type: 'subscribe_error';
|
|
59
|
+
readonly subscribe_id: bigint;
|
|
60
|
+
readonly error_code: bigint;
|
|
61
|
+
readonly reason_phrase: string;
|
|
62
|
+
readonly track_alias: bigint;
|
|
63
|
+
}
|
|
64
|
+
interface SubscribeDone extends Draft07BaseMessage {
|
|
65
|
+
readonly type: 'subscribe_done';
|
|
66
|
+
readonly subscribe_id: bigint;
|
|
67
|
+
readonly status_code: bigint;
|
|
68
|
+
readonly reason_phrase: string;
|
|
69
|
+
readonly content_exists: number;
|
|
70
|
+
readonly final_group?: bigint;
|
|
71
|
+
readonly final_object?: bigint;
|
|
72
|
+
}
|
|
73
|
+
interface SubscribeUpdate extends Draft07BaseMessage {
|
|
74
|
+
readonly type: 'subscribe_update';
|
|
75
|
+
readonly subscribe_id: bigint;
|
|
76
|
+
readonly start_group: bigint;
|
|
77
|
+
readonly start_object: bigint;
|
|
78
|
+
readonly end_group: bigint;
|
|
79
|
+
readonly end_object: bigint;
|
|
80
|
+
readonly subscriber_priority: number;
|
|
81
|
+
readonly parameters: Draft07Params;
|
|
82
|
+
}
|
|
83
|
+
interface Unsubscribe extends Draft07BaseMessage {
|
|
84
|
+
readonly type: 'unsubscribe';
|
|
85
|
+
readonly subscribe_id: bigint;
|
|
86
|
+
}
|
|
87
|
+
interface Announce extends Draft07BaseMessage {
|
|
88
|
+
readonly type: 'announce';
|
|
89
|
+
readonly track_namespace: string[];
|
|
90
|
+
readonly parameters: Draft07Params;
|
|
91
|
+
}
|
|
92
|
+
interface AnnounceOk extends Draft07BaseMessage {
|
|
93
|
+
readonly type: 'announce_ok';
|
|
94
|
+
readonly track_namespace: string[];
|
|
95
|
+
}
|
|
96
|
+
interface AnnounceError extends Draft07BaseMessage {
|
|
97
|
+
readonly type: 'announce_error';
|
|
98
|
+
readonly track_namespace: string[];
|
|
99
|
+
readonly error_code: bigint;
|
|
100
|
+
readonly reason_phrase: string;
|
|
101
|
+
}
|
|
102
|
+
interface AnnounceCancel extends Draft07BaseMessage {
|
|
103
|
+
readonly type: 'announce_cancel';
|
|
104
|
+
readonly track_namespace: string[];
|
|
105
|
+
readonly error_code: bigint;
|
|
106
|
+
readonly reason_phrase: string;
|
|
107
|
+
}
|
|
108
|
+
interface Unannounce extends Draft07BaseMessage {
|
|
109
|
+
readonly type: 'unannounce';
|
|
110
|
+
readonly track_namespace: string[];
|
|
111
|
+
}
|
|
112
|
+
interface TrackStatusRequest extends Draft07BaseMessage {
|
|
113
|
+
readonly type: 'track_status_request';
|
|
114
|
+
readonly track_namespace: string[];
|
|
115
|
+
readonly track_name: string;
|
|
116
|
+
}
|
|
117
|
+
interface TrackStatus extends Draft07BaseMessage {
|
|
118
|
+
readonly type: 'track_status';
|
|
119
|
+
readonly track_namespace: string[];
|
|
120
|
+
readonly track_name: string;
|
|
121
|
+
readonly status_code: bigint;
|
|
122
|
+
readonly last_group_id: bigint;
|
|
123
|
+
readonly last_object_id: bigint;
|
|
124
|
+
}
|
|
125
|
+
interface ObjectStream extends Draft07BaseMessage {
|
|
126
|
+
readonly type: 'object_stream';
|
|
127
|
+
readonly track_alias: bigint;
|
|
128
|
+
readonly group_id: bigint;
|
|
129
|
+
readonly object_id: bigint;
|
|
130
|
+
readonly publisher_priority: number;
|
|
131
|
+
readonly object_status?: number;
|
|
132
|
+
readonly payload: Uint8Array;
|
|
133
|
+
}
|
|
134
|
+
interface ObjectDatagram extends Draft07BaseMessage {
|
|
135
|
+
readonly type: 'object_datagram';
|
|
136
|
+
readonly track_alias: bigint;
|
|
137
|
+
readonly group_id: bigint;
|
|
138
|
+
readonly object_id: bigint;
|
|
139
|
+
readonly publisher_priority: number;
|
|
140
|
+
readonly object_status?: number;
|
|
141
|
+
readonly payload: Uint8Array;
|
|
142
|
+
}
|
|
143
|
+
interface StreamHeaderTrack extends Draft07BaseMessage {
|
|
144
|
+
readonly type: 'stream_header_track';
|
|
145
|
+
readonly track_alias: bigint;
|
|
146
|
+
readonly publisher_priority: number;
|
|
147
|
+
}
|
|
148
|
+
interface StreamHeaderGroup extends Draft07BaseMessage {
|
|
149
|
+
readonly type: 'stream_header_group';
|
|
150
|
+
readonly track_alias: bigint;
|
|
151
|
+
readonly group_id: bigint;
|
|
152
|
+
readonly publisher_priority: number;
|
|
153
|
+
}
|
|
154
|
+
interface StreamHeaderSubgroup extends Draft07BaseMessage {
|
|
155
|
+
readonly type: 'stream_header_subgroup';
|
|
156
|
+
readonly track_alias: bigint;
|
|
157
|
+
readonly group_id: bigint;
|
|
158
|
+
readonly subgroup_id: bigint;
|
|
159
|
+
readonly publisher_priority: number;
|
|
160
|
+
}
|
|
161
|
+
interface GoAway extends Draft07BaseMessage {
|
|
162
|
+
readonly type: 'goaway';
|
|
163
|
+
readonly new_session_uri: string;
|
|
164
|
+
}
|
|
165
|
+
interface SubscribeAnnounces extends Draft07BaseMessage {
|
|
166
|
+
readonly type: 'subscribe_announces';
|
|
167
|
+
readonly track_namespace_prefix: string[];
|
|
168
|
+
readonly parameters: Draft07Params;
|
|
169
|
+
}
|
|
170
|
+
interface SubscribeAnnouncesOk extends Draft07BaseMessage {
|
|
171
|
+
readonly type: 'subscribe_announces_ok';
|
|
172
|
+
readonly track_namespace_prefix: string[];
|
|
173
|
+
}
|
|
174
|
+
interface SubscribeAnnouncesError extends Draft07BaseMessage {
|
|
175
|
+
readonly type: 'subscribe_announces_error';
|
|
176
|
+
readonly track_namespace_prefix: string[];
|
|
177
|
+
readonly error_code: bigint;
|
|
178
|
+
readonly reason_phrase: string;
|
|
179
|
+
}
|
|
180
|
+
interface UnsubscribeAnnounces extends Draft07BaseMessage {
|
|
181
|
+
readonly type: 'unsubscribe_announces';
|
|
182
|
+
readonly track_namespace_prefix: string[];
|
|
183
|
+
}
|
|
184
|
+
interface MaxSubscribeId extends Draft07BaseMessage {
|
|
185
|
+
readonly type: 'max_subscribe_id';
|
|
186
|
+
readonly subscribe_id: bigint;
|
|
187
|
+
}
|
|
188
|
+
interface Fetch extends Draft07BaseMessage {
|
|
189
|
+
readonly type: 'fetch';
|
|
190
|
+
readonly subscribe_id: bigint;
|
|
191
|
+
readonly track_namespace: string[];
|
|
192
|
+
readonly track_name: string;
|
|
193
|
+
readonly subscriber_priority: number;
|
|
194
|
+
readonly group_order: number;
|
|
195
|
+
readonly start_group: bigint;
|
|
196
|
+
readonly start_object: bigint;
|
|
197
|
+
readonly end_group: bigint;
|
|
198
|
+
readonly end_object: bigint;
|
|
199
|
+
readonly parameters: Draft07Params;
|
|
200
|
+
}
|
|
201
|
+
interface FetchOk extends Draft07BaseMessage {
|
|
202
|
+
readonly type: 'fetch_ok';
|
|
203
|
+
readonly subscribe_id: bigint;
|
|
204
|
+
readonly group_order: number;
|
|
205
|
+
readonly end_of_track: number;
|
|
206
|
+
readonly largest_group_id: bigint;
|
|
207
|
+
readonly largest_object_id: bigint;
|
|
208
|
+
readonly parameters: Draft07Params;
|
|
209
|
+
}
|
|
210
|
+
interface FetchError extends Draft07BaseMessage {
|
|
211
|
+
readonly type: 'fetch_error';
|
|
212
|
+
readonly subscribe_id: bigint;
|
|
213
|
+
readonly error_code: bigint;
|
|
214
|
+
readonly reason_phrase: string;
|
|
215
|
+
}
|
|
216
|
+
interface FetchCancel extends Draft07BaseMessage {
|
|
217
|
+
readonly type: 'fetch_cancel';
|
|
218
|
+
readonly subscribe_id: bigint;
|
|
219
|
+
}
|
|
220
|
+
type Draft07Message = ClientSetup | ServerSetup | Subscribe | SubscribeOk | SubscribeError | SubscribeDone | SubscribeUpdate | Unsubscribe | Announce | AnnounceOk | AnnounceError | AnnounceCancel | Unannounce | TrackStatusRequest | TrackStatus | ObjectStream | ObjectDatagram | StreamHeaderTrack | StreamHeaderGroup | StreamHeaderSubgroup | GoAway | SubscribeAnnounces | SubscribeAnnouncesOk | SubscribeAnnouncesError | UnsubscribeAnnounces | MaxSubscribeId | Fetch | FetchOk | FetchError | FetchCancel;
|
|
221
|
+
interface ObjectPayload {
|
|
222
|
+
readonly type: 'object';
|
|
223
|
+
readonly objectId: bigint;
|
|
224
|
+
readonly payloadLength: number;
|
|
225
|
+
readonly status?: bigint;
|
|
226
|
+
readonly payload: Uint8Array;
|
|
227
|
+
readonly byteOffset: number;
|
|
228
|
+
readonly payloadByteOffset: number;
|
|
229
|
+
}
|
|
230
|
+
interface SubgroupStream {
|
|
231
|
+
readonly type: 'subgroup';
|
|
232
|
+
readonly streamTypeId: 0x04;
|
|
233
|
+
readonly trackAlias: bigint;
|
|
234
|
+
readonly groupId: bigint;
|
|
235
|
+
readonly subgroupId: bigint;
|
|
236
|
+
readonly publisherPriority: number;
|
|
237
|
+
readonly objects: ObjectPayload[];
|
|
238
|
+
}
|
|
239
|
+
interface DatagramObject {
|
|
240
|
+
readonly type: 'datagram';
|
|
241
|
+
readonly streamTypeId: 0x01;
|
|
242
|
+
readonly trackAlias: bigint;
|
|
243
|
+
readonly groupId: bigint;
|
|
244
|
+
readonly objectId: bigint;
|
|
245
|
+
readonly publisherPriority: number;
|
|
246
|
+
readonly payloadLength: number;
|
|
247
|
+
readonly status?: bigint;
|
|
248
|
+
readonly payload: Uint8Array;
|
|
249
|
+
}
|
|
250
|
+
interface FetchObjectPayload {
|
|
251
|
+
readonly type: 'object';
|
|
252
|
+
readonly groupId: bigint;
|
|
253
|
+
readonly subgroupId: bigint;
|
|
254
|
+
readonly objectId: bigint;
|
|
255
|
+
readonly publisherPriority: number;
|
|
256
|
+
readonly payloadLength: number;
|
|
257
|
+
readonly status?: bigint;
|
|
258
|
+
readonly payload: Uint8Array;
|
|
259
|
+
readonly byteOffset: number;
|
|
260
|
+
readonly payloadByteOffset: number;
|
|
261
|
+
}
|
|
262
|
+
interface FetchStream {
|
|
263
|
+
readonly type: 'fetch';
|
|
264
|
+
readonly subscribeId: bigint;
|
|
265
|
+
readonly objects: FetchObjectPayload[];
|
|
266
|
+
}
|
|
267
|
+
type Draft07DataStream = SubgroupStream | DatagramObject | FetchStream;
|
|
268
|
+
interface SubgroupStreamHeader {
|
|
269
|
+
readonly type: 'subgroup_header';
|
|
270
|
+
readonly trackAlias: bigint;
|
|
271
|
+
readonly groupId: bigint;
|
|
272
|
+
readonly subgroupId: bigint;
|
|
273
|
+
readonly publisherPriority: number;
|
|
274
|
+
}
|
|
275
|
+
interface FetchStreamHeader {
|
|
276
|
+
readonly type: 'fetch_header';
|
|
277
|
+
readonly subscribeId: bigint;
|
|
278
|
+
}
|
|
279
|
+
type DataStreamHeader = SubgroupStreamHeader | FetchStreamHeader;
|
|
280
|
+
type DataStreamEvent = DataStreamHeader | ObjectPayload;
|
|
281
|
+
|
|
282
|
+
export type { Announce as A, SubscribeOk as B, ClientSetup as C, Draft07Message as D, SubscribeUpdate as E, FetchStream as F, GoAway as G, TrackStatusRequest as H, UnknownParam as I, Unsubscribe as J, UnsubscribeAnnounces as K, MaxSubscribeId as M, ObjectDatagram as O, SubgroupStream as S, TrackStatus as T, Unannounce as U, Draft07MessageType as a, DatagramObject as b, AnnounceCancel as c, AnnounceError as d, AnnounceOk as e, DataStreamEvent as f, DataStreamHeader as g, Draft07DataStream as h, Draft07Params as i, Draft07SetupParams as j, Fetch as k, FetchCancel as l, FetchError as m, FetchObjectPayload as n, FetchOk as o, FetchStreamHeader as p, ObjectPayload as q, ServerSetup as r, StreamHeaderSubgroup as s, SubgroupStreamHeader as t, Subscribe as u, SubscribeAnnounces as v, SubscribeAnnouncesError as w, SubscribeAnnouncesOk as x, SubscribeDone as y, SubscribeError as z };
|