@moqtap/codec 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/CHANGELOG.md +173 -0
  2. package/dist/auth-redaction-DsdLq4Qs.d.cts +102 -0
  3. package/dist/auth-redaction-DsdLq4Qs.d.ts +102 -0
  4. package/dist/{chunk-PU2KV7VP.cjs → chunk-27K5BUAG.cjs} +485 -515
  5. package/dist/{chunk-BV6MITLO.js → chunk-3RNQMGKA.js} +365 -390
  6. package/dist/{chunk-2XH6PHXR.js → chunk-5AWIXOLB.js} +442 -467
  7. package/dist/{chunk-4XLYCT5Q.cjs → chunk-5IMHJIAZ.cjs} +52 -2
  8. package/dist/{chunk-TVSFDQYE.cjs → chunk-5JGZCKJO.cjs} +513 -531
  9. package/dist/{chunk-IADVBKEJ.cjs → chunk-73K4OSAN.cjs} +407 -432
  10. package/dist/{chunk-N2V7Z37J.js → chunk-7VQKRGRD.js} +19 -3
  11. package/dist/{chunk-UZO5Z2XT.cjs → chunk-A3UCQOIB.cjs} +490 -515
  12. package/dist/{chunk-JKMYAUGY.js → chunk-A7PDMVXM.js} +35 -11
  13. package/dist/{chunk-VZHL2U2N.cjs → chunk-A7VQO6YC.cjs} +54 -38
  14. package/dist/{chunk-KCH4BQXK.cjs → chunk-ACQHZLRZ.cjs} +73 -47
  15. package/dist/{chunk-H6DTAIWM.js → chunk-BBICOMW6.js} +47 -19
  16. package/dist/{chunk-MAXEHYVB.cjs → chunk-BNIUVOCJ.cjs} +554 -612
  17. package/dist/{chunk-QGIHC6BA.cjs → chunk-CNC6ANS4.cjs} +70 -46
  18. package/dist/{chunk-NH4L6NIY.js → chunk-FDLQSWHK.js} +437 -467
  19. package/dist/{chunk-IJAF6PAY.js → chunk-FFNOE4UR.js} +19 -3
  20. package/dist/{chunk-CZNW3R5E.cjs → chunk-GMENT63T.cjs} +54 -38
  21. package/dist/{chunk-7ENEWAMZ.cjs → chunk-HM7BLRVP.cjs} +305 -305
  22. package/dist/{chunk-XHAP2YST.js → chunk-HZONHFNO.js} +19 -3
  23. package/dist/{chunk-EVCPBFSR.cjs → chunk-ILYABWDK.cjs} +83 -55
  24. package/dist/{chunk-IDV2JYJ6.cjs → chunk-KRSFTZVO.cjs} +56 -40
  25. package/dist/{chunk-RIIA4ALQ.cjs → chunk-KSPH6KMH.cjs} +54 -38
  26. package/dist/{chunk-UA5XFP4O.cjs → chunk-KTY4LAUV.cjs} +485 -494
  27. package/dist/{chunk-RZTLQAKF.js → chunk-OJNLJT5D.js} +0 -1
  28. package/dist/{chunk-YJGOD3Y4.js → chunk-PJK2ZS3I.js} +492 -550
  29. package/dist/{chunk-TMXRYOBS.js → chunk-PSMZKHOC.js} +444 -453
  30. package/dist/{chunk-7RE6KSIY.cjs → chunk-Q5JQGHWY.cjs} +0 -1
  31. package/dist/{chunk-23KRITJ6.js → chunk-SQTUQY5E.js} +37 -11
  32. package/dist/{chunk-XQGEOFGE.js → chunk-WCRLAKDW.js} +253 -253
  33. package/dist/{chunk-KYVTM5VI.js → chunk-WL2YUEXH.js} +19 -3
  34. package/dist/{chunk-Q7NSUXXB.js → chunk-YCNIVZS7.js} +464 -482
  35. package/dist/{chunk-KLPWJU6W.js → chunk-YRZQVNZO.js} +50 -0
  36. package/dist/{codec-Bym-K2q2.d.cts → codec-76xzrLTL.d.cts} +21 -2
  37. package/dist/{codec-BKsVu3Fr.d.ts → codec-8p40WdLg.d.ts} +21 -2
  38. package/dist/{codec-Dl_QIXMz.d.ts → codec-BN2Bu0KI.d.ts} +20 -1
  39. package/dist/{codec-D4RvFQmu.d.ts → codec-Bb6GKTrv.d.ts} +21 -2
  40. package/dist/{codec-DAyiF5sq.d.cts → codec-BgpfHoAd.d.cts} +21 -2
  41. package/dist/{codec-CA6nbbEk.d.ts → codec-BkheTXO7.d.ts} +21 -2
  42. package/dist/{codec-DchsPfr3.d.cts → codec-BwVDkokh.d.cts} +21 -2
  43. package/dist/{codec-CgZdadPt.d.cts → codec-C5s1eBJX.d.cts} +21 -2
  44. package/dist/codec-CM5yd6n3.d.ts +38 -0
  45. package/dist/{codec-DJmqoIsp.d.cts → codec-Cb8HC3XV.d.cts} +21 -2
  46. package/dist/codec-Clu_skx8.d.cts +38 -0
  47. package/dist/{codec-DzkdW4kO.d.cts → codec-CpOpemR8.d.cts} +20 -1
  48. package/dist/{codec-CXCjya_G.d.cts → codec-Cshdl9Tt.d.cts} +20 -1
  49. package/dist/{codec-CSBFdPgP.d.cts → codec-DELe00w_.d.cts} +21 -2
  50. package/dist/{codec-C_xxsbKy.d.cts → codec-DHzKAUCa.d.cts} +21 -2
  51. package/dist/{codec--CVeqGQv.d.ts → codec-DdVBtvx7.d.ts} +20 -1
  52. package/dist/{codec-CviAa4lp.d.ts → codec-DlxGuYMv.d.ts} +21 -2
  53. package/dist/{codec-BNy5syCU.d.ts → codec-DxtgPxJS.d.ts} +20 -1
  54. package/dist/{codec-CtvFK4aV.d.cts → codec-GAY4lybi.d.cts} +21 -2
  55. package/dist/{codec-Cfo_z5ET.d.cts → codec-I8u2pfS4.d.cts} +20 -1
  56. package/dist/{codec-vddqy0KY.d.cts → codec-XLrnreeu.d.cts} +21 -2
  57. package/dist/{codec-O-1Js7h4.d.ts → codec-c0YEwwWn.d.ts} +21 -2
  58. package/dist/{codec-Cl73EfRW.d.ts → codec-ejDu-va6.d.ts} +21 -2
  59. package/dist/{codec-C006F75E.d.ts → codec-kaBUzdpV.d.ts} +21 -2
  60. package/dist/{codec-C5evFHL-.d.ts → codec-mVYqkIUF.d.ts} +21 -2
  61. package/dist/{codec-BMwgZIgG.d.ts → codec-qSbO5nOa.d.ts} +21 -2
  62. package/dist/{codec-BQa6Qsav.d.ts → codec-yYKGOipj.d.ts} +21 -2
  63. package/dist/{codec-DzLvG8Wb.d.cts → codec-zfzg9uiy.d.cts} +21 -2
  64. package/dist/draft07.cjs +48 -4
  65. package/dist/draft07.d.cts +42 -2
  66. package/dist/draft07.d.ts +42 -2
  67. package/dist/draft07.js +49 -5
  68. package/dist/draft08.cjs +76 -3
  69. package/dist/draft08.d.cts +70 -2
  70. package/dist/draft08.d.ts +70 -2
  71. package/dist/draft08.js +77 -4
  72. package/dist/draft09.cjs +76 -3
  73. package/dist/draft09.d.cts +70 -2
  74. package/dist/draft09.d.ts +70 -2
  75. package/dist/draft09.js +77 -4
  76. package/dist/draft10.cjs +76 -3
  77. package/dist/draft10.d.cts +70 -2
  78. package/dist/draft10.d.ts +70 -2
  79. package/dist/draft10.js +77 -4
  80. package/dist/draft11-session.d.cts +1 -1
  81. package/dist/draft11-session.d.ts +1 -1
  82. package/dist/draft11.cjs +104 -3
  83. package/dist/draft11.d.cts +100 -4
  84. package/dist/draft11.d.ts +100 -4
  85. package/dist/draft11.js +105 -4
  86. package/dist/draft12-session.d.cts +1 -1
  87. package/dist/draft12-session.d.ts +1 -1
  88. package/dist/draft12.cjs +113 -3
  89. package/dist/draft12.d.cts +109 -4
  90. package/dist/draft12.d.ts +109 -4
  91. package/dist/draft12.js +114 -4
  92. package/dist/draft13-session.d.cts +1 -1
  93. package/dist/draft13-session.d.ts +1 -1
  94. package/dist/draft13.cjs +105 -3
  95. package/dist/draft13.d.cts +101 -4
  96. package/dist/draft13.d.ts +101 -4
  97. package/dist/draft13.js +106 -4
  98. package/dist/draft14-session.d.cts +1 -1
  99. package/dist/draft14-session.d.ts +1 -1
  100. package/dist/draft14.cjs +107 -3
  101. package/dist/draft14.d.cts +103 -30
  102. package/dist/draft14.d.ts +103 -30
  103. package/dist/draft14.js +108 -4
  104. package/dist/draft15-session.d.cts +1 -1
  105. package/dist/draft15-session.d.ts +1 -1
  106. package/dist/draft15.cjs +69 -3
  107. package/dist/draft15.d.cts +65 -22
  108. package/dist/draft15.d.ts +65 -22
  109. package/dist/draft15.js +70 -4
  110. package/dist/draft16-session.cjs +2 -2
  111. package/dist/draft16-session.d.cts +1 -1
  112. package/dist/draft16-session.d.ts +1 -1
  113. package/dist/draft16-session.js +1 -1
  114. package/dist/draft16.cjs +76 -8
  115. package/dist/draft16.d.cts +67 -13
  116. package/dist/draft16.d.ts +67 -13
  117. package/dist/draft16.js +73 -5
  118. package/dist/draft17-session.d.cts +1 -1
  119. package/dist/draft17-session.d.ts +1 -1
  120. package/dist/draft17.cjs +77 -3
  121. package/dist/draft17.d.cts +73 -4
  122. package/dist/draft17.d.ts +73 -4
  123. package/dist/draft17.js +78 -4
  124. package/dist/draft18-session.d.cts +1 -1
  125. package/dist/draft18-session.d.ts +1 -1
  126. package/dist/draft18.cjs +8 -3
  127. package/dist/draft18.d.cts +4 -3
  128. package/dist/draft18.d.ts +4 -3
  129. package/dist/draft18.js +9 -4
  130. package/dist/draft19-session.d.cts +1 -1
  131. package/dist/draft19-session.d.ts +1 -1
  132. package/dist/draft19.cjs +11 -4
  133. package/dist/draft19.d.cts +4 -3
  134. package/dist/draft19.d.ts +4 -3
  135. package/dist/draft19.js +12 -5
  136. package/dist/draft20-session.d.cts +1 -1
  137. package/dist/draft20-session.d.ts +1 -1
  138. package/dist/draft20.cjs +8 -3
  139. package/dist/draft20.d.cts +4 -3
  140. package/dist/draft20.d.ts +4 -3
  141. package/dist/draft20.js +9 -4
  142. package/dist/index.cjs +30 -30
  143. package/dist/index.d.cts +25 -24
  144. package/dist/index.d.ts +25 -24
  145. package/dist/index.js +15 -15
  146. package/dist/session.cjs +2 -2
  147. package/dist/session.d.cts +10 -10
  148. package/dist/session.d.ts +10 -10
  149. package/dist/session.js +1 -1
  150. package/dist/{types-zHgCS6o5.d.cts → types-Btp416jt.d.cts} +15 -7
  151. package/dist/{types-zHgCS6o5.d.ts → types-Btp416jt.d.ts} +15 -7
  152. package/dist/{types-Cm9fjeYC.d.cts → types-BxTL1NXw.d.cts} +9 -2
  153. package/dist/{types-Cm9fjeYC.d.ts → types-BxTL1NXw.d.ts} +9 -2
  154. package/dist/{types-Bio-91Rt.d.cts → types-CI_SX4Xe.d.cts} +2 -2
  155. package/dist/{types-Bio-91Rt.d.ts → types-CI_SX4Xe.d.ts} +2 -2
  156. package/dist/{types-HI_bbXka.d.cts → types-CmqT0jUf.d.cts} +1 -1
  157. package/dist/{types-HI_bbXka.d.ts → types-CmqT0jUf.d.ts} +1 -1
  158. package/dist/{types-CPaYBsMG.d.cts → types-CuibHYcf.d.cts} +9 -2
  159. package/dist/{types-CPaYBsMG.d.ts → types-CuibHYcf.d.ts} +9 -2
  160. package/dist/{types-CWCQwuvy.d.cts → types-CwN7AEoL.d.cts} +24 -12
  161. package/dist/{types-CWCQwuvy.d.ts → types-CwN7AEoL.d.ts} +24 -12
  162. package/dist/{types-Ck45Ex5S.d.cts → types-D0kTgUuL.d.cts} +1 -1
  163. package/dist/{types-Ck45Ex5S.d.ts → types-D0kTgUuL.d.ts} +1 -1
  164. package/dist/{types-D9eiB_9A.d.cts → types-DAnalt5K.d.cts} +9 -2
  165. package/dist/{types-D9eiB_9A.d.ts → types-DAnalt5K.d.ts} +9 -2
  166. package/dist/{types-CXlSn0I9.d.cts → types-DjxexghA.d.cts} +2 -2
  167. package/dist/{types-CXlSn0I9.d.ts → types-DjxexghA.d.ts} +2 -2
  168. package/dist/{types-Cqp10JtB.d.cts → types-DxXNP32l.d.cts} +10 -2
  169. package/dist/{types-Cqp10JtB.d.ts → types-DxXNP32l.d.ts} +10 -2
  170. package/package.json +3 -3
  171. package/src/core/auth-redaction.ts +192 -0
  172. package/src/drafts/draft07/codec.ts +40 -0
  173. package/src/drafts/draft07/error-codes.ts +44 -0
  174. package/src/drafts/draft07/index.ts +15 -0
  175. package/src/drafts/draft08/codec.ts +40 -0
  176. package/src/drafts/draft08/error-codes.ts +76 -0
  177. package/src/drafts/draft08/index.ts +21 -0
  178. package/src/drafts/draft09/codec.ts +40 -0
  179. package/src/drafts/draft09/error-codes.ts +76 -0
  180. package/src/drafts/draft09/index.ts +21 -0
  181. package/src/drafts/draft10/codec.ts +40 -0
  182. package/src/drafts/draft10/error-codes.ts +76 -0
  183. package/src/drafts/draft10/index.ts +21 -0
  184. package/src/drafts/draft11/codec.ts +71 -8
  185. package/src/drafts/draft11/error-codes.ts +106 -0
  186. package/src/drafts/draft11/index.ts +23 -0
  187. package/src/drafts/draft11/types.ts +1 -1
  188. package/src/drafts/draft12/codec.ts +83 -16
  189. package/src/drafts/draft12/error-codes.ts +116 -0
  190. package/src/drafts/draft12/index.ts +25 -0
  191. package/src/drafts/draft12/types.ts +2 -2
  192. package/src/drafts/draft13/codec.ts +75 -11
  193. package/src/drafts/draft13/error-codes.ts +107 -0
  194. package/src/drafts/draft13/index.ts +23 -0
  195. package/src/drafts/draft13/types.ts +3 -3
  196. package/src/drafts/draft14/codec.ts +79 -12
  197. package/src/drafts/draft14/data-streams.ts +331 -259
  198. package/src/drafts/draft14/error-codes.ts +109 -0
  199. package/src/drafts/draft14/index.ts +23 -0
  200. package/src/drafts/draft14/types.ts +1 -1
  201. package/src/drafts/draft15/codec.ts +71 -8
  202. package/src/drafts/draft15/data-streams.ts +489 -444
  203. package/src/drafts/draft15/error-codes.ts +66 -0
  204. package/src/drafts/draft15/index.ts +15 -0
  205. package/src/drafts/draft15/types.ts +9 -2
  206. package/src/drafts/draft16/codec.ts +149 -49
  207. package/src/drafts/draft16/data-streams.ts +513 -442
  208. package/src/drafts/draft16/error-codes.ts +68 -0
  209. package/src/drafts/draft16/index.ts +15 -0
  210. package/src/drafts/draft16/messages.ts +4 -4
  211. package/src/drafts/draft16/session-fsm.ts +0 -1
  212. package/src/drafts/draft16/types.ts +24 -10
  213. package/src/drafts/draft17/codec.ts +77 -10
  214. package/src/drafts/draft17/data-streams.ts +567 -488
  215. package/src/drafts/draft17/index.ts +15 -0
  216. package/src/drafts/draft17/types.ts +9 -2
  217. package/src/drafts/draft18/codec.ts +70 -7
  218. package/src/drafts/draft18/data-streams.ts +570 -482
  219. package/src/drafts/draft18/index.ts +3 -0
  220. package/src/drafts/draft18/types.ts +18 -10
  221. package/src/drafts/draft19/codec.ts +95 -23
  222. package/src/drafts/draft19/data-streams.ts +570 -482
  223. package/src/drafts/draft19/error-codes.ts +3 -1
  224. package/src/drafts/draft19/index.ts +3 -0
  225. package/src/drafts/draft19/messages.ts +3 -1
  226. package/src/drafts/draft19/types.ts +32 -18
  227. package/src/drafts/draft20/codec.ts +115 -36
  228. package/src/drafts/draft20/data-streams.ts +610 -563
  229. package/src/drafts/draft20/index.ts +3 -0
  230. package/src/drafts/draft20/types.ts +31 -13
  231. package/dist/codec-BJ7BHuiZ.d.ts +0 -18
  232. package/dist/codec-C6Mx4bwz.d.cts +0 -18
@@ -1,4 +1,5 @@
1
- export { D as Draft09Codec, c as createDraft09Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-CXCjya_G.cjs';
1
+ export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.cjs';
2
+ export { D as Draft09Codec, c as createDraft09Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-Cshdl9Tt.cjs';
2
3
  import { b as Draft09DataStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, S as SubgroupStream, a as Draft09MessageType, D as Draft09Message } from './types-B3g5G9KP.cjs';
3
4
  export { e as DataStreamEvent, f as DataStreamHeader, g as Draft09Announce, h as Draft09AnnounceCancel, i as Draft09AnnounceError, j as Draft09AnnounceOk, k as Draft09BaseMessage, l as Draft09ClientSetup, m as Draft09Fetch, n as Draft09FetchCancel, o as Draft09FetchError, p as Draft09FetchOk, q as Draft09GoAway, r as Draft09MaxSubscribeId, s as Draft09Params, t as Draft09ServerSetup, u as Draft09SetupParams, v as Draft09Subscribe, w as Draft09SubscribeAnnounces, x as Draft09SubscribeAnnouncesError, y as Draft09SubscribeAnnouncesOk, z as Draft09SubscribeDone, A as Draft09SubscribeError, B as Draft09SubscribeOk, C as Draft09SubscribeUpdate, E as Draft09SubscribesBlocked, G as Draft09TrackStatus, H as Draft09TrackStatusRequest, I as Draft09Unannounce, J as Draft09Unsubscribe, K as Draft09UnsubscribeAnnounces, L as FetchObjectPayload, M as FetchStreamHeader, N as JoiningFetch, O as ObjectPayload, P as StandaloneFetch, Q as SubgroupStreamHeader, U as UnknownParam } from './types-B3g5G9KP.cjs';
4
5
  export { createDraft09SessionState } from './draft09-session.cjs';
@@ -16,6 +17,73 @@ declare function decodeDatagramStatus(bytes: Uint8Array): DecodeResult<DatagramS
16
17
  declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
17
18
  declare function decodeDataStream(streamType: 'subgroup' | 'datagram' | 'datagram_status' | 'fetch', bytes: Uint8Array): DecodeResult<Draft09DataStream>;
18
19
 
20
+ declare const SessionErrorCode: {
21
+ readonly NoError: 0n;
22
+ readonly InternalError: 1n;
23
+ readonly Unauthorized: 2n;
24
+ readonly ProtocolViolation: 3n;
25
+ readonly DuplicateTrackAlias: 4n;
26
+ readonly ParameterLengthMismatch: 5n;
27
+ readonly TooManySubscribes: 6n;
28
+ readonly GoawayTimeout: 16n;
29
+ readonly ControlMessageTimeout: 17n;
30
+ readonly DataStreamTimeout: 18n;
31
+ };
32
+ type SessionErrorCodeValue = (typeof SessionErrorCode)[keyof typeof SessionErrorCode];
33
+ declare const AnnounceErrorCode: {
34
+ readonly InternalError: 0n;
35
+ readonly Unauthorized: 1n;
36
+ readonly Timeout: 2n;
37
+ readonly NotSupported: 3n;
38
+ readonly Uninterested: 4n;
39
+ };
40
+ type AnnounceErrorCodeValue = (typeof AnnounceErrorCode)[keyof typeof AnnounceErrorCode];
41
+ declare const SubscribeErrorCode: {
42
+ readonly InternalError: 0n;
43
+ readonly Unauthorized: 1n;
44
+ readonly Timeout: 2n;
45
+ readonly NotSupported: 3n;
46
+ readonly TrackDoesNotExist: 4n;
47
+ readonly InvalidRange: 5n;
48
+ readonly RetryTrackAlias: 6n;
49
+ };
50
+ type SubscribeErrorCodeValue = (typeof SubscribeErrorCode)[keyof typeof SubscribeErrorCode];
51
+ declare const FetchErrorCode: {
52
+ readonly InternalError: 0n;
53
+ readonly Unauthorized: 1n;
54
+ readonly Timeout: 2n;
55
+ readonly NotSupported: 3n;
56
+ readonly TrackDoesNotExist: 4n;
57
+ readonly InvalidRange: 5n;
58
+ };
59
+ type FetchErrorCodeValue = (typeof FetchErrorCode)[keyof typeof FetchErrorCode];
60
+ declare const SubscribeDoneStatusCode: {
61
+ readonly InternalError: 0n;
62
+ readonly Unauthorized: 1n;
63
+ readonly TrackEnded: 2n;
64
+ readonly SubscriptionEnded: 3n;
65
+ readonly GoingAway: 4n;
66
+ readonly Expired: 5n;
67
+ readonly TooFarBehind: 6n;
68
+ };
69
+ type SubscribeDoneStatusCodeValue = (typeof SubscribeDoneStatusCode)[keyof typeof SubscribeDoneStatusCode];
70
+ declare const SubscribeAnnouncesErrorCode: {
71
+ readonly InternalError: 0n;
72
+ readonly Unauthorized: 1n;
73
+ readonly Timeout: 2n;
74
+ readonly NotSupported: 3n;
75
+ readonly NamespacePrefixUnknown: 4n;
76
+ };
77
+ type SubscribeAnnouncesErrorCodeValue = (typeof SubscribeAnnouncesErrorCode)[keyof typeof SubscribeAnnouncesErrorCode];
78
+ declare const TrackStatusCode: {
79
+ readonly InProgress: 0n;
80
+ readonly TrackDoesNotExist: 1n;
81
+ readonly NotYetBegun: 2n;
82
+ readonly Finished: 3n;
83
+ readonly RelayStatusUnavailable: 4n;
84
+ };
85
+ type TrackStatusCodeValue = (typeof TrackStatusCode)[keyof typeof TrackStatusCode];
86
+
19
87
  declare const MSG_SUBSCRIBE_UPDATE = 2n;
20
88
  declare const MSG_SUBSCRIBE = 3n;
21
89
  declare const MSG_SUBSCRIBE_OK = 4n;
@@ -104,4 +172,4 @@ declare class Draft09SessionFSM {
104
172
 
105
173
  declare const DRAFT_VERSION = 4278190089n;
106
174
 
107
- export { AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, DatagramStatusObject, Draft09DataStream, Draft09Message, Draft09MessageType, Draft09SessionFSM, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBES_BLOCKED, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SessionPhase, SubgroupStream, SubscriptionState, TransitionResult, ValidationResult, decodeDataStream, decodeDatagram, decodeDatagramStatus, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeDatagramStatus, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
175
+ export { AnnounceErrorCode, type AnnounceErrorCodeValue, AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, DatagramStatusObject, Draft09DataStream, Draft09Message, Draft09MessageType, Draft09SessionFSM, FetchErrorCode, type FetchErrorCodeValue, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBES_BLOCKED, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SessionErrorCode, type SessionErrorCodeValue, SessionPhase, SubgroupStream, SubscribeAnnouncesErrorCode, type SubscribeAnnouncesErrorCodeValue, SubscribeDoneStatusCode, type SubscribeDoneStatusCodeValue, SubscribeErrorCode, type SubscribeErrorCodeValue, SubscriptionState, TrackStatusCode, type TrackStatusCodeValue, TransitionResult, ValidationResult, decodeDataStream, decodeDatagram, decodeDatagramStatus, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeDatagramStatus, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
package/dist/draft09.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { D as Draft09Codec, c as createDraft09Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-BNy5syCU.js';
1
+ export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.js';
2
+ export { D as Draft09Codec, c as createDraft09Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-DxtgPxJS.js';
2
3
  import { b as Draft09DataStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, S as SubgroupStream, a as Draft09MessageType, D as Draft09Message } from './types-B3g5G9KP.js';
3
4
  export { e as DataStreamEvent, f as DataStreamHeader, g as Draft09Announce, h as Draft09AnnounceCancel, i as Draft09AnnounceError, j as Draft09AnnounceOk, k as Draft09BaseMessage, l as Draft09ClientSetup, m as Draft09Fetch, n as Draft09FetchCancel, o as Draft09FetchError, p as Draft09FetchOk, q as Draft09GoAway, r as Draft09MaxSubscribeId, s as Draft09Params, t as Draft09ServerSetup, u as Draft09SetupParams, v as Draft09Subscribe, w as Draft09SubscribeAnnounces, x as Draft09SubscribeAnnouncesError, y as Draft09SubscribeAnnouncesOk, z as Draft09SubscribeDone, A as Draft09SubscribeError, B as Draft09SubscribeOk, C as Draft09SubscribeUpdate, E as Draft09SubscribesBlocked, G as Draft09TrackStatus, H as Draft09TrackStatusRequest, I as Draft09Unannounce, J as Draft09Unsubscribe, K as Draft09UnsubscribeAnnounces, L as FetchObjectPayload, M as FetchStreamHeader, N as JoiningFetch, O as ObjectPayload, P as StandaloneFetch, Q as SubgroupStreamHeader, U as UnknownParam } from './types-B3g5G9KP.js';
4
5
  export { createDraft09SessionState } from './draft09-session.js';
@@ -16,6 +17,73 @@ declare function decodeDatagramStatus(bytes: Uint8Array): DecodeResult<DatagramS
16
17
  declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
17
18
  declare function decodeDataStream(streamType: 'subgroup' | 'datagram' | 'datagram_status' | 'fetch', bytes: Uint8Array): DecodeResult<Draft09DataStream>;
18
19
 
20
+ declare const SessionErrorCode: {
21
+ readonly NoError: 0n;
22
+ readonly InternalError: 1n;
23
+ readonly Unauthorized: 2n;
24
+ readonly ProtocolViolation: 3n;
25
+ readonly DuplicateTrackAlias: 4n;
26
+ readonly ParameterLengthMismatch: 5n;
27
+ readonly TooManySubscribes: 6n;
28
+ readonly GoawayTimeout: 16n;
29
+ readonly ControlMessageTimeout: 17n;
30
+ readonly DataStreamTimeout: 18n;
31
+ };
32
+ type SessionErrorCodeValue = (typeof SessionErrorCode)[keyof typeof SessionErrorCode];
33
+ declare const AnnounceErrorCode: {
34
+ readonly InternalError: 0n;
35
+ readonly Unauthorized: 1n;
36
+ readonly Timeout: 2n;
37
+ readonly NotSupported: 3n;
38
+ readonly Uninterested: 4n;
39
+ };
40
+ type AnnounceErrorCodeValue = (typeof AnnounceErrorCode)[keyof typeof AnnounceErrorCode];
41
+ declare const SubscribeErrorCode: {
42
+ readonly InternalError: 0n;
43
+ readonly Unauthorized: 1n;
44
+ readonly Timeout: 2n;
45
+ readonly NotSupported: 3n;
46
+ readonly TrackDoesNotExist: 4n;
47
+ readonly InvalidRange: 5n;
48
+ readonly RetryTrackAlias: 6n;
49
+ };
50
+ type SubscribeErrorCodeValue = (typeof SubscribeErrorCode)[keyof typeof SubscribeErrorCode];
51
+ declare const FetchErrorCode: {
52
+ readonly InternalError: 0n;
53
+ readonly Unauthorized: 1n;
54
+ readonly Timeout: 2n;
55
+ readonly NotSupported: 3n;
56
+ readonly TrackDoesNotExist: 4n;
57
+ readonly InvalidRange: 5n;
58
+ };
59
+ type FetchErrorCodeValue = (typeof FetchErrorCode)[keyof typeof FetchErrorCode];
60
+ declare const SubscribeDoneStatusCode: {
61
+ readonly InternalError: 0n;
62
+ readonly Unauthorized: 1n;
63
+ readonly TrackEnded: 2n;
64
+ readonly SubscriptionEnded: 3n;
65
+ readonly GoingAway: 4n;
66
+ readonly Expired: 5n;
67
+ readonly TooFarBehind: 6n;
68
+ };
69
+ type SubscribeDoneStatusCodeValue = (typeof SubscribeDoneStatusCode)[keyof typeof SubscribeDoneStatusCode];
70
+ declare const SubscribeAnnouncesErrorCode: {
71
+ readonly InternalError: 0n;
72
+ readonly Unauthorized: 1n;
73
+ readonly Timeout: 2n;
74
+ readonly NotSupported: 3n;
75
+ readonly NamespacePrefixUnknown: 4n;
76
+ };
77
+ type SubscribeAnnouncesErrorCodeValue = (typeof SubscribeAnnouncesErrorCode)[keyof typeof SubscribeAnnouncesErrorCode];
78
+ declare const TrackStatusCode: {
79
+ readonly InProgress: 0n;
80
+ readonly TrackDoesNotExist: 1n;
81
+ readonly NotYetBegun: 2n;
82
+ readonly Finished: 3n;
83
+ readonly RelayStatusUnavailable: 4n;
84
+ };
85
+ type TrackStatusCodeValue = (typeof TrackStatusCode)[keyof typeof TrackStatusCode];
86
+
19
87
  declare const MSG_SUBSCRIBE_UPDATE = 2n;
20
88
  declare const MSG_SUBSCRIBE = 3n;
21
89
  declare const MSG_SUBSCRIBE_OK = 4n;
@@ -104,4 +172,4 @@ declare class Draft09SessionFSM {
104
172
 
105
173
  declare const DRAFT_VERSION = 4278190089n;
106
174
 
107
- export { AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, DatagramStatusObject, Draft09DataStream, Draft09Message, Draft09MessageType, Draft09SessionFSM, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBES_BLOCKED, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SessionPhase, SubgroupStream, SubscriptionState, TransitionResult, ValidationResult, decodeDataStream, decodeDatagram, decodeDatagramStatus, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeDatagramStatus, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
175
+ export { AnnounceErrorCode, type AnnounceErrorCodeValue, AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, DatagramStatusObject, Draft09DataStream, Draft09Message, Draft09MessageType, Draft09SessionFSM, FetchErrorCode, type FetchErrorCodeValue, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBES_BLOCKED, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SessionErrorCode, type SessionErrorCodeValue, SessionPhase, SubgroupStream, SubscribeAnnouncesErrorCode, type SubscribeAnnouncesErrorCodeValue, SubscribeDoneStatusCode, type SubscribeDoneStatusCodeValue, SubscribeErrorCode, type SubscribeErrorCodeValue, SubscriptionState, TrackStatusCode, type TrackStatusCodeValue, TransitionResult, ValidationResult, decodeDataStream, decodeDatagram, decodeDatagramStatus, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeDatagramStatus, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
package/dist/draft09.js CHANGED
@@ -44,9 +44,12 @@ import {
44
44
  encodeDatagramStatus,
45
45
  encodeFetchStream,
46
46
  encodeMessage,
47
- encodeSubgroupStream
48
- } from "./chunk-IJAF6PAY.js";
49
- import "./chunk-KLPWJU6W.js";
47
+ encodeSubgroupStream,
48
+ redactAuthTokens
49
+ } from "./chunk-FFNOE4UR.js";
50
+ import {
51
+ REDACTION_FILL
52
+ } from "./chunk-YRZQVNZO.js";
50
53
  import {
51
54
  BIDIRECTIONAL_MESSAGES,
52
55
  CLIENT_ONLY_MESSAGES,
@@ -58,14 +61,77 @@ import {
58
61
  getLegalOutgoing
59
62
  } from "./chunk-YWRCSQBA.js";
60
63
 
64
+ // src/drafts/draft09/error-codes.ts
65
+ var SessionErrorCode = {
66
+ NoError: 0x0n,
67
+ InternalError: 0x1n,
68
+ Unauthorized: 0x2n,
69
+ ProtocolViolation: 0x3n,
70
+ DuplicateTrackAlias: 0x4n,
71
+ ParameterLengthMismatch: 0x5n,
72
+ TooManySubscribes: 0x6n,
73
+ GoawayTimeout: 0x10n,
74
+ ControlMessageTimeout: 0x11n,
75
+ DataStreamTimeout: 0x12n
76
+ };
77
+ var AnnounceErrorCode = {
78
+ InternalError: 0x0n,
79
+ Unauthorized: 0x1n,
80
+ Timeout: 0x2n,
81
+ NotSupported: 0x3n,
82
+ Uninterested: 0x4n
83
+ };
84
+ var SubscribeErrorCode = {
85
+ InternalError: 0x0n,
86
+ Unauthorized: 0x1n,
87
+ Timeout: 0x2n,
88
+ NotSupported: 0x3n,
89
+ TrackDoesNotExist: 0x4n,
90
+ InvalidRange: 0x5n,
91
+ RetryTrackAlias: 0x6n
92
+ };
93
+ var FetchErrorCode = {
94
+ InternalError: 0x0n,
95
+ Unauthorized: 0x1n,
96
+ Timeout: 0x2n,
97
+ NotSupported: 0x3n,
98
+ TrackDoesNotExist: 0x4n,
99
+ InvalidRange: 0x5n
100
+ };
101
+ var SubscribeDoneStatusCode = {
102
+ InternalError: 0x0n,
103
+ Unauthorized: 0x1n,
104
+ TrackEnded: 0x2n,
105
+ SubscriptionEnded: 0x3n,
106
+ GoingAway: 0x4n,
107
+ Expired: 0x5n,
108
+ TooFarBehind: 0x6n
109
+ };
110
+ var SubscribeAnnouncesErrorCode = {
111
+ InternalError: 0x0n,
112
+ Unauthorized: 0x1n,
113
+ Timeout: 0x2n,
114
+ NotSupported: 0x3n,
115
+ NamespacePrefixUnknown: 0x4n
116
+ };
117
+ var TrackStatusCode = {
118
+ InProgress: 0x00n,
119
+ TrackDoesNotExist: 0x01n,
120
+ NotYetBegun: 0x02n,
121
+ Finished: 0x03n,
122
+ RelayStatusUnavailable: 0x04n
123
+ };
124
+
61
125
  // src/drafts/draft09/index.ts
62
126
  var DRAFT_VERSION = 0xff000009n;
63
127
  export {
128
+ AnnounceErrorCode,
64
129
  BIDIRECTIONAL_MESSAGES,
65
130
  CLIENT_ONLY_MESSAGES,
66
131
  CONTROL_MESSAGES,
67
132
  DRAFT_VERSION,
68
133
  Draft09SessionFSM,
134
+ FetchErrorCode,
69
135
  MESSAGE_ID_MAP,
70
136
  MESSAGE_TYPE_MAP,
71
137
  MSG_ANNOUNCE,
@@ -97,9 +163,15 @@ export {
97
163
  PARAM_AUTHORIZATION_INFO,
98
164
  PARAM_DELIVERY_TIMEOUT,
99
165
  PARAM_MAX_CACHE_DURATION,
166
+ REDACTION_FILL,
100
167
  SERVER_ONLY_MESSAGES,
101
168
  SETUP_PARAM_MAX_SUBSCRIBE_ID,
102
169
  SETUP_PARAM_PATH,
170
+ SessionErrorCode,
171
+ SubscribeAnnouncesErrorCode,
172
+ SubscribeDoneStatusCode,
173
+ SubscribeErrorCode,
174
+ TrackStatusCode,
103
175
  createDraft09Codec,
104
176
  createDraft09SessionState,
105
177
  createStreamDecoder,
@@ -115,5 +187,6 @@ export {
115
187
  encodeMessage,
116
188
  encodeSubgroupStream,
117
189
  getLegalIncoming,
118
- getLegalOutgoing
190
+ getLegalOutgoing,
191
+ redactAuthTokens
119
192
  };
package/dist/draft10.cjs CHANGED
@@ -45,7 +45,8 @@
45
45
 
46
46
 
47
47
 
48
- var _chunkRIIA4ALQcjs = require('./chunk-RIIA4ALQ.cjs');
48
+
49
+ var _chunkKSPH6KMHcjs = require('./chunk-KSPH6KMH.cjs');
49
50
 
50
51
 
51
52
 
@@ -56,7 +57,70 @@ var _chunkRIIA4ALQcjs = require('./chunk-RIIA4ALQ.cjs');
56
57
 
57
58
 
58
59
  var _chunkEAHE3IOGcjs = require('./chunk-EAHE3IOG.cjs');
59
- require('./chunk-4XLYCT5Q.cjs');
60
+
61
+
62
+ var _chunk5IMHJIAZcjs = require('./chunk-5IMHJIAZ.cjs');
63
+
64
+ // src/drafts/draft10/error-codes.ts
65
+ var SessionErrorCode = {
66
+ NoError: 0x0n,
67
+ InternalError: 0x1n,
68
+ Unauthorized: 0x2n,
69
+ ProtocolViolation: 0x3n,
70
+ DuplicateTrackAlias: 0x4n,
71
+ ParameterLengthMismatch: 0x5n,
72
+ TooManySubscribes: 0x6n,
73
+ GoawayTimeout: 0x10n,
74
+ ControlMessageTimeout: 0x11n,
75
+ DataStreamTimeout: 0x12n
76
+ };
77
+ var SubscribeErrorCode = {
78
+ InternalError: 0x0n,
79
+ Unauthorized: 0x1n,
80
+ Timeout: 0x2n,
81
+ NotSupported: 0x3n,
82
+ TrackDoesNotExist: 0x4n,
83
+ InvalidRange: 0x5n,
84
+ RetryTrackAlias: 0x6n
85
+ };
86
+ var SubscribeDoneStatusCode = {
87
+ InternalError: 0x0n,
88
+ Unauthorized: 0x1n,
89
+ TrackEnded: 0x2n,
90
+ SubscriptionEnded: 0x3n,
91
+ GoingAway: 0x4n,
92
+ Expired: 0x5n,
93
+ TooFarBehind: 0x6n
94
+ };
95
+ var FetchErrorCode = {
96
+ InternalError: 0x0n,
97
+ Unauthorized: 0x1n,
98
+ Timeout: 0x2n,
99
+ NotSupported: 0x3n,
100
+ TrackDoesNotExist: 0x4n,
101
+ InvalidRange: 0x5n
102
+ };
103
+ var AnnounceErrorCode = {
104
+ InternalError: 0x0n,
105
+ Unauthorized: 0x1n,
106
+ Timeout: 0x2n,
107
+ NotSupported: 0x3n,
108
+ Uninterested: 0x4n
109
+ };
110
+ var SubscribeAnnouncesErrorCode = {
111
+ InternalError: 0x0n,
112
+ Unauthorized: 0x1n,
113
+ Timeout: 0x2n,
114
+ NotSupported: 0x3n,
115
+ NamespacePrefixUnknown: 0x4n
116
+ };
117
+ var TrackStatusCode = {
118
+ InProgress: 0x00n,
119
+ TrackDoesNotExist: 0x01n,
120
+ NotYetBegun: 0x02n,
121
+ Finished: 0x03n,
122
+ RelayStatusUnavailable: 0x04n
123
+ };
60
124
 
61
125
  // src/drafts/draft10/index.ts
62
126
  var DRAFT_VERSION = 0xff00000an;
@@ -116,4 +180,13 @@ var DRAFT_VERSION = 0xff00000an;
116
180
 
117
181
 
118
182
 
119
- exports.BIDIRECTIONAL_MESSAGES = _chunkEAHE3IOGcjs.BIDIRECTIONAL_MESSAGES; exports.CLIENT_ONLY_MESSAGES = _chunkEAHE3IOGcjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkEAHE3IOGcjs.CONTROL_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.Draft10SessionFSM = _chunkEAHE3IOGcjs.Draft10SessionFSM; exports.MESSAGE_ID_MAP = _chunkRIIA4ALQcjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunkRIIA4ALQcjs.MESSAGE_TYPE_MAP; exports.MSG_ANNOUNCE = _chunkRIIA4ALQcjs.MSG_ANNOUNCE; exports.MSG_ANNOUNCE_CANCEL = _chunkRIIA4ALQcjs.MSG_ANNOUNCE_CANCEL; exports.MSG_ANNOUNCE_ERROR = _chunkRIIA4ALQcjs.MSG_ANNOUNCE_ERROR; exports.MSG_ANNOUNCE_OK = _chunkRIIA4ALQcjs.MSG_ANNOUNCE_OK; exports.MSG_CLIENT_SETUP = _chunkRIIA4ALQcjs.MSG_CLIENT_SETUP; exports.MSG_FETCH = _chunkRIIA4ALQcjs.MSG_FETCH; exports.MSG_FETCH_CANCEL = _chunkRIIA4ALQcjs.MSG_FETCH_CANCEL; exports.MSG_FETCH_ERROR = _chunkRIIA4ALQcjs.MSG_FETCH_ERROR; exports.MSG_FETCH_OK = _chunkRIIA4ALQcjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunkRIIA4ALQcjs.MSG_GOAWAY; exports.MSG_MAX_SUBSCRIBE_ID = _chunkRIIA4ALQcjs.MSG_MAX_SUBSCRIBE_ID; exports.MSG_SERVER_SETUP = _chunkRIIA4ALQcjs.MSG_SERVER_SETUP; exports.MSG_SUBSCRIBE = _chunkRIIA4ALQcjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBES_BLOCKED = _chunkRIIA4ALQcjs.MSG_SUBSCRIBES_BLOCKED; exports.MSG_SUBSCRIBE_ANNOUNCES = _chunkRIIA4ALQcjs.MSG_SUBSCRIBE_ANNOUNCES; exports.MSG_SUBSCRIBE_ANNOUNCES_ERROR = _chunkRIIA4ALQcjs.MSG_SUBSCRIBE_ANNOUNCES_ERROR; exports.MSG_SUBSCRIBE_ANNOUNCES_OK = _chunkRIIA4ALQcjs.MSG_SUBSCRIBE_ANNOUNCES_OK; exports.MSG_SUBSCRIBE_DONE = _chunkRIIA4ALQcjs.MSG_SUBSCRIBE_DONE; exports.MSG_SUBSCRIBE_ERROR = _chunkRIIA4ALQcjs.MSG_SUBSCRIBE_ERROR; exports.MSG_SUBSCRIBE_OK = _chunkRIIA4ALQcjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_UPDATE = _chunkRIIA4ALQcjs.MSG_SUBSCRIBE_UPDATE; exports.MSG_TRACK_STATUS = _chunkRIIA4ALQcjs.MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_REQUEST = _chunkRIIA4ALQcjs.MSG_TRACK_STATUS_REQUEST; exports.MSG_UNANNOUNCE = _chunkRIIA4ALQcjs.MSG_UNANNOUNCE; exports.MSG_UNSUBSCRIBE = _chunkRIIA4ALQcjs.MSG_UNSUBSCRIBE; exports.MSG_UNSUBSCRIBE_ANNOUNCES = _chunkRIIA4ALQcjs.MSG_UNSUBSCRIBE_ANNOUNCES; exports.PARAM_AUTHORIZATION_INFO = _chunkRIIA4ALQcjs.PARAM_AUTHORIZATION_INFO; exports.PARAM_DELIVERY_TIMEOUT = _chunkRIIA4ALQcjs.PARAM_DELIVERY_TIMEOUT; exports.PARAM_MAX_CACHE_DURATION = _chunkRIIA4ALQcjs.PARAM_MAX_CACHE_DURATION; exports.SERVER_ONLY_MESSAGES = _chunkEAHE3IOGcjs.SERVER_ONLY_MESSAGES; exports.SETUP_PARAM_MAX_SUBSCRIBE_ID = _chunkRIIA4ALQcjs.SETUP_PARAM_MAX_SUBSCRIBE_ID; exports.SETUP_PARAM_PATH = _chunkRIIA4ALQcjs.SETUP_PARAM_PATH; exports.createDraft10Codec = _chunkRIIA4ALQcjs.createDraft10Codec; exports.createDraft10SessionState = _chunkEAHE3IOGcjs.createDraft10SessionState; exports.createStreamDecoder = _chunkRIIA4ALQcjs.createStreamDecoder; exports.decodeDataStream = _chunkRIIA4ALQcjs.decodeDataStream; exports.decodeDatagram = _chunkRIIA4ALQcjs.decodeDatagram; exports.decodeDatagramStatus = _chunkRIIA4ALQcjs.decodeDatagramStatus; exports.decodeFetchStream = _chunkRIIA4ALQcjs.decodeFetchStream; exports.decodeMessage = _chunkRIIA4ALQcjs.decodeMessage; exports.decodeSubgroupStream = _chunkRIIA4ALQcjs.decodeSubgroupStream; exports.encodeDatagram = _chunkRIIA4ALQcjs.encodeDatagram; exports.encodeDatagramStatus = _chunkRIIA4ALQcjs.encodeDatagramStatus; exports.encodeFetchStream = _chunkRIIA4ALQcjs.encodeFetchStream; exports.encodeMessage = _chunkRIIA4ALQcjs.encodeMessage; exports.encodeSubgroupStream = _chunkRIIA4ALQcjs.encodeSubgroupStream; exports.getLegalIncoming = _chunkEAHE3IOGcjs.getLegalIncoming; exports.getLegalOutgoing = _chunkEAHE3IOGcjs.getLegalOutgoing;
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ exports.AnnounceErrorCode = AnnounceErrorCode; exports.BIDIRECTIONAL_MESSAGES = _chunkEAHE3IOGcjs.BIDIRECTIONAL_MESSAGES; exports.CLIENT_ONLY_MESSAGES = _chunkEAHE3IOGcjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkEAHE3IOGcjs.CONTROL_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.Draft10SessionFSM = _chunkEAHE3IOGcjs.Draft10SessionFSM; exports.FetchErrorCode = FetchErrorCode; exports.MESSAGE_ID_MAP = _chunkKSPH6KMHcjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunkKSPH6KMHcjs.MESSAGE_TYPE_MAP; exports.MSG_ANNOUNCE = _chunkKSPH6KMHcjs.MSG_ANNOUNCE; exports.MSG_ANNOUNCE_CANCEL = _chunkKSPH6KMHcjs.MSG_ANNOUNCE_CANCEL; exports.MSG_ANNOUNCE_ERROR = _chunkKSPH6KMHcjs.MSG_ANNOUNCE_ERROR; exports.MSG_ANNOUNCE_OK = _chunkKSPH6KMHcjs.MSG_ANNOUNCE_OK; exports.MSG_CLIENT_SETUP = _chunkKSPH6KMHcjs.MSG_CLIENT_SETUP; exports.MSG_FETCH = _chunkKSPH6KMHcjs.MSG_FETCH; exports.MSG_FETCH_CANCEL = _chunkKSPH6KMHcjs.MSG_FETCH_CANCEL; exports.MSG_FETCH_ERROR = _chunkKSPH6KMHcjs.MSG_FETCH_ERROR; exports.MSG_FETCH_OK = _chunkKSPH6KMHcjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunkKSPH6KMHcjs.MSG_GOAWAY; exports.MSG_MAX_SUBSCRIBE_ID = _chunkKSPH6KMHcjs.MSG_MAX_SUBSCRIBE_ID; exports.MSG_SERVER_SETUP = _chunkKSPH6KMHcjs.MSG_SERVER_SETUP; exports.MSG_SUBSCRIBE = _chunkKSPH6KMHcjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBES_BLOCKED = _chunkKSPH6KMHcjs.MSG_SUBSCRIBES_BLOCKED; exports.MSG_SUBSCRIBE_ANNOUNCES = _chunkKSPH6KMHcjs.MSG_SUBSCRIBE_ANNOUNCES; exports.MSG_SUBSCRIBE_ANNOUNCES_ERROR = _chunkKSPH6KMHcjs.MSG_SUBSCRIBE_ANNOUNCES_ERROR; exports.MSG_SUBSCRIBE_ANNOUNCES_OK = _chunkKSPH6KMHcjs.MSG_SUBSCRIBE_ANNOUNCES_OK; exports.MSG_SUBSCRIBE_DONE = _chunkKSPH6KMHcjs.MSG_SUBSCRIBE_DONE; exports.MSG_SUBSCRIBE_ERROR = _chunkKSPH6KMHcjs.MSG_SUBSCRIBE_ERROR; exports.MSG_SUBSCRIBE_OK = _chunkKSPH6KMHcjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_UPDATE = _chunkKSPH6KMHcjs.MSG_SUBSCRIBE_UPDATE; exports.MSG_TRACK_STATUS = _chunkKSPH6KMHcjs.MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_REQUEST = _chunkKSPH6KMHcjs.MSG_TRACK_STATUS_REQUEST; exports.MSG_UNANNOUNCE = _chunkKSPH6KMHcjs.MSG_UNANNOUNCE; exports.MSG_UNSUBSCRIBE = _chunkKSPH6KMHcjs.MSG_UNSUBSCRIBE; exports.MSG_UNSUBSCRIBE_ANNOUNCES = _chunkKSPH6KMHcjs.MSG_UNSUBSCRIBE_ANNOUNCES; exports.PARAM_AUTHORIZATION_INFO = _chunkKSPH6KMHcjs.PARAM_AUTHORIZATION_INFO; exports.PARAM_DELIVERY_TIMEOUT = _chunkKSPH6KMHcjs.PARAM_DELIVERY_TIMEOUT; exports.PARAM_MAX_CACHE_DURATION = _chunkKSPH6KMHcjs.PARAM_MAX_CACHE_DURATION; exports.REDACTION_FILL = _chunk5IMHJIAZcjs.REDACTION_FILL; exports.SERVER_ONLY_MESSAGES = _chunkEAHE3IOGcjs.SERVER_ONLY_MESSAGES; exports.SETUP_PARAM_MAX_SUBSCRIBE_ID = _chunkKSPH6KMHcjs.SETUP_PARAM_MAX_SUBSCRIBE_ID; exports.SETUP_PARAM_PATH = _chunkKSPH6KMHcjs.SETUP_PARAM_PATH; exports.SessionErrorCode = SessionErrorCode; exports.SubscribeAnnouncesErrorCode = SubscribeAnnouncesErrorCode; exports.SubscribeDoneStatusCode = SubscribeDoneStatusCode; exports.SubscribeErrorCode = SubscribeErrorCode; exports.TrackStatusCode = TrackStatusCode; exports.createDraft10Codec = _chunkKSPH6KMHcjs.createDraft10Codec; exports.createDraft10SessionState = _chunkEAHE3IOGcjs.createDraft10SessionState; exports.createStreamDecoder = _chunkKSPH6KMHcjs.createStreamDecoder; exports.decodeDataStream = _chunkKSPH6KMHcjs.decodeDataStream; exports.decodeDatagram = _chunkKSPH6KMHcjs.decodeDatagram; exports.decodeDatagramStatus = _chunkKSPH6KMHcjs.decodeDatagramStatus; exports.decodeFetchStream = _chunkKSPH6KMHcjs.decodeFetchStream; exports.decodeMessage = _chunkKSPH6KMHcjs.decodeMessage; exports.decodeSubgroupStream = _chunkKSPH6KMHcjs.decodeSubgroupStream; exports.encodeDatagram = _chunkKSPH6KMHcjs.encodeDatagram; exports.encodeDatagramStatus = _chunkKSPH6KMHcjs.encodeDatagramStatus; exports.encodeFetchStream = _chunkKSPH6KMHcjs.encodeFetchStream; exports.encodeMessage = _chunkKSPH6KMHcjs.encodeMessage; exports.encodeSubgroupStream = _chunkKSPH6KMHcjs.encodeSubgroupStream; exports.getLegalIncoming = _chunkEAHE3IOGcjs.getLegalIncoming; exports.getLegalOutgoing = _chunkEAHE3IOGcjs.getLegalOutgoing; exports.redactAuthTokens = _chunkKSPH6KMHcjs.redactAuthTokens;
@@ -1,4 +1,5 @@
1
- export { D as Draft10Codec, c as createDraft10Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-Cfo_z5ET.cjs';
1
+ export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.cjs';
2
+ export { D as Draft10Codec, c as createDraft10Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-I8u2pfS4.cjs';
2
3
  import { b as Draft10DataStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, S as SubgroupStream, a as Draft10MessageType, D as Draft10Message } from './types-0IWbU9Z_.cjs';
3
4
  export { e as DataStreamEvent, f as DataStreamHeader, g as Draft10Announce, h as Draft10AnnounceCancel, i as Draft10AnnounceError, j as Draft10AnnounceOk, k as Draft10BaseMessage, l as Draft10ClientSetup, m as Draft10Fetch, n as Draft10FetchCancel, o as Draft10FetchError, p as Draft10FetchOk, q as Draft10GoAway, r as Draft10MaxSubscribeId, s as Draft10Params, t as Draft10ServerSetup, u as Draft10SetupParams, v as Draft10Subscribe, w as Draft10SubscribeAnnounces, x as Draft10SubscribeAnnouncesError, y as Draft10SubscribeAnnouncesOk, z as Draft10SubscribeDone, A as Draft10SubscribeError, B as Draft10SubscribeOk, C as Draft10SubscribeUpdate, E as Draft10SubscribesBlocked, G as Draft10TrackStatus, H as Draft10TrackStatusRequest, I as Draft10Unannounce, J as Draft10Unsubscribe, K as Draft10UnsubscribeAnnounces, L as FetchObjectPayload, M as FetchStreamHeader, N as JoiningFetch, O as ObjectPayload, P as StandaloneFetch, Q as SubgroupStreamHeader, U as UnknownParam } from './types-0IWbU9Z_.cjs';
4
5
  export { createDraft10SessionState } from './draft10-session.cjs';
@@ -16,6 +17,73 @@ declare function decodeDatagramStatus(bytes: Uint8Array): DecodeResult<DatagramS
16
17
  declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
17
18
  declare function decodeDataStream(streamType: 'subgroup' | 'datagram' | 'datagram_status' | 'fetch', bytes: Uint8Array): DecodeResult<Draft10DataStream>;
18
19
 
20
+ declare const SessionErrorCode: {
21
+ readonly NoError: 0n;
22
+ readonly InternalError: 1n;
23
+ readonly Unauthorized: 2n;
24
+ readonly ProtocolViolation: 3n;
25
+ readonly DuplicateTrackAlias: 4n;
26
+ readonly ParameterLengthMismatch: 5n;
27
+ readonly TooManySubscribes: 6n;
28
+ readonly GoawayTimeout: 16n;
29
+ readonly ControlMessageTimeout: 17n;
30
+ readonly DataStreamTimeout: 18n;
31
+ };
32
+ type SessionErrorCodeValue = (typeof SessionErrorCode)[keyof typeof SessionErrorCode];
33
+ declare const SubscribeErrorCode: {
34
+ readonly InternalError: 0n;
35
+ readonly Unauthorized: 1n;
36
+ readonly Timeout: 2n;
37
+ readonly NotSupported: 3n;
38
+ readonly TrackDoesNotExist: 4n;
39
+ readonly InvalidRange: 5n;
40
+ readonly RetryTrackAlias: 6n;
41
+ };
42
+ type SubscribeErrorCodeValue = (typeof SubscribeErrorCode)[keyof typeof SubscribeErrorCode];
43
+ declare const SubscribeDoneStatusCode: {
44
+ readonly InternalError: 0n;
45
+ readonly Unauthorized: 1n;
46
+ readonly TrackEnded: 2n;
47
+ readonly SubscriptionEnded: 3n;
48
+ readonly GoingAway: 4n;
49
+ readonly Expired: 5n;
50
+ readonly TooFarBehind: 6n;
51
+ };
52
+ type SubscribeDoneStatusCodeValue = (typeof SubscribeDoneStatusCode)[keyof typeof SubscribeDoneStatusCode];
53
+ declare const FetchErrorCode: {
54
+ readonly InternalError: 0n;
55
+ readonly Unauthorized: 1n;
56
+ readonly Timeout: 2n;
57
+ readonly NotSupported: 3n;
58
+ readonly TrackDoesNotExist: 4n;
59
+ readonly InvalidRange: 5n;
60
+ };
61
+ type FetchErrorCodeValue = (typeof FetchErrorCode)[keyof typeof FetchErrorCode];
62
+ declare const AnnounceErrorCode: {
63
+ readonly InternalError: 0n;
64
+ readonly Unauthorized: 1n;
65
+ readonly Timeout: 2n;
66
+ readonly NotSupported: 3n;
67
+ readonly Uninterested: 4n;
68
+ };
69
+ type AnnounceErrorCodeValue = (typeof AnnounceErrorCode)[keyof typeof AnnounceErrorCode];
70
+ declare const SubscribeAnnouncesErrorCode: {
71
+ readonly InternalError: 0n;
72
+ readonly Unauthorized: 1n;
73
+ readonly Timeout: 2n;
74
+ readonly NotSupported: 3n;
75
+ readonly NamespacePrefixUnknown: 4n;
76
+ };
77
+ type SubscribeAnnouncesErrorCodeValue = (typeof SubscribeAnnouncesErrorCode)[keyof typeof SubscribeAnnouncesErrorCode];
78
+ declare const TrackStatusCode: {
79
+ readonly InProgress: 0n;
80
+ readonly TrackDoesNotExist: 1n;
81
+ readonly NotYetBegun: 2n;
82
+ readonly Finished: 3n;
83
+ readonly RelayStatusUnavailable: 4n;
84
+ };
85
+ type TrackStatusCodeValue = (typeof TrackStatusCode)[keyof typeof TrackStatusCode];
86
+
19
87
  declare const MSG_SUBSCRIBE_UPDATE = 2n;
20
88
  declare const MSG_SUBSCRIBE = 3n;
21
89
  declare const MSG_SUBSCRIBE_OK = 4n;
@@ -104,4 +172,4 @@ declare class Draft10SessionFSM {
104
172
 
105
173
  declare const DRAFT_VERSION = 4278190090n;
106
174
 
107
- export { AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, DatagramStatusObject, Draft10DataStream, Draft10Message, Draft10MessageType, Draft10SessionFSM, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBES_BLOCKED, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SessionPhase, SubgroupStream, SubscriptionState, TransitionResult, ValidationResult, decodeDataStream, decodeDatagram, decodeDatagramStatus, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeDatagramStatus, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
175
+ export { AnnounceErrorCode, type AnnounceErrorCodeValue, AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, DatagramStatusObject, Draft10DataStream, Draft10Message, Draft10MessageType, Draft10SessionFSM, FetchErrorCode, type FetchErrorCodeValue, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBES_BLOCKED, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SessionErrorCode, type SessionErrorCodeValue, SessionPhase, SubgroupStream, SubscribeAnnouncesErrorCode, type SubscribeAnnouncesErrorCodeValue, SubscribeDoneStatusCode, type SubscribeDoneStatusCodeValue, SubscribeErrorCode, type SubscribeErrorCodeValue, SubscriptionState, TrackStatusCode, type TrackStatusCodeValue, TransitionResult, ValidationResult, decodeDataStream, decodeDatagram, decodeDatagramStatus, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeDatagramStatus, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
package/dist/draft10.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { D as Draft10Codec, c as createDraft10Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec--CVeqGQv.js';
1
+ export { A as AuthRedaction, R as REDACTION_FILL } from './auth-redaction-DsdLq4Qs.js';
2
+ export { D as Draft10Codec, c as createDraft10Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage, r as redactAuthTokens } from './codec-DdVBtvx7.js';
2
3
  import { b as Draft10DataStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, S as SubgroupStream, a as Draft10MessageType, D as Draft10Message } from './types-0IWbU9Z_.js';
3
4
  export { e as DataStreamEvent, f as DataStreamHeader, g as Draft10Announce, h as Draft10AnnounceCancel, i as Draft10AnnounceError, j as Draft10AnnounceOk, k as Draft10BaseMessage, l as Draft10ClientSetup, m as Draft10Fetch, n as Draft10FetchCancel, o as Draft10FetchError, p as Draft10FetchOk, q as Draft10GoAway, r as Draft10MaxSubscribeId, s as Draft10Params, t as Draft10ServerSetup, u as Draft10SetupParams, v as Draft10Subscribe, w as Draft10SubscribeAnnounces, x as Draft10SubscribeAnnouncesError, y as Draft10SubscribeAnnouncesOk, z as Draft10SubscribeDone, A as Draft10SubscribeError, B as Draft10SubscribeOk, C as Draft10SubscribeUpdate, E as Draft10SubscribesBlocked, G as Draft10TrackStatus, H as Draft10TrackStatusRequest, I as Draft10Unannounce, J as Draft10Unsubscribe, K as Draft10UnsubscribeAnnounces, L as FetchObjectPayload, M as FetchStreamHeader, N as JoiningFetch, O as ObjectPayload, P as StandaloneFetch, Q as SubgroupStreamHeader, U as UnknownParam } from './types-0IWbU9Z_.js';
4
5
  export { createDraft10SessionState } from './draft10-session.js';
@@ -16,6 +17,73 @@ declare function decodeDatagramStatus(bytes: Uint8Array): DecodeResult<DatagramS
16
17
  declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
17
18
  declare function decodeDataStream(streamType: 'subgroup' | 'datagram' | 'datagram_status' | 'fetch', bytes: Uint8Array): DecodeResult<Draft10DataStream>;
18
19
 
20
+ declare const SessionErrorCode: {
21
+ readonly NoError: 0n;
22
+ readonly InternalError: 1n;
23
+ readonly Unauthorized: 2n;
24
+ readonly ProtocolViolation: 3n;
25
+ readonly DuplicateTrackAlias: 4n;
26
+ readonly ParameterLengthMismatch: 5n;
27
+ readonly TooManySubscribes: 6n;
28
+ readonly GoawayTimeout: 16n;
29
+ readonly ControlMessageTimeout: 17n;
30
+ readonly DataStreamTimeout: 18n;
31
+ };
32
+ type SessionErrorCodeValue = (typeof SessionErrorCode)[keyof typeof SessionErrorCode];
33
+ declare const SubscribeErrorCode: {
34
+ readonly InternalError: 0n;
35
+ readonly Unauthorized: 1n;
36
+ readonly Timeout: 2n;
37
+ readonly NotSupported: 3n;
38
+ readonly TrackDoesNotExist: 4n;
39
+ readonly InvalidRange: 5n;
40
+ readonly RetryTrackAlias: 6n;
41
+ };
42
+ type SubscribeErrorCodeValue = (typeof SubscribeErrorCode)[keyof typeof SubscribeErrorCode];
43
+ declare const SubscribeDoneStatusCode: {
44
+ readonly InternalError: 0n;
45
+ readonly Unauthorized: 1n;
46
+ readonly TrackEnded: 2n;
47
+ readonly SubscriptionEnded: 3n;
48
+ readonly GoingAway: 4n;
49
+ readonly Expired: 5n;
50
+ readonly TooFarBehind: 6n;
51
+ };
52
+ type SubscribeDoneStatusCodeValue = (typeof SubscribeDoneStatusCode)[keyof typeof SubscribeDoneStatusCode];
53
+ declare const FetchErrorCode: {
54
+ readonly InternalError: 0n;
55
+ readonly Unauthorized: 1n;
56
+ readonly Timeout: 2n;
57
+ readonly NotSupported: 3n;
58
+ readonly TrackDoesNotExist: 4n;
59
+ readonly InvalidRange: 5n;
60
+ };
61
+ type FetchErrorCodeValue = (typeof FetchErrorCode)[keyof typeof FetchErrorCode];
62
+ declare const AnnounceErrorCode: {
63
+ readonly InternalError: 0n;
64
+ readonly Unauthorized: 1n;
65
+ readonly Timeout: 2n;
66
+ readonly NotSupported: 3n;
67
+ readonly Uninterested: 4n;
68
+ };
69
+ type AnnounceErrorCodeValue = (typeof AnnounceErrorCode)[keyof typeof AnnounceErrorCode];
70
+ declare const SubscribeAnnouncesErrorCode: {
71
+ readonly InternalError: 0n;
72
+ readonly Unauthorized: 1n;
73
+ readonly Timeout: 2n;
74
+ readonly NotSupported: 3n;
75
+ readonly NamespacePrefixUnknown: 4n;
76
+ };
77
+ type SubscribeAnnouncesErrorCodeValue = (typeof SubscribeAnnouncesErrorCode)[keyof typeof SubscribeAnnouncesErrorCode];
78
+ declare const TrackStatusCode: {
79
+ readonly InProgress: 0n;
80
+ readonly TrackDoesNotExist: 1n;
81
+ readonly NotYetBegun: 2n;
82
+ readonly Finished: 3n;
83
+ readonly RelayStatusUnavailable: 4n;
84
+ };
85
+ type TrackStatusCodeValue = (typeof TrackStatusCode)[keyof typeof TrackStatusCode];
86
+
19
87
  declare const MSG_SUBSCRIBE_UPDATE = 2n;
20
88
  declare const MSG_SUBSCRIBE = 3n;
21
89
  declare const MSG_SUBSCRIBE_OK = 4n;
@@ -104,4 +172,4 @@ declare class Draft10SessionFSM {
104
172
 
105
173
  declare const DRAFT_VERSION = 4278190090n;
106
174
 
107
- export { AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, DatagramStatusObject, Draft10DataStream, Draft10Message, Draft10MessageType, Draft10SessionFSM, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBES_BLOCKED, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SessionPhase, SubgroupStream, SubscriptionState, TransitionResult, ValidationResult, decodeDataStream, decodeDatagram, decodeDatagramStatus, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeDatagramStatus, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
175
+ export { AnnounceErrorCode, type AnnounceErrorCodeValue, AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, DatagramStatusObject, Draft10DataStream, Draft10Message, Draft10MessageType, Draft10SessionFSM, FetchErrorCode, type FetchErrorCodeValue, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBES_BLOCKED, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SessionErrorCode, type SessionErrorCodeValue, SessionPhase, SubgroupStream, SubscribeAnnouncesErrorCode, type SubscribeAnnouncesErrorCodeValue, SubscribeDoneStatusCode, type SubscribeDoneStatusCodeValue, SubscribeErrorCode, type SubscribeErrorCodeValue, SubscriptionState, TrackStatusCode, type TrackStatusCodeValue, TransitionResult, ValidationResult, decodeDataStream, decodeDatagram, decodeDatagramStatus, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeDatagramStatus, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };