From 2c868f77f297d036554ab8b30b77124c57b824da Mon Sep 17 00:00:00 2001 From: Simonas Karuzas Date: Fri, 9 Oct 2020 11:59:30 +0300 Subject: [PATCH] feat: Validating all plugin method arguments --- __tests__/shared/keyManager.ts | 2 +- __tests__/shared/resolveDid.ts | 22 +- docs/api/daf-core.agent.md | 1 + docs/api/daf-core.agent.schema.md | 11 + docs/api/daf-core.ikey.md | 2 +- docs/api/daf-core.ikey.meta.md | 2 +- docs/api/daf-core.md | 6 +- docs/api/daf-core.validate.md | 2 +- ...af-core.verifiablecredential.__context_.md | 11 + ...e.verifiablecredential.credentialstatus.md | 14 + ....verifiablecredential.credentialsubject.md | 14 + ...ore.verifiablecredential.expirationdate.md | 11 + docs/api/daf-core.verifiablecredential.id.md | 11 + ...-core.verifiablecredential.issuancedate.md | 11 + .../daf-core.verifiablecredential.issuer.md | 14 + docs/api/daf-core.verifiablecredential.md | 19 +- .../daf-core.verifiablecredential.proof.md | 14 + .../api/daf-core.verifiablecredential.type.md | 11 + ...-core.verifiablepresentation.__context_.md | 11 + ...e.verifiablepresentation.expirationdate.md | 11 + .../daf-core.verifiablepresentation.holder.md | 11 + .../api/daf-core.verifiablepresentation.id.md | 11 + ...ore.verifiablepresentation.issuancedate.md | 11 + docs/api/daf-core.verifiablepresentation.md | 19 +- .../daf-core.verifiablepresentation.proof.md | 14 + .../daf-core.verifiablepresentation.type.md | 11 + ...fiablepresentation.verifiablecredential.md | 11 + ...af-core.verifiablepresentation.verifier.md | 11 + docs/api/daf-core.w3ccredential.__context_.md | 11 + ...daf-core.w3ccredential.credentialstatus.md | 14 + ...af-core.w3ccredential.credentialsubject.md | 14 + .../daf-core.w3ccredential.expirationdate.md | 11 + docs/api/daf-core.w3ccredential.id.md | 11 + .../daf-core.w3ccredential.issuancedate.md | 11 + docs/api/daf-core.w3ccredential.issuer.md | 14 + docs/api/daf-core.w3ccredential.md | 27 + docs/api/daf-core.w3ccredential.type.md | 11 + .../daf-core.w3cpresentation.__context_.md | 11 + ...daf-core.w3cpresentation.expirationdate.md | 11 + docs/api/daf-core.w3cpresentation.holder.md | 11 + docs/api/daf-core.w3cpresentation.id.md | 11 + .../daf-core.w3cpresentation.issuancedate.md | 11 + docs/api/daf-core.w3cpresentation.md | 27 + docs/api/daf-core.w3cpresentation.type.md | 11 + ...re.w3cpresentation.verifiablecredential.md | 11 + docs/api/daf-core.w3cpresentation.verifier.md | 11 + docs/api/daf-did-comm.didcomm.md | 2 +- docs/api/daf-did-comm.didcomm.schema.md | 93 +- docs/api/daf-graphql.agentgraphqlclient.md | 1 + .../daf-graphql.agentgraphqlclient.schema.md | 11 + .../daf-identity-manager.identitymanager.md | 2 +- ...identity-manager.identitymanager.schema.md | 8 +- docs/api/daf-key-manager.keymanager.md | 2 +- docs/api/daf-key-manager.keymanager.schema.md | 8 +- .../api/daf-message-handler.messagehandler.md | 1 + ...f-message-handler.messagehandler.schema.md | 261 ++++ docs/api/daf-rest.agentrestclient.md | 1 + docs/api/daf-rest.agentrestclient.schema.md | 11 + ...elective-disclosure.selectivedisclosure.md | 2 +- ...e-disclosure.selectivedisclosure.schema.md | 93 +- docs/api/daf-typeorm.datastore.md | 2 +- docs/api/daf-typeorm.datastore.schema.md | 93 +- docs/api/daf-typeorm.datastoreorm.md | 2 +- docs/api/daf-typeorm.datastoreorm.schema.md | 97 +- docs/api/daf-typeorm.entities.md | 2 +- docs/api/daf-typeorm.key.md | 2 +- docs/api/daf-typeorm.key.meta.md | 2 +- docs/api/daf-w3c.credentialissuer.md | 2 +- docs/api/daf-w3c.credentialissuer.schema.md | 156 +-- ...daf-w3c.icreateverifiablecredentialargs.md | 2 +- ...f-w3c.icreateverifiablepresentationargs.md | 2 +- package.json | 2 +- packages/daf-cli/src/credential.ts | 2 +- packages/daf-core/api/daf-core.api.json | 1163 ++++++++++++++++- packages/daf-core/api/daf-core.api.md | 125 +- packages/daf-core/src/agent.ts | 32 +- packages/daf-core/src/schemas/IDataStore.ts | 125 +- .../daf-core/src/schemas/IIdentityManager.ts | 9 +- packages/daf-core/src/schemas/IKeyManager.ts | 18 +- .../daf-core/src/schemas/IMessageHandler.ts | 125 +- packages/daf-core/src/types/IIdentity.ts | 2 +- packages/daf-core/src/validator.ts | 2 +- .../daf-did-comm/api/daf-did-comm.api.json | 2 +- packages/daf-did-comm/api/daf-did-comm.api.md | 93 +- packages/daf-did-comm/src/schemas/IDIDComm.ts | 125 +- packages/daf-graphql/api/daf-graphql.api.json | 27 + packages/daf-graphql/api/daf-graphql.api.md | 3 + .../api/daf-identity-manager.api.json | 2 +- .../api/daf-identity-manager.api.md | 8 +- .../api/daf-key-manager.api.json | 2 +- .../api/daf-key-manager.api.md | 8 +- packages/daf-key-manager/src/key-manager.ts | 5 +- .../api/daf-message-handler.api.json | 30 +- .../api/daf-message-handler.api.md | 252 ++++ packages/daf-rest/api/daf-rest.api.json | 27 + packages/daf-rest/api/daf-rest.api.md | 3 + .../api/daf-selective-disclosure.api.json | 6 +- .../api/daf-selective-disclosure.api.md | 93 +- .../src/message-handler.ts | 10 +- .../src/schemas/ISelectiveDisclosure.ts | 125 +- packages/daf-typeorm/api/daf-typeorm.api.json | 45 +- packages/daf-typeorm/api/daf-typeorm.api.md | 194 +-- packages/daf-typeorm/src/entities/key.ts | 2 +- .../daf-typeorm/src/schemas/IDataStoreORM.ts | 134 +- 104 files changed, 3306 insertions(+), 891 deletions(-) create mode 100644 docs/api/daf-core.agent.schema.md create mode 100644 docs/api/daf-core.verifiablecredential.__context_.md create mode 100644 docs/api/daf-core.verifiablecredential.credentialstatus.md create mode 100644 docs/api/daf-core.verifiablecredential.credentialsubject.md create mode 100644 docs/api/daf-core.verifiablecredential.expirationdate.md create mode 100644 docs/api/daf-core.verifiablecredential.id.md create mode 100644 docs/api/daf-core.verifiablecredential.issuancedate.md create mode 100644 docs/api/daf-core.verifiablecredential.issuer.md create mode 100644 docs/api/daf-core.verifiablecredential.proof.md create mode 100644 docs/api/daf-core.verifiablecredential.type.md create mode 100644 docs/api/daf-core.verifiablepresentation.__context_.md create mode 100644 docs/api/daf-core.verifiablepresentation.expirationdate.md create mode 100644 docs/api/daf-core.verifiablepresentation.holder.md create mode 100644 docs/api/daf-core.verifiablepresentation.id.md create mode 100644 docs/api/daf-core.verifiablepresentation.issuancedate.md create mode 100644 docs/api/daf-core.verifiablepresentation.proof.md create mode 100644 docs/api/daf-core.verifiablepresentation.type.md create mode 100644 docs/api/daf-core.verifiablepresentation.verifiablecredential.md create mode 100644 docs/api/daf-core.verifiablepresentation.verifier.md create mode 100644 docs/api/daf-core.w3ccredential.__context_.md create mode 100644 docs/api/daf-core.w3ccredential.credentialstatus.md create mode 100644 docs/api/daf-core.w3ccredential.credentialsubject.md create mode 100644 docs/api/daf-core.w3ccredential.expirationdate.md create mode 100644 docs/api/daf-core.w3ccredential.id.md create mode 100644 docs/api/daf-core.w3ccredential.issuancedate.md create mode 100644 docs/api/daf-core.w3ccredential.issuer.md create mode 100644 docs/api/daf-core.w3ccredential.md create mode 100644 docs/api/daf-core.w3ccredential.type.md create mode 100644 docs/api/daf-core.w3cpresentation.__context_.md create mode 100644 docs/api/daf-core.w3cpresentation.expirationdate.md create mode 100644 docs/api/daf-core.w3cpresentation.holder.md create mode 100644 docs/api/daf-core.w3cpresentation.id.md create mode 100644 docs/api/daf-core.w3cpresentation.issuancedate.md create mode 100644 docs/api/daf-core.w3cpresentation.md create mode 100644 docs/api/daf-core.w3cpresentation.type.md create mode 100644 docs/api/daf-core.w3cpresentation.verifiablecredential.md create mode 100644 docs/api/daf-core.w3cpresentation.verifier.md create mode 100644 docs/api/daf-graphql.agentgraphqlclient.schema.md create mode 100644 docs/api/daf-message-handler.messagehandler.schema.md create mode 100644 docs/api/daf-rest.agentrestclient.schema.md diff --git a/__tests__/shared/keyManager.ts b/__tests__/shared/keyManager.ts index 9db9438d6..81e839598 100644 --- a/__tests__/shared/keyManager.ts +++ b/__tests__/shared/keyManager.ts @@ -64,7 +64,7 @@ export default (testContext: { //@ts-ignore type: 'foobar', }), - ).rejects.toThrow('Key type not supported: foobar') + ).rejects.toThrow('No enum match for: foobar') }) it('should create key with meta data', async () => { diff --git a/__tests__/shared/resolveDid.ts b/__tests__/shared/resolveDid.ts index 6c8e11537..db5d78755 100644 --- a/__tests__/shared/resolveDid.ts +++ b/__tests__/shared/resolveDid.ts @@ -23,18 +23,18 @@ export default (testContext: { expect(didDoc.id).toEqual(didUrl) }) - // it('should throw an error for unsupported did methods', async () => { - // await expect(agent.resolveDid({ didUrl: 'did:foo:bar' })).rejects.toThrow("Unsupported DID method: 'foo'") - // }) + it('should throw an error for unsupported did methods', async () => { + await expect(agent.resolveDid({ didUrl: 'did:foo:bar' })).rejects.toThrow("Unsupported DID method: 'foo'") + }) - // it('should throw validation error', async () => { - // //@ts-ignore - // await expect(agent.resolveDid()).rejects.toHaveProperty('name', 'ValidationError') - // //@ts-ignore - // await expect(agent.resolveDid({})).rejects.toHaveProperty('name', 'ValidationError') - // //@ts-ignore - // await expect(agent.resolveDid({didUrl: 1})).rejects.toHaveProperty('name', 'ValidationError') + it('should throw validation error', async () => { + //@ts-ignore + await expect(agent.resolveDid()).rejects.toHaveProperty('name', 'ValidationError') + //@ts-ignore + await expect(agent.resolveDid({})).rejects.toHaveProperty('name', 'ValidationError') + //@ts-ignore + await expect(agent.resolveDid({didUrl: 1})).rejects.toHaveProperty('name', 'ValidationError') - // }) + }) }) } diff --git a/docs/api/daf-core.agent.md b/docs/api/daf-core.agent.md index 8e49fb677..17bc2464c 100644 --- a/docs/api/daf-core.agent.md +++ b/docs/api/daf-core.agent.md @@ -26,6 +26,7 @@ export declare class Agent implements IAgent | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-core.agent.methods.md) | | [IPluginMethodMap](./daf-core.ipluginmethodmap.md) | The map of plugin + override methods | +| [schema](./daf-core.agent.schema.md) | | [IAgentPluginSchema](./daf-core.iagentpluginschema.md) | | ## Methods diff --git a/docs/api/daf-core.agent.schema.md b/docs/api/daf-core.agent.schema.md new file mode 100644 index 000000000..7d3274373 --- /dev/null +++ b/docs/api/daf-core.agent.schema.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [Agent](./daf-core.agent.md) > [schema](./daf-core.agent.schema.md) + +## Agent.schema property + +Signature: + +```typescript +readonly schema: IAgentPluginSchema; +``` diff --git a/docs/api/daf-core.ikey.md b/docs/api/daf-core.ikey.md index 6c726f550..e3df2beb1 100644 --- a/docs/api/daf-core.ikey.md +++ b/docs/api/daf-core.ikey.md @@ -18,7 +18,7 @@ export interface IKey | --- | --- | --- | | [kid](./daf-core.ikey.kid.md) | string | Key ID | | [kms](./daf-core.ikey.kms.md) | string | Key Management System | -| [meta](./daf-core.ikey.meta.md) | object | Optional. Key metadata. Can be used to store auth data to access remote kms | +| [meta](./daf-core.ikey.meta.md) | object \| null | Optional. Key metadata. Can be used to store auth data to access remote kms | | [privateKeyHex](./daf-core.ikey.privatekeyhex.md) | string | Optional. Private key | | [publicKeyHex](./daf-core.ikey.publickeyhex.md) | string | Public key | | [type](./daf-core.ikey.type.md) | [TKeyType](./daf-core.tkeytype.md) | Key type | diff --git a/docs/api/daf-core.ikey.meta.md b/docs/api/daf-core.ikey.meta.md index b07d6d071..fad6eab46 100644 --- a/docs/api/daf-core.ikey.meta.md +++ b/docs/api/daf-core.ikey.meta.md @@ -9,5 +9,5 @@ Optional. Key metadata. Can be used to store auth data to access remote kms Signature: ```typescript -meta?: object; +meta?: object | null; ``` diff --git a/docs/api/daf-core.md b/docs/api/daf-core.md index b77e67a00..687c9b784 100644 --- a/docs/api/daf-core.md +++ b/docs/api/daf-core.md @@ -68,6 +68,10 @@ Provides [Agent](./daf-core.agent.md) implementation and defines [IResolver](./d | [IService](./daf-core.iservice.md) | Identity service | | [RemoveContext](./daf-core.removecontext.md) | Removes context parameter from plugin method interface | | [ResolveDidArgs](./daf-core.resolvedidargs.md) | Input arguments for [resolveDid](./daf-core.iresolver.resolvedid.md) | +| [VerifiableCredential](./daf-core.verifiablecredential.md) | Verifiable Credential [https://github.com/decentralized-identity/did-jwt-vc](https://github.com/decentralized-identity/did-jwt-vc) | +| [VerifiablePresentation](./daf-core.verifiablepresentation.md) | Verifiable Presentation [https://github.com/decentralized-identity/did-jwt-vc](https://github.com/decentralized-identity/did-jwt-vc) | +| [W3CCredential](./daf-core.w3ccredential.md) | W3CCredential [https://github.com/decentralized-identity/did-jwt-vc](https://github.com/decentralized-identity/did-jwt-vc) | +| [W3CPresentation](./daf-core.w3cpresentation.md) | W3CPresentation [https://github.com/decentralized-identity/did-jwt-vc](https://github.com/decentralized-identity/did-jwt-vc) | ## Variables @@ -81,6 +85,4 @@ Provides [Agent](./daf-core.agent.md) implementation and defines [IResolver](./d | --- | --- | | [TAgent](./daf-core.tagent.md) | Utility type for constructing agent type that has a list of available methods | | [TKeyType](./daf-core.tkeytype.md) | Cryptographic key type | -| [VerifiableCredential](./daf-core.verifiablecredential.md) | Verifiable Credential [https://github.com/decentralized-identity/did-jwt-vc](https://github.com/decentralized-identity/did-jwt-vc) | -| [VerifiablePresentation](./daf-core.verifiablepresentation.md) | Verifiable Presentation [https://github.com/decentralized-identity/did-jwt-vc](https://github.com/decentralized-identity/did-jwt-vc) | diff --git a/docs/api/daf-core.validate.md b/docs/api/daf-core.validate.md index 35e7a5517..95be63a93 100644 --- a/docs/api/daf-core.validate.md +++ b/docs/api/daf-core.validate.md @@ -7,5 +7,5 @@ Signature: ```typescript -validate: (args: object, schema: object, schemaPath?: string | undefined) => void +validate: (args: any, schema: object, schemaPath?: string | undefined) => void ``` diff --git a/docs/api/daf-core.verifiablecredential.__context_.md b/docs/api/daf-core.verifiablecredential.__context_.md new file mode 100644 index 000000000..db4e2d429 --- /dev/null +++ b/docs/api/daf-core.verifiablecredential.__context_.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiableCredential](./daf-core.verifiablecredential.md) > ["@context"](./daf-core.verifiablecredential.__context_.md) + +## VerifiableCredential."@context" property + +Signature: + +```typescript +'@context': string[]; +``` diff --git a/docs/api/daf-core.verifiablecredential.credentialstatus.md b/docs/api/daf-core.verifiablecredential.credentialstatus.md new file mode 100644 index 000000000..3d72a9c10 --- /dev/null +++ b/docs/api/daf-core.verifiablecredential.credentialstatus.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiableCredential](./daf-core.verifiablecredential.md) > [credentialStatus](./daf-core.verifiablecredential.credentialstatus.md) + +## VerifiableCredential.credentialStatus property + +Signature: + +```typescript +credentialStatus?: { + id: string; + type: string; + }; +``` diff --git a/docs/api/daf-core.verifiablecredential.credentialsubject.md b/docs/api/daf-core.verifiablecredential.credentialsubject.md new file mode 100644 index 000000000..5a5fe7d19 --- /dev/null +++ b/docs/api/daf-core.verifiablecredential.credentialsubject.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiableCredential](./daf-core.verifiablecredential.md) > [credentialSubject](./daf-core.verifiablecredential.credentialsubject.md) + +## VerifiableCredential.credentialSubject property + +Signature: + +```typescript +credentialSubject: { + id?: string; + [x: string]: any; + }; +``` diff --git a/docs/api/daf-core.verifiablecredential.expirationdate.md b/docs/api/daf-core.verifiablecredential.expirationdate.md new file mode 100644 index 000000000..c23694eac --- /dev/null +++ b/docs/api/daf-core.verifiablecredential.expirationdate.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiableCredential](./daf-core.verifiablecredential.md) > [expirationDate](./daf-core.verifiablecredential.expirationdate.md) + +## VerifiableCredential.expirationDate property + +Signature: + +```typescript +expirationDate?: string; +``` diff --git a/docs/api/daf-core.verifiablecredential.id.md b/docs/api/daf-core.verifiablecredential.id.md new file mode 100644 index 000000000..eff24f1f9 --- /dev/null +++ b/docs/api/daf-core.verifiablecredential.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiableCredential](./daf-core.verifiablecredential.md) > [id](./daf-core.verifiablecredential.id.md) + +## VerifiableCredential.id property + +Signature: + +```typescript +id?: string; +``` diff --git a/docs/api/daf-core.verifiablecredential.issuancedate.md b/docs/api/daf-core.verifiablecredential.issuancedate.md new file mode 100644 index 000000000..ee8de4be9 --- /dev/null +++ b/docs/api/daf-core.verifiablecredential.issuancedate.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiableCredential](./daf-core.verifiablecredential.md) > [issuanceDate](./daf-core.verifiablecredential.issuancedate.md) + +## VerifiableCredential.issuanceDate property + +Signature: + +```typescript +issuanceDate: string; +``` diff --git a/docs/api/daf-core.verifiablecredential.issuer.md b/docs/api/daf-core.verifiablecredential.issuer.md new file mode 100644 index 000000000..92c68c7b9 --- /dev/null +++ b/docs/api/daf-core.verifiablecredential.issuer.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiableCredential](./daf-core.verifiablecredential.md) > [issuer](./daf-core.verifiablecredential.issuer.md) + +## VerifiableCredential.issuer property + +Signature: + +```typescript +issuer: { + id: string; + [x: string]: any; + }; +``` diff --git a/docs/api/daf-core.verifiablecredential.md b/docs/api/daf-core.verifiablecredential.md index f7460db83..be1666f81 100644 --- a/docs/api/daf-core.verifiablecredential.md +++ b/docs/api/daf-core.verifiablecredential.md @@ -2,12 +2,27 @@ [Home](./index.md) > [daf-core](./daf-core.md) > [VerifiableCredential](./daf-core.verifiablecredential.md) -## VerifiableCredential type +## VerifiableCredential interface Verifiable Credential [https://github.com/decentralized-identity/did-jwt-vc](https://github.com/decentralized-identity/did-jwt-vc) Signature: ```typescript -export declare type VerifiableCredential = Verifiable; +export interface VerifiableCredential ``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| ["@context"](./daf-core.verifiablecredential.__context_.md) | string\[\] | | +| [credentialStatus](./daf-core.verifiablecredential.credentialstatus.md) | { id: string; type: string; } | | +| [credentialSubject](./daf-core.verifiablecredential.credentialsubject.md) | { id?: string; \[x: string\]: any; } | | +| [expirationDate](./daf-core.verifiablecredential.expirationdate.md) | string | | +| [id](./daf-core.verifiablecredential.id.md) | string | | +| [issuanceDate](./daf-core.verifiablecredential.issuancedate.md) | string | | +| [issuer](./daf-core.verifiablecredential.issuer.md) | { id: string; \[x: string\]: any; } | | +| [proof](./daf-core.verifiablecredential.proof.md) | { type?: string; \[x: string\]: any; } | | +| [type](./daf-core.verifiablecredential.type.md) | string\[\] | | + diff --git a/docs/api/daf-core.verifiablecredential.proof.md b/docs/api/daf-core.verifiablecredential.proof.md new file mode 100644 index 000000000..8a32bebf9 --- /dev/null +++ b/docs/api/daf-core.verifiablecredential.proof.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiableCredential](./daf-core.verifiablecredential.md) > [proof](./daf-core.verifiablecredential.proof.md) + +## VerifiableCredential.proof property + +Signature: + +```typescript +proof: { + type?: string; + [x: string]: any; + }; +``` diff --git a/docs/api/daf-core.verifiablecredential.type.md b/docs/api/daf-core.verifiablecredential.type.md new file mode 100644 index 000000000..e9ade0c41 --- /dev/null +++ b/docs/api/daf-core.verifiablecredential.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiableCredential](./daf-core.verifiablecredential.md) > [type](./daf-core.verifiablecredential.type.md) + +## VerifiableCredential.type property + +Signature: + +```typescript +type: string[]; +``` diff --git a/docs/api/daf-core.verifiablepresentation.__context_.md b/docs/api/daf-core.verifiablepresentation.__context_.md new file mode 100644 index 000000000..cd9c28487 --- /dev/null +++ b/docs/api/daf-core.verifiablepresentation.__context_.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiablePresentation](./daf-core.verifiablepresentation.md) > ["@context"](./daf-core.verifiablepresentation.__context_.md) + +## VerifiablePresentation."@context" property + +Signature: + +```typescript +'@context': string[]; +``` diff --git a/docs/api/daf-core.verifiablepresentation.expirationdate.md b/docs/api/daf-core.verifiablepresentation.expirationdate.md new file mode 100644 index 000000000..b93856cc6 --- /dev/null +++ b/docs/api/daf-core.verifiablepresentation.expirationdate.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiablePresentation](./daf-core.verifiablepresentation.md) > [expirationDate](./daf-core.verifiablepresentation.expirationdate.md) + +## VerifiablePresentation.expirationDate property + +Signature: + +```typescript +expirationDate?: string; +``` diff --git a/docs/api/daf-core.verifiablepresentation.holder.md b/docs/api/daf-core.verifiablepresentation.holder.md new file mode 100644 index 000000000..39a23280a --- /dev/null +++ b/docs/api/daf-core.verifiablepresentation.holder.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiablePresentation](./daf-core.verifiablepresentation.md) > [holder](./daf-core.verifiablepresentation.holder.md) + +## VerifiablePresentation.holder property + +Signature: + +```typescript +holder: string; +``` diff --git a/docs/api/daf-core.verifiablepresentation.id.md b/docs/api/daf-core.verifiablepresentation.id.md new file mode 100644 index 000000000..009dbec6e --- /dev/null +++ b/docs/api/daf-core.verifiablepresentation.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiablePresentation](./daf-core.verifiablepresentation.md) > [id](./daf-core.verifiablepresentation.id.md) + +## VerifiablePresentation.id property + +Signature: + +```typescript +id?: string; +``` diff --git a/docs/api/daf-core.verifiablepresentation.issuancedate.md b/docs/api/daf-core.verifiablepresentation.issuancedate.md new file mode 100644 index 000000000..bc244179e --- /dev/null +++ b/docs/api/daf-core.verifiablepresentation.issuancedate.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiablePresentation](./daf-core.verifiablepresentation.md) > [issuanceDate](./daf-core.verifiablepresentation.issuancedate.md) + +## VerifiablePresentation.issuanceDate property + +Signature: + +```typescript +issuanceDate?: string; +``` diff --git a/docs/api/daf-core.verifiablepresentation.md b/docs/api/daf-core.verifiablepresentation.md index 5dc515dc1..56ce67666 100644 --- a/docs/api/daf-core.verifiablepresentation.md +++ b/docs/api/daf-core.verifiablepresentation.md @@ -2,12 +2,27 @@ [Home](./index.md) > [daf-core](./daf-core.md) > [VerifiablePresentation](./daf-core.verifiablepresentation.md) -## VerifiablePresentation type +## VerifiablePresentation interface Verifiable Presentation [https://github.com/decentralized-identity/did-jwt-vc](https://github.com/decentralized-identity/did-jwt-vc) Signature: ```typescript -export declare type VerifiablePresentation = Verifiable; +export interface VerifiablePresentation ``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| ["@context"](./daf-core.verifiablepresentation.__context_.md) | string\[\] | | +| [expirationDate](./daf-core.verifiablepresentation.expirationdate.md) | string | | +| [holder](./daf-core.verifiablepresentation.holder.md) | string | | +| [id](./daf-core.verifiablepresentation.id.md) | string | | +| [issuanceDate](./daf-core.verifiablepresentation.issuancedate.md) | string | | +| [proof](./daf-core.verifiablepresentation.proof.md) | { type?: string; \[x: string\]: any; } | | +| [type](./daf-core.verifiablepresentation.type.md) | string\[\] | | +| [verifiableCredential](./daf-core.verifiablepresentation.verifiablecredential.md) | [VerifiableCredential](./daf-core.verifiablecredential.md)\[\] | | +| [verifier](./daf-core.verifiablepresentation.verifier.md) | string\[\] | | + diff --git a/docs/api/daf-core.verifiablepresentation.proof.md b/docs/api/daf-core.verifiablepresentation.proof.md new file mode 100644 index 000000000..c64ab2d50 --- /dev/null +++ b/docs/api/daf-core.verifiablepresentation.proof.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiablePresentation](./daf-core.verifiablepresentation.md) > [proof](./daf-core.verifiablepresentation.proof.md) + +## VerifiablePresentation.proof property + +Signature: + +```typescript +proof: { + type?: string; + [x: string]: any; + }; +``` diff --git a/docs/api/daf-core.verifiablepresentation.type.md b/docs/api/daf-core.verifiablepresentation.type.md new file mode 100644 index 000000000..f6312d0af --- /dev/null +++ b/docs/api/daf-core.verifiablepresentation.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiablePresentation](./daf-core.verifiablepresentation.md) > [type](./daf-core.verifiablepresentation.type.md) + +## VerifiablePresentation.type property + +Signature: + +```typescript +type: string[]; +``` diff --git a/docs/api/daf-core.verifiablepresentation.verifiablecredential.md b/docs/api/daf-core.verifiablepresentation.verifiablecredential.md new file mode 100644 index 000000000..af5d06747 --- /dev/null +++ b/docs/api/daf-core.verifiablepresentation.verifiablecredential.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiablePresentation](./daf-core.verifiablepresentation.md) > [verifiableCredential](./daf-core.verifiablepresentation.verifiablecredential.md) + +## VerifiablePresentation.verifiableCredential property + +Signature: + +```typescript +verifiableCredential: VerifiableCredential[]; +``` diff --git a/docs/api/daf-core.verifiablepresentation.verifier.md b/docs/api/daf-core.verifiablepresentation.verifier.md new file mode 100644 index 000000000..9372c8f83 --- /dev/null +++ b/docs/api/daf-core.verifiablepresentation.verifier.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [VerifiablePresentation](./daf-core.verifiablepresentation.md) > [verifier](./daf-core.verifiablepresentation.verifier.md) + +## VerifiablePresentation.verifier property + +Signature: + +```typescript +verifier: string[]; +``` diff --git a/docs/api/daf-core.w3ccredential.__context_.md b/docs/api/daf-core.w3ccredential.__context_.md new file mode 100644 index 000000000..cdfa01043 --- /dev/null +++ b/docs/api/daf-core.w3ccredential.__context_.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CCredential](./daf-core.w3ccredential.md) > ["@context"](./daf-core.w3ccredential.__context_.md) + +## W3CCredential."@context" property + +Signature: + +```typescript +'@context': string[]; +``` diff --git a/docs/api/daf-core.w3ccredential.credentialstatus.md b/docs/api/daf-core.w3ccredential.credentialstatus.md new file mode 100644 index 000000000..e109fcebd --- /dev/null +++ b/docs/api/daf-core.w3ccredential.credentialstatus.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CCredential](./daf-core.w3ccredential.md) > [credentialStatus](./daf-core.w3ccredential.credentialstatus.md) + +## W3CCredential.credentialStatus property + +Signature: + +```typescript +credentialStatus?: { + id: string; + type: string; + }; +``` diff --git a/docs/api/daf-core.w3ccredential.credentialsubject.md b/docs/api/daf-core.w3ccredential.credentialsubject.md new file mode 100644 index 000000000..961b4dd7a --- /dev/null +++ b/docs/api/daf-core.w3ccredential.credentialsubject.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CCredential](./daf-core.w3ccredential.md) > [credentialSubject](./daf-core.w3ccredential.credentialsubject.md) + +## W3CCredential.credentialSubject property + +Signature: + +```typescript +credentialSubject: { + id?: string; + [x: string]: any; + }; +``` diff --git a/docs/api/daf-core.w3ccredential.expirationdate.md b/docs/api/daf-core.w3ccredential.expirationdate.md new file mode 100644 index 000000000..5675c931b --- /dev/null +++ b/docs/api/daf-core.w3ccredential.expirationdate.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CCredential](./daf-core.w3ccredential.md) > [expirationDate](./daf-core.w3ccredential.expirationdate.md) + +## W3CCredential.expirationDate property + +Signature: + +```typescript +expirationDate?: string; +``` diff --git a/docs/api/daf-core.w3ccredential.id.md b/docs/api/daf-core.w3ccredential.id.md new file mode 100644 index 000000000..6bb5050d1 --- /dev/null +++ b/docs/api/daf-core.w3ccredential.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CCredential](./daf-core.w3ccredential.md) > [id](./daf-core.w3ccredential.id.md) + +## W3CCredential.id property + +Signature: + +```typescript +id?: string; +``` diff --git a/docs/api/daf-core.w3ccredential.issuancedate.md b/docs/api/daf-core.w3ccredential.issuancedate.md new file mode 100644 index 000000000..af5b9110e --- /dev/null +++ b/docs/api/daf-core.w3ccredential.issuancedate.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CCredential](./daf-core.w3ccredential.md) > [issuanceDate](./daf-core.w3ccredential.issuancedate.md) + +## W3CCredential.issuanceDate property + +Signature: + +```typescript +issuanceDate: string; +``` diff --git a/docs/api/daf-core.w3ccredential.issuer.md b/docs/api/daf-core.w3ccredential.issuer.md new file mode 100644 index 000000000..474468a7f --- /dev/null +++ b/docs/api/daf-core.w3ccredential.issuer.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CCredential](./daf-core.w3ccredential.md) > [issuer](./daf-core.w3ccredential.issuer.md) + +## W3CCredential.issuer property + +Signature: + +```typescript +issuer: { + id: string; + [x: string]: any; + }; +``` diff --git a/docs/api/daf-core.w3ccredential.md b/docs/api/daf-core.w3ccredential.md new file mode 100644 index 000000000..9a45b2bec --- /dev/null +++ b/docs/api/daf-core.w3ccredential.md @@ -0,0 +1,27 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CCredential](./daf-core.w3ccredential.md) + +## W3CCredential interface + +W3CCredential [https://github.com/decentralized-identity/did-jwt-vc](https://github.com/decentralized-identity/did-jwt-vc) + +Signature: + +```typescript +export interface W3CCredential +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| ["@context"](./daf-core.w3ccredential.__context_.md) | string\[\] | | +| [credentialStatus](./daf-core.w3ccredential.credentialstatus.md) | { id: string; type: string; } | | +| [credentialSubject](./daf-core.w3ccredential.credentialsubject.md) | { id?: string; \[x: string\]: any; } | | +| [expirationDate](./daf-core.w3ccredential.expirationdate.md) | string | | +| [id](./daf-core.w3ccredential.id.md) | string | | +| [issuanceDate](./daf-core.w3ccredential.issuancedate.md) | string | | +| [issuer](./daf-core.w3ccredential.issuer.md) | { id: string; \[x: string\]: any; } | | +| [type](./daf-core.w3ccredential.type.md) | string\[\] | | + diff --git a/docs/api/daf-core.w3ccredential.type.md b/docs/api/daf-core.w3ccredential.type.md new file mode 100644 index 000000000..22a7ede5b --- /dev/null +++ b/docs/api/daf-core.w3ccredential.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CCredential](./daf-core.w3ccredential.md) > [type](./daf-core.w3ccredential.type.md) + +## W3CCredential.type property + +Signature: + +```typescript +type: string[]; +``` diff --git a/docs/api/daf-core.w3cpresentation.__context_.md b/docs/api/daf-core.w3cpresentation.__context_.md new file mode 100644 index 000000000..6ba5b2f25 --- /dev/null +++ b/docs/api/daf-core.w3cpresentation.__context_.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CPresentation](./daf-core.w3cpresentation.md) > ["@context"](./daf-core.w3cpresentation.__context_.md) + +## W3CPresentation."@context" property + +Signature: + +```typescript +'@context': string[]; +``` diff --git a/docs/api/daf-core.w3cpresentation.expirationdate.md b/docs/api/daf-core.w3cpresentation.expirationdate.md new file mode 100644 index 000000000..fe893798a --- /dev/null +++ b/docs/api/daf-core.w3cpresentation.expirationdate.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CPresentation](./daf-core.w3cpresentation.md) > [expirationDate](./daf-core.w3cpresentation.expirationdate.md) + +## W3CPresentation.expirationDate property + +Signature: + +```typescript +expirationDate?: string; +``` diff --git a/docs/api/daf-core.w3cpresentation.holder.md b/docs/api/daf-core.w3cpresentation.holder.md new file mode 100644 index 000000000..2ba8aa80c --- /dev/null +++ b/docs/api/daf-core.w3cpresentation.holder.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CPresentation](./daf-core.w3cpresentation.md) > [holder](./daf-core.w3cpresentation.holder.md) + +## W3CPresentation.holder property + +Signature: + +```typescript +holder: string; +``` diff --git a/docs/api/daf-core.w3cpresentation.id.md b/docs/api/daf-core.w3cpresentation.id.md new file mode 100644 index 000000000..849f30bf3 --- /dev/null +++ b/docs/api/daf-core.w3cpresentation.id.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CPresentation](./daf-core.w3cpresentation.md) > [id](./daf-core.w3cpresentation.id.md) + +## W3CPresentation.id property + +Signature: + +```typescript +id?: string; +``` diff --git a/docs/api/daf-core.w3cpresentation.issuancedate.md b/docs/api/daf-core.w3cpresentation.issuancedate.md new file mode 100644 index 000000000..de7cc55d7 --- /dev/null +++ b/docs/api/daf-core.w3cpresentation.issuancedate.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CPresentation](./daf-core.w3cpresentation.md) > [issuanceDate](./daf-core.w3cpresentation.issuancedate.md) + +## W3CPresentation.issuanceDate property + +Signature: + +```typescript +issuanceDate?: string; +``` diff --git a/docs/api/daf-core.w3cpresentation.md b/docs/api/daf-core.w3cpresentation.md new file mode 100644 index 000000000..3a21fc8cc --- /dev/null +++ b/docs/api/daf-core.w3cpresentation.md @@ -0,0 +1,27 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CPresentation](./daf-core.w3cpresentation.md) + +## W3CPresentation interface + +W3CPresentation [https://github.com/decentralized-identity/did-jwt-vc](https://github.com/decentralized-identity/did-jwt-vc) + +Signature: + +```typescript +export interface W3CPresentation +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| ["@context"](./daf-core.w3cpresentation.__context_.md) | string\[\] | | +| [expirationDate](./daf-core.w3cpresentation.expirationdate.md) | string | | +| [holder](./daf-core.w3cpresentation.holder.md) | string | | +| [id](./daf-core.w3cpresentation.id.md) | string | | +| [issuanceDate](./daf-core.w3cpresentation.issuancedate.md) | string | | +| [type](./daf-core.w3cpresentation.type.md) | string\[\] | | +| [verifiableCredential](./daf-core.w3cpresentation.verifiablecredential.md) | [VerifiableCredential](./daf-core.verifiablecredential.md)\[\] | | +| [verifier](./daf-core.w3cpresentation.verifier.md) | string\[\] | | + diff --git a/docs/api/daf-core.w3cpresentation.type.md b/docs/api/daf-core.w3cpresentation.type.md new file mode 100644 index 000000000..64fc1fe68 --- /dev/null +++ b/docs/api/daf-core.w3cpresentation.type.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CPresentation](./daf-core.w3cpresentation.md) > [type](./daf-core.w3cpresentation.type.md) + +## W3CPresentation.type property + +Signature: + +```typescript +type: string[]; +``` diff --git a/docs/api/daf-core.w3cpresentation.verifiablecredential.md b/docs/api/daf-core.w3cpresentation.verifiablecredential.md new file mode 100644 index 000000000..6e87a7886 --- /dev/null +++ b/docs/api/daf-core.w3cpresentation.verifiablecredential.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CPresentation](./daf-core.w3cpresentation.md) > [verifiableCredential](./daf-core.w3cpresentation.verifiablecredential.md) + +## W3CPresentation.verifiableCredential property + +Signature: + +```typescript +verifiableCredential: VerifiableCredential[]; +``` diff --git a/docs/api/daf-core.w3cpresentation.verifier.md b/docs/api/daf-core.w3cpresentation.verifier.md new file mode 100644 index 000000000..d359995ce --- /dev/null +++ b/docs/api/daf-core.w3cpresentation.verifier.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-core](./daf-core.md) > [W3CPresentation](./daf-core.w3cpresentation.md) > [verifier](./daf-core.w3cpresentation.verifier.md) + +## W3CPresentation.verifier property + +Signature: + +```typescript +verifier: string[]; +``` diff --git a/docs/api/daf-did-comm.didcomm.md b/docs/api/daf-did-comm.didcomm.md index 8b5d1dcca..d60d763e8 100644 --- a/docs/api/daf-did-comm.didcomm.md +++ b/docs/api/daf-did-comm.didcomm.md @@ -33,7 +33,7 @@ Be advised that this spec is still not final and that this protocol may need to | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-did-comm.didcomm.methods.md) | | [IDIDComm](./daf-did-comm.ididcomm.md) | (BETA) Plugin methods | -| [schema](./daf-did-comm.didcomm.schema.md) | | { components: { schemas: { ISendMessageDIDCommAlpha1Args: { type: string; properties: { url: { type: string; }; save: { type: string; }; data: { type: string; properties: { id: { type: string; }; from: { type: string; }; to: { type: string; }; type: { type: string; }; body: { anyOf: { type: string; }\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMessage: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; createdAt: { type: string; description: string; }; expiresAt: { type: string; description: string; }; threadId: { type: string; description: string; }; raw: { type: string; /\*\* {@inheritdoc IDIDComm.sendMessageDIDCommAlpha1} \*/ description: string; }; data: { anyOf: { type: string; }\[\]; description: string; }; replyTo: { type: string; items: { type: string; }; description: string; }; replyUrl: { type: string; description: string; }; from: { type: string; description: string; }; to: { type: string; description: string; }; metaData: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { $ref: string; }; description: string; }; presentations: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMetaData: { type: string; properties: { type: { type: string; description: string; }; value: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiableCredential: { $ref: string; description: string; }; "Verifiable-W3CCredential": { type: string; additionalProperties: boolean; properties: { proof: { $ref: string; }; id: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; }; "@context": { type: string; properties: {}; }; type: { type: string; properties: {}; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; }; required: string\[\]; description: string; }; Proof: { type: string; properties: { type: { type: string; }; }; }; VerifiablePresentation: { $ref: string; description: string; }; "Verifiable-W3CPresentation": { type: string; additionalProperties: boolean; properties: { proof: { $ref: string; }; id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; properties: {}; }; type: { type: string; properties: {}; }; verifier: { type: string; properties: {}; }; verifiableCredential: { type: string; properties: {}; }; }; required: string\[\]; description: string; }; }; methods: { sendMessageDIDCommAlpha1: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; }; }; } | (BETA) | +| [schema](./daf-did-comm.didcomm.schema.md) | | { components: { schemas: { ISendMessageDIDCommAlpha1Args: { type: string; properties: { url: { type: string; }; save: { type: string; }; data: { type: string; properties: { id: { type: string; }; from: { type: string; }; to: { type: string; }; type: { type: string; }; body: { anyOf: { type: string; }\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMessage: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; createdAt: { type: string; description: string; }; expiresAt: { type: string; description: string; }; threadId: { type: string; description: string; }; raw: { type: string; /\*\* {@inheritdoc IDIDComm.sendMessageDIDCommAlpha1} \*/ description: string; }; data: { anyOf: { type: string; }\[\]; description: string; }; replyTo: { type: string; items: { type: string; }; description: string; }; replyUrl: { type: string; description: string; }; from: { type: string; description: string; }; to: { type: string; description: string; }; metaData: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { $ref: string; }; description: string; }; presentations: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMetaData: { type: string; properties: { type: { type: string; description: string; }; value: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiableCredential: { type: string; properties: { "@context": { type: string; items: { type: string; }; }; id: { type: string; }; type: { type: string; items: { type: string; }; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; additionalProperties: boolean; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; VerifiablePresentation: { type: string; properties: { id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; items: { type: string; }; }; type: { type: string; items: { type: string; }; }; verifier: { type: string; items: { type: string; }; }; verifiableCredential: { type: string; items: { $ref: string; }; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; }; methods: { sendMessageDIDCommAlpha1: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; }; }; } | (BETA) | ## Methods diff --git a/docs/api/daf-did-comm.didcomm.schema.md b/docs/api/daf-did-comm.didcomm.schema.md index 98d87db02..473ca8c3f 100644 --- a/docs/api/daf-did-comm.didcomm.schema.md +++ b/docs/api/daf-did-comm.didcomm.schema.md @@ -146,85 +146,74 @@ readonly schema: { description: string; }; VerifiableCredential: { - $ref: string; - description: string; - }; - "Verifiable-W3CCredential": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; + "@context": { + type: string; + items: { + type: string; + }; }; id: { type: string; }; - credentialSubject: { + type: { type: string; - properties: { - id: { - type: string; - }; + items: { + type: string; }; }; - credentialStatus: { + issuer: { type: string; properties: { id: { type: string; }; - type: { - type: string; - }; }; required: string[]; }; - "@context": { + issuanceDate: { type: string; - properties: {}; }; - type: { + expirationDate: { type: string; - properties: {}; }; - issuer: { + credentialSubject: { type: string; properties: { id: { type: string; }; }; - required: string[]; }; - issuanceDate: { + credentialStatus: { type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; }; - expirationDate: { + proof: { type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; description: string; }; - Proof: { - type: string; - properties: { - type: { - type: string; - }; - }; - }; VerifiablePresentation: { - $ref: string; - description: string; - }; - "Verifiable-W3CPresentation": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; - }; id: { type: string; }; @@ -239,19 +228,35 @@ readonly schema: { }; "@context": { type: string; - properties: {}; + items: { + type: string; + }; }; type: { type: string; - properties: {}; + items: { + type: string; + }; }; verifier: { type: string; - properties: {}; + items: { + type: string; + }; }; verifiableCredential: { type: string; - properties: {}; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; diff --git a/docs/api/daf-graphql.agentgraphqlclient.md b/docs/api/daf-graphql.agentgraphqlclient.md index 21bc01535..0b8e49e7f 100644 --- a/docs/api/daf-graphql.agentgraphqlclient.md +++ b/docs/api/daf-graphql.agentgraphqlclient.md @@ -22,4 +22,5 @@ export declare class AgentGraphQLClient implements IAgentPlugin | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-graphql.agentgraphqlclient.methods.md) | | [IPluginMethodMap](./daf-core.ipluginmethodmap.md) | | +| [schema](./daf-graphql.agentgraphqlclient.schema.md) | | [IAgentPluginSchema](./daf-core.iagentpluginschema.md) | | diff --git a/docs/api/daf-graphql.agentgraphqlclient.schema.md b/docs/api/daf-graphql.agentgraphqlclient.schema.md new file mode 100644 index 000000000..2cdf500dd --- /dev/null +++ b/docs/api/daf-graphql.agentgraphqlclient.schema.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-graphql](./daf-graphql.md) > [AgentGraphQLClient](./daf-graphql.agentgraphqlclient.md) > [schema](./daf-graphql.agentgraphqlclient.schema.md) + +## AgentGraphQLClient.schema property + +Signature: + +```typescript +readonly schema: IAgentPluginSchema; +``` diff --git a/docs/api/daf-identity-manager.identitymanager.md b/docs/api/daf-identity-manager.identitymanager.md index 2903550bc..78e8d2745 100644 --- a/docs/api/daf-identity-manager.identitymanager.md +++ b/docs/api/daf-identity-manager.identitymanager.md @@ -24,7 +24,7 @@ export declare class IdentityManager implements IAgentPlugin | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-identity-manager.identitymanager.methods.md) | | [IIdentityManager](./daf-core.iidentitymanager.md) | Plugin methods | -| [schema](./daf-identity-manager.identitymanager.schema.md) | | { components: { schemas: { IIdentityManagerAddKeyArgs: { type: string; properties: { did: { type: string; description: string; }; key: { $ref: string; description: string; }; options: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; /\*\* \* Agent plugin that implements {@link daf-core\#IIdentityManager} interface \* @public \*/ }; IKey: { type: string; properties: { kid: { type: string; description: string; }; kms: { type: string; description: string; }; type: { $ref: string; description: string; }; publicKeyHex: { type: string; description: string; }; privateKeyHex: { type: string; description: string; }; meta: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; TKeyType: { type: string; enum: string\[\]; description: string; }; IIdentityManagerAddServiceArgs: { type: string; properties: { did: { type: string; description: string; }; service: { $ref: string; description: string; }; options: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IService: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; serviceEndpoint: { type: string; description: string; }; description: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerCreateIdentityArgs: { type: string; properties: { alias: { type: string; description: string; }; provider: { type: string; description: string; }; kms: { type: string; description: string; }; options: { type: string; description: string; }; }; additionalProperties: boolean; description: string; }; IIdentity: { type: string; properties: { did: { type: string; description: string; }; alias: { type: string; description: string; }; provider: { type: string; description: string; }; controllerKeyId: { type: string; description: string; }; keys: { type: string; items: { $ref: string; }; description: string; }; services: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerDeleteIdentityArgs: { type: string; properties: { did: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerGetIdentitiesArgs: { type: string; properties: { alias: { type: string; description: string; }; provider: { type: string; description: string; }; }; additionalProperties: boolean; description: string; }; IIdentityManagerGetIdentityArgs: { type: string; properties: { did: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerGetIdentityByAliasArgs: { type: string; properties: { alias: { type: string; description: string; }; provider: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerGetOrCreateIdentityArgs: { type: string; properties: { alias: { type: string; description: string; }; provider: { type: string; description: string; }; kms: { type: string; description: string; }; options: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerRemoveKeyArgs: { type: string; properties: { did: { type: string; description: string; }; kid: { type: string; description: string; }; options: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerRemoveServiceArgs: { type: string; properties: { did: { type: string; description: string; }; id: { type: string; description: string; }; options: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerSetAliasArgs: { type: string; properties: { did: { type: string; description: string; }; alias: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; }; methods: { identityManagerAddKey: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; identityManagerAddService: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; identityManagerCreateIdentity: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; identityManagerDeleteIdentity: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; identityManagerGetIdentities: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; identityManagerGetIdentity: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; identityManagerGetIdentityByAlias: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; identityManagerGetOrCreateIdentity: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; identityManagerGetProviders: { description: string; arguments: { type: string; }; returnType: { type: string; items: { type: string; }; }; }; identityManagerImportIdentity: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; identityManagerRemoveKey: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; identityManagerRemoveService: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; identityManagerSetAlias: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; }; }; } | | +| [schema](./daf-identity-manager.identitymanager.schema.md) | | { components: { schemas: { IIdentityManagerAddKeyArgs: { type: string; properties: { did: { type: string; description: string; }; key: { $ref: string; description: string; }; options: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; /\*\* \* Agent plugin that implements {@link daf-core\#IIdentityManager} interface \* @public \*/ }; IKey: { type: string; properties: { kid: { type: string; description: string; }; kms: { type: string; description: string; }; type: { $ref: string; description: string; }; publicKeyHex: { type: string; description: string; }; privateKeyHex: { type: string; description: string; }; meta: { anyOf: { type: string; }\[\]; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; TKeyType: { type: string; enum: string\[\]; description: string; }; IIdentityManagerAddServiceArgs: { type: string; properties: { did: { type: string; description: string; }; service: { $ref: string; description: string; }; options: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IService: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; serviceEndpoint: { type: string; description: string; }; description: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerCreateIdentityArgs: { type: string; properties: { alias: { type: string; description: string; }; provider: { type: string; description: string; }; kms: { type: string; description: string; }; options: { type: string; description: string; }; }; additionalProperties: boolean; description: string; }; IIdentity: { type: string; properties: { did: { type: string; description: string; }; alias: { type: string; description: string; }; provider: { type: string; /\*\* {@inheritDoc daf-core\#IIdentityManager.identityManagerGetOrCreateIdentity} \*/ description: string; }; controllerKeyId: { type: string; description: string; }; keys: { type: string; items: { $ref: string; }; description: string; }; services: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerDeleteIdentityArgs: { type: string; properties: { did: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerGetIdentitiesArgs: { type: string; properties: { alias: { type: string; description: string; }; provider: { type: string; description: string; }; }; additionalProperties: boolean; description: string; }; IIdentityManagerGetIdentityArgs: { type: string; properties: { did: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerGetIdentityByAliasArgs: { type: string; properties: { alias: { type: string; description: string; }; provider: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerGetOrCreateIdentityArgs: { type: string; properties: { alias: { type: string; description: string; }; provider: { type: string; description: string; }; kms: { type: string; description: string; }; options: { type: string; description: string; }; }; required: string\[\]; /\*\* {@inheritDoc daf-core\#IIdentityManager.identityManagerRemoveService} \*/ additionalProperties: boolean; description: string; }; IIdentityManagerRemoveKeyArgs: { type: string; properties: { did: { type: string; description: string; }; kid: { type: string; description: string; }; options: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerRemoveServiceArgs: { type: string; properties: { did: { type: string; description: string; }; id: { type: string; description: string; }; options: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IIdentityManagerSetAliasArgs: { type: string; properties: { did: { type: string; description: string; }; alias: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; }; methods: { identityManagerAddKey: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; identityManagerAddService: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; identityManagerCreateIdentity: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; identityManagerDeleteIdentity: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; identityManagerGetIdentities: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; identityManagerGetIdentity: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; identityManagerGetIdentityByAlias: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; identityManagerGetOrCreateIdentity: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; identityManagerGetProviders: { description: string; arguments: { type: string; }; returnType: { type: string; items: { type: string; }; }; }; identityManagerImportIdentity: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; identityManagerRemoveKey: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; identityManagerRemoveService: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; identityManagerSetAlias: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; }; }; } | | ## Methods diff --git a/docs/api/daf-identity-manager.identitymanager.schema.md b/docs/api/daf-identity-manager.identitymanager.schema.md index dbba956e6..2d685f00b 100644 --- a/docs/api/daf-identity-manager.identitymanager.schema.md +++ b/docs/api/daf-identity-manager.identitymanager.schema.md @@ -57,7 +57,9 @@ readonly schema: { description: string; }; meta: { - type: string; + anyOf: { + type: string; + }[]; description: string; }; }; @@ -149,7 +151,7 @@ readonly schema: { description: string; }; provider: { - type: string; + type: string; /** {@inheritDoc daf-core#IIdentityManager.identityManagerGetOrCreateIdentity} */ description: string; }; controllerKeyId: { @@ -250,7 +252,7 @@ readonly schema: { description: string; }; }; - required: string[]; + required: string[]; /** {@inheritDoc daf-core#IIdentityManager.identityManagerRemoveService} */ additionalProperties: boolean; description: string; }; diff --git a/docs/api/daf-key-manager.keymanager.md b/docs/api/daf-key-manager.keymanager.md index cd7a8d232..9de28d4a6 100644 --- a/docs/api/daf-key-manager.keymanager.md +++ b/docs/api/daf-key-manager.keymanager.md @@ -24,7 +24,7 @@ export declare class KeyManager implements IAgentPlugin | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-key-manager.keymanager.methods.md) | | [IKeyManager](./daf-core.ikeymanager.md) | Plugin methods | -| [schema](./daf-key-manager.keymanager.schema.md) | | { components: { schemas: { IKeyManagerCreateKeyArgs: { type: string; properties: { type: { $ref: string; description: string; }; kms: { type: string; description: string; }; meta: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; TKeyType: { type: string; enum: string\[\]; description: string; }; IKey: { type: string; properties: { kid: { type: string; description: string; }; kms: { type: string; description: string; }; type: { $ref: string; description: string; }; publicKeyHex: { type: string; description: string; }; privateKeyHex: { type: string; description: string; }; meta: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerDecryptJWEArgs: { type: string; properties: { kid: { type: string; description: string; }; data: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerDeleteKeyArgs: { type: string; properties: { kid: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerEncryptJWEArgs: { type: string; properties: { kid: { type: string; description: string; }; to: { type: string; properties: { kid: { type: string; description: string; }; type: { $ref: string; description: string; }; publicKeyHex: { type: string; description: string; }; privateKeyHex: { type: string; description: string; }; meta: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; data: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerGetKeyArgs: { type: string; properties: { kid: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerSignEthTXArgs: { type: string; properties: { kid: { type: string; description: string; }; transaction: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerSignJWTArgs: { type: string; properties: { kid: { type: string; description: string; }; data: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; }; methods: { keyManagerCreateKey: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; keyManagerDecryptJWE: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerDeleteKey: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerEncryptJWE: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerGetKey: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; keyManagerGetKeyManagementSystems: { description: string; arguments: { type: string; }; returnType: { type: string; items: { type: string; }; }; }; keyManagerImportKey: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerSignEthTX: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerSignJWT: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; }; }; } | | +| [schema](./daf-key-manager.keymanager.schema.md) | | { components: { schemas: { IKeyManagerCreateKeyArgs: { type: string; properties: { type: { $ref: string; description: string; }; kms: { type: string; description: string; }; meta: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; TKeyType: { type: string; enum: string\[\]; description: string; }; IKey: { type: string; properties: { kid: { type: string; description: string; }; kms: { type: string; description: string; }; type: { $ref: string; description: string; }; publicKeyHex: { type: string; description: string; }; privateKeyHex: { type: string; description: string; }; meta: { anyOf: { type: string; }\[\]; /\*\* {@inheritDoc daf-core\#IKeyManager.keyManagerGetKeyManagementSystems} \*/ description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerDecryptJWEArgs: { type: string; properties: { kid: { type: string; description: string; }; data: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerDeleteKeyArgs: { type: string; properties: { kid: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerEncryptJWEArgs: { type: string; properties: { kid: { type: string; description: string; }; to: { type: string; properties: { kid: { type: string; description: string; }; type: { $ref: string; description: string; }; publicKeyHex: { type: string; description: string; }; privateKeyHex: { type: string; description: string; }; meta: { anyOf: { type: string; }\[\]; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; data: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerGetKeyArgs: { type: string; properties: { kid: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerSignEthTXArgs: { type: string; properties: { kid: { type: string; description: string; }; transaction: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKeyManagerSignJWTArgs: { type: string; properties: { kid: { type: string; description: string; }; data: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; }; methods: { keyManagerCreateKey: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; keyManagerDecryptJWE: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerDeleteKey: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerEncryptJWE: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerGetKey: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; keyManagerGetKeyManagementSystems: { description: string; arguments: { type: string; }; returnType: { type: string; items: { type: string; }; }; }; keyManagerImportKey: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerSignEthTX: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerSignJWT: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; }; }; } | | ## Methods diff --git a/docs/api/daf-key-manager.keymanager.schema.md b/docs/api/daf-key-manager.keymanager.schema.md index 24ac67fc3..ca31ae547 100644 --- a/docs/api/daf-key-manager.keymanager.schema.md +++ b/docs/api/daf-key-manager.keymanager.schema.md @@ -59,7 +59,9 @@ readonly schema: { description: string; }; meta: { - type: string; + anyOf: { + type: string; + }[]; /** {@inheritDoc daf-core#IKeyManager.keyManagerGetKeyManagementSystems} */ description: string; }; }; @@ -122,7 +124,9 @@ readonly schema: { description: string; }; meta: { - type: string; + anyOf: { + type: string; + }[]; description: string; }; }; diff --git a/docs/api/daf-message-handler.messagehandler.md b/docs/api/daf-message-handler.messagehandler.md index 00d64104b..7244f3d44 100644 --- a/docs/api/daf-message-handler.messagehandler.md +++ b/docs/api/daf-message-handler.messagehandler.md @@ -26,6 +26,7 @@ export declare class MessageHandler extends EventEmitter implements IAgentPlugin | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-message-handler.messagehandler.methods.md) | | [IMessageHandler](./daf-core.imessagehandler.md) | Plugin methods | +| [schema](./daf-message-handler.messagehandler.schema.md) | | { components: { schemas: { IHandleMessageArgs: { type: string; properties: { raw: { type: string; description: string; }; metaData: { type: string; items: { $ref: string; }; description: string; }; save: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMetaData: { type: string; properties: { type: { type: string; description: string; }; value: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMessage: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; createdAt: { type: string; description: string; }; expiresAt: { type: string; description: string; }; threadId: { type: string; description: string; }; raw: { type: string; description: string; }; data: { anyOf: { type: string; }\[\]; description: string; }; replyTo: { type: string; items: { type: string; }; description: string; }; replyUrl: { type: string; description: string; }; from: { type: string; description: string; }; to: { type: string; description: string; }; metaData: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { $ref: string; }; description: string; }; presentations: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiableCredential: { type: string; properties: { "@context": { type: string; items: { type: string; }; }; id: { type: string; }; type: { type: string; items: { type: string; }; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; additionalProperties: boolean; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; VerifiablePresentation: { type: string; properties: { id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; items: { type: string; }; }; type: { type: string; items: { type: string; }; }; verifier: { type: string; items: { type: string; }; }; verifiableCredential: { type: string; items: { $ref: string; }; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; }; methods: { handleMessage: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; }; }; } | | ## Methods diff --git a/docs/api/daf-message-handler.messagehandler.schema.md b/docs/api/daf-message-handler.messagehandler.schema.md new file mode 100644 index 000000000..d63aa379a --- /dev/null +++ b/docs/api/daf-message-handler.messagehandler.schema.md @@ -0,0 +1,261 @@ + + +[Home](./index.md) > [daf-message-handler](./daf-message-handler.md) > [MessageHandler](./daf-message-handler.messagehandler.md) > [schema](./daf-message-handler.messagehandler.schema.md) + +## MessageHandler.schema property + +Signature: + +```typescript +readonly schema: { + components: { + schemas: { + IHandleMessageArgs: { + type: string; + properties: { + raw: { + type: string; + description: string; + }; + metaData: { + type: string; + items: { + $ref: string; + }; + description: string; + }; + save: { + type: string; + description: string; + }; + }; + required: string[]; + additionalProperties: boolean; + description: string; + }; + IMetaData: { + type: string; + properties: { + type: { + type: string; + description: string; + }; + value: { + type: string; + description: string; + }; + }; + required: string[]; + additionalProperties: boolean; + description: string; + }; + IMessage: { + type: string; + properties: { + id: { + type: string; + description: string; + }; + type: { + type: string; + description: string; + }; + createdAt: { + type: string; + description: string; + }; + expiresAt: { + type: string; + description: string; + }; + threadId: { + type: string; + description: string; + }; + raw: { + type: string; + description: string; + }; + data: { + anyOf: { + type: string; + }[]; + description: string; + }; + replyTo: { + type: string; + items: { + type: string; + }; + description: string; + }; + replyUrl: { + type: string; + description: string; + }; + from: { + type: string; + description: string; + }; + to: { + type: string; + description: string; + }; + metaData: { + type: string; + items: { + $ref: string; + }; + description: string; + }; + credentials: { + type: string; + items: { + $ref: string; + }; + description: string; + }; + presentations: { + type: string; + items: { + $ref: string; + }; + description: string; + }; + }; + required: string[]; + additionalProperties: boolean; + description: string; + }; + VerifiableCredential: { + type: string; + properties: { + "@context": { + type: string; + items: { + type: string; + }; + }; + id: { + type: string; + }; + type: { + type: string; + items: { + type: string; + }; + }; + issuer: { + type: string; + properties: { + id: { + type: string; + }; + }; + required: string[]; + }; + issuanceDate: { + type: string; + }; + expirationDate: { + type: string; + }; + credentialSubject: { + type: string; + properties: { + id: { + type: string; + }; + }; + }; + credentialStatus: { + type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; + }; + }; + required: string[]; + description: string; + }; + VerifiablePresentation: { + type: string; + properties: { + id: { + type: string; + }; + holder: { + type: string; + }; + issuanceDate: { + type: string; + }; + expirationDate: { + type: string; + }; + "@context": { + type: string; + items: { + type: string; + }; + }; + type: { + type: string; + items: { + type: string; + }; + }; + verifier: { + type: string; + items: { + type: string; + }; + }; + verifiableCredential: { + type: string; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; + }; + }; + required: string[]; + description: string; + }; + }; + methods: { + handleMessage: { + description: string; + arguments: { + $ref: string; + }; + returnType: { + $ref: string; + }; + }; + }; + }; + }; +``` diff --git a/docs/api/daf-rest.agentrestclient.md b/docs/api/daf-rest.agentrestclient.md index 5d4defe06..0356736eb 100644 --- a/docs/api/daf-rest.agentrestclient.md +++ b/docs/api/daf-rest.agentrestclient.md @@ -22,4 +22,5 @@ export declare class AgentRestClient implements IAgentPlugin | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-rest.agentrestclient.methods.md) | | [IPluginMethodMap](./daf-core.ipluginmethodmap.md) | | +| [schema](./daf-rest.agentrestclient.schema.md) | | [IAgentPluginSchema](./daf-core.iagentpluginschema.md) | | diff --git a/docs/api/daf-rest.agentrestclient.schema.md b/docs/api/daf-rest.agentrestclient.schema.md new file mode 100644 index 000000000..be24ddff9 --- /dev/null +++ b/docs/api/daf-rest.agentrestclient.schema.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [daf-rest](./daf-rest.md) > [AgentRestClient](./daf-rest.agentrestclient.md) > [schema](./daf-rest.agentrestclient.schema.md) + +## AgentRestClient.schema property + +Signature: + +```typescript +readonly schema: IAgentPluginSchema; +``` diff --git a/docs/api/daf-selective-disclosure.selectivedisclosure.md b/docs/api/daf-selective-disclosure.selectivedisclosure.md index 2ca85be42..b0c6378c5 100644 --- a/docs/api/daf-selective-disclosure.selectivedisclosure.md +++ b/docs/api/daf-selective-disclosure.selectivedisclosure.md @@ -29,7 +29,7 @@ export declare class SelectiveDisclosure implements IAgentPlugin | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-selective-disclosure.selectivedisclosure.methods.md) | | [ISelectiveDisclosure](./daf-selective-disclosure.iselectivedisclosure.md) | (BETA) | -| [schema](./daf-selective-disclosure.selectivedisclosure.schema.md) | | { components: { schemas: { ICreateSelectiveDisclosureRequestArgs: { type: string; properties: { data: { $ref: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; ISelectiveDisclosureRequest: { type: string; properties: { issuer: { type: string; description: string; }; subject: { type: string; description: string; }; replyUrl: { type: string; description: string; }; tag: { type: string; }; claims: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { type: string; }; /\*\* \* Creates a Selective disclosure request, encoded as a JWT. \* \* @remarks See {@link https://github.com/uport-project/specs/blob/develop/flows/selectivedisclosure.md \| Selective Disclosure} \* \* @param args - The param object with the properties necessary to create the request. See {@link ISelectiveDisclosureRequest} \* @param context - \*RESERVED\* This is filled by the framework when the method is called. \* \* @beta \*/ description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; ICredentialRequestInput: { type: string; properties: { reason: { type: string; description: string; }; essential: { type: string; description: string; }; credentialType: { type: string; description: string; }; credentialContext: { type: string; description: string; }; claimType: { type: string; description: string; }; claimValue: { type: string; description: string; }; issuers: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; Issuer: { type: string; properties: { did: { type: string; description: string; }; url: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IGetVerifiableCredentialsForSdrArgs: { type: string; properties: { sdr: { type: string; properties: { subject: { type: string; description: string; }; replyUrl: { type: string; description: string; }; tag: { type: string; }; claims: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { type: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; did: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; ICredentialsForSdr: { type: string; properties: { reason: { type: string; description: string; }; essential: { type: string; description: string; }; credentialType: { type: string; description: string; }; credentialContext: { type: string; description: string; }; claimType: { type: string; description: string; }; claimValue: { type: string; description: string; }; issuers: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { $ref: string; }; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiableCredential: { $ref: string; description: string; }; "Verifiable-W3CCredential": { type: string; additionalProperties: boolean; properties: { proof: { $ref: string; }; id: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; }; "@context": { type: string; properties: {}; }; type: { type: string; properties: {}; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; }; required: string\[\]; description: string; }; Proof: { type: string; properties: { type: { type: string; }; }; }; IValidatePresentationAgainstSdrArgs: { type: string; properties: { presentation: { $ref: string; }; sdr: { $ref: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiablePresentation: { $ref: string; description: string; }; "Verifiable-W3CPresentation": { type: string; additionalProperties: boolean; properties: { proof: { $ref: string; }; id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; properties: {}; }; type: { type: string; properties: {}; }; verifier: { type: string; properties: {}; }; verifiableCredential: { type: string; properties: {}; }; }; required: string\[\]; description: string; }; IPresentationValidationResult: { type: string; properties: { valid: { type: string; }; claims: { type: string; items: { $ref: string; }; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; }; methods: { createSelectiveDisclosureRequest: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; getVerifiableCredentialsForSdr: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; validatePresentationAgainstSdr: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; }; }; } | (BETA) | +| [schema](./daf-selective-disclosure.selectivedisclosure.schema.md) | | { components: { schemas: { ICreateSelectiveDisclosureRequestArgs: { type: string; properties: { data: { $ref: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; ISelectiveDisclosureRequest: { type: string; properties: { issuer: { type: string; description: string; }; subject: { type: string; description: string; }; replyUrl: { type: string; description: string; }; tag: { type: string; }; claims: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { type: string; }; /\*\* \* Creates a Selective disclosure request, encoded as a JWT. \* \* @remarks See {@link https://github.com/uport-project/specs/blob/develop/flows/selectivedisclosure.md \| Selective Disclosure} \* \* @param args - The param object with the properties necessary to create the request. See {@link ISelectiveDisclosureRequest} \* @param context - \*RESERVED\* This is filled by the framework when the method is called. \* \* @beta \*/ description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; ICredentialRequestInput: { type: string; properties: { reason: { type: string; description: string; }; essential: { type: string; description: string; }; credentialType: { type: string; description: string; }; credentialContext: { type: string; description: string; }; claimType: { type: string; description: string; }; claimValue: { type: string; description: string; }; issuers: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; Issuer: { type: string; properties: { did: { type: string; description: string; }; url: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IGetVerifiableCredentialsForSdrArgs: { type: string; properties: { sdr: { type: string; properties: { subject: { type: string; description: string; }; replyUrl: { type: string; description: string; }; tag: { type: string; }; claims: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { type: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; did: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; ICredentialsForSdr: { type: string; properties: { reason: { type: string; description: string; }; essential: { type: string; description: string; }; credentialType: { type: string; description: string; }; credentialContext: { type: string; description: string; }; claimType: { type: string; description: string; }; claimValue: { type: string; description: string; }; issuers: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { $ref: string; }; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiableCredential: { type: string; properties: { "@context": { type: string; items: { type: string; }; }; id: { type: string; }; type: { type: string; items: { type: string; }; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; additionalProperties: boolean; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; IValidatePresentationAgainstSdrArgs: { type: string; properties: { presentation: { $ref: string; }; sdr: { $ref: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiablePresentation: { type: string; properties: { id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; items: { type: string; }; }; type: { type: string; items: { type: string; }; }; verifier: { type: string; items: { type: string; }; }; verifiableCredential: { type: string; items: { $ref: string; }; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; IPresentationValidationResult: { type: string; properties: { valid: { type: string; }; claims: { type: string; items: { $ref: string; }; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; }; methods: { createSelectiveDisclosureRequest: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; getVerifiableCredentialsForSdr: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; validatePresentationAgainstSdr: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; }; }; } | (BETA) | ## Methods diff --git a/docs/api/daf-selective-disclosure.selectivedisclosure.schema.md b/docs/api/daf-selective-disclosure.selectivedisclosure.schema.md index 55c17a24d..d449ae1dd 100644 --- a/docs/api/daf-selective-disclosure.selectivedisclosure.schema.md +++ b/docs/api/daf-selective-disclosure.selectivedisclosure.schema.md @@ -216,74 +216,71 @@ readonly schema: { description: string; }; VerifiableCredential: { - $ref: string; - description: string; - }; - "Verifiable-W3CCredential": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; + "@context": { + type: string; + items: { + type: string; + }; }; id: { type: string; }; - credentialSubject: { + type: { type: string; - properties: { - id: { - type: string; - }; + items: { + type: string; }; }; - credentialStatus: { + issuer: { type: string; properties: { id: { type: string; }; - type: { - type: string; - }; }; required: string[]; }; - "@context": { + issuanceDate: { type: string; - properties: {}; }; - type: { + expirationDate: { type: string; - properties: {}; }; - issuer: { + credentialSubject: { type: string; properties: { id: { type: string; }; }; - required: string[]; }; - issuanceDate: { + credentialStatus: { type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; }; - expirationDate: { + proof: { type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; description: string; }; - Proof: { - type: string; - properties: { - type: { - type: string; - }; - }; - }; IValidatePresentationAgainstSdrArgs: { type: string; properties: { @@ -299,16 +296,8 @@ readonly schema: { description: string; }; VerifiablePresentation: { - $ref: string; - description: string; - }; - "Verifiable-W3CPresentation": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; - }; id: { type: string; }; @@ -323,19 +312,35 @@ readonly schema: { }; "@context": { type: string; - properties: {}; + items: { + type: string; + }; }; type: { type: string; - properties: {}; + items: { + type: string; + }; }; verifier: { type: string; - properties: {}; + items: { + type: string; + }; }; verifiableCredential: { type: string; - properties: {}; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; diff --git a/docs/api/daf-typeorm.datastore.md b/docs/api/daf-typeorm.datastore.md index 4e90cfd8f..c9f326acd 100644 --- a/docs/api/daf-typeorm.datastore.md +++ b/docs/api/daf-typeorm.datastore.md @@ -22,7 +22,7 @@ export declare class DataStore implements IAgentPlugin | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-typeorm.datastore.methods.md) | | [IDataStore](./daf-core.idatastore.md) | | -| [schema](./daf-typeorm.datastore.schema.md) | | { components: { schemas: { IDataStoreGetMessageArgs: { type: string; properties: { id: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMessage: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; createdAt: { type: string; description: string; }; expiresAt: { type: string; description: string; }; threadId: { type: string; description: string; }; raw: { type: string; description: string; }; data: { anyOf: { type: string; }\[\]; description: string; }; replyTo: { type: string; items: { type: string; }; description: string; }; replyUrl: { type: string; description: string; }; from: { type: string; description: string; }; to: { type: string; description: string; }; metaData: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { $ref: string; }; description: string; }; presentations: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMetaData: { type: string; properties: { type: { type: string; description: string; }; value: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiableCredential: { $ref: string; description: string; }; "Verifiable-W3CCredential": { type: string; additionalProperties: boolean; properties: { proof: { $ref: string; }; id: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; }; "@context": { type: string; properties: {}; }; type: { type: string; properties: {}; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; }; required: string\[\]; description: string; }; Proof: { type: string; properties: { type: { type: string; }; }; }; VerifiablePresentation: { $ref: string; description: string; }; "Verifiable-W3CPresentation": { type: string; additionalProperties: boolean; properties: { proof: { $ref: string; }; id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; properties: {}; }; type: { type: string; properties: {}; }; verifier: { type: string; properties: {}; }; verifiableCredential: { type: string; properties: {}; }; }; required: string\[\]; description: string; }; IDataStoreGetVerifiableCredentialArgs: { type: string; properties: { hash: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IDataStoreGetVerifiablePresentationArgs: { type: string; properties: { hash: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IDataStoreSaveMessageArgs: { type: string; properties: { message: { $ref: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IDataStoreSaveVerifiableCredentialArgs: { type: string; properties: { verifiableCredential: { $ref: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IDataStoreSaveVerifiablePresentationArgs: { type: string; properties: { verifiablePresentation: { $ref: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; }; methods: { dataStoreGetMessage: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; dataStoreGetVerifiableCredential: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; dataStoreGetVerifiablePresentation: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; dataStoreSaveMessage: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreSaveVerifiableCredential: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreSaveVerifiablePresentation: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; }; }; } | | +| [schema](./daf-typeorm.datastore.schema.md) | | { components: { schemas: { IDataStoreGetMessageArgs: { type: string; properties: { id: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMessage: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; createdAt: { type: string; description: string; }; expiresAt: { type: string; description: string; }; threadId: { type: string; description: string; }; raw: { type: string; description: string; }; data: { anyOf: { type: string; }\[\]; description: string; }; replyTo: { type: string; items: { type: string; }; description: string; }; replyUrl: { type: string; description: string; }; from: { type: string; description: string; }; to: { type: string; description: string; }; metaData: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { $ref: string; }; description: string; }; presentations: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMetaData: { type: string; properties: { type: { type: string; description: string; }; value: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiableCredential: { type: string; properties: { "@context": { type: string; items: { type: string; }; }; id: { type: string; }; type: { type: string; items: { type: string; }; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; additionalProperties: boolean; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; VerifiablePresentation: { type: string; properties: { id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; items: { type: string; }; }; type: { type: string; items: { type: string; }; }; verifier: { type: string; items: { type: string; }; }; verifiableCredential: { type: string; items: { $ref: string; }; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; IDataStoreGetVerifiableCredentialArgs: { type: string; properties: { hash: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IDataStoreGetVerifiablePresentationArgs: { type: string; properties: { hash: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IDataStoreSaveMessageArgs: { type: string; properties: { message: { $ref: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IDataStoreSaveVerifiableCredentialArgs: { type: string; properties: { verifiableCredential: { $ref: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IDataStoreSaveVerifiablePresentationArgs: { type: string; properties: { verifiablePresentation: { $ref: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; }; methods: { dataStoreGetMessage: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; dataStoreGetVerifiableCredential: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; dataStoreGetVerifiablePresentation: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; dataStoreSaveMessage: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreSaveVerifiableCredential: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreSaveVerifiablePresentation: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; }; }; } | | ## Methods diff --git a/docs/api/daf-typeorm.datastore.schema.md b/docs/api/daf-typeorm.datastore.schema.md index d17615874..ea5ea4ea6 100644 --- a/docs/api/daf-typeorm.datastore.schema.md +++ b/docs/api/daf-typeorm.datastore.schema.md @@ -117,85 +117,74 @@ readonly schema: { description: string; }; VerifiableCredential: { - $ref: string; - description: string; - }; - "Verifiable-W3CCredential": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; + "@context": { + type: string; + items: { + type: string; + }; }; id: { type: string; }; - credentialSubject: { + type: { type: string; - properties: { - id: { - type: string; - }; + items: { + type: string; }; }; - credentialStatus: { + issuer: { type: string; properties: { id: { type: string; }; - type: { - type: string; - }; }; required: string[]; }; - "@context": { + issuanceDate: { type: string; - properties: {}; }; - type: { + expirationDate: { type: string; - properties: {}; }; - issuer: { + credentialSubject: { type: string; properties: { id: { type: string; }; }; - required: string[]; }; - issuanceDate: { + credentialStatus: { type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; }; - expirationDate: { + proof: { type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; description: string; }; - Proof: { - type: string; - properties: { - type: { - type: string; - }; - }; - }; VerifiablePresentation: { - $ref: string; - description: string; - }; - "Verifiable-W3CPresentation": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; - }; id: { type: string; }; @@ -210,19 +199,35 @@ readonly schema: { }; "@context": { type: string; - properties: {}; + items: { + type: string; + }; }; type: { type: string; - properties: {}; + items: { + type: string; + }; }; verifier: { type: string; - properties: {}; + items: { + type: string; + }; }; verifiableCredential: { type: string; - properties: {}; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; diff --git a/docs/api/daf-typeorm.datastoreorm.md b/docs/api/daf-typeorm.datastoreorm.md index fb0420436..8c0eeda86 100644 --- a/docs/api/daf-typeorm.datastoreorm.md +++ b/docs/api/daf-typeorm.datastoreorm.md @@ -22,7 +22,7 @@ export declare class DataStoreORM implements IAgentPlugin | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-typeorm.datastoreorm.methods.md) | | [IDataStoreORM](./daf-typeorm.idatastoreorm.md) | | -| [schema](./daf-typeorm.datastoreorm.schema.md) | | { components: { schemas: { FindIdentitiesArgs: { $ref: string; }; "FindArgs-TIdentitiesColumns": { type: string; properties: { where: { type: string; items: { $ref: string; }; }; order: { type: string; items: { $ref: string; }; }; take: { type: string; }; skip: { type: string; }; }; additionalProperties: boolean; }; "Where-TIdentitiesColumns": { type: string; properties: { column: { $ref: string; }; value: { type: string; items: { type: string; }; }; not: { type: string; }; op: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; TIdentitiesColumns: { type: string; enum: string\[\]; }; "Order-TIdentitiesColumns": { type: string; properties: { column: { $ref: string; }; direction: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; IIdentity: { type: string; properties: { did: { type: string; description: string; }; alias: { type: string; description: string; }; provider: { type: string; description: string; }; controllerKeyId: { type: string; description: string; }; keys: { type: string; items: { $ref: string; }; description: string; }; services: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKey: { type: string; properties: { kid: { type: string; description: string; }; kms: { type: string; description: string; }; type: { $ref: string; description: string; }; publicKeyHex: { type: string; description: string; }; privateKeyHex: { type: string; description: string; }; meta: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; TKeyType: { type: string; enum: string\[\]; description: string; }; IService: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; serviceEndpoint: { type: string; description: string; }; description: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; FindMessagesArgs: { $ref: string; }; "FindArgs-TMessageColumns": { type: string; properties: { where: { type: string; items: { $ref: string; }; }; order: { type: string; items: { $ref: string; }; }; take: { type: string; }; skip: { type: string; }; }; additionalProperties: boolean; }; "Where-TMessageColumns": { type: string; properties: { column: { $ref: string; }; value: { type: string; items: { type: string; }; }; not: { type: string; }; op: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; TMessageColumns: { type: string; enum: string\[\]; }; "Order-TMessageColumns": { type: string; properties: { column: { $ref: string; }; direction: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; IMessage: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; createdAt: { type: string; description: string; }; expiresAt: { type: string; description: string; }; threadId: { type: string; description: string; }; raw: { type: string; description: string; }; data: { anyOf: { type: string; }\[\]; description: string; }; replyTo: { type: string; items: { type: string; }; description: string; }; replyUrl: { type: string; description: string; }; from: { type: string; description: string; }; to: { type: string; description: string; }; metaData: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { $ref: string; }; description: string; }; presentations: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMetaData: { type: string; properties: { type: { type: string; description: string; }; value: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiableCredential: { $ref: string; description: string; }; "Verifiable-W3CCredential": { type: string; additionalProperties: boolean; properties: { proof: { $ref: string; }; id: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; }; "@context": { type: string; properties: {}; }; type: { type: string; properties: {}; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; }; required: string\[\]; description: string; }; Proof: { type: string; properties: { type: { type: string; }; }; }; VerifiablePresentation: { $ref: string; description: string; }; "Verifiable-W3CPresentation": { type: string; additionalProperties: boolean; properties: { proof: { $ref: string; }; id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; properties: {}; }; type: { type: string; properties: {}; }; verifier: { type: string; properties: {}; }; verifiableCredential: { type: string; properties: {}; }; }; required: string\[\]; description: string; }; FindCredentialsArgs: { $ref: string; }; "FindArgs-TCredentialColumns": { type: string; properties: { where: { type: string; items: { $ref: string; }; }; order: { type: string; items: { $ref: string; }; }; take: { type: string; }; skip: { type: string; }; }; additionalProperties: boolean; }; "Where-TCredentialColumns": { type: string; properties: { column: { $ref: string; }; value: { type: string; items: { type: string; }; }; not: { type: string; }; op: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; TCredentialColumns: { type: string; enum: string\[\]; }; "Order-TCredentialColumns": { type: string; properties: { column: { $ref: string; }; direction: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; UniqueVerifiableCredential: { type: string; properties: { hash: { type: string; }; verifiableCredential: { $ref: string; }; }; required: string\[\]; additionalProperties: boolean; }; FindClaimsArgs: { $ref: string; }; "FindArgs-TClaimsColumns": { type: string; properties: { where: { type: string; items: { $ref: string; }; }; order: { type: string; items: { $ref: string; }; }; take: { type: string; }; skip: { type: string; }; }; additionalProperties: boolean; }; "Where-TClaimsColumns": { type: string; properties: { column: { $ref: string; }; value: { type: string; items: { type: string; }; }; not: { type: string; }; op: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; TClaimsColumns: { type: string; enum: string\[\]; }; "Order-TClaimsColumns": { type: string; properties: { column: { $ref: string; }; direction: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; FindPresentationsArgs: { $ref: string; }; "FindArgs-TPresentationColumns": { type: string; properties: { where: { type: string; items: { $ref: string; }; }; order: { type: string; items: { $ref: string; }; }; take: { type: string; }; skip: { type: string; }; }; additionalProperties: boolean; }; "Where-TPresentationColumns": { type: string; properties: { column: { $ref: string; }; value: { type: string; items: { type: string; }; }; not: { type: string; }; op: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; TPresentationColumns: { type: string; enum: string\[\]; }; "Order-TPresentationColumns": { type: string; properties: { column: { $ref: string; }; direction: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; UniqueVerifiablePresentation: { type: string; properties: { hash: { type: string; }; verifiablePresentation: { $ref: string; }; }; required: string\[\]; additionalProperties: boolean; }; }; methods: { dataStoreORMGetIdentities: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; dataStoreORMGetIdentitiesCount: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreORMGetMessages: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; dataStoreORMGetMessagesCount: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreORMGetVerifiableCredentials: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; dataStoreORMGetVerifiableCredentialsByClaims: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; dataStoreORMGetVerifiableCredentialsByClaimsCount: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreORMGetVerifiableCredentialsCount: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreORMGetVerifiablePresentations: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; dataStoreORMGetVerifiablePresentationsCount: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; }; }; } | | +| [schema](./daf-typeorm.datastoreorm.schema.md) | | { components: { schemas: { FindIdentitiesArgs: { $ref: string; }; "FindArgs-TIdentitiesColumns": { type: string; properties: { where: { type: string; items: { $ref: string; }; }; order: { type: string; items: { $ref: string; }; }; take: { type: string; }; skip: { type: string; }; }; additionalProperties: boolean; }; "Where-TIdentitiesColumns": { type: string; properties: { column: { $ref: string; }; value: { type: string; items: { type: string; }; }; not: { type: string; }; op: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; TIdentitiesColumns: { type: string; enum: string\[\]; }; "Order-TIdentitiesColumns": { type: string; properties: { column: { $ref: string; }; direction: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; IIdentity: { type: string; properties: { did: { type: string; description: string; }; alias: { type: string; description: string; }; provider: { type: string; description: string; }; controllerKeyId: { type: string; description: string; }; keys: { type: string; items: { $ref: string; }; description: string; }; services: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IKey: { type: string; properties: { kid: { type: string; description: string; }; kms: { type: string; description: string; }; type: { $ref: string; description: string; }; publicKeyHex: { type: string; description: string; }; privateKeyHex: { type: string; description: string; }; meta: { anyOf: { type: string; }\[\]; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; TKeyType: { type: string; enum: string\[\]; description: string; }; IService: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; serviceEndpoint: { type: string; description: string; }; description: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; FindMessagesArgs: { $ref: string; }; "FindArgs-TMessageColumns": { type: string; properties: { where: { type: string; items: { $ref: string; }; }; order: { type: string; items: { $ref: string; }; }; take: { type: string; }; skip: { type: string; }; }; additionalProperties: boolean; }; "Where-TMessageColumns": { type: string; properties: { column: { $ref: string; }; value: { type: string; items: { type: string; }; }; not: { type: string; }; op: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; TMessageColumns: { type: string; enum: string\[\]; }; "Order-TMessageColumns": { type: string; properties: { column: { $ref: string; }; direction: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; IMessage: { type: string; properties: { id: { type: string; description: string; }; type: { type: string; description: string; }; createdAt: { type: string; description: string; }; expiresAt: { type: string; description: string; }; threadId: { type: string; description: string; }; raw: { type: string; description: string; }; data: { anyOf: { type: string; }\[\]; description: string; }; replyTo: { type: string; items: { type: string; }; description: string; }; replyUrl: { type: string; description: string; }; from: { type: string; description: string; }; to: { type: string; description: string; }; metaData: { type: string; items: { $ref: string; }; description: string; }; credentials: { type: string; items: { $ref: string; }; description: string; }; presentations: { type: string; items: { $ref: string; }; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; IMetaData: { type: string; properties: { type: { type: string; description: string; }; value: { type: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; VerifiableCredential: { type: string; properties: { "@context": { type: string; items: { type: string; }; }; id: { type: string; }; type: { type: string; items: { type: string; }; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; additionalProperties: boolean; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; VerifiablePresentation: { type: string; properties: { id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; items: { type: string; }; }; type: { type: string; items: { type: string; }; }; verifier: { type: string; items: { type: string; }; }; verifiableCredential: { type: string; items: { $ref: string; }; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; FindCredentialsArgs: { $ref: string; }; "FindArgs-TCredentialColumns": { type: string; properties: { where: { type: string; items: { $ref: string; }; }; order: { type: string; items: { $ref: string; }; }; take: { type: string; }; skip: { type: string; }; }; additionalProperties: boolean; }; "Where-TCredentialColumns": { type: string; properties: { column: { $ref: string; }; value: { type: string; items: { type: string; }; }; not: { type: string; }; op: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; TCredentialColumns: { type: string; enum: string\[\]; }; "Order-TCredentialColumns": { type: string; properties: { column: { $ref: string; }; direction: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; UniqueVerifiableCredential: { type: string; properties: { hash: { type: string; }; verifiableCredential: { $ref: string; }; }; required: string\[\]; additionalProperties: boolean; }; FindClaimsArgs: { $ref: string; }; "FindArgs-TClaimsColumns": { type: string; properties: { where: { type: string; items: { $ref: string; }; }; order: { type: string; items: { $ref: string; }; }; take: { type: string; }; skip: { type: string; }; }; additionalProperties: boolean; }; "Where-TClaimsColumns": { type: string; properties: { column: { $ref: string; }; value: { type: string; items: { type: string; }; }; not: { type: string; }; op: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; TClaimsColumns: { type: string; enum: string\[\]; }; "Order-TClaimsColumns": { type: string; properties: { column: { $ref: string; }; direction: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; FindPresentationsArgs: { $ref: string; }; "FindArgs-TPresentationColumns": { type: string; properties: { where: { type: string; items: { $ref: string; }; }; order: { type: string; items: { $ref: string; }; }; take: { type: string; }; skip: { type: string; }; }; additionalProperties: boolean; }; "Where-TPresentationColumns": { type: string; properties: { column: { $ref: string; }; value: { type: string; items: { type: string; }; }; not: { type: string; }; op: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; TPresentationColumns: { type: string; enum: string\[\]; }; "Order-TPresentationColumns": { type: string; properties: { column: { $ref: string; }; direction: { type: string; enum: string\[\]; }; }; required: string\[\]; additionalProperties: boolean; }; UniqueVerifiablePresentation: { type: string; properties: { hash: { type: string; }; verifiablePresentation: { $ref: string; }; }; required: string\[\]; additionalProperties: boolean; }; }; methods: { dataStoreORMGetIdentities: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; dataStoreORMGetIdentitiesCount: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreORMGetMessages: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; dataStoreORMGetMessagesCount: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreORMGetVerifiableCredentials: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; dataStoreORMGetVerifiableCredentialsByClaims: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; dataStoreORMGetVerifiableCredentialsByClaimsCount: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreORMGetVerifiableCredentialsCount: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; dataStoreORMGetVerifiablePresentations: { description: string; arguments: { $ref: string; }; returnType: { type: string; items: { $ref: string; }; }; }; dataStoreORMGetVerifiablePresentationsCount: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; }; }; } | | ## Methods diff --git a/docs/api/daf-typeorm.datastoreorm.schema.md b/docs/api/daf-typeorm.datastoreorm.schema.md index a7c80308e..c0da4bc4e 100644 --- a/docs/api/daf-typeorm.datastoreorm.schema.md +++ b/docs/api/daf-typeorm.datastoreorm.schema.md @@ -140,7 +140,9 @@ readonly schema: { description: string; }; meta: { - type: string; + anyOf: { + type: string; + }[]; description: string; }; }; @@ -340,85 +342,74 @@ readonly schema: { description: string; }; VerifiableCredential: { - $ref: string; - description: string; - }; - "Verifiable-W3CCredential": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; + "@context": { + type: string; + items: { + type: string; + }; }; id: { type: string; }; - credentialSubject: { + type: { type: string; - properties: { - id: { - type: string; - }; + items: { + type: string; }; }; - credentialStatus: { + issuer: { type: string; properties: { id: { type: string; }; - type: { - type: string; - }; }; required: string[]; }; - "@context": { + issuanceDate: { type: string; - properties: {}; }; - type: { + expirationDate: { type: string; - properties: {}; }; - issuer: { + credentialSubject: { type: string; properties: { id: { type: string; }; }; - required: string[]; }; - issuanceDate: { + credentialStatus: { type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; }; - expirationDate: { + proof: { type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; description: string; }; - Proof: { - type: string; - properties: { - type: { - type: string; - }; - }; - }; VerifiablePresentation: { - $ref: string; - description: string; - }; - "Verifiable-W3CPresentation": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; - }; id: { type: string; }; @@ -433,19 +424,35 @@ readonly schema: { }; "@context": { type: string; - properties: {}; + items: { + type: string; + }; }; type: { type: string; - properties: {}; + items: { + type: string; + }; }; verifier: { type: string; - properties: {}; + items: { + type: string; + }; }; verifiableCredential: { type: string; - properties: {}; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; diff --git a/docs/api/daf-typeorm.entities.md b/docs/api/daf-typeorm.entities.md index 6b87e3c9a..99873d3de 100644 --- a/docs/api/daf-typeorm.entities.md +++ b/docs/api/daf-typeorm.entities.md @@ -7,5 +7,5 @@ Signature: ```typescript -Entities: (typeof Identity | typeof Message | typeof Claim | typeof Credential | typeof Presentation | typeof Key | typeof Service)[] +Entities: (typeof Credential | typeof Identity | typeof Claim | typeof Presentation | typeof Message | typeof Key | typeof Service)[] ``` diff --git a/docs/api/daf-typeorm.key.md b/docs/api/daf-typeorm.key.md index 1ee191925..39e257a0a 100644 --- a/docs/api/daf-typeorm.key.md +++ b/docs/api/daf-typeorm.key.md @@ -18,7 +18,7 @@ export declare class Key extends BaseEntity | [identity](./daf-typeorm.key.identity.md) | | [Identity](./daf-typeorm.identity.md) | | | [kid](./daf-typeorm.key.kid.md) | | string | | | [kms](./daf-typeorm.key.kms.md) | | string | | -| [meta](./daf-typeorm.key.meta.md) | | Record<string, any> | | +| [meta](./daf-typeorm.key.meta.md) | | object \| null | | | [privateKeyHex](./daf-typeorm.key.privatekeyhex.md) | | string | | | [publicKeyHex](./daf-typeorm.key.publickeyhex.md) | | string | | | [type](./daf-typeorm.key.type.md) | | KeyType | | diff --git a/docs/api/daf-typeorm.key.meta.md b/docs/api/daf-typeorm.key.meta.md index d6ef39548..349a07168 100644 --- a/docs/api/daf-typeorm.key.meta.md +++ b/docs/api/daf-typeorm.key.meta.md @@ -7,5 +7,5 @@ Signature: ```typescript -meta?: Record; +meta?: object | null; ``` diff --git a/docs/api/daf-w3c.credentialissuer.md b/docs/api/daf-w3c.credentialissuer.md index 01f9b0d98..136f1b3a8 100644 --- a/docs/api/daf-w3c.credentialissuer.md +++ b/docs/api/daf-w3c.credentialissuer.md @@ -24,7 +24,7 @@ export declare class CredentialIssuer implements IAgentPlugin | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [methods](./daf-w3c.credentialissuer.methods.md) | | [ICredentialIssuer](./daf-w3c.icredentialissuer.md) | | -| [schema](./daf-w3c.credentialissuer.schema.md) | | { components: { schemas: { ICreateVerifiableCredentialArgs: { type: string; properties: { credential: { $ref: string; description: string; }; save: { type: string; description: string; }; proofFormat: { $ref: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; W3CCredential: { type: string; properties: { "@context": { type: string; items: { type: string; }; }; type: { type: string; items: { type: string; }; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; id: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { $ref: string; }; }; required: string\[\]; description: string; }; CredentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; additionalProperties: boolean; }; EncodingFormat: { type: string; const: string; description: string; }; VerifiableCredential: { $ref: string; description: string; }; "Verifiable-W3CCredential": { type: string; additionalProperties: boolean; properties: { proof: { $ref: string; }; id: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; }; "@context": { type: string; properties: {}; }; type: { type: string; properties: {}; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; }; required: string\[\]; description: string; }; Proof: { type: string; properties: { type: { type: string; }; }; }; ICreateVerifiablePresentationArgs: { type: string; properties: { presentation: { $ref: string; description: string; }; save: { type: string; description: string; }; proofFormat: { $ref: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; W3CPresentation: { type: string; properties: { "@context": { type: string; items: { type: string; }; }; type: { type: string; items: { type: string; }; }; verifier: { type: string; items: { type: string; }; }; verifiableCredential: { type: string; items: { $ref: string; }; }; id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; }; required: string\[\]; description: string; }; VerifiablePresentation: { $ref: string; description: string; }; "Verifiable-W3CPresentation": { type: string; additionalProperties: boolean; properties: { proof: { $ref: string; }; id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; properties: {}; }; type: { type: string; properties: {}; }; verifier: { type: string; properties: {}; }; verifiableCredential: { type: string; properties: {}; }; }; required: string\[\]; description: string; }; }; methods: { createVerifiableCredential: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; createVerifiablePresentation: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; }; }; } | | +| [schema](./daf-w3c.credentialissuer.schema.md) | | { components: { schemas: { ICreateVerifiableCredentialArgs: { type: string; properties: { credential: { $ref: string; description: string; }; save: { type: string; description: string; }; proofFormat: { $ref: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; W3CCredential: { type: string; properties: { "@context": { type: string; items: { type: string; }; }; id: { type: string; }; type: { type: string; items: { type: string; }; }; issuer: { type: string; properties: { id: { type: string; /\*\* \* The json payload of the Credential according to the \* {@link https://www.w3.org/TR/vc-data-model/\#credentials \| canonical model} \* \* The signer of the Credential is chosen based on the \`issuer.id\` property \* of the \`credential\` \*/ }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; additionalProperties: boolean; }; }; required: string\[\]; description: string; }; EncodingFormat: { type: string; const: string; description: string; }; VerifiableCredential: { type: string; properties: { "@context": { type: string; items: { type: string; }; }; id: { type: string; }; type: { type: string; items: { type: string; }; }; issuer: { type: string; properties: { id: { type: string; }; }; required: string\[\]; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; credentialSubject: { type: string; properties: { id: { type: string; }; }; }; credentialStatus: { type: string; properties: { id: { type: string; }; type: { type: string; }; }; required: string\[\]; additionalProperties: boolean; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; ICreateVerifiablePresentationArgs: { type: string; properties: { presentation: { $ref: string; description: string; }; save: { type: string; description: string; }; proofFormat: { $ref: string; description: string; }; }; required: string\[\]; additionalProperties: boolean; description: string; }; W3CPresentation: { type: string; properties: { id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; items: { type: string; }; }; type: { type: string; items: { type: string; }; }; verifier: { type: string; items: { type: string; }; }; verifiableCredential: { type: string; items: { $ref: string; }; }; }; required: string\[\]; description: string; }; VerifiablePresentation: { type: string; properties: { id: { type: string; }; holder: { type: string; }; issuanceDate: { type: string; }; expirationDate: { type: string; }; "@context": { type: string; items: { type: string; }; }; type: { type: string; items: { type: string; }; }; verifier: { type: string; items: { type: string; }; }; verifiableCredential: { type: string; items: { $ref: string; }; }; proof: { type: string; properties: { type: { type: string; }; }; }; }; required: string\[\]; description: string; }; }; methods: { createVerifiableCredential: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; createVerifiablePresentation: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; }; }; } | | ## Methods diff --git a/docs/api/daf-w3c.credentialissuer.schema.md b/docs/api/daf-w3c.credentialissuer.schema.md index a9a1b2d6a..9c85d931f 100644 --- a/docs/api/daf-w3c.credentialissuer.schema.md +++ b/docs/api/daf-w3c.credentialissuer.schema.md @@ -39,6 +39,9 @@ readonly schema: { type: string; }; }; + id: { + type: string; + }; type: { type: string; items: { @@ -49,7 +52,13 @@ readonly schema: { type: string; properties: { id: { - type: string; + type: string; /** + * The json payload of the Credential according to the + * {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model} + * + * The signer of the Credential is chosen based on the `issuer.id` property + * of the `credential` + */ }; }; required: string[]; @@ -60,9 +69,6 @@ readonly schema: { expirationDate: { type: string; }; - id: { - type: string; - }; credentialSubject: { type: string; properties: { @@ -72,24 +78,21 @@ readonly schema: { }; }; credentialStatus: { - $ref: string; - }; - }; - required: string[]; - description: string; - }; - CredentialStatus: { - type: string; - properties: { - id: { - type: string; - }; - type: { type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; }; }; required: string[]; - additionalProperties: boolean; + description: string; }; EncodingFormat: { type: string; @@ -97,74 +100,71 @@ readonly schema: { description: string; }; VerifiableCredential: { - $ref: string; - description: string; - }; - "Verifiable-W3CCredential": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; + "@context": { + type: string; + items: { + type: string; + }; }; id: { type: string; }; - credentialSubject: { + type: { type: string; - properties: { - id: { - type: string; - }; + items: { + type: string; }; }; - credentialStatus: { + issuer: { type: string; properties: { id: { type: string; }; - type: { - type: string; - }; }; required: string[]; }; - "@context": { + issuanceDate: { type: string; - properties: {}; }; - type: { + expirationDate: { type: string; - properties: {}; }; - issuer: { + credentialSubject: { type: string; properties: { id: { type: string; }; }; - required: string[]; }; - issuanceDate: { + credentialStatus: { type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; }; - expirationDate: { + proof: { type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; description: string; }; - Proof: { - type: string; - properties: { - type: { - type: string; - }; - }; - }; ICreateVerifiablePresentationArgs: { type: string; properties: { @@ -188,6 +188,18 @@ readonly schema: { W3CPresentation: { type: string; properties: { + id: { + type: string; + }; + holder: { + type: string; + }; + issuanceDate: { + type: string; + }; + expirationDate: { + type: string; + }; "@context": { type: string; items: { @@ -212,33 +224,13 @@ readonly schema: { $ref: string; }; }; - id: { - type: string; - }; - holder: { - type: string; - }; - issuanceDate: { - type: string; - }; - expirationDate: { - type: string; - }; }; required: string[]; description: string; }; VerifiablePresentation: { - $ref: string; - description: string; - }; - "Verifiable-W3CPresentation": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; - }; id: { type: string; }; @@ -253,19 +245,35 @@ readonly schema: { }; "@context": { type: string; - properties: {}; + items: { + type: string; + }; }; type: { type: string; - properties: {}; + items: { + type: string; + }; }; verifier: { type: string; - properties: {}; + items: { + type: string; + }; }; verifiableCredential: { type: string; - properties: {}; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; diff --git a/docs/api/daf-w3c.icreateverifiablecredentialargs.md b/docs/api/daf-w3c.icreateverifiablecredentialargs.md index e30983c6a..d8d5198d7 100644 --- a/docs/api/daf-w3c.icreateverifiablecredentialargs.md +++ b/docs/api/daf-w3c.icreateverifiablecredentialargs.md @@ -16,7 +16,7 @@ export interface ICreateVerifiableCredentialArgs | Property | Type | Description | | --- | --- | --- | -| [credential](./daf-w3c.icreateverifiablecredentialargs.credential.md) | W3CCredential | The json payload of the Credential according to the [canonical model](https://www.w3.org/TR/vc-data-model/#credentials)The signer of the Credential is chosen based on the issuer.id property of the credential | +| [credential](./daf-w3c.icreateverifiablecredentialargs.credential.md) | [W3CCredential](./daf-core.w3ccredential.md) | The json payload of the Credential according to the [canonical model](https://www.w3.org/TR/vc-data-model/#credentials)The signer of the Credential is chosen based on the issuer.id property of the credential | | [proofFormat](./daf-w3c.icreateverifiablecredentialargs.proofformat.md) | EncodingFormat | The desired format for the VerifiablePresentation to be created. Currently, only JWT is supported | | [save](./daf-w3c.icreateverifiablecredentialargs.save.md) | boolean | If this parameter is true, the resulting VerifiablePresentation is sent to the [storage plugin](./daf-core.idatastore.md) to be saved | diff --git a/docs/api/daf-w3c.icreateverifiablepresentationargs.md b/docs/api/daf-w3c.icreateverifiablepresentationargs.md index 8040e3d9d..04a255670 100644 --- a/docs/api/daf-w3c.icreateverifiablepresentationargs.md +++ b/docs/api/daf-w3c.icreateverifiablepresentationargs.md @@ -16,7 +16,7 @@ export interface ICreateVerifiablePresentationArgs | Property | Type | Description | | --- | --- | --- | -| [presentation](./daf-w3c.icreateverifiablepresentationargs.presentation.md) | W3CPresentation | The json payload of the Presentation according to the [canonical model](https://www.w3.org/TR/vc-data-model/#presentations).The signer of the Presentation is chosen based on the holder property of the presentation | +| [presentation](./daf-w3c.icreateverifiablepresentationargs.presentation.md) | [W3CPresentation](./daf-core.w3cpresentation.md) | The json payload of the Presentation according to the [canonical model](https://www.w3.org/TR/vc-data-model/#presentations).The signer of the Presentation is chosen based on the holder property of the presentation | | [proofFormat](./daf-w3c.icreateverifiablepresentationargs.proofformat.md) | EncodingFormat | The desired format for the VerifiablePresentation to be created. Currently, only JWT is supported | | [save](./daf-w3c.icreateverifiablepresentationargs.save.md) | boolean | If this parameter is true, the resulting VerifiablePresentation is sent to the [storage plugin](./daf-core.idatastore.md) to be saved | diff --git a/package.json b/package.json index 57a002e5c..89db5431b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "daf", "private": true, "scripts": { - "build": "yarn extract-api && yarn generate-schema && yarn lerna run build && yarn docs:api && yarn docs:reference && yarn docs:clean-temp && yarn prettier:examples", + "build": "yarn lerna run build && yarn extract-api && yarn generate-schema && yarn lerna run build && yarn docs:api && yarn docs:reference && yarn docs:clean-temp && yarn prettier:examples", "publish": "lerna publish", "bootstrap": "lerna bootstrap", "extract-api": "lerna run extract-api", diff --git a/packages/daf-cli/src/credential.ts b/packages/daf-cli/src/credential.ts index 702572882..1050eff26 100644 --- a/packages/daf-cli/src/credential.ts +++ b/packages/daf-cli/src/credential.ts @@ -114,7 +114,7 @@ program } if (cmd.qrcode) { - qrcode.generate(credential.raw) + qrcode.generate(verifiableCredential.proof.jwt) } else { console.dir(verifiableCredential, { depth: 10 }) } diff --git a/packages/daf-core/api/daf-core.api.json b/packages/daf-core/api/daf-core.api.json index 93da96211..fd834e0f2 100644 --- a/packages/daf-core/api/daf-core.api.json +++ b/packages/daf-core/api/daf-core.api.json @@ -226,6 +226,33 @@ "endIndex": 2 }, "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "daf-core!Agent#schema:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly schema: " + }, + { + "kind": "Reference", + "text": "IAgentPluginSchema", + "canonicalReference": "daf-core!IAgentPluginSchema:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "schema", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false } ], "implementsTokenRanges": [ @@ -825,7 +852,7 @@ { "kind": "Reference", "text": "VerifiableCredential", - "canonicalReference": "daf-core!VerifiableCredential:type" + "canonicalReference": "daf-core!VerifiableCredential:interface" }, { "kind": "Content", @@ -883,7 +910,7 @@ { "kind": "Reference", "text": "VerifiablePresentation", - "canonicalReference": "daf-core!VerifiablePresentation:type" + "canonicalReference": "daf-core!VerifiablePresentation:interface" }, { "kind": "Content", @@ -1256,7 +1283,7 @@ { "kind": "Reference", "text": "VerifiableCredential", - "canonicalReference": "daf-core!VerifiableCredential:type" + "canonicalReference": "daf-core!VerifiableCredential:interface" }, { "kind": "Content", @@ -1298,7 +1325,7 @@ { "kind": "Reference", "text": "VerifiablePresentation", - "canonicalReference": "daf-core!VerifiablePresentation:type" + "canonicalReference": "daf-core!VerifiablePresentation:interface" }, { "kind": "Content", @@ -3522,7 +3549,7 @@ }, { "kind": "Content", - "text": "object" + "text": "object | null" }, { "kind": "Content", @@ -4623,7 +4650,7 @@ { "kind": "Reference", "text": "VerifiableCredential", - "canonicalReference": "daf-core!VerifiableCredential:type" + "canonicalReference": "daf-core!VerifiableCredential:interface" }, { "kind": "Content", @@ -4783,7 +4810,7 @@ { "kind": "Reference", "text": "VerifiablePresentation", - "canonicalReference": "daf-core!VerifiablePresentation:type" + "canonicalReference": "daf-core!VerifiablePresentation:interface" }, { "kind": "Content", @@ -5685,7 +5712,7 @@ }, { "kind": "Content", - "text": "(args: object, schema: object, schemaPath?: string | undefined) => void" + "text": "(args: any, schema: object, schemaPath?: string | undefined) => void" } ], "releaseTag": "Public", @@ -5904,82 +5931,1096 @@ "implementsTokenRanges": [] }, { - "kind": "TypeAlias", - "canonicalReference": "daf-core!VerifiableCredential:type", + "kind": "Interface", + "canonicalReference": "daf-core!VerifiableCredential:interface", "docComment": "/**\n * Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "export declare type VerifiableCredential = " - }, + "text": "export interface VerifiableCredential " + } + ], + "releaseTag": "Public", + "name": "VerifiableCredential", + "members": [ { - "kind": "Reference", - "text": "Verifiable", - "canonicalReference": "did-jwt-vc!Verifiable:type" + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiableCredential#\"@context\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'@context': " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "\"@context\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } }, { - "kind": "Content", - "text": "<" + "kind": "IndexSignature", + "canonicalReference": "daf-core!VerifiableCredential:index(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "[x: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "]: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] }, { - "kind": "Reference", - "text": "W3CCredential", - "canonicalReference": "did-jwt-vc!W3CCredential:type" + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiableCredential#credentialStatus:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "credentialStatus?: " + }, + { + "kind": "Content", + "text": "{\n id: string;\n type: string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "credentialStatus", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } }, { - "kind": "Content", - "text": ">" + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiableCredential#credentialSubject:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "credentialSubject: " + }, + { + "kind": "Content", + "text": "{\n id?: string;\n [x: string]: any;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "credentialSubject", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } }, { - "kind": "Content", - "text": ";" - } - ], - "releaseTag": "Public", - "name": "VerifiableCredential", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "daf-core!VerifiablePresentation:type", - "docComment": "/**\n * Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type VerifiablePresentation = " + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiableCredential#expirationDate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "expirationDate?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "expirationDate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } }, { - "kind": "Reference", - "text": "Verifiable", - "canonicalReference": "did-jwt-vc!Verifiable:type" + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiableCredential#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } }, { - "kind": "Content", - "text": "<" + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiableCredential#issuanceDate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "issuanceDate: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "issuanceDate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } }, { - "kind": "Reference", - "text": "W3CPresentation", - "canonicalReference": "did-jwt-vc!W3CPresentation:type" + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiableCredential#issuer:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "issuer: " + }, + { + "kind": "Content", + "text": "{\n id: string;\n [x: string]: any;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "issuer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } }, { - "kind": "Content", - "text": ">" + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiableCredential#proof:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "proof: " + }, + { + "kind": "Content", + "text": "{\n type?: string;\n [x: string]: any;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "proof", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } }, { - "kind": "Content", - "text": ";" - } - ], - "releaseTag": "Public", - "name": "VerifiablePresentation", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiableCredential#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "daf-core!VerifiablePresentation:interface", + "docComment": "/**\n * Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface VerifiablePresentation " + } + ], + "releaseTag": "Public", + "name": "VerifiablePresentation", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiablePresentation#\"@context\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'@context': " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "\"@context\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "IndexSignature", + "canonicalReference": "daf-core!VerifiablePresentation:index(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "[x: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "]: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiablePresentation#expirationDate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "expirationDate?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "expirationDate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiablePresentation#holder:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "holder: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "holder", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiablePresentation#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiablePresentation#issuanceDate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "issuanceDate?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "issuanceDate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiablePresentation#proof:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "proof: " + }, + { + "kind": "Content", + "text": "{\n type?: string;\n [x: string]: any;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "proof", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiablePresentation#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiablePresentation#verifiableCredential:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "verifiableCredential: " + }, + { + "kind": "Reference", + "text": "VerifiableCredential", + "canonicalReference": "daf-core!VerifiableCredential:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "verifiableCredential", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!VerifiablePresentation#verifier:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "verifier: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "verifier", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "daf-core!W3CCredential:interface", + "docComment": "/**\n * W3CCredential {@link https://github.com/decentralized-identity/did-jwt-vc}\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface W3CCredential " + } + ], + "releaseTag": "Public", + "name": "W3CCredential", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CCredential#\"@context\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'@context': " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "\"@context\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "IndexSignature", + "canonicalReference": "daf-core!W3CCredential:index(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "[x: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "]: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CCredential#credentialStatus:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "credentialStatus?: " + }, + { + "kind": "Content", + "text": "{\n id: string;\n type: string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "credentialStatus", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CCredential#credentialSubject:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "credentialSubject: " + }, + { + "kind": "Content", + "text": "{\n id?: string;\n [x: string]: any;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "credentialSubject", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CCredential#expirationDate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "expirationDate?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "expirationDate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CCredential#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CCredential#issuanceDate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "issuanceDate: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "issuanceDate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CCredential#issuer:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "issuer: " + }, + { + "kind": "Content", + "text": "{\n id: string;\n [x: string]: any;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "issuer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CCredential#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "daf-core!W3CPresentation:interface", + "docComment": "/**\n * W3CPresentation {@link https://github.com/decentralized-identity/did-jwt-vc}\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface W3CPresentation " + } + ], + "releaseTag": "Public", + "name": "W3CPresentation", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CPresentation#\"@context\":member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "'@context': " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "\"@context\"", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "IndexSignature", + "canonicalReference": "daf-core!W3CPresentation:index(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "[x: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "]: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "x", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CPresentation#expirationDate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "expirationDate?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "expirationDate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CPresentation#holder:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "holder: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "holder", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CPresentation#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CPresentation#issuanceDate:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "issuanceDate?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "issuanceDate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CPresentation#type:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CPresentation#verifiableCredential:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "verifiableCredential: " + }, + { + "kind": "Reference", + "text": "VerifiableCredential", + "canonicalReference": "daf-core!VerifiableCredential:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "verifiableCredential", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "daf-core!W3CPresentation#verifier:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "verifier: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "verifier", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] } ] } diff --git a/packages/daf-core/api/daf-core.api.md b/packages/daf-core/api/daf-core.api.md index 44f4fb217..a7e083518 100644 --- a/packages/daf-core/api/daf-core.api.md +++ b/packages/daf-core/api/daf-core.api.md @@ -5,9 +5,6 @@ ```ts import { DIDDocument } from 'did-resolver'; -import { Verifiable } from 'did-jwt-vc'; -import { W3CCredential } from 'did-jwt-vc'; -import { W3CPresentation } from 'did-jwt-vc'; // @public export class Agent implements IAgent { @@ -15,7 +12,9 @@ export class Agent implements IAgent { availableMethods(): string[]; execute

(method: string, args: P): Promise; readonly methods: IPluginMethodMap; - } + // (undocumented) + readonly schema: IAgentPluginSchema; +} // @public export function createAgent(options: IAgentOptions): TAgent; @@ -214,7 +213,7 @@ export interface IIdentityManagerSetAliasArgs { export interface IKey { kid: string; kms: string; - meta?: object; + meta?: object | null; privateKeyHex?: string; publicKeyHex: string; type: TKeyType; @@ -349,7 +348,7 @@ export type TAgent = { export type TKeyType = 'Ed25519' | 'Secp256k1'; // @public (undocumented) -export const validate: (args: object, schema: object, schemaPath?: string | undefined) => void; +export const validate: (args: any, schema: object, schemaPath?: string | undefined) => void; // @public (undocumented) export class ValidationError extends Error { @@ -365,14 +364,120 @@ export class ValidationError extends Error { } // @public -export type VerifiableCredential = Verifiable; +export interface VerifiableCredential { + // (undocumented) + '@context': string[]; + // (undocumented) + [x: string]: any; + // (undocumented) + credentialStatus?: { + id: string; + type: string; + }; + // (undocumented) + credentialSubject: { + id?: string; + [x: string]: any; + }; + // (undocumented) + expirationDate?: string; + // (undocumented) + id?: string; + // (undocumented) + issuanceDate: string; + // (undocumented) + issuer: { + id: string; + [x: string]: any; + }; + // (undocumented) + proof: { + type?: string; + [x: string]: any; + }; + // (undocumented) + type: string[]; +} // @public -export type VerifiablePresentation = Verifiable; +export interface VerifiablePresentation { + // (undocumented) + '@context': string[]; + // (undocumented) + [x: string]: any; + // (undocumented) + expirationDate?: string; + // (undocumented) + holder: string; + // (undocumented) + id?: string; + // (undocumented) + issuanceDate?: string; + // (undocumented) + proof: { + type?: string; + [x: string]: any; + }; + // (undocumented) + type: string[]; + // (undocumented) + verifiableCredential: VerifiableCredential[]; + // (undocumented) + verifier: string[]; +} -export { W3CCredential } +// @public +export interface W3CCredential { + // (undocumented) + '@context': string[]; + // (undocumented) + [x: string]: any; + // (undocumented) + credentialStatus?: { + id: string; + type: string; + }; + // (undocumented) + credentialSubject: { + id?: string; + [x: string]: any; + }; + // (undocumented) + expirationDate?: string; + // (undocumented) + id?: string; + // (undocumented) + issuanceDate: string; + // (undocumented) + issuer: { + id: string; + [x: string]: any; + }; + // (undocumented) + type: string[]; +} -export { W3CPresentation } +// @public +export interface W3CPresentation { + // (undocumented) + '@context': string[]; + // (undocumented) + [x: string]: any; + // (undocumented) + expirationDate?: string; + // (undocumented) + holder: string; + // (undocumented) + id?: string; + // (undocumented) + issuanceDate?: string; + // (undocumented) + type: string[]; + // (undocumented) + verifiableCredential: VerifiableCredential[]; + // (undocumented) + verifier: string[]; +} ``` diff --git a/packages/daf-core/src/agent.ts b/packages/daf-core/src/agent.ts index 0c9d0d490..3de5c04fb 100644 --- a/packages/daf-core/src/agent.ts +++ b/packages/daf-core/src/agent.ts @@ -1,4 +1,5 @@ -import { IAgent, IPluginMethodMap, IAgentPlugin, TAgent } from './types/IAgent' +import { IAgent, IPluginMethodMap, IAgentPlugin, TAgent, IAgentPluginSchema } from './types/IAgent' +import { validate } from './validator' import Debug from 'debug' /** @@ -80,6 +81,7 @@ export class Agent implements IAgent { * The map of plugin + override methods */ readonly methods: IPluginMethodMap = {} + readonly schema: IAgentPluginSchema private context?: Record private protectedMethods = ['execute', 'availableMethods'] @@ -92,6 +94,13 @@ export class Agent implements IAgent { */ constructor(options?: IAgentOptions) { this.context = options?.context + + this.schema = { + components: { + schemas: {}, + methods: {} + } + } if (options?.plugins) { for (const plugin of options.plugins) { @@ -99,6 +108,21 @@ export class Agent implements IAgent { ...this.methods, ...filterUnauthorizedMethods(plugin.methods, options.authorizedMethods), } + if (plugin.schema) { + this.schema = { + components: { + schemas: { + ...this.schema.components.schemas, + ...plugin.schema.components.schemas, + }, + methods: { + ...this.schema.components.methods, + ...plugin.schema.components.methods, + } + } + } + } + } } @@ -152,7 +176,11 @@ export class Agent implements IAgent { async execute

(method: string, args: P): Promise { Debug('daf:agent:' + method)('%o', args) if (!this.methods[method]) throw Error('Method not available: ' + method) - const result = await this.methods[method](args, { ...this.context, agent: this }) + const _args = args || {} + if (this.schema.components.methods[method]) { + validate(_args, this.schema, 'components.methods.' + method + '.arguments') + } + const result = await this.methods[method](_args, { ...this.context, agent: this }) Debug('daf:agent:' + method + ':result')('%o', result) return result } diff --git a/packages/daf-core/src/schemas/IDataStore.ts b/packages/daf-core/src/schemas/IDataStore.ts index e2878176f..d19e215d4 100644 --- a/packages/daf-core/src/schemas/IDataStore.ts +++ b/packages/daf-core/src/schemas/IDataStore.ts @@ -120,19 +120,40 @@ export default { "description": "Message meta data" }, "VerifiableCredential": { - "$ref": "#/components/schemas/Verifiable-W3CCredential", - "description": "Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}" - }, - "Verifiable-W3CCredential": { "type": "object", - "additionalProperties": false, "properties": { - "proof": { - "$ref": "#/components/schemas/Proof" + "@context": { + "type": "array", + "items": { + "type": "string" + } }, "id": { "type": "string" }, + "type": { + "type": "array", + "items": { + "type": "string" + } + }, + "issuer": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, "credentialSubject": { "type": "object", "properties": { @@ -154,63 +175,31 @@ export default { "required": [ "id", "type" - ] - }, - "@context": { - "type": "object", - "properties": {} - }, - "type": { - "type": "object", - "properties": {} + ], + "additionalProperties": false }, - "issuer": { + "proof": { "type": "object", "properties": { - "id": { + "type": { "type": "string" } - }, - "required": [ - "id" - ] - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" + } } }, "required": [ "@context", - "credentialSubject", - "issuanceDate", + "type", "issuer", - "proof", - "type" + "issuanceDate", + "credentialSubject", + "proof" ], - "description": "Represents a readonly representation of a verifiable object, including the {@link Proof} property that can be used to verify it." - }, - "Proof": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - } + "description": "Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}" }, "VerifiablePresentation": { - "$ref": "#/components/schemas/Verifiable-W3CPresentation", - "description": "Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}" - }, - "Verifiable-W3CPresentation": { "type": "object", - "additionalProperties": false, "properties": { - "proof": { - "$ref": "#/components/schemas/Proof" - }, "id": { "type": "string" }, @@ -224,31 +213,47 @@ export default { "type": "string" }, "@context": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "type": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "verifier": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "verifiableCredential": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VerifiableCredential" + } + }, + "proof": { "type": "object", - "properties": {} + "properties": { + "type": { + "type": "string" + } + } } }, "required": [ - "@context", "holder", - "proof", + "@context", "type", + "verifier", "verifiableCredential", - "verifier" + "proof" ], - "description": "Represents a readonly representation of a verifiable object, including the {@link Proof} property that can be used to verify it." + "description": "Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}" }, "IDataStoreGetVerifiableCredentialArgs": { "type": "object", diff --git a/packages/daf-core/src/schemas/IIdentityManager.ts b/packages/daf-core/src/schemas/IIdentityManager.ts index 4ac5ec8ff..0bb739542 100644 --- a/packages/daf-core/src/schemas/IIdentityManager.ts +++ b/packages/daf-core/src/schemas/IIdentityManager.ts @@ -48,7 +48,14 @@ export default { "description": "Optional. Private key" }, "meta": { - "type": "object", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], "description": "Optional. Key metadata. Can be used to store auth data to access remote kms" } }, diff --git a/packages/daf-core/src/schemas/IKeyManager.ts b/packages/daf-core/src/schemas/IKeyManager.ts index 0618330d3..c52037a5f 100644 --- a/packages/daf-core/src/schemas/IKeyManager.ts +++ b/packages/daf-core/src/schemas/IKeyManager.ts @@ -56,7 +56,14 @@ export default { "description": "Optional. Private key" }, "meta": { - "type": "object", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], "description": "Optional. Key metadata. Can be used to store auth data to access remote kms" } }, @@ -129,7 +136,14 @@ export default { "description": "Optional. Private key" }, "meta": { - "type": "object", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], "description": "Optional. Key metadata. Can be used to store auth data to access remote kms" } }, diff --git a/packages/daf-core/src/schemas/IMessageHandler.ts b/packages/daf-core/src/schemas/IMessageHandler.ts index e6e14c929..593b077ff 100644 --- a/packages/daf-core/src/schemas/IMessageHandler.ts +++ b/packages/daf-core/src/schemas/IMessageHandler.ts @@ -131,19 +131,40 @@ export default { "description": "DIDComm message" }, "VerifiableCredential": { - "$ref": "#/components/schemas/Verifiable-W3CCredential", - "description": "Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}" - }, - "Verifiable-W3CCredential": { "type": "object", - "additionalProperties": false, "properties": { - "proof": { - "$ref": "#/components/schemas/Proof" + "@context": { + "type": "array", + "items": { + "type": "string" + } }, "id": { "type": "string" }, + "type": { + "type": "array", + "items": { + "type": "string" + } + }, + "issuer": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, "credentialSubject": { "type": "object", "properties": { @@ -165,63 +186,31 @@ export default { "required": [ "id", "type" - ] - }, - "@context": { - "type": "object", - "properties": {} - }, - "type": { - "type": "object", - "properties": {} + ], + "additionalProperties": false }, - "issuer": { + "proof": { "type": "object", "properties": { - "id": { + "type": { "type": "string" } - }, - "required": [ - "id" - ] - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" + } } }, "required": [ "@context", - "credentialSubject", - "issuanceDate", + "type", "issuer", - "proof", - "type" + "issuanceDate", + "credentialSubject", + "proof" ], - "description": "Represents a readonly representation of a verifiable object, including the {@link Proof} property that can be used to verify it." - }, - "Proof": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - } + "description": "Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}" }, "VerifiablePresentation": { - "$ref": "#/components/schemas/Verifiable-W3CPresentation", - "description": "Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}" - }, - "Verifiable-W3CPresentation": { "type": "object", - "additionalProperties": false, "properties": { - "proof": { - "$ref": "#/components/schemas/Proof" - }, "id": { "type": "string" }, @@ -235,31 +224,47 @@ export default { "type": "string" }, "@context": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "type": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "verifier": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "verifiableCredential": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VerifiableCredential" + } + }, + "proof": { "type": "object", - "properties": {} + "properties": { + "type": { + "type": "string" + } + } } }, "required": [ - "@context", "holder", - "proof", + "@context", "type", + "verifier", "verifiableCredential", - "verifier" + "proof" ], - "description": "Represents a readonly representation of a verifiable object, including the {@link Proof} property that can be used to verify it." + "description": "Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}" } }, "methods": { diff --git a/packages/daf-core/src/types/IIdentity.ts b/packages/daf-core/src/types/IIdentity.ts index 87ae1ae66..0e7929b48 100644 --- a/packages/daf-core/src/types/IIdentity.ts +++ b/packages/daf-core/src/types/IIdentity.ts @@ -73,7 +73,7 @@ export interface IKey { /** * Optional. Key metadata. Can be used to store auth data to access remote kms */ - meta?: object + meta?: object | null } /** diff --git a/packages/daf-core/src/validator.ts b/packages/daf-core/src/validator.ts index b736ec82f..0bc7abd6b 100644 --- a/packages/daf-core/src/validator.ts +++ b/packages/daf-core/src/validator.ts @@ -22,7 +22,7 @@ export class ValidationError extends Error{ } -export const validate = (args: object, schema: object, schemaPath?: string) => { +export const validate = (args: any, schema: object, schemaPath?: string) => { const options = schemaPath ? { schemaPath } : {} const valid = validator.validate(args, schema, options) if (!valid) { diff --git a/packages/daf-did-comm/api/daf-did-comm.api.json b/packages/daf-did-comm/api/daf-did-comm.api.json index a314e12f5..9a07e9004 100644 --- a/packages/daf-did-comm/api/daf-did-comm.api.json +++ b/packages/daf-did-comm/api/daf-did-comm.api.json @@ -89,7 +89,7 @@ }, { "kind": "Content", - "text": "{\n components: {\n schemas: {\n ISendMessageDIDCommAlpha1Args: {\n type: string;\n properties: {\n url: {\n type: string;\n };\n save: {\n type: string;\n };\n data: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n from: {\n type: string;\n };\n to: {\n type: string;\n };\n type: {\n type: string;\n };\n body: {\n anyOf: {\n type: string;\n }[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMessage: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n createdAt: {\n type: string;\n description: string;\n };\n expiresAt: {\n type: string;\n description: string;\n };\n threadId: {\n type: string;\n description: string;\n };\n raw: {\n type: string; /** {@inheritdoc IDIDComm.sendMessageDIDCommAlpha1} */\n description: string;\n };\n data: {\n anyOf: {\n type: string;\n }[];\n description: string;\n };\n replyTo: {\n type: string;\n items: {\n type: string;\n };\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n from: {\n type: string;\n description: string;\n };\n to: {\n type: string;\n description: string;\n };\n metaData: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n presentations: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMetaData: {\n type: string;\n properties: {\n type: {\n type: string;\n description: string;\n };\n value: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiableCredential: {\n $ref: string;\n description: string;\n };\n \"Verifiable-W3CCredential\": {\n type: string;\n additionalProperties: boolean;\n properties: {\n proof: {\n $ref: string;\n };\n id: {\n type: string;\n };\n credentialSubject: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n };\n credentialStatus: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n type: {\n type: string;\n };\n };\n required: string[];\n };\n \"@context\": {\n type: string;\n properties: {};\n };\n type: {\n type: string;\n properties: {};\n };\n issuer: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n required: string[];\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n };\n required: string[];\n description: string;\n };\n Proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n VerifiablePresentation: {\n $ref: string;\n description: string;\n };\n \"Verifiable-W3CPresentation\": {\n type: string;\n additionalProperties: boolean;\n properties: {\n proof: {\n $ref: string;\n };\n id: {\n type: string;\n };\n holder: {\n type: string;\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n \"@context\": {\n type: string;\n properties: {};\n };\n type: {\n type: string;\n properties: {};\n };\n verifier: {\n type: string;\n properties: {};\n };\n verifiableCredential: {\n type: string;\n properties: {};\n };\n };\n required: string[];\n description: string;\n };\n };\n methods: {\n sendMessageDIDCommAlpha1: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n };\n };\n }" + "text": "{\n components: {\n schemas: {\n ISendMessageDIDCommAlpha1Args: {\n type: string;\n properties: {\n url: {\n type: string;\n };\n save: {\n type: string;\n };\n data: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n from: {\n type: string;\n };\n to: {\n type: string;\n };\n type: {\n type: string;\n };\n body: {\n anyOf: {\n type: string;\n }[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMessage: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n createdAt: {\n type: string;\n description: string;\n };\n expiresAt: {\n type: string;\n description: string;\n };\n threadId: {\n type: string;\n description: string;\n };\n raw: {\n type: string; /** {@inheritdoc IDIDComm.sendMessageDIDCommAlpha1} */\n description: string;\n };\n data: {\n anyOf: {\n type: string;\n }[];\n description: string;\n };\n replyTo: {\n type: string;\n items: {\n type: string;\n };\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n from: {\n type: string;\n description: string;\n };\n to: {\n type: string;\n description: string;\n };\n metaData: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n presentations: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMetaData: {\n type: string;\n properties: {\n type: {\n type: string;\n description: string;\n };\n value: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiableCredential: {\n type: string;\n properties: {\n \"@context\": {\n type: string;\n items: {\n type: string;\n };\n };\n id: {\n type: string;\n };\n type: {\n type: string;\n items: {\n type: string;\n };\n };\n issuer: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n required: string[];\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n credentialSubject: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n };\n credentialStatus: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n type: {\n type: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n };\n required: string[];\n description: string;\n };\n VerifiablePresentation: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n holder: {\n type: string;\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n \"@context\": {\n type: string;\n items: {\n type: string;\n };\n };\n type: {\n type: string;\n items: {\n type: string;\n };\n };\n verifier: {\n type: string;\n items: {\n type: string;\n };\n };\n verifiableCredential: {\n type: string;\n items: {\n $ref: string;\n };\n };\n proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n };\n required: string[];\n description: string;\n };\n };\n methods: {\n sendMessageDIDCommAlpha1: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n };\n };\n }" }, { "kind": "Content", diff --git a/packages/daf-did-comm/api/daf-did-comm.api.md b/packages/daf-did-comm/api/daf-did-comm.api.md index a2f5c00f8..da0f128f2 100644 --- a/packages/daf-did-comm/api/daf-did-comm.api.md +++ b/packages/daf-did-comm/api/daf-did-comm.api.md @@ -156,85 +156,74 @@ export class DIDComm implements IAgentPlugin { description: string; }; VerifiableCredential: { - $ref: string; - description: string; - }; - "Verifiable-W3CCredential": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; + "@context": { + type: string; + items: { + type: string; + }; }; id: { type: string; }; - credentialSubject: { + type: { type: string; - properties: { - id: { - type: string; - }; + items: { + type: string; }; }; - credentialStatus: { + issuer: { type: string; properties: { id: { type: string; }; - type: { - type: string; - }; }; required: string[]; }; - "@context": { + issuanceDate: { type: string; - properties: {}; }; - type: { + expirationDate: { type: string; - properties: {}; }; - issuer: { + credentialSubject: { type: string; properties: { id: { type: string; }; }; - required: string[]; }; - issuanceDate: { + credentialStatus: { type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; }; - expirationDate: { + proof: { type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; description: string; }; - Proof: { - type: string; - properties: { - type: { - type: string; - }; - }; - }; VerifiablePresentation: { - $ref: string; - description: string; - }; - "Verifiable-W3CPresentation": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; - }; id: { type: string; }; @@ -249,19 +238,35 @@ export class DIDComm implements IAgentPlugin { }; "@context": { type: string; - properties: {}; + items: { + type: string; + }; }; type: { type: string; - properties: {}; + items: { + type: string; + }; }; verifier: { type: string; - properties: {}; + items: { + type: string; + }; }; verifiableCredential: { type: string; - properties: {}; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; diff --git a/packages/daf-did-comm/src/schemas/IDIDComm.ts b/packages/daf-did-comm/src/schemas/IDIDComm.ts index 075c9955f..77fe23d42 100644 --- a/packages/daf-did-comm/src/schemas/IDIDComm.ts +++ b/packages/daf-did-comm/src/schemas/IDIDComm.ts @@ -156,19 +156,40 @@ export default { "description": "Message meta data" }, "VerifiableCredential": { - "$ref": "#/components/schemas/Verifiable-W3CCredential", - "description": "Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}" - }, - "Verifiable-W3CCredential": { "type": "object", - "additionalProperties": false, "properties": { - "proof": { - "$ref": "#/components/schemas/Proof" + "@context": { + "type": "array", + "items": { + "type": "string" + } }, "id": { "type": "string" }, + "type": { + "type": "array", + "items": { + "type": "string" + } + }, + "issuer": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, "credentialSubject": { "type": "object", "properties": { @@ -190,63 +211,31 @@ export default { "required": [ "id", "type" - ] - }, - "@context": { - "type": "object", - "properties": {} - }, - "type": { - "type": "object", - "properties": {} + ], + "additionalProperties": false }, - "issuer": { + "proof": { "type": "object", "properties": { - "id": { + "type": { "type": "string" } - }, - "required": [ - "id" - ] - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" + } } }, "required": [ "@context", - "credentialSubject", - "issuanceDate", + "type", "issuer", - "proof", - "type" + "issuanceDate", + "credentialSubject", + "proof" ], - "description": "Represents a readonly representation of a verifiable object, including the {@link Proof} property that can be used to verify it." - }, - "Proof": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - } + "description": "Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}" }, "VerifiablePresentation": { - "$ref": "#/components/schemas/Verifiable-W3CPresentation", - "description": "Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}" - }, - "Verifiable-W3CPresentation": { "type": "object", - "additionalProperties": false, "properties": { - "proof": { - "$ref": "#/components/schemas/Proof" - }, "id": { "type": "string" }, @@ -260,31 +249,47 @@ export default { "type": "string" }, "@context": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "type": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "verifier": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "verifiableCredential": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VerifiableCredential" + } + }, + "proof": { "type": "object", - "properties": {} + "properties": { + "type": { + "type": "string" + } + } } }, "required": [ - "@context", "holder", - "proof", + "@context", "type", + "verifier", "verifiableCredential", - "verifier" + "proof" ], - "description": "Represents a readonly representation of a verifiable object, including the {@link Proof} property that can be used to verify it." + "description": "Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}" } }, "methods": { diff --git a/packages/daf-graphql/api/daf-graphql.api.json b/packages/daf-graphql/api/daf-graphql.api.json index 1cc94a7f7..b961a8615 100644 --- a/packages/daf-graphql/api/daf-graphql.api.json +++ b/packages/daf-graphql/api/daf-graphql.api.json @@ -120,6 +120,33 @@ "endIndex": 2 }, "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "daf-graphql!AgentGraphQLClient#schema:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly schema: " + }, + { + "kind": "Reference", + "text": "IAgentPluginSchema", + "canonicalReference": "daf-core!IAgentPluginSchema:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "schema", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false } ], "implementsTokenRanges": [ diff --git a/packages/daf-graphql/api/daf-graphql.api.md b/packages/daf-graphql/api/daf-graphql.api.md index ffa0a6dc9..32ef6f4c8 100644 --- a/packages/daf-graphql/api/daf-graphql.api.md +++ b/packages/daf-graphql/api/daf-graphql.api.md @@ -5,6 +5,7 @@ ```ts import { IAgentPlugin } from 'daf-core'; +import { IAgentPluginSchema } from 'daf-core'; import { IPluginMethodMap } from 'daf-core'; // @public (undocumented) @@ -17,6 +18,8 @@ export class AgentGraphQLClient implements IAgentPlugin { }); // (undocumented) readonly methods: IPluginMethodMap; + // (undocumented) + readonly schema: IAgentPluginSchema; } // @public (undocumented) diff --git a/packages/daf-identity-manager/api/daf-identity-manager.api.json b/packages/daf-identity-manager/api/daf-identity-manager.api.json index f30684d67..c8094d446 100644 --- a/packages/daf-identity-manager/api/daf-identity-manager.api.json +++ b/packages/daf-identity-manager/api/daf-identity-manager.api.json @@ -1926,7 +1926,7 @@ }, { "kind": "Content", - "text": "{\n components: {\n schemas: {\n IIdentityManagerAddKeyArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n key: {\n $ref: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string; /**\n * Agent plugin that implements {@link daf-core#IIdentityManager} interface\n * @public\n */\n };\n IKey: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n type: {\n $ref: string;\n description: string;\n };\n publicKeyHex: {\n type: string;\n description: string;\n };\n privateKeyHex: {\n type: string;\n description: string;\n };\n meta: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n TKeyType: {\n type: string;\n enum: string[];\n description: string;\n };\n IIdentityManagerAddServiceArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n service: {\n $ref: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IService: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n serviceEndpoint: {\n type: string;\n description: string;\n };\n description: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerCreateIdentityArgs: {\n type: string;\n properties: {\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n additionalProperties: boolean;\n description: string;\n };\n IIdentity: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n controllerKeyId: {\n type: string;\n description: string;\n };\n keys: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n services: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerDeleteIdentityArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerGetIdentitiesArgs: {\n type: string;\n properties: {\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n };\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerGetIdentityArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerGetIdentityByAliasArgs: {\n type: string;\n properties: {\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerGetOrCreateIdentityArgs: {\n type: string;\n properties: {\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerRemoveKeyArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n kid: {\n type: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerRemoveServiceArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n id: {\n type: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerSetAliasArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n alias: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n };\n methods: {\n identityManagerAddKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n identityManagerAddService: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n identityManagerCreateIdentity: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n identityManagerDeleteIdentity: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n identityManagerGetIdentities: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n identityManagerGetIdentity: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n identityManagerGetIdentityByAlias: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n identityManagerGetOrCreateIdentity: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n identityManagerGetProviders: {\n description: string;\n arguments: {\n type: string;\n };\n returnType: {\n type: string;\n items: {\n type: string;\n };\n };\n };\n identityManagerImportIdentity: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n identityManagerRemoveKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n identityManagerRemoveService: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n identityManagerSetAlias: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n };\n };\n }" + "text": "{\n components: {\n schemas: {\n IIdentityManagerAddKeyArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n key: {\n $ref: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string; /**\n * Agent plugin that implements {@link daf-core#IIdentityManager} interface\n * @public\n */\n };\n IKey: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n type: {\n $ref: string;\n description: string;\n };\n publicKeyHex: {\n type: string;\n description: string;\n };\n privateKeyHex: {\n type: string;\n description: string;\n };\n meta: {\n anyOf: {\n type: string;\n }[];\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n TKeyType: {\n type: string;\n enum: string[];\n description: string;\n };\n IIdentityManagerAddServiceArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n service: {\n $ref: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IService: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n serviceEndpoint: {\n type: string;\n description: string;\n };\n description: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerCreateIdentityArgs: {\n type: string;\n properties: {\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n additionalProperties: boolean;\n description: string;\n };\n IIdentity: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string; /** {@inheritDoc daf-core#IIdentityManager.identityManagerGetOrCreateIdentity} */\n description: string;\n };\n controllerKeyId: {\n type: string;\n description: string;\n };\n keys: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n services: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerDeleteIdentityArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerGetIdentitiesArgs: {\n type: string;\n properties: {\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n };\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerGetIdentityArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerGetIdentityByAliasArgs: {\n type: string;\n properties: {\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerGetOrCreateIdentityArgs: {\n type: string;\n properties: {\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n required: string[]; /** {@inheritDoc daf-core#IIdentityManager.identityManagerRemoveService} */\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerRemoveKeyArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n kid: {\n type: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerRemoveServiceArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n id: {\n type: string;\n description: string;\n };\n options: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IIdentityManagerSetAliasArgs: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n alias: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n };\n methods: {\n identityManagerAddKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n identityManagerAddService: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n identityManagerCreateIdentity: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n identityManagerDeleteIdentity: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n identityManagerGetIdentities: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n identityManagerGetIdentity: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n identityManagerGetIdentityByAlias: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n identityManagerGetOrCreateIdentity: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n identityManagerGetProviders: {\n description: string;\n arguments: {\n type: string;\n };\n returnType: {\n type: string;\n items: {\n type: string;\n };\n };\n };\n identityManagerImportIdentity: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n identityManagerRemoveKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n identityManagerRemoveService: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n identityManagerSetAlias: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n };\n };\n }" }, { "kind": "Content", diff --git a/packages/daf-identity-manager/api/daf-identity-manager.api.md b/packages/daf-identity-manager/api/daf-identity-manager.api.md index 2f5e22dc7..1285b372e 100644 --- a/packages/daf-identity-manager/api/daf-identity-manager.api.md +++ b/packages/daf-identity-manager/api/daf-identity-manager.api.md @@ -168,7 +168,9 @@ export class IdentityManager implements IAgentPlugin { description: string; }; meta: { - type: string; + anyOf: { + type: string; + }[]; description: string; }; }; @@ -260,7 +262,7 @@ export class IdentityManager implements IAgentPlugin { description: string; }; provider: { - type: string; + type: string; /** {@inheritDoc daf-core#IIdentityManager.identityManagerGetOrCreateIdentity} */ description: string; }; controllerKeyId: { @@ -361,7 +363,7 @@ export class IdentityManager implements IAgentPlugin { description: string; }; }; - required: string[]; + required: string[]; /** {@inheritDoc daf-core#IIdentityManager.identityManagerRemoveService} */ additionalProperties: boolean; description: string; }; diff --git a/packages/daf-key-manager/api/daf-key-manager.api.json b/packages/daf-key-manager/api/daf-key-manager.api.json index 4d6768684..e0ebd5324 100644 --- a/packages/daf-key-manager/api/daf-key-manager.api.json +++ b/packages/daf-key-manager/api/daf-key-manager.api.json @@ -1270,7 +1270,7 @@ }, { "kind": "Content", - "text": "{\n components: {\n schemas: {\n IKeyManagerCreateKeyArgs: {\n type: string;\n properties: {\n type: {\n $ref: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n meta: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n TKeyType: {\n type: string;\n enum: string[];\n description: string;\n };\n IKey: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n type: {\n $ref: string;\n description: string;\n };\n publicKeyHex: {\n type: string;\n description: string;\n };\n privateKeyHex: {\n type: string;\n description: string;\n };\n meta: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerDecryptJWEArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n data: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerDeleteKeyArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerEncryptJWEArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n to: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n type: {\n $ref: string;\n description: string;\n };\n publicKeyHex: {\n type: string;\n description: string;\n };\n privateKeyHex: {\n type: string;\n description: string;\n };\n meta: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n data: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerGetKeyArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerSignEthTXArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n transaction: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerSignJWTArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n data: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n };\n methods: {\n keyManagerCreateKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n keyManagerDecryptJWE: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n keyManagerDeleteKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n keyManagerEncryptJWE: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n keyManagerGetKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n keyManagerGetKeyManagementSystems: {\n description: string;\n arguments: {\n type: string;\n };\n returnType: {\n type: string;\n items: {\n type: string;\n };\n };\n };\n keyManagerImportKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n keyManagerSignEthTX: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n keyManagerSignJWT: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n };\n };\n }" + "text": "{\n components: {\n schemas: {\n IKeyManagerCreateKeyArgs: {\n type: string;\n properties: {\n type: {\n $ref: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n meta: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n TKeyType: {\n type: string;\n enum: string[];\n description: string;\n };\n IKey: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n type: {\n $ref: string;\n description: string;\n };\n publicKeyHex: {\n type: string;\n description: string;\n };\n privateKeyHex: {\n type: string;\n description: string;\n };\n meta: {\n anyOf: {\n type: string;\n }[]; /** {@inheritDoc daf-core#IKeyManager.keyManagerGetKeyManagementSystems} */\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerDecryptJWEArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n data: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerDeleteKeyArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerEncryptJWEArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n to: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n type: {\n $ref: string;\n description: string;\n };\n publicKeyHex: {\n type: string;\n description: string;\n };\n privateKeyHex: {\n type: string;\n description: string;\n };\n meta: {\n anyOf: {\n type: string;\n }[];\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n data: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerGetKeyArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerSignEthTXArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n transaction: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKeyManagerSignJWTArgs: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n data: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n };\n methods: {\n keyManagerCreateKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n keyManagerDecryptJWE: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n keyManagerDeleteKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n keyManagerEncryptJWE: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n keyManagerGetKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n keyManagerGetKeyManagementSystems: {\n description: string;\n arguments: {\n type: string;\n };\n returnType: {\n type: string;\n items: {\n type: string;\n };\n };\n };\n keyManagerImportKey: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n keyManagerSignEthTX: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n keyManagerSignJWT: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n };\n };\n }" }, { "kind": "Content", diff --git a/packages/daf-key-manager/api/daf-key-manager.api.md b/packages/daf-key-manager/api/daf-key-manager.api.md index a7ba947b0..2e79e5da7 100644 --- a/packages/daf-key-manager/api/daf-key-manager.api.md +++ b/packages/daf-key-manager/api/daf-key-manager.api.md @@ -150,7 +150,9 @@ export class KeyManager implements IAgentPlugin { description: string; }; meta: { - type: string; + anyOf: { + type: string; + }[]; /** {@inheritDoc daf-core#IKeyManager.keyManagerGetKeyManagementSystems} */ description: string; }; }; @@ -213,7 +215,9 @@ export class KeyManager implements IAgentPlugin { description: string; }; meta: { - type: string; + anyOf: { + type: string; + }[]; description: string; }; }; diff --git a/packages/daf-key-manager/src/key-manager.ts b/packages/daf-key-manager/src/key-manager.ts index 9a55a4565..434bc3f96 100644 --- a/packages/daf-key-manager/src/key-manager.ts +++ b/packages/daf-key-manager/src/key-manager.ts @@ -61,7 +61,10 @@ export class KeyManager implements IAgentPlugin { async keyManagerCreateKey(args: IKeyManagerCreateKeyArgs): Promise { const kms = this.getKms(args.kms) const partialKey = await kms.createKey({ type: args.type, meta: args.meta }) - const key: IKey = { ...partialKey, kms: args.kms, meta: args.meta } + const key: IKey = { ...partialKey, kms: args.kms } + if (args.meta) { + key.meta = args.meta + } await this.store.import(key) if (key.privateKeyHex) { delete key.privateKeyHex diff --git a/packages/daf-message-handler/api/daf-message-handler.api.json b/packages/daf-message-handler/api/daf-message-handler.api.json index 9b619be28..dcc919938 100644 --- a/packages/daf-message-handler/api/daf-message-handler.api.json +++ b/packages/daf-message-handler/api/daf-message-handler.api.json @@ -327,7 +327,7 @@ { "kind": "Reference", "text": "VerifiableCredential", - "canonicalReference": "daf-core!VerifiableCredential:type" + "canonicalReference": "daf-core!VerifiableCredential:interface" }, { "kind": "Content", @@ -554,7 +554,7 @@ { "kind": "Reference", "text": "VerifiablePresentation", - "canonicalReference": "daf-core!VerifiablePresentation:type" + "canonicalReference": "daf-core!VerifiablePresentation:interface" }, { "kind": "Content", @@ -925,6 +925,32 @@ "endIndex": 2 }, "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "daf-message-handler!MessageHandler#schema:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly schema: " + }, + { + "kind": "Content", + "text": "{\n components: {\n schemas: {\n IHandleMessageArgs: {\n type: string;\n properties: {\n raw: {\n type: string;\n description: string;\n };\n metaData: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n save: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMetaData: {\n type: string;\n properties: {\n type: {\n type: string;\n description: string;\n };\n value: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMessage: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n createdAt: {\n type: string;\n description: string;\n };\n expiresAt: {\n type: string;\n description: string;\n };\n threadId: {\n type: string;\n description: string;\n };\n raw: {\n type: string;\n description: string;\n };\n data: {\n anyOf: {\n type: string;\n }[];\n description: string;\n };\n replyTo: {\n type: string;\n items: {\n type: string;\n };\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n from: {\n type: string;\n description: string;\n };\n to: {\n type: string;\n description: string;\n };\n metaData: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n presentations: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiableCredential: {\n type: string;\n properties: {\n \"@context\": {\n type: string;\n items: {\n type: string;\n };\n };\n id: {\n type: string;\n };\n type: {\n type: string;\n items: {\n type: string;\n };\n };\n issuer: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n required: string[];\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n credentialSubject: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n };\n credentialStatus: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n type: {\n type: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n };\n required: string[];\n description: string;\n };\n VerifiablePresentation: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n holder: {\n type: string;\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n \"@context\": {\n type: string;\n items: {\n type: string;\n };\n };\n type: {\n type: string;\n items: {\n type: string;\n };\n };\n verifier: {\n type: string;\n items: {\n type: string;\n };\n };\n verifiableCredential: {\n type: string;\n items: {\n $ref: string;\n };\n };\n proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n };\n required: string[];\n description: string;\n };\n };\n methods: {\n handleMessage: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n };\n };\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "schema", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false } ], "extendsTokenRange": { diff --git a/packages/daf-message-handler/api/daf-message-handler.api.md b/packages/daf-message-handler/api/daf-message-handler.api.md index f8a50442c..2b5e31698 100644 --- a/packages/daf-message-handler/api/daf-message-handler.api.md +++ b/packages/daf-message-handler/api/daf-message-handler.api.md @@ -75,6 +75,258 @@ export class MessageHandler extends EventEmitter implements IAgentPlugin { // (undocumented) handleMessage(args: IHandleMessageArgs, context: IAgentContext): Promise; readonly methods: IMessageHandler; + // (undocumented) + readonly schema: { + components: { + schemas: { + IHandleMessageArgs: { + type: string; + properties: { + raw: { + type: string; + description: string; + }; + metaData: { + type: string; + items: { + $ref: string; + }; + description: string; + }; + save: { + type: string; + description: string; + }; + }; + required: string[]; + additionalProperties: boolean; + description: string; + }; + IMetaData: { + type: string; + properties: { + type: { + type: string; + description: string; + }; + value: { + type: string; + description: string; + }; + }; + required: string[]; + additionalProperties: boolean; + description: string; + }; + IMessage: { + type: string; + properties: { + id: { + type: string; + description: string; + }; + type: { + type: string; + description: string; + }; + createdAt: { + type: string; + description: string; + }; + expiresAt: { + type: string; + description: string; + }; + threadId: { + type: string; + description: string; + }; + raw: { + type: string; + description: string; + }; + data: { + anyOf: { + type: string; + }[]; + description: string; + }; + replyTo: { + type: string; + items: { + type: string; + }; + description: string; + }; + replyUrl: { + type: string; + description: string; + }; + from: { + type: string; + description: string; + }; + to: { + type: string; + description: string; + }; + metaData: { + type: string; + items: { + $ref: string; + }; + description: string; + }; + credentials: { + type: string; + items: { + $ref: string; + }; + description: string; + }; + presentations: { + type: string; + items: { + $ref: string; + }; + description: string; + }; + }; + required: string[]; + additionalProperties: boolean; + description: string; + }; + VerifiableCredential: { + type: string; + properties: { + "@context": { + type: string; + items: { + type: string; + }; + }; + id: { + type: string; + }; + type: { + type: string; + items: { + type: string; + }; + }; + issuer: { + type: string; + properties: { + id: { + type: string; + }; + }; + required: string[]; + }; + issuanceDate: { + type: string; + }; + expirationDate: { + type: string; + }; + credentialSubject: { + type: string; + properties: { + id: { + type: string; + }; + }; + }; + credentialStatus: { + type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; + }; + }; + required: string[]; + description: string; + }; + VerifiablePresentation: { + type: string; + properties: { + id: { + type: string; + }; + holder: { + type: string; + }; + issuanceDate: { + type: string; + }; + expirationDate: { + type: string; + }; + "@context": { + type: string; + items: { + type: string; + }; + }; + type: { + type: string; + items: { + type: string; + }; + }; + verifier: { + type: string; + items: { + type: string; + }; + }; + verifiableCredential: { + type: string; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; + }; + }; + required: string[]; + description: string; + }; + }; + methods: { + handleMessage: { + description: string; + arguments: { + $ref: string; + }; + returnType: { + $ref: string; + }; + }; + }; + }; + }; } diff --git a/packages/daf-rest/api/daf-rest.api.json b/packages/daf-rest/api/daf-rest.api.json index 3325c99d0..b322cd6b6 100644 --- a/packages/daf-rest/api/daf-rest.api.json +++ b/packages/daf-rest/api/daf-rest.api.json @@ -111,6 +111,33 @@ "endIndex": 2 }, "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "daf-rest!AgentRestClient#schema:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly schema: " + }, + { + "kind": "Reference", + "text": "IAgentPluginSchema", + "canonicalReference": "daf-core!IAgentPluginSchema:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "schema", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false } ], "implementsTokenRanges": [ diff --git a/packages/daf-rest/api/daf-rest.api.md b/packages/daf-rest/api/daf-rest.api.md index 257334fef..8fa1b504e 100644 --- a/packages/daf-rest/api/daf-rest.api.md +++ b/packages/daf-rest/api/daf-rest.api.md @@ -5,6 +5,7 @@ ```ts import { IAgentPlugin } from 'daf-core'; +import { IAgentPluginSchema } from 'daf-core'; import { IPluginMethodMap } from 'daf-core'; import { OpenAPIV3 } from 'openapi-types'; @@ -18,6 +19,8 @@ export class AgentRestClient implements IAgentPlugin { }); // (undocumented) readonly methods: IPluginMethodMap; + // (undocumented) + readonly schema: IAgentPluginSchema; } // @public (undocumented) diff --git a/packages/daf-selective-disclosure/api/daf-selective-disclosure.api.json b/packages/daf-selective-disclosure/api/daf-selective-disclosure.api.json index 656a3d40a..311a39a2d 100644 --- a/packages/daf-selective-disclosure/api/daf-selective-disclosure.api.json +++ b/packages/daf-selective-disclosure/api/daf-selective-disclosure.api.json @@ -287,7 +287,7 @@ { "kind": "Reference", "text": "VerifiableCredential", - "canonicalReference": "daf-core!VerifiableCredential:type" + "canonicalReference": "daf-core!VerifiableCredential:interface" }, { "kind": "Content", @@ -1017,7 +1017,7 @@ { "kind": "Reference", "text": "VerifiablePresentation", - "canonicalReference": "daf-core!VerifiablePresentation:type" + "canonicalReference": "daf-core!VerifiablePresentation:interface" }, { "kind": "Content", @@ -1448,7 +1448,7 @@ }, { "kind": "Content", - "text": "{\n components: {\n schemas: {\n ICreateSelectiveDisclosureRequestArgs: {\n type: string;\n properties: {\n data: {\n $ref: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n ISelectiveDisclosureRequest: {\n type: string;\n properties: {\n issuer: {\n type: string;\n description: string;\n };\n subject: {\n type: string;\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n tag: {\n type: string;\n };\n claims: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n type: string;\n }; /**\n * Creates a Selective disclosure request, encoded as a JWT.\n *\n * @remarks See {@link https://github.com/uport-project/specs/blob/develop/flows/selectivedisclosure.md | Selective Disclosure}\n *\n * @param args - The param object with the properties necessary to create the request. See {@link ISelectiveDisclosureRequest}\n * @param context - *RESERVED* This is filled by the framework when the method is called.\n *\n * @beta\n */\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n ICredentialRequestInput: {\n type: string;\n properties: {\n reason: {\n type: string;\n description: string;\n };\n essential: {\n type: string;\n description: string;\n };\n credentialType: {\n type: string;\n description: string;\n };\n credentialContext: {\n type: string;\n description: string;\n };\n claimType: {\n type: string;\n description: string;\n };\n claimValue: {\n type: string;\n description: string;\n };\n issuers: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n Issuer: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n url: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IGetVerifiableCredentialsForSdrArgs: {\n type: string;\n properties: {\n sdr: {\n type: string;\n properties: {\n subject: {\n type: string;\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n tag: {\n type: string;\n };\n claims: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n type: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n did: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n ICredentialsForSdr: {\n type: string;\n properties: {\n reason: {\n type: string;\n description: string;\n };\n essential: {\n type: string;\n description: string;\n };\n credentialType: {\n type: string;\n description: string;\n };\n credentialContext: {\n type: string;\n description: string;\n };\n claimType: {\n type: string;\n description: string;\n };\n claimValue: {\n type: string;\n description: string;\n };\n issuers: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiableCredential: {\n $ref: string;\n description: string;\n };\n \"Verifiable-W3CCredential\": {\n type: string;\n additionalProperties: boolean;\n properties: {\n proof: {\n $ref: string;\n };\n id: {\n type: string;\n };\n credentialSubject: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n };\n credentialStatus: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n type: {\n type: string;\n };\n };\n required: string[];\n };\n \"@context\": {\n type: string;\n properties: {};\n };\n type: {\n type: string;\n properties: {};\n };\n issuer: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n required: string[];\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n };\n required: string[];\n description: string;\n };\n Proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n IValidatePresentationAgainstSdrArgs: {\n type: string;\n properties: {\n presentation: {\n $ref: string;\n };\n sdr: {\n $ref: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiablePresentation: {\n $ref: string;\n description: string;\n };\n \"Verifiable-W3CPresentation\": {\n type: string;\n additionalProperties: boolean;\n properties: {\n proof: {\n $ref: string;\n };\n id: {\n type: string;\n };\n holder: {\n type: string;\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n \"@context\": {\n type: string;\n properties: {};\n };\n type: {\n type: string;\n properties: {};\n };\n verifier: {\n type: string;\n properties: {};\n };\n verifiableCredential: {\n type: string;\n properties: {};\n };\n };\n required: string[];\n description: string;\n };\n IPresentationValidationResult: {\n type: string;\n properties: {\n valid: {\n type: string;\n };\n claims: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n };\n methods: {\n createSelectiveDisclosureRequest: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n getVerifiableCredentialsForSdr: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n validatePresentationAgainstSdr: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n };\n };\n }" + "text": "{\n components: {\n schemas: {\n ICreateSelectiveDisclosureRequestArgs: {\n type: string;\n properties: {\n data: {\n $ref: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n ISelectiveDisclosureRequest: {\n type: string;\n properties: {\n issuer: {\n type: string;\n description: string;\n };\n subject: {\n type: string;\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n tag: {\n type: string;\n };\n claims: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n type: string;\n }; /**\n * Creates a Selective disclosure request, encoded as a JWT.\n *\n * @remarks See {@link https://github.com/uport-project/specs/blob/develop/flows/selectivedisclosure.md | Selective Disclosure}\n *\n * @param args - The param object with the properties necessary to create the request. See {@link ISelectiveDisclosureRequest}\n * @param context - *RESERVED* This is filled by the framework when the method is called.\n *\n * @beta\n */\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n ICredentialRequestInput: {\n type: string;\n properties: {\n reason: {\n type: string;\n description: string;\n };\n essential: {\n type: string;\n description: string;\n };\n credentialType: {\n type: string;\n description: string;\n };\n credentialContext: {\n type: string;\n description: string;\n };\n claimType: {\n type: string;\n description: string;\n };\n claimValue: {\n type: string;\n description: string;\n };\n issuers: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n Issuer: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n url: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IGetVerifiableCredentialsForSdrArgs: {\n type: string;\n properties: {\n sdr: {\n type: string;\n properties: {\n subject: {\n type: string;\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n tag: {\n type: string;\n };\n claims: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n type: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n did: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n ICredentialsForSdr: {\n type: string;\n properties: {\n reason: {\n type: string;\n description: string;\n };\n essential: {\n type: string;\n description: string;\n };\n credentialType: {\n type: string;\n description: string;\n };\n credentialContext: {\n type: string;\n description: string;\n };\n claimType: {\n type: string;\n description: string;\n };\n claimValue: {\n type: string;\n description: string;\n };\n issuers: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiableCredential: {\n type: string;\n properties: {\n \"@context\": {\n type: string;\n items: {\n type: string;\n };\n };\n id: {\n type: string;\n };\n type: {\n type: string;\n items: {\n type: string;\n };\n };\n issuer: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n required: string[];\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n credentialSubject: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n };\n credentialStatus: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n type: {\n type: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n };\n required: string[];\n description: string;\n };\n IValidatePresentationAgainstSdrArgs: {\n type: string;\n properties: {\n presentation: {\n $ref: string;\n };\n sdr: {\n $ref: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiablePresentation: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n holder: {\n type: string;\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n \"@context\": {\n type: string;\n items: {\n type: string;\n };\n };\n type: {\n type: string;\n items: {\n type: string;\n };\n };\n verifier: {\n type: string;\n items: {\n type: string;\n };\n };\n verifiableCredential: {\n type: string;\n items: {\n $ref: string;\n };\n };\n proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n };\n required: string[];\n description: string;\n };\n IPresentationValidationResult: {\n type: string;\n properties: {\n valid: {\n type: string;\n };\n claims: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n };\n methods: {\n createSelectiveDisclosureRequest: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n getVerifiableCredentialsForSdr: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n validatePresentationAgainstSdr: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n };\n };\n }" }, { "kind": "Content", diff --git a/packages/daf-selective-disclosure/api/daf-selective-disclosure.api.md b/packages/daf-selective-disclosure/api/daf-selective-disclosure.api.md index 651613f8f..e29573c8a 100644 --- a/packages/daf-selective-disclosure/api/daf-selective-disclosure.api.md +++ b/packages/daf-selective-disclosure/api/daf-selective-disclosure.api.md @@ -313,74 +313,71 @@ export class SelectiveDisclosure implements IAgentPlugin { description: string; }; VerifiableCredential: { - $ref: string; - description: string; - }; - "Verifiable-W3CCredential": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; + "@context": { + type: string; + items: { + type: string; + }; }; id: { type: string; }; - credentialSubject: { + type: { type: string; - properties: { - id: { - type: string; - }; + items: { + type: string; }; }; - credentialStatus: { + issuer: { type: string; properties: { id: { type: string; }; - type: { - type: string; - }; }; required: string[]; }; - "@context": { + issuanceDate: { type: string; - properties: {}; }; - type: { + expirationDate: { type: string; - properties: {}; }; - issuer: { + credentialSubject: { type: string; properties: { id: { type: string; }; }; - required: string[]; }; - issuanceDate: { + credentialStatus: { type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; }; - expirationDate: { + proof: { type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; description: string; }; - Proof: { - type: string; - properties: { - type: { - type: string; - }; - }; - }; IValidatePresentationAgainstSdrArgs: { type: string; properties: { @@ -396,16 +393,8 @@ export class SelectiveDisclosure implements IAgentPlugin { description: string; }; VerifiablePresentation: { - $ref: string; - description: string; - }; - "Verifiable-W3CPresentation": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; - }; id: { type: string; }; @@ -420,19 +409,35 @@ export class SelectiveDisclosure implements IAgentPlugin { }; "@context": { type: string; - properties: {}; + items: { + type: string; + }; }; type: { type: string; - properties: {}; + items: { + type: string; + }; }; verifier: { type: string; - properties: {}; + items: { + type: string; + }; }; verifiableCredential: { type: string; - properties: {}; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; diff --git a/packages/daf-selective-disclosure/src/message-handler.ts b/packages/daf-selective-disclosure/src/message-handler.ts index e75a887b0..2e6e9b0b0 100644 --- a/packages/daf-selective-disclosure/src/message-handler.ts +++ b/packages/daf-selective-disclosure/src/message-handler.ts @@ -37,12 +37,18 @@ export class SdrMessageHandler extends AbstractMessageHandler { message.type = MessageTypes.sdr message.from = message.data.iss - message.replyTo = Array.isArray(message.data.replyTo) + if (message.data.replyTo) { + + message.replyTo = Array.isArray(message.data.replyTo) ? message.data.replyTo : message.data.replyTo ? [message.data.replyTo] : undefined - message.replyUrl = message.data.replyUrl + } + + if (message.data.replyUrl) { + message.replyUrl = message.data.replyUrl + } if (message.data.subject) { message.to = message.data.subject diff --git a/packages/daf-selective-disclosure/src/schemas/ISelectiveDisclosure.ts b/packages/daf-selective-disclosure/src/schemas/ISelectiveDisclosure.ts index a88b0c01a..f637f1b60 100644 --- a/packages/daf-selective-disclosure/src/schemas/ISelectiveDisclosure.ts +++ b/packages/daf-selective-disclosure/src/schemas/ISelectiveDisclosure.ts @@ -212,19 +212,40 @@ export default { "description": "The credentials that make up a response of a Selective Disclosure" }, "VerifiableCredential": { - "$ref": "#/components/schemas/Verifiable-W3CCredential", - "description": "Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}" - }, - "Verifiable-W3CCredential": { "type": "object", - "additionalProperties": false, "properties": { - "proof": { - "$ref": "#/components/schemas/Proof" + "@context": { + "type": "array", + "items": { + "type": "string" + } }, "id": { "type": "string" }, + "type": { + "type": "array", + "items": { + "type": "string" + } + }, + "issuer": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, "credentialSubject": { "type": "object", "properties": { @@ -246,51 +267,27 @@ export default { "required": [ "id", "type" - ] - }, - "@context": { - "type": "object", - "properties": {} - }, - "type": { - "type": "object", - "properties": {} + ], + "additionalProperties": false }, - "issuer": { + "proof": { "type": "object", "properties": { - "id": { + "type": { "type": "string" } - }, - "required": [ - "id" - ] - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" + } } }, "required": [ "@context", - "credentialSubject", - "issuanceDate", + "type", "issuer", - "proof", - "type" + "issuanceDate", + "credentialSubject", + "proof" ], - "description": "Represents a readonly representation of a verifiable object, including the {@link Proof} property that can be used to verify it." - }, - "Proof": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - } + "description": "Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}" }, "IValidatePresentationAgainstSdrArgs": { "type": "object", @@ -310,16 +307,8 @@ export default { "description": "A tuple used to verify a Selective Disclosure Response. Encapsulates the response(`presentation`) and the corresponding request (`sdr`) that made it." }, "VerifiablePresentation": { - "$ref": "#/components/schemas/Verifiable-W3CPresentation", - "description": "Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}" - }, - "Verifiable-W3CPresentation": { "type": "object", - "additionalProperties": false, "properties": { - "proof": { - "$ref": "#/components/schemas/Proof" - }, "id": { "type": "string" }, @@ -333,31 +322,47 @@ export default { "type": "string" }, "@context": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "type": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "verifier": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "verifiableCredential": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VerifiableCredential" + } + }, + "proof": { "type": "object", - "properties": {} + "properties": { + "type": { + "type": "string" + } + } } }, "required": [ - "@context", "holder", - "proof", + "@context", "type", + "verifier", "verifiableCredential", - "verifier" + "proof" ], - "description": "Represents a readonly representation of a verifiable object, including the {@link Proof} property that can be used to verify it." + "description": "Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}" }, "IPresentationValidationResult": { "type": "object", diff --git a/packages/daf-typeorm/api/daf-typeorm.api.json b/packages/daf-typeorm/api/daf-typeorm.api.json index 058c04bf5..589caed1f 100644 --- a/packages/daf-typeorm/api/daf-typeorm.api.json +++ b/packages/daf-typeorm/api/daf-typeorm.api.json @@ -621,7 +621,7 @@ { "kind": "Reference", "text": "VerifiableCredential", - "canonicalReference": "daf-core!VerifiableCredential:type" + "canonicalReference": "daf-core!VerifiableCredential:interface" }, { "kind": "Content", @@ -634,7 +634,7 @@ { "kind": "Reference", "text": "VerifiableCredential", - "canonicalReference": "daf-core!VerifiableCredential:type" + "canonicalReference": "daf-core!VerifiableCredential:interface" }, { "kind": "Content", @@ -864,7 +864,7 @@ { "kind": "Reference", "text": "VerifiableCredential", - "canonicalReference": "daf-core!VerifiableCredential:type" + "canonicalReference": "daf-core!VerifiableCredential:interface" }, { "kind": "Content", @@ -923,7 +923,7 @@ { "kind": "Reference", "text": "VerifiablePresentation", - "canonicalReference": "daf-core!VerifiablePresentation:type" + "canonicalReference": "daf-core!VerifiablePresentation:interface" }, { "kind": "Content", @@ -1140,7 +1140,7 @@ }, { "kind": "Content", - "text": "{\n components: {\n schemas: {\n IDataStoreGetMessageArgs: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMessage: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n createdAt: {\n type: string;\n description: string;\n };\n expiresAt: {\n type: string;\n description: string;\n };\n threadId: {\n type: string;\n description: string;\n };\n raw: {\n type: string;\n description: string;\n };\n data: {\n anyOf: {\n type: string;\n }[];\n description: string;\n };\n replyTo: {\n type: string;\n items: {\n type: string;\n };\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n from: {\n type: string;\n description: string;\n };\n to: {\n type: string;\n description: string;\n };\n metaData: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n presentations: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMetaData: {\n type: string;\n properties: {\n type: {\n type: string;\n description: string;\n };\n value: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiableCredential: {\n $ref: string;\n description: string;\n };\n \"Verifiable-W3CCredential\": {\n type: string;\n additionalProperties: boolean;\n properties: {\n proof: {\n $ref: string;\n };\n id: {\n type: string;\n };\n credentialSubject: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n };\n credentialStatus: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n type: {\n type: string;\n };\n };\n required: string[];\n };\n \"@context\": {\n type: string;\n properties: {};\n };\n type: {\n type: string;\n properties: {};\n };\n issuer: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n required: string[];\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n };\n required: string[];\n description: string;\n };\n Proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n VerifiablePresentation: {\n $ref: string;\n description: string;\n };\n \"Verifiable-W3CPresentation\": {\n type: string;\n additionalProperties: boolean;\n properties: {\n proof: {\n $ref: string;\n };\n id: {\n type: string;\n };\n holder: {\n type: string;\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n \"@context\": {\n type: string;\n properties: {};\n };\n type: {\n type: string;\n properties: {};\n };\n verifier: {\n type: string;\n properties: {};\n };\n verifiableCredential: {\n type: string;\n properties: {};\n };\n };\n required: string[];\n description: string;\n };\n IDataStoreGetVerifiableCredentialArgs: {\n type: string;\n properties: {\n hash: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IDataStoreGetVerifiablePresentationArgs: {\n type: string;\n properties: {\n hash: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IDataStoreSaveMessageArgs: {\n type: string;\n properties: {\n message: {\n $ref: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IDataStoreSaveVerifiableCredentialArgs: {\n type: string;\n properties: {\n verifiableCredential: {\n $ref: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IDataStoreSaveVerifiablePresentationArgs: {\n type: string;\n properties: {\n verifiablePresentation: {\n $ref: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n };\n methods: {\n dataStoreGetMessage: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n dataStoreGetVerifiableCredential: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n dataStoreGetVerifiablePresentation: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n dataStoreSaveMessage: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreSaveVerifiableCredential: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreSaveVerifiablePresentation: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n };\n };\n }" + "text": "{\n components: {\n schemas: {\n IDataStoreGetMessageArgs: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMessage: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n createdAt: {\n type: string;\n description: string;\n };\n expiresAt: {\n type: string;\n description: string;\n };\n threadId: {\n type: string;\n description: string;\n };\n raw: {\n type: string;\n description: string;\n };\n data: {\n anyOf: {\n type: string;\n }[];\n description: string;\n };\n replyTo: {\n type: string;\n items: {\n type: string;\n };\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n from: {\n type: string;\n description: string;\n };\n to: {\n type: string;\n description: string;\n };\n metaData: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n presentations: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMetaData: {\n type: string;\n properties: {\n type: {\n type: string;\n description: string;\n };\n value: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiableCredential: {\n type: string;\n properties: {\n \"@context\": {\n type: string;\n items: {\n type: string;\n };\n };\n id: {\n type: string;\n };\n type: {\n type: string;\n items: {\n type: string;\n };\n };\n issuer: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n required: string[];\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n credentialSubject: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n };\n credentialStatus: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n type: {\n type: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n };\n required: string[];\n description: string;\n };\n VerifiablePresentation: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n holder: {\n type: string;\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n \"@context\": {\n type: string;\n items: {\n type: string;\n };\n };\n type: {\n type: string;\n items: {\n type: string;\n };\n };\n verifier: {\n type: string;\n items: {\n type: string;\n };\n };\n verifiableCredential: {\n type: string;\n items: {\n $ref: string;\n };\n };\n proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n };\n required: string[];\n description: string;\n };\n IDataStoreGetVerifiableCredentialArgs: {\n type: string;\n properties: {\n hash: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IDataStoreGetVerifiablePresentationArgs: {\n type: string;\n properties: {\n hash: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IDataStoreSaveMessageArgs: {\n type: string;\n properties: {\n message: {\n $ref: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IDataStoreSaveVerifiableCredentialArgs: {\n type: string;\n properties: {\n verifiableCredential: {\n $ref: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IDataStoreSaveVerifiablePresentationArgs: {\n type: string;\n properties: {\n verifiablePresentation: {\n $ref: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n };\n methods: {\n dataStoreGetMessage: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n dataStoreGetVerifiableCredential: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n dataStoreGetVerifiablePresentation: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n $ref: string;\n };\n };\n dataStoreSaveMessage: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreSaveVerifiableCredential: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreSaveVerifiablePresentation: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n };\n };\n }" }, { "kind": "Content", @@ -2129,7 +2129,7 @@ }, { "kind": "Content", - "text": "{\n components: {\n schemas: {\n FindIdentitiesArgs: {\n $ref: string;\n };\n \"FindArgs-TIdentitiesColumns\": {\n type: string;\n properties: {\n where: {\n type: string;\n items: {\n $ref: string;\n };\n };\n order: {\n type: string;\n items: {\n $ref: string;\n };\n };\n take: {\n type: string;\n };\n skip: {\n type: string;\n };\n };\n additionalProperties: boolean;\n };\n \"Where-TIdentitiesColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n value: {\n type: string;\n items: {\n type: string;\n };\n };\n not: {\n type: string;\n };\n op: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n TIdentitiesColumns: {\n type: string;\n enum: string[];\n };\n \"Order-TIdentitiesColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n direction: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n IIdentity: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n controllerKeyId: {\n type: string;\n description: string;\n };\n keys: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n services: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKey: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n type: {\n $ref: string;\n description: string;\n };\n publicKeyHex: {\n type: string;\n description: string;\n };\n privateKeyHex: {\n type: string;\n description: string;\n };\n meta: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n TKeyType: {\n type: string;\n enum: string[];\n description: string;\n };\n IService: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n serviceEndpoint: {\n type: string;\n description: string;\n };\n description: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n FindMessagesArgs: {\n $ref: string;\n };\n \"FindArgs-TMessageColumns\": {\n type: string;\n properties: {\n where: {\n type: string;\n items: {\n $ref: string;\n };\n };\n order: {\n type: string;\n items: {\n $ref: string;\n };\n };\n take: {\n type: string;\n };\n skip: {\n type: string;\n };\n };\n additionalProperties: boolean;\n };\n \"Where-TMessageColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n value: {\n type: string;\n items: {\n type: string;\n };\n };\n not: {\n type: string;\n };\n op: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n TMessageColumns: {\n type: string;\n enum: string[];\n };\n \"Order-TMessageColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n direction: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n IMessage: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n createdAt: {\n type: string;\n description: string;\n };\n expiresAt: {\n type: string;\n description: string;\n };\n threadId: {\n type: string;\n description: string;\n };\n raw: {\n type: string;\n description: string;\n };\n data: {\n anyOf: {\n type: string;\n }[];\n description: string;\n };\n replyTo: {\n type: string;\n items: {\n type: string;\n };\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n from: {\n type: string;\n description: string;\n };\n to: {\n type: string;\n description: string;\n };\n metaData: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n presentations: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMetaData: {\n type: string;\n properties: {\n type: {\n type: string;\n description: string;\n };\n value: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiableCredential: {\n $ref: string;\n description: string;\n };\n \"Verifiable-W3CCredential\": {\n type: string;\n additionalProperties: boolean;\n properties: {\n proof: {\n $ref: string;\n };\n id: {\n type: string;\n };\n credentialSubject: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n };\n credentialStatus: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n type: {\n type: string;\n };\n };\n required: string[];\n };\n \"@context\": {\n type: string;\n properties: {};\n };\n type: {\n type: string;\n properties: {};\n };\n issuer: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n required: string[];\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n };\n required: string[];\n description: string;\n };\n Proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n VerifiablePresentation: {\n $ref: string;\n description: string;\n };\n \"Verifiable-W3CPresentation\": {\n type: string;\n additionalProperties: boolean;\n properties: {\n proof: {\n $ref: string;\n };\n id: {\n type: string;\n };\n holder: {\n type: string;\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n \"@context\": {\n type: string;\n properties: {};\n };\n type: {\n type: string;\n properties: {};\n };\n verifier: {\n type: string;\n properties: {};\n };\n verifiableCredential: {\n type: string;\n properties: {};\n };\n };\n required: string[];\n description: string;\n };\n FindCredentialsArgs: {\n $ref: string;\n };\n \"FindArgs-TCredentialColumns\": {\n type: string;\n properties: {\n where: {\n type: string;\n items: {\n $ref: string;\n };\n };\n order: {\n type: string;\n items: {\n $ref: string;\n };\n };\n take: {\n type: string;\n };\n skip: {\n type: string;\n };\n };\n additionalProperties: boolean;\n };\n \"Where-TCredentialColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n value: {\n type: string;\n items: {\n type: string;\n };\n };\n not: {\n type: string;\n };\n op: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n TCredentialColumns: {\n type: string;\n enum: string[];\n };\n \"Order-TCredentialColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n direction: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n UniqueVerifiableCredential: {\n type: string;\n properties: {\n hash: {\n type: string;\n };\n verifiableCredential: {\n $ref: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n FindClaimsArgs: {\n $ref: string;\n };\n \"FindArgs-TClaimsColumns\": {\n type: string;\n properties: {\n where: {\n type: string;\n items: {\n $ref: string;\n };\n };\n order: {\n type: string;\n items: {\n $ref: string;\n };\n };\n take: {\n type: string;\n };\n skip: {\n type: string;\n };\n };\n additionalProperties: boolean;\n };\n \"Where-TClaimsColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n value: {\n type: string;\n items: {\n type: string;\n };\n };\n not: {\n type: string;\n };\n op: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n TClaimsColumns: {\n type: string;\n enum: string[];\n };\n \"Order-TClaimsColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n direction: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n FindPresentationsArgs: {\n $ref: string;\n };\n \"FindArgs-TPresentationColumns\": {\n type: string;\n properties: {\n where: {\n type: string;\n items: {\n $ref: string;\n };\n };\n order: {\n type: string;\n items: {\n $ref: string;\n };\n };\n take: {\n type: string;\n };\n skip: {\n type: string;\n };\n };\n additionalProperties: boolean;\n };\n \"Where-TPresentationColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n value: {\n type: string;\n items: {\n type: string;\n };\n };\n not: {\n type: string;\n };\n op: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n TPresentationColumns: {\n type: string;\n enum: string[];\n };\n \"Order-TPresentationColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n direction: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n UniqueVerifiablePresentation: {\n type: string;\n properties: {\n hash: {\n type: string;\n };\n verifiablePresentation: {\n $ref: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n };\n methods: {\n dataStoreORMGetIdentities: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n dataStoreORMGetIdentitiesCount: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreORMGetMessages: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n dataStoreORMGetMessagesCount: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreORMGetVerifiableCredentials: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n dataStoreORMGetVerifiableCredentialsByClaims: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n dataStoreORMGetVerifiableCredentialsByClaimsCount: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreORMGetVerifiableCredentialsCount: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreORMGetVerifiablePresentations: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n dataStoreORMGetVerifiablePresentationsCount: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n };\n };\n }" + "text": "{\n components: {\n schemas: {\n FindIdentitiesArgs: {\n $ref: string;\n };\n \"FindArgs-TIdentitiesColumns\": {\n type: string;\n properties: {\n where: {\n type: string;\n items: {\n $ref: string;\n };\n };\n order: {\n type: string;\n items: {\n $ref: string;\n };\n };\n take: {\n type: string;\n };\n skip: {\n type: string;\n };\n };\n additionalProperties: boolean;\n };\n \"Where-TIdentitiesColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n value: {\n type: string;\n items: {\n type: string;\n };\n };\n not: {\n type: string;\n };\n op: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n TIdentitiesColumns: {\n type: string;\n enum: string[];\n };\n \"Order-TIdentitiesColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n direction: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n IIdentity: {\n type: string;\n properties: {\n did: {\n type: string;\n description: string;\n };\n alias: {\n type: string;\n description: string;\n };\n provider: {\n type: string;\n description: string;\n };\n controllerKeyId: {\n type: string;\n description: string;\n };\n keys: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n services: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IKey: {\n type: string;\n properties: {\n kid: {\n type: string;\n description: string;\n };\n kms: {\n type: string;\n description: string;\n };\n type: {\n $ref: string;\n description: string;\n };\n publicKeyHex: {\n type: string;\n description: string;\n };\n privateKeyHex: {\n type: string;\n description: string;\n };\n meta: {\n anyOf: {\n type: string;\n }[];\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n TKeyType: {\n type: string;\n enum: string[];\n description: string;\n };\n IService: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n serviceEndpoint: {\n type: string;\n description: string;\n };\n description: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n FindMessagesArgs: {\n $ref: string;\n };\n \"FindArgs-TMessageColumns\": {\n type: string;\n properties: {\n where: {\n type: string;\n items: {\n $ref: string;\n };\n };\n order: {\n type: string;\n items: {\n $ref: string;\n };\n };\n take: {\n type: string;\n };\n skip: {\n type: string;\n };\n };\n additionalProperties: boolean;\n };\n \"Where-TMessageColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n value: {\n type: string;\n items: {\n type: string;\n };\n };\n not: {\n type: string;\n };\n op: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n TMessageColumns: {\n type: string;\n enum: string[];\n };\n \"Order-TMessageColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n direction: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n IMessage: {\n type: string;\n properties: {\n id: {\n type: string;\n description: string;\n };\n type: {\n type: string;\n description: string;\n };\n createdAt: {\n type: string;\n description: string;\n };\n expiresAt: {\n type: string;\n description: string;\n };\n threadId: {\n type: string;\n description: string;\n };\n raw: {\n type: string;\n description: string;\n };\n data: {\n anyOf: {\n type: string;\n }[];\n description: string;\n };\n replyTo: {\n type: string;\n items: {\n type: string;\n };\n description: string;\n };\n replyUrl: {\n type: string;\n description: string;\n };\n from: {\n type: string;\n description: string;\n };\n to: {\n type: string;\n description: string;\n };\n metaData: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n credentials: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n presentations: {\n type: string;\n items: {\n $ref: string;\n };\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n IMetaData: {\n type: string;\n properties: {\n type: {\n type: string;\n description: string;\n };\n value: {\n type: string;\n description: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n description: string;\n };\n VerifiableCredential: {\n type: string;\n properties: {\n \"@context\": {\n type: string;\n items: {\n type: string;\n };\n };\n id: {\n type: string;\n };\n type: {\n type: string;\n items: {\n type: string;\n };\n };\n issuer: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n required: string[];\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n credentialSubject: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n };\n };\n credentialStatus: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n type: {\n type: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n };\n required: string[];\n description: string;\n };\n VerifiablePresentation: {\n type: string;\n properties: {\n id: {\n type: string;\n };\n holder: {\n type: string;\n };\n issuanceDate: {\n type: string;\n };\n expirationDate: {\n type: string;\n };\n \"@context\": {\n type: string;\n items: {\n type: string;\n };\n };\n type: {\n type: string;\n items: {\n type: string;\n };\n };\n verifier: {\n type: string;\n items: {\n type: string;\n };\n };\n verifiableCredential: {\n type: string;\n items: {\n $ref: string;\n };\n };\n proof: {\n type: string;\n properties: {\n type: {\n type: string;\n };\n };\n };\n };\n required: string[];\n description: string;\n };\n FindCredentialsArgs: {\n $ref: string;\n };\n \"FindArgs-TCredentialColumns\": {\n type: string;\n properties: {\n where: {\n type: string;\n items: {\n $ref: string;\n };\n };\n order: {\n type: string;\n items: {\n $ref: string;\n };\n };\n take: {\n type: string;\n };\n skip: {\n type: string;\n };\n };\n additionalProperties: boolean;\n };\n \"Where-TCredentialColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n value: {\n type: string;\n items: {\n type: string;\n };\n };\n not: {\n type: string;\n };\n op: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n TCredentialColumns: {\n type: string;\n enum: string[];\n };\n \"Order-TCredentialColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n direction: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n UniqueVerifiableCredential: {\n type: string;\n properties: {\n hash: {\n type: string;\n };\n verifiableCredential: {\n $ref: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n FindClaimsArgs: {\n $ref: string;\n };\n \"FindArgs-TClaimsColumns\": {\n type: string;\n properties: {\n where: {\n type: string;\n items: {\n $ref: string;\n };\n };\n order: {\n type: string;\n items: {\n $ref: string;\n };\n };\n take: {\n type: string;\n };\n skip: {\n type: string;\n };\n };\n additionalProperties: boolean;\n };\n \"Where-TClaimsColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n value: {\n type: string;\n items: {\n type: string;\n };\n };\n not: {\n type: string;\n };\n op: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n TClaimsColumns: {\n type: string;\n enum: string[];\n };\n \"Order-TClaimsColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n direction: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n FindPresentationsArgs: {\n $ref: string;\n };\n \"FindArgs-TPresentationColumns\": {\n type: string;\n properties: {\n where: {\n type: string;\n items: {\n $ref: string;\n };\n };\n order: {\n type: string;\n items: {\n $ref: string;\n };\n };\n take: {\n type: string;\n };\n skip: {\n type: string;\n };\n };\n additionalProperties: boolean;\n };\n \"Where-TPresentationColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n value: {\n type: string;\n items: {\n type: string;\n };\n };\n not: {\n type: string;\n };\n op: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n TPresentationColumns: {\n type: string;\n enum: string[];\n };\n \"Order-TPresentationColumns\": {\n type: string;\n properties: {\n column: {\n $ref: string;\n };\n direction: {\n type: string;\n enum: string[];\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n UniqueVerifiablePresentation: {\n type: string;\n properties: {\n hash: {\n type: string;\n };\n verifiablePresentation: {\n $ref: string;\n };\n };\n required: string[];\n additionalProperties: boolean;\n };\n };\n methods: {\n dataStoreORMGetIdentities: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n dataStoreORMGetIdentitiesCount: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreORMGetMessages: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n dataStoreORMGetMessagesCount: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreORMGetVerifiableCredentials: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n dataStoreORMGetVerifiableCredentialsByClaims: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n dataStoreORMGetVerifiableCredentialsByClaimsCount: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreORMGetVerifiableCredentialsCount: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n dataStoreORMGetVerifiablePresentations: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n items: {\n $ref: string;\n };\n };\n };\n dataStoreORMGetVerifiablePresentationsCount: {\n description: string;\n arguments: {\n $ref: string;\n };\n returnType: {\n type: string;\n };\n };\n };\n };\n }" }, { "kind": "Content", @@ -2167,8 +2167,8 @@ }, { "kind": "Reference", - "text": "Identity", - "canonicalReference": "daf-typeorm!Identity:class" + "text": "Credential", + "canonicalReference": "daf-typeorm!Credential:class" }, { "kind": "Content", @@ -2176,8 +2176,8 @@ }, { "kind": "Reference", - "text": "Message", - "canonicalReference": "daf-typeorm!Message:class" + "text": "Identity", + "canonicalReference": "daf-typeorm!Identity:class" }, { "kind": "Content", @@ -2194,8 +2194,8 @@ }, { "kind": "Reference", - "text": "Credential", - "canonicalReference": "daf-typeorm!Credential:class" + "text": "Presentation", + "canonicalReference": "daf-typeorm!Presentation:class" }, { "kind": "Content", @@ -2203,8 +2203,8 @@ }, { "kind": "Reference", - "text": "Presentation", - "canonicalReference": "daf-typeorm!Presentation:class" + "text": "Message", + "canonicalReference": "daf-typeorm!Message:class" }, { "kind": "Content", @@ -4341,14 +4341,9 @@ "kind": "Content", "text": "meta?: " }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, { "kind": "Content", - "text": "" + "text": "object | null" }, { "kind": "Content", @@ -4359,7 +4354,7 @@ "name": "meta", "propertyTypeTokenRange": { "startIndex": 1, - "endIndex": 3 + "endIndex": 2 }, "isStatic": false }, @@ -5640,7 +5635,7 @@ { "kind": "Reference", "text": "VerifiablePresentation", - "canonicalReference": "daf-core!VerifiablePresentation:type" + "canonicalReference": "daf-core!VerifiablePresentation:interface" }, { "kind": "Content", @@ -5653,7 +5648,7 @@ { "kind": "Reference", "text": "VerifiablePresentation", - "canonicalReference": "daf-core!VerifiablePresentation:type" + "canonicalReference": "daf-core!VerifiablePresentation:interface" }, { "kind": "Content", @@ -6067,7 +6062,7 @@ { "kind": "Reference", "text": "VerifiableCredential", - "canonicalReference": "daf-core!VerifiableCredential:type" + "canonicalReference": "daf-core!VerifiableCredential:interface" }, { "kind": "Content", @@ -6134,7 +6129,7 @@ { "kind": "Reference", "text": "VerifiablePresentation", - "canonicalReference": "daf-core!VerifiablePresentation:type" + "canonicalReference": "daf-core!VerifiablePresentation:interface" }, { "kind": "Content", diff --git a/packages/daf-typeorm/api/daf-typeorm.api.md b/packages/daf-typeorm/api/daf-typeorm.api.md index 6e9392492..9697adbd3 100644 --- a/packages/daf-typeorm/api/daf-typeorm.api.md +++ b/packages/daf-typeorm/api/daf-typeorm.api.md @@ -209,85 +209,74 @@ export class DataStore implements IAgentPlugin { description: string; }; VerifiableCredential: { - $ref: string; - description: string; - }; - "Verifiable-W3CCredential": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; + "@context": { + type: string; + items: { + type: string; + }; }; id: { type: string; }; - credentialSubject: { + type: { type: string; - properties: { - id: { - type: string; - }; + items: { + type: string; }; }; - credentialStatus: { + issuer: { type: string; properties: { id: { type: string; }; - type: { - type: string; - }; }; required: string[]; }; - "@context": { + issuanceDate: { type: string; - properties: {}; }; - type: { + expirationDate: { type: string; - properties: {}; }; - issuer: { + credentialSubject: { type: string; properties: { id: { type: string; }; }; - required: string[]; }; - issuanceDate: { + credentialStatus: { type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; }; - expirationDate: { + proof: { type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; description: string; }; - Proof: { - type: string; - properties: { - type: { - type: string; - }; - }; - }; VerifiablePresentation: { - $ref: string; - description: string; - }; - "Verifiable-W3CPresentation": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; - }; id: { type: string; }; @@ -302,19 +291,35 @@ export class DataStore implements IAgentPlugin { }; "@context": { type: string; - properties: {}; + items: { + type: string; + }; }; type: { type: string; - properties: {}; + items: { + type: string; + }; }; verifier: { type: string; - properties: {}; + items: { + type: string; + }; }; verifiableCredential: { type: string; - properties: {}; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; @@ -602,7 +607,9 @@ export class DataStoreORM implements IAgentPlugin { description: string; }; meta: { - type: string; + anyOf: { + type: string; + }[]; description: string; }; }; @@ -802,85 +809,74 @@ export class DataStoreORM implements IAgentPlugin { description: string; }; VerifiableCredential: { - $ref: string; - description: string; - }; - "Verifiable-W3CCredential": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; + "@context": { + type: string; + items: { + type: string; + }; }; id: { type: string; }; - credentialSubject: { + type: { type: string; - properties: { - id: { - type: string; - }; + items: { + type: string; }; }; - credentialStatus: { + issuer: { type: string; properties: { id: { type: string; }; - type: { - type: string; - }; }; required: string[]; }; - "@context": { + issuanceDate: { type: string; - properties: {}; }; - type: { + expirationDate: { type: string; - properties: {}; }; - issuer: { + credentialSubject: { type: string; properties: { id: { type: string; }; }; - required: string[]; }; - issuanceDate: { + credentialStatus: { type: string; + properties: { + id: { + type: string; + }; + type: { + type: string; + }; + }; + required: string[]; + additionalProperties: boolean; }; - expirationDate: { + proof: { type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; description: string; }; - Proof: { - type: string; - properties: { - type: { - type: string; - }; - }; - }; VerifiablePresentation: { - $ref: string; - description: string; - }; - "Verifiable-W3CPresentation": { type: string; - additionalProperties: boolean; properties: { - proof: { - $ref: string; - }; id: { type: string; }; @@ -895,19 +891,35 @@ export class DataStoreORM implements IAgentPlugin { }; "@context": { type: string; - properties: {}; + items: { + type: string; + }; }; type: { type: string; - properties: {}; + items: { + type: string; + }; }; verifier: { type: string; - properties: {}; + items: { + type: string; + }; }; verifiableCredential: { type: string; - properties: {}; + items: { + $ref: string; + }; + }; + proof: { + type: string; + properties: { + type: { + type: string; + }; + }; }; }; required: string[]; @@ -1256,7 +1268,7 @@ export class DataStoreORM implements IAgentPlugin { } // @public (undocumented) -export const Entities: (typeof Identity | typeof Message | typeof Claim | typeof Credential_2 | typeof Presentation | typeof Key | typeof Service)[]; +export const Entities: (typeof Credential_2 | typeof Identity | typeof Claim | typeof Presentation | typeof Message | typeof Key | typeof Service)[]; // @public (undocumented) export interface FindArgs { @@ -1381,7 +1393,7 @@ export class Key extends BaseEntity { // (undocumented) kms: string; // (undocumented) - meta?: Record; + meta?: object | null; // (undocumented) privateKeyHex?: string; // (undocumented) diff --git a/packages/daf-typeorm/src/entities/key.ts b/packages/daf-typeorm/src/entities/key.ts index d488e6049..349fd7fcf 100644 --- a/packages/daf-typeorm/src/entities/key.ts +++ b/packages/daf-typeorm/src/entities/key.ts @@ -25,7 +25,7 @@ export class Key extends BaseEntity { privateKeyHex?: string @Column({ type: 'simple-json', nullable: true }) - meta?: Record + meta?: object | null @ManyToOne((type) => Identity, (identity) => identity.keys) //@ts-ignore diff --git a/packages/daf-typeorm/src/schemas/IDataStoreORM.ts b/packages/daf-typeorm/src/schemas/IDataStoreORM.ts index 5a5633d05..ea4f8d0a4 100644 --- a/packages/daf-typeorm/src/schemas/IDataStoreORM.ts +++ b/packages/daf-typeorm/src/schemas/IDataStoreORM.ts @@ -160,7 +160,14 @@ export default { "description": "Optional. Private key" }, "meta": { - "type": "object", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], "description": "Optional. Key metadata. Can be used to store auth data to access remote kms" } }, @@ -412,19 +419,40 @@ export default { "description": "Message meta data" }, "VerifiableCredential": { - "$ref": "#/components/schemas/Verifiable-W3CCredential", - "description": "Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}" - }, - "Verifiable-W3CCredential": { "type": "object", - "additionalProperties": false, "properties": { - "proof": { - "$ref": "#/components/schemas/Proof" + "@context": { + "type": "array", + "items": { + "type": "string" + } }, "id": { "type": "string" }, + "type": { + "type": "array", + "items": { + "type": "string" + } + }, + "issuer": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, "credentialSubject": { "type": "object", "properties": { @@ -446,63 +474,31 @@ export default { "required": [ "id", "type" - ] - }, - "@context": { - "type": "object", - "properties": {} - }, - "type": { - "type": "object", - "properties": {} + ], + "additionalProperties": false }, - "issuer": { + "proof": { "type": "object", "properties": { - "id": { + "type": { "type": "string" } - }, - "required": [ - "id" - ] - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" + } } }, "required": [ "@context", - "credentialSubject", - "issuanceDate", + "type", "issuer", - "proof", - "type" + "issuanceDate", + "credentialSubject", + "proof" ], - "description": "Represents a readonly representation of a verifiable object, including the {@link Proof} property that can be used to verify it." - }, - "Proof": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - } + "description": "Verifiable Credential {@link https://github.com/decentralized-identity/did-jwt-vc}" }, "VerifiablePresentation": { - "$ref": "#/components/schemas/Verifiable-W3CPresentation", - "description": "Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}" - }, - "Verifiable-W3CPresentation": { "type": "object", - "additionalProperties": false, "properties": { - "proof": { - "$ref": "#/components/schemas/Proof" - }, "id": { "type": "string" }, @@ -516,31 +512,47 @@ export default { "type": "string" }, "@context": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "type": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "verifier": { - "type": "object", - "properties": {} + "type": "array", + "items": { + "type": "string" + } }, "verifiableCredential": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VerifiableCredential" + } + }, + "proof": { "type": "object", - "properties": {} + "properties": { + "type": { + "type": "string" + } + } } }, "required": [ - "@context", "holder", - "proof", + "@context", "type", + "verifier", "verifiableCredential", - "verifier" + "proof" ], - "description": "Represents a readonly representation of a verifiable object, including the {@link Proof} property that can be used to verify it." + "description": "Verifiable Presentation {@link https://github.com/decentralized-identity/did-jwt-vc}" }, "FindCredentialsArgs": { "$ref": "#/components/schemas/FindArgs-TCredentialColumns"