Skip to content

Commit

Permalink
fix: update and fix inline documentation of all exported types (#921)
Browse files Browse the repository at this point in the history
* fix(build): use correct cross-package imports

* chore(build): split build scripts for better granularity

* docs(data-store-json): fix and augment inline documentation for public exports

* docs(key-manager): add missing inline docs to exported classes

* docs(kms-local): update inline docs for public classes

* docs(message-handler): fix JSDoc links and update plugin documentation

* docs(remote-server): fix inline docs

* docs(url-handler): add description to UrlMessageHandler

* docs(core): update and fix inline docs for @veramo/core exports

* docs(selective-disclosure): update inline docs for @veramo/selective-disclosure exports

* docs(credential-w3c): update inline docs for @veramo/credential-w3c exports

* docs(data-store): fix and augment inline documentation for `@veramo/data-store` exports

* docs(did-discovery): update and fix inline docs for @veramo/did-discovery exports

* docs(did-comm): update and fix inline docs for @veramo/did-comm exports

* docs(credential-eip712): update and fix inline docs for @veramo/credential-eip712 exports

* fix(credential-status): update and fix type definitions and inline docs

* docs(credential-ld): update and fix inline docs

* fix(deps): bump api-extractor tools

* docs(did-manager): update inline docs

* docs(did-provider-key): add some inline docs

* docs(did-resolver): update inline docs

* docs(remote-client): add inline documentation for exports
  • Loading branch information
mirceanis authored Jun 9, 2022
1 parent d66c366 commit 63e64e0
Show file tree
Hide file tree
Showing 101 changed files with 1,151 additions and 438 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"private": true,
"version": "1.0.0",
"scripts": {
"build": "lerna run build && yarn build:schema-api",
"bootstrap": "lerna bootstrap",
"build:schema-api": "lerna run extract-api && lerna run generate-plugin-schema",
"build": "yarn build:js && yarn build:api && yarn build:schema",
"build:js": "lerna run build --stream",
"build:api": "lerna run extract-api --stream",
"build:schema": "lerna run generate-plugin-schema --stream",
"lint": "echo \"linting not yet enabled\"",
"test:integration-build": "yarn test:integration-prepare && yarn test:integration-pretty",
"test:integration-prepare": "ts-node --project packages/tsconfig.settings.json ./scripts/prepare-integration-tests.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"update-veramo-latest": "yarn add @veramo/core@latest @veramo/discovery@latest @veramo/remote-client@latest @veramo/remote-server@latest @veramo/did-provider-key@latest @veramo/did-resolver@latest @veramo/did-jwt@latest @veramo/credential-w3c@latest @veramo/did-provider-ethr@latest @veramo/did-provider-web@latest @veramo/did-comm@latest @veramo/kms-local@latest @veramo/selective-disclosure@latest @veramo/data-store@latest @veramo/key-manager@latest @veramo/message-handler@latest @veramo/did-manager@latest @veramo/url-handler@latest"
},
"dependencies": {
"@microsoft/api-extractor": "7.23.1",
"@microsoft/api-extractor-model": "7.17.2",
"@microsoft/api-extractor": "7.24.2",
"@microsoft/api-extractor-model": "7.17.3",
"@types/blessed": "^0.1.17",
"@types/swagger-ui-express": "^4.1.3",
"@veramo/core": "^3.1.4",
Expand Down
64 changes: 40 additions & 24 deletions packages/core/plugin.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"properties": {
"didDocument": {
"$ref": "#/components/schemas/DIDDocument",
"description": "the DID document from which to extract the fragment. This MUST be the document resolved by {@link resolveDid }"
"description": "the DID document from which to extract the fragment. This MUST be the document resolved by\n {@link IResolver.resolveDid }"
},
"didUrl": {
"type": "string",
"description": "The DID URI that refers to the subsection by #fragment. Example: did:example:identifier#controller"
"description": "The DID URI that needs to be dereferenced. This should refer to the subsection by #fragment.\n\nExample: did:example:identifier#controller"
},
"section": {
"$ref": "#/components/schemas/DIDDocumentSection",
"description": "The section of the DID document where to search for the fragment. Example 'keyAgreement', or 'assertionMethod', or 'authentication', etc"
"description": "Optional. The section of the DID document where to search for the fragment. Example 'keyAgreement', or 'assertionMethod', or 'authentication', etc"
}
},
"required": [
Expand Down Expand Up @@ -273,7 +273,8 @@
"keyAgreement",
"capabilityInvocation",
"capabilityDelegation"
]
],
"description": "Refers to a section of a DID document. Either the list of verification methods or services or one of the verification relationships.\n\nSee {@link https://www.w3.org/TR/did-core/#verification-relationships | verification relationships }"
},
"DIDDocComponent": {
"anyOf": [
Expand Down Expand Up @@ -451,7 +452,7 @@
"Bls12381G1",
"Bls12381G2"
],
"description": "Cryptographic key type"
"description": "Cryptographic key type."
},
"KeyMetadata": {
"type": "object",
Expand All @@ -462,7 +463,8 @@
"type": "string"
}
}
}
},
"description": "This encapsulates data about a key.\n\nImplementations of {@link @veramo/key-manager#AbstractKeyManagementSystem | AbstractKeyManagementSystem } should populate this object, for each key, with the algorithms that can be performed using it.\n\nThis can also be used to add various tags to the keys under management."
},
"ManagedKeyInfo": {
"type": "object",
Expand Down Expand Up @@ -501,7 +503,7 @@
"type",
"publicKeyHex"
],
"description": "Represents information about a managed key. Private or secret key material is not present."
"description": "Represents information about a managed key. Private or secret key material is NOT present."
},
"IKeyManagerDecryptJWEArgs": {
"type": "object",
Expand Down Expand Up @@ -847,7 +849,7 @@
}
},
"keyManagerDecryptJWE": {
"description": "Decrypts data",
"description": "Decrypts data This API may change without a BREAKING CHANGE notice.",
"arguments": {
"$ref": "#/components/schemas/IKeyManagerDecryptJWEArgs"
},
Expand All @@ -865,7 +867,7 @@
}
},
"keyManagerEncryptJWE": {
"description": "Encrypts data",
"description": "Encrypts data This API may change without a BREAKING CHANGE notice.",
"arguments": {
"$ref": "#/components/schemas/IKeyManagerEncryptJWEArgs"
},
Expand Down Expand Up @@ -1019,7 +1021,7 @@
"Bls12381G1",
"Bls12381G2"
],
"description": "Cryptographic key type"
"description": "Cryptographic key type."
},
"KeyMetadata": {
"type": "object",
Expand All @@ -1030,7 +1032,8 @@
"type": "string"
}
}
}
},
"description": "This encapsulates data about a key.\n\nImplementations of {@link @veramo/key-manager#AbstractKeyManagementSystem | AbstractKeyManagementSystem } should populate this object, for each key, with the algorithms that can be performed using it.\n\nThis can also be used to add various tags to the keys under management."
},
"IDIDManagerAddServiceArgs": {
"type": "object",
Expand Down Expand Up @@ -1264,7 +1267,7 @@
"keys",
"provider"
],
"description": "Represents the minimum amount of information needed to import an {@link IIdentifier }"
"description": "Represents the minimum amount of information needed to import an {@link IIdentifier } ."
},
"MinimalImportableKey": {
"$ref": "#/components/schemas/RequireOnly<IKey,(\"privateKeyHex\"|\"type\"|\"kms\")>",
Expand Down Expand Up @@ -1742,6 +1745,10 @@
"type": "string"
}
},
"required": [
"id",
"type"
],
"description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#status | Credential Status }"
},
"VerifiablePresentation": {
Expand Down Expand Up @@ -2025,7 +2032,7 @@
"required": [
"column"
],
"description": "Represents a WHERE predicate for a { @link IDataStoreORM.FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND."
"description": "Represents a WHERE predicate for a {@link FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND."
},
"TIdentifiersColumns": {
"type": "string",
Expand Down Expand Up @@ -2055,7 +2062,7 @@
"column",
"direction"
],
"description": "Represents the sort order of results from a { @link IDataStoreORM.FindArgs } query."
"description": "Represents the sort order of results from a {@link FindArgs } query."
},
"PartialIdentifier": {
"type": "object",
Expand Down Expand Up @@ -2145,7 +2152,7 @@
"Bls12381G1",
"Bls12381G2"
],
"description": "Cryptographic key type"
"description": "Cryptographic key type."
},
"KeyMetadata": {
"type": "object",
Expand All @@ -2156,7 +2163,8 @@
"type": "string"
}
}
}
},
"description": "This encapsulates data about a key.\n\nImplementations of {@link @veramo/key-manager#AbstractKeyManagementSystem | AbstractKeyManagementSystem } should populate this object, for each key, with the algorithms that can be performed using it.\n\nThis can also be used to add various tags to the keys under management."
},
"IService": {
"type": "object",
Expand Down Expand Up @@ -2251,7 +2259,7 @@
"required": [
"column"
],
"description": "Represents a WHERE predicate for a { @link IDataStoreORM.FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND."
"description": "Represents a WHERE predicate for a {@link FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND."
},
"TMessageColumns": {
"type": "string",
Expand Down Expand Up @@ -2287,7 +2295,7 @@
"column",
"direction"
],
"description": "Represents the sort order of results from a { @link IDataStoreORM.FindArgs } query."
"description": "Represents the sort order of results from a {@link FindArgs } query."
},
"IMessage": {
"type": "object",
Expand Down Expand Up @@ -2505,6 +2513,10 @@
"type": "string"
}
},
"required": [
"id",
"type"
],
"description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#status | Credential Status }"
},
"VerifiablePresentation": {
Expand Down Expand Up @@ -2652,7 +2664,7 @@
"required": [
"column"
],
"description": "Represents a WHERE predicate for a { @link IDataStoreORM.FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND."
"description": "Represents a WHERE predicate for a {@link FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND."
},
"TCredentialColumns": {
"type": "string",
Expand Down Expand Up @@ -2685,7 +2697,7 @@
"column",
"direction"
],
"description": "Represents the sort order of results from a { @link IDataStoreORM.FindArgs } query."
"description": "Represents the sort order of results from a {@link FindArgs } query."
},
"UniqueVerifiableCredential": {
"type": "object",
Expand Down Expand Up @@ -2769,7 +2781,7 @@
"required": [
"column"
],
"description": "Represents a WHERE predicate for a { @link IDataStoreORM.FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND."
"description": "Represents a WHERE predicate for a {@link FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND."
},
"TClaimsColumns": {
"type": "string",
Expand Down Expand Up @@ -2805,7 +2817,7 @@
"column",
"direction"
],
"description": "Represents the sort order of results from a { @link IDataStoreORM.FindArgs } query."
"description": "Represents the sort order of results from a {@link FindArgs } query."
},
"FindPresentationsArgs": {
"$ref": "#/components/schemas/FindArgs-TPresentationColumns",
Expand Down Expand Up @@ -2873,7 +2885,7 @@
"required": [
"column"
],
"description": "Represents a WHERE predicate for a { @link IDataStoreORM.FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND."
"description": "Represents a WHERE predicate for a {@link FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND."
},
"TPresentationColumns": {
"type": "string",
Expand Down Expand Up @@ -2906,7 +2918,7 @@
"column",
"direction"
],
"description": "Represents the sort order of results from a { @link IDataStoreORM.FindArgs } query."
"description": "Represents the sort order of results from a {@link FindArgs } query."
},
"UniqueVerifiablePresentation": {
"type": "object",
Expand Down Expand Up @@ -3277,6 +3289,10 @@
"type": "string"
}
},
"required": [
"id",
"type"
],
"description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#status | Credential Status }"
},
"VerifiablePresentation": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export interface IAgentOptions {
/**
* Flag that enables schema validation for plugin methods.
*
* @default false
* Defaults to `false`.
*/
schemaValidation?: boolean
}
Expand Down
7 changes: 7 additions & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,12 @@ export * from './types/IMessage'
export * from './types/IMessageHandler'
export * from './types/IResolver'
export * from './types/vc-data-model'

/**
* This represents the collection of schemas for the core plugins.
* Implementations of these schemas can be provided by other packages.
*
* @public
*/
const schema = require('../plugin.schema.json')
export { schema }
Loading

0 comments on commit 63e64e0

Please sign in to comment.