Skip to content

Commit 8b73687

Browse files
committed
docs: add more symbol document, ignore ts-private fields
1 parent 3662b9e commit 8b73687

File tree

40 files changed

+174
-31
lines changed

40 files changed

+174
-31
lines changed

docs/jwe/compact/encrypt/classes/CompactEncrypt.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ console.log(jwe)
2727

2828
**new CompactEncrypt**(`plaintext`): [`CompactEncrypt`](CompactEncrypt.md)
2929

30+
[CompactEncrypt](CompactEncrypt.md) constructor
31+
3032
#### Parameters
3133

3234
| Parameter | Type | Description |

docs/jwe/flattened/encrypt/classes/FlattenedEncrypt.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ console.log(jwe)
2828

2929
**new FlattenedEncrypt**(`plaintext`): [`FlattenedEncrypt`](FlattenedEncrypt.md)
3030

31+
[FlattenedEncrypt](FlattenedEncrypt.md) constructor
32+
3133
#### Parameters
3234

3335
| Parameter | Type | Description |

docs/jwe/general/encrypt/classes/GeneralEncrypt.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ console.log(jwe)
3131

3232
**new GeneralEncrypt**(`plaintext`): [`GeneralEncrypt`](GeneralEncrypt.md)
3333

34+
[GeneralEncrypt](GeneralEncrypt.md) constructor
35+
3436
#### Parameters
3537

3638
| Parameter | Type | Description |

docs/jwks/remote/interfaces/ExportedJWKSCache.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ See [jwksCache](../variables/jwksCache.md).
1212

1313
**jwks**: [`JSONWebKeySet`](../../../types/interfaces/JSONWebKeySet.md)
1414

15+
Current cached JSON Web Key Set
16+
1517
***
1618

1719
### uat
1820

1921
**uat**: `number`
22+
23+
Last updated at timestamp (seconds since epoch)

docs/jwks/remote/type-aliases/FetchImplementation.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ See [customFetch](../variables/customFetch.md).
1010

1111
## Parameters
1212

13-
| Parameter | Type |
14-
| ------ | ------ |
15-
| `url` | `string` |
16-
| `options` | \{`headers`: [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers);`method`: `"GET"`;`redirect`: `"manual"`;`signal`: [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal); \} |
17-
| `options.headers` | [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers) |
18-
| `options.method` | `"GET"` |
19-
| `options.redirect` | `"manual"` |
20-
| `options.signal` | [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal) |
13+
| Parameter | Type | Description |
14+
| ------ | ------ | ------ |
15+
| `url` | `string` | - |
16+
| `options` | \{`headers`: [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers);`method`: `"GET"`;`redirect`: `"manual"`;`signal`: [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal); \} | - |
17+
| `options.headers` | [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers) | HTTP Headers |
18+
| `options.method` | `"GET"` | The [request method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) |
19+
| `options.redirect` | `"manual"` | See [Request.redirect](https://developer.mozilla.org/docs/Web/API/Request/redirect) |
20+
| `options.signal` | [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal) | - |
2121

2222
## Returns
2323

docs/jws/compact/sign/classes/CompactSign.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ console.log(jws)
2727

2828
**new CompactSign**(`payload`): [`CompactSign`](CompactSign.md)
2929

30+
[CompactSign](CompactSign.md) constructor
31+
3032
#### Parameters
3133

3234
| Parameter | Type | Description |

docs/jws/flattened/sign/classes/FlattenedSign.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ console.log(jws)
2727

2828
**new FlattenedSign**(`payload`): [`FlattenedSign`](FlattenedSign.md)
2929

30+
[FlattenedSign](FlattenedSign.md) constructor
31+
3032
#### Parameters
3133

3234
| Parameter | Type | Description |

docs/jws/general/sign/classes/GeneralSign.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ console.log(jws)
3030

3131
**new GeneralSign**(`payload`): [`GeneralSign`](GeneralSign.md)
3232

33+
[GeneralSign](GeneralSign.md) constructor
34+
3335
#### Parameters
3436

3537
| Parameter | Type | Description |

docs/jwt/encrypt/classes/EncryptJWT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ console.log(jwt)
3030

3131
**new EncryptJWT**(`payload`): [`EncryptJWT`](EncryptJWT.md)
3232

33+
[EncryptJWT](EncryptJWT.md) constructor
34+
3335
#### Parameters
3436

3537
| Parameter | Type | Description |

docs/jwt/produce/classes/ProduceJWT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Generic class for JWT producing.
1212

1313
**new ProduceJWT**(`payload`): [`ProduceJWT`](ProduceJWT.md)
1414

15+
[ProduceJWT](ProduceJWT.md) constructor
16+
1517
#### Parameters
1618

1719
| Parameter | Type | Description |

docs/jwt/sign/classes/SignJWT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ console.log(jwt)
109109

110110
**new SignJWT**(`payload`): [`SignJWT`](SignJWT.md)
111111

112+
[SignJWT](SignJWT.md) constructor
113+
112114
#### Parameters
113115

114116
| Parameter | Type | Description |

docs/jwt/unsecured/classes/UnsecuredJWT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ console.log(payload)
4141

4242
**new UnsecuredJWT**(`payload`): [`UnsecuredJWT`](UnsecuredJWT.md)
4343

44+
[UnsecuredJWT](UnsecuredJWT.md) constructor
45+
4446
#### Parameters
4547

4648
| Parameter | Type | Description |

docs/util/errors/classes/JOSEAlgNotAllowed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JOSEAlgNotAllowed) {
3030

3131
**code**: `string` = `'ERR_JOSE_ALG_NOT_ALLOWED'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JOSEAlgNotAllowed](JOSEAlgNotAllowed.md).

docs/util/errors/classes/JOSEError.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ if (err instanceof jose.errors.JOSEError) {
2222

2323
**code**: `string` = `'ERR_JOSE_GENERIC'`
2424

25-
A unique error code for this particular error subclass.
25+
A unique error code for [JOSEError](JOSEError.md).

docs/util/errors/classes/JOSENotSupported.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ if (err instanceof jose.errors.JOSENotSupported) {
3131

3232
**code**: `string` = `'ERR_JOSE_NOT_SUPPORTED'`
3333

34-
A unique error code for this particular error subclass.
34+
A unique error code for [JOSENotSupported](JOSENotSupported.md).

docs/util/errors/classes/JWEDecryptionFailed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWEDecryptionFailed) {
3030

3131
**code**: `string` = `'ERR_JWE_DECRYPTION_FAILED'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWEDecryptionFailed](JWEDecryptionFailed.md).

docs/util/errors/classes/JWEInvalid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWEInvalid) {
3030

3131
**code**: `string` = `'ERR_JWE_INVALID'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWEInvalid](JWEInvalid.md).

docs/util/errors/classes/JWKInvalid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKInvalid) {
3030

3131
**code**: `string` = `'ERR_JWK_INVALID'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWKInvalid](JWKInvalid.md).

docs/util/errors/classes/JWKSInvalid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSInvalid) {
3030

3131
**code**: `string` = `'ERR_JWKS_INVALID'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWKSInvalid](JWKSInvalid.md).

docs/util/errors/classes/JWKSMultipleMatchingKeys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSMultipleMatchingKeys) {
3030

3131
**code**: `string` = `'ERR_JWKS_MULTIPLE_MATCHING_KEYS'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWKSMultipleMatchingKeys](JWKSMultipleMatchingKeys.md).

docs/util/errors/classes/JWKSNoMatchingKey.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSNoMatchingKey) {
3030

3131
**code**: `string` = `'ERR_JWKS_NO_MATCHING_KEY'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWKSNoMatchingKey](JWKSNoMatchingKey.md).

docs/util/errors/classes/JWKSTimeout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSTimeout) {
3030

3131
**code**: `string` = `'ERR_JWKS_TIMEOUT'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWKSTimeout](JWKSTimeout.md).

docs/util/errors/classes/JWSInvalid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWSInvalid) {
3030

3131
**code**: `string` = `'ERR_JWS_INVALID'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWSInvalid](JWSInvalid.md).

docs/util/errors/classes/JWSSignatureVerificationFailed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWSSignatureVerificationFailed) {
3030

3131
**code**: `string` = `'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWSSignatureVerificationFailed](JWSSignatureVerificationFailed.md).

docs/util/errors/classes/JWTClaimValidationFailed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The Claim for which the validation failed.
3838

3939
**code**: `string` = `'ERR_JWT_CLAIM_VALIDATION_FAILED'`
4040

41-
A unique error code for this particular error subclass.
41+
A unique error code for [JWTClaimValidationFailed](JWTClaimValidationFailed.md).
4242

4343
***
4444

docs/util/errors/classes/JWTExpired.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The Claim for which the validation failed.
4242

4343
**code**: `string` = `'ERR_JWT_EXPIRED'`
4444

45-
A unique error code for this particular error subclass.
45+
A unique error code for [JWTExpired](JWTExpired.md).
4646

4747
***
4848

docs/util/errors/classes/JWTInvalid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWTInvalid) {
3030

3131
**code**: `string` = `'ERR_JWT_INVALID'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWTInvalid](JWTInvalid.md).

src/jwe/compact/encrypt.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ import { FlattenedEncrypt } from '../flattened/encrypt.js'
2626
* ```
2727
*/
2828
export class CompactEncrypt {
29+
/** @ignore */
2930
private _flattened: FlattenedEncrypt
3031

31-
/** @param plaintext Binary representation of the plaintext to encrypt. */
32+
/**
33+
* {@link CompactEncrypt} constructor
34+
*
35+
* @param plaintext Binary representation of the plaintext to encrypt.
36+
*/
3237
constructor(plaintext: Uint8Array) {
3338
this._flattened = new FlattenedEncrypt(plaintext)
3439
}

src/jwe/flattened/encrypt.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,35 @@ import checkKeyType from '../../lib/check_key_type.js'
3636
* ```
3737
*/
3838
export class FlattenedEncrypt {
39+
/** @ignore */
3940
private _plaintext: Uint8Array
4041

42+
/** @ignore */
4143
private _protectedHeader!: types.JWEHeaderParameters | undefined
4244

45+
/** @ignore */
4346
private _sharedUnprotectedHeader!: types.JWEHeaderParameters | undefined
4447

48+
/** @ignore */
4549
private _unprotectedHeader!: types.JWEHeaderParameters | undefined
4650

51+
/** @ignore */
4752
private _aad!: Uint8Array | undefined
4853

54+
/** @ignore */
4955
private _cek!: Uint8Array | undefined
5056

57+
/** @ignore */
5158
private _iv!: Uint8Array | undefined
5259

60+
/** @ignore */
5361
private _keyManagementParameters!: types.JWEKeyManagementHeaderParameters
5462

55-
/** @param plaintext Binary representation of the plaintext to encrypt. */
63+
/**
64+
* {@link FlattenedEncrypt} constructor
65+
*
66+
* @param plaintext Binary representation of the plaintext to encrypt.
67+
*/
5668
constructor(plaintext: Uint8Array) {
5769
if (!(plaintext instanceof Uint8Array)) {
5870
throw new TypeError('plaintext must be an instance of Uint8Array')

src/jwe/general/encrypt.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,26 @@ class IndividualRecipient implements Recipient {
9595
* ```
9696
*/
9797
export class GeneralEncrypt {
98+
/** @ignore */
9899
private _plaintext: Uint8Array
99100

101+
/** @ignore */
100102
private _recipients: IndividualRecipient[] = []
101103

104+
/** @ignore */
102105
private _protectedHeader!: types.JWEHeaderParameters
103106

107+
/** @ignore */
104108
private _unprotectedHeader!: types.JWEHeaderParameters
105109

110+
/** @ignore */
106111
private _aad!: Uint8Array
107112

108-
/** @param plaintext Binary representation of the plaintext to encrypt. */
113+
/**
114+
* {@link GeneralEncrypt} constructor
115+
*
116+
* @param plaintext Binary representation of the plaintext to encrypt.
117+
*/
109118
constructor(plaintext: Uint8Array) {
110119
this._plaintext = plaintext
111120
}

src/jwks/local.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ function clone<T>(obj: T): T {
5656
}
5757

5858
class LocalJWKSet {
59+
/** @ignore */
5960
private _jwks?: types.JSONWebKeySet
6061

62+
/** @ignore */
6163
private _cached: WeakMap<types.JWK, Cache> = new WeakMap()
6264

6365
constructor(jwks: unknown) {

src/jwks/remote.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,15 @@ export const customFetch: unique symbol = Symbol()
146146

147147
/** See {@link customFetch}. */
148148
export type FetchImplementation = (
149+
/** URL the request is being made sent to {@link !fetch} as the `resource` argument */
149150
url: string,
151+
/** Options otherwise sent to {@link !fetch} as the `options` argument */
150152
options: {
153+
/** HTTP Headers */
151154
headers: Headers
155+
/** The {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods request method} */
152156
method: 'GET'
157+
/** See {@link !Request.redirect} */
153158
redirect: 'manual'
154159
signal: AbortSignal
155160
},
@@ -272,7 +277,13 @@ export interface RemoteJWKSetOptions {
272277

273278
/** See {@link jwksCache}. */
274279
export interface ExportedJWKSCache {
280+
/**
281+
* Current cached JSON Web Key Set
282+
*/
275283
jwks: types.JSONWebKeySet
284+
/**
285+
* Last updated at timestamp (seconds since epoch)
286+
*/
276287
uat: number
277288
}
278289

@@ -301,24 +312,33 @@ function isFreshJwksCache(input: unknown, cacheMaxAge: number): input is Exporte
301312
}
302313

303314
class RemoteJWKSet {
315+
/** @ignore */
304316
private _url: URL
305317

318+
/** @ignore */
306319
private _timeoutDuration: number
307320

321+
/** @ignore */
308322
private _cooldownDuration: number
309323

324+
/** @ignore */
310325
private _cacheMaxAge: number
311326

327+
/** @ignore */
312328
private _jwksTimestamp?: number
313329

330+
/** @ignore */
314331
private _pendingFetch?: Promise<unknown>
315332

333+
/** @ignore */
316334
private _headers: Headers
317335

318336
private [customFetch]?: FetchImplementation
319337

338+
/** @ignore */
320339
private _local!: ReturnType<typeof createLocalJWKSet>
321340

341+
/** @ignore */
322342
private _cache?: JWKSCacheInput
323343

324344
constructor(url: unknown, options?: RemoteJWKSetOptions) {

src/jws/compact/sign.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ import { FlattenedSign } from '../flattened/sign.js'
2626
* ```
2727
*/
2828
export class CompactSign {
29+
/** @ignore */
2930
private _flattened: FlattenedSign
3031

31-
/** @param payload Binary representation of the payload to sign. */
32+
/**
33+
* {@link CompactSign} constructor
34+
*
35+
* @param payload Binary representation of the payload to sign.
36+
*/
3237
constructor(payload: Uint8Array) {
3338
this._flattened = new FlattenedSign(payload)
3439
}

0 commit comments

Comments
 (0)