Skip to content

Commit

Permalink
[QoL] Fixed annoying TypeDoc errors that have been a distraction to P…
Browse files Browse the repository at this point in the history
…Rs (#506)

- Fixed annoying TypeDoc errors that have been a distraction to PRs
- Also turned on fail-on-error for TypeDoc generation during CI so TypeDoc warnings only annoys the person who introduces it.
  • Loading branch information
thehenrytsai authored May 2, 2024
1 parent eb02b62 commit 3abb717
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
report_changed_scope_only: false
fail_on_error: false
fail_on_error: true
group_docs: true
entry_points: |
- file: packages/api/src/index.ts
Expand Down
1 change: 1 addition & 0 deletions packages/api/src/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ export class Record implements RecordModel {
/** Record's published status (true/false) */
get published() { return this._descriptor.published; }

/** Tags of the record */
get tags() { return this._descriptor.tags; }

/**
Expand Down
2 changes: 2 additions & 0 deletions packages/credentials/src/verifiable-credential.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export type VcDataModel = ICredential;
* A credential schema defines the structure and content of the data, enabling verifiers to assess if the data adheres to the established schema.
*/
export type CredentialSchema = {
/** Credential schema ID */
id: string;
/** Credential schema type */
type: string;
};

Expand Down
5 changes: 4 additions & 1 deletion packages/crypto-aws-kms/src/ecdsa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export interface EcdsaSignParams extends KmsSignParams {
algorithm: 'ES256K';
}

/**
* The `EcdsaAlgorithm` class is an implementation of the `KeyGenerator` and `Signer` interfaces for the ECDSA algorithm.
*/
export class EcdsaAlgorithm implements
KeyGenerator<EcdsaGenerateKeyParams, KeyIdentifier>,
Signer<KmsSignParams, KmsVerifyParams> {
Expand Down Expand Up @@ -163,7 +166,7 @@ export class EcdsaAlgorithm implements
* Note: The signature returned is normalized to low-S to prevent signature malleability. This
* ensures that the signature can be verified by other libraries that enforce strict verification.
* More information on signature malleability can be found
* {@link @web5/crypto#Secp256k1.adjustSignatureToLowS | here}.
* {@link https://tbd54566975.github.io/web5-js/classes/_web5_crypto.Secp256k1.html#adjustSignatureToLowS | here}.
*
* @example
* ```ts
Expand Down
3 changes: 3 additions & 0 deletions packages/crypto-aws-kms/src/key-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export interface AwsKeyManagerGenerateKeyParams extends KmsGenerateKeyParams {
algorithm: 'ES256K';
}

/**
* The `AwsKeyManager` class is an implementation of the `CryptoApi` interface tailored for AWS KMS.
*/
export class AwsKeyManager implements CryptoApi<AwsKeyManagerGenerateKeyParams> {
/**
* A private map that stores instances of cryptographic algorithm implementations. Each key in
Expand Down
9 changes: 8 additions & 1 deletion packages/crypto-aws-kms/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,19 @@ export async function createKeyAlias({ alias, awsKeyId, kmsClient }: {
);
}

/**
* Gets the key specification of the key specified.
*
* @param params - The parameters for getting the key specification.
* @param params.keyUri - URI of the key.
* @param params.kmsClient - The Key Management Service client to use.
*/
export async function getKeySpec({ keyUri, kmsClient }: {
keyUri: KeyIdentifier;
kmsClient: KMSClient;
}): Promise<KeySpec> {
// If the key URI is a JWK URI, prepend the AWS-required "alias/" prefix and replace the URN
// namespace separator with hyphens to accomodate AWS KMS key alias character restrictions.
// namespace separator with hyphens to accommodate AWS KMS key alias character restrictions.
const awsKeyId = keyUri.replace('urn:jwk:', 'alias/urn-jwk-');

// Send the request to retrieve detailed key information to AWS KMS.
Expand Down

0 comments on commit 3abb717

Please sign in to comment.