@truvity/sdk 0.38.2 → 0.40.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +5 -0
- package/Client.d.ts.map +1 -1
- package/Client.js +10 -4
- package/Client.js.map +1 -1
- package/ExtendedClient.d.ts +2 -1
- package/ExtendedClient.d.ts.map +1 -1
- package/ExtendedClient.js +6 -0
- package/ExtendedClient.js.map +1 -1
- package/api/resources/apiKeys/client/Client.d.ts +2 -0
- package/api/resources/apiKeys/client/Client.d.ts.map +1 -1
- package/api/resources/apiKeys/client/Client.js +45 -27
- package/api/resources/apiKeys/client/Client.js.map +1 -1
- package/api/resources/apiKeys/client/requests/ApiKeyHistoryRequest.d.ts +1 -3
- package/api/resources/apiKeys/client/requests/ApiKeyHistoryRequest.d.ts.map +1 -1
- package/api/resources/apiKeys/client/requests/ApiKeyHistoryRequest.js.map +1 -1
- package/api/resources/apiKeys/client/requests/ApiKeyLatestRequest.d.ts +1 -3
- package/api/resources/apiKeys/client/requests/ApiKeyLatestRequest.d.ts.map +1 -1
- package/api/resources/apiKeys/client/requests/ApiKeyLatestRequest.js.map +1 -1
- package/api/resources/apiKeys/client/requests/ApiKeyRevisionRequest.d.ts +1 -3
- package/api/resources/apiKeys/client/requests/ApiKeyRevisionRequest.d.ts.map +1 -1
- package/api/resources/apiKeys/client/requests/ApiKeyRevisionRequest.js.map +1 -1
- package/api/resources/credentials/client/Client.d.ts +23 -1
- package/api/resources/credentials/client/Client.d.ts.map +1 -1
- package/api/resources/credentials/client/Client.js +178 -41
- package/api/resources/credentials/client/Client.js.map +1 -1
- package/api/resources/credentials/client/requests/CredentialDownloadRequest.d.ts +5 -3
- package/api/resources/credentials/client/requests/CredentialDownloadRequest.d.ts.map +1 -1
- package/api/resources/credentials/client/requests/CredentialDownloadRequest.js.map +1 -1
- package/api/resources/credentials/client/requests/CredentialHistoryRequest.d.ts +1 -3
- package/api/resources/credentials/client/requests/CredentialHistoryRequest.d.ts.map +1 -1
- package/api/resources/credentials/client/requests/CredentialHistoryRequest.js.map +1 -1
- package/api/resources/credentials/client/requests/CredentialImportRequest.d.ts +2 -6
- package/api/resources/credentials/client/requests/CredentialImportRequest.d.ts.map +1 -1
- package/api/resources/credentials/client/requests/CredentialImportRequest.js.map +1 -1
- package/api/resources/credentials/client/requests/CredentialLatestRequest.d.ts +1 -3
- package/api/resources/credentials/client/requests/CredentialLatestRequest.d.ts.map +1 -1
- package/api/resources/credentials/client/requests/CredentialLatestRequest.js.map +1 -1
- package/api/resources/credentials/client/requests/CredentialRevisionRequest.d.ts +1 -3
- package/api/resources/credentials/client/requests/CredentialRevisionRequest.d.ts.map +1 -1
- package/api/resources/credentials/client/requests/CredentialRevisionRequest.js.map +1 -1
- package/api/resources/credentials/client/requests/CredentialVerifyRequest.d.ts +10 -0
- package/api/resources/credentials/client/requests/CredentialVerifyRequest.d.ts.map +1 -0
- package/api/{types/DraftFieldDateTimeValue.js → resources/credentials/client/requests/CredentialVerifyRequest.js} +1 -1
- package/api/resources/credentials/client/requests/CredentialVerifyRequest.js.map +1 -0
- package/api/resources/credentials/client/requests/GetCredentialClaimValuesRequest.d.ts +10 -0
- package/api/resources/credentials/client/requests/GetCredentialClaimValuesRequest.d.ts.map +1 -0
- package/api/resources/credentials/client/requests/GetCredentialClaimValuesRequest.js +6 -0
- package/api/resources/credentials/client/requests/GetCredentialClaimValuesRequest.js.map +1 -0
- package/api/resources/credentials/client/requests/index.d.ts +2 -0
- package/api/resources/credentials/client/requests/index.d.ts.map +1 -1
- package/api/resources/credentials/client/requests/index.js.map +1 -1
- package/api/resources/desk/client/Client.d.ts +15 -7
- package/api/resources/desk/client/Client.d.ts.map +1 -1
- package/api/resources/desk/client/Client.js +58 -40
- package/api/resources/desk/client/Client.js.map +1 -1
- package/api/resources/desk/client/requests/DidCommMessageRecvRequest.d.ts +13 -0
- package/api/resources/desk/client/requests/DidCommMessageRecvRequest.d.ts.map +1 -0
- package/api/resources/desk/client/requests/DidCommMessageRecvRequest.js +6 -0
- package/api/resources/desk/client/requests/DidCommMessageRecvRequest.js.map +1 -0
- package/api/resources/desk/client/requests/PublishedJsonLdVocabFetchRequest.d.ts +10 -0
- package/api/resources/desk/client/requests/PublishedJsonLdVocabFetchRequest.d.ts.map +1 -0
- package/api/resources/desk/client/requests/PublishedJsonLdVocabFetchRequest.js +6 -0
- package/api/resources/desk/client/requests/PublishedJsonLdVocabFetchRequest.js.map +1 -0
- package/api/resources/desk/client/requests/PublishedJsonSchemaFetchRequest.d.ts +10 -0
- package/api/resources/desk/client/requests/PublishedJsonSchemaFetchRequest.d.ts.map +1 -0
- package/api/resources/desk/client/requests/PublishedJsonSchemaFetchRequest.js +6 -0
- package/api/resources/desk/client/requests/PublishedJsonSchemaFetchRequest.js.map +1 -0
- package/api/resources/desk/client/requests/PublishedMetaSchemaFetchRequest.d.ts +10 -0
- package/api/resources/desk/client/requests/PublishedMetaSchemaFetchRequest.d.ts.map +1 -0
- package/api/resources/desk/client/requests/PublishedMetaSchemaFetchRequest.js +6 -0
- package/api/resources/desk/client/requests/PublishedMetaSchemaFetchRequest.js.map +1 -0
- package/api/resources/desk/client/requests/PublishedVcdmJsonSchemaFetchRequest.d.ts +10 -0
- package/api/resources/desk/client/requests/PublishedVcdmJsonSchemaFetchRequest.d.ts.map +1 -0
- package/api/resources/desk/client/requests/PublishedVcdmJsonSchemaFetchRequest.js +6 -0
- package/api/resources/desk/client/requests/PublishedVcdmJsonSchemaFetchRequest.js.map +1 -0
- package/api/resources/desk/client/requests/index.d.ts +5 -0
- package/api/resources/desk/client/requests/index.d.ts.map +1 -1
- package/api/resources/desk/client/requests/index.js.map +1 -1
- package/api/resources/didcommMessages/client/Client.d.ts +2 -0
- package/api/resources/didcommMessages/client/Client.d.ts.map +1 -1
- package/api/resources/didcommMessages/client/Client.js +45 -27
- package/api/resources/didcommMessages/client/Client.js.map +1 -1
- package/api/resources/didcommMessages/client/requests/DidcommMessageHistoryRequest.d.ts +1 -3
- package/api/resources/didcommMessages/client/requests/DidcommMessageHistoryRequest.d.ts.map +1 -1
- package/api/resources/didcommMessages/client/requests/DidcommMessageHistoryRequest.js.map +1 -1
- package/api/resources/didcommMessages/client/requests/DidcommMessageLatestRequest.d.ts +1 -3
- package/api/resources/didcommMessages/client/requests/DidcommMessageLatestRequest.d.ts.map +1 -1
- package/api/resources/didcommMessages/client/requests/DidcommMessageLatestRequest.js.map +1 -1
- package/api/resources/didcommMessages/client/requests/DidcommMessageRevisionRequest.d.ts +1 -3
- package/api/resources/didcommMessages/client/requests/DidcommMessageRevisionRequest.d.ts.map +1 -1
- package/api/resources/didcommMessages/client/requests/DidcommMessageRevisionRequest.js.map +1 -1
- package/api/resources/dids/client/Client.d.ts +2 -0
- package/api/resources/dids/client/Client.d.ts.map +1 -1
- package/api/resources/dids/client/Client.js +5 -3
- package/api/resources/dids/client/Client.js.map +1 -1
- package/api/resources/drafts/client/Client.d.ts +9 -7
- package/api/resources/drafts/client/Client.d.ts.map +1 -1
- package/api/resources/drafts/client/Client.js +67 -43
- package/api/resources/drafts/client/Client.js.map +1 -1
- package/api/resources/drafts/client/requests/DraftCreateRequest.d.ts +7 -7
- package/api/resources/drafts/client/requests/DraftCreateRequest.js.map +1 -1
- package/api/resources/drafts/client/requests/DraftExportRequest.d.ts +8 -0
- package/api/resources/drafts/client/requests/DraftExportRequest.d.ts.map +1 -1
- package/api/resources/drafts/client/requests/DraftExportRequest.js.map +1 -1
- package/api/resources/drafts/client/requests/DraftHistoryRequest.d.ts +1 -3
- package/api/resources/drafts/client/requests/DraftHistoryRequest.d.ts.map +1 -1
- package/api/resources/drafts/client/requests/DraftHistoryRequest.js.map +1 -1
- package/api/resources/drafts/client/requests/DraftLatestRequest.d.ts +1 -3
- package/api/resources/drafts/client/requests/DraftLatestRequest.d.ts.map +1 -1
- package/api/resources/drafts/client/requests/DraftLatestRequest.js.map +1 -1
- package/api/resources/drafts/client/requests/DraftRevisionRequest.d.ts +1 -3
- package/api/resources/drafts/client/requests/DraftRevisionRequest.d.ts.map +1 -1
- package/api/resources/drafts/client/requests/DraftRevisionRequest.js.map +1 -1
- package/api/resources/files/client/Client.d.ts +2 -0
- package/api/resources/files/client/Client.d.ts.map +1 -1
- package/api/resources/files/client/Client.js +55 -34
- package/api/resources/files/client/Client.js.map +1 -1
- package/api/resources/files/client/requests/FileCreateRequest.d.ts +1 -3
- package/api/resources/files/client/requests/FileCreateRequest.d.ts.map +1 -1
- package/api/resources/files/client/requests/FileCreateRequest.js.map +1 -1
- package/api/resources/files/client/requests/FileDownloadRequest.d.ts +5 -3
- package/api/resources/files/client/requests/FileDownloadRequest.d.ts.map +1 -1
- package/api/resources/files/client/requests/FileDownloadRequest.js.map +1 -1
- package/api/resources/files/client/requests/FileHistoryRequest.d.ts +1 -3
- package/api/resources/files/client/requests/FileHistoryRequest.d.ts.map +1 -1
- package/api/resources/files/client/requests/FileHistoryRequest.js.map +1 -1
- package/api/resources/files/client/requests/FileLatestRequest.d.ts +1 -3
- package/api/resources/files/client/requests/FileLatestRequest.d.ts.map +1 -1
- package/api/resources/files/client/requests/FileLatestRequest.js.map +1 -1
- package/api/resources/files/client/requests/FileRevisionRequest.d.ts +1 -3
- package/api/resources/files/client/requests/FileRevisionRequest.d.ts.map +1 -1
- package/api/resources/files/client/requests/FileRevisionRequest.js.map +1 -1
- package/api/resources/gdpr/client/Client.d.ts +2 -0
- package/api/resources/gdpr/client/Client.d.ts.map +1 -1
- package/api/resources/gdpr/client/Client.js +5 -3
- package/api/resources/gdpr/client/Client.js.map +1 -1
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.d.ts.map +1 -1
- package/api/resources/index.js +3 -1
- package/api/resources/index.js.map +1 -1
- package/api/resources/keys/client/Client.d.ts +2 -0
- package/api/resources/keys/client/Client.d.ts.map +1 -1
- package/api/resources/keys/client/Client.js +65 -42
- package/api/resources/keys/client/Client.js.map +1 -1
- package/api/resources/keys/client/requests/CredentialSignRequest.d.ts +8 -6
- package/api/resources/keys/client/requests/CredentialSignRequest.d.ts.map +1 -1
- package/api/resources/keys/client/requests/CredentialSignRequest.js.map +1 -1
- package/api/resources/keys/client/requests/DidCommMessageSignRequest.d.ts +8 -6
- package/api/resources/keys/client/requests/DidCommMessageSignRequest.d.ts.map +1 -1
- package/api/resources/keys/client/requests/DidCommMessageSignRequest.js.map +1 -1
- package/api/resources/keys/client/requests/KeyHistoryRequest.d.ts +1 -3
- package/api/resources/keys/client/requests/KeyHistoryRequest.d.ts.map +1 -1
- package/api/resources/keys/client/requests/KeyHistoryRequest.js.map +1 -1
- package/api/resources/keys/client/requests/KeyLatestRequest.d.ts +1 -3
- package/api/resources/keys/client/requests/KeyLatestRequest.d.ts.map +1 -1
- package/api/resources/keys/client/requests/KeyLatestRequest.js.map +1 -1
- package/api/resources/keys/client/requests/KeyRevisionRequest.d.ts +1 -3
- package/api/resources/keys/client/requests/KeyRevisionRequest.d.ts.map +1 -1
- package/api/resources/keys/client/requests/KeyRevisionRequest.js.map +1 -1
- package/api/resources/keys/client/requests/PresentationSignRequest.d.ts +8 -6
- package/api/resources/keys/client/requests/PresentationSignRequest.d.ts.map +1 -1
- package/api/resources/keys/client/requests/PresentationSignRequest.js.map +1 -1
- package/api/resources/presentations/client/Client.d.ts +5 -1
- package/api/resources/presentations/client/Client.d.ts.map +1 -1
- package/api/resources/presentations/client/Client.js +80 -51
- package/api/resources/presentations/client/Client.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationDownloadRequest.d.ts +5 -3
- package/api/resources/presentations/client/requests/PresentationDownloadRequest.d.ts.map +1 -1
- package/api/resources/presentations/client/requests/PresentationDownloadRequest.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationExportRequest.d.ts +10 -0
- package/api/resources/presentations/client/requests/PresentationExportRequest.d.ts.map +1 -1
- package/api/resources/presentations/client/requests/PresentationExportRequest.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationHistoryRequest.d.ts +1 -3
- package/api/resources/presentations/client/requests/PresentationHistoryRequest.d.ts.map +1 -1
- package/api/resources/presentations/client/requests/PresentationHistoryRequest.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationImportRequest.d.ts +1 -3
- package/api/resources/presentations/client/requests/PresentationImportRequest.d.ts.map +1 -1
- package/api/resources/presentations/client/requests/PresentationImportRequest.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationIssueRequest.d.ts +2 -0
- package/api/resources/presentations/client/requests/PresentationIssueRequest.d.ts.map +1 -1
- package/api/resources/presentations/client/requests/PresentationIssueRequest.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationLatestRequest.d.ts +1 -3
- package/api/resources/presentations/client/requests/PresentationLatestRequest.d.ts.map +1 -1
- package/api/resources/presentations/client/requests/PresentationLatestRequest.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationRevisionRequest.d.ts +1 -3
- package/api/resources/presentations/client/requests/PresentationRevisionRequest.d.ts.map +1 -1
- package/api/resources/presentations/client/requests/PresentationRevisionRequest.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationVerifyRequest.d.ts +10 -0
- package/api/resources/presentations/client/requests/PresentationVerifyRequest.d.ts.map +1 -0
- package/api/resources/presentations/client/requests/PresentationVerifyRequest.js +6 -0
- package/api/resources/presentations/client/requests/PresentationVerifyRequest.js.map +1 -0
- package/api/resources/presentations/client/requests/index.d.ts +1 -0
- package/api/resources/presentations/client/requests/index.d.ts.map +1 -1
- package/api/resources/presentations/client/requests/index.js.map +1 -1
- package/api/resources/presentations/types/PresentationExportRequestCompositionType.d.ts +8 -0
- package/api/resources/presentations/types/PresentationExportRequestCompositionType.d.ts.map +1 -0
- package/api/resources/presentations/types/PresentationExportRequestCompositionType.js +10 -0
- package/api/resources/presentations/types/PresentationExportRequestCompositionType.js.map +1 -0
- package/api/resources/presentations/types/PresentationIssueRequestCompositionType.d.ts +8 -0
- package/api/resources/presentations/types/PresentationIssueRequestCompositionType.d.ts.map +1 -0
- package/api/resources/presentations/types/PresentationIssueRequestCompositionType.js +10 -0
- package/api/resources/presentations/types/PresentationIssueRequestCompositionType.js.map +1 -0
- package/api/resources/presentations/types/index.d.ts +2 -0
- package/api/resources/presentations/types/index.d.ts.map +1 -1
- package/api/resources/presentations/types/index.js +2 -0
- package/api/resources/presentations/types/index.js.map +1 -1
- package/api/resources/publishedSchemas/client/Client.d.ts +201 -0
- package/api/resources/publishedSchemas/client/Client.d.ts.map +1 -0
- package/api/resources/publishedSchemas/client/Client.js +986 -0
- package/api/resources/publishedSchemas/client/Client.js.map +1 -0
- package/api/resources/publishedSchemas/client/index.d.ts +3 -0
- package/api/resources/publishedSchemas/client/index.d.ts.map +1 -0
- package/api/resources/publishedSchemas/client/index.js +18 -0
- package/api/resources/publishedSchemas/client/index.js.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaDeleteRequest.d.ts +47 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaDeleteRequest.d.ts.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaDeleteRequest.js +6 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaDeleteRequest.js.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaLatestRequest.d.ts +12 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaLatestRequest.d.ts.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaLatestRequest.js +6 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaLatestRequest.js.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaRestoreRequest.d.ts +47 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaRestoreRequest.d.ts.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaRestoreRequest.js +6 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaRestoreRequest.js.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaRevisionRequest.d.ts +12 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaRevisionRequest.d.ts.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaRevisionRequest.js +6 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaRevisionRequest.js.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.d.ts +15 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.d.ts.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.js +6 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.js.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.d.ts +52 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.d.ts.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.js +6 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.js.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.d.ts +52 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.d.ts.map +1 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.js +6 -0
- package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.js.map +1 -0
- package/api/resources/publishedSchemas/client/requests/index.d.ts +8 -0
- package/api/resources/publishedSchemas/client/requests/index.d.ts.map +1 -0
- package/api/resources/publishedSchemas/client/requests/index.js +3 -0
- package/api/resources/publishedSchemas/client/requests/index.js.map +1 -0
- package/api/resources/publishedSchemas/index.d.ts +2 -0
- package/api/resources/publishedSchemas/index.d.ts.map +1 -0
- package/api/resources/publishedSchemas/index.js +18 -0
- package/api/resources/publishedSchemas/index.js.map +1 -0
- package/api/resources/schemas/client/Client.d.ts +42 -11
- package/api/resources/schemas/client/Client.d.ts.map +1 -1
- package/api/resources/schemas/client/Client.js +212 -47
- package/api/resources/schemas/client/Client.js.map +1 -1
- package/api/resources/schemas/client/requests/SchemaHistoryRequest.d.ts +1 -3
- package/api/resources/schemas/client/requests/SchemaHistoryRequest.d.ts.map +1 -1
- package/api/resources/schemas/client/requests/SchemaHistoryRequest.js.map +1 -1
- package/api/resources/schemas/client/requests/SchemaImportRequest.d.ts +25 -0
- package/api/resources/schemas/client/requests/SchemaImportRequest.d.ts.map +1 -0
- package/api/{types/DraftFieldFileValue.js → resources/schemas/client/requests/SchemaImportRequest.js} +1 -1
- package/api/resources/schemas/client/requests/SchemaImportRequest.js.map +1 -0
- package/api/resources/schemas/client/requests/SchemaLatestRequest.d.ts +1 -3
- package/api/resources/schemas/client/requests/SchemaLatestRequest.d.ts.map +1 -1
- package/api/resources/schemas/client/requests/SchemaLatestRequest.js.map +1 -1
- package/api/resources/schemas/client/requests/SchemaPublishRequest.d.ts +2 -4
- package/api/resources/schemas/client/requests/SchemaPublishRequest.d.ts.map +1 -1
- package/api/resources/schemas/client/requests/SchemaPublishRequest.js.map +1 -1
- package/api/resources/schemas/client/requests/SchemaRevisionRequest.d.ts +1 -3
- package/api/resources/schemas/client/requests/SchemaRevisionRequest.d.ts.map +1 -1
- package/api/resources/schemas/client/requests/SchemaRevisionRequest.js.map +1 -1
- package/api/resources/schemas/client/requests/SchemaUpdateRequest.d.ts +1 -6
- package/api/resources/schemas/client/requests/SchemaUpdateRequest.d.ts.map +1 -1
- package/api/resources/schemas/client/requests/SchemaUpdateRequest.js.map +1 -1
- package/api/resources/schemas/client/requests/index.d.ts +1 -0
- package/api/resources/schemas/client/requests/index.d.ts.map +1 -1
- package/api/resources/schemas/client/requests/index.js.map +1 -1
- package/api/types/ArrayClaimValue.d.ts +12 -0
- package/api/types/ArrayClaimValue.d.ts.map +1 -0
- package/api/types/{DraftFieldDateValue.js → ArrayClaimValue.js} +1 -1
- package/api/types/ArrayClaimValue.js.map +1 -0
- package/api/types/BooleanClaimValue.d.ts +11 -0
- package/api/types/BooleanClaimValue.d.ts.map +1 -0
- package/api/types/{DraftFieldLinkValue.js → BooleanClaimValue.js} +1 -1
- package/api/types/BooleanClaimValue.js.map +1 -0
- package/api/types/ClaimsSchema.d.ts +6 -2
- package/api/types/ClaimsSchema.d.ts.map +1 -1
- package/api/types/ClaimsSchema.js.map +1 -1
- package/api/types/ClaimsSchemaFieldLinkValue.d.ts +2 -1
- package/api/types/ClaimsSchemaFieldLinkValue.d.ts.map +1 -1
- package/api/types/ClaimsSchemaFieldLinkValue.js.map +1 -1
- package/api/types/ClaimsSchemaFieldLinkValueLinkType.d.ts +11 -0
- package/api/types/ClaimsSchemaFieldLinkValueLinkType.d.ts.map +1 -0
- package/api/types/ClaimsSchemaFieldLinkValueLinkType.js +10 -0
- package/api/types/ClaimsSchemaFieldLinkValueLinkType.js.map +1 -0
- package/api/types/ClaimsSchemaFieldStructOptionalValue.d.ts +27 -0
- package/api/types/ClaimsSchemaFieldStructOptionalValue.d.ts.map +1 -0
- package/api/types/ClaimsSchemaFieldStructOptionalValue.js +6 -0
- package/api/types/ClaimsSchemaFieldStructOptionalValue.js.map +1 -0
- package/api/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.d.ts +35 -0
- package/api/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.d.ts.map +1 -0
- package/api/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.js +6 -0
- package/api/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.js.map +1 -0
- package/api/types/ClaimsSchemaFieldStructValue.d.ts +7 -1
- package/api/types/ClaimsSchemaFieldStructValue.d.ts.map +1 -1
- package/api/types/ClaimsSchemaFieldStructValue.js.map +1 -1
- package/api/types/ClaimsSchemaOptional.d.ts +20 -0
- package/api/types/ClaimsSchemaOptional.d.ts.map +1 -0
- package/api/types/ClaimsSchemaOptional.js +6 -0
- package/api/types/ClaimsSchemaOptional.js.map +1 -0
- package/api/types/ClaimsSchemaOptionalFieldsItem.d.ts +35 -0
- package/api/types/ClaimsSchemaOptionalFieldsItem.d.ts.map +1 -0
- package/api/types/ClaimsSchemaOptionalFieldsItem.js +6 -0
- package/api/types/ClaimsSchemaOptionalFieldsItem.js.map +1 -0
- package/api/types/CredentialClaimLinkedCredentialValue.d.ts +13 -0
- package/api/types/CredentialClaimLinkedCredentialValue.d.ts.map +1 -0
- package/api/types/CredentialClaimLinkedCredentialValue.js +6 -0
- package/api/types/CredentialClaimLinkedCredentialValue.js.map +1 -0
- package/api/types/CredentialClaimLinkedFileValue.d.ts +13 -0
- package/api/types/CredentialClaimLinkedFileValue.d.ts.map +1 -0
- package/api/types/CredentialClaimLinkedFileValue.js +6 -0
- package/api/types/CredentialClaimLinkedFileValue.js.map +1 -0
- package/api/types/CredentialClaimValue.d.ts +38 -0
- package/api/types/CredentialClaimValue.d.ts.map +1 -0
- package/api/types/CredentialClaimValue.js +6 -0
- package/api/types/CredentialClaimValue.js.map +1 -0
- package/api/types/CredentialClaimValues.d.ts +9 -0
- package/api/types/CredentialClaimValues.d.ts.map +1 -0
- package/api/types/CredentialClaimValues.js +6 -0
- package/api/types/CredentialClaimValues.js.map +1 -0
- package/api/types/CredentialSchema.d.ts +7 -2
- package/api/types/CredentialSchema.d.ts.map +1 -1
- package/api/types/CredentialSchema.js.map +1 -1
- package/api/types/CredentialSchemaCreate.d.ts +1 -1
- package/api/types/CredentialSchemaCreate.d.ts.map +1 -1
- package/api/types/CredentialSchemaCreate.js.map +1 -1
- package/api/types/CredentialSchemaUpdate.d.ts +1 -1
- package/api/types/CredentialSchemaUpdate.d.ts.map +1 -1
- package/api/types/CredentialSchemaUpdate.js.map +1 -1
- package/api/types/DateClaimValue.d.ts +11 -0
- package/api/types/DateClaimValue.d.ts.map +1 -0
- package/api/types/{DraftEnumValue.js → DateClaimValue.js} +1 -1
- package/api/types/DateClaimValue.js.map +1 -0
- package/api/types/DateTimeClaimValue.d.ts +11 -0
- package/api/types/DateTimeClaimValue.d.ts.map +1 -0
- package/api/types/DateTimeClaimValue.js +6 -0
- package/api/types/DateTimeClaimValue.js.map +1 -0
- package/api/types/Draft.d.ts +8 -4
- package/api/types/Draft.d.ts.map +1 -1
- package/api/types/Draft.js.map +1 -1
- package/api/types/DraftCreate.d.ts +7 -3
- package/api/types/DraftCreate.d.ts.map +1 -1
- package/api/types/DraftCreate.js.map +1 -1
- package/api/types/DraftCreateMetaSchema.d.ts +12 -0
- package/api/types/DraftCreateMetaSchema.d.ts.map +1 -0
- package/api/types/DraftCreateMetaSchema.js +6 -0
- package/api/types/DraftCreateMetaSchema.js.map +1 -0
- package/api/types/DraftUpdate.d.ts +2 -2
- package/api/types/DraftUpdate.d.ts.map +1 -1
- package/api/types/DraftUpdate.js.map +1 -1
- package/api/types/ErrorDetail.d.ts +1 -0
- package/api/types/ErrorDetail.d.ts.map +1 -1
- package/api/types/ErrorDetail.js.map +1 -1
- package/api/types/FileClaimValue.d.ts +12 -0
- package/api/types/FileClaimValue.d.ts.map +1 -0
- package/api/types/FileClaimValue.js +6 -0
- package/api/types/FileClaimValue.js.map +1 -0
- package/api/types/LinkClaimValue.d.ts +12 -0
- package/api/types/LinkClaimValue.d.ts.map +1 -0
- package/api/types/LinkClaimValue.js +6 -0
- package/api/types/LinkClaimValue.js.map +1 -0
- package/api/types/ListPublishedCredentialSchema.d.ts +12 -0
- package/api/types/ListPublishedCredentialSchema.d.ts.map +1 -0
- package/api/types/ListPublishedCredentialSchema.js +6 -0
- package/api/types/ListPublishedCredentialSchema.js.map +1 -0
- package/api/types/MetaSchema.d.ts +16 -0
- package/api/types/MetaSchema.d.ts.map +1 -0
- package/api/types/{DraftSchema.js → MetaSchema.js} +1 -1
- package/api/types/MetaSchema.js.map +1 -0
- package/api/types/NumberClaimValue.d.ts +11 -0
- package/api/types/NumberClaimValue.d.ts.map +1 -0
- package/api/types/NumberClaimValue.js +6 -0
- package/api/types/NumberClaimValue.js.map +1 -0
- package/api/types/ProblemInternalServerError.d.ts +1 -1
- package/api/types/ProblemInternalServerError.d.ts.map +1 -1
- package/api/types/ProblemInternalServerError.js.map +1 -1
- package/api/types/ProblemInternalServerErrorType.d.ts +11 -0
- package/api/types/ProblemInternalServerErrorType.d.ts.map +1 -0
- package/api/types/ProblemInternalServerErrorType.js +10 -0
- package/api/types/ProblemInternalServerErrorType.js.map +1 -0
- package/api/types/PublishedCredentialSchema.d.ts +12 -0
- package/api/types/PublishedCredentialSchema.d.ts.map +1 -1
- package/api/types/PublishedCredentialSchema.js.map +1 -1
- package/api/types/PublishedSchemaBaseFilter.d.ts +27 -0
- package/api/types/PublishedSchemaBaseFilter.d.ts.map +1 -0
- package/api/types/PublishedSchemaBaseFilter.js +6 -0
- package/api/types/PublishedSchemaBaseFilter.js.map +1 -0
- package/api/types/PublishedSchemaBaseFilterAnnotationsItem.d.ts +20 -0
- package/api/types/PublishedSchemaBaseFilterAnnotationsItem.d.ts.map +1 -0
- package/api/types/PublishedSchemaBaseFilterAnnotationsItem.js +6 -0
- package/api/types/PublishedSchemaBaseFilterAnnotationsItem.js.map +1 -0
- package/api/types/PublishedSchemaBaseFilterCreatedAt.d.ts +26 -0
- package/api/types/PublishedSchemaBaseFilterCreatedAt.d.ts.map +1 -0
- package/api/types/PublishedSchemaBaseFilterCreatedAt.js +6 -0
- package/api/types/PublishedSchemaBaseFilterCreatedAt.js.map +1 -0
- package/api/types/PublishedSchemaBaseFilterDeletedAt.d.ts +32 -0
- package/api/types/PublishedSchemaBaseFilterDeletedAt.d.ts.map +1 -0
- package/api/types/PublishedSchemaBaseFilterDeletedAt.js +6 -0
- package/api/types/PublishedSchemaBaseFilterDeletedAt.js.map +1 -0
- package/api/types/{SchemaFilterPublicationEtag.d.ts → PublishedSchemaBaseFilterEtag.d.ts} +6 -3
- package/api/types/PublishedSchemaBaseFilterEtag.d.ts.map +1 -0
- package/api/types/PublishedSchemaBaseFilterEtag.js +6 -0
- package/api/types/PublishedSchemaBaseFilterEtag.js.map +1 -0
- package/api/types/PublishedSchemaBaseFilterId.d.ts +23 -0
- package/api/types/PublishedSchemaBaseFilterId.d.ts.map +1 -0
- package/api/types/PublishedSchemaBaseFilterId.js +6 -0
- package/api/types/PublishedSchemaBaseFilterId.js.map +1 -0
- package/api/types/PublishedSchemaBaseFilterLabelsItem.d.ts +20 -0
- package/api/types/PublishedSchemaBaseFilterLabelsItem.d.ts.map +1 -0
- package/api/types/PublishedSchemaBaseFilterLabelsItem.js +6 -0
- package/api/types/PublishedSchemaBaseFilterLabelsItem.js.map +1 -0
- package/api/types/PublishedSchemaBaseFilterModifiedAt.d.ts +26 -0
- package/api/types/PublishedSchemaBaseFilterModifiedAt.d.ts.map +1 -0
- package/api/types/PublishedSchemaBaseFilterModifiedAt.js +6 -0
- package/api/types/PublishedSchemaBaseFilterModifiedAt.js.map +1 -0
- package/api/types/PublishedSchemaBaseFilterRevision.d.ts +38 -0
- package/api/types/PublishedSchemaBaseFilterRevision.d.ts.map +1 -0
- package/api/types/{CredentialSchemaPublicationOutput.js → PublishedSchemaBaseFilterRevision.js} +1 -1
- package/api/types/PublishedSchemaBaseFilterRevision.js.map +1 -0
- package/api/types/PublishedSchemaFilter.d.ts +9 -0
- package/api/types/PublishedSchemaFilter.d.ts.map +1 -0
- package/api/types/PublishedSchemaFilter.js +6 -0
- package/api/types/PublishedSchemaFilter.js.map +1 -0
- package/api/types/PublishedSchemaFilterData.d.ts +14 -0
- package/api/types/PublishedSchemaFilterData.d.ts.map +1 -0
- package/api/types/PublishedSchemaFilterData.js +6 -0
- package/api/types/PublishedSchemaFilterData.js.map +1 -0
- package/api/types/PublishedSchemaFilterDataDigestMultibase.d.ts +20 -0
- package/api/types/PublishedSchemaFilterDataDigestMultibase.d.ts.map +1 -0
- package/api/types/PublishedSchemaFilterDataDigestMultibase.js +6 -0
- package/api/types/PublishedSchemaFilterDataDigestMultibase.js.map +1 -0
- package/api/types/{SchemaFilterPublicationPublishedAt.d.ts → PublishedSchemaFilterDataPublishedAt.d.ts} +3 -3
- package/api/types/PublishedSchemaFilterDataPublishedAt.d.ts.map +1 -0
- package/api/types/PublishedSchemaFilterDataPublishedAt.js +6 -0
- package/api/types/PublishedSchemaFilterDataPublishedAt.js.map +1 -0
- package/api/types/{SchemaFilterPublicationSlug.d.ts → PublishedSchemaFilterDataSlug.d.ts} +3 -3
- package/api/types/PublishedSchemaFilterDataSlug.d.ts.map +1 -0
- package/api/types/PublishedSchemaFilterDataSlug.js +6 -0
- package/api/types/PublishedSchemaFilterDataSlug.js.map +1 -0
- package/api/types/{SchemaFilterPublicationVersion.d.ts → PublishedSchemaFilterDataVersion.d.ts} +3 -3
- package/api/types/PublishedSchemaFilterDataVersion.d.ts.map +1 -0
- package/api/types/PublishedSchemaFilterDataVersion.js +6 -0
- package/api/types/PublishedSchemaFilterDataVersion.js.map +1 -0
- package/api/types/PublishedSchemaSort.d.ts +14 -0
- package/api/types/PublishedSchemaSort.d.ts.map +1 -0
- package/api/types/PublishedSchemaSort.js +6 -0
- package/api/types/PublishedSchemaSort.js.map +1 -0
- package/api/types/PublishedSchemaSortField.d.ts +20 -0
- package/api/types/PublishedSchemaSortField.d.ts.map +1 -0
- package/api/types/PublishedSchemaSortField.js +19 -0
- package/api/types/PublishedSchemaSortField.js.map +1 -0
- package/api/types/PublishedSchemaSortOrder.d.ts +12 -0
- package/api/types/PublishedSchemaSortOrder.d.ts.map +1 -0
- package/api/types/PublishedSchemaSortOrder.js +11 -0
- package/api/types/PublishedSchemaSortOrder.js.map +1 -0
- package/api/types/ResourcePublishedCredentialSchema.d.ts +30 -0
- package/api/types/ResourcePublishedCredentialSchema.d.ts.map +1 -0
- package/api/types/ResourcePublishedCredentialSchema.js +6 -0
- package/api/types/ResourcePublishedCredentialSchema.js.map +1 -0
- package/api/types/SchemaFilterData.d.ts +1 -1
- package/api/types/SchemaFilterData.d.ts.map +1 -1
- package/api/types/SchemaFilterData.js.map +1 -1
- package/api/types/SchemaFilterDataDigestMultibase.d.ts +20 -0
- package/api/types/SchemaFilterDataDigestMultibase.d.ts.map +1 -0
- package/api/types/SchemaFilterDataDigestMultibase.js +6 -0
- package/api/types/SchemaFilterDataDigestMultibase.js.map +1 -0
- package/api/types/SchemaImportDataRequest.d.ts +15 -0
- package/api/types/SchemaImportDataRequest.d.ts.map +1 -0
- package/api/types/{DraftFieldBooleanValue.js → SchemaImportDataRequest.js} +1 -1
- package/api/types/SchemaImportDataRequest.js.map +1 -0
- package/api/types/SchemaSortField.d.ts +2 -6
- package/api/types/SchemaSortField.d.ts.map +1 -1
- package/api/types/SchemaSortField.js +1 -5
- package/api/types/SchemaSortField.js.map +1 -1
- package/api/types/StringClaimValue.d.ts +11 -0
- package/api/types/StringClaimValue.d.ts.map +1 -0
- package/api/types/StringClaimValue.js +6 -0
- package/api/types/StringClaimValue.js.map +1 -0
- package/api/types/StructClaimValue.d.ts +12 -0
- package/api/types/StructClaimValue.d.ts.map +1 -0
- package/api/types/StructClaimValue.js +6 -0
- package/api/types/StructClaimValue.js.map +1 -0
- package/api/types/index.d.ts +43 -19
- package/api/types/index.d.ts.map +1 -1
- package/api/types/index.js +43 -19
- package/api/types/index.js.map +1 -1
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts.map +1 -1
- package/core/fetcher/Fetcher.js.map +1 -1
- package/core/fetcher/index.d.ts +1 -1
- package/core/fetcher/index.d.ts.map +1 -1
- package/core/fetcher/index.js.map +1 -1
- package/core/schemas/utils/maybeSkipValidation.js +1 -1
- package/core/schemas/utils/maybeSkipValidation.js.map +1 -1
- package/core/url/join.d.ts.map +1 -1
- package/core/url/join.js +23 -3
- package/core/url/join.js.map +1 -1
- package/documents/credential/claims.d.ts +11 -7
- package/documents/credential/claims.d.ts.map +1 -1
- package/documents/credential/claims.js +187 -38
- package/documents/credential/claims.js.map +1 -1
- package/documents/credential/claims.spec.js +484 -165
- package/documents/credential/claims.spec.js.map +1 -1
- package/documents/credential/testdata/udt.d.ts +50 -0
- package/documents/credential/testdata/udt.d.ts.map +1 -1
- package/documents/credential/testdata/udt.js +226 -6
- package/documents/credential/testdata/udt.js.map +1 -1
- package/documents/credential/types.d.ts +3 -3
- package/documents/credential/types.d.ts.map +1 -1
- package/documents/credential/types.js.map +1 -1
- package/documents/credential.d.ts +11 -5
- package/documents/credential.d.ts.map +1 -1
- package/documents/credential.js +151 -32
- package/documents/credential.js.map +1 -1
- package/documents/decorators.d.ts +40 -7
- package/documents/decorators.d.ts.map +1 -1
- package/documents/decorators.js +105 -20
- package/documents/decorators.js.map +1 -1
- package/documents/models.d.ts +5 -5
- package/documents/models.d.ts.map +1 -1
- package/documents/models.js +20 -16
- package/documents/models.js.map +1 -1
- package/documents/models.spec.js +1 -5
- package/documents/models.spec.js.map +1 -1
- package/documents/presentation.d.ts.map +1 -1
- package/documents/presentation.js +1 -0
- package/documents/presentation.js.map +1 -1
- package/documents/types.d.ts +8 -2
- package/documents/types.d.ts.map +1 -1
- package/documents/types.js +8 -1
- package/documents/types.js.map +1 -1
- package/documents/utils/error.d.ts +2 -0
- package/documents/utils/error.d.ts.map +1 -1
- package/documents/utils/error.js +2 -0
- package/documents/utils/error.js.map +1 -1
- package/documents/utils/error.spec.js +1 -1
- package/documents/utils/error.spec.js.map +1 -1
- package/package.json +7 -3
- package/reference.md +1499 -166
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.d.ts.map +1 -1
- package/serialization/resources/index.js +3 -1
- package/serialization/resources/index.js.map +1 -1
- package/serialization/resources/presentations/client/requests/PresentationExportRequest.d.ts +2 -0
- package/serialization/resources/presentations/client/requests/PresentationExportRequest.d.ts.map +1 -1
- package/serialization/resources/presentations/client/requests/PresentationExportRequest.js +2 -0
- package/serialization/resources/presentations/client/requests/PresentationExportRequest.js.map +1 -1
- package/serialization/resources/presentations/client/requests/PresentationIssueRequest.d.ts +2 -0
- package/serialization/resources/presentations/client/requests/PresentationIssueRequest.d.ts.map +1 -1
- package/serialization/resources/presentations/client/requests/PresentationIssueRequest.js +2 -0
- package/serialization/resources/presentations/client/requests/PresentationIssueRequest.js.map +1 -1
- package/serialization/resources/presentations/types/PresentationExportRequestCompositionType.d.ts +11 -0
- package/serialization/resources/presentations/types/PresentationExportRequestCompositionType.d.ts.map +1 -0
- package/serialization/resources/presentations/types/PresentationExportRequestCompositionType.js +42 -0
- package/serialization/resources/presentations/types/PresentationExportRequestCompositionType.js.map +1 -0
- package/serialization/resources/presentations/types/PresentationIssueRequestCompositionType.d.ts +11 -0
- package/serialization/resources/presentations/types/PresentationIssueRequestCompositionType.d.ts.map +1 -0
- package/serialization/resources/presentations/types/PresentationIssueRequestCompositionType.js +42 -0
- package/serialization/resources/presentations/types/PresentationIssueRequestCompositionType.js.map +1 -0
- package/serialization/resources/presentations/types/index.d.ts +2 -0
- package/serialization/resources/presentations/types/index.d.ts.map +1 -1
- package/serialization/resources/presentations/types/index.js +2 -0
- package/serialization/resources/presentations/types/index.js.map +1 -1
- package/serialization/resources/publishedSchemas/client/index.d.ts +2 -0
- package/serialization/resources/publishedSchemas/client/index.d.ts.map +1 -0
- package/serialization/resources/publishedSchemas/client/index.js +18 -0
- package/serialization/resources/publishedSchemas/client/index.js.map +1 -0
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.d.ts +16 -0
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.d.ts.map +1 -0
- package/serialization/{types/DraftFieldDateTimeValue.js → resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.js} +8 -9
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.js.map +1 -0
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.d.ts +13 -0
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.d.ts.map +1 -0
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.js +44 -0
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.js.map +1 -0
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.d.ts +13 -0
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.d.ts.map +1 -0
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.js +44 -0
- package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.js.map +1 -0
- package/serialization/resources/publishedSchemas/client/requests/index.d.ts +4 -0
- package/serialization/resources/publishedSchemas/client/requests/index.d.ts.map +1 -0
- package/serialization/resources/publishedSchemas/client/requests/index.js +10 -0
- package/serialization/resources/publishedSchemas/client/requests/index.js.map +1 -0
- package/serialization/resources/publishedSchemas/index.d.ts +2 -0
- package/serialization/resources/publishedSchemas/index.d.ts.map +1 -0
- package/serialization/resources/publishedSchemas/index.js +18 -0
- package/serialization/resources/publishedSchemas/index.js.map +1 -0
- package/serialization/resources/schemas/client/requests/SchemaImportRequest.d.ts +16 -0
- package/serialization/resources/schemas/client/requests/SchemaImportRequest.d.ts.map +1 -0
- package/serialization/{types/DraftFieldBooleanValue.js → resources/schemas/client/requests/SchemaImportRequest.js} +8 -9
- package/serialization/resources/schemas/client/requests/SchemaImportRequest.js.map +1 -0
- package/serialization/resources/schemas/client/requests/SchemaPublishRequest.d.ts +1 -1
- package/serialization/resources/schemas/client/requests/SchemaPublishRequest.d.ts.map +1 -1
- package/serialization/resources/schemas/client/requests/SchemaPublishRequest.js +1 -1
- package/serialization/resources/schemas/client/requests/SchemaPublishRequest.js.map +1 -1
- package/serialization/resources/schemas/client/requests/index.d.ts +1 -0
- package/serialization/resources/schemas/client/requests/index.d.ts.map +1 -1
- package/serialization/resources/schemas/client/requests/index.js +3 -1
- package/serialization/resources/schemas/client/requests/index.js.map +1 -1
- package/serialization/types/ArrayClaimValue.d.ts +13 -0
- package/serialization/types/ArrayClaimValue.d.ts.map +1 -0
- package/serialization/types/{DraftFieldFileValue.js → ArrayClaimValue.js} +5 -7
- package/serialization/types/ArrayClaimValue.js.map +1 -0
- package/serialization/types/BooleanClaimValue.d.ts +13 -0
- package/serialization/types/BooleanClaimValue.d.ts.map +1 -0
- package/serialization/types/{CredentialSchemaPublicationOutput.js → BooleanClaimValue.js} +4 -8
- package/serialization/types/BooleanClaimValue.js.map +1 -0
- package/serialization/types/ClaimsSchema.d.ts +2 -0
- package/serialization/types/ClaimsSchema.d.ts.map +1 -1
- package/serialization/types/ClaimsSchema.js +2 -0
- package/serialization/types/ClaimsSchema.js.map +1 -1
- package/serialization/types/ClaimsSchemaFieldLinkValue.d.ts +2 -1
- package/serialization/types/ClaimsSchemaFieldLinkValue.d.ts.map +1 -1
- package/serialization/types/ClaimsSchemaFieldLinkValue.js +2 -1
- package/serialization/types/ClaimsSchemaFieldLinkValue.js.map +1 -1
- package/serialization/types/ClaimsSchemaFieldLinkValueLinkType.d.ts +11 -0
- package/serialization/types/ClaimsSchemaFieldLinkValueLinkType.d.ts.map +1 -0
- package/serialization/types/ClaimsSchemaFieldLinkValueLinkType.js +42 -0
- package/serialization/types/ClaimsSchemaFieldLinkValueLinkType.js.map +1 -0
- package/serialization/types/ClaimsSchemaFieldStructOptionalValue.d.ts +21 -0
- package/serialization/types/ClaimsSchemaFieldStructOptionalValue.d.ts.map +1 -0
- package/serialization/types/{DraftFieldStructValue.js → ClaimsSchemaFieldStructOptionalValue.js} +10 -6
- package/serialization/types/ClaimsSchemaFieldStructOptionalValue.js.map +1 -0
- package/serialization/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.d.ts +42 -0
- package/serialization/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.d.ts.map +1 -0
- package/serialization/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.js +64 -0
- package/serialization/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.js.map +1 -0
- package/serialization/types/ClaimsSchemaFieldStructValue.d.ts +3 -0
- package/serialization/types/ClaimsSchemaFieldStructValue.d.ts.map +1 -1
- package/serialization/types/ClaimsSchemaFieldStructValue.js +3 -0
- package/serialization/types/ClaimsSchemaFieldStructValue.js.map +1 -1
- package/serialization/types/ClaimsSchemaOptional.d.ts +18 -0
- package/serialization/types/ClaimsSchemaOptional.d.ts.map +1 -0
- package/serialization/types/ClaimsSchemaOptional.js +49 -0
- package/serialization/types/ClaimsSchemaOptional.js.map +1 -0
- package/serialization/types/ClaimsSchemaOptionalFieldsItem.d.ts +42 -0
- package/serialization/types/ClaimsSchemaOptionalFieldsItem.d.ts.map +1 -0
- package/serialization/types/{DraftFieldStructValueFieldsItem.js → ClaimsSchemaOptionalFieldsItem.js} +18 -18
- package/serialization/types/ClaimsSchemaOptionalFieldsItem.js.map +1 -0
- package/serialization/types/CredentialClaimLinkedCredentialValue.d.ts +14 -0
- package/serialization/types/CredentialClaimLinkedCredentialValue.d.ts.map +1 -0
- package/serialization/types/{DraftFieldDateValue.js → CredentialClaimLinkedCredentialValue.js} +5 -8
- package/serialization/types/CredentialClaimLinkedCredentialValue.js.map +1 -0
- package/serialization/types/CredentialClaimLinkedFileValue.d.ts +14 -0
- package/serialization/types/CredentialClaimLinkedFileValue.d.ts.map +1 -0
- package/serialization/types/CredentialClaimLinkedFileValue.js +45 -0
- package/serialization/types/CredentialClaimLinkedFileValue.js.map +1 -0
- package/serialization/types/CredentialClaimValue.d.ts +45 -0
- package/serialization/types/CredentialClaimValue.d.ts.map +1 -0
- package/serialization/types/{DraftSchemaFieldsItem.js → CredentialClaimValue.js} +19 -18
- package/serialization/types/CredentialClaimValue.js.map +1 -0
- package/serialization/types/CredentialClaimValues.d.ts +11 -0
- package/serialization/types/CredentialClaimValues.d.ts.map +1 -0
- package/serialization/types/CredentialClaimValues.js +43 -0
- package/serialization/types/CredentialClaimValues.js.map +1 -0
- package/serialization/types/CredentialSchema.d.ts +3 -4
- package/serialization/types/CredentialSchema.d.ts.map +1 -1
- package/serialization/types/CredentialSchema.js +3 -4
- package/serialization/types/CredentialSchema.js.map +1 -1
- package/serialization/types/CredentialSchemaCreate.d.ts +2 -2
- package/serialization/types/CredentialSchemaCreate.d.ts.map +1 -1
- package/serialization/types/CredentialSchemaCreate.js +2 -2
- package/serialization/types/CredentialSchemaCreate.js.map +1 -1
- package/serialization/types/CredentialSchemaUpdate.d.ts +2 -2
- package/serialization/types/CredentialSchemaUpdate.d.ts.map +1 -1
- package/serialization/types/CredentialSchemaUpdate.js +2 -2
- package/serialization/types/CredentialSchemaUpdate.js.map +1 -1
- package/serialization/types/{DraftEnumValue.d.ts → DateClaimValue.d.ts} +3 -4
- package/serialization/types/DateClaimValue.d.ts.map +1 -0
- package/serialization/types/{DraftEnumValue.js → DateClaimValue.js} +3 -4
- package/serialization/types/DateClaimValue.js.map +1 -0
- package/serialization/types/DateTimeClaimValue.d.ts +13 -0
- package/serialization/types/DateTimeClaimValue.d.ts.map +1 -0
- package/serialization/types/DateTimeClaimValue.js +44 -0
- package/serialization/types/DateTimeClaimValue.js.map +1 -0
- package/serialization/types/Draft.d.ts +4 -3
- package/serialization/types/Draft.d.ts.map +1 -1
- package/serialization/types/Draft.js +5 -3
- package/serialization/types/Draft.js.map +1 -1
- package/serialization/types/DraftCreate.d.ts +5 -3
- package/serialization/types/DraftCreate.d.ts.map +1 -1
- package/serialization/types/DraftCreate.js +6 -3
- package/serialization/types/DraftCreate.js.map +1 -1
- package/serialization/types/DraftCreateMetaSchema.d.ts +12 -0
- package/serialization/types/DraftCreateMetaSchema.d.ts.map +1 -0
- package/serialization/types/DraftCreateMetaSchema.js +43 -0
- package/serialization/types/DraftCreateMetaSchema.js.map +1 -0
- package/serialization/types/DraftUpdate.d.ts +1 -1
- package/serialization/types/DraftUpdate.d.ts.map +1 -1
- package/serialization/types/DraftUpdate.js +2 -1
- package/serialization/types/DraftUpdate.js.map +1 -1
- package/serialization/types/FileClaimValue.d.ts +14 -0
- package/serialization/types/FileClaimValue.d.ts.map +1 -0
- package/serialization/types/FileClaimValue.js +45 -0
- package/serialization/types/FileClaimValue.js.map +1 -0
- package/serialization/types/LinkClaimValue.d.ts +14 -0
- package/serialization/types/LinkClaimValue.d.ts.map +1 -0
- package/serialization/types/LinkClaimValue.js +45 -0
- package/serialization/types/LinkClaimValue.js.map +1 -0
- package/serialization/types/ListPublishedCredentialSchema.d.ts +14 -0
- package/serialization/types/ListPublishedCredentialSchema.d.ts.map +1 -0
- package/serialization/types/ListPublishedCredentialSchema.js +45 -0
- package/serialization/types/ListPublishedCredentialSchema.js.map +1 -0
- package/serialization/types/MetaSchema.d.ts +16 -0
- package/serialization/types/MetaSchema.d.ts.map +1 -0
- package/serialization/types/MetaSchema.js +47 -0
- package/serialization/types/MetaSchema.js.map +1 -0
- package/serialization/types/NumberClaimValue.d.ts +13 -0
- package/serialization/types/NumberClaimValue.d.ts.map +1 -0
- package/serialization/types/NumberClaimValue.js +44 -0
- package/serialization/types/NumberClaimValue.js.map +1 -0
- package/serialization/types/ProblemInternalServerError.d.ts +2 -1
- package/serialization/types/ProblemInternalServerError.d.ts.map +1 -1
- package/serialization/types/ProblemInternalServerError.js +2 -1
- package/serialization/types/ProblemInternalServerError.js.map +1 -1
- package/serialization/types/ProblemInternalServerErrorType.d.ts +11 -0
- package/serialization/types/ProblemInternalServerErrorType.d.ts.map +1 -0
- package/serialization/types/ProblemInternalServerErrorType.js +42 -0
- package/serialization/types/ProblemInternalServerErrorType.js.map +1 -0
- package/serialization/types/PublishedCredentialSchema.d.ts +4 -0
- package/serialization/types/PublishedCredentialSchema.d.ts.map +1 -1
- package/serialization/types/PublishedCredentialSchema.js +4 -0
- package/serialization/types/PublishedCredentialSchema.js.map +1 -1
- package/serialization/types/PublishedSchemaBaseFilter.d.ts +30 -0
- package/serialization/types/PublishedSchemaBaseFilter.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilter.js +61 -0
- package/serialization/types/PublishedSchemaBaseFilter.js.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilterAnnotationsItem.d.ts +27 -0
- package/serialization/types/PublishedSchemaBaseFilterAnnotationsItem.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilterAnnotationsItem.js +56 -0
- package/serialization/types/PublishedSchemaBaseFilterAnnotationsItem.js.map +1 -0
- package/serialization/types/{SchemaFilterPublicationPublishedAt.d.ts → PublishedSchemaBaseFilterCreatedAt.d.ts} +4 -4
- package/serialization/types/{SchemaFilterPublicationPublishedAt.d.ts.map → PublishedSchemaBaseFilterCreatedAt.d.ts.map} +1 -1
- package/serialization/types/{SchemaFilterPublicationPublishedAt.js → PublishedSchemaBaseFilterCreatedAt.js} +3 -3
- package/serialization/types/{SchemaFilterPublicationPublishedAt.js.map → PublishedSchemaBaseFilterCreatedAt.js.map} +1 -1
- package/serialization/types/PublishedSchemaBaseFilterDeletedAt.d.ts +39 -0
- package/serialization/types/PublishedSchemaBaseFilterDeletedAt.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilterDeletedAt.js +62 -0
- package/serialization/types/PublishedSchemaBaseFilterDeletedAt.js.map +1 -0
- package/serialization/types/{SchemaFilterPublicationEtag.d.ts → PublishedSchemaBaseFilterEtag.d.ts} +4 -4
- package/serialization/types/PublishedSchemaBaseFilterEtag.d.ts.map +1 -0
- package/serialization/types/{SchemaFilterPublicationEtag.js → PublishedSchemaBaseFilterEtag.js} +3 -3
- package/serialization/types/PublishedSchemaBaseFilterEtag.js.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilterId.d.ts +27 -0
- package/serialization/types/PublishedSchemaBaseFilterId.d.ts.map +1 -0
- package/serialization/types/{SchemaFilterPublicationUrl.js → PublishedSchemaBaseFilterId.js} +11 -11
- package/serialization/types/PublishedSchemaBaseFilterId.js.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilterLabelsItem.d.ts +27 -0
- package/serialization/types/PublishedSchemaBaseFilterLabelsItem.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilterLabelsItem.js +56 -0
- package/serialization/types/PublishedSchemaBaseFilterLabelsItem.js.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilterModifiedAt.d.ts +31 -0
- package/serialization/types/PublishedSchemaBaseFilterModifiedAt.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilterModifiedAt.js +58 -0
- package/serialization/types/PublishedSchemaBaseFilterModifiedAt.js.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilterRevision.d.ts +47 -0
- package/serialization/types/PublishedSchemaBaseFilterRevision.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaBaseFilterRevision.js +66 -0
- package/serialization/types/PublishedSchemaBaseFilterRevision.js.map +1 -0
- package/serialization/types/PublishedSchemaFilter.d.ts +12 -0
- package/serialization/types/PublishedSchemaFilter.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaFilter.js +9 -0
- package/serialization/types/PublishedSchemaFilter.js.map +1 -0
- package/serialization/types/PublishedSchemaFilterData.d.ts +20 -0
- package/serialization/types/PublishedSchemaFilterData.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaFilterData.js +51 -0
- package/serialization/types/PublishedSchemaFilterData.js.map +1 -0
- package/serialization/types/PublishedSchemaFilterDataDigestMultibase.d.ts +27 -0
- package/serialization/types/PublishedSchemaFilterDataDigestMultibase.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaFilterDataDigestMultibase.js +56 -0
- package/serialization/types/PublishedSchemaFilterDataDigestMultibase.js.map +1 -0
- package/serialization/types/PublishedSchemaFilterDataPublishedAt.d.ts +31 -0
- package/serialization/types/PublishedSchemaFilterDataPublishedAt.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaFilterDataPublishedAt.js +58 -0
- package/serialization/types/PublishedSchemaFilterDataPublishedAt.js.map +1 -0
- package/serialization/types/{SchemaFilterPublicationSlug.d.ts → PublishedSchemaFilterDataSlug.d.ts} +4 -4
- package/serialization/types/PublishedSchemaFilterDataSlug.d.ts.map +1 -0
- package/serialization/types/{SchemaFilterPublicationSlug.js → PublishedSchemaFilterDataSlug.js} +3 -3
- package/serialization/types/PublishedSchemaFilterDataSlug.js.map +1 -0
- package/serialization/types/{SchemaFilterPublicationVersion.d.ts → PublishedSchemaFilterDataVersion.d.ts} +4 -4
- package/serialization/types/PublishedSchemaFilterDataVersion.d.ts.map +1 -0
- package/serialization/types/{SchemaFilterPublicationVersion.js → PublishedSchemaFilterDataVersion.js} +3 -3
- package/serialization/types/PublishedSchemaFilterDataVersion.js.map +1 -0
- package/serialization/types/PublishedSchemaSort.d.ts +16 -0
- package/serialization/types/PublishedSchemaSort.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaSort.js +47 -0
- package/serialization/types/PublishedSchemaSort.js.map +1 -0
- package/serialization/types/PublishedSchemaSortField.d.ts +11 -0
- package/serialization/types/PublishedSchemaSortField.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaSortField.js +53 -0
- package/serialization/types/PublishedSchemaSortField.js.map +1 -0
- package/serialization/types/PublishedSchemaSortOrder.d.ts +11 -0
- package/serialization/types/PublishedSchemaSortOrder.d.ts.map +1 -0
- package/serialization/types/PublishedSchemaSortOrder.js +42 -0
- package/serialization/types/PublishedSchemaSortOrder.js.map +1 -0
- package/serialization/types/ResourcePublishedCredentialSchema.d.ts +24 -0
- package/serialization/types/ResourcePublishedCredentialSchema.d.ts.map +1 -0
- package/serialization/types/ResourcePublishedCredentialSchema.js +55 -0
- package/serialization/types/ResourcePublishedCredentialSchema.js.map +1 -0
- package/serialization/types/SchemaFilterData.d.ts +2 -2
- package/serialization/types/SchemaFilterData.d.ts.map +1 -1
- package/serialization/types/SchemaFilterData.js +2 -2
- package/serialization/types/SchemaFilterData.js.map +1 -1
- package/serialization/types/SchemaFilterDataDigestMultibase.d.ts +27 -0
- package/serialization/types/SchemaFilterDataDigestMultibase.d.ts.map +1 -0
- package/serialization/types/SchemaFilterDataDigestMultibase.js +56 -0
- package/serialization/types/SchemaFilterDataDigestMultibase.js.map +1 -0
- package/serialization/types/SchemaImportDataRequest.d.ts +16 -0
- package/serialization/types/SchemaImportDataRequest.d.ts.map +1 -0
- package/serialization/types/SchemaImportDataRequest.js +47 -0
- package/serialization/types/SchemaImportDataRequest.js.map +1 -0
- package/serialization/types/SchemaSortField.d.ts +1 -1
- package/serialization/types/SchemaSortField.d.ts.map +1 -1
- package/serialization/types/SchemaSortField.js +1 -5
- package/serialization/types/SchemaSortField.js.map +1 -1
- package/serialization/types/StringClaimValue.d.ts +13 -0
- package/serialization/types/StringClaimValue.d.ts.map +1 -0
- package/serialization/types/StringClaimValue.js +44 -0
- package/serialization/types/StringClaimValue.js.map +1 -0
- package/serialization/types/StructClaimValue.d.ts +13 -0
- package/serialization/types/StructClaimValue.d.ts.map +1 -0
- package/serialization/types/StructClaimValue.js +45 -0
- package/serialization/types/StructClaimValue.js.map +1 -0
- package/serialization/types/index.d.ts +43 -19
- package/serialization/types/index.d.ts.map +1 -1
- package/serialization/types/index.js +43 -19
- package/serialization/types/index.js.map +1 -1
- package/api/types/CredentialSchemaPublicationOutput.d.ts +0 -27
- package/api/types/CredentialSchemaPublicationOutput.d.ts.map +0 -1
- package/api/types/CredentialSchemaPublicationOutput.js.map +0 -1
- package/api/types/DraftEnumValue.d.ts +0 -13
- package/api/types/DraftEnumValue.d.ts.map +0 -1
- package/api/types/DraftEnumValue.js.map +0 -1
- package/api/types/DraftFieldBooleanValue.d.ts +0 -18
- package/api/types/DraftFieldBooleanValue.d.ts.map +0 -1
- package/api/types/DraftFieldBooleanValue.js.map +0 -1
- package/api/types/DraftFieldDateTimeValue.d.ts +0 -18
- package/api/types/DraftFieldDateTimeValue.d.ts.map +0 -1
- package/api/types/DraftFieldDateTimeValue.js.map +0 -1
- package/api/types/DraftFieldDateValue.d.ts +0 -18
- package/api/types/DraftFieldDateValue.d.ts.map +0 -1
- package/api/types/DraftFieldDateValue.js.map +0 -1
- package/api/types/DraftFieldFileValue.d.ts +0 -16
- package/api/types/DraftFieldFileValue.d.ts.map +0 -1
- package/api/types/DraftFieldFileValue.js.map +0 -1
- package/api/types/DraftFieldLinkValue.d.ts +0 -18
- package/api/types/DraftFieldLinkValue.d.ts.map +0 -1
- package/api/types/DraftFieldLinkValue.js.map +0 -1
- package/api/types/DraftFieldNumberValue.d.ts +0 -18
- package/api/types/DraftFieldNumberValue.d.ts.map +0 -1
- package/api/types/DraftFieldNumberValue.js +0 -6
- package/api/types/DraftFieldNumberValue.js.map +0 -1
- package/api/types/DraftFieldStringValue.d.ts +0 -21
- package/api/types/DraftFieldStringValue.d.ts.map +0 -1
- package/api/types/DraftFieldStringValue.js +0 -6
- package/api/types/DraftFieldStringValue.js.map +0 -1
- package/api/types/DraftFieldStructValue.d.ts +0 -23
- package/api/types/DraftFieldStructValue.d.ts.map +0 -1
- package/api/types/DraftFieldStructValue.js +0 -6
- package/api/types/DraftFieldStructValue.js.map +0 -1
- package/api/types/DraftFieldStructValueFieldsItem.d.ts +0 -35
- package/api/types/DraftFieldStructValueFieldsItem.d.ts.map +0 -1
- package/api/types/DraftFieldStructValueFieldsItem.js +0 -6
- package/api/types/DraftFieldStructValueFieldsItem.js.map +0 -1
- package/api/types/DraftSchema.d.ts +0 -49
- package/api/types/DraftSchema.d.ts.map +0 -1
- package/api/types/DraftSchema.js.map +0 -1
- package/api/types/DraftSchemaFieldsItem.d.ts +0 -35
- package/api/types/DraftSchemaFieldsItem.d.ts.map +0 -1
- package/api/types/DraftSchemaFieldsItem.js +0 -6
- package/api/types/DraftSchemaFieldsItem.js.map +0 -1
- package/api/types/SchemaFilterPublication.d.ts +0 -15
- package/api/types/SchemaFilterPublication.d.ts.map +0 -1
- package/api/types/SchemaFilterPublication.js +0 -6
- package/api/types/SchemaFilterPublication.js.map +0 -1
- package/api/types/SchemaFilterPublicationEtag.d.ts.map +0 -1
- package/api/types/SchemaFilterPublicationEtag.js +0 -6
- package/api/types/SchemaFilterPublicationEtag.js.map +0 -1
- package/api/types/SchemaFilterPublicationPublishedAt.d.ts.map +0 -1
- package/api/types/SchemaFilterPublicationPublishedAt.js +0 -6
- package/api/types/SchemaFilterPublicationPublishedAt.js.map +0 -1
- package/api/types/SchemaFilterPublicationSlug.d.ts.map +0 -1
- package/api/types/SchemaFilterPublicationSlug.js +0 -6
- package/api/types/SchemaFilterPublicationSlug.js.map +0 -1
- package/api/types/SchemaFilterPublicationUrl.d.ts +0 -20
- package/api/types/SchemaFilterPublicationUrl.d.ts.map +0 -1
- package/api/types/SchemaFilterPublicationUrl.js +0 -6
- package/api/types/SchemaFilterPublicationUrl.js.map +0 -1
- package/api/types/SchemaFilterPublicationVersion.d.ts.map +0 -1
- package/api/types/SchemaFilterPublicationVersion.js +0 -6
- package/api/types/SchemaFilterPublicationVersion.js.map +0 -1
- package/serialization/types/CredentialSchemaPublicationOutput.d.ts +0 -17
- package/serialization/types/CredentialSchemaPublicationOutput.d.ts.map +0 -1
- package/serialization/types/CredentialSchemaPublicationOutput.js.map +0 -1
- package/serialization/types/DraftEnumValue.d.ts.map +0 -1
- package/serialization/types/DraftEnumValue.js.map +0 -1
- package/serialization/types/DraftFieldBooleanValue.d.ts +0 -17
- package/serialization/types/DraftFieldBooleanValue.d.ts.map +0 -1
- package/serialization/types/DraftFieldBooleanValue.js.map +0 -1
- package/serialization/types/DraftFieldDateTimeValue.d.ts +0 -17
- package/serialization/types/DraftFieldDateTimeValue.d.ts.map +0 -1
- package/serialization/types/DraftFieldDateTimeValue.js.map +0 -1
- package/serialization/types/DraftFieldDateValue.d.ts +0 -17
- package/serialization/types/DraftFieldDateValue.d.ts.map +0 -1
- package/serialization/types/DraftFieldDateValue.js.map +0 -1
- package/serialization/types/DraftFieldFileValue.d.ts +0 -16
- package/serialization/types/DraftFieldFileValue.d.ts.map +0 -1
- package/serialization/types/DraftFieldFileValue.js.map +0 -1
- package/serialization/types/DraftFieldLinkValue.d.ts +0 -17
- package/serialization/types/DraftFieldLinkValue.d.ts.map +0 -1
- package/serialization/types/DraftFieldLinkValue.js +0 -48
- package/serialization/types/DraftFieldLinkValue.js.map +0 -1
- package/serialization/types/DraftFieldNumberValue.d.ts +0 -17
- package/serialization/types/DraftFieldNumberValue.d.ts.map +0 -1
- package/serialization/types/DraftFieldNumberValue.js +0 -48
- package/serialization/types/DraftFieldNumberValue.js.map +0 -1
- package/serialization/types/DraftFieldStringValue.d.ts +0 -19
- package/serialization/types/DraftFieldStringValue.d.ts.map +0 -1
- package/serialization/types/DraftFieldStringValue.js +0 -50
- package/serialization/types/DraftFieldStringValue.js.map +0 -1
- package/serialization/types/DraftFieldStructValue.d.ts +0 -19
- package/serialization/types/DraftFieldStructValue.d.ts.map +0 -1
- package/serialization/types/DraftFieldStructValue.js.map +0 -1
- package/serialization/types/DraftFieldStructValueFieldsItem.d.ts +0 -42
- package/serialization/types/DraftFieldStructValueFieldsItem.d.ts.map +0 -1
- package/serialization/types/DraftFieldStructValueFieldsItem.js.map +0 -1
- package/serialization/types/DraftSchema.d.ts +0 -17
- package/serialization/types/DraftSchema.d.ts.map +0 -1
- package/serialization/types/DraftSchema.js +0 -48
- package/serialization/types/DraftSchema.js.map +0 -1
- package/serialization/types/DraftSchemaFieldsItem.d.ts +0 -42
- package/serialization/types/DraftSchemaFieldsItem.d.ts.map +0 -1
- package/serialization/types/DraftSchemaFieldsItem.js.map +0 -1
- package/serialization/types/SchemaFilterPublication.d.ts +0 -22
- package/serialization/types/SchemaFilterPublication.d.ts.map +0 -1
- package/serialization/types/SchemaFilterPublication.js +0 -53
- package/serialization/types/SchemaFilterPublication.js.map +0 -1
- package/serialization/types/SchemaFilterPublicationEtag.d.ts.map +0 -1
- package/serialization/types/SchemaFilterPublicationEtag.js.map +0 -1
- package/serialization/types/SchemaFilterPublicationSlug.d.ts.map +0 -1
- package/serialization/types/SchemaFilterPublicationSlug.js.map +0 -1
- package/serialization/types/SchemaFilterPublicationUrl.d.ts +0 -27
- package/serialization/types/SchemaFilterPublicationUrl.d.ts.map +0 -1
- package/serialization/types/SchemaFilterPublicationUrl.js.map +0 -1
- package/serialization/types/SchemaFilterPublicationVersion.d.ts.map +0 -1
- package/serialization/types/SchemaFilterPublicationVersion.js.map +0 -1
|
@@ -4,6 +4,10 @@ import { CredentialFlavor } from './credential/flavor';
|
|
|
4
4
|
import { Claims, UpdatePayloadWithClaims } from './credential/types';
|
|
5
5
|
import { VerifiableCredentialWithClaims } from './credential/verifiable/with-claims';
|
|
6
6
|
import { ApiClient, BlobInput, Ctor, UpdatePayload, UpdatePayloadWithIssueClaims } from './types';
|
|
7
|
+
export type SchemaPublicationResult = {
|
|
8
|
+
published: boolean;
|
|
9
|
+
error?: string;
|
|
10
|
+
};
|
|
7
11
|
export type CredentialEnvelope<T extends Claims> = {
|
|
8
12
|
isVerifiable: false;
|
|
9
13
|
credential: DraftCredentialWithClaims<T>;
|
|
@@ -18,14 +22,16 @@ export declare class VcDecorator<T extends Claims> {
|
|
|
18
22
|
private claimsModel;
|
|
19
23
|
readonly flavor: CredentialFlavor;
|
|
20
24
|
private claims;
|
|
25
|
+
private vcSchemaMetadata;
|
|
21
26
|
constructor(client: ApiClient, claimsModel: Ctor<T>);
|
|
22
27
|
protected createCredentialFlavor(): CredentialFlavor;
|
|
23
|
-
|
|
24
|
-
getCredentialTerm(): string
|
|
25
|
-
canMap(input: ResourceDraft | ResourceCredential): boolean
|
|
26
|
-
map(input: ResourceDraft): DraftCredentialWithClaims<T
|
|
27
|
-
map(input: ResourceCredential): VerifiableCredentialWithClaims<T
|
|
28
|
+
publishSchema(): Promise<SchemaPublicationResult>;
|
|
29
|
+
getCredentialTerm(): Promise<string>;
|
|
30
|
+
canMap(input: ResourceDraft | ResourceCredential): Promise<boolean>;
|
|
31
|
+
map(input: ResourceDraft): Promise<DraftCredentialWithClaims<T>>;
|
|
32
|
+
map(input: ResourceCredential): Promise<VerifiableCredentialWithClaims<T>>;
|
|
28
33
|
private importBlob;
|
|
34
|
+
private convertUDTToDraftCreate;
|
|
29
35
|
create(request?: UpdatePayloadWithClaims<T>): Promise<DraftCredentialWithClaims<T>>;
|
|
30
36
|
issue(privateKeyId: string, request: UpdatePayloadWithIssueClaims<T>): Promise<VerifiableCredentialWithClaims<T>>;
|
|
31
37
|
loadAsDraft(id: string, revision?: number): Promise<DraftCredentialWithClaims<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential.d.ts","sourceRoot":"","sources":["../../src/documents/credential.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credential.d.ts","sourceRoot":"","sources":["../../src/documents/credential.ts"],"names":[],"mappings":"AACA,OAAO,EAKH,kBAAkB,EAClB,aAAa,EAChB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAGrF,OAAO,EACH,SAAS,EACT,SAAS,EAET,IAAI,EAEJ,aAAa,EACb,4BAA4B,EAE/B,MAAM,SAAS,CAAC;AAKjB,MAAM,MAAM,uBAAuB,GAAG;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,IAAI;IAC/C,YAAY,EAAE,KAAK,CAAC;IACpB,UAAU,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,4BAA4B,CAAC,CAAC,SAAS,MAAM,IAAI;IACzD,YAAY,EAAE,IAAI,CAAC;IACnB,UAAU,EAAE,8BAA8B,CAAC,CAAC,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,4BAA4B,CAAC,CAAC,CAAC,CAAC;AAEzG,qBAAa,WAAW,CAAC,CAAC,SAAS,MAAM;IAMjC,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,WAAW;IANvB,QAAQ,CAAC,MAAM,mBAAiC;IAChD,OAAO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OAAO,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC;CAK/G"}
|
package/documents/credential.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
2
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
13
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,9 +17,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
17
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
18
|
});
|
|
10
19
|
};
|
|
20
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
|
+
};
|
|
11
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
24
|
exports.VcDecorator = void 0;
|
|
25
|
+
const mem_1 = __importDefault(require("mem"));
|
|
13
26
|
const api_1 = require("../api");
|
|
27
|
+
const errors_1 = require("../errors");
|
|
14
28
|
const claims_1 = require("./credential/claims");
|
|
15
29
|
const with_claims_1 = require("./credential/draft/with-claims");
|
|
16
30
|
const flavor_1 = require("./credential/flavor");
|
|
@@ -27,40 +41,86 @@ class VcDecorator {
|
|
|
27
41
|
this.claimsModel = claimsModel;
|
|
28
42
|
this.flavor = this.createCredentialFlavor();
|
|
29
43
|
this.claims = new claims_1.UdtClaims(this.client, this.claimsModel);
|
|
44
|
+
this.vcSchemaMetadata = (0, decorators_1.getVcSchemaMetadataOrThrow)(claimsModel);
|
|
30
45
|
}
|
|
31
46
|
createCredentialFlavor() {
|
|
32
47
|
return new flavor_1.CredentialFlavor();
|
|
33
48
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
publishSchema() {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
if (this.vcSchemaMetadata.slug == null) {
|
|
52
|
+
return { published: false, error: 'A schema requires a slug to be published as stable' };
|
|
53
|
+
}
|
|
54
|
+
if (this.vcSchemaMetadata.owner != null && this.vcSchemaMetadata.owner !== (yield this.client.tenantId())) {
|
|
55
|
+
return { published: false, error: 'A schema with a different owner cannot be published' };
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
const credentialSchema = yield this.client.schemas.schemaCreate({
|
|
59
|
+
data: {
|
|
60
|
+
schema: this.claims.getClaimsSchema(),
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
yield this.client.schemas.schemaPublish(credentialSchema.id, {
|
|
64
|
+
slug: this.vcSchemaMetadata.slug,
|
|
65
|
+
version: this.vcSchemaMetadata.version,
|
|
66
|
+
});
|
|
67
|
+
return { published: true };
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
if (error instanceof errors_1.TruvityError) {
|
|
71
|
+
return { published: false, error: error.message };
|
|
72
|
+
}
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
39
76
|
}
|
|
40
77
|
getCredentialTerm() {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
let publishedCredentialSchema;
|
|
80
|
+
if (this.vcSchemaMetadata.owner == null) {
|
|
81
|
+
const result = yield this.client.schemas.schemaImport({
|
|
82
|
+
data: {
|
|
83
|
+
schema: this.claims.getClaimsSchema(),
|
|
84
|
+
version: this.vcSchemaMetadata.version,
|
|
85
|
+
slug: this.vcSchemaMetadata.slug,
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
publishedCredentialSchema = result.data;
|
|
89
|
+
}
|
|
90
|
+
else if (this.vcSchemaMetadata.slug != null) {
|
|
91
|
+
publishedCredentialSchema = yield this.client.desk.publishedMetaSchemaFetch(this.vcSchemaMetadata.owner, this.vcSchemaMetadata.slug, this.vcSchemaMetadata.version);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
throw new error_1.DocumentedError(error_1.ErrorCode.VcSchemaMissingSlug, 'A VcSchema annotation with an owner value requires a slug value');
|
|
95
|
+
}
|
|
96
|
+
if (publishedCredentialSchema.schema.jsonLdTermName != null) {
|
|
97
|
+
return `${publishedCredentialSchema.schema.jsonLdTermName}Credential`;
|
|
98
|
+
}
|
|
99
|
+
return `${publishedCredentialSchema.slug}v${publishedCredentialSchema.version}Credential`;
|
|
100
|
+
});
|
|
45
101
|
}
|
|
46
102
|
canMap(input) {
|
|
47
|
-
return
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
return input.data.type.includes(yield this.getCredentialTerm());
|
|
105
|
+
});
|
|
48
106
|
}
|
|
49
107
|
map(input) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
if ((0, types_1.isResourceCredential)(input)) {
|
|
110
|
+
// ResourceCredential
|
|
111
|
+
if (!(yield this.canMap(input))) {
|
|
112
|
+
throw new error_1.DocumentedError(error_1.ErrorCode.IncompatibleUDT, `The received ResourceCredential is incompatible with the current VcDecorator instance claims model`);
|
|
113
|
+
}
|
|
114
|
+
return new with_claims_2.VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, input);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
// ResourceDraft
|
|
118
|
+
if (!(yield this.canMap(input))) {
|
|
119
|
+
throw new error_1.DocumentedError(error_1.ErrorCode.IncompatibleUDT, `The received ResourceDraft is incompatible with the current VcDecorator instance claims model`);
|
|
120
|
+
}
|
|
121
|
+
return new with_claims_1.DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, input.data, input);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
64
124
|
}
|
|
65
125
|
importBlob(blob, request) {
|
|
66
126
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -89,16 +149,68 @@ class VcDecorator {
|
|
|
89
149
|
};
|
|
90
150
|
});
|
|
91
151
|
}
|
|
152
|
+
convertUDTToDraftCreate(object) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
let metaSchema;
|
|
155
|
+
let jsonLdVocabs = this.vcSchemaMetadata.jsonLdVocabs;
|
|
156
|
+
let vcJsonSchemas = this.vcSchemaMetadata.vcJsonSchemas;
|
|
157
|
+
if (this.vcSchemaMetadata.owner == null) {
|
|
158
|
+
const claimsSchema = this.claims.getClaimsSchema();
|
|
159
|
+
metaSchema = {
|
|
160
|
+
schema: claimsSchema,
|
|
161
|
+
slug: this.vcSchemaMetadata.slug,
|
|
162
|
+
version: this.vcSchemaMetadata.version,
|
|
163
|
+
};
|
|
164
|
+
if ((jsonLdVocabs === null || jsonLdVocabs === void 0 ? void 0 : jsonLdVocabs.includes(decorators_1.VcSchema.jsonLdVocabUrl)) ||
|
|
165
|
+
(vcJsonSchemas === null || vcJsonSchemas === void 0 ? void 0 : vcJsonSchemas.includes(decorators_1.VcSchema.vcdmJsonSchemaUrl))) {
|
|
166
|
+
const result = yield this.client.schemas.schemaImport({
|
|
167
|
+
data: {
|
|
168
|
+
schema: claimsSchema,
|
|
169
|
+
slug: this.vcSchemaMetadata.slug,
|
|
170
|
+
version: this.vcSchemaMetadata.version,
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
jsonLdVocabs =
|
|
174
|
+
jsonLdVocabs == null
|
|
175
|
+
? undefined
|
|
176
|
+
: jsonLdVocabs.map((x) => (decorators_1.VcSchema.jsonLdVocabUrl === x ? result.data.jsonLdVocabUrl : x));
|
|
177
|
+
vcJsonSchemas =
|
|
178
|
+
vcJsonSchemas == null
|
|
179
|
+
? undefined
|
|
180
|
+
: vcJsonSchemas.map((x) => decorators_1.VcSchema.vcdmJsonSchemaUrl === x ? result.data.vcdmJsonSchemaUrl : x);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
else if (this.vcSchemaMetadata.slug != null) {
|
|
184
|
+
const deskBaseURL = (yield this.client.dids.didDocumentSelfGet()).id.split(':')[2];
|
|
185
|
+
metaSchema = `https://${deskBaseURL}/tenants/${this.vcSchemaMetadata.owner}/meta-schema/${this.vcSchemaMetadata.slug}/v${this.vcSchemaMetadata.version}`;
|
|
186
|
+
if ((jsonLdVocabs === null || jsonLdVocabs === void 0 ? void 0 : jsonLdVocabs.includes(decorators_1.VcSchema.jsonLdVocabUrl)) ||
|
|
187
|
+
(vcJsonSchemas === null || vcJsonSchemas === void 0 ? void 0 : vcJsonSchemas.includes(decorators_1.VcSchema.vcdmJsonSchemaUrl))) {
|
|
188
|
+
const result = yield this.client.desk.publishedMetaSchemaFetch(this.vcSchemaMetadata.owner, this.vcSchemaMetadata.slug, this.vcSchemaMetadata.version);
|
|
189
|
+
jsonLdVocabs =
|
|
190
|
+
jsonLdVocabs == null
|
|
191
|
+
? undefined
|
|
192
|
+
: jsonLdVocabs.map((x) => (decorators_1.VcSchema.jsonLdVocabUrl === x ? result.jsonLdVocabUrl : x));
|
|
193
|
+
vcJsonSchemas =
|
|
194
|
+
vcJsonSchemas == null
|
|
195
|
+
? undefined
|
|
196
|
+
: vcJsonSchemas.map((x) => (decorators_1.VcSchema.vcdmJsonSchemaUrl === x ? result.vcdmJsonSchemaUrl : x));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
throw new error_1.DocumentedError(error_1.ErrorCode.VcSchemaMissingSlug, 'A VcSchema annotation with an owner value requires a slug value');
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
metaSchema,
|
|
204
|
+
jsonLdVocabs,
|
|
205
|
+
vcdmJsonSchemas: vcJsonSchemas,
|
|
206
|
+
values: object != null ? this.claims.marshalValues(object) : undefined,
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
}
|
|
92
210
|
create(request) {
|
|
93
211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
const values = (request === null || request === void 0 ? void 0 : request.claims) ? this.claims.marshalValues(request.claims) : undefined;
|
|
95
|
-
const schema = this.claims.getDraftSchema();
|
|
96
212
|
const { id, etag, revision, data } = yield this.client.drafts.draftCreate({
|
|
97
|
-
data:
|
|
98
|
-
schema,
|
|
99
|
-
values,
|
|
100
|
-
meta: (0, converters_1.draftMetadataToApiDraftMeta)(request === null || request === void 0 ? void 0 : request.metadata),
|
|
101
|
-
},
|
|
213
|
+
data: yield this.convertUDTToDraftCreate((request === null || request === void 0 ? void 0 : request.claims) || null),
|
|
102
214
|
annotations: request === null || request === void 0 ? void 0 : request.annotations,
|
|
103
215
|
labels: request === null || request === void 0 ? void 0 : request.labels,
|
|
104
216
|
idempotencyKey: (0, idempotency_1.generateKey)('create'),
|
|
@@ -108,7 +220,8 @@ class VcDecorator {
|
|
|
108
220
|
}
|
|
109
221
|
issue(privateKeyId, request) {
|
|
110
222
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
-
|
|
223
|
+
const result = yield this.create(request);
|
|
224
|
+
return result.issue(privateKeyId);
|
|
112
225
|
});
|
|
113
226
|
}
|
|
114
227
|
loadAsDraft(id, revision) {
|
|
@@ -165,4 +278,10 @@ class VcDecorator {
|
|
|
165
278
|
}
|
|
166
279
|
}
|
|
167
280
|
exports.VcDecorator = VcDecorator;
|
|
281
|
+
__decorate([
|
|
282
|
+
mem_1.default.decorator(),
|
|
283
|
+
__metadata("design:type", Function),
|
|
284
|
+
__metadata("design:paramtypes", []),
|
|
285
|
+
__metadata("design:returntype", Promise)
|
|
286
|
+
], VcDecorator.prototype, "getCredentialTerm", null);
|
|
168
287
|
//# sourceMappingURL=credential.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential.js","sourceRoot":"","sources":["../../src/documents/credential.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAA0E;AAC1E,gDAAgD;AAChD,gEAA2E;AAC3E,gDAAuD;AAEvD,qEAAqF;AACrF,6CAAwD;AACxD,uCAA2D;AAC3D,mCAQiB;AACjB,mDAA2F;AAC3F,yCAA2D;AAC3D,qDAAkD;AAclD,MAAa,WAAW;IAIpB,YACY,MAAiB,EACjB,WAAoB;QADpB,WAAM,GAAN,MAAM,CAAW;QACjB,gBAAW,GAAX,WAAW,CAAS;QALvB,WAAM,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;QACxC,WAAM,GAAG,IAAI,kBAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAK3D,CAAC;IAEM,sBAAsB;QAC5B,OAAO,IAAI,yBAAgB,EAAE,CAAC;IAClC,CAAC;IAED,MAAM;QACF,MAAM,iBAAiB,GAAG,IAAA,qCAAwB,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAErE,IAAI,CAAC,iBAAiB;YAClB,MAAM,IAAI,uBAAe,CACrB,iBAAS,CAAC,0BAA0B,EACpC,wGAAwG,CAC3G,CAAC;QAE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;CACJ;AAzKD,kCAyKC","sourcesContent":["import { NotFoundError, ResourceCredential, ResourceDraft } from '../api';\nimport { UdtClaims } from './credential/claims';\nimport { DraftCredentialWithClaims } from './credential/draft/with-claims';\nimport { CredentialFlavor } from './credential/flavor';\nimport { Claims, UpdatePayloadWithClaims } from './credential/types';\nimport { VerifiableCredentialWithClaims } from './credential/verifiable/with-claims';\nimport { getContextJsonLdMetadata } from './decorators';\nimport { verifiableCredentialDataSchema } from './schemas';\nimport {\n ApiClient,\n BlobInput,\n CredentialDescriptor,\n Ctor,\n isResourceCredential,\n UpdatePayload,\n UpdatePayloadWithIssueClaims,\n} from './types';\nimport { draftMetadataToApiDraftMeta, strictlyConvertToApiType } from './utils/converters';\nimport { DocumentedError, ErrorCode } from './utils/error';\nimport { generateKey } from './utils/idempotency';\n\nexport type CredentialEnvelope<T extends Claims> = {\n isVerifiable: false;\n credential: DraftCredentialWithClaims<T>;\n};\n\nexport type VerifiableCredentialEnvelope<T extends Claims> = {\n isVerifiable: true;\n credential: VerifiableCredentialWithClaims<T>;\n};\n\nexport type LoadedCredential<T extends Claims> = CredentialEnvelope<T> | VerifiableCredentialEnvelope<T>;\n\nexport class VcDecorator<T extends Claims> {\n readonly flavor = this.createCredentialFlavor();\n private claims = new UdtClaims(this.client, this.claimsModel);\n\n constructor(\n private client: ApiClient,\n private claimsModel: Ctor<T>,\n ) {}\n\n protected createCredentialFlavor(): CredentialFlavor {\n return new CredentialFlavor();\n }\n\n getIri(): string {\n const vcContextMetadata = getContextJsonLdMetadata(this.claimsModel);\n\n if (!vcContextMetadata)\n throw new DocumentedError(\n ErrorCode.VcContextAnnotationMissing,\n \"Can't find IRI information. Make sure you have defined the claims model with the @VcContext decorator.\",\n );\n\n return `${vcContextMetadata.namespace}#${vcContextMetadata.name}`;\n }\n\n getCredentialTerm(): string {\n const vcContextMetadata = getContextJsonLdMetadata(this.claimsModel);\n\n if (!vcContextMetadata)\n throw new DocumentedError(\n ErrorCode.VcContextAnnotationMissing,\n \"Can't find credential term information. Make sure you have defined the claims model with the @VcContext decorator\",\n );\n\n return `${vcContextMetadata.name}Credential`;\n }\n\n canMap(input: ResourceDraft | ResourceCredential): boolean {\n return input.data.type.includes(this.getCredentialTerm());\n }\n\n map(input: ResourceDraft): DraftCredentialWithClaims<T>;\n map(input: ResourceCredential): VerifiableCredentialWithClaims<T>;\n map(input: ResourceDraft | ResourceCredential): VerifiableCredentialWithClaims<T> | DraftCredentialWithClaims<T> {\n if (isResourceCredential(input)) {\n // ResourceCredential\n if (!this.canMap(input)) {\n throw new DocumentedError(\n ErrorCode.IncompatibleUDT,\n `The received ResourceCredential is incompatible with the current VcDecorator instance claims model`,\n );\n }\n\n return new VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, input);\n } else {\n // ResourceDraft\n if (!this.canMap(input)) {\n throw new DocumentedError(\n ErrorCode.IncompatibleUDT,\n `The received ResourceDraft is incompatible with the current VcDecorator instance claims model`,\n );\n }\n\n return new DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, input.data, input);\n }\n }\n\n private async importBlob(blob: BlobInput, request?: UpdatePayload): Promise<CredentialDescriptor> {\n const idempotencyKey = generateKey('importBlob');\n const { blobId, uploadUri } = await this.client.credentials.credentialUpload({\n idempotencyKey,\n });\n\n await fetch(uploadUri, {\n method: 'PUT',\n body: blob,\n });\n\n const resourceCredential = await this.client.credentials.credentialImport({\n annotations: request?.annotations,\n labels: request?.labels,\n blobId,\n idempotencyKey,\n });\n\n return {\n data: strictlyConvertToApiType(verifiableCredentialDataSchema, {\n id: resourceCredential.data.id,\n digestMultibase: resourceCredential.data.digestMultibase,\n }),\n id: resourceCredential.id,\n etag: resourceCredential.etag,\n revision: resourceCredential.revision,\n };\n }\n\n async create(request?: UpdatePayloadWithClaims<T>): Promise<DraftCredentialWithClaims<T>> {\n const values = request?.claims ? this.claims.marshalValues(request.claims) : undefined;\n const schema = this.claims.getDraftSchema();\n\n const { id, etag, revision, data } = await this.client.drafts.draftCreate({\n data: {\n schema,\n values,\n meta: draftMetadataToApiDraftMeta(request?.metadata),\n },\n annotations: request?.annotations,\n labels: request?.labels,\n idempotencyKey: generateKey('create'),\n });\n\n return new DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, data, { id, etag, revision });\n }\n\n async issue(\n privateKeyId: string,\n request: UpdatePayloadWithIssueClaims<T>,\n ): Promise<VerifiableCredentialWithClaims<T>> {\n return (await this.create(request)).issue(privateKeyId);\n }\n\n async loadAsDraft(id: string, revision?: number): Promise<DraftCredentialWithClaims<T>> {\n const resourceDraft = revision\n ? await this.client.drafts.draftRevision(id, revision)\n : await this.client.drafts.draftLatest(id);\n\n return this.map(resourceDraft);\n }\n\n async loadAsCredential(id: string, revision?: number): Promise<VerifiableCredentialWithClaims<T>> {\n const resourceCredential = revision\n ? await this.client.credentials.credentialRevision(id, revision)\n : await this.client.credentials.credentialLatest(id);\n\n return this.map(resourceCredential);\n }\n\n async load(id: string, revision?: number): Promise<LoadedCredential<T>> {\n let verifiableCredential: VerifiableCredentialWithClaims<T> | undefined;\n let draftCredential: DraftCredentialWithClaims<T> | undefined;\n\n try {\n verifiableCredential = await this.loadAsCredential(id, revision);\n } catch (error) {\n if (error instanceof NotFoundError) {\n draftCredential = await this.loadAsDraft(id, revision);\n } else throw error;\n }\n\n if (!draftCredential) {\n if (!verifiableCredential) throw new Error(`Resource with id '${id}' could not be found.`);\n\n return {\n isVerifiable: true,\n credential: verifiableCredential,\n };\n } else {\n return {\n isVerifiable: false,\n credential: draftCredential,\n };\n }\n }\n\n async importCredential(blob: BlobInput, request?: UpdatePayload): Promise<VerifiableCredentialWithClaims<T>> {\n const credential = await this.importBlob(blob, request);\n\n return new VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, credential);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"credential.js","sourceRoot":"","sources":["../../src/documents/credential.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,gCAOg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BACH,YAAY,EAAE,IAAI;oBAClB,UAAU,EAAE,oBAAoB;iBACnC,CAAC;YACN,CAAC;iBAAM,CAAC;gBACJ,OAAO;oBACH,YAAY,EAAE,KAAK;oBACnB,UAAU,EAAE,eAAe;iBAC9B,CAAC;YACN,CAAC;QACL,CAAC;KAAA;IAEK,gBAAgB,CAAC,IAAe,EAAE,OAAuB;;YAC3D,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAExD,OAAO,IAAI,4CAA8B,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACtG,CAAC;KAAA;CACJ;AA5QD,kCA4QC;AAjOS;IADL,aAAG,CAAC,SAAS,EAAE;;;;oDA4Bf","sourcesContent":["import mem from 'mem';\nimport {\n DraftCreate,\n DraftCreateMetaSchema,\n NotFoundError,\n PublishedCredentialSchema,\n ResourceCredential,\n ResourceDraft,\n} from '../api';\nimport { TruvityError } from '../errors';\nimport { UdtClaims } from './credential/claims';\nimport { DraftCredentialWithClaims } from './credential/draft/with-claims';\nimport { CredentialFlavor } from './credential/flavor';\nimport { Claims, UpdatePayloadWithClaims } from './credential/types';\nimport { VerifiableCredentialWithClaims } from './credential/verifiable/with-claims';\nimport { getVcSchemaMetadataOrThrow, VcSchema, VcSchemaMetadata } from './decorators';\nimport { verifiableCredentialDataSchema } from './schemas';\nimport {\n ApiClient,\n BlobInput,\n CredentialDescriptor,\n Ctor,\n isResourceCredential,\n UpdatePayload,\n UpdatePayloadWithIssueClaims,\n UserUpdateClaims,\n} from './types';\nimport { strictlyConvertToApiType } from './utils/converters';\nimport { DocumentedError, ErrorCode } from './utils/error';\nimport { generateKey } from './utils/idempotency';\n\nexport type SchemaPublicationResult = {\n published: boolean;\n error?: string;\n};\n\nexport type CredentialEnvelope<T extends Claims> = {\n isVerifiable: false;\n credential: DraftCredentialWithClaims<T>;\n};\n\nexport type VerifiableCredentialEnvelope<T extends Claims> = {\n isVerifiable: true;\n credential: VerifiableCredentialWithClaims<T>;\n};\n\nexport type LoadedCredential<T extends Claims> = CredentialEnvelope<T> | VerifiableCredentialEnvelope<T>;\n\nexport class VcDecorator<T extends Claims> {\n readonly flavor = this.createCredentialFlavor();\n private claims = new UdtClaims(this.client, this.claimsModel);\n private vcSchemaMetadata: VcSchemaMetadata;\n\n constructor(\n private client: ApiClient,\n private claimsModel: Ctor<T>,\n ) {\n this.vcSchemaMetadata = getVcSchemaMetadataOrThrow(claimsModel);\n }\n\n protected createCredentialFlavor(): CredentialFlavor {\n return new CredentialFlavor();\n }\n\n async publishSchema(): Promise<SchemaPublicationResult> {\n if (this.vcSchemaMetadata.slug == null) {\n return { published: false, error: 'A schema requires a slug to be published as stable' };\n }\n if (this.vcSchemaMetadata.owner != null && this.vcSchemaMetadata.owner !== (await this.client.tenantId())) {\n return { published: false, error: 'A schema with a different owner cannot be published' };\n }\n try {\n const credentialSchema = await this.client.schemas.schemaCreate({\n data: {\n schema: this.claims.getClaimsSchema(),\n },\n });\n await this.client.schemas.schemaPublish(credentialSchema.id, {\n slug: this.vcSchemaMetadata.slug,\n version: this.vcSchemaMetadata.version,\n });\n return { published: true };\n } catch (error) {\n if (error instanceof TruvityError) {\n return { published: false, error: error.message };\n }\n throw error;\n }\n }\n\n @mem.decorator()\n async getCredentialTerm(): Promise<string> {\n let publishedCredentialSchema: PublishedCredentialSchema;\n if (this.vcSchemaMetadata.owner == null) {\n const result = await this.client.schemas.schemaImport({\n data: {\n schema: this.claims.getClaimsSchema(),\n version: this.vcSchemaMetadata.version,\n slug: this.vcSchemaMetadata.slug,\n },\n });\n publishedCredentialSchema = result.data;\n } else if (this.vcSchemaMetadata.slug != null) {\n publishedCredentialSchema = await this.client.desk.publishedMetaSchemaFetch(\n this.vcSchemaMetadata.owner,\n this.vcSchemaMetadata.slug,\n this.vcSchemaMetadata.version,\n );\n } else {\n throw new DocumentedError(\n ErrorCode.VcSchemaMissingSlug,\n 'A VcSchema annotation with an owner value requires a slug value',\n );\n }\n if (publishedCredentialSchema.schema.jsonLdTermName != null) {\n return `${publishedCredentialSchema.schema.jsonLdTermName}Credential`;\n }\n return `${publishedCredentialSchema.slug}v${publishedCredentialSchema.version}Credential`;\n }\n\n async canMap(input: ResourceDraft | ResourceCredential): Promise<boolean> {\n return input.data.type.includes(await this.getCredentialTerm());\n }\n\n async map(input: ResourceDraft): Promise<DraftCredentialWithClaims<T>>;\n async map(input: ResourceCredential): Promise<VerifiableCredentialWithClaims<T>>;\n async map(\n input: ResourceDraft | ResourceCredential,\n ): Promise<VerifiableCredentialWithClaims<T> | DraftCredentialWithClaims<T>> {\n if (isResourceCredential(input)) {\n // ResourceCredential\n if (!(await this.canMap(input))) {\n throw new DocumentedError(\n ErrorCode.IncompatibleUDT,\n `The received ResourceCredential is incompatible with the current VcDecorator instance claims model`,\n );\n }\n\n return new VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, input);\n } else {\n // ResourceDraft\n if (!(await this.canMap(input))) {\n throw new DocumentedError(\n ErrorCode.IncompatibleUDT,\n `The received ResourceDraft is incompatible with the current VcDecorator instance claims model`,\n );\n }\n\n return new DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, input.data, input);\n }\n }\n\n private async importBlob(blob: BlobInput, request?: UpdatePayload): Promise<CredentialDescriptor> {\n const idempotencyKey = generateKey('importBlob');\n const { blobId, uploadUri } = await this.client.credentials.credentialUpload({\n idempotencyKey,\n });\n\n await fetch(uploadUri, {\n method: 'PUT',\n body: blob,\n });\n\n const resourceCredential = await this.client.credentials.credentialImport({\n annotations: request?.annotations,\n labels: request?.labels,\n blobId,\n idempotencyKey,\n });\n\n return {\n data: strictlyConvertToApiType(verifiableCredentialDataSchema, {\n id: resourceCredential.data.id,\n digestMultibase: resourceCredential.data.digestMultibase,\n }),\n id: resourceCredential.id,\n etag: resourceCredential.etag,\n revision: resourceCredential.revision,\n };\n }\n\n private async convertUDTToDraftCreate(object: UserUpdateClaims<T> | null): Promise<DraftCreate> {\n let metaSchema: DraftCreateMetaSchema;\n let jsonLdVocabs = this.vcSchemaMetadata.jsonLdVocabs;\n let vcJsonSchemas = this.vcSchemaMetadata.vcJsonSchemas;\n if (this.vcSchemaMetadata.owner == null) {\n const claimsSchema = this.claims.getClaimsSchema();\n metaSchema = {\n schema: claimsSchema,\n slug: this.vcSchemaMetadata.slug,\n version: this.vcSchemaMetadata.version,\n };\n if (\n jsonLdVocabs?.includes(VcSchema.jsonLdVocabUrl) ||\n vcJsonSchemas?.includes(VcSchema.vcdmJsonSchemaUrl)\n ) {\n const result = await this.client.schemas.schemaImport({\n data: {\n schema: claimsSchema,\n slug: this.vcSchemaMetadata.slug,\n version: this.vcSchemaMetadata.version,\n },\n });\n jsonLdVocabs =\n jsonLdVocabs == null\n ? undefined\n : jsonLdVocabs.map((x) => (VcSchema.jsonLdVocabUrl === x ? result.data.jsonLdVocabUrl : x));\n vcJsonSchemas =\n vcJsonSchemas == null\n ? undefined\n : vcJsonSchemas.map((x) =>\n VcSchema.vcdmJsonSchemaUrl === x ? result.data.vcdmJsonSchemaUrl : x,\n );\n }\n } else if (this.vcSchemaMetadata.slug != null) {\n const deskBaseURL = (await this.client.dids.didDocumentSelfGet()).id.split(':')[2];\n metaSchema = `https://${deskBaseURL}/tenants/${this.vcSchemaMetadata.owner}/meta-schema/${this.vcSchemaMetadata.slug}/v${this.vcSchemaMetadata.version}`;\n if (\n jsonLdVocabs?.includes(VcSchema.jsonLdVocabUrl) ||\n vcJsonSchemas?.includes(VcSchema.vcdmJsonSchemaUrl)\n ) {\n const result = await this.client.desk.publishedMetaSchemaFetch(\n this.vcSchemaMetadata.owner,\n this.vcSchemaMetadata.slug,\n this.vcSchemaMetadata.version,\n );\n jsonLdVocabs =\n jsonLdVocabs == null\n ? undefined\n : jsonLdVocabs.map((x) => (VcSchema.jsonLdVocabUrl === x ? result.jsonLdVocabUrl : x));\n vcJsonSchemas =\n vcJsonSchemas == null\n ? undefined\n : vcJsonSchemas.map((x) => (VcSchema.vcdmJsonSchemaUrl === x ? result.vcdmJsonSchemaUrl : x));\n }\n } else {\n throw new DocumentedError(\n ErrorCode.VcSchemaMissingSlug,\n 'A VcSchema annotation with an owner value requires a slug value',\n );\n }\n return {\n metaSchema,\n jsonLdVocabs,\n vcdmJsonSchemas: vcJsonSchemas,\n values: object != null ? this.claims.marshalValues(object) : undefined,\n };\n }\n\n async create(request?: UpdatePayloadWithClaims<T>): Promise<DraftCredentialWithClaims<T>> {\n const { id, etag, revision, data } = await this.client.drafts.draftCreate({\n data: await this.convertUDTToDraftCreate(request?.claims || null),\n annotations: request?.annotations,\n labels: request?.labels,\n idempotencyKey: generateKey('create'),\n });\n\n return new DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, data, { id, etag, revision });\n }\n\n async issue(\n privateKeyId: string,\n request: UpdatePayloadWithIssueClaims<T>,\n ): Promise<VerifiableCredentialWithClaims<T>> {\n const result = await this.create(request);\n return result.issue(privateKeyId);\n }\n\n async loadAsDraft(id: string, revision?: number): Promise<DraftCredentialWithClaims<T>> {\n const resourceDraft = revision\n ? await this.client.drafts.draftRevision(id, revision)\n : await this.client.drafts.draftLatest(id);\n\n return this.map(resourceDraft);\n }\n\n async loadAsCredential(id: string, revision?: number): Promise<VerifiableCredentialWithClaims<T>> {\n const resourceCredential = revision\n ? await this.client.credentials.credentialRevision(id, revision)\n : await this.client.credentials.credentialLatest(id);\n\n return this.map(resourceCredential);\n }\n\n async load(id: string, revision?: number): Promise<LoadedCredential<T>> {\n let verifiableCredential: VerifiableCredentialWithClaims<T> | undefined;\n let draftCredential: DraftCredentialWithClaims<T> | undefined;\n\n try {\n verifiableCredential = await this.loadAsCredential(id, revision);\n } catch (error) {\n if (error instanceof NotFoundError) {\n draftCredential = await this.loadAsDraft(id, revision);\n } else throw error;\n }\n\n if (!draftCredential) {\n if (!verifiableCredential) throw new Error(`Resource with id '${id}' could not be found.`);\n\n return {\n isVerifiable: true,\n credential: verifiableCredential,\n };\n } else {\n return {\n isVerifiable: false,\n credential: draftCredential,\n };\n }\n }\n\n async importCredential(blob: BlobInput, request?: UpdatePayload): Promise<VerifiableCredentialWithClaims<T>> {\n const credential = await this.importBlob(blob, request);\n\n return new VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, credential);\n }\n}\n"]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
import {
|
|
2
|
+
import { ClaimsSchemaEnumValue } from '../api';
|
|
3
3
|
import type { Ctor } from './types';
|
|
4
4
|
export declare const DECORATOR_PREFIX = "credential-claim";
|
|
5
5
|
export declare const CLAIMS_LIST = "credential-claim:list";
|
|
6
|
-
export declare const CLAIM_DATA_TYPE = "credential-claim:data-type";
|
|
7
6
|
export declare const CLAIM_JSON_LD_CONTEXT = "credential-claim:ld-context";
|
|
7
|
+
export declare const CLAIM_VC_SCHEMA_OPTIONS = "credential-claim:vc-schema-options";
|
|
8
|
+
export declare const CLAIM_VC_EXTERNAL_SCHEMA = "credential-claim:vc-external-schema";
|
|
9
|
+
export declare const CLAIM_VC_SCHEMA_JSON_LD_TERM_NAME = "credential-claim:vc-schema-json-ld-term-name";
|
|
8
10
|
export declare const CLAIM_JSON_LD_TYPE = "credential-claim:ld-type";
|
|
9
11
|
export declare const CLAIM_LINKED_FILE = "credential-claim:linked-file";
|
|
10
12
|
type VcContextOptions = {
|
|
@@ -12,6 +14,20 @@ type VcContextOptions = {
|
|
|
12
14
|
namespace: string;
|
|
13
15
|
vcType?: string[];
|
|
14
16
|
};
|
|
17
|
+
type VcSchemaOptions = {
|
|
18
|
+
slug?: string;
|
|
19
|
+
version?: number;
|
|
20
|
+
owner?: string;
|
|
21
|
+
};
|
|
22
|
+
export type VcSchemaMetadata = {
|
|
23
|
+
slug?: string;
|
|
24
|
+
version: number;
|
|
25
|
+
owner?: string;
|
|
26
|
+
vcJsonSchemas?: string[];
|
|
27
|
+
jsonLdVocabs?: string[];
|
|
28
|
+
jsonLdBaseIri?: string;
|
|
29
|
+
jsonLdTermName?: string;
|
|
30
|
+
};
|
|
15
31
|
type VcContextMetadata = VcContextOptions;
|
|
16
32
|
export type ClaimDescriptor = {
|
|
17
33
|
name: string;
|
|
@@ -19,26 +35,43 @@ export type ClaimDescriptor = {
|
|
|
19
35
|
title?: string;
|
|
20
36
|
isArray?: boolean;
|
|
21
37
|
notEmpty?: boolean;
|
|
22
|
-
enumValuesDescriptor?:
|
|
38
|
+
enumValuesDescriptor?: ClaimsSchemaEnumValue[];
|
|
39
|
+
jsonLdIri?: string;
|
|
40
|
+
jsonLdType?: string;
|
|
23
41
|
};
|
|
24
42
|
type ClaimsListMetadata = ClaimDescriptor[];
|
|
43
|
+
type VcExternalSchemaOptions = {
|
|
44
|
+
jsonLdVocabs?: string[];
|
|
45
|
+
vcJsonSchemas?: string[];
|
|
46
|
+
};
|
|
25
47
|
type VcClaimOptions = {
|
|
26
48
|
title?: string;
|
|
27
49
|
dataType?: Ctor<any>;
|
|
28
50
|
notEmpty?: boolean;
|
|
51
|
+
jsonLdIri?: string;
|
|
52
|
+
jsonLdType?: string;
|
|
29
53
|
};
|
|
30
|
-
export declare const VcClaimWithOptions: ({ title, dataType, notEmpty }?: VcClaimOptions) => PropertyDecorator;
|
|
54
|
+
export declare const VcClaimWithOptions: ({ title, dataType, notEmpty, jsonLdIri, jsonLdType }?: VcClaimOptions) => PropertyDecorator;
|
|
31
55
|
export declare const VcClaim: PropertyDecorator;
|
|
32
56
|
export declare const VcNotEmptyClaim: PropertyDecorator;
|
|
57
|
+
export declare const VcClaimJsonLdIri: (jsonLdIri: string) => PropertyDecorator;
|
|
58
|
+
export declare const VcClaimJsonLdType: (jsonLdType: string) => PropertyDecorator;
|
|
33
59
|
export declare const VcClaimTitle: (title: string) => PropertyDecorator;
|
|
34
60
|
export declare const VcArrayClaim: (dataType: Ctor<any>) => PropertyDecorator;
|
|
35
|
-
export declare const VcStringEnumClaim: (value:
|
|
61
|
+
export declare const VcStringEnumClaim: (value: ClaimsSchemaEnumValue[]) => PropertyDecorator;
|
|
62
|
+
export declare const VcExternalSchema: (options: VcExternalSchemaOptions) => ClassDecorator;
|
|
36
63
|
export declare const VcContext: (options: VcContextOptions) => ClassDecorator;
|
|
37
64
|
export declare const VcClaimType: (jsonLdType: string) => PropertyDecorator;
|
|
65
|
+
export declare const VcSchema: {
|
|
66
|
+
(options?: VcSchemaOptions): ClassDecorator;
|
|
67
|
+
jsonLdVocabUrl: string;
|
|
68
|
+
vcdmJsonSchemaUrl: string;
|
|
69
|
+
};
|
|
70
|
+
export declare const VcSchemaJsonLdTermName: (value: string) => ClassDecorator;
|
|
38
71
|
export declare const getTsDataTypeMetadata: (target: Ctor<any>, propertyKey: string) => Ctor<any> | undefined;
|
|
39
|
-
export declare const getClaimDataTypeMetadata: (target: Ctor<any>, propertyKey: string) => Ctor<any> | undefined;
|
|
40
|
-
export declare const getClaimJsonLdTypeMetadata: (target: Ctor<any>, propertyKey: string) => string | undefined;
|
|
41
72
|
export declare const getContextJsonLdMetadata: (target: Ctor<any>) => VcContextMetadata | undefined;
|
|
73
|
+
export declare const getVcSchemaMetadata: (target: Ctor<any>) => VcSchemaMetadata | undefined;
|
|
74
|
+
export declare const getVcSchemaMetadataOrThrow: (target: Ctor<any>) => VcSchemaMetadata;
|
|
42
75
|
export declare const getRegisteredClaimsList: (target: Ctor<any>) => ClaimsListMetadata;
|
|
43
76
|
export {};
|
|
44
77
|
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/documents/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/documents/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,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