@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
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/v6/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,GAAG,CAAC;AACX,QAAA,MAAM,GAAG,CAAC,CAAC;AAExB;;;;GAIG;AACU,QAAA,MAAM,GAA0C;IAC3D,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,iBAAiB;IACpB,CAAC,EAAE,YAAY;IACf,CAAC,EAAE,aAAa;IAChB,CAAC,EAAE,YAAY;IACf,CAAC,EAAE,oBAAoB;IACvB,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,UAAU;CACN,CAAC;AAEX;;;;GAIG;AACU,QAAA,KAAK,GAA0C;IAC1D,aAAa,EAAE,yCAAyC;IACxD,aAAa,EAAE,2CAA2C;IAC1D,aAAa,EAAE,oCAAoC;IACnD,aAAa,EAAE,sCAAsC;IACrD,aAAa,EAAE,sCAAsC;IACrD,aAAa,EAAE,mCAAmC;IAClD,aAAa,EAAE,kCAAkC;IACjD,aAAa,EAAE,yBAAyB;IACxC,aAAa,EAAE,2BAA2B;IAC1C,aAAa,EAAE,yBAAyB;IACxC,cAAc,EAAE,2BAA2B;IAC3C,cAAc,EAAE,oBAAoB;IACpC,cAAc,EAAE,oBAAoB;IACpC,cAAc,EAAE,oBAAoB;IACpC,eAAe,EAAE,4DAA4D;IAC7E,eAAe,EAAE,4DAA4D;IAC7E,eAAe,EAAE,2CAA2C;IAC5D,eAAe,EAAE,2CAA2C;IAC5D,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,UAAU;IACrB,eAAe,EAAE,aAAa;IAC9B,UAAU,EAAE,WAAW;IACvB,WAAW,EAAE,oBAAoB;IACjC,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,eAAe;IAChC,cAAc,EAAE,oBAAoB;IACpC,gBAAgB,EAAE,mBAAmB;CAC7B,CAAC;AAEX;;;;GAIG;AACU,QAAA,iBAAiB,GAAG,kBAAkB,CAAC;AAEpD;;;;GAIG;AACU,QAAA,cAAc,GAAG,0CAA0C,CAAC;AAEzE;;;;GAIG;AACU,QAAA,gBAAgB,GAAG,kBAAkB,CAAC;AAEnD;;;;GAIG;AACU,QAAA,cAAc,GAAG,MAAM,CAAC;AAExB,QAAA,MAAM,GAAG,oDAAoD,CAAC;AAC9D,QAAA,gBAAgB,GAAG,+CAA+C,CAAC","sourcesContent":["export const BITS = 128;\nexport const GROUPS = 8;\n\n/**\n * Represents IPv6 address scopes\n * @memberof Address6\n * @static\n */\nexport const SCOPES: { [key: number]: string | undefined } = {\n 0: 'Reserved',\n 1: 'Interface local',\n 2: 'Link local',\n 4: 'Admin local',\n 5: 'Site local',\n 8: 'Organization local',\n 14: 'Global',\n 15: 'Reserved',\n} as const;\n\n/**\n * Represents IPv6 address types\n * @memberof Address6\n * @static\n */\nexport const TYPES: { [key: string]: string | undefined } = {\n 'ff01::1/128': 'Multicast (All nodes on this interface)',\n 'ff01::2/128': 'Multicast (All routers on this interface)',\n 'ff02::1/128': 'Multicast (All nodes on this link)',\n 'ff02::2/128': 'Multicast (All routers on this link)',\n 'ff05::2/128': 'Multicast (All routers in this site)',\n 'ff02::5/128': 'Multicast (OSPFv3 AllSPF routers)',\n 'ff02::6/128': 'Multicast (OSPFv3 AllDR routers)',\n 'ff02::9/128': 'Multicast (RIP routers)',\n 'ff02::a/128': 'Multicast (EIGRP routers)',\n 'ff02::d/128': 'Multicast (PIM routers)',\n 'ff02::16/128': 'Multicast (MLDv2 reports)',\n 'ff01::fb/128': 'Multicast (mDNSv6)',\n 'ff02::fb/128': 'Multicast (mDNSv6)',\n 'ff05::fb/128': 'Multicast (mDNSv6)',\n 'ff02::1:2/128': 'Multicast (All DHCP servers and relay agents on this link)',\n 'ff05::1:2/128': 'Multicast (All DHCP servers and relay agents in this site)',\n 'ff02::1:3/128': 'Multicast (All DHCP servers on this link)',\n 'ff05::1:3/128': 'Multicast (All DHCP servers in this site)',\n '::/128': 'Unspecified',\n '::1/128': 'Loopback',\n '::ffff:0:0/96': 'IPv4-mapped',\n 'ff00::/8': 'Multicast',\n 'fe80::/10': 'Link-local unicast',\n 'fc00::/7': 'Unique local',\n '2002::/16': '6to4',\n '2001:db8::/32': 'Documentation',\n '64:ff9b::/96': 'NAT64 (well-known)',\n '64:ff9b:1::/48': 'NAT64 (local-use)',\n} as const;\n\n/**\n * A regular expression that matches bad characters in an IPv6 address\n * @memberof Address6\n * @static\n */\nexport const RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi;\n\n/**\n * A regular expression that matches an incorrect IPv6 address\n * @memberof Address6\n * @static\n */\nexport const RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\\/$)/gi;\n\n/**\n * A regular expression that matches an IPv6 subnet\n * @memberof Address6\n * @static\n */\nexport const RE_SUBNET_STRING = /\\/\\d{1,3}(?=%|$)/;\n\n/**\n * A regular expression that matches an IPv6 zone\n * @memberof Address6\n * @static\n */\nexport const RE_ZONE_STRING = /%.*$/;\n\nexport const RE_URL = /^(?:\\[([0-9a-f:.]+)\\]|([0-9a-f:.]+))(?:[/?#].*)?$/i;\nexport const RE_URL_WITH_PORT = /^\\[([0-9a-f:.]+)\\]:([0-9]{1,5})(?:[/?#].*)?$/i;\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/v6/constants.ts"],"names":[],"mappings":"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","sourcesContent":["export const BITS = 128;\nexport const GROUPS = 8;\n\n/**\n * Represents IPv6 address scopes\n * @memberof Address6\n * @static\n */\nexport const SCOPES: { [key: number]: string | undefined } = {\n 0: 'Reserved',\n 1: 'Interface local',\n 2: 'Link local',\n 4: 'Admin local',\n 5: 'Site local',\n 8: 'Organization local',\n 14: 'Global',\n 15: 'Reserved',\n} as const;\n\n/**\n * Represents IPv6 address types\n * @memberof Address6\n * @static\n */\nexport const TYPES: { [key: string]: string | undefined } = {\n 'ff01::1/128': 'Multicast (All nodes on this interface)',\n 'ff01::2/128': 'Multicast (All routers on this interface)',\n 'ff02::1/128': 'Multicast (All nodes on this link)',\n 'ff02::2/128': 'Multicast (All routers on this link)',\n 'ff05::2/128': 'Multicast (All routers in this site)',\n 'ff02::5/128': 'Multicast (OSPFv3 AllSPF routers)',\n 'ff02::6/128': 'Multicast (OSPFv3 AllDR routers)',\n 'ff02::9/128': 'Multicast (RIP routers)',\n 'ff02::a/128': 'Multicast (EIGRP routers)',\n 'ff02::d/128': 'Multicast (PIM routers)',\n 'ff02::16/128': 'Multicast (MLDv2 reports)',\n 'ff01::fb/128': 'Multicast (mDNSv6)',\n 'ff02::fb/128': 'Multicast (mDNSv6)',\n 'ff05::fb/128': 'Multicast (mDNSv6)',\n 'ff02::1:2/128': 'Multicast (All DHCP servers and relay agents on this link)',\n 'ff05::1:2/128': 'Multicast (All DHCP servers and relay agents in this site)',\n 'ff02::1:3/128': 'Multicast (All DHCP servers on this link)',\n 'ff05::1:3/128': 'Multicast (All DHCP servers in this site)',\n '::/128': 'Unspecified',\n '::1/128': 'Loopback',\n '::ffff:0:0/96': 'IPv4-mapped',\n 'ff00::/8': 'Multicast',\n 'fe80::/10': 'Link-local unicast',\n 'fc00::/7': 'Unique local',\n '2001::/32': 'Teredo',\n '2001:2::/48': 'Benchmarking',\n '2002::/16': '6to4',\n '2001:db8::/32': 'Documentation',\n '3fff::/20': 'Documentation',\n '100::/64': 'Discard-only',\n 'fec0::/10': 'Site-local unicast (deprecated)',\n '::/96': 'IPv4-compatible (deprecated)',\n '64:ff9b::/96': 'NAT64 (well-known)',\n '64:ff9b:1::/48': 'NAT64 (local-use)',\n} as const;\n\n/**\n * A regular expression that matches bad characters in an IPv6 address\n * @memberof Address6\n * @static\n */\nexport const RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi;\n\n/**\n * A regular expression that matches an incorrect IPv6 address\n * @memberof Address6\n * @static\n */\nexport const RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\\/$)/gi;\n\n/**\n * A regular expression that matches an IPv6 subnet\n * @memberof Address6\n * @static\n */\nexport const RE_SUBNET_STRING = /\\/\\d{1,3}(?=%|$)/;\n\n/**\n * A regular expression that matches an IPv6 zone\n * @memberof Address6\n * @static\n */\nexport const RE_ZONE_STRING = /%.*$/;\n\nexport const RE_URL = /^(?:\\[([0-9a-f:.]+)\\]|([0-9a-f:.]+))(?:[/?#].*)?$/i;\nexport const RE_URL_WITH_PORT = /^\\[([0-9a-f:.]+)\\]:([0-9]{1,5})(?:[/?#].*)?$/i;\n\n/**\n * The IANA IPv6 Special-Purpose Address Registry\n * (https://www.iana.org/assignments/iana-ipv6-special-registry/), one entry\n * per block: `[cidr, name, globallyReachable]`. A `null` reachability means\n * the registry says N/A or leaves the column blank; N/A blocks (Teredo, 6to4)\n * are treated as not globally reachable, since a packet to one needs a relay,\n * and blank blocks inherit the answer of the block containing them.\n *\n * `Address6.isGlobal()` answers from the most specific entry containing the\n * address, after delegating IPv4-mapped and NAT64 well-known addresses to the\n * embedded IPv4 address. `test/data/iana-corpus.json` is generated from the\n * registry's CSV and pins this table to it.\n */\nexport const SPECIAL_PURPOSE: ReadonlyArray<readonly [string, string, boolean | null]> = [\n ['::1/128', 'Loopback Address', false],\n ['::/128', 'Unspecified Address', false],\n ['::ffff:0:0/96', 'IPv4-mapped Address', false],\n ['64:ff9b::/96', 'IPv4-IPv6 Translat.', true],\n ['64:ff9b:1::/48', 'IPv4-IPv6 Translat.', false],\n ['100::/64', 'Discard-Only Address Block', false],\n ['100:0:0:1::/64', 'Dummy IPv6 Prefix', false],\n ['2001::/23', 'IETF Protocol Assignments', false],\n ['2001::/32', 'TEREDO', false],\n ['2001:1::1/128', 'Port Control Protocol Anycast', true],\n ['2001:1::2/128', 'Traversal Using Relays around NAT Anycast', true],\n ['2001:1::3/128', 'DNS-SD Service Registration Protocol Anycast', true],\n ['2001:2::/48', 'Benchmarking', false],\n ['2001:3::/32', 'AMT', true],\n ['2001:4:112::/48', 'AS112-v6', true],\n ['2001:10::/28', 'Deprecated (previously ORCHID)', null],\n ['2001:20::/28', 'ORCHIDv2', true],\n ['2001:30::/28', 'Drone Remote ID Protocol Entity Tags (DETs) Prefix', true],\n ['2001:db8::/32', 'Documentation', false],\n ['2002::/16', '6to4', false],\n ['2620:4f:8000::/48', 'Direct Delegation AS112 Service', true],\n ['3fff::/20', 'Documentation', false],\n ['5f00::/16', 'Segment Routing (SRv6) SIDs', false],\n ['fc00::/7', 'Unique-Local', false],\n ['fe80::/10', 'Link-Local Unicast', false],\n];\n"]}
@@ -16,7 +16,7 @@
16
16
  "bigint",
17
17
  "browser"
18
18
  ],
19
- "version": "10.5.0",
19
+ "version": "10.7.0",
20
20
  "author": "Beau Gunderson <beau@beaugunderson.com> (https://beaugunderson.com/)",
21
21
  "license": "MIT",
22
22
  "main": "dist/ip-address.js",
@@ -1,125 +1,69 @@
1
- # is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object)
1
+ # is-plain-object
2
2
 
3
- > Returns true if an object was created by the `Object` constructor, or Object.create(null).
3
+ [![npm version](https://img.shields.io/npm/v/is-plain-object.svg)](https://www.npmjs.com/package/is-plain-object)
4
+ [![npm downloads](https://img.shields.io/npm/dm/is-plain-object.svg)](https://www.npmjs.com/package/is-plain-object)
5
+ [![CI](https://github.com/jonschlinkert/is-plain-object/actions/workflows/ci.yml/badge.svg)](https://github.com/jonschlinkert/is-plain-object/actions/workflows/ci.yml)
4
6
 
5
- Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
7
+ > Returns `true` if an object was created by the `Object` constructor or with a `null` prototype.
6
8
 
7
- ## Install
9
+ Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and starring the project to show your ❤️ and support.
10
+
11
+ Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check whether a value is an object and not an array or `null`.
8
12
 
9
- Install with [npm](https://www.npmjs.com/):
13
+ ## Install
10
14
 
11
15
  ```sh
12
- $ npm install --save is-plain-object
16
+ npm install is-plain-object
13
17
  ```
14
18
 
15
- Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null.
16
-
17
19
  ## Usage
18
20
 
19
- with es modules
20
- ```js
21
- import { isPlainObject } from 'is-plain-object';
22
- ```
21
+ With ES modules:
23
22
 
24
- or with commonjs
25
23
  ```js
26
- const { isPlainObject } = require('is-plain-object');
27
- ```
28
-
29
- **true** when created by the `Object` constructor, or Object.create(null).
24
+ import { isPlainObject } from 'is-plain-object';
30
25
 
31
- ```js
32
- isPlainObject(Object.create({}));
33
- //=> true
34
- isPlainObject(Object.create(Object.prototype));
35
- //=> true
36
- isPlainObject({foo: 'bar'});
37
- //=> true
38
- isPlainObject({});
39
- //=> true
40
- isPlainObject(null);
41
- //=> true
26
+ isPlainObject({}); // true
27
+ isPlainObject({ foo: 'bar' }); // true
28
+ isPlainObject(Object.create(null)); // true
29
+ isPlainObject(Object.create({})); // true
30
+
31
+ isPlainObject(); // false
32
+ isPlainObject(null); // false
33
+ isPlainObject([]); // false
34
+ isPlainObject(new Date()); // false
35
+ isPlainObject(/foo/); // false
36
+ isPlainObject(() => {}); // false
42
37
  ```
43
38
 
44
- **false** when not created by the `Object` constructor.
39
+ With CommonJS:
45
40
 
46
41
  ```js
47
- isPlainObject(1);
48
- //=> false
49
- isPlainObject(['foo', 'bar']);
50
- //=> false
51
- isPlainObject([]);
52
- //=> false
53
- isPlainObject(new Foo);
54
- //=> false
55
- isPlainObject(Object.create(null));
56
- //=> false
42
+ const { isPlainObject } = require('is-plain-object');
57
43
  ```
58
44
 
59
- ## About
60
-
61
- <details>
62
- <summary><strong>Contributing</strong></summary>
63
-
64
- Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
45
+ ## API
65
46
 
66
- </details>
47
+ ### `isPlainObject(value)`
67
48
 
68
- <details>
69
- <summary><strong>Running Tests</strong></summary>
49
+ Returns `true` when `value` is a plain object. Objects created by the `Object` constructor and objects with a `null` prototype are considered plain.
70
50
 
71
- Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
51
+ ## Development
72
52
 
73
- ```sh
74
- $ npm install && npm test
75
- ```
76
-
77
- </details>
78
-
79
- <details>
80
- <summary><strong>Building docs</strong></summary>
81
-
82
- _(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
83
-
84
- To generate the readme, run the following command:
53
+ Install dependencies, build the CommonJS and ES module bundles, and run the tests:
85
54
 
86
55
  ```sh
87
- $ npm install -g verbose/verb#dev verb-generate-readme && verb
56
+ npm install
57
+ npm run build
58
+ npm test
88
59
  ```
89
60
 
90
- </details>
91
-
92
- ### Related projects
93
-
94
- You might also be interested in these projects:
95
-
96
- * [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.")
97
- * [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
98
- * [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
99
-
100
- ### Contributors
101
-
102
- | **Commits** | **Contributor** |
103
- | --- | --- |
104
- | 19 | [jonschlinkert](https://github.com/jonschlinkert) |
105
- | 6 | [TrySound](https://github.com/TrySound) |
106
- | 6 | [stevenvachon](https://github.com/stevenvachon) |
107
- | 3 | [onokumus](https://github.com/onokumus) |
108
- | 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
109
-
110
- ### Author
111
-
112
- **Jon Schlinkert**
113
-
114
- * [GitHub Profile](https://github.com/jonschlinkert)
115
- * [Twitter Profile](https://twitter.com/jonschlinkert)
116
- * [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
117
-
118
- ### License
61
+ ## Related projects
119
62
 
120
- Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
121
- Released under the [MIT License](LICENSE).
63
+ - [is-number](https://www.npmjs.com/package/is-number): Check if a value is a finite number.
64
+ - [isobject](https://www.npmjs.com/package/isobject): Check if a value is an object and not an array or `null`.
65
+ - [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value.
122
66
 
123
- ***
67
+ ## License
124
68
 
125
- _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._
69
+ [MIT](LICENSE) © Jon Schlinkert
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  /*!
6
4
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
7
5
  *
@@ -1 +1,6 @@
1
- export function isPlainObject(o: any): boolean;
1
+ /**
2
+ * Returns true if an object was created by the `Object` constructor, or Object.create(null).
3
+ *
4
+ * @param value The value to test
5
+ */
6
+ export function isPlainObject(value: unknown): value is Record<PropertyKey, unknown>;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "is-plain-object",
3
3
  "description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).",
4
- "version": "5.0.0",
4
+ "version": "5.1.0",
5
5
  "homepage": "https://github.com/jonschlinkert/is-plain-object",
6
6
  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
7
  "contributors": [
@@ -26,7 +26,8 @@
26
26
  "exports": {
27
27
  ".": {
28
28
  "import": "./dist/is-plain-object.mjs",
29
- "require": "./dist/is-plain-object.js"
29
+ "require": "./dist/is-plain-object.js",
30
+ "types": "./is-plain-object.d.ts"
30
31
  },
31
32
  "./package.json": "./package.json"
32
33
  },
@@ -34,19 +35,12 @@
34
35
  "node": ">=0.10.0"
35
36
  },
36
37
  "scripts": {
37
- "build": "rollup -c",
38
- "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html",
39
- "test_node": "mocha -r esm",
40
- "test": "npm run test_node && npm run build && npm run test_browser",
41
- "prepare": "rollup -c"
38
+ "build": "rollup is-plain-object.js --format cjs --file dist/is-plain-object.js && rollup is-plain-object.js --format esm --file dist/is-plain-object.mjs",
39
+ "test": "node test.js",
40
+ "prepare": "npm run build"
42
41
  },
43
42
  "devDependencies": {
44
- "chai": "^4.2.0",
45
- "esm": "^3.2.22",
46
- "gulp-format-md": "^1.0.0",
47
- "mocha": "^6.1.4",
48
- "mocha-headless-chrome": "^3.1.0",
49
- "rollup": "^2.22.1"
43
+ "rollup": "^4.62.5"
50
44
  },
51
45
  "keywords": [
52
46
  "check",
@@ -61,25 +55,5 @@
61
55
  "type",
62
56
  "typeof",
63
57
  "value"
64
- ],
65
- "verb": {
66
- "toc": false,
67
- "layout": "default",
68
- "tasks": [
69
- "readme"
70
- ],
71
- "plugins": [
72
- "gulp-format-md"
73
- ],
74
- "related": {
75
- "list": [
76
- "is-number",
77
- "isobject",
78
- "kind-of"
79
- ]
80
- },
81
- "lint": {
82
- "reflinks": true
83
- }
84
- }
58
+ ]
85
59
  }
@@ -1,37 +1,28 @@
1
- import type * as types from '../../types.d.ts';
2
- /**
3
- * Interface for Compact JWE Decryption dynamic key resolution. No token components have been
4
- * verified at the time of this function call.
5
- */
6
- export interface CompactDecryptGetKey<KeyType extends types.CryptoKey | Uint8Array = types.CryptoKey | Uint8Array> extends types.GetKeyFunction<types.CompactJWEHeaderParameters, types.FlattenedJWE, KeyType | types.KeyObject | types.JWK> {
1
+ import type * as t from '../../types.d.ts';
2
+ /** Dynamic key resolver for Compact JWE decryption. */
3
+ export interface CompactDecryptGetKey<KeyType extends t.CryptoKey | Uint8Array = t.CryptoKey | Uint8Array> extends t.GetKeyFunction<t.CompactJWEHeaderParameters, t.FlattenedJWE, KeyType | t.KeyObject | t.JWK> {
7
4
  }
8
5
  /**
9
6
  * Decrypts a Compact JWE.
10
7
  *
11
- * @param jwe Compact JWE.
12
8
  * @param key Private Key or Secret to decrypt the JWE with. See
13
9
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
14
- * @param options JWE Decryption options.
15
10
  */
16
- export declare function compactDecrypt(jwe: string | Uint8Array, key: types.KeyInput, options?: types.DecryptOptions): Promise<types.CompactDecryptResult>;
11
+ export declare function compactDecrypt(jwe: string | Uint8Array, key: t.KeyInput, options?: t.DecryptOptions): Promise<t.CompactDecryptResult>;
17
12
  /**
18
13
  * Decrypts a Compact JWE, resolving the key dynamically. The result additionally carries the
19
- * {@link types.ResolvedKey.key resolved key}.
14
+ * {@link t.ResolvedKey.key resolved key}.
20
15
  *
21
- * @param jwe Compact JWE.
22
16
  * @param getKey Function resolving Private Key or Secret to decrypt the JWE with. See
23
17
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
24
- * @param options JWE Decryption options.
25
18
  */
26
- export declare function compactDecrypt<KeyType extends types.CryptoKey | Uint8Array = types.CryptoKey | Uint8Array>(jwe: string | Uint8Array, getKey: CompactDecryptGetKey<KeyType>, options?: types.DecryptOptions): Promise<types.CompactDecryptResult & types.ResolvedKey<KeyType>>;
19
+ export declare function compactDecrypt<KeyType extends t.CryptoKey | Uint8Array = t.CryptoKey | Uint8Array>(jwe: string | Uint8Array, getKey: CompactDecryptGetKey<KeyType>, options?: t.DecryptOptions): Promise<t.CompactDecryptResult & t.ResolvedKey<KeyType>>;
27
20
  /**
28
21
  * Accepts either form of the `key` argument. Use this overload when forwarding a value that may be
29
22
  * either a key or a key resolution function; `key` is present on the result only when a resolution
30
23
  * function was used.
31
24
  *
32
- * @param jwe Compact JWE.
33
25
  * @param key Private Key or Secret, or a function resolving one, to decrypt the JWE with. See
34
26
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
35
- * @param options JWE Decryption options.
36
27
  */
37
- export declare function compactDecrypt(jwe: string | Uint8Array, key: types.KeyInput | CompactDecryptGetKey, options?: types.DecryptOptions): Promise<types.CompactDecryptResult & Partial<types.ResolvedKey>>;
28
+ export declare function compactDecrypt(jwe: string | Uint8Array, key: t.KeyInput | CompactDecryptGetKey, options?: t.DecryptOptions): Promise<t.CompactDecryptResult & Partial<t.ResolvedKey>>;
@@ -1,5 +1,5 @@
1
- import type * as types from '../../types.d.ts';
2
- /** The CompactEncrypt class is used to build and encrypt Compact JWE strings. */
1
+ import type * as t from '../../types.d.ts';
2
+ /** Builds and encrypts Compact JWE strings. */
3
3
  export declare class CompactEncrypt {
4
4
  #private;
5
5
  /**
@@ -14,8 +14,6 @@ export declare class CompactEncrypt {
14
14
  *
15
15
  * @deprecated You should not use this method. It is only really intended for test and vector
16
16
  * validation purposes.
17
- *
18
- * @param cek JWE Content Encryption Key.
19
17
  */
20
18
  setContentEncryptionKey(cek: Uint8Array): this;
21
19
  /**
@@ -24,30 +22,22 @@ export declare class CompactEncrypt {
24
22
  *
25
23
  * @deprecated You should not use this method. It is only really intended for test and vector
26
24
  * validation purposes.
27
- *
28
- * @param iv JWE Initialization Vector.
29
25
  */
30
26
  setInitializationVector(iv: Uint8Array): this;
27
+ /** Sets the JWE Protected Header on the CompactEncrypt object. */
28
+ setProtectedHeader(protectedHeader: t.CompactJWEHeaderParameters): this;
31
29
  /**
32
- * Sets the JWE Protected Header on the CompactEncrypt object.
33
- *
34
- * @param protectedHeader JWE Protected Header object.
35
- */
36
- setProtectedHeader(protectedHeader: types.CompactJWEHeaderParameters): this;
37
- /**
38
- * Sets the JWE Key Management parameters to be used when encrypting. For ECDH based algorithms,
39
- * use this method to set the "apu" (Agreement PartyUInfo) or "apv" (Agreement PartyVInfo)
40
- * parameters.
41
- *
42
- * @param parameters JWE Key Management parameters.
30
+ * Sets the JWE Key Management parameters to be used when encrypting. Use this method instead of
31
+ * the header setters to configure algorithm inputs such as ECDH-ES "apu" (Agreement PartyUInfo)
32
+ * and "apv" (Agreement PartyVInfo), or PBES2 "p2c" (PBES2 Count). The parameters are added to the
33
+ * appropriate JOSE Header.
43
34
  */
44
- setKeyManagementParameters(parameters: types.JWEKeyManagementHeaderParameters): this;
35
+ setKeyManagementParameters(parameters: t.JWEKeyManagementHeaderParameters): this;
45
36
  /**
46
37
  * Encrypts and resolves the value of the Compact JWE string.
47
38
  *
48
39
  * @param key Public Key or Secret to encrypt the JWE with. See
49
40
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
50
- * @param options JWE Encryption options.
51
41
  */
52
- encrypt(key: types.KeyInput, options?: types.EncryptOptions): Promise<string>;
42
+ encrypt(key: t.KeyInput, options?: t.EncryptOptions): Promise<string>;
53
43
  }
@@ -1,37 +1,28 @@
1
- import type * as types from '../../types.d.ts';
2
- /**
3
- * Interface for Flattened JWE Decryption dynamic key resolution. No token components have been
4
- * verified at the time of this function call.
5
- */
6
- export interface FlattenedDecryptGetKey<KeyType extends types.CryptoKey | Uint8Array = types.CryptoKey | Uint8Array> extends types.GetKeyFunction<types.JWEHeaderParameters | undefined, types.FlattenedJWE, KeyType | types.KeyObject | types.JWK> {
1
+ import type * as t from '../../types.d.ts';
2
+ /** Dynamic key resolver for Flattened JWE decryption. */
3
+ export interface FlattenedDecryptGetKey<KeyType extends t.CryptoKey | Uint8Array = t.CryptoKey | Uint8Array> extends t.GetKeyFunction<t.JWEHeaderParameters | undefined, t.FlattenedJWE, KeyType | t.KeyObject | t.JWK> {
7
4
  }
8
5
  /**
9
6
  * Decrypts a Flattened JWE.
10
7
  *
11
- * @param jwe Flattened JWE.
12
8
  * @param key Private Key or Secret to decrypt the JWE with. See
13
9
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
14
- * @param options JWE Decryption options.
15
10
  */
16
- export declare function flattenedDecrypt(jwe: types.FlattenedJWE, key: types.KeyInput, options?: types.DecryptOptions): Promise<types.FlattenedDecryptResult>;
11
+ export declare function flattenedDecrypt(jwe: t.FlattenedJWE, key: t.KeyInput, options?: t.DecryptOptions): Promise<t.FlattenedDecryptResult>;
17
12
  /**
18
13
  * Decrypts a Flattened JWE, resolving the key dynamically. The result additionally carries the
19
- * {@link types.ResolvedKey.key resolved key}.
14
+ * {@link t.ResolvedKey.key resolved key}.
20
15
  *
21
- * @param jwe Flattened JWE.
22
16
  * @param getKey Function resolving Private Key or Secret to decrypt the JWE with. See
23
17
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
24
- * @param options JWE Decryption options.
25
18
  */
26
- export declare function flattenedDecrypt<KeyType extends types.CryptoKey | Uint8Array = types.CryptoKey | Uint8Array>(jwe: types.FlattenedJWE, getKey: FlattenedDecryptGetKey<KeyType>, options?: types.DecryptOptions): Promise<types.FlattenedDecryptResult & types.ResolvedKey<KeyType>>;
19
+ export declare function flattenedDecrypt<KeyType extends t.CryptoKey | Uint8Array = t.CryptoKey | Uint8Array>(jwe: t.FlattenedJWE, getKey: FlattenedDecryptGetKey<KeyType>, options?: t.DecryptOptions): Promise<t.FlattenedDecryptResult & t.ResolvedKey<KeyType>>;
27
20
  /**
28
21
  * Accepts either form of the `key` argument. Use this overload when forwarding a value that may be
29
22
  * either a key or a key resolution function; `key` is present on the result only when a resolution
30
23
  * function was used.
31
24
  *
32
- * @param jwe Flattened JWE.
33
25
  * @param key Private Key or Secret, or a function resolving one, to decrypt the JWE with. See
34
26
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
35
- * @param options JWE Decryption options.
36
27
  */
37
- export declare function flattenedDecrypt(jwe: types.FlattenedJWE, key: types.KeyInput | FlattenedDecryptGetKey, options?: types.DecryptOptions): Promise<types.FlattenedDecryptResult & Partial<types.ResolvedKey>>;
28
+ export declare function flattenedDecrypt(jwe: t.FlattenedJWE, key: t.KeyInput | FlattenedDecryptGetKey, options?: t.DecryptOptions): Promise<t.FlattenedDecryptResult & Partial<t.ResolvedKey>>;
@@ -1,5 +1,5 @@
1
- import type * as types from '../../types.d.ts';
2
- /** The FlattenedEncrypt class is used to build and encrypt Flattened JWE objects. */
1
+ import type * as t from '../../types.d.ts';
2
+ /** Builds and encrypts Flattened JWE objects. */
3
3
  export declare class FlattenedEncrypt {
4
4
  #private;
5
5
  /**
@@ -9,36 +9,19 @@ export declare class FlattenedEncrypt {
9
9
  */
10
10
  constructor(plaintext: Uint8Array);
11
11
  /**
12
- * Sets the JWE Key Management parameters to be used when encrypting. For ECDH based algorithms,
13
- * use this method to set the "apu" (Agreement PartyUInfo) or "apv" (Agreement PartyVInfo)
14
- * parameters.
15
- *
16
- * @param parameters JWE Key Management parameters.
17
- */
18
- setKeyManagementParameters(parameters: types.JWEKeyManagementHeaderParameters): this;
19
- /**
20
- * Sets the JWE Protected Header on the FlattenedEncrypt object.
21
- *
22
- * @param protectedHeader JWE Protected Header.
23
- */
24
- setProtectedHeader(protectedHeader: types.JWEHeaderParameters): this;
25
- /**
26
- * Sets the JWE Shared Unprotected Header on the FlattenedEncrypt object.
27
- *
28
- * @param sharedUnprotectedHeader JWE Shared Unprotected Header.
29
- */
30
- setSharedUnprotectedHeader(sharedUnprotectedHeader: types.JWEHeaderParameters): this;
31
- /**
32
- * Sets the JWE Per-Recipient Unprotected Header on the FlattenedEncrypt object.
33
- *
34
- * @param unprotectedHeader JWE Per-Recipient Unprotected Header.
35
- */
36
- setUnprotectedHeader(unprotectedHeader: types.JWEHeaderParameters): this;
37
- /**
38
- * Sets the Additional Authenticated Data on the FlattenedEncrypt object.
39
- *
40
- * @param aad Additional Authenticated Data.
41
- */
12
+ * Sets the JWE Key Management parameters to be used when encrypting. Use this method instead of
13
+ * the header setters to configure algorithm inputs such as ECDH-ES "apu" (Agreement PartyUInfo)
14
+ * and "apv" (Agreement PartyVInfo), or PBES2 "p2c" (PBES2 Count). The parameters are added to the
15
+ * appropriate JOSE Header.
16
+ */
17
+ setKeyManagementParameters(parameters: t.JWEKeyManagementHeaderParameters): this;
18
+ /** Sets the JWE Protected Header on the FlattenedEncrypt object. */
19
+ setProtectedHeader(protectedHeader: t.JWEHeaderParameters): this;
20
+ /** Sets the JWE Shared Unprotected Header on the FlattenedEncrypt object. */
21
+ setSharedUnprotectedHeader(sharedUnprotectedHeader: t.JWEHeaderParameters): this;
22
+ /** Sets the JWE Per-Recipient Unprotected Header on the FlattenedEncrypt object. */
23
+ setUnprotectedHeader(unprotectedHeader: t.JWEHeaderParameters): this;
24
+ /** Sets the Additional Authenticated Data on the FlattenedEncrypt object. */
42
25
  setAdditionalAuthenticatedData(aad: Uint8Array): this;
43
26
  /**
44
27
  * Sets a content encryption key to use, by default a random suitable one is generated for the JWE
@@ -46,8 +29,6 @@ export declare class FlattenedEncrypt {
46
29
  *
47
30
  * @deprecated You should not use this method. It is only really intended for test and vector
48
31
  * validation purposes.
49
- *
50
- * @param cek JWE Content Encryption Key.
51
32
  */
52
33
  setContentEncryptionKey(cek: Uint8Array): this;
53
34
  /**
@@ -56,8 +37,6 @@ export declare class FlattenedEncrypt {
56
37
  *
57
38
  * @deprecated You should not use this method. It is only really intended for test and vector
58
39
  * validation purposes.
59
- *
60
- * @param iv JWE Initialization Vector.
61
40
  */
62
41
  setInitializationVector(iv: Uint8Array): this;
63
42
  /**
@@ -65,7 +44,6 @@ export declare class FlattenedEncrypt {
65
44
  *
66
45
  * @param key Public Key or Secret to encrypt the JWE with. See
67
46
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
68
- * @param options JWE Encryption options.
69
47
  */
70
- encrypt(key: types.KeyInput, options?: types.EncryptOptions): Promise<types.FlattenedJWE>;
48
+ encrypt(key: t.KeyInput, options?: t.EncryptOptions): Promise<t.FlattenedJWE>;
71
49
  }
@@ -1,9 +1,6 @@
1
- import type * as types from '../../types.d.ts';
2
- /**
3
- * Interface for General JWE Decryption dynamic key resolution. No token components have been
4
- * verified at the time of this function call.
5
- */
6
- export interface GeneralDecryptGetKey<KeyType extends types.CryptoKey | Uint8Array = types.CryptoKey | Uint8Array> extends types.GetKeyFunction<types.JWEHeaderParameters | undefined, types.FlattenedJWE, KeyType | types.KeyObject | types.JWK> {
1
+ import type * as t from '../../types.d.ts';
2
+ /** Dynamic key resolver for General JWE decryption. */
3
+ export interface GeneralDecryptGetKey<KeyType extends t.CryptoKey | Uint8Array = t.CryptoKey | Uint8Array> extends t.GetKeyFunction<t.JWEHeaderParameters | undefined, t.FlattenedJWE, KeyType | t.KeyObject | t.JWK> {
7
4
  }
8
5
  /**
9
6
  * Decrypts a General JWE.
@@ -14,30 +11,24 @@ export interface GeneralDecryptGetKey<KeyType extends types.CryptoKey | Uint8Arr
14
11
  * > in the General JWE are not validated, and their headers are not included in the returned result.
15
12
  * > Recipients of a General JWE should only rely on the returned (decrypted) data.
16
13
  *
17
- * @param jwe General JWE.
18
14
  * @param key Private Key or Secret to decrypt the JWE with. See
19
15
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
20
- * @param options JWE Decryption options.
21
16
  */
22
- export declare function generalDecrypt(jwe: types.GeneralJWE, key: types.KeyInput, options?: types.DecryptOptions): Promise<types.GeneralDecryptResult>;
17
+ export declare function generalDecrypt(jwe: t.GeneralJWE, key: t.KeyInput, options?: t.DecryptOptions): Promise<t.GeneralDecryptResult>;
23
18
  /**
24
19
  * Decrypts a General JWE, resolving the key dynamically. The result additionally carries the
25
- * {@link types.ResolvedKey.key resolved key}.
20
+ * {@link t.ResolvedKey.key resolved key}.
26
21
  *
27
- * @param jwe General JWE.
28
22
  * @param getKey Function resolving Private Key or Secret to decrypt the JWE with. See
29
23
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
30
- * @param options JWE Decryption options.
31
24
  */
32
- export declare function generalDecrypt<KeyType extends types.CryptoKey | Uint8Array = types.CryptoKey | Uint8Array>(jwe: types.GeneralJWE, getKey: GeneralDecryptGetKey<KeyType>, options?: types.DecryptOptions): Promise<types.GeneralDecryptResult & types.ResolvedKey<KeyType>>;
25
+ export declare function generalDecrypt<KeyType extends t.CryptoKey | Uint8Array = t.CryptoKey | Uint8Array>(jwe: t.GeneralJWE, getKey: GeneralDecryptGetKey<KeyType>, options?: t.DecryptOptions): Promise<t.GeneralDecryptResult & t.ResolvedKey<KeyType>>;
33
26
  /**
34
27
  * Accepts either form of the `key` argument. Use this overload when forwarding a value that may be
35
28
  * either a key or a key resolution function; `key` is present on the result only when a resolution
36
29
  * function was used.
37
30
  *
38
- * @param jwe General JWE.
39
31
  * @param key Private Key or Secret, or a function resolving one, to decrypt the JWE with. See
40
32
  * {@link https://github.com/panva/jose/issues/210#jwe-alg Algorithm Key Requirements}.
41
- * @param options JWE Decryption options.
42
33
  */
43
- export declare function generalDecrypt(jwe: types.GeneralJWE, key: types.KeyInput | GeneralDecryptGetKey, options?: types.DecryptOptions): Promise<types.GeneralDecryptResult & Partial<types.ResolvedKey>>;
34
+ export declare function generalDecrypt(jwe: t.GeneralJWE, key: t.KeyInput | GeneralDecryptGetKey, options?: t.DecryptOptions): Promise<t.GeneralDecryptResult & Partial<t.ResolvedKey>>;