@suveren/gateway 0.7.4 → 0.8.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 (264) hide show
  1. package/content/integrations/mollie.json +103 -28
  2. package/dist/control-plane/index.mjs +248 -58
  3. package/dist/mcp-server/http.mjs +577 -124
  4. package/dist/ui/assets/index-BFnSVa9N.js +110 -0
  5. package/dist/ui/assets/{index-CkWaRck1.css → index-BYVb_0oG.css} +1 -1
  6. package/dist/ui/index.html +2 -2
  7. package/node_modules/@hap/core/dist/index.d.mts +285 -13
  8. package/node_modules/@hap/core/dist/index.d.ts +285 -13
  9. package/node_modules/@hap/core/dist/index.js +281 -13
  10. package/node_modules/@hap/core/dist/index.mjs +266 -12
  11. package/node_modules/@hap/core/package.json +4 -2
  12. package/node_modules/@hap/core/src/did-key.ts +126 -0
  13. package/node_modules/@hap/core/src/frame.ts +115 -14
  14. package/node_modules/@hap/core/src/gatekeeper.ts +26 -0
  15. package/node_modules/@hap/core/src/identity.ts +21 -5
  16. package/node_modules/@hap/core/src/index.ts +3 -0
  17. package/node_modules/@hap/core/src/mandate.ts +207 -0
  18. package/node_modules/@hap/core/src/receipt.ts +74 -0
  19. package/node_modules/@hap/core/src/types.ts +87 -5
  20. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/lib/accept.js +54 -0
  21. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/lib/charset.js +10 -34
  22. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/lib/encoding.js +9 -30
  23. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/lib/language.js +15 -36
  24. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/lib/mediaType.js +16 -134
  25. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
  26. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/node_modules/content-type/README.md +71 -0
  27. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +46 -0
  28. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
  29. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/node_modules/content-type/dist/index.js.map +1 -0
  30. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/node_modules/content-type/package.json +52 -0
  31. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/package.json +16 -10
  32. package/node_modules/@types/node/README.md +1 -1
  33. package/node_modules/@types/node/buffer.buffer.d.ts +10 -5
  34. package/node_modules/@types/node/crypto.d.ts +2 -4
  35. package/node_modules/@types/node/dgram.d.ts +119 -4
  36. package/node_modules/@types/node/ffi.d.ts +1 -1
  37. package/node_modules/@types/node/fs/promises.d.ts +61 -65
  38. package/node_modules/@types/node/fs.d.ts +86 -76
  39. package/node_modules/@types/node/http.d.ts +17 -1
  40. package/node_modules/@types/node/http2.d.ts +12 -4
  41. package/node_modules/@types/node/index.d.ts +1 -0
  42. package/node_modules/@types/node/inspector.d.ts +2 -1
  43. package/node_modules/@types/node/net.d.ts +108 -16
  44. package/node_modules/@types/node/package.json +2 -2
  45. package/node_modules/@types/node/process.d.ts +52 -0
  46. package/node_modules/@types/node/quic.d.ts +246 -38
  47. package/node_modules/@types/node/sqlite.d.ts +6 -2
  48. package/node_modules/@types/node/stream/iter.d.ts +4 -4
  49. package/node_modules/@types/node/test.d.ts +36 -0
  50. package/node_modules/@types/node/tls.d.ts +24 -0
  51. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +5 -0
  52. package/node_modules/@types/node/ts5.6/index.d.ts +1 -0
  53. package/node_modules/@types/node/ts5.7/index.d.ts +1 -0
  54. package/node_modules/@types/node/tty.d.ts +4 -3
  55. package/node_modules/@types/node/vfs.d.ts +210 -0
  56. package/node_modules/@types/node/vm.d.ts +1 -1
  57. package/node_modules/express-rate-limit/dist/index.cjs +6 -3
  58. package/node_modules/express-rate-limit/dist/index.d.cts +11 -0
  59. package/node_modules/express-rate-limit/dist/index.d.mts +11 -0
  60. package/node_modules/express-rate-limit/dist/index.d.ts +11 -0
  61. package/node_modules/express-rate-limit/dist/index.mjs +6 -3
  62. package/node_modules/express-rate-limit/{license.md → license} +7 -6
  63. package/node_modules/express-rate-limit/package.json +5 -5
  64. package/node_modules/express-rate-limit/readme.md +1 -0
  65. package/node_modules/fast-uri/index.js +215 -47
  66. package/node_modules/fast-uri/lib/schemes.js +9 -4
  67. package/node_modules/fast-uri/lib/utils.js +396 -92
  68. package/node_modules/fast-uri/package.json +1 -1
  69. package/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
  70. package/node_modules/fast-uri/test/equal.test.js +31 -3
  71. package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
  72. package/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
  73. package/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
  74. package/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
  75. package/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
  76. package/node_modules/fast-uri/test/parse.test.js +7 -3
  77. package/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
  78. package/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
  79. package/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
  80. package/node_modules/fast-uri/test/security-normalization.test.js +101 -0
  81. package/node_modules/fast-uri/test/security.test.js +75 -3
  82. package/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
  83. package/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
  84. package/node_modules/hono/dist/cjs/client/client.js +25 -11
  85. package/node_modules/hono/dist/cjs/client/utils.js +4 -1
  86. package/node_modules/hono/dist/cjs/context.js +4 -0
  87. package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +36 -2
  88. package/node_modules/hono/dist/cjs/helper/ssg/ssg.js +1 -1
  89. package/node_modules/hono/dist/cjs/helper/ssg/utils.js +30 -10
  90. package/node_modules/hono/dist/cjs/jsx/dom/render.js +2 -0
  91. package/node_modules/hono/dist/cjs/middleware/cache/index.js +1 -1
  92. package/node_modules/hono/dist/cjs/middleware/cors/index.js +1 -1
  93. package/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
  94. package/node_modules/hono/dist/cjs/middleware/etag/digest.js +1 -1
  95. package/node_modules/hono/dist/cjs/middleware/etag/index.js +3 -3
  96. package/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
  97. package/node_modules/hono/dist/cjs/request.js +8 -4
  98. package/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
  99. package/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
  100. package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +10 -3
  101. package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +47 -83
  102. package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +2 -1
  103. package/node_modules/hono/dist/cjs/router/trie-router/node.js +46 -69
  104. package/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
  105. package/node_modules/hono/dist/cjs/router/utils.js +27 -0
  106. package/node_modules/hono/dist/cjs/utils/body.js +15 -3
  107. package/node_modules/hono/dist/cjs/utils/cookie.js +1 -1
  108. package/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
  109. package/node_modules/hono/dist/cjs/utils/stream.js +7 -1
  110. package/node_modules/hono/dist/cjs/utils/url.js +9 -1
  111. package/node_modules/hono/dist/client/client.js +25 -11
  112. package/node_modules/hono/dist/client/utils.js +4 -1
  113. package/node_modules/hono/dist/context.js +4 -0
  114. package/node_modules/hono/dist/helper/accepts/accepts.js +36 -2
  115. package/node_modules/hono/dist/helper/ssg/ssg.js +1 -1
  116. package/node_modules/hono/dist/helper/ssg/utils.js +30 -10
  117. package/node_modules/hono/dist/jsx/dom/render.js +2 -0
  118. package/node_modules/hono/dist/middleware/cache/index.js +1 -1
  119. package/node_modules/hono/dist/middleware/cors/index.js +1 -1
  120. package/node_modules/hono/dist/middleware/csrf/index.js +1 -1
  121. package/node_modules/hono/dist/middleware/etag/digest.js +1 -1
  122. package/node_modules/hono/dist/middleware/etag/index.js +3 -3
  123. package/node_modules/hono/dist/middleware/pretty-json/index.js +3 -1
  124. package/node_modules/hono/dist/request.js +8 -4
  125. package/node_modules/hono/dist/router/linear-router/router.js +7 -2
  126. package/node_modules/hono/dist/router/pattern-router/router.js +3 -9
  127. package/node_modules/hono/dist/router/reg-exp-router/node.js +6 -2
  128. package/node_modules/hono/dist/router/reg-exp-router/router.js +53 -84
  129. package/node_modules/hono/dist/router/reg-exp-router/trie.js +2 -1
  130. package/node_modules/hono/dist/router/trie-router/node.js +46 -69
  131. package/node_modules/hono/dist/router/trie-router/router.js +3 -11
  132. package/node_modules/hono/dist/router/utils.js +5 -0
  133. package/node_modules/hono/dist/types/context.d.ts +4 -0
  134. package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +3 -0
  135. package/node_modules/hono/dist/types/router/trie-router/node.d.ts +1 -2
  136. package/node_modules/hono/dist/types/router/trie-router/router.d.ts +0 -1
  137. package/node_modules/hono/dist/types/router/utils.d.ts +1 -0
  138. package/node_modules/hono/dist/types/utils/url.d.ts +4 -0
  139. package/node_modules/hono/dist/utils/body.js +15 -3
  140. package/node_modules/hono/dist/utils/cookie.js +1 -1
  141. package/node_modules/hono/dist/utils/ipaddr.js +5 -3
  142. package/node_modules/hono/dist/utils/stream.js +7 -1
  143. package/node_modules/hono/dist/utils/url.js +9 -1
  144. package/node_modules/hono/package.json +1 -1
  145. package/node_modules/ip-address/README.md +92 -82
  146. package/node_modules/ip-address/dist/common.d.ts +20 -0
  147. package/node_modules/ip-address/dist/common.js +36 -0
  148. package/node_modules/ip-address/dist/common.js.map +1 -1
  149. package/node_modules/ip-address/dist/ipv4.d.ts +50 -0
  150. package/node_modules/ip-address/dist/ipv4.js +75 -0
  151. package/node_modules/ip-address/dist/ipv4.js.map +1 -1
  152. package/node_modules/ip-address/dist/ipv6.d.ts +79 -10
  153. package/node_modules/ip-address/dist/ipv6.js +120 -30
  154. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  155. package/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
  156. package/node_modules/ip-address/dist/v4/constants.js +40 -1
  157. package/node_modules/ip-address/dist/v4/constants.js.map +1 -1
  158. package/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
  159. package/node_modules/ip-address/dist/v6/constants.js +47 -1
  160. package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  161. package/node_modules/ip-address/package.json +1 -1
  162. package/node_modules/is-plain-object/README.md +39 -95
  163. package/node_modules/is-plain-object/dist/is-plain-object.js +0 -2
  164. package/node_modules/is-plain-object/is-plain-object.d.ts +6 -1
  165. package/node_modules/is-plain-object/package.json +8 -34
  166. package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +7 -16
  167. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +10 -20
  168. package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +7 -16
  169. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +16 -38
  170. package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +7 -16
  171. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +19 -38
  172. package/node_modules/jose/dist/types/jwk/embedded.d.ts +3 -8
  173. package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +5 -5
  174. package/node_modules/jose/dist/types/jwks/local.d.ts +6 -10
  175. package/node_modules/jose/dist/types/jwks/remote.d.ts +17 -28
  176. package/node_modules/jose/dist/types/jws/compact/sign.d.ts +5 -10
  177. package/node_modules/jose/dist/types/jws/compact/verify.d.ts +9 -18
  178. package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +7 -16
  179. package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +9 -18
  180. package/node_modules/jose/dist/types/jws/general/sign.d.ts +11 -21
  181. package/node_modules/jose/dist/types/jws/general/verify.d.ts +12 -21
  182. package/node_modules/jose/dist/types/jwt/decrypt.d.ts +10 -20
  183. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +17 -29
  184. package/node_modules/jose/dist/types/jwt/sign.d.ts +12 -19
  185. package/node_modules/jose/dist/types/jwt/unsecured.d.ts +17 -28
  186. package/node_modules/jose/dist/types/jwt/verify.d.ts +9 -19
  187. package/node_modules/jose/dist/types/key/export.d.ts +4 -4
  188. package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +6 -8
  189. package/node_modules/jose/dist/types/key/generate_secret.d.ts +4 -11
  190. package/node_modules/jose/dist/types/key/import.d.ts +10 -17
  191. package/node_modules/jose/dist/types/types.d.ts +48 -86
  192. package/node_modules/jose/dist/types/util/base64url.d.ts +2 -2
  193. package/node_modules/jose/dist/types/util/decode_jwt.d.ts +3 -10
  194. package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +4 -4
  195. package/node_modules/jose/dist/types/util/errors.d.ts +26 -53
  196. package/node_modules/jose/dist/webapi/index.js +70 -32
  197. package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +7 -8
  198. package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +42 -26
  199. package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +14 -10
  200. package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +53 -71
  201. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +38 -49
  202. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +121 -158
  203. package/node_modules/jose/dist/webapi/jwk/embedded.js +30 -18
  204. package/node_modules/jose/dist/webapi/jwk/thumbprint.js +54 -64
  205. package/node_modules/jose/dist/webapi/jwks/local.js +49 -74
  206. package/node_modules/jose/dist/webapi/jwks/remote.js +91 -160
  207. package/node_modules/jose/dist/webapi/jws/compact/sign.js +21 -20
  208. package/node_modules/jose/dist/webapi/jws/compact/verify.js +7 -8
  209. package/node_modules/jose/dist/webapi/jws/flattened/sign.js +29 -30
  210. package/node_modules/jose/dist/webapi/jws/flattened/verify.js +21 -23
  211. package/node_modules/jose/dist/webapi/jws/general/sign.js +61 -70
  212. package/node_modules/jose/dist/webapi/jws/general/verify.js +47 -41
  213. package/node_modules/jose/dist/webapi/jwt/decrypt.js +13 -22
  214. package/node_modules/jose/dist/webapi/jwt/encrypt.js +58 -100
  215. package/node_modules/jose/dist/webapi/jwt/sign.js +18 -50
  216. package/node_modules/jose/dist/webapi/jwt/unsecured.js +34 -63
  217. package/node_modules/jose/dist/webapi/jwt/verify.js +12 -14
  218. package/node_modules/jose/dist/webapi/key/export.js +32 -37
  219. package/node_modules/jose/dist/webapi/key/generate_key_pair.js +40 -44
  220. package/node_modules/jose/dist/webapi/key/generate_secret.js +35 -39
  221. package/node_modules/jose/dist/webapi/key/import.js +52 -52
  222. package/node_modules/jose/dist/webapi/lib/asn1.js +130 -164
  223. package/node_modules/jose/dist/webapi/lib/base64.js +18 -20
  224. package/node_modules/jose/dist/webapi/lib/buffer_utils.js +34 -38
  225. package/node_modules/jose/dist/webapi/lib/content_encryption.js +79 -123
  226. package/node_modules/jose/dist/webapi/lib/crypto_key.js +24 -25
  227. package/node_modules/jose/dist/webapi/lib/deflate.js +46 -40
  228. package/node_modules/jose/dist/webapi/lib/helpers.js +40 -37
  229. package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +10 -24
  230. package/node_modules/jose/dist/webapi/lib/is_key_like.js +17 -15
  231. package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +106 -93
  232. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +210 -176
  233. package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +105 -107
  234. package/node_modules/jose/dist/webapi/lib/jwk_metadata.js +19 -0
  235. package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +9 -16
  236. package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +62 -61
  237. package/node_modules/jose/dist/webapi/lib/jws_sign.js +58 -72
  238. package/node_modules/jose/dist/webapi/lib/jws_verify.js +90 -103
  239. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +134 -185
  240. package/node_modules/jose/dist/webapi/lib/key.js +84 -121
  241. package/node_modules/jose/dist/webapi/lib/key_algorithm.js +13 -8
  242. package/node_modules/jose/dist/webapi/lib/key_descriptor.js +8 -6
  243. package/node_modules/jose/dist/webapi/lib/key_management.js +200 -225
  244. package/node_modules/jose/dist/webapi/lib/key_options.js +8 -0
  245. package/node_modules/jose/dist/webapi/lib/options.js +57 -44
  246. package/node_modules/jose/dist/webapi/lib/signing.js +18 -22
  247. package/node_modules/jose/dist/webapi/lib/type_checks.js +28 -33
  248. package/node_modules/jose/dist/webapi/util/base64url.js +26 -35
  249. package/node_modules/jose/dist/webapi/util/decode_jwt.js +32 -31
  250. package/node_modules/jose/dist/webapi/util/decode_protected_header.js +18 -23
  251. package/node_modules/jose/dist/webapi/util/errors.js +94 -84
  252. package/node_modules/jose/package.json +17 -81
  253. package/package.json +2 -2
  254. package/profiles/calendar/0.5.profile.json +190 -0
  255. package/profiles/charge/0.5.profile.json +210 -0
  256. package/profiles/customers/0.7.profile.json +157 -0
  257. package/profiles/deploy/0.9.profile.json +176 -0
  258. package/profiles/email/0.6.profile.json +208 -0
  259. package/profiles/index.json +9 -1
  260. package/profiles/publish/0.5.profile.json +186 -0
  261. package/profiles/purchase/0.5.profile.json +231 -0
  262. package/profiles/records/0.5.profile.json +117 -0
  263. package/dist/ui/assets/index-0Q2eNytX.js +0 -110
  264. package/node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/HISTORY.md +0 -114
@@ -92,7 +92,7 @@ export type JWKParameters = {
92
92
  kid?: string
93
93
  }
94
94
 
95
- /** Convenience interface for Public OKP JSON Web Keys */
95
+ /** Convenience interface for public OKP JSON Web Keys. */
96
96
  export interface JWK_OKP_Public extends JWKParameters {
97
97
  /** OKP JWK "crv" (The Subtype of Key Pair) Parameter */
98
98
  crv: string
@@ -100,13 +100,13 @@ export interface JWK_OKP_Public extends JWKParameters {
100
100
  x: string
101
101
  }
102
102
 
103
- /** Convenience interface for Private OKP JSON Web Keys */
103
+ /** Convenience interface for private OKP JSON Web Keys. */
104
104
  export interface JWK_OKP_Private extends JWK_OKP_Public {
105
105
  /** OKP JWK "d" (The Private Key) Parameter */
106
106
  d: string
107
107
  }
108
108
 
109
- /** Convenience interface for Public AKP JSON Web Keys */
109
+ /** Convenience interface for public AKP JSON Web Keys. */
110
110
  export interface JWK_AKP_Public extends JWKParameters {
111
111
  /** JWK "alg" (Algorithm) Parameter */
112
112
  alg: string
@@ -114,13 +114,13 @@ export interface JWK_AKP_Public extends JWKParameters {
114
114
  pub: string
115
115
  }
116
116
 
117
- /** Convenience interface for Private AKP JSON Web Keys */
117
+ /** Convenience interface for private AKP JSON Web Keys. */
118
118
  export interface JWK_AKP_Private extends JWK_AKP_Public {
119
119
  /** AKP JWK "priv" (The Private Key) Parameter */
120
120
  priv: string
121
121
  }
122
122
 
123
- /** Convenience interface for Public EC JSON Web Keys */
123
+ /** Convenience interface for public EC JSON Web Keys. */
124
124
  export interface JWK_EC_Public extends JWKParameters {
125
125
  /** EC JWK "crv" (Curve) Parameter */
126
126
  crv: string
@@ -130,13 +130,13 @@ export interface JWK_EC_Public extends JWKParameters {
130
130
  y: string
131
131
  }
132
132
 
133
- /** Convenience interface for Private EC JSON Web Keys */
133
+ /** Convenience interface for private EC JSON Web Keys. */
134
134
  export interface JWK_EC_Private extends JWK_EC_Public {
135
135
  /** EC JWK "d" (ECC Private Key) Parameter */
136
136
  d: string
137
137
  }
138
138
 
139
- /** Convenience interface for Public RSA JSON Web Keys */
139
+ /** Convenience interface for public RSA JSON Web Keys. */
140
140
  export interface JWK_RSA_Public extends JWKParameters {
141
141
  /** RSA JWK "e" (Exponent) Parameter */
142
142
  e: string
@@ -144,7 +144,7 @@ export interface JWK_RSA_Public extends JWKParameters {
144
144
  n: string
145
145
  }
146
146
 
147
- /** Convenience interface for Private RSA JSON Web Keys */
147
+ /** Convenience interface for private RSA JSON Web Keys. */
148
148
  export interface JWK_RSA_Private extends JWK_RSA_Public {
149
149
  /** RSA JWK "d" (Private Exponent) Parameter */
150
150
  d: string
@@ -160,7 +160,7 @@ export interface JWK_RSA_Private extends JWK_RSA_Public {
160
160
  qi: string
161
161
  }
162
162
 
163
- /** Convenience interface for oct JSON Web Keys */
163
+ /** Convenience interface for "oct" JSON Web Keys. */
164
164
  export interface JWK_oct extends JWKParameters {
165
165
  /** Oct JWK "k" (Key Value) Parameter */
166
166
  k: string
@@ -234,11 +234,7 @@ export type JWK = {
234
234
  pub?: string
235
235
  /** AKP JWK "priv" (Private key) Parameter */
236
236
  priv?: string
237
- /**
238
- * RSA JWK "oth" (Other Primes Info) Parameter
239
- *
240
- * > Note: Multi-prime RSA keys are not supported; importing a JWK with this parameter present throws.
241
- */
237
+ /** RSA JWK "oth" (Other Primes Info) Parameter */
242
238
  oth?: Array<{
243
239
  /** The Factor CRT Exponent */
244
240
  d?: string
@@ -249,11 +245,7 @@ export type JWK = {
249
245
  }>
250
246
  }
251
247
 
252
- /**
253
- * Discriminated union of the JSON Web Key shapes supported by this module. Unlike {@link JWK}, each
254
- * member requires and fixes the "kty" (Key Type) Parameter to its key type so that the union can be
255
- * narrowed on it.
256
- */
248
+ /** Discriminated union of the supported JSON Web Key shapes. */
257
249
  // The "kty" is intersected into each arm one at a time rather than distributed over a parenthesised
258
250
  // union - `X & (A | B)` means the same thing, but typedoc renders it without the parentheses, which
259
251
  // reads as though the second arm carried no "kty" at all.
@@ -271,28 +263,18 @@ export type AnyJWK =
271
263
  /** Key or secret input accepted by all sign, verify, encrypt, and decrypt operations. */
272
264
  export type KeyInput = CryptoKey | KeyObject | JWK | Uint8Array
273
265
 
274
- export interface GenericGetKeyFunction<IProtectedHeader, IToken, ReturnKeyTypes> {
266
+ /** Dynamic key resolver for consuming operations. */
267
+ export interface GetKeyFunction<IProtectedHeader, IToken, KeyTypes extends KeyInput = KeyInput> {
275
268
  /**
276
269
  * Dynamic key resolution function. No token components have been verified at the time of this
277
270
  * function call. If a suitable key for the token cannot be matched, throw an error instead.
278
271
  *
279
- * @param protectedHeader JWE or JWS Protected Header.
280
272
  * @param token The consumed JWE or JWS token.
281
273
  */
282
- (protectedHeader: IProtectedHeader, token: IToken): Promise<ReturnKeyTypes> | ReturnKeyTypes
274
+ (protectedHeader: IProtectedHeader, token: IToken): Promise<KeyTypes> | KeyTypes
283
275
  }
284
276
 
285
- /** Interface for consuming operations dynamic key resolution. */
286
- export interface GetKeyFunction<
287
- IProtectedHeader,
288
- IToken,
289
- KeyTypes extends KeyInput = KeyInput,
290
- > extends GenericGetKeyFunction<IProtectedHeader, IToken, KeyTypes> {}
291
-
292
- /**
293
- * Flattened JWS definition for verify function inputs, allows payload as {@link !Uint8Array} for
294
- * detached signature validation.
295
- */
277
+ /** Flattened JWS verification input. */
296
278
  export interface FlattenedJWSInput {
297
279
  /**
298
280
  * The "header" member MUST be present and contain the value JWS Unprotected Header when the JWS
@@ -319,10 +301,7 @@ export interface FlattenedJWSInput {
319
301
  signature: string
320
302
  }
321
303
 
322
- /**
323
- * General JWS definition for verify function inputs, allows payload as {@link !Uint8Array} for
324
- * detached signature validation.
325
- */
304
+ /** General JWS verification input. */
326
305
  export interface GeneralJWSInput {
327
306
  /**
328
307
  * The "payload" member MUST be present and contain the value BASE64URL(JWS Payload). When when
@@ -338,25 +317,19 @@ export interface GeneralJWSInput {
338
317
  signatures: Omit<FlattenedJWSInput, 'payload'>[]
339
318
  }
340
319
 
341
- /**
342
- * Flattened JWS JSON Serialization Syntax token. Payload is returned as an empty string when JWS
343
- * Unencoded Payload ({@link https://www.rfc-editor.org/info/rfc7797/ RFC7797}) is used.
344
- */
320
+ /** Flattened JWS JSON Serialization token. */
345
321
  export interface FlattenedJWS extends Partial<FlattenedJWSInput> {
346
322
  payload: string
347
323
  signature: string
348
324
  }
349
325
 
350
- /**
351
- * General JWS JSON Serialization Syntax token. Payload is returned as an empty string when JWS
352
- * Unencoded Payload ({@link https://www.rfc-editor.org/info/rfc7797/ RFC7797}) is used.
353
- */
326
+ /** General JWS JSON Serialization token. */
354
327
  export interface GeneralJWS {
355
328
  payload: string
356
329
  signatures: Omit<FlattenedJWSInput, 'payload'>[]
357
330
  }
358
331
 
359
- /** Header Parameters common to JWE and JWS */
332
+ /** Header Parameters common to JWE and JWS. */
360
333
  export interface JoseHeaderParameters {
361
334
  /** "kid" (Key ID) Header Parameter */
362
335
  kid?: string
@@ -386,7 +359,7 @@ export interface JoseHeaderParameters {
386
359
  cty?: string
387
360
  }
388
361
 
389
- /** Recognized JWS Header Parameters, any other Header Members may also be present. */
362
+ /** Recognized JWS Header Parameters; additional members may also be present. */
390
363
  export interface JWSHeaderParameters extends JoseHeaderParameters {
391
364
  /** JWS "alg" (Algorithm) Header Parameter */
392
365
  alg?: JWSAlgorithm
@@ -417,11 +390,13 @@ export interface JWEKeyManagementHeaderParameters {
417
390
  * used in ECDH's ConcatKDF.
418
391
  */
419
392
  apv?: Uint8Array
393
+
420
394
  /**
421
- * @deprecated You should not use this parameter. It is only intended for testing and vector
422
- * validation purposes.
395
+ * PBES2 "p2c" (PBES2 Count). This will be used as a JOSE Header Parameter and as the PBKDF2
396
+ * iteration count.
423
397
  */
424
398
  p2c?: number
399
+
425
400
  /**
426
401
  * @deprecated You should not use this parameter. It is only intended for testing and vector
427
402
  * validation purposes.
@@ -439,7 +414,7 @@ export interface JWEKeyManagementHeaderParameters {
439
414
  epk?: CryptoKey | KeyObject
440
415
  }
441
416
 
442
- /** Flattened JWE JSON Serialization Syntax token. */
417
+ /** Flattened JWE JSON Serialization token. */
443
418
  export interface FlattenedJWE {
444
419
  /**
445
420
  * The "aad" member MUST be present and contain the value BASE64URL(JWE AAD)) when the JWE AAD
@@ -493,12 +468,12 @@ export interface FlattenedJWE {
493
468
  unprotected?: JWEHeaderParameters
494
469
  }
495
470
 
496
- /** General JWE JSON Serialization Syntax token. */
471
+ /** General JWE JSON Serialization token. */
497
472
  export interface GeneralJWE extends Omit<FlattenedJWE, 'encrypted_key' | 'header'> {
498
473
  recipients: Pick<FlattenedJWE, 'encrypted_key' | 'header'>[]
499
474
  }
500
475
 
501
- /** Recognized JWE Header Parameters, any other Header members may also be present. */
476
+ /** Recognized JWE Header Parameters; additional members may also be present. */
502
477
  export interface JWEHeaderParameters extends JoseHeaderParameters {
503
478
  /** JWE "alg" (Algorithm) Header Parameter */
504
479
  alg?: JWEKeyManagementAlgorithm
@@ -520,7 +495,7 @@ export interface JWEHeaderParameters extends JoseHeaderParameters {
520
495
  [propName: string]: unknown
521
496
  }
522
497
 
523
- /** Shared Interface with a "crit" property for all sign, verify, encrypt and decrypt operations. */
498
+ /** Shared "crit" option for signing, verification, encryption, and decryption. */
524
499
  export interface CritOption {
525
500
  /**
526
501
  * An object with keys representing recognized "crit" (Critical) Header Parameter names. The value
@@ -557,7 +532,8 @@ export interface DecryptOptions extends CritOption {
557
532
  /**
558
533
  * (PBES2 Key Management Algorithms only) Maximum allowed "p2c" (PBES2 Count) Header Parameter
559
534
  * value. The PBKDF2 iteration count defines the algorithm's computational expense. By default
560
- * this value is set to 10000.
535
+ * this value is set to 10000. The value must be a positive safe integer or `Infinity`. Set it to
536
+ * `Infinity` to disable the limit.
561
537
  */
562
538
  maxPBES2Count?: number
563
539
 
@@ -642,7 +618,7 @@ export interface VerifyOptions extends CritOption {
642
618
  /** JWS Signing options. */
643
619
  export interface SignOptions extends CritOption {}
644
620
 
645
- /** Recognized JWT Claims Set members, any other members may also be present. */
621
+ /** Recognized JWT Claims Set members; additional members may also be present. */
646
622
  export interface JWTPayload {
647
623
  /** JWT Issuer */
648
624
  iss?: string
@@ -669,7 +645,7 @@ export interface JWTPayload {
669
645
  [propName: string]: unknown
670
646
  }
671
647
 
672
- /** Flattened JWE JSON Serialization Syntax decryption result */
648
+ /** Flattened JWE JSON Serialization decryption result. */
673
649
  export interface FlattenedDecryptResult {
674
650
  /** JWE AAD. */
675
651
  additionalAuthenticatedData?: Uint8Array
@@ -687,10 +663,10 @@ export interface FlattenedDecryptResult {
687
663
  unprotectedHeader?: JWEHeaderParameters
688
664
  }
689
665
 
690
- /** General JWE JSON Serialization Syntax decryption result */
666
+ /** General JWE JSON Serialization decryption result. */
691
667
  export interface GeneralDecryptResult extends FlattenedDecryptResult {}
692
668
 
693
- /** Compact JWE decryption result */
669
+ /** Compact JWE decryption result. */
694
670
  export interface CompactDecryptResult {
695
671
  /** Plaintext. */
696
672
  plaintext: Uint8Array
@@ -699,7 +675,7 @@ export interface CompactDecryptResult {
699
675
  protectedHeader: CompactJWEHeaderParameters
700
676
  }
701
677
 
702
- /** Flattened JWS JSON Serialization Syntax verification result */
678
+ /** Flattened JWS JSON Serialization verification result. */
703
679
  export interface FlattenedVerifyResult {
704
680
  /** JWS Payload. */
705
681
  payload: Uint8Array
@@ -711,10 +687,10 @@ export interface FlattenedVerifyResult {
711
687
  unprotectedHeader?: JWSHeaderParameters
712
688
  }
713
689
 
714
- /** General JWS JSON Serialization Syntax verification result */
690
+ /** General JWS JSON Serialization verification result. */
715
691
  export interface GeneralVerifyResult extends FlattenedVerifyResult {}
716
692
 
717
- /** Compact JWS verification result */
693
+ /** Compact JWS verification result. */
718
694
  export interface CompactVerifyResult {
719
695
  /** JWS Payload. */
720
696
  payload: Uint8Array
@@ -723,7 +699,7 @@ export interface CompactVerifyResult {
723
699
  protectedHeader: CompactJWSHeaderParameters
724
700
  }
725
701
 
726
- /** Signed JSON Web Token (JWT) verification result */
702
+ /** Signed JSON Web Token (JWT) verification result. */
727
703
  export interface JWTVerifyResult<PayloadType = JWTPayload> {
728
704
  /** JWT Claims Set. */
729
705
  payload: PayloadType &
@@ -734,7 +710,7 @@ export interface JWTVerifyResult<PayloadType = JWTPayload> {
734
710
  protectedHeader: JWTHeaderParameters
735
711
  }
736
712
 
737
- /** Encrypted JSON Web Token (JWT) decryption result */
713
+ /** Encrypted JSON Web Token (JWT) decryption result. */
738
714
  export interface JWTDecryptResult<PayloadType = JWTPayload> {
739
715
  /** JWT Claims Set. */
740
716
  payload: PayloadType &
@@ -745,60 +721,46 @@ export interface JWTDecryptResult<PayloadType = JWTPayload> {
745
721
  protectedHeader: CompactJWEHeaderParameters
746
722
  }
747
723
 
748
- /** When key resolver functions are used this becomes part of successful resolves */
724
+ /** Key resolver result metadata. */
749
725
  export interface ResolvedKey<KeyType extends CryptoKey | Uint8Array = CryptoKey | Uint8Array> {
750
726
  /** Key resolved from the key resolver function. */
751
727
  key: KeyType
752
728
  }
753
729
 
754
- /** Recognized Compact JWS Header Parameters, any other Header Members may also be present. */
730
+ /** Recognized Compact JWS Header Parameters; additional members may also be present. */
755
731
  export interface CompactJWSHeaderParameters extends JWSHeaderParameters {
756
732
  alg: JWSAlgorithm
757
733
  }
758
734
 
759
- /** Recognized Signed JWT Header Parameters, any other Header Members may also be present. */
735
+ /** Recognized signed JWT Header Parameters; additional members may also be present. */
760
736
  export interface JWTHeaderParameters extends CompactJWSHeaderParameters {
761
737
  b64?: boolean
762
738
  }
763
739
 
764
- /** Recognized Compact JWE Header Parameters, any other Header Members may also be present. */
740
+ /** Recognized Compact JWE Header Parameters; additional members may also be present. */
765
741
  export interface CompactJWEHeaderParameters extends JWEHeaderParameters {
766
742
  alg: JWEKeyManagementAlgorithm
767
743
  enc: JWEContentEncryptionAlgorithm
768
744
  }
769
745
 
770
- /** JSON Web Key Set */
746
+ /** JSON Web Key Set. */
771
747
  export interface JSONWebKeySet {
772
748
  keys: JWK[]
773
749
  }
774
750
 
775
- /**
776
- * {@link !KeyObject} is a representation of a key/secret available in the Node.js runtime. You may
777
- * use the Node.js runtime APIs {@link !createPublicKey}, {@link !createPrivateKey}, and
778
- * {@link !createSecretKey} to obtain a {@link !KeyObject} from your existing key material.
779
- */
751
+ /** Node.js {@link !KeyObject} representation accepted as key input. */
780
752
  export interface KeyObject {
781
753
  type: string
782
754
  }
783
755
 
784
- /**
785
- * {@link !CryptoKey} is a representation of a key/secret available in all supported runtimes. In
786
- * addition to the {@link key/import Key Import Functions} you may use the
787
- * {@link !SubtleCrypto.importKey} API to obtain a {@link !CryptoKey} from your existing key
788
- * material.
789
- */
756
+ /** Web Cryptography API {@link !CryptoKey} representation accepted as key input. */
790
757
  export type CryptoKey = typeof globalThis extends {
791
758
  crypto: { subtle: { generateKey(...args: any[]): Promise<infer R> } }
792
759
  }
793
760
  ? Extract<R, { type: string }>
794
761
  : CryptoKeyStructuralFallback
795
762
 
796
- /**
797
- * Used as {@link CryptoKey} when the host runtime's `crypto` global is not exposed on `typeof
798
- * globalThis`, including when it is absent from ambient types or declared with `const` or `let`. It
799
- * remains structurally compatible with host {@link !CryptoKey} declarations so values flow freely to
800
- * and from {@link !SubtleCrypto} APIs.
801
- */
763
+ /** Structural fallback used when a host {@link !CryptoKey} type cannot be inferred. */
802
764
  export interface CryptoKeyStructuralFallback {
803
765
  readonly algorithm: { name: string }
804
766
  readonly extractable: boolean
@@ -806,7 +768,7 @@ export interface CryptoKeyStructuralFallback {
806
768
  readonly usages: string[]
807
769
  }
808
770
 
809
- /** Generic interface for JWT producing classes. */
771
+ /** Shared fluent API for JWT-producing classes. */
810
772
  export interface ProduceJWT {
811
773
  /**
812
774
  * Set the "iss" (Issuer) Claim.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Decodes a Base64URL encoded input.
2
+ * Decodes a base64url-encoded input.
3
3
  *
4
4
  * @param input Base64URL encoded input, as a string or its UTF-8 bytes.
5
5
  * @returns The decoded bytes.
@@ -8,7 +8,7 @@
8
8
  */
9
9
  export declare function decode(input: Uint8Array | string): Uint8Array;
10
10
  /**
11
- * Encodes an input using Base64URL with no padding.
11
+ * Encodes input using unpadded base64url.
12
12
  *
13
13
  * @param input Input to encode, as a string or as bytes. Strings are encoded as UTF-8 first.
14
14
  * @returns The Base64URL encoded, unpadded, representation of the input.
@@ -1,10 +1,3 @@
1
- import type * as types from '../types.d.ts';
2
- /**
3
- * Decodes a signed JSON Web Token payload. This does not validate the JWT Claims Set types or
4
- * values. This does not validate the JWS Signature. For a proper Signed JWT Claims Set validation
5
- * and JWS signature verification use `jose.jwtVerify()`. For an encrypted JWT Claims Set validation
6
- * and JWE decryption use `jose.jwtDecrypt()`.
7
- *
8
- * @param jwt JWT token in compact JWS serialization.
9
- */
10
- export declare function decodeJwt<PayloadType = types.JWTPayload>(jwt: string): PayloadType & types.JWTPayload & ([PayloadType] extends [object] ? unknown : unknown extends PayloadType ? unknown : never);
1
+ import type * as t from '../types.d.ts';
2
+ /** Decodes the Claims Set of a JWS-formatted JSON Web Token without verifying the signature. */
3
+ export declare function decodeJwt<PayloadType = t.JWTPayload>(jwt: string): PayloadType & t.JWTPayload & ([PayloadType] extends [object] ? unknown : unknown extends PayloadType ? unknown : never);
@@ -1,8 +1,8 @@
1
- import type * as types from '../types.d.ts';
2
- /** JWE and JWS Header Parameters */
3
- export type ProtectedHeaderParameters = types.JWSHeaderParameters & types.JWEHeaderParameters;
1
+ import type * as t from '../types.d.ts';
2
+ /** JWE and JWS Header Parameters. */
3
+ export type ProtectedHeaderParameters = t.JWSHeaderParameters & t.JWEHeaderParameters;
4
4
  /**
5
- * Decodes the Protected Header of a JWE/JWS/JWT token utilizing any JOSE serialization.
5
+ * Decodes the Protected Header of a JWE, JWS, or JWT in any JOSE serialization.
6
6
  *
7
7
  * @param token JWE/JWS/JWT token in any JOSE serialization.
8
8
  */
@@ -1,11 +1,8 @@
1
- import type * as types from '../types.d.ts';
2
- /**
3
- * Every stable error code used by this module. {@link AnyJOSEError} pairs each subclass with the one
4
- * it is thrown with, making that union a discriminated one.
5
- */
1
+ import type * as t from '../types.d.ts';
2
+ /** Stable error codes used by this module. */
6
3
  export type JOSEErrorCode = 'ERR_JOSE_ALG_NOT_ALLOWED' | 'ERR_JOSE_GENERIC' | 'ERR_JOSE_NOT_SUPPORTED' | 'ERR_JWE_DECRYPTION_FAILED' | 'ERR_JWE_INVALID' | 'ERR_JWK_INVALID' | 'ERR_JWKS_INVALID' | 'ERR_JWKS_MULTIPLE_MATCHING_KEYS' | 'ERR_JWKS_NO_MATCHING_KEY' | 'ERR_JWKS_TIMEOUT' | 'ERR_JWS_INVALID' | 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED' | 'ERR_JWT_CLAIM_VALIDATION_FAILED' | 'ERR_JWT_EXPIRED' | 'ERR_JWT_INVALID';
7
4
  /**
8
- * The shape shared by the two errors thrown during JWT Claims Set validation.
5
+ * Shared properties of JWT Claims Set validation errors.
9
6
  *
10
7
  * > Note: {@link JWTExpired} does not extend {@link JWTClaimValidationFailed}, so `instanceof
11
8
  * > JWTClaimValidationFailed` is `false` for an expired JWT. Use {@link JWTClaimValidationError} or
@@ -17,11 +14,11 @@ export interface JWTClaimValidationFailure {
17
14
  /** Reason code for the validation failure. */
18
15
  reason: JWTClaimValidationReason;
19
16
  /** The parsed JWT Claims Set (aka payload). */
20
- payload: types.JWTPayload;
17
+ payload: t.JWTPayload;
21
18
  }
22
19
  /** Reason codes produced by JWT Claims Set validation. */
23
20
  export type JWTClaimValidationReason = 'check_failed' | 'invalid' | 'mismatch' | 'missing' | 'unspecified' | (string & {});
24
- /** A generic Error that all other JOSE specific Error subclasses extend. */
21
+ /** Base class for JOSE errors. */
25
22
  export declare class JOSEError extends Error {
26
23
  /** A unique error code for the particular error subclass. */
27
24
  static code: JOSEErrorCode | (string & {});
@@ -34,10 +31,9 @@ export declare class JOSEError extends Error {
34
31
  cause?: unknown;
35
32
  });
36
33
  }
37
- /** An error subclass thrown when a JWT Claim Set member validation fails. */
34
+ /** Thrown when JWT Claims Set validation fails. */
38
35
  export declare class JWTClaimValidationFailed extends JOSEError implements JWTClaimValidationFailure {
39
36
  static code: JOSEErrorCode | (string & {});
40
- /** A unique error code for {@link JWTClaimValidationFailed}. */
41
37
  code: JOSEErrorCode | (string & {});
42
38
  /** The {@link JWTClaimValidationFailure} carried by every instance of this error. */
43
39
  cause: JWTClaimValidationFailure;
@@ -51,13 +47,12 @@ export declare class JWTClaimValidationFailed extends JOSEError implements JWTCl
51
47
  * has however been verified. Claims Set verification happens after the JWS Signature or JWE
52
48
  * Decryption processes.
53
49
  */
54
- payload: types.JWTPayload;
55
- constructor(message: string, payload: types.JWTPayload, claim?: string, reason?: JWTClaimValidationReason);
50
+ payload: t.JWTPayload;
51
+ constructor(message: string, payload: t.JWTPayload, claim?: string, reason?: JWTClaimValidationReason);
56
52
  }
57
- /** An error subclass thrown when a JWT is expired. */
53
+ /** Thrown when a JWT is expired. */
58
54
  export declare class JWTExpired extends JOSEError implements JWTClaimValidationFailure {
59
55
  static code: JOSEErrorCode | (string & {});
60
- /** A unique error code for {@link JWTExpired}. */
61
56
  code: JOSEErrorCode | (string & {});
62
57
  /** The {@link JWTClaimValidationFailure} carried by every instance of this error. */
63
58
  cause: JWTClaimValidationFailure;
@@ -71,73 +66,61 @@ export declare class JWTExpired extends JOSEError implements JWTClaimValidationF
71
66
  * has however been verified. Claims Set verification happens after the JWS Signature or JWE
72
67
  * Decryption processes.
73
68
  */
74
- payload: types.JWTPayload;
75
- constructor(message: string, payload: types.JWTPayload, claim?: string, reason?: JWTClaimValidationReason);
69
+ payload: t.JWTPayload;
70
+ constructor(message: string, payload: t.JWTPayload, claim?: string, reason?: JWTClaimValidationReason);
76
71
  }
77
- /** An error subclass thrown when a JOSE Algorithm is not allowed per developer preference. */
72
+ /** Thrown when an algorithm is disallowed by configuration. */
78
73
  export declare class JOSEAlgNotAllowed extends JOSEError {
79
74
  static code: JOSEErrorCode | (string & {});
80
- /** A unique error code for {@link JOSEAlgNotAllowed}. */
81
75
  code: JOSEErrorCode | (string & {});
82
76
  }
83
- /**
84
- * An error subclass thrown when a particular feature or algorithm is not supported by this
85
- * implementation or JOSE in general.
86
- */
77
+ /** Thrown when a feature or algorithm is unsupported. */
87
78
  export declare class JOSENotSupported extends JOSEError {
88
79
  static code: JOSEErrorCode | (string & {});
89
- /** A unique error code for {@link JOSENotSupported}. */
90
80
  code: JOSEErrorCode | (string & {});
91
81
  }
92
- /** An error subclass thrown when a JWE ciphertext decryption fails. */
82
+ /** Thrown when JWE ciphertext decryption fails. */
93
83
  export declare class JWEDecryptionFailed extends JOSEError {
94
84
  static code: JOSEErrorCode | (string & {});
95
- /** A unique error code for {@link JWEDecryptionFailed}. */
96
85
  code: JOSEErrorCode | (string & {});
97
86
  constructor(message?: string, options?: {
98
87
  cause?: unknown;
99
88
  });
100
89
  }
101
- /** An error subclass thrown when a JWE is invalid. */
90
+ /** Thrown when a JWE is invalid. */
102
91
  export declare class JWEInvalid extends JOSEError {
103
92
  static code: JOSEErrorCode | (string & {});
104
- /** A unique error code for {@link JWEInvalid}. */
105
93
  code: JOSEErrorCode | (string & {});
106
94
  }
107
- /** An error subclass thrown when a JWS is invalid. */
95
+ /** Thrown when a JWS is invalid. */
108
96
  export declare class JWSInvalid extends JOSEError {
109
97
  static code: JOSEErrorCode | (string & {});
110
- /** A unique error code for {@link JWSInvalid}. */
111
98
  code: JOSEErrorCode | (string & {});
112
99
  }
113
- /** An error subclass thrown when a JWT is invalid. */
100
+ /** Thrown when a JWT is invalid. */
114
101
  export declare class JWTInvalid extends JOSEError {
115
102
  static code: JOSEErrorCode | (string & {});
116
- /** A unique error code for {@link JWTInvalid}. */
117
103
  code: JOSEErrorCode | (string & {});
118
104
  }
119
- /** An error subclass thrown when a JWK is invalid. */
105
+ /** Thrown when a JWK is invalid. */
120
106
  export declare class JWKInvalid extends JOSEError {
121
107
  static code: JOSEErrorCode | (string & {});
122
- /** A unique error code for {@link JWKInvalid}. */
123
108
  code: JOSEErrorCode | (string & {});
124
109
  }
125
- /** An error subclass thrown when a JWKS is invalid. */
110
+ /** Thrown when a JWKS is invalid. */
126
111
  export declare class JWKSInvalid extends JOSEError {
127
112
  static code: JOSEErrorCode | (string & {});
128
- /** A unique error code for {@link JWKSInvalid}. */
129
113
  code: JOSEErrorCode | (string & {});
130
114
  }
131
- /** An error subclass thrown when no keys match from a JWKS. */
115
+ /** Thrown when no keys match in a JWKS. */
132
116
  export declare class JWKSNoMatchingKey extends JOSEError {
133
117
  static code: JOSEErrorCode | (string & {});
134
- /** A unique error code for {@link JWKSNoMatchingKey}. */
135
118
  code: JOSEErrorCode | (string & {});
136
119
  constructor(message?: string, options?: {
137
120
  cause?: unknown;
138
121
  });
139
122
  }
140
- /** An error subclass thrown when multiple keys match from a JWKS. */
123
+ /** Thrown when multiple keys match in a JWKS. */
141
124
  export declare class JWKSMultipleMatchingKeys extends JOSEError {
142
125
  /**
143
126
  * Iterates the public keys that matched the JWS JOSE Header, so that verification can be
@@ -146,43 +129,33 @@ export declare class JWKSMultipleMatchingKeys extends JOSEError {
146
129
  * module always iterate the matched keys; an instance constructed by other code iterates
147
130
  * nothing.
148
131
  */
149
- [Symbol.asyncIterator]: () => AsyncIterableIterator<types.CryptoKey>;
132
+ [Symbol.asyncIterator]: () => AsyncIterableIterator<t.CryptoKey>;
150
133
  static code: JOSEErrorCode | (string & {});
151
- /** A unique error code for {@link JWKSMultipleMatchingKeys}. */
152
134
  code: JOSEErrorCode | (string & {});
153
135
  constructor(message?: string, options?: {
154
136
  cause?: unknown;
155
137
  });
156
138
  }
157
- /** Timeout was reached when retrieving the JWKS response. */
139
+ /** Thrown when fetching a remote JWKS times out. */
158
140
  export declare class JWKSTimeout extends JOSEError {
159
141
  static code: JOSEErrorCode | (string & {});
160
- /** A unique error code for {@link JWKSTimeout}. */
161
142
  code: JOSEErrorCode | (string & {});
162
143
  constructor(message?: string, options?: {
163
144
  cause?: unknown;
164
145
  });
165
146
  }
166
- /** An error subclass thrown when JWS signature verification fails. */
147
+ /** Thrown when JWS signature verification fails. */
167
148
  export declare class JWSSignatureVerificationFailed extends JOSEError {
168
149
  static code: JOSEErrorCode | (string & {});
169
- /** A unique error code for {@link JWSSignatureVerificationFailed}. */
170
150
  code: JOSEErrorCode | (string & {});
171
151
  constructor(message?: string, options?: {
172
152
  cause?: unknown;
173
153
  });
174
154
  }
175
- /**
176
- * Union of the errors thrown during JWT Claims Set validation. {@link JWTExpired} does not extend
177
- * {@link JWTClaimValidationFailed}, so a single `instanceof` check cannot cover both. Use this type
178
- * — together with the {@link JOSEError.code code} discriminant — when handling either.
179
- */
155
+ /** Errors thrown during JWT Claims Set validation. */
180
156
  export type JWTClaimValidationError = JWTClaimValidationFailed | JWTExpired;
181
157
  /**
182
- * Union of every {@link JOSEError} subclass this module throws, each paired with the single
183
- * {@link JOSEErrorCode} it is thrown with. That pairing lives here rather than on the classes, so
184
- * that `code` stays assignable, writable, and overridable on them exactly as before, while a value
185
- * of this type can still be switched over as a discriminated union.
158
+ * Discriminated union of the specific {@link JOSEError} subclasses.
186
159
  *
187
160
  * > Note: The base {@link JOSEError} is deliberately not a member — its `code` spans every value, which
188
161
  * > would defeat the discriminant. A small number of JSON Web Key Set HTTP failures are thrown as the