@twin.org/web 0.0.1-next.6 → 0.0.1-next.62

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 (37) hide show
  1. package/dist/cjs/index.cjs +274 -98
  2. package/dist/esm/index.mjs +275 -100
  3. package/dist/types/index.d.ts +3 -1
  4. package/dist/types/models/IJwk.d.ts +2 -58
  5. package/dist/types/models/IJwtHeader.d.ts +2 -18
  6. package/dist/types/models/IJwtPayload.d.ts +2 -33
  7. package/dist/types/models/headerTypes.d.ts +8 -8
  8. package/dist/types/models/jwkCryptoKey.d.ts +4 -0
  9. package/dist/types/models/mimeTypes.d.ts +4 -0
  10. package/dist/types/utils/fetchHelper.d.ts +7 -0
  11. package/dist/types/utils/jwk.d.ts +35 -0
  12. package/dist/types/utils/jws.d.ts +22 -0
  13. package/dist/types/utils/jwt.d.ts +67 -29
  14. package/docs/changelog.md +205 -1
  15. package/docs/reference/classes/FetchError.md +16 -8
  16. package/docs/reference/classes/FetchHelper.md +104 -28
  17. package/docs/reference/classes/Jwk.md +107 -0
  18. package/docs/reference/classes/Jws.md +81 -0
  19. package/docs/reference/classes/Jwt.md +261 -105
  20. package/docs/reference/classes/MimeTypeHelper.md +9 -5
  21. package/docs/reference/index.md +3 -2
  22. package/docs/reference/interfaces/IHttpHeaders.md +1 -1
  23. package/docs/reference/interfaces/IJwk.md +2 -106
  24. package/docs/reference/interfaces/IJwtHeader.md +5 -23
  25. package/docs/reference/interfaces/IJwtPayload.md +5 -55
  26. package/docs/reference/type-aliases/HeaderTypes.md +1 -1
  27. package/docs/reference/type-aliases/HttpMethod.md +1 -1
  28. package/docs/reference/type-aliases/HttpStatusCode.md +1 -1
  29. package/docs/reference/type-aliases/JwkCryptoKey.md +5 -0
  30. package/docs/reference/type-aliases/MimeTypes.md +1 -1
  31. package/docs/reference/variables/HeaderTypes.md +8 -8
  32. package/docs/reference/variables/MimeTypes.md +6 -0
  33. package/locales/en.json +11 -1
  34. package/package.json +7 -6
  35. package/dist/types/models/jwtAlgorithms.d.ts +0 -17
  36. package/docs/reference/type-aliases/JwtAlgorithms.md +0 -5
  37. package/docs/reference/variables/JwtAlgorithms.md +0 -19
@@ -5,35 +5,35 @@ export declare const HeaderTypes: {
5
5
  /**
6
6
  * Content Type.
7
7
  */
8
- readonly ContentType: "Content-Type";
8
+ readonly ContentType: "content-type";
9
9
  /**
10
10
  * Content Length.
11
11
  */
12
- readonly ContentLength: "Content-Length";
12
+ readonly ContentLength: "content-length";
13
13
  /**
14
14
  * Content Disposition.
15
15
  */
16
- readonly ContentDisposition: "Content-Disposition";
16
+ readonly ContentDisposition: "content-disposition";
17
17
  /**
18
18
  * Accept.
19
19
  */
20
- readonly Accept: "Accept";
20
+ readonly Accept: "accept";
21
21
  /**
22
22
  * Authorization.
23
23
  */
24
- readonly Authorization: "Authorization";
24
+ readonly Authorization: "authorization";
25
25
  /**
26
26
  * Cookie.
27
27
  */
28
- readonly Cookie: "Cookie";
28
+ readonly Cookie: "cookie";
29
29
  /**
30
30
  * Set Cookie.
31
31
  */
32
- readonly SetCookie: "Set-Cookie";
32
+ readonly SetCookie: "set-cookie";
33
33
  /**
34
34
  * Location
35
35
  */
36
- readonly Location: "Location";
36
+ readonly Location: "location";
37
37
  };
38
38
  /**
39
39
  * Common http header types.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The crypto key for a JWK.
3
+ */
4
+ export type JwkCryptoKey = CryptoKey | Uint8Array;
@@ -22,6 +22,10 @@ export declare const MimeTypes: {
22
22
  * JSON-LD - application/ld+json
23
23
  */
24
24
  readonly JsonLd: "application/ld+json";
25
+ /**
26
+ * JWT - application/jwt
27
+ */
28
+ readonly Jwt: "application/jwt";
25
29
  /**
26
30
  * XML - application/xml
27
31
  */
@@ -44,6 +44,13 @@ export declare class FetchHelper {
44
44
  * @returns The cache entry if it exists.
45
45
  */
46
46
  static getCacheEntry<T>(url: string): Promise<T | undefined>;
47
+ /**
48
+ * Set a cache entry.
49
+ * @param url The url for the request.
50
+ * @param value The value to cache.
51
+ * @returns The cache entry if it exists.
52
+ */
53
+ static setCacheEntry<T>(url: string, value: T): Promise<void>;
47
54
  /**
48
55
  * Remove a cache entry.
49
56
  * @param url The url for the request.
@@ -0,0 +1,35 @@
1
+ import type { IJwk } from "../models/IJwk";
2
+ import type { JwkCryptoKey } from "../models/jwkCryptoKey";
3
+ /**
4
+ * Class to handle JSON Web Keys.
5
+ */
6
+ export declare class Jwk {
7
+ /**
8
+ * Convert the JWK to a crypto key.
9
+ * @param jwk The JWK to convert.
10
+ * @param alg The alg to be used, defaults to jwk.alg.
11
+ * @returns The crypto key.
12
+ */
13
+ static toCryptoKey(jwk: IJwk, alg?: string): Promise<JwkCryptoKey>;
14
+ /**
15
+ * Convert the Ed25519 private key to a crypto key.
16
+ * @param privateKey The private key to use.
17
+ * @returns The crypto key.
18
+ */
19
+ static fromEd25519Private(privateKey: Uint8Array): Promise<IJwk>;
20
+ /**
21
+ * Convert the Ed25519 public key to a crypto key.
22
+ * @param publicKey The private key to use.
23
+ * @returns The crypto key.
24
+ */
25
+ static fromEd25519Public(publicKey: Uint8Array): Promise<IJwk>;
26
+ /**
27
+ * Convert the JWK to raw keys.
28
+ * @param jwk The JWK to convert to raw.
29
+ * @returns The crypto key.
30
+ */
31
+ static toRaw(jwk: IJwk): Promise<{
32
+ publicKey?: Uint8Array;
33
+ privateKey?: Uint8Array;
34
+ }>;
35
+ }
@@ -0,0 +1,22 @@
1
+ import type { JwkCryptoKey } from "../models/jwkCryptoKey";
2
+ /**
3
+ * Class to handle JSON Web Signatures.
4
+ */
5
+ export declare class Jws {
6
+ /**
7
+ * Create a signature.
8
+ * @param privateKey The private key to use.
9
+ * @param hash The hash to sign.
10
+ * @param algOverride An optional algorithm override.
11
+ * @returns The signature.
12
+ */
13
+ static create(privateKey: JwkCryptoKey, hash: Uint8Array, algOverride?: string): Promise<string>;
14
+ /**
15
+ * Verify a signature.
16
+ * @param jws The signature to verify.
17
+ * @param publicKey The public key to verify the signature with.
18
+ * @param hash The hash to verify.
19
+ * @returns True if the signature was verified.
20
+ */
21
+ static verify(jws: string, publicKey: JwkCryptoKey, hash: Uint8Array): Promise<boolean>;
22
+ }
@@ -1,8 +1,8 @@
1
1
  import type { IJwtHeader } from "../models/IJwtHeader";
2
2
  import type { IJwtPayload } from "../models/IJwtPayload";
3
- import { JwtAlgorithms } from "../models/jwtAlgorithms";
3
+ import type { JwkCryptoKey } from "../models/jwkCryptoKey";
4
4
  /**
5
- * Class to encode and decode JSON Web Tokens.
5
+ * Class to handle JSON Web Tokens.
6
6
  */
7
7
  export declare class Jwt {
8
8
  /**
@@ -12,7 +12,7 @@ export declare class Jwt {
12
12
  * @param key The key for signing the token, can be omitted if a signer is provided.
13
13
  * @returns The encoded token.
14
14
  */
15
- static encode<U extends IJwtHeader, T extends IJwtPayload>(header: U, payload: T, key: Uint8Array): Promise<string>;
15
+ static encode<T extends IJwtHeader, U extends IJwtPayload>(header: T, payload: U, key: JwkCryptoKey): Promise<string>;
16
16
  /**
17
17
  * Encode a token.
18
18
  * @param header The header to encode.
@@ -20,15 +20,15 @@ export declare class Jwt {
20
20
  * @param signer Custom signer method.
21
21
  * @returns The encoded token.
22
22
  */
23
- static encodeWithSigner<U extends IJwtHeader, T extends IJwtPayload>(header: U, payload: T, signer: (alg: JwtAlgorithms, key: Uint8Array | undefined, payload: Uint8Array) => Promise<Uint8Array>): Promise<string>;
23
+ static encodeWithSigner<T extends IJwtHeader, U extends IJwtPayload>(header: T, payload: U, signer: (header: IJwtHeader, payload: IJwtPayload, key: JwkCryptoKey | undefined) => Promise<string>): Promise<string>;
24
24
  /**
25
25
  * Decode a token.
26
26
  * @param token The token to decode.
27
27
  * @returns The decoded payload.
28
28
  */
29
- static decode<U extends IJwtHeader, T extends IJwtPayload>(token: string): Promise<{
30
- header?: U;
31
- payload?: T;
29
+ static decode<T extends IJwtHeader, U extends IJwtPayload>(token: string): Promise<{
30
+ header?: T;
31
+ payload?: U;
32
32
  signature?: Uint8Array;
33
33
  }>;
34
34
  /**
@@ -37,11 +37,9 @@ export declare class Jwt {
37
37
  * @param key The key for verifying the token
38
38
  * @returns The decoded payload.
39
39
  */
40
- static verify<U extends IJwtHeader, T extends IJwtPayload>(token: string, key: Uint8Array): Promise<{
41
- verified: boolean;
42
- header?: U;
43
- payload?: T;
44
- signature?: Uint8Array;
40
+ static verify<T extends IJwtHeader, U extends IJwtPayload>(token: string, key: JwkCryptoKey): Promise<{
41
+ header: T;
42
+ payload: U;
45
43
  }>;
46
44
  /**
47
45
  * Verify a token.
@@ -49,37 +47,77 @@ export declare class Jwt {
49
47
  * @param verifier Custom verification method.
50
48
  * @returns The decoded payload.
51
49
  */
52
- static verifyWithVerifier<U extends IJwtHeader, T extends IJwtPayload>(token: string, verifier: (alg: JwtAlgorithms, key: Uint8Array | undefined, payload: Uint8Array, signature: Uint8Array) => Promise<boolean>): Promise<{
53
- verified: boolean;
54
- header?: U;
55
- payload?: T;
56
- signature?: Uint8Array;
50
+ static verifyWithVerifier<T extends IJwtHeader, U extends IJwtPayload>(token: string, verifier: (token: string, key: JwkCryptoKey | undefined) => Promise<{
51
+ header: T;
52
+ payload: U;
53
+ }>): Promise<{
54
+ header: T;
55
+ payload: U;
57
56
  }>;
58
57
  /**
59
58
  * Verify a token by parts.
60
- * @param header The header to verify.
61
- * @param payload The payload to verify.
62
- * @param signature The signature to verify.
59
+ * @param token The token to verify.
63
60
  * @param key The key for verifying the token, if not provided no verification occurs.
64
61
  * @param verifier Custom verification method.
65
62
  * @returns True if the parts are verified.
66
63
  */
67
- static verifySignature<U extends IJwtHeader, T extends IJwtPayload>(header?: U, payload?: T, signature?: Uint8Array, key?: Uint8Array, verifier?: (alg: JwtAlgorithms, key: Uint8Array | undefined, payload: Uint8Array, signature: Uint8Array) => Promise<boolean>): Promise<boolean>;
64
+ static verifySignature<T extends IJwtHeader, U extends IJwtPayload>(token: string, key?: JwkCryptoKey, verifier?: (token: string, key: JwkCryptoKey | undefined) => Promise<{
65
+ header: T;
66
+ payload: U;
67
+ }>): Promise<{
68
+ header: T;
69
+ payload: U;
70
+ }>;
68
71
  /**
69
72
  * The default signer for the JWT.
70
- * @param alg The algorithm to use.
71
- * @param key The key to sign with.
73
+ * @param header The header to sign.
72
74
  * @param payload The payload to sign.
75
+ * @param key The optional key to sign with.
73
76
  * @returns The signature.
74
77
  */
75
- static defaultSigner(alg: JwtAlgorithms, key: Uint8Array | undefined, payload: Uint8Array): Promise<Uint8Array>;
78
+ static defaultSigner(header: IJwtHeader, payload: IJwtPayload, key: JwkCryptoKey | undefined): Promise<string>;
76
79
  /**
77
80
  * The default verifier for the JWT.
78
- * @param alg The algorithm to use.
81
+ * @param token The token to verify.
79
82
  * @param key The key to verify with.
80
- * @param payload The payload to verify.
81
- * @param signature The signature to verify.
82
- * @returns True if the signature was verified.
83
+ * @returns The header and payload if verification successful.
84
+ */
85
+ static defaultVerifier<T extends IJwtHeader, U extends IJwtPayload>(token: string, key: JwkCryptoKey | undefined): Promise<{
86
+ header: T;
87
+ payload: U;
88
+ }>;
89
+ /**
90
+ * Create bytes for signing from header and payload.
91
+ * @param header The header.
92
+ * @param payload The payload.
93
+ * @returns The bytes to sign.
94
+ */
95
+ static toSigningBytes<T extends IJwtHeader, U extends IJwtPayload>(header: T, payload: U): Uint8Array;
96
+ /**
97
+ * Create header and payload from signing bytes.
98
+ * @param signingBytes The signing bytes from a token.
99
+ * @returns The header and payload.
100
+ * @throws If the signing bytes are invalid
101
+ */
102
+ static fromSigningBytes<T extends IJwtHeader, U extends IJwtPayload>(signingBytes: Uint8Array): {
103
+ header: T;
104
+ payload: U;
105
+ };
106
+ /**
107
+ * Convert signed bytes and signature bytes to token.
108
+ * @param signingBytes The signed bytes.
109
+ * @param signature The signature.
110
+ * @returns The token.
111
+ */
112
+ static tokenFromBytes(signingBytes: Uint8Array, signature: Uint8Array): string;
113
+ /**
114
+ * Convert the token to signing bytes and signature bytes.
115
+ * @param token The token to convert to bytes.
116
+ * @returns The decoded bytes.
117
+ * @throws If the token is invalid.
83
118
  */
84
- static defaultVerifier(alg: JwtAlgorithms, key: Uint8Array | undefined, payload: Uint8Array, signature: Uint8Array): Promise<boolean>;
119
+ static tokenToBytes(token: string): {
120
+ signingBytes: Uint8Array;
121
+ signature: Uint8Array;
122
+ };
85
123
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,209 @@
1
1
  # @twin.org/web - Changelog
2
2
 
3
- ## 0.0.1-next.6
3
+ ## [0.0.1-next.62](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.61...web-v0.0.1-next.62) (2025-06-17)
4
+
5
+
6
+ ### Features
7
+
8
+ * add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
9
+ * add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
10
+ * ensure the alg is the correct one when generating JWK or JWS ([#136](https://github.com/twinfoundation/framework/issues/136)) ([46a5af1](https://github.com/twinfoundation/framework/commit/46a5af127192d7048068275d14f555f09add3642))
11
+ * propagate includeStackTrace on error conversion ([098fc72](https://github.com/twinfoundation/framework/commit/098fc729939ea3127f2bdcc0ddb6754096c5f919))
12
+ * use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * wrap inner error within FetchError / 2 ([#134](https://github.com/twinfoundation/framework/issues/134)) ([2ddb101](https://github.com/twinfoundation/framework/commit/2ddb101c3778be4e99559e37aa036cd7101585fb))
18
+
19
+
20
+ ### Dependencies
21
+
22
+ * The following workspace dependencies were updated
23
+ * dependencies
24
+ * @twin.org/core bumped from 0.0.1-next.61 to 0.0.1-next.62
25
+ * @twin.org/crypto bumped from 0.0.1-next.61 to 0.0.1-next.62
26
+
27
+ ## [0.0.1-next.61](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.60...web-v0.0.1-next.61) (2025-06-17)
28
+
29
+
30
+ ### Miscellaneous Chores
31
+
32
+ * **web:** Synchronize repo versions
33
+
34
+
35
+ ### Dependencies
36
+
37
+ * The following workspace dependencies were updated
38
+ * dependencies
39
+ * @twin.org/core bumped from 0.0.1-next.60 to 0.0.1-next.61
40
+ * @twin.org/crypto bumped from 0.0.1-next.60 to 0.0.1-next.61
41
+
42
+ ## [0.0.1-next.60](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.59...web-v0.0.1-next.60) (2025-06-17)
43
+
44
+
45
+ ### Miscellaneous Chores
46
+
47
+ * **web:** Synchronize repo versions
48
+
49
+
50
+ ### Dependencies
51
+
52
+ * The following workspace dependencies were updated
53
+ * dependencies
54
+ * @twin.org/core bumped from 0.0.1-next.59 to 0.0.1-next.60
55
+ * @twin.org/crypto bumped from 0.0.1-next.59 to 0.0.1-next.60
56
+
57
+ ## [0.0.1-next.59](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.58...web-v0.0.1-next.59) (2025-06-17)
58
+
59
+
60
+ ### Features
61
+
62
+ * propagate includeStackTrace on error conversion ([098fc72](https://github.com/twinfoundation/framework/commit/098fc729939ea3127f2bdcc0ddb6754096c5f919))
63
+
64
+
65
+ ### Dependencies
66
+
67
+ * The following workspace dependencies were updated
68
+ * dependencies
69
+ * @twin.org/core bumped from 0.0.1-next.58 to 0.0.1-next.59
70
+ * @twin.org/crypto bumped from 0.0.1-next.58 to 0.0.1-next.59
71
+
72
+ ## [0.0.1-next.58](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.57...web-v0.0.1-next.58) (2025-06-13)
73
+
74
+
75
+ ### Miscellaneous Chores
76
+
77
+ * **web:** Synchronize repo versions
78
+
79
+
80
+ ### Dependencies
81
+
82
+ * The following workspace dependencies were updated
83
+ * dependencies
84
+ * @twin.org/core bumped from 0.0.1-next.57 to 0.0.1-next.58
85
+ * @twin.org/crypto bumped from 0.0.1-next.57 to 0.0.1-next.58
86
+
87
+ ## [0.0.1-next.57](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.56...web-v0.0.1-next.57) (2025-06-10)
88
+
89
+
90
+ ### Features
91
+
92
+ * add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
93
+
94
+
95
+ ### Dependencies
96
+
97
+ * The following workspace dependencies were updated
98
+ * dependencies
99
+ * @twin.org/core bumped from 0.0.1-next.56 to 0.0.1-next.57
100
+ * @twin.org/crypto bumped from 0.0.1-next.56 to 0.0.1-next.57
101
+
102
+ ## [0.0.1-next.56](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.55...web-v0.0.1-next.56) (2025-05-08)
103
+
104
+
105
+ ### Miscellaneous Chores
106
+
107
+ * **web:** Synchronize repo versions
108
+
109
+
110
+ ### Dependencies
111
+
112
+ * The following workspace dependencies were updated
113
+ * dependencies
114
+ * @twin.org/core bumped from 0.0.1-next.55 to 0.0.1-next.56
115
+ * @twin.org/crypto bumped from 0.0.1-next.55 to 0.0.1-next.56
116
+
117
+ ## [0.0.1-next.55](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.54...web-v0.0.1-next.55) (2025-05-07)
118
+
119
+
120
+ ### Features
121
+
122
+ * ensure the alg is the correct one when generating JWK or JWS ([#136](https://github.com/twinfoundation/framework/issues/136)) ([46a5af1](https://github.com/twinfoundation/framework/commit/46a5af127192d7048068275d14f555f09add3642))
123
+
124
+
125
+ ### Dependencies
126
+
127
+ * The following workspace dependencies were updated
128
+ * dependencies
129
+ * @twin.org/core bumped from 0.0.1-next.54 to 0.0.1-next.55
130
+ * @twin.org/crypto bumped from 0.0.1-next.54 to 0.0.1-next.55
131
+
132
+ ## [0.0.1-next.54](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.53...web-v0.0.1-next.54) (2025-05-06)
133
+
134
+
135
+ ### Bug Fixes
136
+
137
+ * wrap inner error within FetchError / 2 ([#134](https://github.com/twinfoundation/framework/issues/134)) ([2ddb101](https://github.com/twinfoundation/framework/commit/2ddb101c3778be4e99559e37aa036cd7101585fb))
138
+
139
+
140
+ ### Dependencies
141
+
142
+ * The following workspace dependencies were updated
143
+ * dependencies
144
+ * @twin.org/core bumped from 0.0.1-next.53 to 0.0.1-next.54
145
+ * @twin.org/crypto bumped from 0.0.1-next.53 to 0.0.1-next.54
146
+
147
+ ## [0.0.1-next.53](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.52...web-v0.0.1-next.53) (2025-05-01)
148
+
149
+
150
+ ### Miscellaneous Chores
151
+
152
+ * **web:** Synchronize repo versions
153
+
154
+
155
+ ### Dependencies
156
+
157
+ * The following workspace dependencies were updated
158
+ * dependencies
159
+ * @twin.org/core bumped from 0.0.1-next.52 to 0.0.1-next.53
160
+ * @twin.org/crypto bumped from 0.0.1-next.52 to 0.0.1-next.53
161
+
162
+ ## [0.0.1-next.52](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.51...web-v0.0.1-next.52) (2025-04-17)
163
+
164
+
165
+ ### Features
166
+
167
+ * use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
168
+
169
+
170
+ ### Dependencies
171
+
172
+ * The following workspace dependencies were updated
173
+ * dependencies
174
+ * @twin.org/core bumped from 0.0.1-next.51 to 0.0.1-next.52
175
+ * @twin.org/crypto bumped from 0.0.1-next.51 to 0.0.1-next.52
176
+
177
+ ## [0.0.1-next.51](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.50...web-v0.0.1-next.51) (2025-03-27)
178
+
179
+
180
+ ### Miscellaneous Chores
181
+
182
+ * **web:** Synchronize repo versions
183
+
184
+
185
+ ### Dependencies
186
+
187
+ * The following workspace dependencies were updated
188
+ * dependencies
189
+ * @twin.org/core bumped from 0.0.1-next.50 to 0.0.1-next.51
190
+ * @twin.org/crypto bumped from 0.0.1-next.50 to 0.0.1-next.51
191
+
192
+ ## [0.0.1-next.50](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.49...web-v0.0.1-next.50) (2025-03-26)
193
+
194
+
195
+ ### Features
196
+
197
+ * add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
198
+
199
+
200
+ ### Dependencies
201
+
202
+ * The following workspace dependencies were updated
203
+ * dependencies
204
+ * @twin.org/core bumped from 0.0.1-next.49 to 0.0.1-next.50
205
+ * @twin.org/crypto bumped from 0.0.1-next.49 to 0.0.1-next.50
206
+
207
+ ## 0.0.1-next.49
4
208
 
5
209
  - Initial Release
@@ -8,37 +8,45 @@ Class to represent errors from fetch.
8
8
 
9
9
  ## Constructors
10
10
 
11
- ### new FetchError()
11
+ ### Constructor
12
12
 
13
- > **new FetchError**(`source`, `message`, `httpStatus`, `properties`?, `inner`?): [`FetchError`](FetchError.md)
13
+ > **new FetchError**(`source`, `message`, `httpStatus`, `properties?`, `inner?`): `FetchError`
14
14
 
15
15
  Create a new instance of FetchError.
16
16
 
17
17
  #### Parameters
18
18
 
19
- **source**: `string`
19
+ ##### source
20
+
21
+ `string`
20
22
 
21
23
  The source of the error.
22
24
 
23
- **message**: `string`
25
+ ##### message
26
+
27
+ `string`
24
28
 
25
29
  The message as a code.
26
30
 
27
- **httpStatus**: [`HttpStatusCode`](../type-aliases/HttpStatusCode.md)
31
+ ##### httpStatus
32
+
33
+ [`HttpStatusCode`](../type-aliases/HttpStatusCode.md)
28
34
 
29
35
  The http status code.
30
36
 
31
- **properties?**
37
+ ##### properties?
32
38
 
33
39
  Any additional information for the error.
34
40
 
35
- **inner?**: `unknown`
41
+ ##### inner?
42
+
43
+ `unknown`
36
44
 
37
45
  The inner error if we have wrapped another error.
38
46
 
39
47
  #### Returns
40
48
 
41
- [`FetchError`](FetchError.md)
49
+ `FetchError`
42
50
 
43
51
  #### Overrides
44
52