diff --git a/.env.sample b/.env.sample index 060c05e2..6cb71209 100644 --- a/.env.sample +++ b/.env.sample @@ -26,6 +26,7 @@ windowMs= maxRateLimit= # Specify Did contract address DID_CONTRACT_ADDRESS= + # Specify Bcovrin test genesis BCOVRIN_TEST_GENESIS=`{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node1","blskey":"4N8aUNHSgjQVgkpm8nhNEfDf6txHznoYREg9kirmJrkivgL4oSEimFF6nsQ6M41QvhM2Z33nves5vfSn9n1UwNFJBYtWVnHYMATn76vLuL3zU88KyeAYcHfsih3He6UHcXDxcaecHVz6jhCYz1P2UZn2bDVruL5wXpehgBfBaLKm3Ba","blskey_pop":"RahHYiCvoNCtPTrVtP7nMC5eTYrsUA8WjXbdhNc8debh1agE9bGiJxWBXYNFbnJXoXhWFMvyqhqhRoq737YQemH5ik9oL7R4NTTCz2LEZhkgLJzB3QRQqJyBNyv7acbdHrAT8nQ9UkLbaVL9NBpnWXBTw4LEMePaSHEw66RzPNdAX1","client_ip":"138.197.138.255","client_port":9702,"node_ip":"138.197.138.255","node_port":9701,"services":["VALIDATOR"]},"dest":"Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv"},"metadata":{"from":"Th7MpTaRZVRYnPiabds81Y"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62"},"ver":"1"} {"reqSignature":{},"txn":{"data":{"data":{"alias":"Node2","blskey":"37rAPpXVoxzKhz7d9gkUe52XuXryuLXoM6P6LbWDB7LSbG62Lsb33sfG7zqS8TK1MXwuCHj1FKNzVpsnafmqLG1vXN88rt38mNFs9TENzm4QHdBzsvCuoBnPH7rpYYDo9DZNJePaDvRvqJKByCabubJz3XXKbEeshzpz4Ma5QYpJqjk","blskey_pop":"Qr658mWZ2YC8JXGXwMDQTzuZCWF7NK9EwxphGmcBvCh6ybUuLxbG65nsX4JvD4SPNtkJ2w9ug1yLTj6fgmuDg41TgECXjLCij3RMsV8CwewBVgVN67wsA45DFWvqvLtu4rjNnE9JbdFTc1Z4WCPA3Xan44K1HoHAq9EVeaRYs8zoF5","client_ip":"138.197.138.255","client_port":9704,"node_ip":"138.197.138.255","node_port":9703,"services":["VALIDATOR"]},"dest":"8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb"},"metadata":{"from":"EbP4aYNeTHL6q385GuVpRV"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"1ac8aece2a18ced660fef8694b61aac3af08ba875ce3026a160acbc3a3af35fc"},"ver":"1"} diff --git a/Dockerfile b/Dockerfile index 631d3e01..aa3b1303 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,12 +51,12 @@ WORKDIR /app # Copy package.json and yarn.lock files COPY package.json yarn.lock ./ -# Install dependencies -RUN yarn install --frozen-lockfile - # Copy the rest of the application code COPY . . +# Install dependencies +RUN yarn install --frozen-lockfile + RUN yarn global add patch-package # Build the application diff --git a/jest.config.ts b/jest.config.ts index b3f79cc0..93e994ce 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -4,8 +4,8 @@ import base from './jest.config.base' const config: Config.InitialOptions = { ...base, - name: 'afj-controller', - displayName: 'afj-controller', + name: 'credo-controller', + displayName: 'credo-controller', testTimeout: 120000, } diff --git a/package.json b/package.json index a3f0d33c..a5edce5d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@aries-framework/rest", + "name": "credo-controller", "main": "build/index", "types": "build/index", "version": "0.9.4", @@ -28,6 +28,8 @@ "tsoa": "tsoa spec-and-routes", "dev": "tsoa spec-and-routes && tsnd --respawn samples/sampleWithApp.ts", "build": "yarn run clean && yarn run compile", + "prestart:dev": "yarn run clean && yarn run compile", + "start:dev": "./bin/afj-rest.js --config ./samples/cliConfig.json", "clean": "rimraf -rf ./build", "compile": "tsoa spec-and-routes && tsc -p tsconfig.build.json", "prepublishOnly": "yarn run build", @@ -37,7 +39,7 @@ "validate": "yarn lint && yarn check-types && yarn check-format" }, "dependencies": { - "@ayanworks/credo-polygon-w3c-module": "0.0.2-alpha.10", + "@ayanworks/credo-polygon-w3c-module": "1.0.0", "@credo-ts/anoncreds": "0.5.3", "@credo-ts/askar": "0.5.3", "@credo-ts/core": "0.5.3", @@ -92,15 +94,15 @@ "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "^2.27.5", "eslint-plugin-prettier": "^4.2.1", - "jest": "^27.3.1", + "jest": "^29.7.0", "ngrok": "^4.3.1", "prettier": "^2.8.8", "supertest": "^6.2.3", - "ts-jest": "^27.0.7", + "ts-jest": "^29.1.2", "ts-node-dev": "^2.0.0", "typescript": "^5.3.3" }, "engines": { - "node": ">=18" + "node": "18.19.0" } } diff --git a/patches/@credo-ts+anoncreds+0.5.3+001+fix: Extensible model confict in Anoncreds and Did.patch b/patches/@credo-ts+anoncreds+0.5.3+001+fix: Extensible model confict in Anoncreds and Did.patch new file mode 100644 index 00000000..55cba085 --- /dev/null +++ b/patches/@credo-ts+anoncreds+0.5.3+001+fix: Extensible model confict in Anoncreds and Did.patch @@ -0,0 +1,272 @@ +diff --git a/node_modules/@credo-ts/anoncreds/build/AnonCredsApi.d.ts b/node_modules/@credo-ts/anoncreds/build/AnonCredsApi.d.ts +index e9d0a20..479b157 100644 +--- a/node_modules/@credo-ts/anoncreds/build/AnonCredsApi.d.ts ++++ b/node_modules/@credo-ts/anoncreds/build/AnonCredsApi.d.ts +@@ -1,7 +1,7 @@ + import type { AnonCredsCreateLinkSecretOptions, AnonCredsRegisterCredentialDefinitionOptions, AnonCredsRegisterRevocationRegistryDefinitionOptions, AnonCredsRegisterRevocationStatusListOptions, AnonCredsUpdateRevocationStatusListOptions } from './AnonCredsApiOptions'; + import type { AnonCredsSchema } from './models'; + import type { GetCredentialDefinitionReturn, GetCredentialsOptions, GetRevocationRegistryDefinitionReturn, GetRevocationStatusListReturn, GetSchemaReturn, RegisterCredentialDefinitionReturn, RegisterSchemaReturn, RegisterRevocationRegistryDefinitionReturn, RegisterRevocationStatusListReturn } from './services'; +-import type { Extensible } from './services/registry/base'; ++import type { CredoExtensible } from './services/registry/base'; + import type { SimpleQuery } from '@credo-ts/core'; + import { AgentContext } from '@credo-ts/core'; + import { AnonCredsModuleConfig } from './AnonCredsModuleConfig'; +@@ -41,28 +41,28 @@ export declare class AnonCredsApi { + * with the {@link schemaId} + */ + getSchema(schemaId: string): Promise; +- registerSchema(options: AnonCredsRegisterSchema): Promise; ++ registerSchema(options: AnonCredsRegisterSchema): Promise; + getCreatedSchemas(query: SimpleQuery): Promise; + /** + * Retrieve a {@link GetCredentialDefinitionReturn} from the registry associated + * with the {@link credentialDefinitionId} + */ + getCredentialDefinition(credentialDefinitionId: string): Promise; +- registerCredentialDefinition(options: AnonCredsRegisterCredentialDefinition): Promise; ++ registerCredentialDefinition(options: AnonCredsRegisterCredentialDefinition): Promise; + getCreatedCredentialDefinitions(query: SimpleQuery): Promise; + /** + * Retrieve a {@link AnonCredsRevocationRegistryDefinition} from the registry associated + * with the {@link revocationRegistryDefinitionId} + */ + getRevocationRegistryDefinition(revocationRegistryDefinitionId: string): Promise; +- registerRevocationRegistryDefinition(options: AnonCredsRegisterRevocationRegistryDefinition): Promise; ++ registerRevocationRegistryDefinition(options: AnonCredsRegisterRevocationRegistryDefinition): Promise; + /** + * Retrieve the {@link AnonCredsRevocationStatusList} for the given {@link timestamp} from the registry associated + * with the {@link revocationRegistryDefinitionId} + */ + getRevocationStatusList(revocationRegistryDefinitionId: string, timestamp: number): Promise; +- registerRevocationStatusList(options: AnonCredsRegisterRevocationStatusList): Promise; +- updateRevocationStatusList(options: AnonCredsUpdateRevocationStatusList): Promise; ++ registerRevocationStatusList(options: AnonCredsRegisterRevocationStatusList): Promise; ++ updateRevocationStatusList(options: AnonCredsUpdateRevocationStatusList): Promise; + getCredential(id: string): Promise; + getCredentials(options: GetCredentialsOptions): Promise; + private storeRevocationRegistryDefinitionRecord; +@@ -74,23 +74,23 @@ export declare class AnonCredsApi { + export interface AnonCredsRegisterCredentialDefinitionApiOptions { + supportRevocation: boolean; + } +-interface AnonCredsRegisterCredentialDefinition { ++interface AnonCredsRegisterCredentialDefinition { + credentialDefinition: AnonCredsRegisterCredentialDefinitionOptions; + options: T & AnonCredsRegisterCredentialDefinitionApiOptions; + } +-interface AnonCredsRegisterSchema { ++interface AnonCredsRegisterSchema { + schema: AnonCredsSchema; + options: T; + } +-interface AnonCredsRegisterRevocationRegistryDefinition { ++interface AnonCredsRegisterRevocationRegistryDefinition { + revocationRegistryDefinition: AnonCredsRegisterRevocationRegistryDefinitionOptions; + options: T; + } +-interface AnonCredsRegisterRevocationStatusList { ++interface AnonCredsRegisterRevocationStatusList { + revocationStatusList: AnonCredsRegisterRevocationStatusListOptions; + options: T; + } +-interface AnonCredsUpdateRevocationStatusList { ++interface AnonCredsUpdateRevocationStatusList { + revocationStatusList: AnonCredsUpdateRevocationStatusListOptions; + options: T; + } +diff --git a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts +index 2980520..0304d87 100644 +--- a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts ++++ b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts +@@ -1,9 +1,9 @@ +-import type { Extensible } from '../services/registry/base'; ++import type { CredoExtensible } from '../services/registry/base'; + export declare enum AnonCredsCredentialDefinitionRecordMetadataKeys { + CredentialDefinitionRegistrationMetadata = "_internal/anonCredsCredentialDefinitionRegistrationMetadata", + CredentialDefinitionMetadata = "_internal/anonCredsCredentialDefinitionMetadata" + } + export type AnonCredsCredentialDefinitionRecordMetadata = { +- [AnonCredsCredentialDefinitionRecordMetadataKeys.CredentialDefinitionRegistrationMetadata]: Extensible; +- [AnonCredsCredentialDefinitionRecordMetadataKeys.CredentialDefinitionMetadata]: Extensible; ++ [AnonCredsCredentialDefinitionRecordMetadataKeys.CredentialDefinitionRegistrationMetadata]: CredoExtensible; ++ [AnonCredsCredentialDefinitionRecordMetadataKeys.CredentialDefinitionMetadata]: CredoExtensible; + }; +diff --git a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts +index 25aea87..1b0c4aa 100644 +--- a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts ++++ b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts +@@ -1,9 +1,9 @@ +-import type { Extensible } from '../services/registry/base'; ++import type { CredoExtensible } from '../services/registry/base'; + export declare enum AnonCredsRevocationRegistryDefinitionRecordMetadataKeys { + RevocationRegistryDefinitionRegistrationMetadata = "_internal/anonCredsRevocationRegistryDefinitionRegistrationMetadata", + RevocationRegistryDefinitionMetadata = "_internal/anonCredsRevocationRegistryDefinitionMetadata" + } + export type AnonCredsRevocationRegistryDefinitionRecordMetadata = { +- [AnonCredsRevocationRegistryDefinitionRecordMetadataKeys.RevocationRegistryDefinitionRegistrationMetadata]: Extensible; +- [AnonCredsRevocationRegistryDefinitionRecordMetadataKeys.RevocationRegistryDefinitionMetadata]: Extensible; ++ [AnonCredsRevocationRegistryDefinitionRecordMetadataKeys.RevocationRegistryDefinitionRegistrationMetadata]: CredoExtensible; ++ [AnonCredsRevocationRegistryDefinitionRecordMetadataKeys.RevocationRegistryDefinitionMetadata]: CredoExtensible; + }; +diff --git a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts +index 452ec04..f66058d 100644 +--- a/node_modules/@credo-ts/anoncreds/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts ++++ b/node_modules/@credo-ts/anoncreds/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts +@@ -1,9 +1,9 @@ +-import type { Extensible } from '../services/registry/base'; ++import type { CredoExtensible } from '../services/registry/base'; + export declare enum AnonCredsSchemaRecordMetadataKeys { + SchemaRegistrationMetadata = "_internal/anonCredsSchemaRegistrationMetadata", + SchemaMetadata = "_internal/anonCredsSchemaMetadata" + } + export type AnonCredsSchemaRecordMetadata = { +- [AnonCredsSchemaRecordMetadataKeys.SchemaRegistrationMetadata]: Extensible; +- [AnonCredsSchemaRecordMetadataKeys.SchemaMetadata]: Extensible; ++ [AnonCredsSchemaRecordMetadataKeys.SchemaRegistrationMetadata]: CredoExtensible; ++ [AnonCredsSchemaRecordMetadataKeys.SchemaMetadata]: CredoExtensible; + }; +diff --git a/node_modules/@credo-ts/anoncreds/build/services/registry/CredentialDefinitionOptions.d.ts b/node_modules/@credo-ts/anoncreds/build/services/registry/CredentialDefinitionOptions.d.ts +index 95c0949..aa82d57 100644 +--- a/node_modules/@credo-ts/anoncreds/build/services/registry/CredentialDefinitionOptions.d.ts ++++ b/node_modules/@credo-ts/anoncreds/build/services/registry/CredentialDefinitionOptions.d.ts +@@ -1,14 +1,14 @@ +-import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, Extensible } from './base'; ++import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, CredoExtensible } from './base'; + import type { AnonCredsCredentialDefinition } from '../../models/registry'; + export interface GetCredentialDefinitionReturn { + credentialDefinition?: AnonCredsCredentialDefinition; + credentialDefinitionId: string; + resolutionMetadata: AnonCredsResolutionMetadata; +- credentialDefinitionMetadata: Extensible; ++ credentialDefinitionMetadata: CredoExtensible; + } + export interface RegisterCredentialDefinitionOptions { + credentialDefinition: AnonCredsCredentialDefinition; +- options: Extensible; ++ options: CredoExtensible; + } + export interface RegisterCredentialDefinitionReturnStateFailed extends AnonCredsOperationStateFailed { + credentialDefinition?: AnonCredsCredentialDefinition; +@@ -29,6 +29,6 @@ export interface RegisterCredentialDefinitionReturnStateAction extends AnonCreds + export interface RegisterCredentialDefinitionReturn { + jobId?: string; + credentialDefinitionState: RegisterCredentialDefinitionReturnStateWait | RegisterCredentialDefinitionReturnStateAction | RegisterCredentialDefinitionReturnStateFinished | RegisterCredentialDefinitionReturnStateFailed; +- credentialDefinitionMetadata: Extensible; +- registrationMetadata: Extensible; ++ credentialDefinitionMetadata: CredoExtensible; ++ registrationMetadata: CredoExtensible; + } +diff --git a/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationRegistryDefinitionOptions.d.ts b/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationRegistryDefinitionOptions.d.ts +index e911d79..df4fa0b 100644 +--- a/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationRegistryDefinitionOptions.d.ts ++++ b/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationRegistryDefinitionOptions.d.ts +@@ -1,14 +1,14 @@ +-import type { AnonCredsOperationStateWait, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsResolutionMetadata, Extensible, AnonCredsOperationStateAction } from './base'; ++import type { AnonCredsOperationStateWait, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsResolutionMetadata, CredoExtensible, AnonCredsOperationStateAction } from './base'; + import type { AnonCredsRevocationRegistryDefinition } from '../../models/registry'; + export interface GetRevocationRegistryDefinitionReturn { + revocationRegistryDefinition?: AnonCredsRevocationRegistryDefinition; + revocationRegistryDefinitionId: string; + resolutionMetadata: AnonCredsResolutionMetadata; +- revocationRegistryDefinitionMetadata: Extensible; ++ revocationRegistryDefinitionMetadata: CredoExtensible; + } + export interface RegisterRevocationRegistryDefinitionOptions { + revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition; +- options: Extensible; ++ options: CredoExtensible; + } + export interface RegisterRevocationRegistryDefinitionReturnStateAction extends AnonCredsOperationStateAction { + revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition; +@@ -29,6 +29,6 @@ export interface RegisterRevocationRegistryDefinitionReturnStateFinished extends + export interface RegisterRevocationRegistryDefinitionReturn { + jobId?: string; + revocationRegistryDefinitionState: RegisterRevocationRegistryDefinitionReturnStateWait | RegisterRevocationRegistryDefinitionReturnStateAction | RegisterRevocationRegistryDefinitionReturnStateFailed | RegisterRevocationRegistryDefinitionReturnStateFinished; +- revocationRegistryDefinitionMetadata: Extensible; +- registrationMetadata: Extensible; ++ revocationRegistryDefinitionMetadata: CredoExtensible; ++ registrationMetadata: CredoExtensible; + } +diff --git a/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationStatusListOptions.d.ts b/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationStatusListOptions.d.ts +index b5ee11d..01b38dd 100644 +--- a/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationStatusListOptions.d.ts ++++ b/node_modules/@credo-ts/anoncreds/build/services/registry/RevocationStatusListOptions.d.ts +@@ -1,16 +1,16 @@ +-import type { AnonCredsOperationStateWait, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsResolutionMetadata, Extensible, AnonCredsOperationStateAction } from './base'; ++import type { AnonCredsOperationStateWait, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsResolutionMetadata, CredoExtensible, AnonCredsOperationStateAction } from './base'; + import type { AnonCredsRevocationStatusList } from '../../models/registry'; + import type { Optional } from '@credo-ts/core'; + export interface GetRevocationStatusListReturn { + revocationStatusList?: AnonCredsRevocationStatusList; + resolutionMetadata: AnonCredsResolutionMetadata; +- revocationStatusListMetadata: Extensible; ++ revocationStatusListMetadata: CredoExtensible; + } + export type AnonCredsRevocationStatusListWithoutTimestamp = Omit; + export type AnonCredsRevocationStatusListWithOptionalTimestamp = Optional; + export interface RegisterRevocationStatusListOptions { + revocationStatusList: AnonCredsRevocationStatusListWithoutTimestamp; +- options: Extensible; ++ options: CredoExtensible; + } + export interface RegisterRevocationStatusListReturnStateAction extends AnonCredsOperationStateAction { + revocationStatusList: AnonCredsRevocationStatusListWithOptionalTimestamp; +@@ -27,6 +27,6 @@ export interface RegisterRevocationStatusListReturnStateFinished extends AnonCre + export interface RegisterRevocationStatusListReturn { + jobId?: string; + revocationStatusListState: RegisterRevocationStatusListReturnStateWait | RegisterRevocationStatusListReturnStateAction | RegisterRevocationStatusListReturnStateFailed | RegisterRevocationStatusListReturnStateFinished; +- revocationStatusListMetadata: Extensible; +- registrationMetadata: Extensible; ++ revocationStatusListMetadata: CredoExtensible; ++ registrationMetadata: CredoExtensible; + } +diff --git a/node_modules/@credo-ts/anoncreds/build/services/registry/SchemaOptions.d.ts b/node_modules/@credo-ts/anoncreds/build/services/registry/SchemaOptions.d.ts +index 2743b39..6aee13e 100644 +--- a/node_modules/@credo-ts/anoncreds/build/services/registry/SchemaOptions.d.ts ++++ b/node_modules/@credo-ts/anoncreds/build/services/registry/SchemaOptions.d.ts +@@ -1,14 +1,14 @@ +-import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, Extensible } from './base'; ++import type { AnonCredsOperationStateAction, AnonCredsOperationStateFailed, AnonCredsOperationStateFinished, AnonCredsOperationStateWait, AnonCredsResolutionMetadata, CredoExtensible } from './base'; + import type { AnonCredsSchema } from '../../models/registry'; + export interface GetSchemaReturn { + schema?: AnonCredsSchema; + schemaId: string; + resolutionMetadata: AnonCredsResolutionMetadata; +- schemaMetadata: Extensible; ++ schemaMetadata: CredoExtensible; + } + export interface RegisterSchemaOptions { + schema: AnonCredsSchema; +- options: Extensible; ++ options: CredoExtensible; + } + export interface RegisterSchemaReturnStateFailed extends AnonCredsOperationStateFailed { + schema?: AnonCredsSchema; +@@ -29,6 +29,6 @@ export interface RegisterSchemaReturnStateWait extends AnonCredsOperationStateWa + export interface RegisterSchemaReturn { + jobId?: string; + schemaState: RegisterSchemaReturnStateWait | RegisterSchemaReturnStateAction | RegisterSchemaReturnStateFinished | RegisterSchemaReturnStateFailed; +- schemaMetadata: Extensible; +- registrationMetadata: Extensible; ++ schemaMetadata: CredoExtensible; ++ registrationMetadata: CredoExtensible; + } +diff --git a/node_modules/@credo-ts/anoncreds/build/services/registry/base.d.ts b/node_modules/@credo-ts/anoncreds/build/services/registry/base.d.ts +index 3b37667..931bcc6 100644 +--- a/node_modules/@credo-ts/anoncreds/build/services/registry/base.d.ts ++++ b/node_modules/@credo-ts/anoncreds/build/services/registry/base.d.ts +@@ -1,4 +1,4 @@ +-export type Extensible = Record; ++export type CredoExtensible = Record; + export interface AnonCredsOperationStateWait { + state: 'wait'; + } +@@ -13,7 +13,7 @@ export interface AnonCredsOperationStateFailed { + state: 'failed'; + reason: string; + } +-export interface AnonCredsResolutionMetadata extends Extensible { ++export interface AnonCredsResolutionMetadata extends CredoExtensible { + error?: 'invalid' | 'notFound' | 'unsupportedAnonCredsMethod' | string; + message?: string; + } diff --git a/patches/@credo-ts+core+0.5.3+004+added-prettyVc-in-JsonCredential-interface.patch b/patches/@credo-ts+core+0.5.3+004+added-prettyVc-in-JsonCredential-interface.patch new file mode 100644 index 00000000..32598651 --- /dev/null +++ b/patches/@credo-ts+core+0.5.3+004+added-prettyVc-in-JsonCredential-interface.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/@credo-ts/core/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts b/node_modules/@credo-ts/core/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts +index d12468b..ae70f36 100644 +--- a/node_modules/@credo-ts/core/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts ++++ b/node_modules/@credo-ts/core/build/modules/credentials/formats/jsonld/JsonLdCredentialFormat.d.ts +@@ -10,6 +10,8 @@ export interface JsonCredential { + issuanceDate: string; + expirationDate?: string; + credentialSubject: SingleOrArray; ++ //TODO change type ++ prettyVc?: any; + [key: string]: unknown; + } + /** diff --git a/patches/@credo-ts+core+0.5.3+005+commenting validationPresentation to avoid abandoned issue.patch b/patches/@credo-ts+core+0.5.3+005+commenting validationPresentation to avoid abandoned issue.patch new file mode 100644 index 00000000..90cb11dd --- /dev/null +++ b/patches/@credo-ts+core+0.5.3+005+commenting validationPresentation to avoid abandoned issue.patch @@ -0,0 +1,14 @@ +diff --git a/node_modules/@credo-ts/core/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js b/node_modules/@credo-ts/core/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js +index 006d870..da56801 100644 +--- a/node_modules/@credo-ts/core/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js ++++ b/node_modules/@credo-ts/core/build/modules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.js +@@ -170,7 +170,8 @@ class DifPresentationExchangeProofFormatService { + try { + ps.validatePresentationDefinition(request.presentation_definition); + ps.validatePresentationSubmission(jsonPresentation.presentation_submission); +- ps.validatePresentation(request.presentation_definition, parsedPresentation); ++ // FIXME: Commenting validatePresentation() for now due to intermittent abandoned issue ++ //ps.validatePresentation(request.presentation_definition, parsedPresentation); + let verificationResult; + // FIXME: for some reason it won't accept the input if it doesn't know + // whether it's a JWT or JSON-LD VP even though the input is the same. diff --git a/patches/@credo-ts+core+0.5.3+006+w3c-issuance-without-holder-did-negotiaton.patch b/patches/@credo-ts+core+0.5.3+006+w3c-issuance-without-holder-did-negotiaton.patch new file mode 100644 index 00000000..dcf25eaf --- /dev/null +++ b/patches/@credo-ts+core+0.5.3+006+w3c-issuance-without-holder-did-negotiaton.patch @@ -0,0 +1,12 @@ +diff --git a/node_modules/@credo-ts/core/build/modules/credentials/protocol/v2/V2CredentialProtocol.js b/node_modules/@credo-ts/core/build/modules/credentials/protocol/v2/V2CredentialProtocol.js +index fb1fb9d..b519694 100644 +--- a/node_modules/@credo-ts/core/build/modules/credentials/protocol/v2/V2CredentialProtocol.js ++++ b/node_modules/@credo-ts/core/build/modules/credentials/protocol/v2/V2CredentialProtocol.js +@@ -97,7 +97,6 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc + let credentialRecord = await this.findByProperties(messageContext.agentContext, { + threadId: proposalMessage.threadId, + role: models_1.CredentialRole.Issuer, +- connectionId: connection === null || connection === void 0 ? void 0 : connection.id, + }); + const formatServices = this.getFormatServicesFromMessage(proposalMessage.formats); + if (formatServices.length === 0) { diff --git a/patches/@credo-ts+tenants+0.5.3+001+cache-tenant-record-patch.patch b/patches/@credo-ts+tenants+0.5.3+001+cache-tenant-record-patch.patch new file mode 100644 index 00000000..75e379e8 --- /dev/null +++ b/patches/@credo-ts+tenants+0.5.3+001+cache-tenant-record-patch.patch @@ -0,0 +1,56 @@ +diff --git a/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.d.ts b/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.d.ts +index 91bb8f4..b4dae61 100644 +--- a/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.d.ts ++++ b/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.d.ts +@@ -1,5 +1,5 @@ + import type { TenantRecord } from '../repository'; +-import type { AgentContextProvider, UpdateAssistantUpdateOptions } from '@credo-ts/core'; ++import type { AgentContextProvider, UpdateAssistantUpdateOptions , CacheModule, InMemoryLruCache } from '@credo-ts/core'; + import { AgentContext, EventEmitter, Logger } from '@credo-ts/core'; + import { TenantRecordService } from '../services'; + import { TenantSessionCoordinator } from './TenantSessionCoordinator'; +@@ -9,7 +9,9 @@ export declare class TenantAgentContextProvider implements AgentContextProvider + private eventEmitter; + private logger; + private tenantSessionCoordinator; +- constructor(tenantRecordService: TenantRecordService, rootAgentContext: AgentContext, eventEmitter: EventEmitter, tenantSessionCoordinator: TenantSessionCoordinator, logger: Logger); ++ private cacheModule; ++ private inMemoryLruCache; ++ constructor(tenantRecordService: TenantRecordService, rootAgentContext: AgentContext, eventEmitter: EventEmitter, tenantSessionCoordinator: TenantSessionCoordinator, logger: Logger, cache: InMemoryLruCache); + getAgentContextForContextCorrelationId(contextCorrelationId: string): Promise; + getContextForInboundMessage(inboundMessage: unknown, options?: { + contextCorrelationId?: string; +diff --git a/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.js b/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.js +index d491d4e..d60ec79 100644 +--- a/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.js ++++ b/node_modules/@credo-ts/tenants/build/context/TenantAgentContextProvider.js +@@ -24,16 +24,28 @@ let TenantAgentContextProvider = class TenantAgentContextProvider { + this.eventEmitter = eventEmitter; + this.tenantSessionCoordinator = tenantSessionCoordinator; + this.logger = logger; ++ this.cache = new core_1.CacheModule({ ++ cache: new core_1.InMemoryLruCache({ limit: 100 }), ++ }); + // Start listener for newly created routing keys, so we can register a mapping for each new key for the tenant + this.listenForRoutingKeyCreatedEvents(); + } + async getAgentContextForContextCorrelationId(contextCorrelationId) { ++ this.logger.debug('debug ========= Inside getAgentContextForContextCorrelationId') + // It could be that the root agent context is requested, in that case we return the root agent context + if (contextCorrelationId === this.rootAgentContext.contextCorrelationId) { + return this.rootAgentContext; + } + // TODO: maybe we can look at not having to retrieve the tenant record if there's already a context available. +- const tenantRecord = await this.tenantRecordService.getTenantById(this.rootAgentContext, contextCorrelationId); ++ this.logger.debug('debug ========= Get tenantRecord from cache') ++ let tenantRecord = await this.cache.config.cache.get(this.rootAgentContext, `contextCorrelationId-${contextCorrelationId}`) ++ if(!tenantRecord) { ++ // TODO: maybe we can look at not having to retrieve the tenant record if there's already a context available. ++ this.logger.debug('debug ========= TenantRecord not found in cache') ++ tenantRecord = await this.tenantRecordService.getTenantById(this.rootAgentContext, contextCorrelationId) ++ await this.cache.config.cache.set(this.rootAgentContext,`contextCorrelationId-${contextCorrelationId}`,tenantRecord) ++ this.logger.debug(`debug ========= Cached tenant agent context for tenant '${contextCorrelationId}'`) ++ } + const shouldUpdate = !(0, core_1.isStorageUpToDate)(tenantRecord.storageVersion); + // If the tenant storage is not up to date, and autoUpdate is disabled we throw an error + if (shouldUpdate && !this.rootAgentContext.config.autoUpdateStorageOnStartup) { diff --git a/samples/cliConfig.json b/samples/cliConfig.json index 59027773..7d2a40e1 100644 --- a/samples/cliConfig.json +++ b/samples/cliConfig.json @@ -8,7 +8,7 @@ "walletPassword": "postgres", "walletAdminAccount": "postgres", "walletAdminPassword": "postgres", - "walletScheme": "DatabasePerWallet", + "walletScheme": "ProfilePerWallet", "indyLedger": [ { "genesisTransactions": "https://raw.githubusercontent.com/Indicio-tech/indicio-network/main/genesis_files/pool_transactions_testnet_genesis", @@ -19,16 +19,15 @@ "indyNamespace": "indicio:demonet" }, { - "genesisTransactions": "http://test.bcovrin.vonx.io/genesis", + "genesisTransactions": "https://raw.githubusercontent.com/bcgov/von-network/main/BCovrin/genesis_test", "indyNamespace": "bcovrin:testnet" } ], "endpoint": ["http://localhost:4002"], "autoAcceptConnections": true, - "autoAcceptCredentials": "contentApproved", + "autoAcceptCredentials": "always", "autoAcceptProofs": "contentApproved", - "useLegacyDidSovPrefix": true, - "logLevel": 5, + "logLevel": 2, "inboundTransport": [ { "transport": "http", @@ -36,13 +35,12 @@ } ], "outboundTransport": ["http"], - "autoAcceptMediationRequests": false, "adminPort": 4001, "tenancy": true, "schemaFileServerURL": "https://schema.credebl.id/schemas/", - "didRegistryContractAddress": "0x1adeA199dCf07E17232415Cb232442BE52517Add", - "schemaManagerContractAddress": "0x289c7Bd4C7d38cC54bff370d6f9f01b74Df51b11", + "didRegistryContractAddress": "0xcB80F37eDD2bE3570c6C9D5B0888614E04E1e49E", + "schemaManagerContractAddress": "0x4742d43C2dFCa5a1d4238240Afa8547Daf87Ee7a", "rpcUrl": "https://rpc-amoy.polygon.technology", - "fileServerUrl": "https://schema.credebl.id/", + "fileServerUrl": "https://schema.credebl.id", "fileServerToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBeWFuV29ya3MiLCJpZCI6ImNhZDI3ZjhjLTMyNWYtNDRmZC04ZmZkLWExNGNhZTY3NTMyMSJ9.I3IR7abjWbfStnxzn1BhxhV0OEzt1x3mULjDdUcgWHk" -} +} \ No newline at end of file diff --git a/scripts/taskdef/credo-ecs-taskdef.json b/scripts/taskdef/credo-ecs-taskdef.json new file mode 100644 index 00000000..d05cf562 --- /dev/null +++ b/scripts/taskdef/credo-ecs-taskdef.json @@ -0,0 +1,66 @@ +{ + "family": "${FAMILY}", + "containerDefinitions": [ + { + "name": "Platform-admin", + "image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%", + "cpu": 154, + "memory": 307, + "portMappings": [ + { + "containerPort": 8001, + "hostPort": 8001, + "protocol": "tcp" + }, + { + "containerPort": 9001, + "hostPort": 9001, + "protocol": "tcp" + } + ], + "essential": true, + "command": [ + "--auto-accept-connections", + "--config", + "/config.json" + ], + "environment": [ + { + "name": "AFJ_REST_LOG_LEVEL", + "value": "1" + } + ], + "environmentFiles": [ + { + "value": "${S3_ARN}", + "type": "s3" + } + ], + "mountPoints": [ + { + "sourceVolume": "config", + "containerPath": "/config.json", + "readOnly": true + } + ], + "volumesFrom": [], + "ulimits": [] + } + + ], + "executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole", + "placementConstraints": [], + "requiresCompatibilities": [ + "EC2" + ], + "cpu": "154", + "memory": "307", + "volumes": [ + { + "name": "config", + "host": { + "sourcePath": "${SourcePath}" + } + } + ] +} diff --git a/scripts/taskdef/credo-fargate-taskdef.json b/scripts/taskdef/credo-fargate-taskdef.json new file mode 100644 index 00000000..bf3a4a59 --- /dev/null +++ b/scripts/taskdef/credo-fargate-taskdef.json @@ -0,0 +1,76 @@ +{ + "family": "${FAMILY}", + "containerDefinitions": [ + { + "name": "Platform-admin", + "image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%", + "cpu": 0, + "portMappings": [ + { + "containerPort": 8004, + "hostPort": 8004, + "protocol": "tcp" + }, + { + "containerPort": 9004, + "hostPort": 9004, + "protocol": "tcp" + } + ], + "essential": true, + "command": [ + "--auto-accept-connections", + "--config", + "/config/${CONFIG_FILE}" + ], + "environment": [ + { + "name": "AFJ_REST_LOG_LEVEL", + "value": "1" + } + ], + "environmentFiles": [ + { + "value": "${S3_ARN}", + "type": "s3" + } + ], + "mountPoints": [ + { + "sourceVolume": "config", + "containerPath": "/config", + "readOnly": false + } + ], + "volumesFrom": [], + "ulimits": [], + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": "/ecs/${FAMILY}", + "awslogs-create-group": "true", + "awslogs-region": "ap-south-1", + "awslogs-stream-prefix": "ecs" + } + } + } + + ], + "executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole", + "networkMode": "awsvpc", + "placementConstraints": [], + "requiresCompatibilities": [ + "FARGATE" + ], + "cpu": "1024", + "memory": "2048", + "volumes": [ + { + "name": "config", + "efsVolumeConfiguration": { + "fileSystemId": "${EFS}", + "rootDirectory": "/" + } + } + ] +} diff --git a/src/cli.ts b/src/cli.ts index f4a061f3..f352694f 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,162 +1,219 @@ -import type { InboundTransport, Transports, AriesRestConfig } from './cliAgent' +import type { AriesRestConfig } from './cliAgent' import yargs from 'yargs' import { runRestAgent } from './cliAgent' -const parsed = yargs - .command('start', 'Start AFJ Rest agent') - .option('label', { - alias: 'l', - string: true, - demandOption: true, - }) - .option('wallet-id', { - string: true, - demandOption: true, - }) - .option('wallet-key', { - string: true, - demandOption: true, - }) - .option('wallet-type', { - string: true, - demandOption: true, - }) - .option('wallet-url', { - string: true, - demandOption: true, - }) - .option('wallet-scheme', { - string: true, - demandOption: true, - }) - .option('wallet-account', { - string: true, - demandOption: true, - }) - .option('wallet-password', { - string: true, - demandOption: true, - }) - .option('wallet-admin-account', { - string: true, - demandOption: true, - }) - .option('wallet-admin-password', { - string: true, - demandOption: true, - }) - .option('indy-ledger', { - array: true, - default: [], - }) - .option('public-did-seed', { - string: true, - }) - .option('endpoint', { - array: true, - }) - .option('log-level', { - number: true, - default: 3, - }) - .option('use-legacy-did-sov-prefix', { - boolean: true, - default: false, - }) - .option('outbound-transport', { - default: [], - choices: ['http', 'ws'], - array: true, - }) - .option('inbound-transport', { - array: true, - default: [], - coerce: (input: string[]) => { - // Configured using config object - if (typeof input[0] === 'object') return input - if (input.length % 2 !== 0) { - throw new Error( - 'Inbound transport should be specified as transport port pairs (e.g. --inbound-transport http 5000 ws 5001)' - ) - } - - return input.reduce>((transports, item, index) => { - const isEven = index % 2 === 0 - // isEven means it is the transport - // transport port transport port - const isTransport = isEven - - if (isTransport) { - transports.push({ - transport: item as Transports, - port: Number(input[index + 1]), - }) - } +interface IndyLedger { + genesisTransactions: string + indyNamespace: string +} - return transports - }, []) - }, - }) - .option('auto-accept-connections', { - boolean: true, - default: false, - }) - .option('auto-accept-credentials', { - choices: ['always', 'never', 'contentApproved'], - default: 'never', - }) - .option('auto-accept-mediation-requests', { - boolean: true, - default: false, - }) - .option('auto-accept-proofs', { - choices: ['always', 'never', 'contentApproved'], - default: 'never', - }) - .option('connection-image-url', { - string: true, - }) - .option('webhook-url', { - string: true, - }) - .option('admin-port', { - number: true, - demandOption: true, - }) - .option('tenancy', { - boolean: true, - default: false, - }) - // .option('storage-config', { - // array: true, - // default: [], - // coerce: (input) => JSON.parse(input), - // }) - // .option('storageConfig', { - // type: 'string', - // describe: 'Storage configuration JSON', - // coerce: (value) => { - // try { - // return JSON.parse(value); - // } catch (error) { - // throw new Error('Invalid JSON format for storageConfig'); - // } - // }, - // }) +interface Parsed { + label: string + 'wallet-id': string + 'wallet-key': string + 'wallet-type': string + 'wallet-url': string + 'wallet-scheme': string + 'wallet-account': string + 'wallet-password': string + 'wallet-admin-account': string + 'wallet-admin-password': string + 'indy-ledger': IndyLedger[] + endpoint?: string[] + 'log-level': number + 'outbound-transport': ('http' | 'ws')[] + 'inbound-transport'?: InboundTransport[] + 'auto-accept-connections'?: boolean + 'auto-accept-credentials'?: 'always' | 'never' | 'contentApproved' + 'auto-accept-proofs'?: 'always' | 'never' | 'contentApproved' + 'webhook-url'?: string + 'admin-port': number + tenancy: boolean + 'did-registry-contract-address'?: string + 'schema-manager-contract-address'?: string + 'wallet-connect-timeout'?: number + 'wallet-max-connections'?: number + 'wallet-idle-timeout'?: number + schemaFileServerURL?: string + didRegistryContractAddress?: string + schemaManagerContractAddress?: string + rpcUrl?: string + fileServerUrl?: string + fileServerToken?: string +} - .config() - .env('AFJ_REST') - .parse() +interface InboundTransport { + transport: Transports + port: number +} -const argv = yargs.argv -const storageConfig = argv['wallet-type'] +type Transports = 'http' | 'ws' -// eslint-disable-next-line no-console -console.log('Storage Config after YARGS::', storageConfig) +async function parseArguments(): Promise { + return yargs + .command('start', 'Start Credo Rest agent') + .option('label', { + alias: 'l', + string: true, + demandOption: true, + }) + .option('wallet-id', { + string: true, + demandOption: true, + }) + .option('wallet-key', { + string: true, + demandOption: true, + }) + .option('wallet-type', { + string: true, + demandOption: true, + }) + .option('wallet-url', { + string: true, + demandOption: true, + }) + .option('wallet-scheme', { + string: true, + demandOption: true, + }) + .option('wallet-account', { + string: true, + demandOption: true, + }) + .option('wallet-password', { + string: true, + demandOption: true, + }) + .option('wallet-admin-account', { + string: true, + demandOption: true, + }) + .option('wallet-admin-password', { + string: true, + demandOption: true, + }) + .option('indy-ledger', { + array: true, + default: [], + coerce: (input) => { + return input.map((item: { genesisTransactions: string; indyNamespace: string }) => ({ + genesisTransactions: item.genesisTransactions, + indyNamespace: item.indyNamespace, + })) + }, + }) + .option('endpoint', { + array: true, + coerce: (input) => { + return input.map((item: string) => String(item)) + }, + }) + .option('log-level', { + number: true, + default: 3, + }) + .option('outbound-transport', { + array: true, + coerce: (input) => { + const validValues = ['http', 'ws'] + return input.map((item: string) => { + if (validValues.includes(item)) { + return item as 'http' | 'ws' + } else { + throw new Error(`Invalid value for outbound-transport: ${item}. Valid values are 'http' or 'ws'.`) + } + }) + }, + }) + .option('inbound-transport', { + array: true, + coerce: (input) => { + const transports: InboundTransport[] = [] + for (const item of input) { + if ( + typeof item === 'object' && + 'transport' in item && + typeof item.transport === 'string' && + 'port' in item && + typeof item.port === 'number' + ) { + const transport: Transports = item.transport as Transports + const port: number = item.port + transports.push({ transport, port }) + } else { + throw new Error( + 'Inbound transport should be specified as an array of objects with transport and port properties.' + ) + } + } + return transports + }, + }) + .option('auto-accept-connections', { + boolean: true, + default: false, + }) + .option('auto-accept-credentials', { + choices: ['always', 'never', 'contentApproved'], + coerce: (input: string) => { + if (input === 'always' || input === 'never' || input === 'contentApproved') { + return input as 'always' | 'never' | 'contentApproved' + } else { + throw new Error( + 'Invalid value for auto-accept-credentials. Valid values are "always", "never", or "contentApproved".' + ) + } + }, + }) + .option('auto-accept-proofs', { + choices: ['always', 'never', 'contentApproved'], + coerce: (input: string) => { + if (input === 'always' || input === 'never' || input === 'contentApproved') { + return input as 'always' | 'never' | 'contentApproved' + } else { + throw new Error( + 'Invalid value for auto-accept-proofs. Valid values are "always", "never", or "contentApproved".' + ) + } + }, + }) + .option('webhook-url', { + string: true, + }) + .option('admin-port', { + number: true, + demandOption: true, + }) + .option('tenancy', { + boolean: true, + default: false, + }) + .option('did-registry-contract-address', { + string: true, + }) + .option('schema-manager-contract-address', { + string: true, + }) + .option('wallet-connect-timeout', { + number: true, + }) + .option('wallet-max-connections', { + number: true, + }) + .option('wallet-idle-timeout', { + number: true, + }) + .config() + .env('AFJ_REST') + .parseAsync() as Promise +} export async function runCliServer() { + const parsed = await parseArguments() + await runRestAgent({ label: parsed.label, walletConfig: { @@ -166,9 +223,9 @@ export async function runCliServer() { type: parsed['wallet-type'], config: { host: parsed['wallet-url'], - connectTimeout: Number(process.env.CONNECT_TIMEOUT), - maxConnections: Number(process.env.MAX_CONNECTIONS), - idleTimeout: Number(process.env.IDLE_TIMEOUT), + connectTimeout: parsed['wallet-connect-timeout'] || Number(process.env.CONNECT_TIMEOUT), + maxConnections: parsed['wallet-max-connections'] || Number(process.env.MAX_CONNECTIONS), + idleTimeout: parsed['wallet-idle-timeout'] || Number(process.env.IDLE_TIMEOUT), }, credentials: { account: parsed['wallet-account'], @@ -179,25 +236,21 @@ export async function runCliServer() { }, }, indyLedger: parsed['indy-ledger'], - // publicDidSeed: parsed['public-did-seed'], endpoints: parsed.endpoint, autoAcceptConnections: parsed['auto-accept-connections'], autoAcceptCredentials: parsed['auto-accept-credentials'], autoAcceptProofs: parsed['auto-accept-proofs'], - autoAcceptMediationRequests: parsed['auto-accept-mediation-requests'], - useLegacyDidSovPrefix: parsed['use-legacy-did-sov-prefix'], - logLevel: 2, + logLevel: parsed['log-level'], inboundTransports: parsed['inbound-transport'], outboundTransports: parsed['outbound-transport'], - connectionImageUrl: parsed['connection-image-url'], webhookUrl: parsed['webhook-url'], adminPort: parsed['admin-port'], - tenancy: parsed['tenancy'], - schemaFileServerURL: parsed['schemaFileServerURL'], - didRegistryContractAddress: parsed['didRegistryContractAddress'], - schemaManagerContractAddress: parsed['schemaManagerContractAddress'], - rpcUrl: parsed['rpcUrl'], - fileServerUrl: parsed['fileServerUrl'], - fileServerToken: parsed['fileServerToken'], - } as unknown as AriesRestConfig) + tenancy: parsed.tenancy, + schemaFileServerURL: parsed.schemaFileServerURL, + didRegistryContractAddress: parsed.didRegistryContractAddress, + schemaManagerContractAddress: parsed.schemaManagerContractAddress, + rpcUrl: parsed.rpcUrl, + fileServerUrl: parsed.fileServerUrl, + fileServerToken: parsed.fileServerToken, + } as AriesRestConfig) } diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 74c91c31..c3e4a075 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -52,6 +52,7 @@ import { randomBytes } from 'crypto' import { readFile } from 'fs/promises' import jwt from 'jsonwebtoken' +import { IndicioAcceptanceMechanism, IndicioTransactionAuthorAgreement, Network, NetworkName } from './enums/enum' import { setupServer } from './server' import { TsLogger } from './utils/logger' @@ -85,7 +86,6 @@ export interface AriesRestConfig { autoAcceptConnections?: boolean autoAcceptCredentials?: AutoAcceptCredential autoAcceptProofs?: AutoAcceptProof - useLegacyDidSovPrefix?: boolean logLevel?: LogLevel inboundTransports?: InboundTransport[] outboundTransports?: Transports[] @@ -98,6 +98,7 @@ export interface AriesRestConfig { rpcUrl?: string fileServerUrl?: string fileServerToken?: string + walletScheme?: AskarMultiWalletDatabaseScheme schemaFileServerURL?: string } @@ -112,13 +113,19 @@ export type RestMultiTenantAgentModules = Awaited> -const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) => { - const didContractAddress = process.env.DID_CONTRACT_ADDRESS as string - const schemaManagerContractAddress = process.env.SCHEMA_MANAGER_CONTRACT_ADDRESS as string - const fileServerToken = process.env.FILE_SERVER_TOKEN - const rpcUrl = process.env.RPC_URL - const serverUrl = process.env.SERVER_URL - +// TODO: add object +const getModules = ( + networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]], + didRegistryContractAddress: string, + fileServerToken: string, + fileServerUrl: string, + rpcUrl: string, + schemaManagerContractAddress: string, + autoAcceptConnections: boolean, + autoAcceptCredentials: AutoAcceptCredential, + autoAcceptProofs: AutoAcceptProof, + walletScheme: AskarMultiWalletDatabaseScheme +) => { const legacyIndyCredentialFormat = new LegacyIndyCredentialFormatService() const legacyIndyProofFormat = new LegacyIndyProofFormatService() const jsonLdCredentialFormatService = new JsonLdCredentialFormatService() @@ -128,7 +135,7 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) return { askar: new AskarModule({ ariesAskar, - multiWalletDatabaseScheme: AskarMultiWalletDatabaseScheme.ProfilePerWallet, + multiWalletDatabaseScheme: walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, }), indyVdr: new IndyVdrModule({ @@ -147,10 +154,10 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) }), connections: new ConnectionsModule({ - autoAcceptConnections: true, + autoAcceptConnections: autoAcceptConnections || true, }), proofs: new ProofsModule({ - autoAcceptProofs: AutoAcceptProof.ContentApproved, + autoAcceptProofs: autoAcceptProofs || AutoAcceptProof.ContentApproved, proofProtocols: [ new V1ProofProtocol({ indyProofFormat: legacyIndyProofFormat, @@ -161,7 +168,7 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) ], }), credentials: new CredentialsModule({ - autoAcceptCredentials: AutoAcceptCredential.Always, + autoAcceptCredentials: autoAcceptCredentials || AutoAcceptCredential.Always, credentialProtocols: [ new V1CredentialProtocol({ indyCredentialFormat: legacyIndyCredentialFormat, @@ -177,26 +184,49 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) }), w3cCredentials: new W3cCredentialsModule(), cache: new CacheModule({ - cache: new InMemoryLruCache({ limit: Number(process.env.INMEMORY_LRU_CACHE_LIMIT) }), + cache: new InMemoryLruCache({ limit: Number(process.env.INMEMORY_LRU_CACHE_LIMIT) || Infinity }), }), questionAnswer: new QuestionAnswerModule(), polygon: new PolygonModule({ - didContractAddress: didContractAddress, - schemaManagerContractAddress: schemaManagerContractAddress, - fileServerToken: fileServerToken, - rpcUrl: rpcUrl, - serverUrl: serverUrl, + didContractAddress: didRegistryContractAddress ? didRegistryContractAddress : (process.env.DID_CONTRACT_ADDRESS as string), + schemaManagerContractAddress: schemaManagerContractAddress || (process.env.SCHEMA_MANAGER_CONTRACT_ADDRESS as string), + fileServerToken: fileServerToken ? fileServerToken : (process.env.FILE_SERVER_TOKEN as string), + rpcUrl: rpcUrl ? rpcUrl : (process.env.RPC_URL as string), + serverUrl: fileServerUrl ? fileServerUrl : (process.env.SERVER_URL as string), }), } } -const getWithTenantModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) => { - const modules = getModules(networkConfig) +// TODO: add object +const getWithTenantModules = ( + networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]], + didRegistryContractAddress: string, + fileServerToken: string, + fileServerUrl: string, + rpcUrl: string, + schemaManagerContractAddress: string, + autoAcceptConnections: boolean, + autoAcceptCredentials: AutoAcceptCredential, + autoAcceptProofs: AutoAcceptProof, + walletScheme: AskarMultiWalletDatabaseScheme +) => { + const modules = getModules( + networkConfig, + didRegistryContractAddress, + fileServerToken, + fileServerUrl, + rpcUrl, + schemaManagerContractAddress, + autoAcceptConnections, + autoAcceptCredentials, + autoAcceptProofs, + walletScheme + ) return { tenants: new TenantsModule({ - sessionAcquireTimeout: Number(process.env.SESSION_ACQUIRE_TIMEOUT), - sessionLimit: Number(process.env.SESSION_LIMIT), + sessionAcquireTimeout: Number(process.env.SESSION_ACQUIRE_TIMEOUT) || Infinity, + sessionLimit: Number(process.env.SESSION_LIMIT) || Infinity, }), ...modules, } @@ -228,7 +258,16 @@ export async function runRestAgent(restConfig: AriesRestConfig) { outboundTransports = [], webhookUrl, adminPort, + didRegistryContractAddress, + fileServerToken, + fileServerUrl, + rpcUrl, + schemaManagerContractAddress, walletConfig, + autoAcceptConnections, + autoAcceptCredentials, + autoAcceptProofs, + walletScheme, ...afjConfig } = restConfig @@ -267,16 +306,16 @@ export async function runRestAgent(restConfig: AriesRestConfig) { connectOnStartup: true, } - if (ledgerConfig.indyNamespace.includes('indicio')) { - if (ledgerConfig.indyNamespace === 'indicio:testnet' || ledgerConfig.indyNamespace === 'indicio:mainnet') { + if (ledgerConfig.indyNamespace.includes(NetworkName.Indicio)) { + if (ledgerConfig.indyNamespace === (Network.Indicio_Mainnet as string)) { networkConfig.transactionAuthorAgreement = { - version: '1.0', - acceptanceMechanism: 'wallet_agreement', + version: IndicioTransactionAuthorAgreement.Indicio_Testnet_Mainnet_Version, + acceptanceMechanism: IndicioAcceptanceMechanism.Wallet_Agreement, } } else { networkConfig.transactionAuthorAgreement = { - version: '1.3', - acceptanceMechanism: 'wallet_agreement', + version: IndicioTransactionAuthorAgreement.Indicio_Demonet_Version, + acceptanceMechanism: IndicioAcceptanceMechanism.Wallet_Agreement, } } } @@ -296,15 +335,37 @@ export async function runRestAgent(restConfig: AriesRestConfig) { networkConfig = [ { genesisTransactions: process.env.BCOVRIN_TEST_GENESIS as string, - indyNamespace: 'bcovrin:testnet', + indyNamespace: Network.Bcovrin_Testnet, isProduction: false, connectOnStartup: true, }, ] } - const tenantModule = await getWithTenantModules(networkConfig) - const modules = getModules(networkConfig) + const tenantModule = await getWithTenantModules( + networkConfig, + didRegistryContractAddress || '', + fileServerToken || '', + fileServerUrl || '', + rpcUrl || '', + schemaManagerContractAddress || '', + autoAcceptConnections || true, + autoAcceptCredentials || AutoAcceptCredential.Always, + autoAcceptProofs || AutoAcceptProof.ContentApproved, + walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet + ) + const modules = getModules( + networkConfig, + didRegistryContractAddress || '', + fileServerToken || '', + fileServerUrl || '', + rpcUrl || '', + schemaManagerContractAddress || '', + autoAcceptConnections || true, + autoAcceptCredentials || AutoAcceptCredential.Always, + autoAcceptProofs || AutoAcceptProof.ContentApproved, + walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet + ) const agent = new Agent({ config: agentConfig, modules: { @@ -361,6 +422,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { }) } else { const recordWithToken = genericRecord.find((record) => record?.content?.token !== undefined) + token = recordWithToken?.content.token as string } const app = await setupServer( diff --git a/src/controllers/agent/AgentController.ts b/src/controllers/agent/AgentController.ts index a7ec6fc6..aad7d02b 100644 --- a/src/controllers/agent/AgentController.ts +++ b/src/controllers/agent/AgentController.ts @@ -1,17 +1,20 @@ +import type { RestAgentModules } from '../../cliAgent' import type { AgentInfo } from '../types' import { Agent } from '@credo-ts/core' import { injectable } from 'tsyringe' +import ErrorHandlingService from '../../errorHandlingService' + import { Controller, Delete, Get, Route, Tags, Security } from 'tsoa' @Tags('Agent') @Route('/agent') @injectable() export class AgentController extends Controller { - private agent: Agent + private agent: Agent - public constructor(agent: Agent) { + public constructor(agent: Agent) { super() this.agent = agent } @@ -21,11 +24,15 @@ export class AgentController extends Controller { */ @Get('/') public async getAgentInfo(): Promise { - return { - label: this.agent.config.label, - endpoints: this.agent.config.endpoints, - isInitialized: this.agent.isInitialized, - publicDid: undefined, + try { + return { + label: this.agent.config.label, + endpoints: this.agent.config.endpoints, + isInitialized: this.agent.isInitialized, + publicDid: undefined, + } + } catch (error) { + throw ErrorHandlingService.handle(error) } } @@ -35,7 +42,11 @@ export class AgentController extends Controller { @Security('apiKey') @Delete('/wallet') public async deleteWallet() { - const deleteWallet = await this.agent.wallet.delete() - return deleteWallet + try { + const deleteWallet = await this.agent.wallet.delete() + return deleteWallet + } catch (error) { + throw ErrorHandlingService.handle(error) + } } } diff --git a/src/controllers/basic-messages/BasicMessageController.ts b/src/controllers/basic-messages/BasicMessageController.ts index 1dafd091..c4b9cbd1 100644 --- a/src/controllers/basic-messages/BasicMessageController.ts +++ b/src/controllers/basic-messages/BasicMessageController.ts @@ -1,20 +1,22 @@ +import type { RestAgentModules } from '../../cliAgent' import type { BasicMessageRecord, BasicMessageStorageProps } from '@credo-ts/core' -import { Agent, RecordNotFoundError } from '@credo-ts/core' +import { Agent } from '@credo-ts/core' import { injectable } from 'tsyringe' +import ErrorHandlingService from '../../errorHandlingService' import { BasicMessageRecordExample, RecordId } from '../examples' -import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' +import { Body, Controller, Example, Get, Path, Post, Route, Tags, Security } from 'tsoa' @Tags('Basic Messages') @Route('/basic-messages') @Security('apiKey') @injectable() export class BasicMessageController extends Controller { - private agent: Agent + private agent: Agent - public constructor(agent: Agent) { + public constructor(agent: Agent) { super() this.agent = agent } @@ -28,7 +30,13 @@ export class BasicMessageController extends Controller { @Example([BasicMessageRecordExample]) @Get('/:connectionId') public async getBasicMessages(@Path('connectionId') connectionId: RecordId): Promise { - return await this.agent.basicMessages.findAllByQuery({ connectionId }) + try { + const basicMessageRecords = await this.agent.basicMessages.findAllByQuery({ connectionId }) + this.setStatus(200) + return basicMessageRecords + } catch (error) { + throw ErrorHandlingService.handle(error) + } } /** @@ -37,21 +45,15 @@ export class BasicMessageController extends Controller { * @param connectionId Connection identifier * @param content The content of the message */ + @Example(BasicMessageRecordExample) @Post('/:connectionId') - public async sendMessage( - @Path('connectionId') connectionId: RecordId, - @Body() request: Record<'content', string>, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async sendMessage(@Path('connectionId') connectionId: RecordId, @Body() request: Record<'content', string>) { try { + const basicMessageRecord = await this.agent.basicMessages.sendMessage(connectionId, request.content) this.setStatus(204) - await this.agent.basicMessages.sendMessage(connectionId, request.content) + return basicMessageRecord } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { reason: `connection with connection id "${connectionId}" not found.` }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } } diff --git a/src/controllers/connections/ConnectionController.ts b/src/controllers/connections/ConnectionController.ts index 87fb6823..eeae789b 100644 --- a/src/controllers/connections/ConnectionController.ts +++ b/src/controllers/connections/ConnectionController.ts @@ -1,19 +1,22 @@ +import type { RestAgentModules } from '../../cliAgent' import type { ConnectionRecordProps } from '@credo-ts/core' -import { ConnectionRepository, DidExchangeState, Agent, CredoError, RecordNotFoundError } from '@credo-ts/core' +import { DidExchangeState, Agent } from '@credo-ts/core' import { injectable } from 'tsyringe' +import ErrorHandlingService from '../../errorHandlingService' +import { NotFoundError } from '../../errors' import { ConnectionRecordExample, RecordId } from '../examples' -import { Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' +import { Controller, Delete, Example, Get, Path, Post, Query, Route, Tags, Security } from 'tsoa' @Tags('Connections') @Route() @injectable() export class ConnectionController extends Controller { - private agent: Agent + private agent: Agent - public constructor(agent: Agent) { + public constructor(agent: Agent) { super() this.agent = agent } @@ -38,14 +41,9 @@ export class ConnectionController extends Controller { @Query('theirDid') theirDid?: string, @Query('theirLabel') theirLabel?: string ) { - let connections - - if (outOfBandId) { - connections = await this.agent.connections.findAllByOutOfBandId(outOfBandId) - } else { - const connectionRepository = this.agent.dependencyManager.resolve(ConnectionRepository) - - const connections = await connectionRepository.findByQuery(this.agent.context, { + try { + const connections = await this.agent.connections.findAllByQuery({ + outOfBandId, alias, myDid, theirDid, @@ -54,15 +52,9 @@ export class ConnectionController extends Controller { }) return connections.map((c) => c.toJSON()) + } catch (error) { + throw ErrorHandlingService.handle(error) } - - // if (alias) connections = connections.filter((c) => c.alias === alias) - // if (state) connections = connections.filter((c) => c.state === state) - // if (myDid) connections = connections.filter((c) => c.did === myDid) - // if (theirDid) connections = connections.filter((c) => c.theirDid === theirDid) - // if (theirLabel) connections = connections.filter((c) => c.theirLabel === theirLabel) - - return connections.map((c) => c.toJSON()) } /** @@ -73,15 +65,16 @@ export class ConnectionController extends Controller { @Example(ConnectionRecordExample) @Security('apiKey') @Get('/connections/:connectionId') - public async getConnectionById( - @Path('connectionId') connectionId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }> - ) { - const connection = await this.agent.connections.findById(connectionId) + public async getConnectionById(@Path('connectionId') connectionId: RecordId) { + try { + const connection = await this.agent.connections.findById(connectionId) - if (!connection) return notFoundError(404, { reason: `connection with connection id "${connectionId}" not found.` }) + if (!connection) throw new NotFoundError(`Connection with connection id "${connectionId}" not found.`) - return connection.toJSON() + return connection.toJSON() + } catch (error) { + throw ErrorHandlingService.handle(error) + } } /** @@ -91,19 +84,12 @@ export class ConnectionController extends Controller { */ @Delete('/connections/:connectionId') @Security('apiKey') - public async deleteConnection( - @Path('connectionId') connectionId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async deleteConnection(@Path('connectionId') connectionId: RecordId) { try { this.setStatus(204) await this.agent.connections.deleteById(connectionId) } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { reason: `connection with connection id "${connectionId}" not found.` }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -119,19 +105,12 @@ export class ConnectionController extends Controller { @Example(ConnectionRecordExample) @Security('apiKey') @Post('/connections/:connectionId/accept-request') - public async acceptRequest( - @Path('connectionId') connectionId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async acceptRequest(@Path('connectionId') connectionId: RecordId) { try { const connection = await this.agent.connections.acceptRequest(connectionId) return connection.toJSON() } catch (error) { - if (error instanceof CredoError) { - return notFoundError(404, { reason: `connection with connection id "${connectionId}" not found.` }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -147,35 +126,27 @@ export class ConnectionController extends Controller { @Example(ConnectionRecordExample) @Security('apiKey') @Post('/connections/:connectionId/accept-response') - public async acceptResponse( - @Path('connectionId') connectionId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async acceptResponse(@Path('connectionId') connectionId: RecordId) { try { const connection = await this.agent.connections.acceptResponse(connectionId) return connection.toJSON() } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { reason: `connection with connection id "${connectionId}" not found.` }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Get('/url/:invitationId') - public async getInvitation( - @Path('invitationId') invitationId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { - const outOfBandRecord = await this.agent.oob.findByCreatedInvitationId(invitationId) + public async getInvitation(@Path('invitationId') invitationId: string) { + try { + const outOfBandRecord = await this.agent.oob.findByCreatedInvitationId(invitationId) - if (!outOfBandRecord || outOfBandRecord.state !== 'await-response') - return notFoundError(404, { reason: `connection with invitationId "${invitationId}" not found.` }) + if (!outOfBandRecord || outOfBandRecord.state !== 'await-response') + throw new NotFoundError(`connection with invitationId "${invitationId}" not found.`) - const invitationJson = outOfBandRecord.outOfBandInvitation.toJSON({ useDidSovPrefixWhereAllowed: true }) - return invitationJson + const invitationJson = outOfBandRecord.outOfBandInvitation.toJSON({ useDidSovPrefixWhereAllowed: true }) + return invitationJson + } catch (error) { + throw ErrorHandlingService.handle(error) + } } } diff --git a/src/controllers/credentials/CredentialController.ts b/src/controllers/credentials/CredentialController.ts index c4cd7dd1..c1eccc05 100644 --- a/src/controllers/credentials/CredentialController.ts +++ b/src/controllers/credentials/CredentialController.ts @@ -1,18 +1,22 @@ import type { RestAgentModules } from '../../cliAgent' -import type { CredentialExchangeRecordProps, CredentialProtocolVersionType, Routing } from '@credo-ts/core' +import type { + CredentialExchangeRecordProps, + CredentialProtocolVersionType, + PeerDidNumAlgo2CreateOptions, + Routing, +} from '@credo-ts/core' -import { LegacyIndyCredentialFormatService, V1CredentialProtocol } from '@credo-ts/anoncreds' import { - CredentialRepository, CredentialState, Agent, - RecordNotFoundError, W3cCredentialService, - Key, - KeyType, + CredentialRole, + createPeerDidDocumentFromServices, + PeerDidNumAlgo, } from '@credo-ts/core' import { injectable } from 'tsyringe' +import ErrorHandlingService from '../../errorHandlingService' import { CredentialExchangeRecordExample, RecordId } from '../examples' import { OutOfBandController } from '../outofband/OutOfBandController' import { @@ -23,9 +27,10 @@ import { CreateOfferOptions, AcceptCredential, CreateOfferOobOptions, + ThreadId, } from '../types' -import { Body, Controller, Get, Path, Post, Res, Route, Tags, TsoaResponse, Example, Query, Security } from 'tsoa' +import { Body, Controller, Get, Path, Post, Route, Tags, Example, Query, Security } from 'tsoa' @Tags('Credentials') @Security('apiKey') @@ -35,13 +40,10 @@ export class CredentialController extends Controller { private agent: Agent private outOfBandController: OutOfBandController - // private v1CredentialProtocol: V1CredentialProtocol - public constructor(agent: Agent, outOfBandController: OutOfBandController) { super() this.agent = agent this.outOfBandController = outOfBandController - // this.v1CredentialProtocol = v1CredentialProtocol } /** @@ -52,31 +54,51 @@ export class CredentialController extends Controller { @Example([CredentialExchangeRecordExample]) @Get('/') public async getAllCredentials( - @Query('threadId') threadId?: string, - @Query('connectionId') connectionId?: string, - @Query('state') state?: CredentialState + @Query('threadId') threadId?: ThreadId, + @Query('parentThreadId') parentThreadId?: ThreadId, + @Query('connectionId') connectionId?: RecordId, + @Query('state') state?: CredentialState, + @Query('role') role?: CredentialRole ) { - const credentialRepository = this.agent.dependencyManager.resolve(CredentialRepository) - - const credentials = await credentialRepository.findByQuery(this.agent.context, { - connectionId, - threadId, - state, - }) + try { + const credentials = await this.agent.credentials.findAllByQuery({ + connectionId, + threadId, + state, + parentThreadId, + role, + }) - return credentials.map((c) => c.toJSON()) + return credentials.map((c) => c.toJSON()) + } catch (error) { + throw ErrorHandlingService.handle(error) + } } + // TODO: Fix W3cCredentialRecordExample from example + // @Example([W3cCredentialRecordExample]) @Get('/w3c') public async getAllW3c() { - const w3cCredentialService = await this.agent.dependencyManager.resolve(W3cCredentialService) - return await w3cCredentialService.getAllCredentialRecords(this.agent.context) + try { + const w3cCredentialService = await this.agent.dependencyManager.resolve(W3cCredentialService) + const w3cCredentialRecords = await w3cCredentialService.getAllCredentialRecords(this.agent.context) + return w3cCredentialRecords + } catch (error) { + throw ErrorHandlingService.handle(error) + } } + // TODO: Fix W3cCredentialRecordExample from example + // @Example([W3cCredentialRecordExample]) @Get('/w3c/:id') public async getW3cById(@Path('id') id: string) { - const w3cCredentialService = await this.agent.dependencyManager.resolve(W3cCredentialService) - return await w3cCredentialService.getCredentialRecordById(this.agent.context, id) + try { + const w3cCredentialService = await this.agent.dependencyManager.resolve(W3cCredentialService) + const w3cRecord = await w3cCredentialService.getCredentialRecordById(this.agent.context, id) + return w3cRecord + } catch (error) { + throw ErrorHandlingService.handle(error) + } } /** @@ -87,21 +109,12 @@ export class CredentialController extends Controller { */ @Example(CredentialExchangeRecordExample) @Get('/:credentialRecordId') - public async getCredentialById( - @Path('credentialRecordId') credentialRecordId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async getCredentialById(@Path('credentialRecordId') credentialRecordId: RecordId) { try { const credential = await this.agent.credentials.getById(credentialRecordId) return credential.toJSON() } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `credential with credential record id "${credentialRecordId}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -114,27 +127,12 @@ export class CredentialController extends Controller { */ @Example(CredentialExchangeRecordExample) @Post('/propose-credential') - public async proposeCredential( - @Body() proposeCredentialOptions: ProposeCredentialOptions, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async proposeCredential(@Body() proposeCredentialOptions: ProposeCredentialOptions) { try { - const credential = await this.agent.credentials.proposeCredential({ - connectionId: proposeCredentialOptions.connectionId, - protocolVersion: 'v1' as CredentialProtocolVersionType<[]>, - credentialFormats: proposeCredentialOptions.credentialFormats, - autoAcceptCredential: proposeCredentialOptions.autoAcceptCredential, - comment: proposeCredentialOptions.comment, - }) + const credential = await this.agent.credentials.proposeCredential(proposeCredentialOptions) return credential } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `connection with connection record id "${proposeCredentialOptions.connectionId}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -148,28 +146,13 @@ export class CredentialController extends Controller { */ @Example(CredentialExchangeRecordExample) @Post('/accept-proposal') - public async acceptProposal( - // @Path('credentialRecordId') credentialRecordId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Body() acceptCredentialProposal: AcceptCredentialProposalOptions - ) { + public async acceptProposal(@Body() acceptCredentialProposal: AcceptCredentialProposalOptions) { try { - const credential = await this.agent.credentials.acceptProposal({ - credentialRecordId: acceptCredentialProposal.credentialRecordId, - credentialFormats: acceptCredentialProposal.credentialFormats, - autoAcceptCredential: acceptCredentialProposal.autoAcceptCredential, - comment: acceptCredentialProposal.comment, - }) + const credential = await this.agent.credentials.acceptProposal(acceptCredentialProposal) return credential } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `credential with credential record id "${acceptCredentialProposal.credentialRecordId}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -182,44 +165,47 @@ export class CredentialController extends Controller { */ @Example(CredentialExchangeRecordExample) @Post('/create-offer') - public async createOffer( - @Body() createOfferOptions: CreateOfferOptions, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async createOffer(@Body() createOfferOptions: CreateOfferOptions) { try { - const offer = await this.agent.credentials.offerCredential({ - connectionId: createOfferOptions.connectionId, - protocolVersion: createOfferOptions.protocolVersion as CredentialProtocolVersionType<[]>, - credentialFormats: createOfferOptions.credentialFormats, - autoAcceptCredential: createOfferOptions.autoAcceptCredential, - }) + const offer = await this.agent.credentials.offerCredential(createOfferOptions) return offer } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Post('/create-offer-oob') - public async createOfferOob( - @Body() outOfBandOption: CreateOfferOobOptions, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async createOfferOob(@Body() outOfBandOption: CreateOfferOobOptions) { try { + let invitationDid: string | undefined let routing: Routing const linkSecretIds = await this.agent.modules.anoncreds.getLinkSecretIds() if (linkSecretIds.length === 0) { await this.agent.modules.anoncreds.createLinkSecret() } - if (outOfBandOption?.recipientKey) { - routing = { - endpoints: this.agent.config.endpoints, - routingKeys: [], - recipientKey: Key.fromPublicKeyBase58(outOfBandOption.recipientKey, KeyType.Ed25519), - mediatorId: undefined, - } + + if (outOfBandOption?.invitationDid) { + invitationDid = outOfBandOption?.invitationDid } else { routing = await this.agent.mediationRecipient.getRouting({}) + const didDocument = createPeerDidDocumentFromServices([ + { + id: 'didcomm', + recipientKeys: [routing.recipientKey], + routingKeys: routing.routingKeys, + serviceEndpoint: routing.endpoints[0], + }, + ]) + const did = await this.agent.dids.create({ + didDocument, + method: 'peer', + options: { + numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, + }, + }) + invitationDid = did.didState.did } + const offerOob = await this.agent.credentials.createOffer({ protocolVersion: outOfBandOption.protocolVersion as CredentialProtocolVersionType<[]>, credentialFormats: outOfBandOption.credentialFormats, @@ -233,7 +219,7 @@ export class CredentialController extends Controller { messages: [credentialMessage], autoAcceptConnection: true, imageUrl: outOfBandOption?.imageUrl, - routing, + invitationDid, }) return { invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ @@ -243,10 +229,10 @@ export class CredentialController extends Controller { useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, }), outOfBandRecord: outOfBandRecord.toJSON(), - recipientKey: outOfBandOption?.recipientKey ? {} : { recipientKey: routing.recipientKey.publicKeyBase58 }, + invitationDid: outOfBandOption?.invitationDid ? '' : invitationDid, } } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -260,30 +246,16 @@ export class CredentialController extends Controller { */ @Example(CredentialExchangeRecordExample) @Post('/accept-offer') - public async acceptOffer( - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Body() acceptCredentialOfferOptions: CredentialOfferOptions - ) { + public async acceptOffer(@Body() acceptCredentialOfferOptions: CredentialOfferOptions) { try { const linkSecretIds = await this.agent.modules.anoncreds.getLinkSecretIds() if (linkSecretIds.length === 0) { await this.agent.modules.anoncreds.createLinkSecret() } - const acceptOffer = await this.agent.credentials.acceptOffer({ - credentialRecordId: acceptCredentialOfferOptions.credentialRecordId, - credentialFormats: acceptCredentialOfferOptions.credentialFormats, - autoAcceptCredential: acceptCredentialOfferOptions.autoAcceptCredential, - comment: acceptCredentialOfferOptions.comment, - }) + const acceptOffer = await this.agent.credentials.acceptOffer(acceptCredentialOfferOptions) return acceptOffer } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `credential with credential record id "${acceptCredentialOfferOptions.credentialRecordId}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -297,24 +269,12 @@ export class CredentialController extends Controller { */ @Example(CredentialExchangeRecordExample) @Post('/accept-request') - public async acceptRequest( - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Body() acceptCredentialRequestOptions: AcceptCredentialRequestOptions - ) { + public async acceptRequest(@Body() acceptCredentialRequestOptions: AcceptCredentialRequestOptions) { try { - const indyCredentialFormat = new LegacyIndyCredentialFormatService() - - const v1CredentialProtocol = new V1CredentialProtocol({ indyCredentialFormat }) - const credential = await v1CredentialProtocol.acceptRequest(this.agent.context, acceptCredentialRequestOptions) + const credential = await this.agent.credentials.acceptRequest(acceptCredentialRequestOptions) return credential } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `credential with credential record "${acceptCredentialRequestOptions.credentialRecord}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -327,24 +287,12 @@ export class CredentialController extends Controller { */ @Example(CredentialExchangeRecordExample) @Post('/accept-credential') - public async acceptCredential( - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Body() acceptCredential: AcceptCredential - ) { + public async acceptCredential(@Body() acceptCredential: AcceptCredential) { try { - const indyCredentialFormat = new LegacyIndyCredentialFormatService() - - const v1CredentialProtocol = new V1CredentialProtocol({ indyCredentialFormat }) - const credential = await v1CredentialProtocol.acceptCredential(this.agent.context, acceptCredential) + const credential = await this.agent.credentials.acceptCredential(acceptCredential) return credential } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `credential with credential record id "${acceptCredential.credentialRecord}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } } diff --git a/src/controllers/credentials/CredentialDefinitionController.ts b/src/controllers/credentials/CredentialDefinitionController.ts index 0367ad81..2f825481 100644 --- a/src/controllers/credentials/CredentialDefinitionController.ts +++ b/src/controllers/credentials/CredentialDefinitionController.ts @@ -1,25 +1,26 @@ +import type { RestAgentModules } from '../../cliAgent' import type { SchemaId } from '../examples' -import { - AnonCredsError, - getUnqualifiedCredentialDefinitionId, - parseIndyCredentialDefinitionId, -} from '@credo-ts/anoncreds' -import { Agent, CredoError } from '@credo-ts/core' +import { getUnqualifiedCredentialDefinitionId, parseIndyCredentialDefinitionId } from '@credo-ts/anoncreds' +import { Agent } from '@credo-ts/core' import { injectable } from 'tsyringe' -import { CredentialEnum } from '../../enums/enum' +import { CredentialEnum, EndorserMode } from '../../enums/enum' +import ErrorHandlingService from '../../errorHandlingService' +import { ENDORSER_DID_NOT_PRESENT } from '../../errorMessages' +import { BadRequestError, InternalServerError, NotFoundError } from '../../errors/errors' import { CredentialDefinitionExample, CredentialDefinitionId } from '../examples' -import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' +import { Body, Controller, Example, Get, Path, Post, Route, Tags, Security, Response } from 'tsoa' @Tags('Credential Definitions') @Route('/credential-definitions') @Security('apiKey') @injectable() export class CredentialDefinitionController extends Controller { - private agent: Agent - public constructor(agent: Agent) { + // TODO: Currently this only works if Extensible from credo-ts is renamed to something else, since there are two references to Extensible + private agent: Agent + public constructor(agent: Agent) { super() this.agent = agent } @@ -33,26 +34,29 @@ export class CredentialDefinitionController extends Controller { @Example(CredentialDefinitionExample) @Get('/:credentialDefinitionId') public async getCredentialDefinitionById( - @Path('credentialDefinitionId') credentialDefinitionId: CredentialDefinitionId, - @Res() badRequestError: TsoaResponse<400, { reason: string }>, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + @Path('credentialDefinitionId') credentialDefinitionId: CredentialDefinitionId ) { try { - return await this.agent.modules.anoncreds.getCredentialDefinition(credentialDefinitionId) - } catch (error) { - if (error instanceof CredoError && error.message === 'IndyError(LedgerNotFound): LedgerNotFound') { - return notFoundError(404, { - reason: `credential definition with credentialDefinitionId "${credentialDefinitionId}" not found.`, - }) - } else if (error instanceof AnonCredsError && error.cause instanceof CredoError) { - if ((error.cause.cause, 'CommonInvalidStructure')) { - return badRequestError(400, { - reason: `credentialDefinitionId "${credentialDefinitionId}" has invalid structure.`, - }) - } + const credentialDefinitionResult = await this.agent.modules.anoncreds.getCredentialDefinition( + credentialDefinitionId + ) + + if (credentialDefinitionResult.resolutionMetadata?.error === 'notFound') { + throw new NotFoundError(credentialDefinitionResult.resolutionMetadata.message) + } + const error = credentialDefinitionResult.resolutionMetadata?.error + + if (error === 'invalid' || error === 'unsupportedAnonCredsMethod') { + throw new BadRequestError(credentialDefinitionResult.resolutionMetadata.message) } - return internalServerError(500, { message: `something went wrong: ${error}` }) + + if (error !== undefined || credentialDefinitionResult.credentialDefinition === undefined) { + throw new InternalServerError(credentialDefinitionResult.resolutionMetadata.message) + } + + return credentialDefinitionResult + } catch (error) { + throw ErrorHandlingService.handle(error) } } @@ -63,6 +67,8 @@ export class CredentialDefinitionController extends Controller { * @returns CredDef */ @Example(CredentialDefinitionExample) + @Response(200, 'Action required') + @Response(202, 'Wait for action to complete') @Post('/') public async createCredentialDefinition( @Body() @@ -72,58 +78,69 @@ export class CredentialDefinitionController extends Controller { tag: string endorse?: boolean endorserDid?: string - }, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + } ) { try { const { issuerId, schemaId, tag, endorse, endorserDid } = credentialDefinitionRequest - const credentialDefinitionPyload = { + const credDef = { issuerId, schemaId, tag, type: 'CL', } + const credentialDefinitionPayload = { + credentialDefinition: credDef, + options: { + endorserMode: '', + endorserDid: '', + supportRevocation: false, + }, + } if (!endorse) { - const { credentialDefinitionState } = await this.agent.modules.anoncreds.registerCredentialDefinition({ - credentialDefinition: credentialDefinitionPyload, - options: {}, - }) - - const indyCredDefId = parseIndyCredentialDefinitionId(credentialDefinitionState.credentialDefinitionId) - const getCredentialDefinitionId = await getUnqualifiedCredentialDefinitionId( - indyCredDefId.namespaceIdentifier, - indyCredDefId.schemaSeqNo, - indyCredDefId.tag - ) - - if (credentialDefinitionState.state === CredentialEnum.Finished) { - credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId - } - return credentialDefinitionState + credentialDefinitionPayload.options.endorserMode = EndorserMode.Internal + credentialDefinitionPayload.options.endorserDid = issuerId } else { if (!endorserDid) { - throw new Error('Please provide the endorser DID') + throw new BadRequestError(ENDORSER_DID_NOT_PRESENT) } + credentialDefinitionPayload.options.endorserMode = EndorserMode.External + credentialDefinitionPayload.options.endorserDid = endorserDid ? endorserDid : '' + } - const createCredDefTxResult = await this.agent.modules.anoncreds.registerCredentialDefinition({ - credentialDefinition: credentialDefinitionPyload, - options: { - endorserMode: 'external', - endorserDid: endorserDid ? endorserDid : '', - }, - }) + const registerCredentialDefinitionResult = await this.agent.modules.anoncreds.registerCredentialDefinition( + credentialDefinitionPayload + ) - return createCredDefTxResult + if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Failed) { + throw new InternalServerError('Falied to register credef on ledger') } - } catch (error) { - if (error instanceof notFoundError) { - return notFoundError(404, { - reason: `schema with schemaId "${credentialDefinitionRequest.schemaId}" not found.`, - }) + + if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Wait) { + // The request has been accepted for processing, but the processing has not been completed. + this.setStatus(202) + return registerCredentialDefinitionResult + } + + if (registerCredentialDefinitionResult.credentialDefinitionState.state === CredentialEnum.Action) { + return registerCredentialDefinitionResult } - return internalServerError(500, { message: `something went wrong: ${error}` }) + // TODO: Return uniform response for both Internally and Externally endorsed Schemas + if (!endorse) { + const indyCredDefId = parseIndyCredentialDefinitionId( + registerCredentialDefinitionResult.credentialDefinitionState.credentialDefinitionId as string + ) + const getCredentialDefinitionId = await getUnqualifiedCredentialDefinitionId( + indyCredDefId.namespaceIdentifier, + indyCredDefId.schemaSeqNo, + indyCredDefId.tag + ) + registerCredentialDefinitionResult.credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId + return registerCredentialDefinitionResult.credentialDefinitionState + } + return registerCredentialDefinitionResult + } catch (error) { + throw ErrorHandlingService.handle(error) } } } diff --git a/src/controllers/credentials/SchemaController.ts b/src/controllers/credentials/SchemaController.ts index cbff29e5..65ba6f7a 100644 --- a/src/controllers/credentials/SchemaController.ts +++ b/src/controllers/credentials/SchemaController.ts @@ -1,143 +1,132 @@ -import type { Version } from '../examples' +import type { RestAgentModules } from '../../cliAgent' -import { AnonCredsError, getUnqualifiedSchemaId, parseIndySchemaId } from '@credo-ts/anoncreds' -import { Agent, CredoError } from '@credo-ts/core' +import { getUnqualifiedSchemaId, parseIndySchemaId } from '@credo-ts/anoncreds' +import { Agent } from '@credo-ts/core' import { injectable } from 'tsyringe' -import { CredentialEnum } from '../../enums/enum' -import { SchemaId, SchemaExample } from '../examples' - -import { Body, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' +import { CredentialEnum, EndorserMode, SchemaError } from '../../enums/enum' +import ErrorHandlingService from '../../errorHandlingService' +import { ENDORSER_DID_NOT_PRESENT } from '../../errorMessages' +import { BadRequestError, InternalServerError, NotFoundError } from '../../errors/errors' +import { CreateSchemaSuccessful, SchemaExample } from '../examples' +import { CreateSchemaInput } from '../types' +import { Example, Get, Post, Route, Tags, Security, Path, Body, Controller } from 'tsoa' @Tags('Schemas') @Route('/schemas') @Security('apiKey') @injectable() -export class SchemaController { - private agent: Agent - // private anonCredsSchema: AnonCredsApi +export class SchemaController extends Controller { + private agent: Agent - public constructor(agent: Agent) { + public constructor(agent: Agent) { + super() this.agent = agent - // this.anonCredsSchema = anonCredsSchema } /** - * Retrieve schema by schema id - * + * Get schema by schemaId * @param schemaId - * @returns Schema + * @param notFoundErrormessage + * @param forbiddenError + * @param badRequestError + * @param internalServerError + * @returns get schema by Id */ @Example(SchemaExample) @Get('/:schemaId') - public async getSchemaById( - @Path('schemaId') schemaId: SchemaId, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() forbiddenError: TsoaResponse<403, { reason: string }>, - @Res() badRequestError: TsoaResponse<400, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async getSchemaById(@Path('schemaId') schemaId: string) { try { - return await this.agent.modules.anoncreds.getSchema(schemaId) - } catch (errorMessage) { + const schemBySchemaId = await this.agent.modules.anoncreds.getSchema(schemaId) + if ( - errorMessage instanceof AnonCredsError && - errorMessage.message === 'IndyError(LedgerNotFound): LedgerNotFound' + (schemBySchemaId && + schemBySchemaId?.resolutionMetadata && + schemBySchemaId?.resolutionMetadata?.error === SchemaError.NotFound) || + schemBySchemaId?.resolutionMetadata?.error === SchemaError.UnSupportedAnonCredsMethod ) { - return notFoundError(404, { - reason: `schema definition with schemaId "${schemaId}" not found.`, - }) - } else if (errorMessage instanceof AnonCredsError && errorMessage.cause instanceof AnonCredsError) { - if ((errorMessage.cause.cause, 'LedgerInvalidTransaction')) { - return forbiddenError(403, { - reason: `schema definition with schemaId "${schemaId}" can not be returned.`, - }) - } - if ((errorMessage.cause.cause, 'CommonInvalidStructure')) { - return badRequestError(400, { - reason: `schemaId "${schemaId}" has invalid structure.`, - }) - } + throw new NotFoundError(schemBySchemaId?.resolutionMetadata?.message) } - return internalServerError(500, { message: `something went wrong: ${errorMessage}` }) + return schemBySchemaId + } catch (error) { + throw ErrorHandlingService.handle(error) } } /** - * Creates a new schema and registers schema on ledger - * + * Create schema * @param schema - * @returns schema + * @param notFoundError + * @param forbiddenError + * @param badRequestError + * @param internalServerError + * @returns get schema */ - @Example(SchemaExample) @Post('/') - public async createSchema( - @Body() - schema: { - issuerId: string - name: string - version: Version - attributes: string[] - endorse?: boolean - endorserDid?: string - }, - @Res() forbiddenError: TsoaResponse<400, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + @Example(CreateSchemaSuccessful) + public async createSchema(@Body() schema: CreateSchemaInput) { try { const { issuerId, name, version, attributes } = schema const schemaPayload = { - issuerId: issuerId, - name: name, - version: version, + issuerId, + name, + version, attrNames: attributes, } + const createSchemaPayload = { + schema: schemaPayload, + options: { + endorserMode: '', + endorserDid: '', + }, + } if (!schema.endorse) { - const { schemaState } = await this.agent.modules.anoncreds.registerSchema({ - schema: schemaPayload, - options: { - endorserMode: 'internal', - endorserDid: issuerId, - }, - }) - - const indySchemaId = parseIndySchemaId(schemaState.schemaId) - const getSchemaUnqualifiedId = await getUnqualifiedSchemaId( - indySchemaId.namespaceIdentifier, - indySchemaId.schemaName, - indySchemaId.schemaVersion - ) - if (schemaState.state === CredentialEnum.Finished) { - schemaState.schemaId = getSchemaUnqualifiedId - } - return schemaState + createSchemaPayload.options.endorserMode = EndorserMode.Internal + createSchemaPayload.options.endorserDid = issuerId } else { if (!schema.endorserDid) { - throw new Error('Please provide the endorser DID') + throw new BadRequestError(ENDORSER_DID_NOT_PRESENT) } + createSchemaPayload.options.endorserMode = EndorserMode.External + createSchemaPayload.options.endorserDid = schema.endorserDid + } + + const createSchemaTxResult = await this.agent.modules.anoncreds.registerSchema(createSchemaPayload) - const createSchemaTxResult = await this.agent.modules.anoncreds.registerSchema({ - options: { - endorserMode: 'external', - endorserDid: schema.endorserDid ? schema.endorserDid : '', - }, - schema: schemaPayload, - }) + if (createSchemaTxResult.schemaState.state === CredentialEnum.Failed) { + throw new InternalServerError(`Schema creation failed. Reason: ${createSchemaTxResult.schemaState.reason}`) + } + if (createSchemaTxResult.schemaState.state === CredentialEnum.Wait) { + this.setStatus(202) return createSchemaTxResult } - } catch (error) { - if (error instanceof CredoError) { - if (error.message.includes('UnauthorizedClientRequest')) { - return forbiddenError(400, { - reason: 'this action is not allowed.', - }) + + if (createSchemaTxResult.schemaState.state === CredentialEnum.Action) { + return createSchemaTxResult + } + + if (createSchemaTxResult.schemaState.state === CredentialEnum.Finished) { + // TODO: Return uniform response for both Internally and Externally endorsed Schemas + if (!schema.endorse) { + const indySchemaId = parseIndySchemaId(createSchemaTxResult.schemaState.schemaId as string) + + const getSchemaUnqualifiedId = await getUnqualifiedSchemaId( + indySchemaId.namespaceIdentifier, + indySchemaId.schemaName, + indySchemaId.schemaVersion + ) + + createSchemaTxResult.schemaState.schemaId = getSchemaUnqualifiedId + return createSchemaTxResult.schemaState } + return createSchemaTxResult } - return internalServerError(500, { message: `something went wrong: ${error}` }) + } catch (error) { + throw ErrorHandlingService.handle(error) } } } diff --git a/src/controllers/did/DidController.ts b/src/controllers/did/DidController.ts index 9f9cece7..63618cc4 100644 --- a/src/controllers/did/DidController.ts +++ b/src/controllers/did/DidController.ts @@ -14,10 +14,12 @@ import axios from 'axios' import { injectable } from 'tsyringe' import { DidMethod, Network, Role } from '../../enums/enum' -import { Did, DidRecordExample } from '../examples' +import ErrorHandlingService from '../../errorHandlingService' +import { BadRequestError, InternalServerError } from '../../errors' +import { CreateDidResponse, Did, DidRecordExample } from '../examples' import { DidCreate } from '../types' -import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' +import { Body, Controller, Example, Get, Path, Post, Route, Tags, Security } from 'tsoa' @Tags('Dids') @Route('/dids') @@ -39,17 +41,20 @@ export class DidController extends Controller { @Example(DidRecordExample) @Get('/:did') public async getDidRecordByDid(@Path('did') did: Did) { - const resolveResult = await this.agent.dids.resolve(did) - const importDid = await this.agent.dids.import({ - did, - overwrite: true, - }) - if (!resolveResult.didDocument) { - this.setStatus(500) - return { importDid } - } + try { + const resolveResult = await this.agent.dids.resolve(did) + const importDid = await this.agent.dids.import({ + did, + overwrite: true, + }) + if (!resolveResult.didDocument) { + throw new InternalServerError(`Error resolving DID docs for did: ${importDid}`) + } - return { ...resolveResult, didDocument: resolveResult.didDocument.toJSON() } + return { ...resolveResult, didDocument: resolveResult.didDocument.toJSON() } + } catch (error) { + throw ErrorHandlingService.handle(error) + } } /** @@ -59,16 +64,14 @@ export class DidController extends Controller { */ // @Example(DidRecordExample) + @Example(CreateDidResponse) @Post('/write') - public async writeDid( - @Body() createDidOptions: DidCreate, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async writeDid(@Body() createDidOptions: DidCreate) { let didRes try { if (!createDidOptions.method) { - throw Error('Method is required') + throw new BadRequestError('Method is required') } let result @@ -90,33 +93,33 @@ export class DidController extends Controller { break default: - return internalServerError(500, { message: `Invalid method: ${createDidOptions.method}` }) + throw new BadRequestError(`Invalid method: ${createDidOptions.method}`) } didRes = { ...result } return didRes } catch (error) { - return internalServerError(500, { message: `Something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } private async handleIndy(createDidOptions: DidCreate) { let result if (!createDidOptions.keyType) { - throw Error('keyType is required') + throw new BadRequestError('keyType is required') } if (!createDidOptions.network) { - throw Error('For indy method network is required') + throw new BadRequestError('For indy method network is required') } if (createDidOptions.keyType !== KeyType.Ed25519) { - throw Error('Only ed25519 key type supported') + throw new BadRequestError('Only ed25519 key type supported') } if (!Network.Bcovrin_Testnet && !Network.Indicio_Demonet && !Network.Indicio_Testnet) { - throw Error(`Invalid network for 'indy' method: ${createDidOptions.network}`) + throw new BadRequestError(`Invalid network for 'indy' method: ${createDidOptions.network}`) } switch (createDidOptions?.network?.toLowerCase()) { @@ -136,7 +139,7 @@ export class DidController extends Controller { break default: - throw new Error(`Network does not exists`) + throw new BadRequestError(`Network does not exists`) } return result } @@ -144,7 +147,7 @@ export class DidController extends Controller { private async handleBcovrin(createDidOptions: DidCreate, didMethod: string) { let didDocument if (!createDidOptions.seed) { - throw Error('Seed is required') + throw new BadRequestError('Seed is required') } if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { if (createDidOptions.did) { @@ -186,7 +189,7 @@ export class DidController extends Controller { } } else { if (!createDidOptions.endorserDid) { - throw new Error('Please provide the endorser DID or role') + throw new BadRequestError('Please provide the endorser DID or role') } const didCreateTxResult = await this.createEndorserDid(createDidOptions.endorserDid) return { did: didCreateTxResult.didState.did, didDocument: didCreateTxResult.didState.didDocument } @@ -196,7 +199,7 @@ export class DidController extends Controller { private async handleIndicio(createDidOptions: DidCreate, didMethod: string) { let didDocument if (!createDidOptions.seed) { - throw Error('Seed is required') + throw new BadRequestError('Seed is required') } if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { if (createDidOptions.did) { @@ -237,7 +240,7 @@ export class DidController extends Controller { } } else { if (!createDidOptions.endorserDid) { - throw new Error('Please provide the endorser DID or role') + throw new BadRequestError('Please provide the endorser DID or role') } const didCreateTxResult = await this.createEndorserDid(createDidOptions.endorserDid) return didCreateTxResult @@ -256,7 +259,7 @@ export class DidController extends Controller { private async createIndicioKey(createDidOptions: DidCreate) { if (!createDidOptions.seed) { - throw Error('Seed is required') + throw new BadRequestError('Seed is required') } const key = await this.agent.wallet.createKey({ privateKey: TypedArrayEncoder.fromString(createDidOptions.seed), @@ -280,7 +283,7 @@ export class DidController extends Controller { verkey: TypedArrayEncoder.toBase58(buffer), } } else { - throw new Error('Please provide a valid did method') + throw new BadRequestError('Please provide a valid did method') } return body } @@ -304,13 +307,13 @@ export class DidController extends Controller { let didDocument if (!didOptions.seed) { - throw Error('Seed is required') + throw new BadRequestError('Seed is required') } if (!didOptions.keyType) { - throw Error('keyType is required') + throw new BadRequestError('keyType is required') } if (didOptions.keyType !== KeyType.Ed25519 && didOptions.keyType !== KeyType.Bls12381g2) { - throw Error('Only ed25519 and bls12381g2 key type supported') + throw new BadRequestError('Only ed25519 and bls12381g2 key type supported') } if (!didOptions.did) { @@ -350,19 +353,19 @@ export class DidController extends Controller { public async handleWeb(didOptions: DidCreate) { let didDocument: any if (!didOptions.domain) { - throw Error('domain is required') + throw new BadRequestError('domain is required') } if (!didOptions.seed) { - throw Error('Seed is required') + throw new BadRequestError('Seed is required') } if (!didOptions.keyType) { - throw Error('keyType is required') + throw new BadRequestError('keyType is required') } if (didOptions.keyType !== KeyType.Ed25519 && didOptions.keyType !== KeyType.Bls12381g2) { - throw Error('Only ed25519 and bls12381g2 key type supported') + throw new BadRequestError('Only ed25519 and bls12381g2 key type supported') } const domain = didOptions.domain @@ -379,6 +382,7 @@ export class DidController extends Controller { .addContext('https://w3id.org/security/suites/ed25519-2018/v1') .addVerificationMethod(getEd25519VerificationKey2018({ key, id: keyId, controller: did })) .addAuthentication(keyId) + .addAssertionMethod(keyId) .build() } if (didOptions.keyType === KeyType.Bls12381g2) { @@ -386,6 +390,7 @@ export class DidController extends Controller { .addContext('https://w3id.org/security/bbs/v1') .addVerificationMethod(getBls12381G2Key2020({ key, id: keyId, controller: did })) .addAuthentication(keyId) + .addAssertionMethod(keyId) .build() } @@ -400,12 +405,18 @@ export class DidController extends Controller { public async handlePolygon(createDidOptions: DidCreate) { // need to discuss try catch logic const { endpoint, network, privatekey } = createDidOptions + + if (!network) { + throw new BadRequestError('Network is required for Polygon method') + } + const networkName = network?.split(':')[1] + if (networkName !== 'mainnet' && networkName !== 'testnet') { - throw Error('Invalid network type') + throw new BadRequestError('Invalid network type') } if (!privatekey || typeof privatekey !== 'string' || !privatekey.trim() || privatekey.length !== 64) { - throw Error('Invalid private key or not supported') + throw new BadRequestError('Invalid private key or not supported') } return this.agent.dids.create({ @@ -421,12 +432,12 @@ export class DidController extends Controller { } @Get('/') - public async getDids(@Res() internalServerError: TsoaResponse<500, { message: string }>) { + public async getDids() { try { const createdDids = await this.agent.dids.getCreatedDids() return createdDids } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } } diff --git a/src/controllers/endorser-transaction/EndorserTransactionController.ts b/src/controllers/endorser-transaction/EndorserTransactionController.ts index ef3154a2..6bbdfade 100644 --- a/src/controllers/endorser-transaction/EndorserTransactionController.ts +++ b/src/controllers/endorser-transaction/EndorserTransactionController.ts @@ -7,13 +7,15 @@ import { parseIndyCredentialDefinitionId, parseIndySchemaId, } from '@credo-ts/anoncreds' -import { Agent, CredoError } from '@credo-ts/core' +import { Agent } from '@credo-ts/core' import { injectable } from 'tsyringe' -import { CredentialEnum } from '../../enums/enum' +import { CredentialEnum, EndorserMode } from '../../enums/enum' +import ErrorHandlingService from '../../errorHandlingService' +import { BadRequestError } from '../../errors' import { DidNymTransaction, EndorserTransaction, WriteTransaction } from '../types' -import { Body, Controller, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' +import { Body, Controller, Post, Route, Tags, Security } from 'tsoa' @Tags('EndorserTransaction') @Route('/transactions') @@ -28,12 +30,14 @@ export class EndorserTransactionController extends Controller { } @Post('/endorse') - public async endorserTransaction( - @Body() endorserTransaction: EndorserTransaction, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Res() forbiddenError: TsoaResponse<400, { reason: string }> - ) { + public async endorserTransaction(@Body() endorserTransaction: EndorserTransaction) { try { + if (!endorserTransaction.transaction) { + throw new BadRequestError('Transaction is required') + } + if (!endorserTransaction.endorserDid) { + throw new BadRequestError('EndorserDid is required') + } const signedTransaction = await this.agent.modules.indyVdr.endorseTransaction( endorserTransaction.transaction, endorserTransaction.endorserDid @@ -41,27 +45,17 @@ export class EndorserTransactionController extends Controller { return { signedTransaction } } catch (error) { - if (error instanceof CredoError) { - if (error.message.includes('UnauthorizedClientRequest')) { - return forbiddenError(400, { - reason: 'this action is not allowed.', - }) - } - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Post('/set-endorser-role') - public async didNymTransaction( - @Body() didNymTransaction: DidNymTransaction, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async didNymTransaction(@Body() didNymTransaction: DidNymTransaction) { try { const didCreateSubmitResult = await this.agent.dids.create({ did: didNymTransaction.did, options: { - endorserMode: 'external', + endorserMode: EndorserMode.External, endorsedTransaction: { nymRequest: didNymTransaction.nymRequest, }, @@ -70,14 +64,12 @@ export class EndorserTransactionController extends Controller { return didCreateSubmitResult } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Post('/write') public async writeSchemaAndCredDefOnLedger( - @Res() forbiddenError: TsoaResponse<400, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }>, @Body() writeTransaction: WriteTransaction ) { @@ -98,14 +90,7 @@ export class EndorserTransactionController extends Controller { throw new Error('Please provide valid schema or credential-def!') } } catch (error) { - if (error instanceof CredoError) { - if (error.message.includes('UnauthorizedClientRequest')) { - return forbiddenError(400, { - reason: 'this action is not allowed.', - }) - } - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -118,34 +103,42 @@ export class EndorserTransactionController extends Controller { }, endorsedTransaction?: string ) { - try { - const { issuerId, name, version, attributes } = schema - const { schemaState } = await this.agent.modules.anoncreds.registerSchema({ - options: { - endorserMode: 'external', - endorsedTransaction, - }, - schema: { - attrNames: attributes, - issuerId: issuerId, - name: name, - version: version, - }, - }) + if (!schema.issuerId) { + throw new BadRequestError('IssuerId is required') + } + if (!schema.name) { + throw new BadRequestError('Name is required') + } + if (!schema.version) { + throw new BadRequestError('Version is required') + } + if (!schema.attributes) { + throw new BadRequestError('Attributes is required') + } + const { issuerId, name, version, attributes } = schema + const { schemaState } = await this.agent.modules.anoncreds.registerSchema({ + options: { + endorserMode: EndorserMode.External, + endorsedTransaction, + }, + schema: { + attrNames: attributes, + issuerId: issuerId, + name: name, + version: version, + }, + }) - const indySchemaId = parseIndySchemaId(schemaState.schemaId) - const getSchemaUnqualifiedId = await getUnqualifiedSchemaId( - indySchemaId.namespaceIdentifier, - indySchemaId.schemaName, - indySchemaId.schemaVersion - ) - if (schemaState.state === CredentialEnum.Finished || schemaState.state === CredentialEnum.Action) { - schemaState.schemaId = getSchemaUnqualifiedId - } - return schemaState - } catch (error) { - return error + const indySchemaId = parseIndySchemaId(schemaState.schemaId) + const getSchemaUnqualifiedId = await getUnqualifiedSchemaId( + indySchemaId.namespaceIdentifier, + indySchemaId.schemaName, + indySchemaId.schemaVersion + ) + if (schemaState.state === CredentialEnum.Finished || schemaState.state === CredentialEnum.Action) { + schemaState.schemaId = getSchemaUnqualifiedId } + return schemaState } public async submitCredDefOnLedger( @@ -158,30 +151,41 @@ export class EndorserTransactionController extends Controller { }, endorsedTransaction?: string ) { - try { - const { credentialDefinitionState } = await this.agent.modules.anoncreds.registerCredentialDefinition({ - credentialDefinition, - options: { - endorserMode: 'external', - endorsedTransaction: endorsedTransaction, - }, - }) + if (!credentialDefinition.schemaId) { + throw new BadRequestError('SchemaId is required') + } + if (!credentialDefinition.issuerId) { + throw new BadRequestError('IssuerId is required') + } + if (!credentialDefinition.tag) { + throw new BadRequestError('Tag is required') + } + if (!credentialDefinition.value) { + throw new BadRequestError('Value is required') + } + if (!credentialDefinition.type) { + throw new BadRequestError('Type is required') + } + const { credentialDefinitionState } = await this.agent.modules.anoncreds.registerCredentialDefinition({ + credentialDefinition, + options: { + endorserMode: EndorserMode.External, + endorsedTransaction: endorsedTransaction, + }, + }) - const indyCredDefId = parseIndyCredentialDefinitionId(credentialDefinitionState.credentialDefinitionId) - const getCredentialDefinitionId = await getUnqualifiedCredentialDefinitionId( - indyCredDefId.namespaceIdentifier, - indyCredDefId.schemaSeqNo, - indyCredDefId.tag - ) - if ( - credentialDefinitionState.state === CredentialEnum.Finished || - credentialDefinitionState.state === CredentialEnum.Action - ) { - credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId - } - return credentialDefinitionState - } catch (error) { - return error + const indyCredDefId = parseIndyCredentialDefinitionId(credentialDefinitionState.credentialDefinitionId) + const getCredentialDefinitionId = await getUnqualifiedCredentialDefinitionId( + indyCredDefId.namespaceIdentifier, + indyCredDefId.schemaSeqNo, + indyCredDefId.tag + ) + if ( + credentialDefinitionState.state === CredentialEnum.Finished || + credentialDefinitionState.state === CredentialEnum.Action + ) { + credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId } + return credentialDefinitionState } } diff --git a/src/controllers/examples.ts b/src/controllers/examples.ts index 7f8cd345..7a125b4c 100644 --- a/src/controllers/examples.ts +++ b/src/controllers/examples.ts @@ -164,6 +164,35 @@ export const outOfBandRecordExample = { reusable: false, } +// TODO: Fix example to satisfy W3cCredentialRecordOptions +export const W3cCredentialRecordExample = { + credential: { + // Populate with the required properties for a W3cVerifiableCredential + // Example: + '@context': ['https://www.w3.org/2018/credentials/v1'], + type: ['VerifiableCredential'], + issuer: 'https://example.com', + issuanceDate: '2023-01-01T00:00:00Z', + credentialSubject: { + id: 'did:example:1234567890', + name: 'John Doe', + }, + proof: { + type: 'Ed25519Signature2018', + created: '2023-01-01T00:00:00Z', + proofPurpose: 'assertionMethod', + verificationMethod: 'https://example.com/keys/1', + jws: '...', + }, + }, + tags: { + // Populate with the required properties for CustomW3cCredentialTags + // Example: + tag1: 'value1', + tag2: 'value2', + }, +} + export const CredentialExchangeRecordExample = { _tags: { state: 'offer-sent', @@ -213,6 +242,34 @@ export const SchemaExample = { seqNo: 351936, } +export const CreateSchemaSuccessful = { + state: 'finished', + schema: { + issuerId: 'did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7', + name: 'Test Schema', + version: '1.0.0', + attrNames: ['Name', 'Age'], + }, + schemaId: 'LRCUFcizUL74AGgLqdJHK7:2:Test Schema:1.0.0', +} + +export const CreateDidResponse = { + did: 'did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7', + didDocument: { + '@context': ['https://w3id.org/did/v1', 'https://w3id.org/security/suites/ed25519-2018/v1'], + id: 'did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7', + verificationMethod: [ + { + id: 'did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7#verkey', + type: 'Ed25519VerificationKey2018', + controller: 'did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7', + publicKeyBase58: 'BapLDK4dEY88vWcQgNbpAPVVP4r3CHs4MvShmmhqkxXM', + }, + ], + authentication: ['did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7#verkey'], + }, +} + export const CredentialDefinitionExample = { ver: '1.0', id: 'WgWxqztrNooG92RXvxSTWv:3:CL:20:tag', diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index 94819e58..3bfc0f76 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -4,6 +4,7 @@ import type { RecipientKeyOption, SchemaMetadata } from '../types' import type { PolygonDidCreateOptions } from '@ayanworks/credo-polygon-w3c-module/build/dids' import type { AcceptProofRequestOptions, + BasicMessageStorageProps, ConnectionRecordProps, CreateOutOfBandInvitationConfig, CredentialProtocolVersionType, @@ -24,12 +25,10 @@ import { getUnqualifiedCredentialDefinitionId, parseIndyCredentialDefinitionId, parseIndySchemaId, - AnonCredsError, } from '@credo-ts/anoncreds' import { AcceptCredentialOfferOptions, Agent, - CredoError, ConnectionRepository, CredentialRepository, CredentialState, @@ -39,7 +38,6 @@ import { Key, KeyType, OutOfBandInvitation, - RecordNotFoundError, TypedArrayEncoder, getBls12381G2Key2020, getEd25519VerificationKey2018, @@ -51,8 +49,24 @@ import { QuestionAnswerRole, QuestionAnswerState } from '@credo-ts/question-answ import axios from 'axios' import * as fs from 'fs' -import { CredentialEnum, DidMethod, Network, Role } from '../../enums/enum' -import { SchemaId, CredentialDefinitionId, RecordId, ProofRecordExample, ConnectionRecordExample } from '../examples' +import { CredentialEnum, DidMethod, EndorserMode, Network, NetworkTypes, Role, SchemaError } from '../../enums/enum' +import ErrorHandlingService from '../../errorHandlingService' +import { ENDORSER_DID_NOT_PRESENT } from '../../errorMessages' +import { + BadRequestError, + InternalServerError, + NotFoundError, + PaymentRequiredError, + UnprocessableEntityError, +} from '../../errors' +import { + SchemaId, + CredentialDefinitionId, + RecordId, + ProofRecordExample, + ConnectionRecordExample, + BasicMessageRecordExample, +} from '../examples' import { RequestProofOptions, CreateOfferOptions, @@ -65,23 +79,10 @@ import { WriteTransaction, CreateProofRequestOobOptions, CreateOfferOobOptions, + CreateSchemaInput, } from '../types' -import { - Body, - Controller, - Delete, - Get, - Post, - Query, - Res, - Route, - Tags, - TsoaResponse, - Path, - Example, - Security, -} from 'tsoa' +import { Body, Controller, Delete, Get, Post, Query, Route, Tags, Path, Example, Security, Response } from 'tsoa' @Tags('MultiTenancy') @Route('/multi-tenancy') @@ -97,34 +98,19 @@ export class MultiTenancyController extends Controller { //create wallet @Security('apiKey') @Post('/create-tenant') - public async createTenant( - @Body() createTenantOptions: CreateTenantOptions, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async createTenant(@Body() createTenantOptions: CreateTenantOptions) { const { config } = createTenantOptions try { const tenantRecord: TenantRecord = await this.agent.modules.tenants.createTenant({ config }) return tenantRecord } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `Tenant not created`, - }) - } - - return internalServerError(500, { message: `Something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/create-did/:tenantId') - public async createDid( - @Body() createDidOptions: DidCreate, - @Path('tenantId') tenantId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async createDid(@Body() createDidOptions: DidCreate, @Path('tenantId') tenantId: string) { let didRes try { if (!createDidOptions.method) { @@ -154,65 +140,53 @@ export class MultiTenancyController extends Controller { break default: - return internalServerError(500, { message: `Invalid method: ${createDidOptions.method}` }) + throw new InternalServerError(`Invalid method: ${createDidOptions.method}`) } didRes = { ...result } return didRes } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `Did not created`, - }) - } - - return internalServerError(500, { message: `Something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } private async handleIndy(createDidOptions: DidCreate, tenantId: string) { + const { keyType, seed, network, method } = createDidOptions + let result await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - if (!createDidOptions.keyType) { + if (!keyType) { throw Error('keyType is required') } - if (!createDidOptions.seed) { + if (!seed) { throw Error('Seed is required') } - if (!createDidOptions.network) { + if (!network) { throw Error('For indy method network is required') } - if (createDidOptions.keyType !== KeyType.Ed25519) { + if (keyType !== KeyType.Ed25519) { throw Error('Only ed25519 key type supported') } if (!Network.Bcovrin_Testnet && !Network.Indicio_Demonet && !Network.Indicio_Testnet) { - throw Error(`Invalid network for 'indy' method: ${createDidOptions.network}`) + throw Error(`Invalid network for 'indy' method: ${network}`) } - switch (createDidOptions?.network?.toLowerCase()) { + switch (network?.toLowerCase()) { case Network.Bcovrin_Testnet: - result = await this.handleBcovrin( - createDidOptions, - tenantAgent, - `did:${createDidOptions.method}:${createDidOptions.network}` - ) + result = await this.handleBcovrin(createDidOptions, tenantAgent, `did:${method}:${network}`) break case Network.Indicio_Demonet: case Network.Indicio_Testnet: - result = await this.handleIndicio( - createDidOptions, - tenantAgent, - `did:${createDidOptions.method}:${createDidOptions.network}` - ) + result = await this.handleIndicio(createDidOptions, tenantAgent, `did:${method}:${network}`) break default: - throw new Error(`Invalid network for 'indy' method: ${createDidOptions.network}`) + throw new BadRequestError(`Invalid network for 'indy' method: ${network}`) } }) return result @@ -223,41 +197,42 @@ export class MultiTenancyController extends Controller { tenantAgent: TenantAgent, didMethod: string ) { + const { seed, did, network, method, role, endorserDid } = createDidOptions let didDocument - if (!createDidOptions.seed) { + if (!seed) { throw Error('Seed is required') } - if (createDidOptions.did) { - await this.importDid(didMethod, createDidOptions.did, createDidOptions.seed, tenantAgent) + if (did) { + await this.importDid(didMethod, did, seed, tenantAgent) const getDid = await tenantAgent.dids.getCreatedDids({ - method: createDidOptions.method, - did: `did:${createDidOptions.method}:${createDidOptions.network}:${createDidOptions.did}`, + method: method, + did: `did:${method}:${network}:${did}`, }) if (getDid.length > 0) { didDocument = getDid[0].didDocument } return { - did: `${didMethod}:${createDidOptions.did}`, + did: `${didMethod}:${did}`, didDocument: didDocument, } } else { - if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { + if (role?.toLowerCase() === Role.Endorser) { await tenantAgent.wallet.createKey({ - privateKey: TypedArrayEncoder.fromString(createDidOptions.seed), + privateKey: TypedArrayEncoder.fromString(seed), keyType: KeyType.Ed25519, }) const body = { role: 'ENDORSER', alias: 'Alias', - seed: createDidOptions.seed, + seed: seed, } const BCOVRIN_REGISTER_URL = process.env.BCOVRIN_REGISTER_URL as string const res = await axios.post(BCOVRIN_REGISTER_URL, body) if (res) { const { did } = res?.data || {} - await this.importDid(didMethod, did, createDidOptions.seed, tenantAgent) + await this.importDid(didMethod, did, seed, tenantAgent) const didRecord = await tenantAgent.dids.getCreatedDids({ method: DidMethod.Indy, did: `did:${DidMethod.Indy}:${Network.Bcovrin_Testnet}:${res.data.did}`, @@ -273,7 +248,7 @@ export class MultiTenancyController extends Controller { } } } else { - if (!createDidOptions.endorserDid) { + if (!endorserDid) { throw Error('endorserDid or role is required') } @@ -281,7 +256,7 @@ export class MultiTenancyController extends Controller { method: DidMethod.Indy, options: { endorserMode: 'external', - endorserDid: createDidOptions.endorserDid ? createDidOptions.endorserDid : '', + endorserDid: endorserDid, }, })) as IndyVdrDidCreateResult return { did: didCreateTxResult.didState.did, didDocument: didCreateTxResult.didState.didDocument } @@ -294,27 +269,28 @@ export class MultiTenancyController extends Controller { tenantAgent: TenantAgent, didMethod: string ) { + const { seed, did, method, network, role } = createDidOptions let didDocument - if (!createDidOptions.seed) { + if (!seed) { throw Error('Seed is required') } - if (createDidOptions.did) { - await this.importDid(didMethod, createDidOptions?.did, createDidOptions.seed, tenantAgent) + if (did) { + await this.importDid(didMethod, did, seed, tenantAgent) const getDid = await tenantAgent.dids.getCreatedDids({ - method: createDidOptions.method, - did: `did:${createDidOptions.method}:${createDidOptions.network}:${createDidOptions.did}`, + method: method, + did: `did:${method}:${network}:${did}`, }) if (getDid.length > 0) { didDocument = getDid[0].didDocument } return { - did: `${didMethod}:${createDidOptions.did}`, + did: `${didMethod}:${did}`, didDocument: didDocument, } } else { - if (createDidOptions?.role?.toLowerCase() === Role.Endorser) { + if (role?.toLowerCase() === Role.Endorser) { return await this.handleEndorserCreation(createDidOptions, tenantAgent, didMethod) } else { return await this.handleIndyDidCreation(createDidOptions, tenantAgent) @@ -327,12 +303,13 @@ export class MultiTenancyController extends Controller { tenantAgent: TenantAgent, didMethod: string ) { + const { seed, network } = createDidOptions let didDocument - if (!createDidOptions.seed) { + if (!seed) { throw Error('Seed is required') } const key = await tenantAgent.wallet.createKey({ - privateKey: TypedArrayEncoder.fromString(createDidOptions.seed), + privateKey: TypedArrayEncoder.fromString(seed), keyType: KeyType.Ed25519, }) const buffer = TypedArrayEncoder.fromBase58(key.publicKeyBase58) @@ -340,15 +317,15 @@ export class MultiTenancyController extends Controller { const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)) let body - if (createDidOptions.network === Network.Indicio_Testnet) { + if (network === Network.Indicio_Testnet) { body = { - network: 'testnet', + network: NetworkTypes.Testnet, did, verkey: TypedArrayEncoder.toBase58(buffer), } - } else if (createDidOptions.network === Network.Indicio_Demonet) { + } else if (network === Network.Indicio_Demonet) { body = { - network: 'demonet', + network: NetworkTypes.Demonet, did, verkey: TypedArrayEncoder.toBase58(buffer), } @@ -356,7 +333,7 @@ export class MultiTenancyController extends Controller { const INDICIO_NYM_URL = process.env.INDICIO_NYM_URL as string const res = await axios.post(INDICIO_NYM_URL, body) if (res.data.statusCode === 200) { - await this.importDid(didMethod, did, createDidOptions.seed, tenantAgent) + await this.importDid(didMethod, did, seed, tenantAgent) const didRecord = await tenantAgent.dids.getCreatedDids({ method: DidMethod.Indy, did: `${didMethod}:${body?.did}`, @@ -388,26 +365,27 @@ export class MultiTenancyController extends Controller { } private async handleKey(createDidOptions: DidCreate, tenantId: string) { + const { seed, keyType } = createDidOptions let didResponse let did: string let didDocument: any await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - if (!createDidOptions.seed) { + if (!seed) { throw Error('Seed is required') } - if (!createDidOptions.keyType) { + if (!keyType) { throw Error('keyType is required') } - if (createDidOptions.keyType !== KeyType.Ed25519 && createDidOptions.keyType !== KeyType.Bls12381g2) { + if (keyType !== KeyType.Ed25519 && keyType !== KeyType.Bls12381g2) { throw Error('Only ed25519 and bls12381g2 key type supported') } if (!createDidOptions.did) { await tenantAgent.wallet.createKey({ keyType: createDidOptions.keyType, - seed: TypedArrayEncoder.fromString(createDidOptions.seed), + seed: TypedArrayEncoder.fromString(seed), }) const didKeyResponse = await tenantAgent.dids.create({ method: DidMethod.Key, @@ -415,7 +393,7 @@ export class MultiTenancyController extends Controller { keyType: KeyType.Ed25519, }, secret: { - privateKey: TypedArrayEncoder.fromString(createDidOptions.seed), + privateKey: TypedArrayEncoder.fromString(seed), }, }) did = `${didKeyResponse.didState.did}` @@ -478,44 +456,47 @@ export class MultiTenancyController extends Controller { } private async handleWeb(createDidOptions: DidCreate, tenantId: string) { + const { domain, keyType, seed, method } = createDidOptions let did let didDocument: any - if (!createDidOptions.domain) { + if (!domain) { throw Error('For web method domain is required') } - if (!createDidOptions.keyType) { + if (!keyType) { throw Error('keyType is required') } - if (createDidOptions.keyType !== KeyType.Ed25519 && createDidOptions.keyType !== KeyType.Bls12381g2) { + if (keyType !== KeyType.Ed25519 && keyType !== KeyType.Bls12381g2) { throw Error('Only ed25519 and bls12381g2 key type supported') } await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - if (!createDidOptions.seed) { + if (!seed) { throw Error('Seed is required') } - did = `did:${createDidOptions.method}:${createDidOptions.domain}` + did = `did:${method}:${domain}` const keyId = `${did}#key-1` const key = await tenantAgent.wallet.createKey({ - keyType: createDidOptions.keyType, - seed: TypedArrayEncoder.fromString(createDidOptions.seed), + keyType: keyType, + seed: TypedArrayEncoder.fromString(seed), }) - if (createDidOptions.keyType === KeyType.Ed25519) { + if (keyType === KeyType.Ed25519) { didDocument = new DidDocumentBuilder(did) .addContext('https://w3id.org/security/suites/ed25519-2018/v1') .addVerificationMethod(getEd25519VerificationKey2018({ key, id: keyId, controller: did })) .addAuthentication(keyId) + .addAssertionMethod(keyId) .build() } - if (createDidOptions.keyType === KeyType.Bls12381g2) { + if (keyType === KeyType.Bls12381g2) { didDocument = new DidDocumentBuilder(did) .addContext('https://w3id.org/security/bbs/v1') .addVerificationMethod(getBls12381G2Key2020({ key, id: keyId, controller: did })) .addAuthentication(keyId) + .addAssertionMethod(keyId) .build() } @@ -578,10 +559,7 @@ export class MultiTenancyController extends Controller { @Security('apiKey') @Get('/dids/:tenantId') - public async getDids( - @Path('tenantId') tenantId: string, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async getDids(@Path('tenantId') tenantId: string) { try { let getDids await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { @@ -589,17 +567,13 @@ export class MultiTenancyController extends Controller { }) return getDids } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/transactions/set-endorser-role/:tenantId') - public async didNymTransaction( - @Path('tenantId') tenantId: string, - @Body() didNymTransaction: DidNymTransaction, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async didNymTransaction(@Path('tenantId') tenantId: string, @Body() didNymTransaction: DidNymTransaction) { let didCreateSubmitResult try { await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { @@ -620,7 +594,7 @@ export class MultiTenancyController extends Controller { return didCreateSubmitResult } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -628,9 +602,7 @@ export class MultiTenancyController extends Controller { @Post('/transactions/endorse/:tenantId') public async endorserTransaction( @Path('tenantId') tenantId: string, - @Body() endorserTransaction: EndorserTransaction, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Res() forbiddenError: TsoaResponse<400, { reason: string }> + @Body() endorserTransaction: EndorserTransaction ) { let signedTransaction try { @@ -643,42 +615,32 @@ export class MultiTenancyController extends Controller { return { signedTransaction } } catch (error) { - if (error instanceof CredoError) { - if (error.message.includes('UnauthorizedClientRequest')) { - return forbiddenError(400, { - reason: 'this action is not allowed.', - }) - } - } - - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Example(ConnectionRecordExample) @Security('apiKey') @Get('/connections/:connectionId/:tenantId') - public async getConnectionById( - @Path('tenantId') tenantId: string, - @Path('connectionId') connectionId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }> - ) { - let connectionRecord - await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - const connection = await tenantAgent.connections.findById(connectionId) + public async getConnectionById(@Path('tenantId') tenantId: string, @Path('connectionId') connectionId: RecordId) { + try { + let connectionRecord + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const connection = await tenantAgent.connections.findById(connectionId) - if (!connection) - return notFoundError(404, { reason: `connection with connection id "${connectionId}" not found.` }) - connectionRecord = connection.toJSON() - }) + if (!connection) throw new NotFoundError(`connection with connection id "${connectionId}" not found.`) + connectionRecord = connection.toJSON() + }) - return connectionRecord + return connectionRecord + } catch (error) { + throw ErrorHandlingService.handle(error) + } } @Security('apiKey') @Post('/create-invitation/:tenantId') public async createInvitation( - @Res() internalServerError: TsoaResponse<500, { message: string }>, @Path('tenantId') tenantId: string, @Body() config?: Omit & RecipientKeyOption // Remove routing property from type ) { @@ -706,6 +668,10 @@ export class MultiTenancyController extends Controller { }, }) invitationDid = did.didState.did + + if (!invitationDid) { + throw new InternalServerError('Error in creating invitationDid') + } } outOfBandRecord = await tenantAgent.oob.createInvitation({ ...config, invitationDid }) @@ -722,14 +688,13 @@ export class MultiTenancyController extends Controller { invitationDid: config?.invitationDid ? '' : invitationDid, } } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/create-legacy-invitation/:tenantId') public async createLegacyInvitation( - @Res() internalServerError: TsoaResponse<500, { message: string }>, @Path('tenantId') tenantId: string, @Body() config?: Omit & RecipientKeyOption // props removed because of issues with serialization @@ -764,7 +729,7 @@ export class MultiTenancyController extends Controller { return getInvitation } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -772,8 +737,7 @@ export class MultiTenancyController extends Controller { @Post('/receive-invitation/:tenantId') public async receiveInvitation( @Body() invitationRequest: ReceiveInvitationProps, - @Path('tenantId') tenantId: string, - @Res() internalServerError: TsoaResponse<500, { message: string }> + @Path('tenantId') tenantId: string ) { let receiveInvitationRes try { @@ -789,7 +753,7 @@ export class MultiTenancyController extends Controller { return receiveInvitationRes } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -797,8 +761,7 @@ export class MultiTenancyController extends Controller { @Post('/receive-invitation-url/:tenantId') public async receiveInvitationFromUrl( @Body() invitationRequest: ReceiveInvitationByUrlProps, - @Path('tenantId') tenantId: string, - @Res() internalServerError: TsoaResponse<500, { message: string }> + @Path('tenantId') tenantId: string ) { let receiveInvitationUrl try { @@ -813,20 +776,15 @@ export class MultiTenancyController extends Controller { connectionRecord: connectionRecord?.toJSON(), } }) - return receiveInvitationUrl } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Get('/oob/:invitationId/:tenantId') - public async getAllOutOfBandRecords( - @Path('tenantId') tenantId: string, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Path('invitationId') invitationId?: string - ) { + public async getAllOutOfBandRecords(@Path('tenantId') tenantId: string, @Path('invitationId') invitationId?: string) { let outOfBandRecordsRes try { await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { @@ -840,7 +798,7 @@ export class MultiTenancyController extends Controller { return outOfBandRecordsRes } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -848,7 +806,6 @@ export class MultiTenancyController extends Controller { @Get('/connections/:tenantId') public async getAllConnections( @Path('tenantId') tenantId: string, - @Res() internalServerError: TsoaResponse<500, { message: string }>, @Query('outOfBandId') outOfBandId?: string, @Query('alias') alias?: string, @Query('state') state?: DidExchangeState, @@ -863,7 +820,6 @@ export class MultiTenancyController extends Controller { connectionRecord = await tenantAgent.connections.findAllByOutOfBandId(outOfBandId) } else { const connectionRepository = tenantAgent.dependencyManager.resolve(ConnectionRepository) - const connections = await connectionRepository.findByQuery(tenantAgent.context, { alias, myDid, @@ -871,115 +827,102 @@ export class MultiTenancyController extends Controller { theirLabel, state, }) - connectionRecord = connections.map((c: any) => c.toJSON()) } }) return connectionRecord } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Get('/url/:tenantId/:invitationId') - public async getInvitation( - @Path('invitationId') invitationId: string, - @Path('tenantId') tenantId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }> - ) { - let invitationJson - await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - const outOfBandRecord = await tenantAgent.oob.findByCreatedInvitationId(invitationId) + public async getInvitation(@Path('invitationId') invitationId: string, @Path('tenantId') tenantId: string) { + try { + let invitationJson + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const outOfBandRecord = await tenantAgent.oob.findByCreatedInvitationId(invitationId) - if (!outOfBandRecord || outOfBandRecord.state !== 'await-response') - return notFoundError(404, { reason: `connection with invitationId "${invitationId}" not found.` }) + if (!outOfBandRecord || outOfBandRecord.state !== 'await-response') + throw new NotFoundError(`connection with invitationId "${invitationId}" not found.`) - invitationJson = outOfBandRecord.outOfBandInvitation.toJSON({ useDidSovPrefixWhereAllowed: true }) - }) - return invitationJson + invitationJson = outOfBandRecord.outOfBandInvitation.toJSON({ useDidSovPrefixWhereAllowed: true }) + }) + return invitationJson + } catch (error) { + throw ErrorHandlingService.handle(error) + } } @Security('apiKey') @Post('/schema/:tenantId') public async createSchema( @Body() - schema: { - issuerId: string - name: string - version: Version - attributes: string[] - endorse?: boolean - endorserDid?: string - }, - @Path('tenantId') tenantId: string, - @Res() forbiddenError: TsoaResponse<400, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + schema: CreateSchemaInput, + @Path('tenantId') tenantId: string ) { - let schemaRecord try { - await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - if (!schema.endorse) { - const { schemaState } = await tenantAgent.modules.anoncreds.registerSchema({ - schema: { - issuerId: schema.issuerId, - name: schema.name, - version: schema.version, - attrNames: schema.attributes, - }, - options: { - endorserMode: 'internal', - endorserDid: schema.issuerId, - }, - }) + let createSchemaTxResult: any + const { issuerId, name, version, attributes, endorserDid, endorse } = schema - if (!schemaState.schemaId) { - throw Error('SchemaId not found') - } + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const schemaPayload = { + issuerId, + name, + version, + attrNames: attributes, + } - const indySchemaId = parseIndySchemaId(schemaState.schemaId) - const getSchemaId = await getUnqualifiedSchemaId( - indySchemaId.namespaceIdentifier, - indySchemaId.schemaName, - indySchemaId.schemaVersion - ) - if (schemaState.state === CredentialEnum.Finished) { - schemaState.schemaId = getSchemaId - } + const options = { + endorserMode: '', + endorserDid: '', + } - schemaRecord = schemaState + if (!endorse) { + options.endorserMode = EndorserMode.Internal + options.endorserDid = issuerId } else { - if (!schema.endorserDid) { - throw new Error('Please provide the endorser DID') + if (!endorserDid) { + throw new BadRequestError(ENDORSER_DID_NOT_PRESENT) } - - const createSchemaTxResult = await tenantAgent.modules.anoncreds.registerSchema({ - options: { - endorserMode: 'external', - endorserDid: schema.endorserDid ? schema.endorserDid : '', - }, - schema: { - attrNames: schema.attributes, - issuerId: schema.issuerId, - name: schema.name, - version: schema.version, - }, - }) - - schemaRecord = createSchemaTxResult + options.endorserMode = EndorserMode.External + options.endorserDid = endorserDid } + + createSchemaTxResult = await tenantAgent.modules.anoncreds.registerSchema({ + schema: schemaPayload, + options: options, + }) }) + if (createSchemaTxResult?.schemaState.state === CredentialEnum.Failed) { + throw new InternalServerError(`Schema creation failed. Reason: ${createSchemaTxResult?.schemaState.reason}`) + } - return schemaRecord - } catch (error) { - if (error instanceof CredoError) { - if (error.message.includes('UnauthorizedClientRequest')) { - return forbiddenError(400, { - reason: 'this action is not allowed.', - }) - } + if (createSchemaTxResult?.schemaState.state === CredentialEnum.Wait) { + this.setStatus(202) + return createSchemaTxResult + } + + if (createSchemaTxResult?.schemaState.state === CredentialEnum.Action) { + return createSchemaTxResult } - return internalServerError(500, { message: `something went wrong: ${error}` }) + if (createSchemaTxResult.schemaState.state === CredentialEnum.Finished) { + // TODO: Return uniform response for both Internally and Externally endorsed Schemas + if (!endorse) { + const indySchemaId = parseIndySchemaId(createSchemaTxResult.schemaState.schemaId as string) + const getSchemaUnqualifiedId = await getUnqualifiedSchemaId( + indySchemaId.namespaceIdentifier, + indySchemaId.schemaName, + indySchemaId.schemaVersion + ) + createSchemaTxResult.schemaState.schemaId = getSchemaUnqualifiedId + return createSchemaTxResult.schemaState + } + return createSchemaTxResult + } + } catch (error) { + throw ErrorHandlingService.handle(error) } } @@ -992,13 +935,12 @@ export class MultiTenancyController extends Controller { schemaName: string schema: { [key: string]: any } }, - @Path('tenantId') tenantId: string, - @Res() internalServerError: TsoaResponse<500, { message: string }> + @Path('tenantId') tenantId: string ): Promise { try { const { did, schemaName, schema } = createSchemaRequest if (!did || !schemaName || !schema) { - throw Error('One or more parameters are empty or undefined.') + throw new BadRequestError('One or more parameters are empty or undefined.') } const schemaResponse = await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { @@ -1008,15 +950,24 @@ export class MultiTenancyController extends Controller { schema, }) }) - + if (schemaResponse.schemaState?.state === CredentialEnum.Failed) { + const reason = schemaResponse.schemaState?.reason?.toLowerCase() + if (reason && reason.includes('insufficient') && reason.includes('funds')) { + throw new PaymentRequiredError( + 'Insufficient funds to the address, Please add funds to perform this operation' + ) + } else { + throw new InternalServerError(schemaResponse.schemaState?.reason) + } + } const configFileData = fs.readFileSync('config.json', 'utf-8') const config = JSON.parse(configFileData) if (!config.schemaFileServerURL) { - throw new Error('Please provide valid schema file server URL') + throw new UnprocessableEntityError('Please provide valid schema file server URL') } if (!schemaResponse?.schemaId) { - throw new Error('Invalid schema response') + throw new InternalServerError('Error in getting schema response') } const schemaPayload: SchemaMetadata = { schemaUrl: config.schemaFileServerURL + schemaResponse?.schemaId, @@ -1027,7 +978,7 @@ export class MultiTenancyController extends Controller { return schemaPayload } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1036,28 +987,20 @@ export class MultiTenancyController extends Controller { public async getPolygonW3CSchemaById( @Path('tenantId') tenantId: string, @Path('did') did: string, - @Path('schemaId') schemaId: string, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Res() badRequestError: TsoaResponse<400, { reason: string }>, - @Res() forbiddenError: TsoaResponse<401, { reason: string }> - ): Promise { - if (!tenantId || !did || !schemaId) { - return badRequestError(400, { reason: 'Missing or invalid parameters.' }) - } - + @Path('schemaId') schemaId: string + ) { try { + let schemaDetails + + if (!tenantId || !did || !schemaId) { + throw new BadRequestError('Missing or invalid parameters.') + } await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - return tenantAgent.modules.polygon.getSchemaById(did, schemaId) + schemaDetails = await tenantAgent.modules.polygon.getSchemaById(did, schemaId) }) + return schemaDetails } catch (error) { - if (error instanceof CredoError) { - if (error.message.includes('UnauthorizedClientRequest')) { - return forbiddenError(401, { - reason: 'this action is not allowed.', - }) - } - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1065,8 +1008,6 @@ export class MultiTenancyController extends Controller { @Post('/transactions/write/:tenantId') public async writeSchemaAndCredDefOnLedger( @Path('tenantId') tenantId: string, - @Res() forbiddenError: TsoaResponse<400, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }>, @Body() writeTransaction: WriteTransaction ) { @@ -1089,14 +1030,7 @@ export class MultiTenancyController extends Controller { throw new Error('Please provide valid schema or credential-def!') } } catch (error) { - if (error instanceof CredoError) { - if (error.message.includes('UnauthorizedClientRequest')) { - return forbiddenError(400, { - reason: 'this action is not allowed.', - }) - } - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1191,45 +1125,32 @@ export class MultiTenancyController extends Controller { @Security('apiKey') @Get('/schema/:schemaId/:tenantId') - public async getSchemaById( - @Path('schemaId') schemaId: SchemaId, - @Path('tenantId') tenantId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() forbiddenError: TsoaResponse<403, { reason: string }>, - @Res() badRequestError: TsoaResponse<400, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { - let getSchema + public async getSchemaById(@Path('schemaId') schemaId: SchemaId, @Path('tenantId') tenantId: string) { + let schemBySchemaId try { await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - getSchema = await tenantAgent.modules.anoncreds.getSchema(schemaId) + schemBySchemaId = await tenantAgent.modules.anoncreds.getSchema(schemaId) + + if ( + schemBySchemaId?.resolutionMetadata?.error === SchemaError.NotFound || + schemBySchemaId?.resolutionMetadata?.error === SchemaError.UnSupportedAnonCredsMethod + ) { + throw new NotFoundError( + schemBySchemaId?.resolutionMetadata?.message || `schema details with schema id "${schemaId}" not found.` + ) + } }) - return getSchema + return schemBySchemaId } catch (error) { - if (error instanceof AnonCredsError && error.message === 'IndyError(LedgerNotFound): LedgerNotFound') { - return notFoundError(404, { - reason: `schema definition with schemaId "${schemaId}" not found.`, - }) - } else if (error instanceof AnonCredsError && error.cause instanceof AnonCredsError) { - if ((error.cause.cause, 'LedgerInvalidTransaction')) { - return forbiddenError(403, { - reason: `schema definition with schemaId "${schemaId}" can not be returned.`, - }) - } - if ((error.cause.cause, 'CommonInvalidStructure')) { - return badRequestError(400, { - reason: `schemaId "${schemaId}" has invalid structure.`, - }) - } - } - - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/credential-definition/:tenantId') + @Response(200, 'Action required') + @Response(202, 'Wait for action to complete') public async createCredentialDefinition( @Body() credentialDefinitionRequest: { @@ -1239,74 +1160,80 @@ export class MultiTenancyController extends Controller { endorse?: boolean endorserDid?: string }, - @Path('tenantId') tenantId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + @Path('tenantId') tenantId: string ) { - let credentialDefinitionRecord try { + let registerCredentialDefinitionResult: any + const { issuerId, schemaId, tag, endorse, endorserDid } = credentialDefinitionRequest await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { credentialDefinitionRequest.endorse = credentialDefinitionRequest.endorse ? credentialDefinitionRequest.endorse : false - if (!credentialDefinitionRequest.endorse) { - const { credentialDefinitionState } = await tenantAgent.modules.anoncreds.registerCredentialDefinition({ - credentialDefinition: { - issuerId: credentialDefinitionRequest.issuerId, - schemaId: credentialDefinitionRequest.schemaId, - tag: credentialDefinitionRequest.tag, - }, - options: { - // TODO: update this later - supportRevocation: false, - }, - }) - - if (!credentialDefinitionState?.credentialDefinitionId) { - throw new Error('Credential Definition Id not found') - } - const indyCredDefId = parseIndyCredentialDefinitionId(credentialDefinitionState.credentialDefinitionId) - const getCredentialDefinitionId = await getUnqualifiedCredentialDefinitionId( - indyCredDefId.namespaceIdentifier, - indyCredDefId.schemaSeqNo, - indyCredDefId.tag - ) - if (credentialDefinitionState.state === CredentialEnum.Finished) { - credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId - } + const credDef = { + issuerId, + schemaId, + tag, + // TODO: Need to check this + // type: 'CL', + } + const credentialDefinitionPayload = { + credentialDefinition: credDef, + options: { + endorserMode: '', + endorserDid: '', + // TODO: update this later + supportRevocation: false, + }, + } - credentialDefinitionRecord = credentialDefinitionState + if (!endorse) { + credentialDefinitionPayload.options.endorserMode = EndorserMode.Internal + credentialDefinitionPayload.options.endorserDid = issuerId } else { - const createCredDefTxResult = await tenantAgent.modules.anoncreds.registerCredentialDefinition({ - credentialDefinition: { - issuerId: credentialDefinitionRequest.issuerId, - tag: credentialDefinitionRequest.tag, - schemaId: credentialDefinitionRequest.schemaId, - // TODO: Need to check this - // type: 'CL', - }, - options: { - // TODO: update this later - supportRevocation: false, - endorserMode: 'external', - endorserDid: credentialDefinitionRequest.endorserDid ? credentialDefinitionRequest.endorserDid : '', - }, - }) - - credentialDefinitionRecord = createCredDefTxResult + if (!endorserDid) { + throw new BadRequestError(ENDORSER_DID_NOT_PRESENT) + } + credentialDefinitionPayload.options.endorserMode = EndorserMode.External + credentialDefinitionPayload.options.endorserDid = endorserDid } + + registerCredentialDefinitionResult = await tenantAgent.modules.anoncreds.registerCredentialDefinition( + credentialDefinitionPayload + ) }) - return credentialDefinitionRecord - } catch (error) { - if (error instanceof notFoundError) { - return notFoundError(404, { - reason: `schema with schemaId "${credentialDefinitionRequest.schemaId}" not found.`, - }) + if (registerCredentialDefinitionResult?.credentialDefinitionState.state === CredentialEnum.Failed) { + throw new InternalServerError('Falied to register credef on ledger') + } + + if (registerCredentialDefinitionResult?.credentialDefinitionState.state === CredentialEnum.Wait) { + // The request has been accepted for processing, but the processing has not been completed. + this.setStatus(202) + return registerCredentialDefinitionResult } - return internalServerError(500, { message: `something went wrong: ${error}` }) + if (registerCredentialDefinitionResult?.credentialDefinitionState.state === CredentialEnum.Action) { + return registerCredentialDefinitionResult + } + // TODO: Return uniform response for both Internally and Externally endorsed Schemas + if (!endorse) { + const indyCredDefId = parseIndyCredentialDefinitionId( + registerCredentialDefinitionResult?.credentialDefinitionState.credentialDefinitionId as string + ) + + const getCredentialDefinitionId = await getUnqualifiedCredentialDefinitionId( + indyCredDefId.namespaceIdentifier, + indyCredDefId.schemaSeqNo, + indyCredDefId.tag + ) + + registerCredentialDefinitionResult.credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId + return registerCredentialDefinitionResult?.credentialDefinitionState + } + return registerCredentialDefinitionResult + } catch (error) { + throw ErrorHandlingService.handle(error) } } @@ -1314,42 +1241,36 @@ export class MultiTenancyController extends Controller { @Get('/credential-definition/:credentialDefinitionId/:tenantId') public async getCredentialDefinitionById( @Path('credentialDefinitionId') credentialDefinitionId: CredentialDefinitionId, - @Path('tenantId') tenantId: string, - @Res() badRequestError: TsoaResponse<400, { reason: string }>, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + @Path('tenantId') tenantId: string ) { - let getCredDef + let credentialDefinitionResult: any try { await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - getCredDef = await tenantAgent.modules.anoncreds.getCredentialDefinition(credentialDefinitionId) + credentialDefinitionResult = await tenantAgent.modules.anoncreds.getCredentialDefinition(credentialDefinitionId) }) - return getCredDef - } catch (error) { - if (error instanceof CredoError && error.message === 'IndyError(LedgerNotFound): LedgerNotFound') { - return notFoundError(404, { - reason: `credential definition with credentialDefinitionId "${credentialDefinitionId}" not found.`, - }) - } else if (error instanceof AnonCredsError && error.cause instanceof CredoError) { - if ((error.cause.cause, 'CommonInvalidStructure')) { - return badRequestError(400, { - reason: `credentialDefinitionId "${credentialDefinitionId}" has invalid structure.`, - }) - } + if (credentialDefinitionResult.resolutionMetadata?.error === SchemaError.NotFound) { + throw new NotFoundError(credentialDefinitionResult.resolutionMetadata.message) } + const error = credentialDefinitionResult.resolutionMetadata?.error - return internalServerError(500, { message: `something went wrong: ${error}` }) + if (error === 'invalid' || error === SchemaError.UnSupportedAnonCredsMethod) { + throw new BadRequestError(credentialDefinitionResult.resolutionMetadata.message) + } + + if (error !== undefined || credentialDefinitionResult.credentialDefinition === undefined) { + throw new InternalServerError(credentialDefinitionResult.resolutionMetadata.message) + } + + return credentialDefinitionResult + } catch (error) { + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/credentials/create-offer/:tenantId') - public async createOffer( - @Body() createOfferOptions: CreateOfferOptions, - @Path('tenantId') tenantId: string, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async createOffer(@Body() createOfferOptions: CreateOfferOptions, @Path('tenantId') tenantId: string) { let offer try { await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { @@ -1363,17 +1284,13 @@ export class MultiTenancyController extends Controller { return offer } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/credentials/create-offer-oob/:tenantId') - public async createOfferOob( - @Path('tenantId') tenantId: string, - @Body() createOfferOptions: CreateOfferOobOptions, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async createOfferOob(@Path('tenantId') tenantId: string, @Body() createOfferOptions: CreateOfferOobOptions) { let createOfferOobRecord try { @@ -1438,15 +1355,13 @@ export class MultiTenancyController extends Controller { }) return createOfferOobRecord } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/credentials/accept-offer/:tenantId') public async acceptOffer( - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }>, @Path('tenantId') tenantId: string, @Body() acceptCredentialOfferOptions: AcceptCredentialOfferOptions ) { @@ -1467,13 +1382,7 @@ export class MultiTenancyController extends Controller { return acceptOffer } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `credential with credential record id "${acceptCredentialOfferOptions.credentialRecordId}" not found.`, - }) - } - - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1481,9 +1390,7 @@ export class MultiTenancyController extends Controller { @Get('/credentials/:credentialRecordId/:tenantId') public async getCredentialById( @Path('credentialRecordId') credentialRecordId: RecordId, - @Path('tenantId') tenantId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + @Path('tenantId') tenantId: string ) { let credentialRecord try { @@ -1494,13 +1401,7 @@ export class MultiTenancyController extends Controller { return credentialRecord } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `credential with credential record id "${credentialRecordId}" not found.`, - }) - } - - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1513,39 +1414,42 @@ export class MultiTenancyController extends Controller { @Query('state') state?: CredentialState ) { let credentialRecord - await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - const credentialRepository = tenantAgent.dependencyManager.resolve(CredentialRepository) - const credentials = await credentialRepository.findByQuery(tenantAgent.context, { - connectionId, - threadId, - state, + try { + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const credentialRepository = tenantAgent.dependencyManager.resolve(CredentialRepository) + const credentials = await credentialRepository.findByQuery(tenantAgent.context, { + connectionId, + threadId, + state, + }) + credentialRecord = credentials.map((c: any) => c.toJSON()) }) - credentialRecord = credentials.map((c: any) => c.toJSON()) - }) - return credentialRecord + return credentialRecord + } catch (error) { + throw ErrorHandlingService.handle(error) + } } @Security('apiKey') @Get('/proofs/:tenantId') public async getAllProofs(@Path('tenantId') tenantId: string, @Query('threadId') threadId?: string) { let proofRecord - await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - let proofs = await tenantAgent.proofs.getAll() - if (threadId) proofs = proofs.filter((p: any) => p.threadId === threadId) - proofRecord = proofs.map((proof: any) => proof.toJSON()) - }) - return proofRecord + try { + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + let proofs = await tenantAgent.proofs.getAll() + if (threadId) proofs = proofs.filter((p: any) => p.threadId === threadId) + proofRecord = proofs.map((proof: any) => proof.toJSON()) + }) + return proofRecord + } catch (error) { + throw ErrorHandlingService.handle(error) + } } @Security('apiKey') @Get('/form-data/:tenantId/:proofRecordId') @Example(ProofRecordExample) - public async proofFormData( - @Path('proofRecordId') proofRecordId: string, - @Path('tenantId') tenantId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async proofFormData(@Path('proofRecordId') proofRecordId: string, @Path('tenantId') tenantId: string) { let proof try { await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { @@ -1553,25 +1457,14 @@ export class MultiTenancyController extends Controller { }) return proof } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `proof with proofRecordId "${proofRecordId}" not found.`, - }) - } - - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/proofs/request-proof/:tenantId') @Example(ProofRecordExample) - public async requestProof( - @Body() requestProofOptions: RequestProofOptions, - @Path('tenantId') tenantId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async requestProof(@Body() requestProofOptions: RequestProofOptions, @Path('tenantId') tenantId: string) { let proof try { await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { @@ -1590,7 +1483,7 @@ export class MultiTenancyController extends Controller { return proof } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1598,8 +1491,7 @@ export class MultiTenancyController extends Controller { @Post('/proofs/create-request-oob/:tenantId') public async createRequest( @Path('tenantId') tenantId: string, - @Body() createRequestOptions: CreateProofRequestOobOptions, - @Res() internalServerError: TsoaResponse<500, { message: string }> + @Body() createRequestOptions: CreateProofRequestOobOptions ) { let oobProofRecord try { @@ -1666,7 +1558,7 @@ export class MultiTenancyController extends Controller { return oobProofRecord } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1677,13 +1569,12 @@ export class MultiTenancyController extends Controller { @Path('tenantId') tenantId: string, @Path('proofRecordId') proofRecordId: string, @Body() - request: { + request: //TODO type for request + { filterByPresentationPreview?: boolean filterByNonRevocationRequirements?: boolean comment?: string - }, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + } ) { let proofRecord try { @@ -1691,65 +1582,40 @@ export class MultiTenancyController extends Controller { const requestedCredentials = await tenantAgent.proofs.selectCredentialsForRequest({ proofRecordId, }) - const acceptProofRequest: AcceptProofRequestOptions = { proofRecordId, comment: request.comment, proofFormats: requestedCredentials.proofFormats, } - const proof = await tenantAgent.proofs.acceptRequest(acceptProofRequest) proofRecord = proof.toJSON() }) return proofRecord } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `proof with proofRecordId "${proofRecordId}" not found.`, - }) - } - - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/proofs/:proofRecordId/accept-presentation/:tenantId') @Example(ProofRecordExample) - public async acceptPresentation( - @Path('tenantId') tenantId: string, - @Path('proofRecordId') proofRecordId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async acceptPresentation(@Path('tenantId') tenantId: string, @Path('proofRecordId') proofRecordId: string) { let proof try { await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { proof = await tenantAgent.proofs.acceptPresentation({ proofRecordId }) }) - return proof } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `proof with proofRecordId "${proofRecordId}" not found.`, - }) - } - - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Get('/proofs/:proofRecordId/:tenantId') @Example(ProofRecordExample) - public async getProofById( - @Path('tenantId') tenantId: string, - @Path('proofRecordId') proofRecordId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async getProofById(@Path('tenantId') tenantId: string, @Path('proofRecordId') proofRecordId: RecordId) { let proofRecord try { await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { @@ -1758,43 +1624,24 @@ export class MultiTenancyController extends Controller { }) return proofRecord } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `proof with proofRecordId "${proofRecordId}" not found.`, - }) - } - - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Delete(':tenantId') - public async deleteTenantById( - @Path('tenantId') tenantId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async deleteTenantById(@Path('tenantId') tenantId: string) { try { const deleteTenant = await this.agent.modules.tenants.deleteTenantById(tenantId) return JsonTransformer.toJSON(deleteTenant) } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `Tenant with id: ${tenantId} not found.`, - }) - } - return internalServerError(500, { message: `Something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/did/web/:tenantId') - public async createDidWeb( - @Path('tenantId') tenantId: string, - @Body() didOptions: DidCreate, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async createDidWeb(@Path('tenantId') tenantId: string, @Body() didOptions: DidCreate) { try { let didDoc await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { @@ -1802,7 +1649,10 @@ export class MultiTenancyController extends Controller { throw Error('Seed is required') } if (!didOptions.keyType) { - throw Error('keyType is required') + throw new BadRequestError('keyType is required') + } + if (!didOptions.domain) { + throw new BadRequestError('domain is required') } if (didOptions.keyType !== KeyType.Ed25519 && didOptions.keyType !== KeyType.Bls12381g2) { throw Error('Only ed25519 and bls12381g2 key type supported') @@ -1836,26 +1686,21 @@ export class MultiTenancyController extends Controller { }) return didDoc } catch (error) { - return internalServerError(500, { - message: `something went wrong: ${error}`, - }) + throw ErrorHandlingService.handle(error) } } @Security('apiKey') @Post('/did/key:tenantId') - public async createDidKey( - @Path('tenantId') tenantId: string, - @Body() didOptions: DidCreate, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async createDidKey(@Path('tenantId') tenantId: string, @Body() didOptions: DidCreate) { try { let didCreateResponse await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { if (!didOptions.seed) { - throw Error('Seed is required') + throw new BadRequestError('Seed is required') } didCreateResponse = await tenantAgent.dids.create({ + //TODO enum for method method: 'key', options: { keyType: KeyType.Ed25519, @@ -1867,9 +1712,7 @@ export class MultiTenancyController extends Controller { }) return didCreateResponse } catch (error) { - return internalServerError(500, { - message: `something went wrong: ${error}`, - }) + throw ErrorHandlingService.handle(error) } } @@ -1892,16 +1735,20 @@ export class MultiTenancyController extends Controller { @Query('state') state?: QuestionAnswerState, @Query('threadId') threadId?: string ) { - let questionAnswerRecords: QuestionAnswerRecord[] = [] - await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - questionAnswerRecords = await tenantAgent.modules.questionAnswer.findAllByQuery({ - connectionId, - role, - state, - threadId, + try { + let questionAnswerRecords: QuestionAnswerRecord[] = [] + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + questionAnswerRecords = await tenantAgent.modules.questionAnswer.findAllByQuery({ + connectionId, + role, + state, + threadId, + }) }) - }) - return questionAnswerRecords.map((record) => record.toJSON()) + return questionAnswerRecords.map((record) => record.toJSON()) + } catch (error) { + throw ErrorHandlingService.handle(error) + } } /** @@ -1917,13 +1764,12 @@ export class MultiTenancyController extends Controller { @Path('connectionId') connectionId: RecordId, @Path('tenantId') tenantId: string, @Body() - config: { + config: //TODO type for config + { question: string validResponses: ValidResponse[] detail?: string - }, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + } ) { try { const { question, validResponses, detail } = config @@ -1936,13 +1782,9 @@ export class MultiTenancyController extends Controller { }) questionAnswerRecord = questionAnswerRecord?.toJSON() }) - return questionAnswerRecord } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { reason: `connection with connection id "${connectionId}" not found.` }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1958,9 +1800,7 @@ export class MultiTenancyController extends Controller { public async sendAnswer( @Path('id') id: RecordId, @Path('tenantId') tenantId: string, - @Body() request: Record<'response', string>, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + @Body() request: Record<'response', string> ) { try { let questionAnswerRecord @@ -1970,10 +1810,7 @@ export class MultiTenancyController extends Controller { }) return questionAnswerRecord } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { reason: `record with connection id "${id}" not found.` }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1986,23 +1823,69 @@ export class MultiTenancyController extends Controller { */ @Security('apiKey') @Get('/question-answer/:id/:tenantId') - public async getQuestionAnswerRecordById( - @Path('id') id: RecordId, - @Path('tenantId') tenantId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }> - ) { - let questionAnswerRecord - await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { - const record = await tenantAgent.modules.questionAnswer.findById(id) - questionAnswerRecord = record - }) + public async getQuestionAnswerRecordById(@Path('id') id: RecordId, @Path('tenantId') tenantId: string) { + try { + let questionAnswerRecord + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const record = await tenantAgent.modules.questionAnswer.findById(id) + questionAnswerRecord = record + }) + if (!questionAnswerRecord) { + throw new NotFoundError(`Question Answer Record with id "${id}" not found.`) + } + return questionAnswerRecord + } catch (error) { + throw ErrorHandlingService.handle(error) + } + } - if (!questionAnswerRecord) { - return notFoundError(404, { - reason: `Question Answer Record with id "${id}" not found.`, + /** + * Retrieve basic messages by connection id + * + * @param connectionId Connection identifier + * @returns BasicMessageRecord[] + */ + @Example([BasicMessageRecordExample]) + @Security('apiKey') + @Get('/basic-messages/:connectionId/:tenantId') + public async getBasicMessages(@Path('connectionId') connectionId: RecordId, @Path('tenantId') tenantId: string) { + try { + let basicMessageRecords + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + basicMessageRecords = await tenantAgent.basicMessages.findAllByQuery({ connectionId }) }) + if (!basicMessageRecords) { + throw new NotFoundError(`Basic message with id "${connectionId}" not found.`) + } + + return basicMessageRecords + } catch (error) { + throw ErrorHandlingService.handle(error) } + } - return questionAnswerRecord + /** + * Send a basic message to a connection + * + * @param connectionId Connection identifier + * @param content The content of the message + */ + @Example(BasicMessageRecordExample) + @Security('apiKey') + @Post('/basic-messages/:connectionId/:tenantId') + public async sendMessage( + @Path('connectionId') connectionId: RecordId, + @Path('tenantId') tenantId: string, + @Body() request: Record<'content', string> + ) { + try { + let basicMessageRecord + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + basicMessageRecord = await tenantAgent.basicMessages.sendMessage(connectionId, request.content) + }) + return basicMessageRecord + } catch (error) { + throw ErrorHandlingService.handle(error) + } } } diff --git a/src/controllers/outofband/OutOfBandController.ts b/src/controllers/outofband/OutOfBandController.ts index 63d28b35..4450bd92 100644 --- a/src/controllers/outofband/OutOfBandController.ts +++ b/src/controllers/outofband/OutOfBandController.ts @@ -1,3 +1,4 @@ +import type { RestAgentModules } from '../../cliAgent' import type { OutOfBandInvitationProps, OutOfBandRecordWithInvitationProps } from '../examples' import type { AgentMessageType, RecipientKeyOption, CreateInvitationOptions } from '../types' import type { @@ -12,7 +13,6 @@ import { JsonTransformer, OutOfBandInvitation, Agent, - RecordNotFoundError, Key, KeyType, createPeerDidDocumentFromServices, @@ -20,33 +20,21 @@ import { } from '@credo-ts/core' import { injectable } from 'tsyringe' +import ErrorHandlingService from '../../errorHandlingService' +import { NotFoundError } from '../../errors' import { ConnectionRecordExample, outOfBandInvitationExample, outOfBandRecordExample, RecordId } from '../examples' import { AcceptInvitationConfig, ReceiveInvitationByUrlProps, ReceiveInvitationProps } from '../types' -import { - Body, - Controller, - Delete, - Example, - Get, - Path, - Post, - Query, - Res, - Route, - Tags, - TsoaResponse, - Security, -} from 'tsoa' +import { Body, Controller, Delete, Example, Get, Path, Post, Query, Route, Tags, Security } from 'tsoa' @Tags('Out Of Band') @Security('apiKey') @Route('/oob') @injectable() export class OutOfBandController extends Controller { - private agent: Agent + private agent: Agent - public constructor(agent: Agent) { + public constructor(agent: Agent) { super() this.agent = agent } @@ -59,11 +47,15 @@ export class OutOfBandController extends Controller { @Example([outOfBandRecordExample]) @Get() public async getAllOutOfBandRecords(@Query('invitationId') invitationId?: RecordId) { - let outOfBandRecords = await this.agent.oob.getAll() + try { + let outOfBandRecords = await this.agent.oob.getAll() - if (invitationId) outOfBandRecords = outOfBandRecords.filter((o) => o.outOfBandInvitation.id === invitationId) + if (invitationId) outOfBandRecords = outOfBandRecords.filter((o) => o.outOfBandInvitation.id === invitationId) - return outOfBandRecords.map((c) => c.toJSON()) + return outOfBandRecords.map((c) => c.toJSON()) + } catch (error) { + throw ErrorHandlingService.handle(error) + } } /** @@ -73,16 +65,16 @@ export class OutOfBandController extends Controller { */ @Example(outOfBandRecordExample) @Get('/:outOfBandId') - public async getOutOfBandRecordById( - @Path('outOfBandId') outOfBandId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }> - ) { - const outOfBandRecord = await this.agent.oob.findById(outOfBandId) + public async getOutOfBandRecordById(@Path('outOfBandId') outOfBandId: RecordId) { + try { + const outOfBandRecord = await this.agent.oob.findById(outOfBandId) - if (!outOfBandRecord) - return notFoundError(404, { reason: `Out of band record with id "${outOfBandId}" not found.` }) + if (!outOfBandRecord) throw new NotFoundError(`Out of band record with id "${outOfBandId}" not found.`) - return outOfBandRecord.toJSON() + return outOfBandRecord.toJSON() + } catch (error) { + throw ErrorHandlingService.handle(error) + } } /** @@ -102,7 +94,6 @@ export class OutOfBandController extends Controller { }) @Post('/create-invitation') public async createInvitation( - @Res() internalServerError: TsoaResponse<500, { message: string }>, @Body() config: CreateInvitationOptions & RecipientKeyOption // props removed because of issues with serialization ) { try { @@ -142,7 +133,7 @@ export class OutOfBandController extends Controller { invitationDid: config?.invitationDid ? '' : invitationDid, } } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -160,7 +151,6 @@ export class OutOfBandController extends Controller { }) @Post('/create-legacy-invitation') public async createLegacyInvitation( - @Res() internalServerError: TsoaResponse<500, { message: string }>, @Body() config?: Omit & RecipientKeyOption ) { try { @@ -191,7 +181,7 @@ export class OutOfBandController extends Controller { ...(config?.recipientKey ? {} : { recipientKey: routing.recipientKey.publicKeyBase58 }), } } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -215,9 +205,7 @@ export class OutOfBandController extends Controller { recordId: string message: AgentMessageType domain: string - }, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + } ) { try { const agentMessage = JsonTransformer.fromJSON(config.message, AgentMessage) @@ -227,10 +215,7 @@ export class OutOfBandController extends Controller { message: agentMessage, }) } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { reason: `connection with connection id "${config.recordId}" not found.` }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -247,10 +232,7 @@ export class OutOfBandController extends Controller { connectionRecord: ConnectionRecordExample, }) @Post('/receive-invitation') - public async receiveInvitation( - @Body() invitationRequest: ReceiveInvitationProps, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async receiveInvitation(@Body() invitationRequest: ReceiveInvitationProps) { const { invitation, ...config } = invitationRequest try { @@ -262,7 +244,7 @@ export class OutOfBandController extends Controller { connectionRecord: connectionRecord?.toJSON(), } } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -279,10 +261,7 @@ export class OutOfBandController extends Controller { connectionRecord: ConnectionRecordExample, }) @Post('/receive-invitation-url') - public async receiveInvitationFromUrl( - @Body() invitationRequest: ReceiveInvitationByUrlProps, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async receiveInvitationFromUrl(@Body() invitationRequest: ReceiveInvitationByUrlProps) { const { invitationUrl, ...config } = invitationRequest try { @@ -296,7 +275,7 @@ export class OutOfBandController extends Controller { connectionRecord: connectionRecord?.toJSON(), } } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -311,9 +290,7 @@ export class OutOfBandController extends Controller { @Post('/:outOfBandId/accept-invitation') public async acceptInvitation( @Path('outOfBandId') outOfBandId: RecordId, - @Body() acceptInvitationConfig: AcceptInvitationConfig, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + @Body() acceptInvitationConfig: AcceptInvitationConfig ) { try { const { outOfBandRecord, connectionRecord } = await this.agent.oob.acceptInvitation( @@ -326,12 +303,7 @@ export class OutOfBandController extends Controller { connectionRecord: connectionRecord?.toJSON(), } } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `mediator with mediatorId ${acceptInvitationConfig?.mediatorId} not found`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -341,19 +313,12 @@ export class OutOfBandController extends Controller { * @param outOfBandId Record identifier */ @Delete('/:outOfBandId') - public async deleteOutOfBandRecord( - @Path('outOfBandId') outOfBandId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async deleteOutOfBandRecord(@Path('outOfBandId') outOfBandId: RecordId) { try { this.setStatus(204) await this.agent.oob.deleteById(outOfBandId) } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { reason: `Out of band record with id "${outOfBandId}" not found.` }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } } diff --git a/src/controllers/polygon/PolygonController.ts b/src/controllers/polygon/PolygonController.ts index 86427367..c028ab4d 100644 --- a/src/controllers/polygon/PolygonController.ts +++ b/src/controllers/polygon/PolygonController.ts @@ -3,11 +3,14 @@ import type { SchemaMetadata } from '../types' import { generateSecp256k1KeyPair } from '@ayanworks/credo-polygon-w3c-module' import { DidOperation } from '@ayanworks/credo-polygon-w3c-module/build/ledger' -import { Agent, CredoError } from '@credo-ts/core' +import { Agent } from '@credo-ts/core' import * as fs from 'fs' import { injectable } from 'tsyringe' -import { Route, Tags, Security, Controller, Post, TsoaResponse, Res, Body, Get, Path } from 'tsoa' +import ErrorHandlingService from '../../errorHandlingService' +import { BadRequestError, UnprocessableEntityError } from '../../errors' + +import { Route, Tags, Security, Controller, Post, Body, Get, Path } from 'tsoa' @Tags('Polygon') @Security('apiKey') @@ -27,7 +30,7 @@ export class Polygon extends Controller { * @returns Secp256k1KeyPair */ @Post('create-keys') - public async createKeyPair(@Res() internalServerError: TsoaResponse<500, { message: string }>): Promise<{ + public async createKeyPair(): Promise<{ privateKey: string publicKeyBase58: string address: string @@ -36,7 +39,7 @@ export class Polygon extends Controller { return await generateSecp256k1KeyPair() } catch (error) { // Handle the error here - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -52,16 +55,12 @@ export class Polygon extends Controller { did: string schemaName: string schema: { [key: string]: any } - }, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Res() badRequestError: TsoaResponse<400, { reason: string }> + } ): Promise { try { const { did, schemaName, schema } = createSchemaRequest if (!did || !schemaName || !schema) { - return badRequestError(400, { - reason: `One or more parameters are empty or undefined.`, - }) + throw new BadRequestError('One or more parameters are empty or undefined.') } const schemaResponse = await this.agent.modules.polygon.createSchema({ @@ -69,7 +68,16 @@ export class Polygon extends Controller { schemaName, schema, }) - + if (schemaResponse.schemaState?.state === 'failed') { + const reason = schemaResponse.schemaState?.reason?.toLowerCase() + if (reason && reason.includes('insufficient') && reason.includes('funds')) { + throw new UnprocessableEntityError( + 'Insufficient funds to the address, Please add funds to perform this operation' + ) + } else { + throw new Error(schemaResponse.schemaState?.reason) + } + } const schemaServerConfig = fs.readFileSync('config.json', 'utf-8') const configJson = JSON.parse(schemaServerConfig) if (!configJson.schemaFileServerURL) { @@ -77,7 +85,7 @@ export class Polygon extends Controller { } if (!schemaResponse?.schemaId) { - throw new Error('Invalid schema response') + throw new BadRequestError('Invalid schema response') } const schemaPayload: SchemaMetadata = { schemaUrl: configJson.schemaFileServerURL + schemaResponse?.schemaId, @@ -87,7 +95,7 @@ export class Polygon extends Controller { } return schemaPayload } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -102,17 +110,13 @@ export class Polygon extends Controller { estimateTransactionRequest: { operation: any transaction: any - }, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Res() badRequestError: TsoaResponse<400, { reason: string }> + } ): Promise { try { const { operation } = estimateTransactionRequest if (!(operation in DidOperation)) { - return badRequestError(400, { - reason: `Invalid method parameter!`, - }) + throw new BadRequestError('Invalid method parameter!') } if (operation === DidOperation.Create) { return this.agent.modules.polygon.estimateFeeForDidOperation({ operation }) @@ -120,7 +124,7 @@ export class Polygon extends Controller { return this.agent.modules.polygon.estimateFeeForDidOperation({ operation }) } } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -130,23 +134,11 @@ export class Polygon extends Controller { * @returns Schema Object */ @Get(':did/:schemaId') - public async getSchemaById( - @Path('did') did: string, - @Path('schemaId') schemaId: string, - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Res() forbiddenError: TsoaResponse<401, { reason: string }> - ): Promise { + public async getSchemaById(@Path('did') did: string, @Path('schemaId') schemaId: string): Promise { try { return this.agent.modules.polygon.getSchemaById(did, schemaId) } catch (error) { - if (error instanceof CredoError) { - if (error.message.includes('UnauthorizedClientRequest')) { - return forbiddenError(401, { - reason: 'this action is not allowed.', - }) - } - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } } diff --git a/src/controllers/proofs/ProofController.ts b/src/controllers/proofs/ProofController.ts index 101a5aa2..903acba9 100644 --- a/src/controllers/proofs/ProofController.ts +++ b/src/controllers/proofs/ProofController.ts @@ -1,13 +1,15 @@ import type { AcceptProofRequestOptions, + PeerDidNumAlgo2CreateOptions, ProofExchangeRecordProps, ProofsProtocolVersionType, Routing, } from '@credo-ts/core' -import { Agent, Key, KeyType, RecordNotFoundError } from '@credo-ts/core' +import { Agent, PeerDidNumAlgo, createPeerDidDocumentFromServices } from '@credo-ts/core' import { injectable } from 'tsyringe' +import ErrorHandlingService from '../../errorHandlingService' import { ProofRecordExample, RecordId } from '../examples' import { AcceptProofProposal, @@ -16,7 +18,7 @@ import { RequestProofProposalOptions, } from '../types' -import { Body, Controller, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' +import { Body, Controller, Example, Get, Path, Post, Query, Route, Tags, Security } from 'tsoa' @Tags('Proofs') @Route('/proofs') @@ -38,11 +40,15 @@ export class ProofController extends Controller { @Example([ProofRecordExample]) @Get('/') public async getAllProofs(@Query('threadId') threadId?: string) { - let proofs = await this.agent.proofs.getAll() + try { + let proofs = await this.agent.proofs.getAll() - if (threadId) proofs = proofs.filter((p) => p.threadId === threadId) + if (threadId) proofs = proofs.filter((p) => p.threadId === threadId) - return proofs.map((proof) => proof.toJSON()) + return proofs.map((proof) => proof.toJSON()) + } catch (error) { + throw ErrorHandlingService.handle(error) + } } /** @@ -53,22 +59,13 @@ export class ProofController extends Controller { */ @Get('/:proofRecordId') @Example(ProofRecordExample) - public async getProofById( - @Path('proofRecordId') proofRecordId: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async getProofById(@Path('proofRecordId') proofRecordId: RecordId) { try { const proof = await this.agent.proofs.getById(proofRecordId) return proof.toJSON() } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `proof with proofRecordId "${proofRecordId}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -81,11 +78,7 @@ export class ProofController extends Controller { */ @Post('/propose-proof') @Example(ProofRecordExample) - public async proposeProof( - @Body() requestProofProposalOptions: RequestProofProposalOptions, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async proposeProof(@Body() requestProofProposalOptions: RequestProofProposalOptions) { try { const proof = await this.agent.proofs.proposeProof({ connectionId: requestProofProposalOptions.connectionId, @@ -99,12 +92,7 @@ export class ProofController extends Controller { return proof } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `connection with connection id "${requestProofProposalOptions.connectionId}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -118,32 +106,22 @@ export class ProofController extends Controller { */ @Post('/:proofRecordId/accept-proposal') @Example(ProofRecordExample) - public async acceptProposal( - @Body() acceptProposal: AcceptProofProposal, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async acceptProposal(@Body() acceptProposal: AcceptProofProposal) { try { const proof = await this.agent.proofs.acceptProposal(acceptProposal) return proof } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `proof with proof record "${acceptProposal.proofRecordId}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } + /** + * Creates a presentation request bound to existing connection + */ @Post('/request-proof') @Example(ProofRecordExample) - public async requestProof( - @Body() requestProofOptions: RequestProofOptions, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async requestProof(@Body() requestProofOptions: RequestProofOptions) { try { const requestProofPayload = { connectionId: requestProofOptions.connectionId, @@ -159,27 +137,42 @@ export class ProofController extends Controller { return proof } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } + /** + * Creates a presentation request not bound to any proposal or existing connection + */ @Post('create-request-oob') - public async createRequest( - @Body() createRequestOptions: CreateProofRequestOobOptions, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + @Example(ProofRecordExample) + public async createRequest(@Body() createRequestOptions: CreateProofRequestOobOptions) { try { let routing: Routing - if (createRequestOptions?.recipientKey) { - routing = { - endpoints: this.agent.config.endpoints, - routingKeys: [], - recipientKey: Key.fromPublicKeyBase58(createRequestOptions.recipientKey, KeyType.Ed25519), - mediatorId: undefined, - } + let invitationDid: string | undefined + + if (createRequestOptions?.invitationDid) { + invitationDid = createRequestOptions?.invitationDid } else { routing = await this.agent.mediationRecipient.getRouting({}) + const didDocument = createPeerDidDocumentFromServices([ + { + id: 'didcomm', + recipientKeys: [routing.recipientKey], + routingKeys: routing.routingKeys, + serviceEndpoint: routing.endpoints[0], + }, + ]) + const did = await this.agent.dids.create({ + didDocument, + method: 'peer', + options: { + numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc, + }, + }) + invitationDid = did.didState.did } + const proof = await this.agent.proofs.createRequest({ protocolVersion: createRequestOptions.protocolVersion as ProofsProtocolVersionType<[]>, proofFormats: createRequestOptions.proofFormats, @@ -195,7 +188,7 @@ export class ProofController extends Controller { messages: [proofMessage], autoAcceptConnection: true, imageUrl: createRequestOptions?.imageUrl, - routing, + invitationDid, }) return { @@ -206,10 +199,10 @@ export class ProofController extends Controller { useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, }), outOfBandRecord: outOfBandRecord.toJSON(), - recipientKey: createRequestOptions?.recipientKey ? {} : { recipientKey: routing.recipientKey.publicKeyBase58 }, + invitationDid: createRequestOptions?.invitationDid ? '' : invitationDid, } } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -230,9 +223,7 @@ export class ProofController extends Controller { filterByPresentationPreview?: boolean filterByNonRevocationRequirements?: boolean comment?: string - }, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + } ) { try { const requestedCredentials = await this.agent.proofs.selectCredentialsForRequest({ @@ -249,12 +240,7 @@ export class ProofController extends Controller { return proof.toJSON() } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `proof with proofRecordId "${proofRecordId}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -267,41 +253,30 @@ export class ProofController extends Controller { */ @Post('/:proofRecordId/accept-presentation') @Example(ProofRecordExample) - public async acceptPresentation( - @Path('proofRecordId') proofRecordId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async acceptPresentation(@Path('proofRecordId') proofRecordId: string) { try { const proof = await this.agent.proofs.acceptPresentation({ proofRecordId }) return proof } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `proof with proofRecordId "${proofRecordId}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } + /** + * Return proofRecord + * + * @param proofRecordId + * @returns ProofRecord + */ @Get('/:proofRecordId/form-data') @Example(ProofRecordExample) - public async proofFormData( - @Path('proofRecordId') proofRecordId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + // TODO: Add return type + public async proofFormData(@Path('proofRecordId') proofRecordId: string): Promise { try { const proof = await this.agent.proofs.getFormatData(proofRecordId) return proof } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `proof with proofRecordId "${proofRecordId}" not found.`, - }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } } diff --git a/src/controllers/question-answer/QuestionAnswerController.ts b/src/controllers/question-answer/QuestionAnswerController.ts index 524dca9d..e4ae9881 100644 --- a/src/controllers/question-answer/QuestionAnswerController.ts +++ b/src/controllers/question-answer/QuestionAnswerController.ts @@ -1,13 +1,15 @@ import type { RestAgentModules } from '../../cliAgent' import type { ValidResponse } from '@credo-ts/question-answer' -import { Agent, RecordNotFoundError } from '@credo-ts/core' -import { QuestionAnswerRole, QuestionAnswerState } from '@credo-ts/question-answer' +import { Agent } from '@credo-ts/core' +import { QuestionAnswerRecord, QuestionAnswerRole, QuestionAnswerState } from '@credo-ts/question-answer' import { injectable } from 'tsyringe' +import ErrorHandlingService from '../../errorHandlingService' +import { NotFoundError } from '../../errors' import { RecordId } from '../examples' -import { Body, Controller, Get, Path, Post, Res, Route, Tags, TsoaResponse, Query, Security } from 'tsoa' +import { Body, Controller, Get, Path, Post, Route, Tags, Query, Security, Example } from 'tsoa' @Tags('Question Answer') @Route('/question-answer') @@ -37,13 +39,17 @@ export class QuestionAnswerController extends Controller { @Query('state') state?: QuestionAnswerState, @Query('threadId') threadId?: string ) { - const questionAnswerRecords = await this.agent.modules.questionAnswer.findAllByQuery({ - connectionId, - role, - state, - threadId, - }) - return questionAnswerRecords.map((record) => record.toJSON()) + try { + const questionAnswerRecords = await this.agent.modules.questionAnswer.findAllByQuery({ + connectionId, + role, + state, + threadId, + }) + return questionAnswerRecords.map((record) => record.toJSON()) + } catch (error) { + throw ErrorHandlingService.handle(error) + } } /** @@ -52,6 +58,7 @@ export class QuestionAnswerController extends Controller { * @param connectionId Connection identifier * @param content The content of the message */ + @Example(QuestionAnswerRecord) @Post('question/:connectionId') public async sendQuestion( @Path('connectionId') connectionId: RecordId, @@ -60,9 +67,7 @@ export class QuestionAnswerController extends Controller { question: string validResponses: ValidResponse[] detail?: string - }, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> + } ) { try { const { question, validResponses, detail } = config @@ -75,10 +80,7 @@ export class QuestionAnswerController extends Controller { return record.toJSON() } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { reason: `connection with connection id "${connectionId}" not found.` }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -89,20 +91,12 @@ export class QuestionAnswerController extends Controller { * @param response The response of the question */ @Post('answer/:id') - public async sendAnswer( - @Path('id') id: RecordId, - @Body() request: Record<'response', string>, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async sendAnswer(@Path('id') id: RecordId, @Body() request: Record<'response', string>) { try { const record = await this.agent.modules.questionAnswer.sendAnswer(id, request.response) return record.toJSON() } catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { reason: `record with id "${id}" not found.` }) - } - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -112,17 +106,15 @@ export class QuestionAnswerController extends Controller { * @returns ConnectionRecord */ @Get('/:id') - public async getQuestionAnswerRecordById( - @Path('id') id: RecordId, - @Res() notFoundError: TsoaResponse<404, { reason: string }> - ) { - const record = await this.agent.modules.questionAnswer.findById(id) + public async getQuestionAnswerRecordById(@Path('id') id: RecordId) { + try { + const record = await this.agent.modules.questionAnswer.findById(id) - if (!record) - return notFoundError(404, { - reason: `Question Answer Record with id "${id}" not found.`, - }) + if (!record) throw new NotFoundError(`Question Answer Record with id "${id}" not found.`) - return record.toJSON() + return record.toJSON() + } catch (error) { + throw ErrorHandlingService.handle(error) + } } } diff --git a/src/controllers/types.ts b/src/controllers/types.ts index b4e358bc..3e425e63 100644 --- a/src/controllers/types.ts +++ b/src/controllers/types.ts @@ -1,11 +1,11 @@ -import type { Version } from './examples' +import type { RecordId, Version } from './examples' +import type { CustomHandshakeProtocol } from '../enums/enum' import type { AnonCredsCredentialFormat, LegacyIndyCredentialFormat } from '@credo-ts/anoncreds' import type { AutoAcceptCredential, AutoAcceptProof, CredentialFormatPayload, HandshakeProtocol, - CredentialFormat, ReceiveOutOfBandInvitationConfig, OutOfBandDidCommService, DidResolutionMetadata, @@ -17,7 +17,6 @@ import type { DidRegistrationSecretOptions, InitConfig, WalletConfig, - ConnectionRecord, CredentialExchangeRecord, DidResolutionOptions, JsonCredential, @@ -61,29 +60,19 @@ export interface ProofRequestMessageResponse { proofRecord: ProofExchangeRecord } -type CredentialFormats = [CredentialFormat] +// type CredentialFormats = [CredentialFormat] +type CredentialFormats = [LegacyIndyCredentialFormat, AnonCredsCredentialFormat, JsonLdCredentialFormat] -// TODO: added type in protocolVersion +enum ProtocolVersion { + v1 = 'v1', + v2 = 'v2', +} export interface ProposeCredentialOptions { - // protocolVersion: T extends never ? 'v1' | 'v2' : 'v1' | 'v2' | T - connectionRecord: ConnectionRecord - credentialFormats: { - indy: { - schemaIssuerDid: string - schemaId: string - schemaName: string - schemaVersion: string - credentialDefinitionId: string - issuerDid: string - attributes: { - name: string - value: string - }[] - } - } + protocolVersion: ProtocolVersion + credentialFormats: CredentialFormatPayload autoAcceptCredential?: AutoAcceptCredential comment?: string - connectionId: string + connectionId: RecordId } // export interface ProposeCredentialOptions extends BaseOptions { @@ -99,11 +88,10 @@ export interface AcceptCredentialProposalOptions { comment?: string } -// TODO: added type in protocolVersion export interface CreateOfferOptions { - protocolVersion: string - connectionId: string - credentialFormats: any + protocolVersion: ProtocolVersion + connectionId: RecordId + credentialFormats: CredentialFormatPayload autoAcceptCredential?: AutoAcceptCredential comment?: string } @@ -175,18 +163,18 @@ export interface V2OfferCredentialOptions { } export interface AcceptCredential { - credentialRecord: CredentialExchangeRecord + credentialRecordId: RecordId } export interface CredentialOfferOptions { - credentialRecordId: string + credentialRecordId: RecordId credentialFormats?: CredentialFormatPayload autoAcceptCredential?: AutoAcceptCredential comment?: string } export interface AcceptCredentialRequestOptions { - credentialRecord: CredentialExchangeRecord + credentialRecordId: RecordId credentialFormats?: CredentialFormatPayload autoAcceptCredential?: AutoAcceptCredential comment?: string @@ -218,7 +206,7 @@ export interface OutOfBandInvitationSchema { goalCode?: string goal?: string accept?: string[] - handshake_protocols?: HandshakeProtocol[] + handshake_protocols?: CustomHandshakeProtocol[] services: Array imageUrl?: string } @@ -315,11 +303,6 @@ export interface DidCreate { export interface CreateTenantOptions { config: Omit - seed?: string - method?: string - role?: string - endorserDid?: string - did?: string } // export type WithTenantAgentCallback = ( @@ -353,6 +336,7 @@ export interface CreateInvitationOptions { invitationDid?: string } +//todo:Add transaction type export interface EndorserTransaction { transaction: string | Record endorserDid: string @@ -363,6 +347,7 @@ export interface DidNymTransaction { nymRequest: string } +//todo:Add endorsedTransaction type export interface WriteTransaction { endorsedTransaction: string endorserDid?: string @@ -384,9 +369,22 @@ export interface RecipientKeyOption { recipientKey?: string } +export interface CreateSchemaInput { + issuerId: string + name: string + version: Version + attributes: string[] + endorse?: boolean + endorserDid?: string +} + export interface SchemaMetadata { did: string schemaId: string schemaTxnHash?: string schemaUrl?: string } +/** + * @example "ea4e5e69-fc04-465a-90d2-9f8ff78aa71d" + */ +export type ThreadId = string diff --git a/src/enums/enum.ts b/src/enums/enum.ts index 86ac5c95..6468e3af 100644 --- a/src/enums/enum.ts +++ b/src/enums/enum.ts @@ -1,6 +1,8 @@ export enum CredentialEnum { Finished = 'finished', Action = 'action', + Failed = 'failed', + Wait = 'wait', } export enum Role { @@ -16,9 +18,56 @@ export enum DidMethod { Peer = 'peer', } +export enum NetworkName { + Bcovrin = 'bcovrin', + Indicio = 'indicio', +} + +export enum IndicioTransactionAuthorAgreement { + Indicio_Testnet_Mainnet_Version = '1.0', + // To do: now testnet has also moved to version 1.3 of TAA + Indicio_Demonet_Version = '1.3', +} + export enum Network { Bcovrin_Testnet = 'bcovrin:testnet', Indicio_Testnet = 'indicio:testnet', Indicio_Demonet = 'indicio:demonet', Indicio_Mainnet = 'indicio:mainnet', } + +export enum NetworkTypes { + Testnet = 'testnet', + Demonet = 'demonet', + Mainnet = 'mainnet', +} + +export enum IndicioAcceptanceMechanism { + Wallet_Agreement = 'wallet_agreement', + Accept = 'accept', +} + +export enum EndorserMode { + Internal = 'internal', + External = 'external', +} + +export enum SchemaError { + NotFound = 'notFound', + UnSupportedAnonCredsMethod = 'unsupportedAnonCredsMethod', +} + +export enum HttpStatusCode { + OK = 200, + Created = 201, + BadRequest = 400, + Unauthorized = 401, + Forbidden = 403, + NotFound = 404, + InternalServerError = 500, +} + +export declare enum CustomHandshakeProtocol { + DidExchange = 'https://didcomm.org/didexchange/1.1', + Connections = 'https://didcomm.org/connections/1.0', +} diff --git a/src/errorHandlingService.ts b/src/errorHandlingService.ts new file mode 100644 index 00000000..5fa11a21 --- /dev/null +++ b/src/errorHandlingService.ts @@ -0,0 +1,79 @@ +import type { BaseError } from './errors/errors' + +import { AnonCredsError, AnonCredsRsError, AnonCredsStoreRecordError } from '@credo-ts/anoncreds' +import { + CredoError, + RecordNotFoundError, + RecordDuplicateError, + ClassValidationError, + MessageSendingError, +} from '@credo-ts/core' +import { IndyVdrError } from '@hyperledger/indy-vdr-nodejs' + +import { RecordDuplicateError as CustomRecordDuplicateError, NotFoundError, InternalServerError } from './errors/errors' +import convertError from './utils/errorConverter' + +class ErrorHandlingService { + public static handle(error: unknown) { + if (error instanceof RecordDuplicateError) { + throw this.handleRecordDuplicateError(error) + } else if (error instanceof ClassValidationError) { + throw this.handleClassValidationError(error) + } else if (error instanceof MessageSendingError) { + throw this.handleMessageSendingError(error) + } else if (error instanceof RecordNotFoundError) { + throw this.handleRecordNotFoundError(error) + } else if (error instanceof AnonCredsRsError) { + throw this.handleAnonCredsRsError(error) + } else if (error instanceof AnonCredsStoreRecordError) { + throw this.handleAnonCredsStoreRecordError(error) + } else if (error instanceof IndyVdrError) { + throw this.handleIndyVdrError(error) + } else if (error instanceof AnonCredsError) { + throw this.handleAnonCredsError(error) + } else if (error instanceof CredoError) { + throw this.handleCredoError(error) + } else if (error instanceof Error) { + throw convertError(error.constructor.name, error.message) + } else { + throw new InternalServerError(`An unknown error occurred ${error}`) + } + } + private static handleIndyVdrError(error: IndyVdrError) { + throw new InternalServerError(`IndyVdrError: ${error.message}`) + } + + private static handleAnonCredsError(error: AnonCredsError): BaseError { + throw new InternalServerError(`AnonCredsError: ${error.message}`) + } + + private static handleAnonCredsRsError(error: AnonCredsRsError): BaseError { + throw new InternalServerError(`AnonCredsRsError: ${error.message}`) + } + + private static handleAnonCredsStoreRecordError(error: AnonCredsStoreRecordError): BaseError { + throw new InternalServerError(`AnonCredsStoreRecordError: ${error.message}`) + } + + private static handleCredoError(error: CredoError): BaseError { + throw new InternalServerError(`CredoError: ${error.message}`) + } + + private static handleRecordNotFoundError(error: RecordNotFoundError): BaseError { + throw new NotFoundError(error.message) + } + + private static handleRecordDuplicateError(error: RecordDuplicateError): BaseError { + throw new CustomRecordDuplicateError(error.message) + } + + private static handleClassValidationError(error: ClassValidationError): BaseError { + throw new InternalServerError(`ClassValidationError: ${error.message}`) + } + + private static handleMessageSendingError(error: MessageSendingError): BaseError { + throw new InternalServerError(`MessageSendingError: ${error.message}`) + } +} + +export default ErrorHandlingService diff --git a/src/errorMessages.ts b/src/errorMessages.ts new file mode 100644 index 00000000..956b794f --- /dev/null +++ b/src/errorMessages.ts @@ -0,0 +1,4 @@ +export const LEDGER_NOT_FOUND = 'ledger not found' +export const LEDGER_INVALID_TRANSACTION = 'transaction with an invalid schema id' +export const COMMON_INVALID_STRUCTURE = 'schemaId has invalid structure' +export const ENDORSER_DID_NOT_PRESENT = 'Please provide the endorser DID' diff --git a/src/errors/ApiError.ts b/src/errors/ApiError.ts new file mode 100644 index 00000000..fb733e1e --- /dev/null +++ b/src/errors/ApiError.ts @@ -0,0 +1,4 @@ +export interface ApiError { + message: string + details?: unknown +} diff --git a/src/errors/errors.ts b/src/errors/errors.ts new file mode 100644 index 00000000..a39b5e29 --- /dev/null +++ b/src/errors/errors.ts @@ -0,0 +1,114 @@ +class BaseError extends Error { + public statusCode: number + + public constructor(message: string, statusCode: number) { + super(message) + this.name = this.constructor.name + this.statusCode = statusCode + Error.captureStackTrace(this, this.constructor) + } +} + +class InternalServerError extends BaseError { + public constructor(message: string = 'Internal Server Error') { + super(message, 500) + } +} + +class NotFoundError extends BaseError { + public constructor(message: string = 'Not Found') { + super(message, 404) + } +} + +class BadRequestError extends BaseError { + public constructor(message: string = 'Bad Request') { + super(message, 400) + } +} + +class UnauthorizedError extends BaseError { + public constructor(message: string = 'Unauthorized') { + super(message, 401) + } +} + +class PaymentRequiredError extends BaseError { + public constructor(message: string = 'Payment Required') { + super(message, 402) + } +} + +class ForbiddenError extends BaseError { + public constructor(message: string = 'Forbidden') { + super(message, 403) + } +} + +class ConflictError extends BaseError { + public constructor(message: string = 'Conflict') { + super(message, 409) + } +} + +class UnprocessableEntityError extends BaseError { + public constructor(message: string = 'Unprocessable Entity') { + super(message, 422) + } +} + +class LedgerNotFoundError extends NotFoundError { + public constructor(message: string = 'Ledger Not Found') { + super(message) + } +} + +class LedgerInvalidTransactionError extends BadRequestError { + public constructor(message: string = 'Ledger Invalid Transaction') { + super(message) + } +} + +class CommonInvalidStructureError extends BadRequestError { + public constructor(message: string = 'Common Invalid Structure') { + super(message) + } +} + +class RecordDuplicateError extends ConflictError { + public constructor(message: string = 'RecordDuplicateError') { + super(message) + } +} + +const errorMap: Record BaseError> = { + InternalServerError, + NotFoundError, + BadRequestError, + LedgerNotFoundError, + LedgerInvalidTransactionError, + CommonInvalidStructureError, + UnauthorizedError, + PaymentRequiredError, + ForbiddenError, + ConflictError, + RecordDuplicateError, + UnprocessableEntityError, +} + +export { + InternalServerError, + NotFoundError, + BadRequestError, + LedgerNotFoundError, + LedgerInvalidTransactionError, + CommonInvalidStructureError, + UnauthorizedError, + PaymentRequiredError, + ForbiddenError, + ConflictError, + BaseError, + RecordDuplicateError, + UnprocessableEntityError, + errorMap, +} diff --git a/src/errors/index.ts b/src/errors/index.ts new file mode 100644 index 00000000..183e8bd0 --- /dev/null +++ b/src/errors/index.ts @@ -0,0 +1 @@ +export * from './errors' diff --git a/src/events/CredentialEvents.ts b/src/events/CredentialEvents.ts index 1d60b558..4bcc8db3 100644 --- a/src/events/CredentialEvents.ts +++ b/src/events/CredentialEvents.ts @@ -15,6 +15,7 @@ export const credentialEvents = async (agent: Agent ...record.toJSON(), ...event.metadata, outOfBandId: null, + credentialData: null, } if (event.metadata.contextCorrelationId !== 'default' && record?.connectionId) { @@ -22,11 +23,17 @@ export const credentialEvents = async (agent: Agent { tenantId: event.metadata.contextCorrelationId }, async (tenantAgent) => { const connectionRecord = await tenantAgent.connections.findById(record.connectionId!) - + const data = await tenantAgent.credentials.getFormatData(record.id) + body.credentialData = data body.outOfBandId = connectionRecord?.outOfBandId } ) } + + if (event.metadata.contextCorrelationId === 'default') { + const data = await agent.credentials.getFormatData(record.id) + body.credentialData = data + } // Only send webhook if webhook url is configured if (config.webhookUrl) { await sendWebhookEvent(config.webhookUrl + '/credentials', body, agent.config.logger) diff --git a/src/events/ProofEvents.ts b/src/events/ProofEvents.ts index f7881fda..452a78b5 100644 --- a/src/events/ProofEvents.ts +++ b/src/events/ProofEvents.ts @@ -18,6 +18,12 @@ export const proofEvents = async (agent: Agent, config: ServerConfig) => { body.proofData = data } + //Emit webhook for dedicated agent + if (event.metadata.contextCorrelationId === 'default') { + const data = await agent.proofs.getFormatData(record.id) + body.proofData = data + } + // Only send webhook if webhook url is configured if (config.webhookUrl) { await sendWebhookEvent(config.webhookUrl + '/proofs', body, agent.config.logger) diff --git a/src/events/ReuseConnectionEvents.ts b/src/events/ReuseConnectionEvents.ts new file mode 100644 index 00000000..c4ee435f --- /dev/null +++ b/src/events/ReuseConnectionEvents.ts @@ -0,0 +1,34 @@ +import type { ServerConfig } from '../utils/ServerConfig' +import type { Agent, HandshakeReusedEvent } from '@credo-ts/core' + +import { OutOfBandEventTypes } from '@credo-ts/core' + +import { sendWebSocketEvent } from './WebSocketEvents' +import { sendWebhookEvent } from './WebhookEvent' + +export const reuseConnectionEvents = async (agent: Agent, config: ServerConfig) => { + agent.events.on(OutOfBandEventTypes.HandshakeReused, async (event: HandshakeReusedEvent) => { + const body = { + ...event.payload.connectionRecord.toJSON(), + outOfBandRecord: event.payload.outOfBandRecord.toJSON(), + reuseThreadId: event.payload.reuseThreadId, + ...event.metadata, + } + + // Only send webhook if webhook url is configured + if (config.webhookUrl) { + await sendWebhookEvent(config.webhookUrl + '/connections', body, agent.config.logger) + } + + if (config.socketServer) { + // Always emit websocket event to clients (could be 0) + sendWebSocketEvent(config.socketServer, { + ...event, + payload: { + ...event.payload, + connectionRecord: body, + }, + }) + } + }) +} diff --git a/src/routes/routes.ts b/src/routes/routes.ts index cacc7edd..3aefc9bf 100644 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@ -50,6 +50,11 @@ const models: TsoaRoute.Models = { "type": {"dataType":"string","validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ProofExchangeRecord": { + "dataType": "refAlias", + "type": {"ref":"Record_string.unknown_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "ProofFormat": { "dataType": "refObject", "properties": { @@ -106,6 +111,17 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "PlaintextMessage": { + "dataType": "refObject", + "properties": { + "@type": {"dataType":"string","required":true}, + "@id": {"dataType":"string","required":true}, + "~thread": {"dataType":"nestedObjectLiteral","nestedProperties":{"pthid":{"dataType":"string"},"thid":{"dataType":"string"}}}, + "messageType": {"dataType":"string","required":true}, + }, + "additionalProperties": {"dataType":"any"}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "CreateProofRequestOobOptions": { "dataType": "refObject", "properties": { @@ -129,17 +145,6 @@ const models: TsoaRoute.Models = { "enums": ["https://didcomm.org/didexchange/1.x","https://didcomm.org/connections/1.x"], }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "PlaintextMessage": { - "dataType": "refObject", - "properties": { - "@type": {"dataType":"string","required":true}, - "@id": {"dataType":"string","required":true}, - "~thread": {"dataType":"nestedObjectLiteral","nestedProperties":{"pthid":{"dataType":"string"},"thid":{"dataType":"string"}}}, - "messageType": {"dataType":"string","required":true}, - }, - "additionalProperties": {"dataType":"any"}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "AgentMessage": { "dataType": "refAlias", "type": {"ref":"PlaintextMessage","validators":{}}, @@ -266,7 +271,7 @@ const models: TsoaRoute.Models = { // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "Pick_CreateLegacyInvitationConfig.Exclude_keyofCreateLegacyInvitationConfig.routing__": { "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"label":{"dataType":"string"},"alias":{"dataType":"string"},"imageUrl":{"dataType":"string"},"multiUseInvitation":{"dataType":"boolean"},"autoAcceptConnection":{"dataType":"boolean"}},"validators":{}}, + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"alias":{"dataType":"string"},"label":{"dataType":"string"},"imageUrl":{"dataType":"string"},"multiUseInvitation":{"dataType":"boolean"},"autoAcceptConnection":{"dataType":"boolean"}},"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "Omit_CreateLegacyInvitationConfig.routing_": { @@ -274,6 +279,11 @@ const models: TsoaRoute.Models = { "type": {"ref":"Pick_CreateLegacyInvitationConfig.Exclude_keyofCreateLegacyInvitationConfig.routing__","validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "OutOfBandRecord": { + "dataType": "refAlias", + "type": {"ref":"Record_string.unknown_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "AgentMessageType": { "dataType": "refObject", "properties": { @@ -283,6 +293,11 @@ const models: TsoaRoute.Models = { "additionalProperties": {"dataType":"any"}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CustomHandshakeProtocol": { + "dataType": "refEnum", + "enums": ["https://didcomm.org/didexchange/1.1","https://didcomm.org/connections/1.0"], + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "OutOfBandDidCommService": { "dataType": "refObject", "properties": { @@ -305,7 +320,7 @@ const models: TsoaRoute.Models = { "goalCode": {"dataType":"string"}, "goal": {"dataType":"string"}, "accept": {"dataType":"array","array":{"dataType":"string"}}, - "handshake_protocols": {"dataType":"array","array":{"dataType":"refEnum","ref":"HandshakeProtocol"}}, + "handshake_protocols": {"dataType":"array","array":{"dataType":"refEnum","ref":"CustomHandshakeProtocol"}}, "services": {"dataType":"array","array":{"dataType":"union","subSchemas":[{"ref":"OutOfBandDidCommService"},{"dataType":"string"}]},"required":true}, "imageUrl": {"dataType":"string"}, }, @@ -314,7 +329,7 @@ const models: TsoaRoute.Models = { // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "Pick_ReceiveOutOfBandInvitationConfig.Exclude_keyofReceiveOutOfBandInvitationConfig.routing__": { "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"label":{"dataType":"string"},"alias":{"dataType":"string"},"imageUrl":{"dataType":"string"},"autoAcceptConnection":{"dataType":"boolean"},"autoAcceptInvitation":{"dataType":"boolean"},"reuseConnection":{"dataType":"boolean"},"acceptInvitationTimeoutMs":{"dataType":"double"},"ourDid":{"dataType":"string"}},"validators":{}}, + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"alias":{"dataType":"string"},"label":{"dataType":"string"},"imageUrl":{"dataType":"string"},"autoAcceptConnection":{"dataType":"boolean"},"autoAcceptInvitation":{"dataType":"boolean"},"reuseConnection":{"dataType":"boolean"},"acceptInvitationTimeoutMs":{"dataType":"double"},"ourDid":{"dataType":"string"}},"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "Omit_ReceiveOutOfBandInvitationConfig.routing_": { @@ -325,8 +340,8 @@ const models: TsoaRoute.Models = { "ReceiveInvitationProps": { "dataType": "refObject", "properties": { - "label": {"dataType":"string"}, "alias": {"dataType":"string"}, + "label": {"dataType":"string"}, "imageUrl": {"dataType":"string"}, "autoAcceptConnection": {"dataType":"boolean"}, "autoAcceptInvitation": {"dataType":"boolean"}, @@ -341,8 +356,8 @@ const models: TsoaRoute.Models = { "ReceiveInvitationByUrlProps": { "dataType": "refObject", "properties": { - "label": {"dataType":"string"}, "alias": {"dataType":"string"}, + "label": {"dataType":"string"}, "imageUrl": {"dataType":"string"}, "autoAcceptConnection": {"dataType":"boolean"}, "autoAcceptInvitation": {"dataType":"boolean"}, @@ -367,6 +382,11 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "TenantRecord": { + "dataType": "refAlias", + "type": {"ref":"Record_string.unknown_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "Pick_TenantConfig.Exclude_keyofTenantConfig.walletConfig__": { "dataType": "refAlias", "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"label":{"dataType":"string","required":true},"connectionImageUrl":{"dataType":"string"}},"validators":{}}, @@ -381,11 +401,6 @@ const models: TsoaRoute.Models = { "dataType": "refObject", "properties": { "config": {"ref":"Omit_TenantConfig.walletConfig_","required":true}, - "seed": {"dataType":"string"}, - "method": {"dataType":"string"}, - "role": {"dataType":"string"}, - "endorserDid": {"dataType":"string"}, - "did": {"dataType":"string"}, }, "additionalProperties": false, }, @@ -438,7 +453,7 @@ const models: TsoaRoute.Models = { // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "Pick_CreateOutOfBandInvitationConfig.Exclude_keyofCreateOutOfBandInvitationConfig.routing__": { "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"label":{"dataType":"string"},"alias":{"dataType":"string"},"imageUrl":{"dataType":"string"},"multiUseInvitation":{"dataType":"boolean"},"autoAcceptConnection":{"dataType":"boolean"},"goalCode":{"dataType":"string"},"goal":{"dataType":"string"},"handshake":{"dataType":"boolean"},"handshakeProtocols":{"dataType":"array","array":{"dataType":"refEnum","ref":"HandshakeProtocol"}},"messages":{"dataType":"array","array":{"dataType":"refAlias","ref":"AgentMessage"}},"appendedAttachments":{"dataType":"array","array":{"dataType":"refObject","ref":"Attachment"}},"invitationDid":{"dataType":"string"}},"validators":{}}, + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"alias":{"dataType":"string"},"label":{"dataType":"string"},"imageUrl":{"dataType":"string"},"multiUseInvitation":{"dataType":"boolean"},"autoAcceptConnection":{"dataType":"boolean"},"goalCode":{"dataType":"string"},"goal":{"dataType":"string"},"handshake":{"dataType":"boolean"},"handshakeProtocols":{"dataType":"array","array":{"dataType":"refEnum","ref":"HandshakeProtocol"}},"messages":{"dataType":"array","array":{"dataType":"refAlias","ref":"AgentMessage"}},"appendedAttachments":{"dataType":"array","array":{"dataType":"refObject","ref":"Attachment"}},"invitationDid":{"dataType":"string"}},"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "Omit_CreateOutOfBandInvitationConfig.routing_": { @@ -448,7 +463,7 @@ const models: TsoaRoute.Models = { // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "Pick_CreateOutOfBandInvitationConfig.Exclude_keyofCreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages__": { "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"label":{"dataType":"string"},"alias":{"dataType":"string"},"imageUrl":{"dataType":"string"},"multiUseInvitation":{"dataType":"boolean"},"autoAcceptConnection":{"dataType":"boolean"},"goalCode":{"dataType":"string"},"goal":{"dataType":"string"},"handshake":{"dataType":"boolean"},"handshakeProtocols":{"dataType":"array","array":{"dataType":"refEnum","ref":"HandshakeProtocol"}},"invitationDid":{"dataType":"string"}},"validators":{}}, + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"alias":{"dataType":"string"},"label":{"dataType":"string"},"imageUrl":{"dataType":"string"},"multiUseInvitation":{"dataType":"boolean"},"autoAcceptConnection":{"dataType":"boolean"},"goalCode":{"dataType":"string"},"goal":{"dataType":"string"},"handshake":{"dataType":"boolean"},"handshakeProtocols":{"dataType":"array","array":{"dataType":"refEnum","ref":"HandshakeProtocol"}},"invitationDid":{"dataType":"string"}},"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "Omit_CreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages_": { @@ -466,6 +481,19 @@ const models: TsoaRoute.Models = { "type": {"dataType":"string","validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CreateSchemaInput": { + "dataType": "refObject", + "properties": { + "issuerId": {"dataType":"string","required":true}, + "name": {"dataType":"string","required":true}, + "version": {"ref":"Version","required":true}, + "attributes": {"dataType":"array","array":{"dataType":"string"},"required":true}, + "endorse": {"dataType":"boolean"}, + "endorserDid": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "SchemaMetadata": { "dataType": "refObject", "properties": { @@ -498,21 +526,9 @@ const models: TsoaRoute.Models = { "type": {"dataType":"string","validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "AutoAcceptCredential": { + "ProtocolVersion": { "dataType": "refEnum", - "enums": ["always","contentApproved","never"], - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "CreateOfferOptions": { - "dataType": "refObject", - "properties": { - "protocolVersion": {"dataType":"string","required":true}, - "connectionId": {"dataType":"string","required":true}, - "credentialFormats": {"dataType":"any","required":true}, - "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, - "comment": {"dataType":"string"}, - }, - "additionalProperties": false, + "enums": ["v1","v2"], }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "CredentialPreviewAttributeOptions": { @@ -582,6 +598,28 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CredentialFormatPayload_CredentialFormats.createOffer_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsOfferCredentialFormat"},"jsonld":{"ref":"JsonLdCredentialDetailFormat"},"anoncreds":{"ref":"AnonCredsOfferCredentialFormat"}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AutoAcceptCredential": { + "dataType": "refEnum", + "enums": ["always","contentApproved","never"], + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CreateOfferOptions": { + "dataType": "refObject", + "properties": { + "protocolVersion": {"ref":"ProtocolVersion","required":true}, + "connectionId": {"ref":"RecordId","required":true}, + "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.createOffer_","required":true}, + "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, + "comment": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "CredentialFormatPayload_CredentialFormatType-Array.createOffer_": { "dataType": "refAlias", "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsOfferCredentialFormat"},"jsonld":{"ref":"JsonLdCredentialDetailFormat"},"anoncreds":{"ref":"AnonCredsOfferCredentialFormat"}},"validators":{}}, @@ -649,6 +687,67 @@ const models: TsoaRoute.Models = { "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"response":{"dataType":"string","required":true}},"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Record_content.string_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"content":{"dataType":"string","required":true}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DidRegistrationSecretOptions": { + "dataType": "refAlias", + "type": {"ref":"Record_string.unknown_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DidOperationStateWait": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["wait"],"required":true}, + "did": {"dataType":"string"}, + "secret": {"ref":"DidRegistrationSecretOptions"}, + "didDocument": {"ref":"DidDocument"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DidOperationStateActionBase": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["action"],"required":true}, + "action": {"dataType":"string","required":true}, + "did": {"dataType":"string"}, + "secret": {"ref":"DidRegistrationSecretOptions"}, + "didDocument": {"ref":"DidDocument"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DidOperationStateFinished": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["finished"],"required":true}, + "did": {"dataType":"string","required":true}, + "secret": {"ref":"DidRegistrationSecretOptions"}, + "didDocument": {"ref":"DidDocument","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DidOperationStateFailed": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["failed"],"required":true}, + "did": {"dataType":"string"}, + "secret": {"ref":"DidRegistrationSecretOptions"}, + "didDocument": {"ref":"DidDocument"}, + "reason": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DidRegistrationMetadata": { + "dataType": "refAlias", + "type": {"ref":"Record_string.unknown_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "DidResolutionMetadata": { "dataType": "refObject", "properties": { @@ -660,6 +759,17 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DidCreateResult_DidOperationStateActionBase_": { + "dataType": "refObject", + "properties": { + "jobId": {"dataType":"string"}, + "didState": {"dataType":"union","subSchemas":[{"ref":"DidOperationStateWait"},{"ref":"DidOperationStateActionBase"},{"ref":"DidOperationStateFinished"},{"ref":"DidOperationStateFailed"}],"required":true}, + "didRegistrationMetadata": {"ref":"DidRegistrationMetadata","required":true}, + "didDocumentMetadata": {"ref":"DidResolutionMetadata","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "DIDDocumentMetadata": { "dataType": "refObject", "properties": { @@ -680,31 +790,270 @@ const models: TsoaRoute.Models = { "type": {"dataType":"string","validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "DidRecord": { + "dataType": "refAlias", + "type": {"ref":"Record_string.unknown_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AnonCredsSchema": { + "dataType": "refObject", + "properties": { + "issuerId": {"dataType":"string","required":true}, + "name": {"dataType":"string","required":true}, + "version": {"dataType":"string","required":true}, + "attrNames": {"dataType":"array","array":{"dataType":"string"},"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AnonCredsResolutionMetadata": { + "dataType": "refObject", + "properties": { + "error": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["invalid"]},{"dataType":"enum","enums":["notFound"]},{"dataType":"enum","enums":["unsupportedAnonCredsMethod"]},{"dataType":"string"}]}, + "message": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CredoExtensible": { + "dataType": "refAlias", + "type": {"ref":"Record_string.unknown_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "GetSchemaReturn": { + "dataType": "refObject", + "properties": { + "schema": {"ref":"AnonCredsSchema"}, + "schemaId": {"dataType":"string","required":true}, + "resolutionMetadata": {"ref":"AnonCredsResolutionMetadata","required":true}, + "schemaMetadata": {"ref":"CredoExtensible","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RegisterSchemaReturnStateWait": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["wait"],"required":true}, + "schema": {"ref":"AnonCredsSchema"}, + "schemaId": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RegisterSchemaReturnStateAction": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["action"],"required":true}, + "action": {"dataType":"string","required":true}, + "schema": {"ref":"AnonCredsSchema","required":true}, + "schemaId": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RegisterSchemaReturnStateFinished": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["finished"],"required":true}, + "schema": {"ref":"AnonCredsSchema","required":true}, + "schemaId": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RegisterSchemaReturnStateFailed": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["failed"],"required":true}, + "reason": {"dataType":"string","required":true}, + "schema": {"ref":"AnonCredsSchema"}, + "schemaId": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RegisterSchemaReturn": { + "dataType": "refObject", + "properties": { + "jobId": {"dataType":"string"}, + "schemaState": {"dataType":"union","subSchemas":[{"ref":"RegisterSchemaReturnStateWait"},{"ref":"RegisterSchemaReturnStateAction"},{"ref":"RegisterSchemaReturnStateFinished"},{"ref":"RegisterSchemaReturnStateFailed"}],"required":true}, + "schemaMetadata": {"ref":"CredoExtensible","required":true}, + "registrationMetadata": {"ref":"CredoExtensible","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AnonCredsCredentialDefinition": { + "dataType": "refObject", + "properties": { + "issuerId": {"dataType":"string","required":true}, + "schemaId": {"dataType":"string","required":true}, + "type": {"dataType":"enum","enums":["CL"],"required":true}, + "tag": {"dataType":"string","required":true}, + "value": {"dataType":"nestedObjectLiteral","nestedProperties":{"revocation":{"dataType":"any"},"primary":{"ref":"Record_string.unknown_","required":true}},"required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "GetCredentialDefinitionReturn": { + "dataType": "refObject", + "properties": { + "credentialDefinition": {"ref":"AnonCredsCredentialDefinition"}, + "credentialDefinitionId": {"dataType":"string","required":true}, + "resolutionMetadata": {"ref":"AnonCredsResolutionMetadata","required":true}, + "credentialDefinitionMetadata": {"ref":"CredoExtensible","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RegisterCredentialDefinitionReturnStateWait": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["wait"],"required":true}, + "credentialDefinition": {"ref":"AnonCredsCredentialDefinition"}, + "credentialDefinitionId": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RegisterCredentialDefinitionReturnStateAction": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["action"],"required":true}, + "action": {"dataType":"string","required":true}, + "credentialDefinitionId": {"dataType":"string","required":true}, + "credentialDefinition": {"ref":"AnonCredsCredentialDefinition","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RegisterCredentialDefinitionReturnStateFinished": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["finished"],"required":true}, + "credentialDefinition": {"ref":"AnonCredsCredentialDefinition","required":true}, + "credentialDefinitionId": {"dataType":"string","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RegisterCredentialDefinitionReturnStateFailed": { + "dataType": "refObject", + "properties": { + "state": {"dataType":"enum","enums":["failed"],"required":true}, + "reason": {"dataType":"string","required":true}, + "credentialDefinition": {"ref":"AnonCredsCredentialDefinition"}, + "credentialDefinitionId": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "RegisterCredentialDefinitionReturn": { + "dataType": "refObject", + "properties": { + "jobId": {"dataType":"string"}, + "credentialDefinitionState": {"dataType":"union","subSchemas":[{"ref":"RegisterCredentialDefinitionReturnStateWait"},{"ref":"RegisterCredentialDefinitionReturnStateAction"},{"ref":"RegisterCredentialDefinitionReturnStateFinished"},{"ref":"RegisterCredentialDefinitionReturnStateFailed"}],"required":true}, + "credentialDefinitionMetadata": {"ref":"CredoExtensible","required":true}, + "registrationMetadata": {"ref":"CredoExtensible","required":true}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "ThreadId": { + "dataType": "refAlias", + "type": {"dataType":"string","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CredentialRole": { + "dataType": "refEnum", + "enums": ["issuer","holder"], + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "W3cCredentialRecord": { "dataType": "refAlias", "type": {"ref":"Record_string.unknown_","validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ConnectionRecord": { + "CredentialExchangeRecord": { "dataType": "refAlias", "type": {"ref":"Record_string.unknown_","validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Pick_AnonCredsProposeCredentialFormat.Exclude_keyofAnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId__": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"schemaId":{"dataType":"string"},"schemaName":{"dataType":"string"},"schemaVersion":{"dataType":"string"},"credentialDefinitionId":{"dataType":"string"},"attributes":{"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"}},"linkedAttachments":{"dataType":"array","array":{"dataType":"refObject","ref":"LinkedAttachment"}},"schemaIssuerDid":{"dataType":"string"},"issuerDid":{"dataType":"string"}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Omit_AnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId_": { + "dataType": "refAlias", + "type": {"ref":"Pick_AnonCredsProposeCredentialFormat.Exclude_keyofAnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId__","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "LegacyIndyProposeCredentialFormat": { + "dataType": "refAlias", + "type": {"ref":"Omit_AnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AnonCredsProposeCredentialFormat": { + "dataType": "refObject", + "properties": { + "schemaIssuerId": {"dataType":"string"}, + "schemaId": {"dataType":"string"}, + "schemaName": {"dataType":"string"}, + "schemaVersion": {"dataType":"string"}, + "credentialDefinitionId": {"dataType":"string"}, + "issuerId": {"dataType":"string"}, + "attributes": {"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"}}, + "linkedAttachments": {"dataType":"array","array":{"dataType":"refObject","ref":"LinkedAttachment"}}, + "schemaIssuerDid": {"dataType":"string"}, + "issuerDid": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "CredentialFormatPayload_CredentialFormatType-Array.createProposal_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"LegacyIndyProposeCredentialFormat"},"jsonld":{"ref":"JsonLdCredentialDetailFormat"},"anoncreds":{"ref":"AnonCredsProposeCredentialFormat"}},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "ProposeCredentialOptions": { "dataType": "refObject", "properties": { - "connectionRecord": {"ref":"ConnectionRecord","required":true}, - "credentialFormats": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"dataType":"nestedObjectLiteral","nestedProperties":{"attributes":{"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"value":{"dataType":"string","required":true},"name":{"dataType":"string","required":true}}},"required":true},"issuerDid":{"dataType":"string","required":true},"credentialDefinitionId":{"dataType":"string","required":true},"schemaVersion":{"dataType":"string","required":true},"schemaName":{"dataType":"string","required":true},"schemaId":{"dataType":"string","required":true},"schemaIssuerDid":{"dataType":"string","required":true}},"required":true}},"required":true}, + "protocolVersion": {"ref":"ProtocolVersion","required":true}, + "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormatType-Array.createProposal_","required":true}, "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, "comment": {"dataType":"string"}, - "connectionId": {"dataType":"string","required":true}, + "connectionId": {"ref":"RecordId","required":true}, }, "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AnonCredsAcceptProposalFormat": { + "dataType": "refObject", + "properties": { + "credentialDefinitionId": {"dataType":"string"}, + "revocationRegistryDefinitionId": {"dataType":"string"}, + "revocationRegistryIndex": {"dataType":"double"}, + "attributes": {"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"}}, + "linkedAttachments": {"dataType":"array","array":{"dataType":"refObject","ref":"LinkedAttachment"}}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "Record_string.never_": { + "dataType": "refAlias", + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "EmptyObject": { + "dataType": "refAlias", + "type": {"ref":"Record_string.never_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "CredentialFormatPayload_CredentialFormats.acceptProposal_": { "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"dataType":"any"},"validators":{}}, + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsAcceptProposalFormat"},"jsonld":{"ref":"EmptyObject"},"anoncreds":{"ref":"AnonCredsAcceptProposalFormat"}},"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "AcceptCredentialProposalOptions": { @@ -718,15 +1067,23 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "AnonCredsAcceptOfferFormat": { + "dataType": "refObject", + "properties": { + "linkSecretId": {"dataType":"string"}, + }, + "additionalProperties": false, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "CredentialFormatPayload_CredentialFormats.acceptOffer_": { "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"dataType":"any"},"validators":{}}, + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsAcceptOfferFormat"},"jsonld":{"ref":"EmptyObject"},"anoncreds":{"ref":"AnonCredsAcceptOfferFormat"}},"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "CredentialOfferOptions": { "dataType": "refObject", "properties": { - "credentialRecordId": {"dataType":"string","required":true}, + "credentialRecordId": {"ref":"RecordId","required":true}, "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.acceptOffer_"}, "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, "comment": {"dataType":"string"}, @@ -734,20 +1091,28 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "CredentialExchangeRecord": { + "AnonCredsAcceptRequestFormat": { "dataType": "refAlias", - "type": {"ref":"Record_string.unknown_","validators":{}}, + "type": {"ref":"Record_string.never_","validators":{}}, + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + "JsonLdAcceptRequestFormat": { + "dataType": "refObject", + "properties": { + "verificationMethod": {"dataType":"string"}, + }, + "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "CredentialFormatPayload_CredentialFormats.acceptRequest_": { "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"dataType":"any"},"validators":{}}, + "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"indy":{"ref":"AnonCredsAcceptRequestFormat"},"jsonld":{"ref":"JsonLdAcceptRequestFormat"},"anoncreds":{"ref":"AnonCredsAcceptRequestFormat"}},"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "AcceptCredentialRequestOptions": { "dataType": "refObject", "properties": { - "credentialRecord": {"ref":"CredentialExchangeRecord","required":true}, + "credentialRecordId": {"ref":"RecordId","required":true}, "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.acceptRequest_"}, "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, "comment": {"dataType":"string"}, @@ -758,7 +1123,7 @@ const models: TsoaRoute.Models = { "AcceptCredential": { "dataType": "refObject", "properties": { - "credentialRecord": {"ref":"CredentialExchangeRecord","required":true}, + "credentialRecordId": {"ref":"RecordId","required":true}, }, "additionalProperties": false, }, @@ -768,11 +1133,6 @@ const models: TsoaRoute.Models = { "type": {"ref":"Record_string.unknown_","validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Record_content.string_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"content":{"dataType":"string","required":true}},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "AgentInfo": { "dataType": "refObject", "properties": { @@ -838,8 +1198,6 @@ export function RegisterRoutes(app: Router) { async function ProofController_getProofById(request: ExRequest, response: ExResponse, next: any) { const args: Record = { proofRecordId: {"in":"path","name":"proofRecordId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -876,8 +1234,6 @@ export function RegisterRoutes(app: Router) { async function ProofController_proposeProof(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestProofProposalOptions: {"in":"body","name":"requestProofProposalOptions","required":true,"ref":"RequestProofProposalOptions"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -914,8 +1270,6 @@ export function RegisterRoutes(app: Router) { async function ProofController_acceptProposal(request: ExRequest, response: ExResponse, next: any) { const args: Record = { acceptProposal: {"in":"body","name":"acceptProposal","required":true,"ref":"AcceptProofProposal"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -952,8 +1306,6 @@ export function RegisterRoutes(app: Router) { async function ProofController_requestProof(request: ExRequest, response: ExResponse, next: any) { const args: Record = { requestProofOptions: {"in":"body","name":"requestProofOptions","required":true,"ref":"RequestProofOptions"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -990,7 +1342,6 @@ export function RegisterRoutes(app: Router) { async function ProofController_createRequest(request: ExRequest, response: ExResponse, next: any) { const args: Record = { createRequestOptions: {"in":"body","name":"createRequestOptions","required":true,"ref":"CreateProofRequestOobOptions"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1028,8 +1379,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, request: {"in":"body","name":"request","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"comment":{"dataType":"string"},"filterByNonRevocationRequirements":{"dataType":"boolean"},"filterByPresentationPreview":{"dataType":"boolean"}}}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1066,8 +1415,6 @@ export function RegisterRoutes(app: Router) { async function ProofController_acceptPresentation(request: ExRequest, response: ExResponse, next: any) { const args: Record = { proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1104,8 +1451,6 @@ export function RegisterRoutes(app: Router) { async function ProofController_proofFormData(request: ExRequest, response: ExResponse, next: any) { const args: Record = { proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1141,7 +1486,6 @@ export function RegisterRoutes(app: Router) { async function Polygon_createKeyPair(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1178,8 +1522,6 @@ export function RegisterRoutes(app: Router) { async function Polygon_createSchema(request: ExRequest, response: ExResponse, next: any) { const args: Record = { createSchemaRequest: {"in":"body","name":"createSchemaRequest","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"schema":{"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"dataType":"any"},"required":true},"schemaName":{"dataType":"string","required":true},"did":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - badRequestError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1216,8 +1558,6 @@ export function RegisterRoutes(app: Router) { async function Polygon_estimateTransaction(request: ExRequest, response: ExResponse, next: any) { const args: Record = { estimateTransactionRequest: {"in":"body","name":"estimateTransactionRequest","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"transaction":{"dataType":"any","required":true},"operation":{"dataType":"any","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - badRequestError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1255,8 +1595,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { did: {"in":"path","name":"did","required":true,"dataType":"string"}, schemaId: {"in":"path","name":"schemaId","required":true,"dataType":"string"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - forbiddenError: {"in":"res","name":"401","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1329,7 +1667,6 @@ export function RegisterRoutes(app: Router) { async function OutOfBandController_getOutOfBandRecordById(request: ExRequest, response: ExResponse, next: any) { const args: Record = { outOfBandId: {"in":"path","name":"outOfBandId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1365,7 +1702,6 @@ export function RegisterRoutes(app: Router) { async function OutOfBandController_createInvitation(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, config: {"in":"body","name":"config","required":true,"dataType":"intersection","subSchemas":[{"ref":"CreateInvitationOptions"},{"ref":"RecipientKeyOption"}]}, }; @@ -1402,7 +1738,6 @@ export function RegisterRoutes(app: Router) { async function OutOfBandController_createLegacyInvitation(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, config: {"in":"body","name":"config","dataType":"intersection","subSchemas":[{"ref":"Omit_CreateLegacyInvitationConfig.routing_"},{"ref":"RecipientKeyOption"}]}, }; @@ -1440,8 +1775,6 @@ export function RegisterRoutes(app: Router) { async function OutOfBandController_createLegacyConnectionlessInvitation(request: ExRequest, response: ExResponse, next: any) { const args: Record = { config: {"in":"body","name":"config","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"domain":{"dataType":"string","required":true},"message":{"ref":"AgentMessageType","required":true},"recordId":{"dataType":"string","required":true}}}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1478,7 +1811,6 @@ export function RegisterRoutes(app: Router) { async function OutOfBandController_receiveInvitation(request: ExRequest, response: ExResponse, next: any) { const args: Record = { invitationRequest: {"in":"body","name":"invitationRequest","required":true,"ref":"ReceiveInvitationProps"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1515,7 +1847,6 @@ export function RegisterRoutes(app: Router) { async function OutOfBandController_receiveInvitationFromUrl(request: ExRequest, response: ExResponse, next: any) { const args: Record = { invitationRequest: {"in":"body","name":"invitationRequest","required":true,"ref":"ReceiveInvitationByUrlProps"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1553,8 +1884,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { outOfBandId: {"in":"path","name":"outOfBandId","required":true,"ref":"RecordId"}, acceptInvitationConfig: {"in":"body","name":"acceptInvitationConfig","required":true,"ref":"AcceptInvitationConfig"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1591,8 +1920,6 @@ export function RegisterRoutes(app: Router) { async function OutOfBandController_deleteOutOfBandRecord(request: ExRequest, response: ExResponse, next: any) { const args: Record = { outOfBandId: {"in":"path","name":"outOfBandId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1629,8 +1956,6 @@ export function RegisterRoutes(app: Router) { async function MultiTenancyController_createTenant(request: ExRequest, response: ExResponse, next: any) { const args: Record = { createTenantOptions: {"in":"body","name":"createTenantOptions","required":true,"ref":"CreateTenantOptions"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1668,8 +1993,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { createDidOptions: {"in":"body","name":"createDidOptions","required":true,"ref":"DidCreate"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1706,7 +2029,6 @@ export function RegisterRoutes(app: Router) { async function MultiTenancyController_getDids(request: ExRequest, response: ExResponse, next: any) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1744,7 +2066,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, didNymTransaction: {"in":"body","name":"didNymTransaction","required":true,"ref":"DidNymTransaction"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1782,8 +2103,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, endorserTransaction: {"in":"body","name":"endorserTransaction","required":true,"ref":"EndorserTransaction"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - forbiddenError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1821,7 +2140,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1857,7 +2175,6 @@ export function RegisterRoutes(app: Router) { async function MultiTenancyController_createInvitation(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, config: {"in":"body","name":"config","dataType":"intersection","subSchemas":[{"ref":"Omit_CreateOutOfBandInvitationConfig.routing_"},{"ref":"RecipientKeyOption"}]}, }; @@ -1895,7 +2212,6 @@ export function RegisterRoutes(app: Router) { async function MultiTenancyController_createLegacyInvitation(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, config: {"in":"body","name":"config","dataType":"intersection","subSchemas":[{"ref":"Omit_CreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages_"},{"ref":"RecipientKeyOption"}]}, }; @@ -1935,7 +2251,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { invitationRequest: {"in":"body","name":"invitationRequest","required":true,"ref":"ReceiveInvitationProps"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1973,7 +2288,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { invitationRequest: {"in":"body","name":"invitationRequest","required":true,"ref":"ReceiveInvitationByUrlProps"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2010,7 +2324,6 @@ export function RegisterRoutes(app: Router) { async function MultiTenancyController_getAllOutOfBandRecords(request: ExRequest, response: ExResponse, next: any) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, invitationId: {"in":"path","name":"invitationId","required":true,"dataType":"string"}, }; @@ -2048,7 +2361,6 @@ export function RegisterRoutes(app: Router) { async function MultiTenancyController_getAllConnections(request: ExRequest, response: ExResponse, next: any) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, outOfBandId: {"in":"query","name":"outOfBandId","dataType":"string"}, alias: {"in":"query","name":"alias","dataType":"string"}, state: {"in":"query","name":"state","ref":"DidExchangeState"}, @@ -2091,7 +2403,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { invitationId: {"in":"path","name":"invitationId","required":true,"dataType":"string"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2127,10 +2438,8 @@ export function RegisterRoutes(app: Router) { async function MultiTenancyController_createSchema(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - schema: {"in":"body","name":"schema","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"endorserDid":{"dataType":"string"},"endorse":{"dataType":"boolean"},"attributes":{"dataType":"array","array":{"dataType":"string"},"required":true},"version":{"ref":"Version","required":true},"name":{"dataType":"string","required":true},"issuerId":{"dataType":"string","required":true}}}, + schema: {"in":"body","name":"schema","required":true,"ref":"CreateSchemaInput"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - forbiddenError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2168,7 +2477,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { createSchemaRequest: {"in":"body","name":"createSchemaRequest","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"schema":{"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"dataType":"any"},"required":true},"schemaName":{"dataType":"string","required":true},"did":{"dataType":"string","required":true}}}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2207,9 +2515,6 @@ export function RegisterRoutes(app: Router) { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, did: {"in":"path","name":"did","required":true,"dataType":"string"}, schemaId: {"in":"path","name":"schemaId","required":true,"dataType":"string"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - badRequestError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - forbiddenError: {"in":"res","name":"401","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2246,8 +2551,6 @@ export function RegisterRoutes(app: Router) { async function MultiTenancyController_writeSchemaAndCredDefOnLedger(request: ExRequest, response: ExResponse, next: any) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - forbiddenError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, writeTransaction: {"in":"body","name":"writeTransaction","required":true,"ref":"WriteTransaction"}, }; @@ -2286,10 +2589,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { schemaId: {"in":"path","name":"schemaId","required":true,"ref":"SchemaId"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - forbiddenError: {"in":"res","name":"403","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - badRequestError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2327,8 +2626,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { credentialDefinitionRequest: {"in":"body","name":"credentialDefinitionRequest","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"endorserDid":{"dataType":"string"},"endorse":{"dataType":"boolean"},"tag":{"dataType":"string","required":true},"schemaId":{"dataType":"string","required":true},"issuerId":{"dataType":"string","required":true}}}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2366,9 +2663,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { credentialDefinitionId: {"in":"path","name":"credentialDefinitionId","required":true,"ref":"CredentialDefinitionId"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - badRequestError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2406,7 +2700,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { createOfferOptions: {"in":"body","name":"createOfferOptions","required":true,"ref":"CreateOfferOptions"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2444,7 +2737,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, createOfferOptions: {"in":"body","name":"createOfferOptions","required":true,"ref":"CreateOfferOobOptions"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2480,8 +2772,6 @@ export function RegisterRoutes(app: Router) { async function MultiTenancyController_acceptOffer(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, acceptCredentialOfferOptions: {"in":"body","name":"acceptCredentialOfferOptions","required":true,"ref":"AcceptCredentialOfferOptions"}, }; @@ -2521,8 +2811,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"ref":"RecordId"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2636,8 +2924,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2675,8 +2961,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { requestProofOptions: {"in":"body","name":"requestProofOptions","required":true,"ref":"RequestProofOptions"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2714,7 +2998,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, createRequestOptions: {"in":"body","name":"createRequestOptions","required":true,"ref":"CreateProofRequestOobOptions"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2753,8 +3036,6 @@ export function RegisterRoutes(app: Router) { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, request: {"in":"body","name":"request","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"comment":{"dataType":"string"},"filterByNonRevocationRequirements":{"dataType":"boolean"},"filterByPresentationPreview":{"dataType":"boolean"}}}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2792,8 +3073,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2831,8 +3110,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, proofRecordId: {"in":"path","name":"proofRecordId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2869,8 +3146,6 @@ export function RegisterRoutes(app: Router) { async function MultiTenancyController_deleteTenantById(request: ExRequest, response: ExResponse, next: any) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2908,7 +3183,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, didOptions: {"in":"body","name":"didOptions","required":true,"ref":"DidCreate"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2946,7 +3220,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, didOptions: {"in":"body","name":"didOptions","required":true,"ref":"DidCreate"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3025,8 +3298,6 @@ export function RegisterRoutes(app: Router) { connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, config: {"in":"body","name":"config","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"detail":{"dataType":"string"},"validResponses":{"dataType":"array","array":{"dataType":"refObject","ref":"ValidResponse"},"required":true},"question":{"dataType":"string","required":true}}}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3065,8 +3336,6 @@ export function RegisterRoutes(app: Router) { id: {"in":"path","name":"id","required":true,"ref":"RecordId"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, request: {"in":"body","name":"request","required":true,"ref":"Record_response.string_"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3104,7 +3373,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { id: {"in":"path","name":"id","required":true,"ref":"RecordId"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3133,6 +3401,81 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/multi-tenancy/basic-messages/:connectionId/:tenantId', + authenticateMiddleware([{"apiKey":[]}]), + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getBasicMessages)), + + async function MultiTenancyController_getBasicMessages(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, + tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(MultiTenancyController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'getBasicMessages', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/multi-tenancy/basic-messages/:connectionId/:tenantId', + authenticateMiddleware([{"apiKey":[]}]), + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.sendMessage)), + + async function MultiTenancyController_sendMessage(request: ExRequest, response: ExResponse, next: any) { + const args: Record = { + connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, + tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + request: {"in":"body","name":"request","required":true,"ref":"Record_content.string_"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = templateService.getValidatedArgs({ args, request, response }); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(MultiTenancyController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + await templateService.apiHandler({ + methodName: 'sendMessage', + controller, + response, + next, + validatedArgs, + successStatus: undefined, + }); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa app.post('/transactions/endorse', authenticateMiddleware([{"apiKey":[]}]), ...(fetchMiddlewares(EndorserTransactionController)), @@ -3141,8 +3484,6 @@ export function RegisterRoutes(app: Router) { async function EndorserTransactionController_endorserTransaction(request: ExRequest, response: ExResponse, next: any) { const args: Record = { endorserTransaction: {"in":"body","name":"endorserTransaction","required":true,"ref":"EndorserTransaction"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - forbiddenError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3179,7 +3520,6 @@ export function RegisterRoutes(app: Router) { async function EndorserTransactionController_didNymTransaction(request: ExRequest, response: ExResponse, next: any) { const args: Record = { didNymTransaction: {"in":"body","name":"didNymTransaction","required":true,"ref":"DidNymTransaction"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3215,8 +3555,6 @@ export function RegisterRoutes(app: Router) { async function EndorserTransactionController_writeSchemaAndCredDefOnLedger(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - forbiddenError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, writeTransaction: {"in":"body","name":"writeTransaction","required":true,"ref":"WriteTransaction"}, }; @@ -3290,7 +3628,6 @@ export function RegisterRoutes(app: Router) { async function DidController_writeDid(request: ExRequest, response: ExResponse, next: any) { const args: Record = { createDidOptions: {"in":"body","name":"createDidOptions","required":true,"ref":"DidCreate"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3326,7 +3663,6 @@ export function RegisterRoutes(app: Router) { async function DidController_getDids(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3362,11 +3698,7 @@ export function RegisterRoutes(app: Router) { async function SchemaController_getSchemaById(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - schemaId: {"in":"path","name":"schemaId","required":true,"ref":"SchemaId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - forbiddenError: {"in":"res","name":"403","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - badRequestError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, + schemaId: {"in":"path","name":"schemaId","required":true,"dataType":"string"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3402,9 +3734,7 @@ export function RegisterRoutes(app: Router) { async function SchemaController_createSchema(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - schema: {"in":"body","name":"schema","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"endorserDid":{"dataType":"string"},"endorse":{"dataType":"boolean"},"attributes":{"dataType":"array","array":{"dataType":"string"},"required":true},"version":{"ref":"Version","required":true},"name":{"dataType":"string","required":true},"issuerId":{"dataType":"string","required":true}}}, - forbiddenError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, + schema: {"in":"body","name":"schema","required":true,"ref":"CreateSchemaInput"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3441,9 +3771,6 @@ export function RegisterRoutes(app: Router) { async function CredentialDefinitionController_getCredentialDefinitionById(request: ExRequest, response: ExResponse, next: any) { const args: Record = { credentialDefinitionId: {"in":"path","name":"credentialDefinitionId","required":true,"ref":"CredentialDefinitionId"}, - badRequestError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3480,8 +3807,6 @@ export function RegisterRoutes(app: Router) { async function CredentialDefinitionController_createCredentialDefinition(request: ExRequest, response: ExResponse, next: any) { const args: Record = { credentialDefinitionRequest: {"in":"body","name":"credentialDefinitionRequest","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"endorserDid":{"dataType":"string"},"endorse":{"dataType":"boolean"},"tag":{"dataType":"string","required":true},"schemaId":{"ref":"SchemaId","required":true},"issuerId":{"dataType":"string","required":true}}}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3517,9 +3842,11 @@ export function RegisterRoutes(app: Router) { async function CredentialController_getAllCredentials(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - threadId: {"in":"query","name":"threadId","dataType":"string"}, - connectionId: {"in":"query","name":"connectionId","dataType":"string"}, + threadId: {"in":"query","name":"threadId","ref":"ThreadId"}, + parentThreadId: {"in":"query","name":"parentThreadId","ref":"ThreadId"}, + connectionId: {"in":"query","name":"connectionId","ref":"RecordId"}, state: {"in":"query","name":"state","ref":"CredentialState"}, + role: {"in":"query","name":"role","ref":"CredentialRole"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3627,8 +3954,6 @@ export function RegisterRoutes(app: Router) { async function CredentialController_getCredentialById(request: ExRequest, response: ExResponse, next: any) { const args: Record = { credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3665,8 +3990,6 @@ export function RegisterRoutes(app: Router) { async function CredentialController_proposeCredential(request: ExRequest, response: ExResponse, next: any) { const args: Record = { proposeCredentialOptions: {"in":"body","name":"proposeCredentialOptions","required":true,"ref":"ProposeCredentialOptions"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3702,8 +4025,6 @@ export function RegisterRoutes(app: Router) { async function CredentialController_acceptProposal(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, acceptCredentialProposal: {"in":"body","name":"acceptCredentialProposal","required":true,"ref":"AcceptCredentialProposalOptions"}, }; @@ -3741,7 +4062,6 @@ export function RegisterRoutes(app: Router) { async function CredentialController_createOffer(request: ExRequest, response: ExResponse, next: any) { const args: Record = { createOfferOptions: {"in":"body","name":"createOfferOptions","required":true,"ref":"CreateOfferOptions"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3778,7 +4098,6 @@ export function RegisterRoutes(app: Router) { async function CredentialController_createOfferOob(request: ExRequest, response: ExResponse, next: any) { const args: Record = { outOfBandOption: {"in":"body","name":"outOfBandOption","required":true,"ref":"CreateOfferOobOptions"}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3814,8 +4133,6 @@ export function RegisterRoutes(app: Router) { async function CredentialController_acceptOffer(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, acceptCredentialOfferOptions: {"in":"body","name":"acceptCredentialOfferOptions","required":true,"ref":"CredentialOfferOptions"}, }; @@ -3852,8 +4169,6 @@ export function RegisterRoutes(app: Router) { async function CredentialController_acceptRequest(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, acceptCredentialRequestOptions: {"in":"body","name":"acceptCredentialRequestOptions","required":true,"ref":"AcceptCredentialRequestOptions"}, }; @@ -3890,8 +4205,6 @@ export function RegisterRoutes(app: Router) { async function CredentialController_acceptCredential(request: ExRequest, response: ExResponse, next: any) { const args: Record = { - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, acceptCredential: {"in":"body","name":"acceptCredential","required":true,"ref":"AcceptCredential"}, }; @@ -3970,7 +4283,6 @@ export function RegisterRoutes(app: Router) { async function ConnectionController_getConnectionById(request: ExRequest, response: ExResponse, next: any) { const args: Record = { connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -4007,8 +4319,6 @@ export function RegisterRoutes(app: Router) { async function ConnectionController_deleteConnection(request: ExRequest, response: ExResponse, next: any) { const args: Record = { connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -4045,8 +4355,6 @@ export function RegisterRoutes(app: Router) { async function ConnectionController_acceptRequest(request: ExRequest, response: ExResponse, next: any) { const args: Record = { connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -4083,8 +4391,6 @@ export function RegisterRoutes(app: Router) { async function ConnectionController_acceptResponse(request: ExRequest, response: ExResponse, next: any) { const args: Record = { connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -4120,8 +4426,6 @@ export function RegisterRoutes(app: Router) { async function ConnectionController_getInvitation(request: ExRequest, response: ExResponse, next: any) { const args: Record = { invitationId: {"in":"path","name":"invitationId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -4195,8 +4499,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, request: {"in":"body","name":"request","required":true,"ref":"Record_content.string_"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -4342,8 +4644,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, config: {"in":"body","name":"config","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"detail":{"dataType":"string"},"validResponses":{"dataType":"array","array":{"dataType":"refObject","ref":"ValidResponse"},"required":true},"question":{"dataType":"string","required":true}}}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -4381,8 +4681,6 @@ export function RegisterRoutes(app: Router) { const args: Record = { id: {"in":"path","name":"id","required":true,"ref":"RecordId"}, request: {"in":"body","name":"request","required":true,"ref":"Record_response.string_"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -4419,7 +4717,6 @@ export function RegisterRoutes(app: Router) { async function QuestionAnswerController_getQuestionAnswerRecordById(request: ExRequest, response: ExResponse, next: any) { const args: Record = { id: {"in":"path","name":"id","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa diff --git a/src/routes/swagger.json b/src/routes/swagger.json index 71ff49df..b2137d50 100644 --- a/src/routes/swagger.json +++ b/src/routes/swagger.json @@ -16,6 +16,9 @@ "type": "string", "example": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e" }, + "ProofExchangeRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "ProofFormat": { "properties": { "formatKey": { @@ -220,6 +223,37 @@ "type": "object", "additionalProperties": false }, + "PlaintextMessage": { + "properties": { + "@type": { + "type": "string" + }, + "@id": { + "type": "string" + }, + "~thread": { + "properties": { + "pthid": { + "type": "string" + }, + "thid": { + "type": "string" + } + }, + "type": "object" + }, + "messageType": { + "type": "string" + } + }, + "required": [ + "@type", + "@id", + "messageType" + ], + "type": "object", + "additionalProperties": {} + }, "CreateProofRequestOobOptions": { "properties": { "protocolVersion": { @@ -269,37 +303,6 @@ ], "type": "string" }, - "PlaintextMessage": { - "properties": { - "@type": { - "type": "string" - }, - "@id": { - "type": "string" - }, - "~thread": { - "properties": { - "pthid": { - "type": "string" - }, - "thid": { - "type": "string" - } - }, - "type": "object" - }, - "messageType": { - "type": "string" - } - }, - "required": [ - "@type", - "@id", - "messageType" - ], - "type": "object", - "additionalProperties": {} - }, "AgentMessage": { "$ref": "#/components/schemas/PlaintextMessage" }, @@ -583,10 +586,10 @@ }, "Pick_CreateLegacyInvitationConfig.Exclude_keyofCreateLegacyInvitationConfig.routing__": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -606,6 +609,9 @@ "$ref": "#/components/schemas/Pick_CreateLegacyInvitationConfig.Exclude_keyofCreateLegacyInvitationConfig.routing__", "description": "Construct a type with the properties of T except for those in type K." }, + "OutOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "AgentMessageType": { "properties": { "@id": { @@ -622,6 +628,13 @@ "type": "object", "additionalProperties": {} }, + "CustomHandshakeProtocol": { + "enum": [ + "https://didcomm.org/didexchange/1.1", + "https://didcomm.org/connections/1.0" + ], + "type": "string" + }, "OutOfBandDidCommService": { "properties": { "id": { @@ -686,7 +699,7 @@ }, "handshake_protocols": { "items": { - "$ref": "#/components/schemas/HandshakeProtocol" + "$ref": "#/components/schemas/CustomHandshakeProtocol" }, "type": "array" }, @@ -717,10 +730,10 @@ }, "Pick_ReceiveOutOfBandInvitationConfig.Exclude_keyofReceiveOutOfBandInvitationConfig.routing__": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -752,10 +765,10 @@ }, "ReceiveInvitationProps": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -789,10 +802,10 @@ }, "ReceiveInvitationByUrlProps": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -848,6 +861,9 @@ "type": "object", "additionalProperties": false }, + "TenantRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "Pick_TenantConfig.Exclude_keyofTenantConfig.walletConfig__": { "properties": { "label": { @@ -871,21 +887,6 @@ "properties": { "config": { "$ref": "#/components/schemas/Omit_TenantConfig.walletConfig_" - }, - "seed": { - "type": "string" - }, - "method": { - "type": "string" - }, - "role": { - "type": "string" - }, - "endorserDid": { - "type": "string" - }, - "did": { - "type": "string" } }, "required": [ @@ -987,10 +988,10 @@ }, "Pick_CreateOutOfBandInvitationConfig.Exclude_keyofCreateOutOfBandInvitationConfig.routing__": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -1043,10 +1044,10 @@ }, "Pick_CreateOutOfBandInvitationConfig.Exclude_keyofCreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages__": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -1104,6 +1105,39 @@ "type": "string", "example": "1.0.0" }, + "CreateSchemaInput": { + "properties": { + "issuerId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "$ref": "#/components/schemas/Version" + }, + "attributes": { + "items": { + "type": "string" + }, + "type": "array" + }, + "endorse": { + "type": "boolean" + }, + "endorserDid": { + "type": "string" + } + }, + "required": [ + "issuerId", + "name", + "version", + "attributes" + ], + "type": "object", + "additionalProperties": false + }, "SchemaMetadata": { "properties": { "did": { @@ -1200,39 +1234,13 @@ "type": "string", "example": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag" }, - "AutoAcceptCredential": { - "description": "Typing of the state for auto acceptance", + "ProtocolVersion": { "enum": [ - "always", - "contentApproved", - "never" + "v1", + "v2" ], "type": "string" }, - "CreateOfferOptions": { - "properties": { - "protocolVersion": { - "type": "string" - }, - "connectionId": { - "type": "string" - }, - "credentialFormats": {}, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" - }, - "comment": { - "type": "string" - } - }, - "required": [ - "protocolVersion", - "connectionId", - "credentialFormats" - ], - "type": "object", - "additionalProperties": false - }, "CredentialPreviewAttributeOptions": { "properties": { "name": { @@ -1412,6 +1420,56 @@ "type": "object", "additionalProperties": false }, + "CredentialFormatPayload_CredentialFormats.createOffer_": { + "properties": { + "indy": { + "$ref": "#/components/schemas/AnonCredsOfferCredentialFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/JsonLdCredentialDetailFormat" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsOfferCredentialFormat" + } + }, + "type": "object", + "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + }, + "AutoAcceptCredential": { + "description": "Typing of the state for auto acceptance", + "enum": [ + "always", + "contentApproved", + "never" + ], + "type": "string" + }, + "CreateOfferOptions": { + "properties": { + "protocolVersion": { + "$ref": "#/components/schemas/ProtocolVersion" + }, + "connectionId": { + "$ref": "#/components/schemas/RecordId" + }, + "credentialFormats": { + "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.createOffer_" + }, + "autoAcceptCredential": { + "$ref": "#/components/schemas/AutoAcceptCredential" + }, + "comment": { + "type": "string" + } + }, + "required": [ + "protocolVersion", + "connectionId", + "credentialFormats" + ], + "type": "object", + "additionalProperties": false + }, "CredentialFormatPayload_CredentialFormatType-Array.createOffer_": { "properties": { "indy": { @@ -1555,140 +1613,778 @@ "type": "object", "description": "Construct a type with a set of properties K of type T" }, - "DidResolutionMetadata": { + "Record_content.string_": { "properties": { - "contentType": { - "type": "string" - }, - "error": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "invalidDid", - "notFound", - "representationNotSupported", - "unsupportedDidMethod" - ] - } - ] - }, - "message": { + "content": { "type": "string" - }, - "servedFromCache": { - "type": "boolean" } }, + "required": [ + "content" + ], "type": "object", - "additionalProperties": false + "description": "Construct a type with a set of properties K of type T" }, - "DIDDocumentMetadata": { - "description": "Represents metadata about the DID document resulting from a {@link Resolvable.resolve} operation.", + "DidRegistrationSecretOptions": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "DidOperationStateWait": { "properties": { - "created": { - "type": "string" + "state": { + "type": "string", + "enum": [ + "wait" + ], + "nullable": false }, - "updated": { + "did": { "type": "string" }, - "deactivated": { - "type": "boolean" + "secret": { + "$ref": "#/components/schemas/DidRegistrationSecretOptions" }, - "versionId": { + "didDocument": { + "$ref": "#/components/schemas/DidDocument" + } + }, + "required": [ + "state" + ], + "type": "object", + "additionalProperties": false + }, + "DidOperationStateActionBase": { + "properties": { + "state": { + "type": "string", + "enum": [ + "action" + ], + "nullable": false + }, + "action": { + "type": "string" + }, + "did": { + "type": "string" + }, + "secret": { + "$ref": "#/components/schemas/DidRegistrationSecretOptions" + }, + "didDocument": { + "$ref": "#/components/schemas/DidDocument" + } + }, + "required": [ + "state", + "action" + ], + "type": "object", + "additionalProperties": false + }, + "DidOperationStateFinished": { + "properties": { + "state": { + "type": "string", + "enum": [ + "finished" + ], + "nullable": false + }, + "did": { + "type": "string" + }, + "secret": { + "$ref": "#/components/schemas/DidRegistrationSecretOptions" + }, + "didDocument": { + "$ref": "#/components/schemas/DidDocument" + } + }, + "required": [ + "state", + "did", + "didDocument" + ], + "type": "object", + "additionalProperties": false + }, + "DidOperationStateFailed": { + "properties": { + "state": { + "type": "string", + "enum": [ + "failed" + ], + "nullable": false + }, + "did": { + "type": "string" + }, + "secret": { + "$ref": "#/components/schemas/DidRegistrationSecretOptions" + }, + "didDocument": { + "$ref": "#/components/schemas/DidDocument" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "state", + "reason" + ], + "type": "object", + "additionalProperties": false + }, + "DidRegistrationMetadata": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "DidResolutionMetadata": { + "properties": { + "contentType": { + "type": "string" + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "invalidDid", + "notFound", + "representationNotSupported", + "unsupportedDidMethod" + ] + } + ] + }, + "message": { + "type": "string" + }, + "servedFromCache": { + "type": "boolean" + } + }, + "type": "object", + "additionalProperties": false + }, + "DidCreateResult_DidOperationStateActionBase_": { + "properties": { + "jobId": { + "type": "string" + }, + "didState": { + "anyOf": [ + { + "$ref": "#/components/schemas/DidOperationStateWait" + }, + { + "$ref": "#/components/schemas/DidOperationStateActionBase" + }, + { + "$ref": "#/components/schemas/DidOperationStateFinished" + }, + { + "$ref": "#/components/schemas/DidOperationStateFailed" + } + ] + }, + "didRegistrationMetadata": { + "$ref": "#/components/schemas/DidRegistrationMetadata" + }, + "didDocumentMetadata": { + "$ref": "#/components/schemas/DidResolutionMetadata" + } + }, + "required": [ + "didState", + "didRegistrationMetadata", + "didDocumentMetadata" + ], + "type": "object", + "additionalProperties": false + }, + "DIDDocumentMetadata": { + "description": "Represents metadata about the DID document resulting from a {@link Resolvable.resolve} operation.", + "properties": { + "created": { + "type": "string" + }, + "updated": { + "type": "string" + }, + "deactivated": { + "type": "boolean" + }, + "versionId": { + "type": "string" + }, + "nextUpdate": { + "type": "string" + }, + "nextVersionId": { + "type": "string" + }, + "equivalentId": { + "type": "string" + }, + "canonicalId": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "Did": { + "type": "string", + "example": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + }, + "DidRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "AnonCredsSchema": { + "properties": { + "issuerId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "attrNames": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "issuerId", + "name", + "version", + "attrNames" + ], + "type": "object", + "additionalProperties": false + }, + "AnonCredsResolutionMetadata": { + "properties": { + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "invalid", + "notFound", + "unsupportedAnonCredsMethod" + ] + } + ] + }, + "message": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "CredoExtensible": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "GetSchemaReturn": { + "properties": { + "schema": { + "$ref": "#/components/schemas/AnonCredsSchema" + }, + "schemaId": { + "type": "string" + }, + "resolutionMetadata": { + "$ref": "#/components/schemas/AnonCredsResolutionMetadata" + }, + "schemaMetadata": { + "$ref": "#/components/schemas/CredoExtensible" + } + }, + "required": [ + "schemaId", + "resolutionMetadata", + "schemaMetadata" + ], + "type": "object", + "additionalProperties": false + }, + "RegisterSchemaReturnStateWait": { + "properties": { + "state": { + "type": "string", + "enum": [ + "wait" + ], + "nullable": false + }, + "schema": { + "$ref": "#/components/schemas/AnonCredsSchema" + }, + "schemaId": { + "type": "string" + } + }, + "required": [ + "state" + ], + "type": "object", + "additionalProperties": false + }, + "RegisterSchemaReturnStateAction": { + "properties": { + "state": { + "type": "string", + "enum": [ + "action" + ], + "nullable": false + }, + "action": { + "type": "string" + }, + "schema": { + "$ref": "#/components/schemas/AnonCredsSchema" + }, + "schemaId": { + "type": "string" + } + }, + "required": [ + "state", + "action", + "schema", + "schemaId" + ], + "type": "object", + "additionalProperties": false + }, + "RegisterSchemaReturnStateFinished": { + "properties": { + "state": { + "type": "string", + "enum": [ + "finished" + ], + "nullable": false + }, + "schema": { + "$ref": "#/components/schemas/AnonCredsSchema" + }, + "schemaId": { + "type": "string" + } + }, + "required": [ + "state", + "schema", + "schemaId" + ], + "type": "object", + "additionalProperties": false + }, + "RegisterSchemaReturnStateFailed": { + "properties": { + "state": { + "type": "string", + "enum": [ + "failed" + ], + "nullable": false + }, + "reason": { + "type": "string" + }, + "schema": { + "$ref": "#/components/schemas/AnonCredsSchema" + }, + "schemaId": { + "type": "string" + } + }, + "required": [ + "state", + "reason" + ], + "type": "object", + "additionalProperties": false + }, + "RegisterSchemaReturn": { + "properties": { + "jobId": { + "type": "string" + }, + "schemaState": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegisterSchemaReturnStateWait" + }, + { + "$ref": "#/components/schemas/RegisterSchemaReturnStateAction" + }, + { + "$ref": "#/components/schemas/RegisterSchemaReturnStateFinished" + }, + { + "$ref": "#/components/schemas/RegisterSchemaReturnStateFailed" + } + ] + }, + "schemaMetadata": { + "$ref": "#/components/schemas/CredoExtensible" + }, + "registrationMetadata": { + "$ref": "#/components/schemas/CredoExtensible" + } + }, + "required": [ + "schemaState", + "schemaMetadata", + "registrationMetadata" + ], + "type": "object", + "additionalProperties": false + }, + "AnonCredsCredentialDefinition": { + "properties": { + "issuerId": { + "type": "string" + }, + "schemaId": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "CL" + ], + "nullable": false + }, + "tag": { + "type": "string" + }, + "value": { + "properties": { + "revocation": {}, + "primary": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "required": [ + "primary" + ], + "type": "object" + } + }, + "required": [ + "issuerId", + "schemaId", + "type", + "tag", + "value" + ], + "type": "object", + "additionalProperties": false + }, + "GetCredentialDefinitionReturn": { + "properties": { + "credentialDefinition": { + "$ref": "#/components/schemas/AnonCredsCredentialDefinition" + }, + "credentialDefinitionId": { "type": "string" }, - "nextUpdate": { + "resolutionMetadata": { + "$ref": "#/components/schemas/AnonCredsResolutionMetadata" + }, + "credentialDefinitionMetadata": { + "$ref": "#/components/schemas/CredoExtensible" + } + }, + "required": [ + "credentialDefinitionId", + "resolutionMetadata", + "credentialDefinitionMetadata" + ], + "type": "object", + "additionalProperties": false + }, + "RegisterCredentialDefinitionReturnStateWait": { + "properties": { + "state": { + "type": "string", + "enum": [ + "wait" + ], + "nullable": false + }, + "credentialDefinition": { + "$ref": "#/components/schemas/AnonCredsCredentialDefinition" + }, + "credentialDefinitionId": { "type": "string" + } + }, + "required": [ + "state" + ], + "type": "object", + "additionalProperties": false + }, + "RegisterCredentialDefinitionReturnStateAction": { + "properties": { + "state": { + "type": "string", + "enum": [ + "action" + ], + "nullable": false }, - "nextVersionId": { + "action": { "type": "string" }, - "equivalentId": { + "credentialDefinitionId": { "type": "string" }, - "canonicalId": { + "credentialDefinition": { + "$ref": "#/components/schemas/AnonCredsCredentialDefinition" + } + }, + "required": [ + "state", + "action", + "credentialDefinitionId", + "credentialDefinition" + ], + "type": "object", + "additionalProperties": false + }, + "RegisterCredentialDefinitionReturnStateFinished": { + "properties": { + "state": { + "type": "string", + "enum": [ + "finished" + ], + "nullable": false + }, + "credentialDefinition": { + "$ref": "#/components/schemas/AnonCredsCredentialDefinition" + }, + "credentialDefinitionId": { "type": "string" } }, + "required": [ + "state", + "credentialDefinition", + "credentialDefinitionId" + ], "type": "object", "additionalProperties": false }, - "Did": { + "RegisterCredentialDefinitionReturnStateFailed": { + "properties": { + "state": { + "type": "string", + "enum": [ + "failed" + ], + "nullable": false + }, + "reason": { + "type": "string" + }, + "credentialDefinition": { + "$ref": "#/components/schemas/AnonCredsCredentialDefinition" + }, + "credentialDefinitionId": { + "type": "string" + } + }, + "required": [ + "state", + "reason" + ], + "type": "object", + "additionalProperties": false + }, + "RegisterCredentialDefinitionReturn": { + "properties": { + "jobId": { + "type": "string" + }, + "credentialDefinitionState": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateWait" + }, + { + "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateAction" + }, + { + "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateFinished" + }, + { + "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateFailed" + } + ] + }, + "credentialDefinitionMetadata": { + "$ref": "#/components/schemas/CredoExtensible" + }, + "registrationMetadata": { + "$ref": "#/components/schemas/CredoExtensible" + } + }, + "required": [ + "credentialDefinitionState", + "credentialDefinitionMetadata", + "registrationMetadata" + ], + "type": "object", + "additionalProperties": false + }, + "ThreadId": { "type": "string", - "example": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + "example": "ea4e5e69-fc04-465a-90d2-9f8ff78aa71d" + }, + "CredentialRole": { + "enum": [ + "issuer", + "holder" + ], + "type": "string" }, "W3cCredentialRecord": { "$ref": "#/components/schemas/Record_string.unknown_" }, - "ConnectionRecord": { + "CredentialExchangeRecord": { "$ref": "#/components/schemas/Record_string.unknown_" }, + "Pick_AnonCredsProposeCredentialFormat.Exclude_keyofAnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId__": { + "properties": { + "schemaId": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "schemaVersion": { + "type": "string" + }, + "credentialDefinitionId": { + "type": "string" + }, + "attributes": { + "items": { + "$ref": "#/components/schemas/CredentialPreviewAttributeOptions" + }, + "type": "array" + }, + "linkedAttachments": { + "items": { + "$ref": "#/components/schemas/LinkedAttachment" + }, + "type": "array" + }, + "schemaIssuerDid": { + "type": "string" + }, + "issuerDid": { + "type": "string" + } + }, + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "Omit_AnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId_": { + "$ref": "#/components/schemas/Pick_AnonCredsProposeCredentialFormat.Exclude_keyofAnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId__", + "description": "Construct a type with the properties of T except for those in type K." + }, + "LegacyIndyProposeCredentialFormat": { + "$ref": "#/components/schemas/Omit_AnonCredsProposeCredentialFormat.schemaIssuerId-or-issuerId_", + "description": "This defines the module payload for calling CredentialsApi.createProposal\nor CredentialsApi.negotiateOffer\n\nNOTE: This doesn't include the `issuerId` and `schemaIssuerId` properties that are present in the newer format." + }, + "AnonCredsProposeCredentialFormat": { + "description": "This defines the module payload for calling CredentialsApi.createProposal\nor CredentialsApi.negotiateOffer", + "properties": { + "schemaIssuerId": { + "type": "string" + }, + "schemaId": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "schemaVersion": { + "type": "string" + }, + "credentialDefinitionId": { + "type": "string" + }, + "issuerId": { + "type": "string" + }, + "attributes": { + "items": { + "$ref": "#/components/schemas/CredentialPreviewAttributeOptions" + }, + "type": "array" + }, + "linkedAttachments": { + "items": { + "$ref": "#/components/schemas/LinkedAttachment" + }, + "type": "array" + }, + "schemaIssuerDid": { + "type": "string" + }, + "issuerDid": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "CredentialFormatPayload_CredentialFormatType-Array.createProposal_": { + "properties": { + "indy": { + "$ref": "#/components/schemas/LegacyIndyProposeCredentialFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/JsonLdCredentialDetailFormat" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsProposeCredentialFormat" + } + }, + "type": "object", + "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + }, "ProposeCredentialOptions": { "properties": { - "connectionRecord": { - "$ref": "#/components/schemas/ConnectionRecord" + "protocolVersion": { + "$ref": "#/components/schemas/ProtocolVersion" }, "credentialFormats": { - "properties": { - "indy": { - "properties": { - "attributes": { - "items": { - "properties": { - "value": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "value", - "name" - ], - "type": "object" - }, - "type": "array" - }, - "issuerDid": { - "type": "string" - }, - "credentialDefinitionId": { - "type": "string" - }, - "schemaVersion": { - "type": "string" - }, - "schemaName": { - "type": "string" - }, - "schemaId": { - "type": "string" - }, - "schemaIssuerDid": { - "type": "string" - } - }, - "required": [ - "attributes", - "issuerDid", - "credentialDefinitionId", - "schemaVersion", - "schemaName", - "schemaId", - "schemaIssuerDid" - ], - "type": "object" - } - }, - "required": [ - "indy" - ], - "type": "object" + "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormatType-Array.createProposal_" }, "autoAcceptCredential": { "$ref": "#/components/schemas/AutoAcceptCredential" @@ -1697,20 +2393,66 @@ "type": "string" }, "connectionId": { - "type": "string" + "$ref": "#/components/schemas/RecordId" } }, "required": [ - "connectionRecord", + "protocolVersion", "credentialFormats", "connectionId" ], "type": "object", "additionalProperties": false }, - "CredentialFormatPayload_CredentialFormats.acceptProposal_": { + "AnonCredsAcceptProposalFormat": { + "description": "This defines the module payload for calling CredentialsApi.acceptProposal", + "properties": { + "credentialDefinitionId": { + "type": "string" + }, + "revocationRegistryDefinitionId": { + "type": "string" + }, + "revocationRegistryIndex": { + "type": "number", + "format": "double" + }, + "attributes": { + "items": { + "$ref": "#/components/schemas/CredentialPreviewAttributeOptions" + }, + "type": "array" + }, + "linkedAttachments": { + "items": { + "$ref": "#/components/schemas/LinkedAttachment" + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "Record_string.never_": { "properties": {}, - "additionalProperties": {}, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "EmptyObject": { + "$ref": "#/components/schemas/Record_string.never_" + }, + "CredentialFormatPayload_CredentialFormats.acceptProposal_": { + "properties": { + "indy": { + "$ref": "#/components/schemas/AnonCredsAcceptProposalFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/EmptyObject" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsAcceptProposalFormat" + } + }, "type": "object", "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" }, @@ -1735,16 +2477,35 @@ "type": "object", "additionalProperties": false }, + "AnonCredsAcceptOfferFormat": { + "description": "This defines the module payload for calling CredentialsApi.acceptOffer. No options are available for this\nmethod, so it's an empty object", + "properties": { + "linkSecretId": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, "CredentialFormatPayload_CredentialFormats.acceptOffer_": { - "properties": {}, - "additionalProperties": {}, + "properties": { + "indy": { + "$ref": "#/components/schemas/AnonCredsAcceptOfferFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/EmptyObject" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsAcceptOfferFormat" + } + }, "type": "object", "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" }, "CredentialOfferOptions": { "properties": { "credentialRecordId": { - "type": "string" + "$ref": "#/components/schemas/RecordId" }, "credentialFormats": { "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.acceptOffer_" @@ -1762,19 +2523,39 @@ "type": "object", "additionalProperties": false }, - "CredentialExchangeRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" + "AnonCredsAcceptRequestFormat": { + "$ref": "#/components/schemas/Record_string.never_", + "description": "This defines the module payload for calling CredentialsApi.acceptRequest. No options are available for this\nmethod, so it's an empty object" + }, + "JsonLdAcceptRequestFormat": { + "description": "Format for accepting a jsonld credential request. Optionally allows the verification\nmethod to use to sign the credential.", + "properties": { + "verificationMethod": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false }, "CredentialFormatPayload_CredentialFormats.acceptRequest_": { - "properties": {}, - "additionalProperties": {}, + "properties": { + "indy": { + "$ref": "#/components/schemas/AnonCredsAcceptRequestFormat" + }, + "jsonld": { + "$ref": "#/components/schemas/JsonLdAcceptRequestFormat" + }, + "anoncreds": { + "$ref": "#/components/schemas/AnonCredsAcceptRequestFormat" + } + }, "type": "object", "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" }, "AcceptCredentialRequestOptions": { "properties": { - "credentialRecord": { - "$ref": "#/components/schemas/CredentialExchangeRecord" + "credentialRecordId": { + "$ref": "#/components/schemas/RecordId" }, "credentialFormats": { "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.acceptRequest_" @@ -1787,19 +2568,19 @@ } }, "required": [ - "credentialRecord" + "credentialRecordId" ], "type": "object", "additionalProperties": false }, "AcceptCredential": { "properties": { - "credentialRecord": { - "$ref": "#/components/schemas/CredentialExchangeRecord" + "credentialRecordId": { + "$ref": "#/components/schemas/RecordId" } }, "required": [ - "credentialRecord" + "credentialRecordId" ], "type": "object", "additionalProperties": false @@ -1807,18 +2588,6 @@ "BasicMessageRecord": { "$ref": "#/components/schemas/Record_string.unknown_" }, - "Record_content.string_": { - "properties": { - "content": { - "type": "string" - } - }, - "required": [ - "content" - ], - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, "AgentInfo": { "properties": { "label": { @@ -1854,7 +2623,7 @@ } }, "info": { - "title": "@aries-framework/rest", + "title": "credo-controller", "version": "0.9.4", "description": "Rest endpoint wrapper for using your agent over HTTP", "license": { @@ -1924,7 +2693,9 @@ "description": "ProofRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -1939,42 +2710,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Retrieve proof record by proof record id", @@ -2006,7 +2741,9 @@ "description": "ProofRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/ProofExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -2021,42 +2758,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Initiate a new presentation exchange as prover by sending a presentation proposal request\nto the connection with the specified connection id.", @@ -2089,7 +2790,9 @@ "description": "ProofRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/ProofExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -2104,42 +2807,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Accept a presentation proposal as verifier by sending an accept proposal message\nto the connection associated with the proof record.", @@ -2172,7 +2839,9 @@ "description": "Ok", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/ProofExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -2187,44 +2856,9 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, + "description": "Creates a presentation request bound to existing connection", "tags": [ "Proofs" ], @@ -2252,31 +2886,66 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { "properties": { - "message": { + "recipientKey": { + "anyOf": [ + { + "properties": { + "recipientKey": {} + }, + "type": "object" + }, + { + "properties": { + "recipientKey": { + "type": "string" + } + }, + "required": [ + "recipientKey" + ], + "type": "object" + } + ] + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "invitation": { + "$ref": "#/components/schemas/PlaintextMessage" + }, + "invitationUrl": { "type": "string" } }, "required": [ - "message" + "recipientKey", + "outOfBandRecord", + "invitation", + "invitationUrl" ], "type": "object" + }, + "examples": { + "Example 1": { + "value": { + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "protocolVersion": "v1" + } + } } } } } }, + "description": "Creates a presentation request not bound to any proposal or existing connection", "tags": [ "Proofs" ], @@ -2306,54 +2975,20 @@ "description": "ProofRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { "metadata": {}, "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", - "protocolVersion": "v1" - } - } - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" + "createdAt": "2022-01-01T00:00:00.000Z", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "protocolVersion": "v1" } - }, - "required": [ - "message" - ], - "type": "object" + } } } } @@ -2409,7 +3044,9 @@ "description": "ProofRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/ProofExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -2424,42 +3061,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Accept a presentation as prover by sending an accept presentation message\nto the connection associated with the proof record.", @@ -2488,7 +3089,7 @@ "operationId": "ProofFormData", "responses": { "200": { - "description": "Ok", + "description": "ProofRecord", "content": { "application/json": { "schema": {}, @@ -2506,44 +3107,9 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, + "description": "Return proofRecord", "tags": [ "Proofs" ], @@ -2593,24 +3159,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Create Secp256k1 key pair for polygon DID", @@ -2636,42 +3184,6 @@ "schema": {} } } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Create polygon based W3C schema", @@ -2725,42 +3237,6 @@ "schema": {} } } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Estimate transaction", @@ -2804,42 +3280,6 @@ "schema": {} } } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Fetch schema details", @@ -2963,7 +3403,9 @@ "description": "OutOfBandRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -3004,98 +3446,39 @@ "createdAt": "2022-01-01T00:00:00.000Z", "reusable": false } - } - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - } - }, - "description": "Retrieve an out of band record by id", - "tags": [ - "Out Of Band" - ], - "security": [ - { - "apiKey": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "outOfBandId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - }, - "delete": { - "operationId": "DeleteOutOfBandRecord", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" + } } } } } }, + "description": "Retrieve an out of band record by id", + "tags": [ + "Out Of Band" + ], + "security": [ + { + "apiKey": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "outOfBandId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + } + ] + }, + "delete": { + "operationId": "DeleteOutOfBandRecord", + "responses": { + "204": { + "description": "No content" + } + }, "description": "Deletes an out of band record from the repository.", "tags": [ "Out Of Band" @@ -3126,7 +3509,29 @@ "description": "Out of band record", "content": { "application/json": { - "schema": {}, + "schema": { + "properties": { + "invitationDid": { + "type": "string" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "invitation": { + "$ref": "#/components/schemas/PlaintextMessage" + }, + "invitationUrl": { + "type": "string" + } + }, + "required": [ + "invitationDid", + "outOfBandRecord", + "invitation", + "invitationUrl" + ], + "type": "object" + }, "examples": { "Example 1": { "value": { @@ -3198,24 +3603,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Creates an outbound out-of-band record containing out-of-band invitation message defined in\nAries RFC 0434: Out-of-Band Protocol 1.1.", @@ -3257,7 +3644,28 @@ "description": "out-of-band record and invitation", "content": { "application/json": { - "schema": {}, + "schema": { + "properties": { + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "invitation": { + "$ref": "#/components/schemas/PlaintextMessage" + }, + "invitationUrl": { + "type": "string" + }, + "recipientKey": { + "type": "string" + } + }, + "required": [ + "outOfBandRecord", + "invitation", + "invitationUrl" + ], + "type": "object" + }, "examples": { "Example 1": { "value": { @@ -3328,24 +3736,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Creates an outbound out-of-band record in the same way how `createInvitation` method does it,\nbut it also converts out-of-band invitation message to an \"legacy\" invitation message defined\nin RFC 0160: Connection Protocol and returns it together with out-of-band record.", @@ -3385,55 +3775,37 @@ "responses": { "200": { "description": "a message and a invitationUrl", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "message": { - "@id": "eac4ff4e-b4fb-4c1d-aef3-b29c89d1cc00", - "@type": "https://didcomm.org/connections/1.0/invitation" - }, - "invitationUrl": "http://example.com/invitation_url" - } - } - } - } - } - }, - "404": { - "description": "", "content": { "application/json": { "schema": { "properties": { - "reason": { + "outOfBandRecord": { + "$ref": "#/components/schemas/OutOfBandRecord" + }, + "invitationUrl": { "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { + }, "message": { - "type": "string" + "$ref": "#/components/schemas/AgentMessage" } }, "required": [ + "outOfBandRecord", + "invitationUrl", "message" ], "type": "object" + }, + "examples": { + "Example 1": { + "value": { + "message": { + "@id": "eac4ff4e-b4fb-4c1d-aef3-b29c89d1cc00", + "@type": "https://didcomm.org/connections/1.0/invitation" + }, + "invitationUrl": "http://example.com/invitation_url" + } + } } } } @@ -3487,7 +3859,21 @@ "description": "out-of-band record and connection record if one has been created.", "content": { "application/json": { - "schema": {}, + "schema": { + "properties": { + "connectionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "required": [ + "connectionRecord", + "outOfBandRecord" + ], + "type": "object" + }, "examples": { "Example 1": { "value": { @@ -3549,24 +3935,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", @@ -3599,7 +3967,21 @@ "description": "out-of-band record and connection record if one has been created.", "content": { "application/json": { - "schema": {}, + "schema": { + "properties": { + "connectionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "required": [ + "connectionRecord", + "outOfBandRecord" + ], + "type": "object" + }, "examples": { "Example 1": { "value": { @@ -3661,24 +4043,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Creates inbound out-of-band record and assigns out-of-band invitation message to it if the\nmessage is valid.", @@ -3711,7 +4075,21 @@ "description": "Ok", "content": { "application/json": { - "schema": {}, + "schema": { + "properties": { + "connectionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + } + }, + "required": [ + "connectionRecord", + "outOfBandRecord" + ], + "type": "object" + }, "examples": { "Example 1": { "value": { @@ -3773,42 +4151,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Accept a connection invitation as invitee (by sending a connection request message) for the connection with the specified connection id.\nThis is not needed when auto accepting of connections is enabled.", @@ -3841,51 +4183,17 @@ } } } - }, - "/multi-tenancy/create-tenant": { - "post": { - "operationId": "CreateTenant", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", + }, + "/multi-tenancy/create-tenant": { + "post": { + "operationId": "CreateTenant", + "responses": { + "200": { + "description": "Ok", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" + "$ref": "#/components/schemas/TenantRecord" } } } @@ -3923,42 +4231,6 @@ "schema": {} } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4002,24 +4274,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4053,24 +4307,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4109,42 +4345,14 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string" - } + "signedTransaction": {} }, "required": [ - "message" + "signedTransaction" ], "type": "object" } @@ -4212,24 +4420,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4266,24 +4456,28 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { "properties": { - "message": { + "invitationDid": { + "type": "string" + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "invitation": { + "$ref": "#/components/schemas/PlaintextMessage" + }, + "invitationUrl": { "type": "string" } }, "required": [ - "message" + "invitationDid", + "outOfBandRecord", + "invitation", + "invitationUrl" ], "type": "object" } @@ -4339,24 +4533,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4407,24 +4583,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4468,24 +4626,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4529,24 +4669,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4588,24 +4710,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4687,24 +4791,6 @@ "schema": {} } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4736,46 +4822,10 @@ "operationId": "CreateSchema", "responses": { "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } + "description": "Ok", + "content": { + "application/json": { + "schema": {} } } } @@ -4803,36 +4853,7 @@ "content": { "application/json": { "schema": { - "properties": { - "endorserDid": { - "type": "string" - }, - "endorse": { - "type": "boolean" - }, - "attributes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "version": { - "$ref": "#/components/schemas/Version" - }, - "name": { - "type": "string" - }, - "issuerId": { - "type": "string" - } - }, - "required": [ - "attributes", - "version", - "name", - "issuerId" - ], - "type": "object" + "$ref": "#/components/schemas/CreateSchemaInput" } } } @@ -4852,24 +4873,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4931,60 +4934,6 @@ "schema": {} } } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -5034,42 +4983,6 @@ "schema": {} } } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -5113,78 +5026,6 @@ "schema": {} } } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "403": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -5227,41 +5068,8 @@ } } }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } + "202": { + "description": "Wait for action to complete" } }, "tags": [ @@ -5301,84 +5109,30 @@ "type": "string" }, "issuerId": { - "type": "string" - } - }, - "required": [ - "tag", - "schemaId", - "issuerId" - ], - "type": "object" - } - } - } - } - } - }, - "/multi-tenancy/credential-definition/{credentialDefinitionId}/{tenantId}": { - "get": { - "operationId": "GetCredentialDefinitionById", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } + "type": "string" + } + }, + "required": [ + "tag", + "schemaId", + "issuerId" + ], + "type": "object" } } - }, - "500": { - "description": "", + } + } + } + }, + "/multi-tenancy/credential-definition/{credentialDefinitionId}/{tenantId}": { + "get": { + "operationId": "GetCredentialDefinitionById", + "responses": { + "200": { + "description": "Ok", "content": { "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } + "schema": {} } } } @@ -5422,24 +5176,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -5483,24 +5219,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -5544,42 +5262,6 @@ "schema": {} } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -5623,42 +5305,6 @@ "schema": {} } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -5810,42 +5456,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -5899,42 +5509,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -5978,24 +5552,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -6051,42 +5607,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -6157,43 +5677,7 @@ "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", "protocolVersion": "v1" } - } - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" + } } } } @@ -6250,42 +5734,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -6322,44 +5770,10 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" + "$ref": "#/components/schemas/Record_string.any_" } } } @@ -6396,24 +5810,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -6457,24 +5853,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -6594,42 +5972,6 @@ "schema": {} } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Send a question to a connection", @@ -6702,42 +6044,6 @@ "schema": {} } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Send a answer to question", @@ -6786,33 +6092,134 @@ "operationId": "GetQuestionAnswerRecordById", "responses": { "200": { - "description": "ConnectionRecord", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", + "description": "ConnectionRecord", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "description": "Retrieve question answer record by id", + "tags": [ + "MultiTenancy" + ], + "security": [ + { + "apiKey": [] + } + ], + "parameters": [ + { + "description": "Question Answer Record identifier", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + }, + { + "description": "Tenant identifier", + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/multi-tenancy/basic-messages/{connectionId}/{tenantId}": { + "get": { + "operationId": "GetBasicMessages", + "responses": { + "200": { + "description": "BasicMessageRecord[]", + "content": { + "application/json": { + "schema": {}, + "examples": { + "Example 1": { + "value": [ + { + "_tags": { + "role": "sender", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834" + }, + "metadata": {}, + "id": "74bcf865-1fdc-45b4-b517-9def02dfd25f", + "createdAt": "2022-08-18T08:38:40.216Z", + "content": "string", + "sentTime": "2022-08-18T08:38:40.216Z", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834" + } + ] + } + } + } + } + } + }, + "description": "Retrieve basic messages by connection id", + "tags": [ + "MultiTenancy" + ], + "security": [ + { + "apiKey": [] + } + ], + "parameters": [ + { + "description": "Connection identifier", + "in": "path", + "name": "connectionId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + }, + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "post": { + "operationId": "SendMessage", + "responses": { + "200": { + "description": "Ok", "content": { "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" + "schema": {}, + "examples": { + "Example 1": { + "value": { + "_tags": { + "role": "sender", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834" + }, + "metadata": {}, + "id": "74bcf865-1fdc-45b4-b517-9def02dfd25f", + "createdAt": "2022-08-18T08:38:40.216Z", + "content": "string", + "sentTime": "2022-08-18T08:38:40.216Z", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834" } - }, - "required": [ - "reason" - ], - "type": "object" + } } } } } }, - "description": "Retrieve question answer record by id", + "description": "Send a basic message to a connection", "tags": [ "MultiTenancy" ], @@ -6823,16 +6230,15 @@ ], "parameters": [ { - "description": "Question Answer Record identifier", + "description": "Connection identifier", "in": "path", - "name": "id", + "name": "connectionId", "required": true, "schema": { "$ref": "#/components/schemas/RecordId" } }, { - "description": "Tenant identifier", "in": "path", "name": "tenantId", "required": true, @@ -6840,7 +6246,17 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Record_content.string_" + } + } + } + } } }, "/transactions/endorse": { @@ -6849,42 +6265,14 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string" - } + "signedTransaction": {} }, "required": [ - "message" + "signedTransaction" ], "type": "object" } @@ -6919,26 +6307,10 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" + "$ref": "#/components/schemas/DidCreateResult_DidOperationStateActionBase_" } } } @@ -6976,42 +6348,6 @@ "schema": {} } } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -7044,37 +6380,23 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "properties": { - "importDid": {} - }, - "required": [ - "importDid" - ], - "type": "object" + "properties": { + "didDocumentMetadata": { + "$ref": "#/components/schemas/DIDDocumentMetadata" }, - { - "properties": { - "importDid": {}, - "didDocumentMetadata": { - "$ref": "#/components/schemas/DIDDocumentMetadata" - }, - "didResolutionMetadata": { - "$ref": "#/components/schemas/DidResolutionMetadata" - }, - "didDocument": { - "$ref": "#/components/schemas/Record_string.any_" - } - }, - "required": [ - "didDocumentMetadata", - "didResolutionMetadata", - "didDocument" - ], - "type": "object" + "didResolutionMetadata": { + "$ref": "#/components/schemas/DidResolutionMetadata" + }, + "didDocument": { + "$ref": "#/components/schemas/Record_string.any_" } - ] + }, + "required": [ + "didDocumentMetadata", + "didResolutionMetadata", + "didDocument" + ], + "type": "object" }, "examples": { "Example 1": { @@ -7156,24 +6478,31 @@ "description": "DidResolutionResult", "content": { "application/json": { - "schema": {} - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" + "schema": {}, + "examples": { + "Example 1": { + "value": { + "did": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", + "didDocument": { + "@context": [ + "https://w3id.org/did/v1", + "https://w3id.org/security/suites/ed25519-2018/v1" + ], + "id": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", + "verificationMethod": [ + { + "id": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7#verkey", + "type": "Ed25519VerificationKey2018", + "controller": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", + "publicKeyBase58": "BapLDK4dEY88vWcQgNbpAPVVP4r3CHs4MvShmmhqkxXM" + } + ], + "authentication": [ + "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7#verkey" + ] + } } - }, - "required": [ - "message" - ], - "type": "object" + } } } } @@ -7207,26 +6536,13 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } + "items": { + "$ref": "#/components/schemas/DidRecord" }, - "required": [ - "message" - ], - "type": "object" + "type": "array" } } } @@ -7235,114 +6551,44 @@ "tags": [ "Dids" ], - "security": [ - { - "apiKey": [] - } - ], - "parameters": [] - } - }, - "/schemas/{schemaId}": { - "get": { - "operationId": "GetSchemaById", - "responses": { - "200": { - "description": "Schema", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "ver": "1.0", - "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - "name": "schema", - "version": "1.0", - "attrNames": [ - "string" - ], - "seqNo": 351936 - } - } - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "403": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", + "security": [ + { + "apiKey": [] + } + ], + "parameters": [] + } + }, + "/schemas/{schemaId}": { + "get": { + "operationId": "GetSchemaById", + "responses": { + "200": { + "description": "get schema by Id", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" + "$ref": "#/components/schemas/GetSchemaReturn" + }, + "examples": { + "Example 1": { + "value": { + "ver": "1.0", + "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", + "name": "schema", + "version": "1.0", + "attrNames": [ + "string" + ], + "seqNo": 351936 } - }, - "required": [ - "message" - ], - "type": "object" + } } } } } }, - "description": "Retrieve schema by schema id", + "description": "Get schema by schemaId", "tags": [ "Schemas" ], @@ -7357,7 +6603,7 @@ "name": "schemaId", "required": true, "schema": { - "$ref": "#/components/schemas/SchemaId" + "type": "string" } } ] @@ -7368,65 +6614,41 @@ "operationId": "CreateSchema", "responses": { "200": { - "description": "schema", + "description": "get schema", "content": { "application/json": { - "schema": {}, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegisterSchemaReturn" + }, + { + "$ref": "#/components/schemas/RegisterSchemaReturnStateFinished" + } + ] + }, "examples": { "Example 1": { "value": { - "ver": "1.0", - "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - "name": "schema", - "version": "1.0", - "attrNames": [ - "string" - ], - "seqNo": 351936 + "state": "finished", + "schema": { + "issuerId": "did:indy:bcovrin:testnet:LRCUFcizUL74AGgLqdJHK7", + "name": "Test Schema", + "version": "1.0.0", + "attrNames": [ + "Name", + "Age" + ] + }, + "schemaId": "LRCUFcizUL74AGgLqdJHK7:2:Test Schema:1.0.0" } } } } } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, - "description": "Creates a new schema and registers schema on ledger", + "description": "Create schema", "tags": [ "Schemas" ], @@ -7441,36 +6663,7 @@ "content": { "application/json": { "schema": { - "properties": { - "endorserDid": { - "type": "string" - }, - "endorse": { - "type": "boolean" - }, - "attributes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "version": { - "$ref": "#/components/schemas/Version" - }, - "name": { - "type": "string" - }, - "issuerId": { - "type": "string" - } - }, - "required": [ - "attributes", - "version", - "name", - "issuerId" - ], - "type": "object" + "$ref": "#/components/schemas/CreateSchemaInput" } } } @@ -7485,7 +6678,9 @@ "description": "CredDef", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/GetCredentialDefinitionReturn" + }, "examples": { "Example 1": { "value": { @@ -7524,60 +6719,6 @@ } } } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Retrieve credential definition by credential definition id", @@ -7609,7 +6750,16 @@ "description": "CredDef", "content": { "application/json": { - "schema": {}, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegisterCredentialDefinitionReturn" + }, + { + "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateFinished" + } + ] + }, "examples": { "Example 1": { "value": { @@ -7649,41 +6799,8 @@ } } }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } + "202": { + "description": "Wait for action to complete" } }, "description": "Creates a new credential definition.", @@ -7789,7 +6906,15 @@ "name": "threadId", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/ThreadId" + } + }, + { + "in": "query", + "name": "parentThreadId", + "required": false, + "schema": { + "$ref": "#/components/schemas/ThreadId" } }, { @@ -7797,7 +6922,7 @@ "name": "connectionId", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/RecordId" } }, { @@ -7807,6 +6932,14 @@ "schema": { "$ref": "#/components/schemas/CredentialState" } + }, + { + "in": "query", + "name": "role", + "required": false, + "schema": { + "$ref": "#/components/schemas/CredentialRole" + } } ] } @@ -7881,68 +7014,34 @@ "responses": { "200": { "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "examples": { + "Example 1": { + "value": { + "_tags": { + "state": "offer-sent", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" + }, + "metadata": { + "_internal/indyCredential": { + "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", + "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + } + }, + "credentials": [], + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "credentialAttributes": [], + "protocolVersion": "v1" } - }, - "required": [ - "message" - ], - "type": "object" + } } } } @@ -7977,7 +7076,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8004,42 +7105,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Initiate a new credential exchange as holder by sending a propose credential message\nto the connection with a specified connection id.", @@ -8072,7 +7137,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8099,42 +7166,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Accept a credential proposal as issuer by sending an accept proposal message\nto the connection associated with the credential exchange record.", @@ -8167,7 +7198,9 @@ "description": "AgentMessage, CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8194,24 +7227,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Initiate a new credential exchange as issuer by creating a credential offer\nwithout specifying a connection id", @@ -8242,24 +7257,46 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { "properties": { - "message": { + "recipientKey": { + "anyOf": [ + { + "properties": { + "recipientKey": {} + }, + "type": "object" + }, + { + "properties": { + "recipientKey": { + "type": "string" + } + }, + "required": [ + "recipientKey" + ], + "type": "object" + } + ] + }, + "outOfBandRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "invitation": { + "$ref": "#/components/schemas/PlaintextMessage" + }, + "invitationUrl": { "type": "string" } }, "required": [ - "message" + "recipientKey", + "outOfBandRecord", + "invitation", + "invitationUrl" ], "type": "object" } @@ -8296,7 +7333,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8323,42 +7362,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Accept a credential offer as holder by sending an accept offer message\nto the connection associated with the credential exchange record.", @@ -8391,7 +7394,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8418,42 +7423,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Accept a credential request as issuer by sending an accept request message\nto the connection associated with the credential exchange record.", @@ -8486,7 +7455,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8513,42 +7484,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Accept a credential as holder by sending an accept credential message\nto the connection associated with the credential exchange record.", @@ -8581,7 +7516,12 @@ "description": "ConnectionRecord[]", "content": { "application/json": { - "schema": {}, + "schema": { + "items": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "type": "array" + }, "examples": { "Example 1": { "value": [ @@ -8681,7 +7621,9 @@ "description": "ConnectionRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -8692,32 +7634,14 @@ "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" }, - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" - } - } - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" } - }, - "required": [ - "reason" - ], - "type": "object" + } } } } @@ -8747,49 +7671,8 @@ "delete": { "operationId": "DeleteConnection", "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } + "204": { + "description": "No content" } }, "description": "Deletes a connection record from the connection repository.", @@ -8822,7 +7705,9 @@ "description": "ConnectionRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -8844,42 +7729,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Accept a connection request as inviter by sending a connection response message\nfor the connection with the specified connection id.\n\nThis is not needed when auto accepting of connection is enabled.", @@ -8912,7 +7761,9 @@ "description": "ConnectionRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -8934,42 +7785,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "description": "Accept a connection response as invitee by sending a trust ping message\nfor the connection with the specified connection id.\n\nThis is not needed when auto accepting of connection is enabled.", @@ -9000,44 +7815,10 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" + "$ref": "#/components/schemas/PlaintextMessage" } } } @@ -9121,44 +7902,26 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" + "$ref": "#/components/schemas/BasicMessageRecord" + }, + "examples": { + "Example 1": { + "value": { + "_tags": { + "role": "sender", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834" + }, + "metadata": {}, + "id": "74bcf865-1fdc-45b4-b517-9def02dfd25f", + "createdAt": "2022-08-18T08:38:40.216Z", + "content": "string", + "sentTime": "2022-08-18T08:38:40.216Z", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834" } - }, - "required": [ - "message" - ], - "type": "object" + } } } } @@ -9312,44 +8075,13 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "examples": { + "Example 1": {} } } } @@ -9411,44 +8143,10 @@ "responses": { "200": { "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" + "$ref": "#/components/schemas/Record_string.unknown_" } } } @@ -9492,26 +8190,10 @@ "responses": { "200": { "description": "ConnectionRecord", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "", "content": { "application/json": { "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" + "$ref": "#/components/schemas/Record_string.unknown_" } } } diff --git a/src/server.ts b/src/server.ts index 325670bc..c157dd2f 100644 --- a/src/server.ts +++ b/src/server.ts @@ -13,15 +13,19 @@ import { serve, generateHTML } from 'swagger-ui-express' import { container } from 'tsyringe' import { setDynamicApiKey } from './authentication' +import { BaseError } from './errors/errors' import { basicMessageEvents } from './events/BasicMessageEvents' import { connectionEvents } from './events/ConnectionEvents' import { credentialEvents } from './events/CredentialEvents' import { proofEvents } from './events/ProofEvents' import { questionAnswerEvents } from './events/QuestionAnswerEvents' +import { reuseConnectionEvents } from './events/ReuseConnectionEvents' import { RegisterRoutes } from './routes/routes' import { SecurityMiddleware } from './securityMiddleware' -import { ValidateError, type Exception } from 'tsoa' +import { ValidateError } from 'tsoa' + +dotenv.config() dotenv.config() @@ -37,18 +41,20 @@ export const setupServer = async (agent: Agent, config: ServerConfig, apiKey?: s connectionEvents(agent, config) credentialEvents(agent, config) proofEvents(agent, config) + reuseConnectionEvents(agent, config) } // Use body parser to read sent json payloads app.use( bodyParser.urlencoded({ extended: true, + limit: '50mb', }) ) setDynamicApiKey(apiKey ? apiKey : '') - app.use(bodyParser.json()) + app.use(bodyParser.json({ limit: '50mb' })) app.use('/docs', serve, async (_req: ExRequest, res: ExResponse) => { return res.send(generateHTML(await import('./routes/swagger.json'))) }) @@ -63,10 +69,7 @@ export const setupServer = async (agent: Agent, config: ServerConfig, apiKey?: s // apply rate limiter to all requests app.use(limiter) - const securityMiddleware = new SecurityMiddleware() - app.use(securityMiddleware.use) - RegisterRoutes(app) - + // Note: Having used it above, redirects accordingly app.use((req, res, next) => { if (req.url == '/') { res.redirect('/docs') @@ -75,6 +78,10 @@ export const setupServer = async (agent: Agent, config: ServerConfig, apiKey?: s next() }) + const securityMiddleware = new SecurityMiddleware() + app.use(securityMiddleware.use) + RegisterRoutes(app) + app.use(function errorHandler(err: unknown, req: ExRequest, res: ExResponse, next: NextFunction): ExResponse | void { if (err instanceof ValidateError) { agent.config.logger.warn(`Caught Validation Error for ${req.path}:`, err.fields) @@ -82,30 +89,20 @@ export const setupServer = async (agent: Agent, config: ServerConfig, apiKey?: s message: 'Validation Failed', details: err?.fields, }) - } - - if (err instanceof Error) { - const exceptionError = err as Exception - if (exceptionError.status === 400) { - return res.status(400).json({ - message: `Bad Request`, - details: err.message, - }) - } - - agent.config.logger.error('Internal Server Error.', err) - return res.status(500).json({ - message: 'Internal Server Error. Check server logging.', + } else if (err instanceof BaseError) { + return res.status(err.statusCode).json({ + message: err.message, + }) + } else if (err instanceof Error) { + // Extend the Error type with custom properties + const error = err as Error & { statusCode?: number; status?: number; stack?: string } + const statusCode = error.statusCode || error.status || 500 + return res.status(statusCode).json({ + message: error.message || 'Internal Server Error', }) } next() }) - app.use(function notFoundHandler(_req, res: ExResponse) { - res.status(404).send({ - message: 'Not Found', - }) - }) - return app } diff --git a/src/utils/errorConverter.ts b/src/utils/errorConverter.ts new file mode 100644 index 00000000..01ba2f31 --- /dev/null +++ b/src/utils/errorConverter.ts @@ -0,0 +1,10 @@ +import type { BaseError } from '../errors/errors' + +import { errorMap } from '../errors/errors' + +function convertError(errorType: string, message: string = 'An error occurred'): BaseError { + const ErrorClass = errorMap[errorType] || errorMap.InternalServerError + throw new ErrorClass(message) +} + +export default convertError diff --git a/tsconfig.json b/tsconfig.json index de0ca16d..49cb417d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,8 +7,9 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "afj-controller/*": ["src"] + "credo-controller/*": ["*/src"] }, + "lib": ["ES2021.Promise"], "experimentalDecorators": true, "emitDecoratorMetadata": true, "types": ["jest", "node"] diff --git a/yarn.lock b/yarn.lock index 4680534a..486caa5d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -44,26 +44,26 @@ dependencies: static-eval "2.0.2" -"@ayanworks/credo-polygon-w3c-module@0.0.2-alpha.10": - version "0.0.2-alpha.10" - resolved "https://registry.yarnpkg.com/@ayanworks/credo-polygon-w3c-module/-/credo-polygon-w3c-module-0.0.2-alpha.10.tgz#41d2a493aeed0fec4a92e3bd5d2f70d5e044e6c2" - integrity sha512-M2IWdeEZxHwT7+oW3Pm/ycOSxad9VnJx315Wd1+PPZdonwSYKK6U2YdvLe3CiozevhjWReDjnIatRnCmk38Xnw== - dependencies: - "@ayanworks/polygon-did-registrar" "0.0.16-alpha.20" - "@ayanworks/polygon-did-resolver" "0.0.16-alpha.15" - "@ayanworks/polygon-schema-manager" "0.0.2-alpha.9" +"@ayanworks/credo-polygon-w3c-module@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@ayanworks/credo-polygon-w3c-module/-/credo-polygon-w3c-module-1.0.0.tgz#e48dcb48f8708b2959ebe02fcf3a5e08b168d479" + integrity sha512-dqcPI07bxzzGlOUkSHsyTe6DNAcXC3kvVdzH6BtOzrRyQ6Pujtr+6Fwn9VAFEKI88Pdxsk2upHAtlj1TmaeFRw== + dependencies: + "@ayanworks/polygon-did-registrar" "1.0.0" + "@ayanworks/polygon-did-resolver" "1.0.0" + "@ayanworks/polygon-schema-manager" "1.0.0" "@credo-ts/askar" "0.5.3" "@credo-ts/core" "0.5.3" did-resolver "^4.1.0" ethers "^6.9.0" -"@ayanworks/polygon-did-registrar@0.0.16-alpha.20": - version "0.0.16-alpha.20" - resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-registrar/-/polygon-did-registrar-0.0.16-alpha.20.tgz#c17fc082db84959cf1fd745515ad41c16a810236" - integrity sha512-4gH4Vq01fEtkgOzn43J/3B7sWs4N+KvkL2tvrtOF3cfELlUE4UuRx97JAXJlX9ayGWIspTYg+GMbnkvfTLT8GQ== +"@ayanworks/polygon-did-registrar@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-registrar/-/polygon-did-registrar-1.0.0.tgz#6704a51b154e12c9484c90581a1c9dc41e01dcd3" + integrity sha512-pK6WELi9avhxFk7BGioMFu9U/VL6GLvW6n18QFq8G4EMPMWsAvTfiiqUadTVWU8nuHSOrgpBBW8kN5DPWwJPFg== dependencies: - "@ayanworks/polygon-did-registry-contract" "2.0.1-alpha.7" - "@ayanworks/polygon-did-resolver" "^0.0.16-alpha.15" + "@ayanworks/polygon-did-registry-contract" "3.0.0" + "@ayanworks/polygon-did-resolver" "1.0.0" "@credo-ts/core" "0.5.3" "@ethersproject/basex" "^5.7.0" "@ethersproject/signing-key" "^5.7.0" @@ -73,27 +73,27 @@ ethers "^6.9.0" uuid "^9.0.1" -"@ayanworks/polygon-did-registry-contract@2.0.1-alpha.7": - version "2.0.1-alpha.7" - resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-registry-contract/-/polygon-did-registry-contract-2.0.1-alpha.7.tgz#4f694602701ac1f7b0503c150a8764a289b0294c" - integrity sha512-pwX45XsGT3LrIBpnIJ6FrzPuB3gSTWiNVSyGGniL0ofUgcsNGqXOv2g3WQSDcG9b7/+AGeoJ6tYqshCbnjsmvQ== +"@ayanworks/polygon-did-registry-contract@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-registry-contract/-/polygon-did-registry-contract-3.0.0.tgz#52b18768b887e933d44a9713b33dc2efbb1dcf53" + integrity sha512-RnW31nkDIMG1YzuOycxGGrJFpgTcpBwS/UZR6/wMPrsJBKBEN28k2CZImwXkbgaknyTfL7xe1u3C8NxfDvhI4Q== -"@ayanworks/polygon-did-resolver@0.0.16-alpha.15", "@ayanworks/polygon-did-resolver@^0.0.16-alpha.15": - version "0.0.16-alpha.15" - resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-resolver/-/polygon-did-resolver-0.0.16-alpha.15.tgz#f12969e6d7b7eba2432ccd2f6d9b4a1de5f3dcf9" - integrity sha512-JyjgFaWWSQzzj1LKsopYVvIJjeo6lzqfVIheILmgxcxvTo1/skFatthocBNmyQ4Vc8QyKc05s5AbTUkm74wNbg== +"@ayanworks/polygon-did-resolver@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-resolver/-/polygon-did-resolver-1.0.0.tgz#4d267004a509fad9a75bb18c6f449f6c51e1f198" + integrity sha512-mzYh3XNQ4HJ0GakP1QD7UOW8PjMAhdtu/TXzeOqMtHLhWktFMQcgJuqNMNxMGbJFdIe12qFJROlle6p1BjF01g== dependencies: - "@ayanworks/polygon-did-registry-contract" "2.0.1-alpha.7" + "@ayanworks/polygon-did-registry-contract" "3.0.0" did-resolver "^4.1.0" ethers "^5.1.0" -"@ayanworks/polygon-schema-manager@0.0.2-alpha.9": - version "0.0.2-alpha.9" - resolved "https://registry.yarnpkg.com/@ayanworks/polygon-schema-manager/-/polygon-schema-manager-0.0.2-alpha.9.tgz#24566f6d41bffc16d0483576df8b766217312fef" - integrity sha512-eHGNWQE8sYEPzYynnDswSLUlkF+BHMDHN5iSIfupbxPObScfMXPtYO/qSu0V4F+QmmmqH5WUpZ7qGBgOyi7j8Q== +"@ayanworks/polygon-schema-manager@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@ayanworks/polygon-schema-manager/-/polygon-schema-manager-1.0.0.tgz#5f71320d93e874477906df15be1aacc32906d6aa" + integrity sha512-XByf/mydccNEnfiW83K9WlayvPgrRpLVqX7CwuHtdBTSlrhed+Vc9FnZLIQUsGGnlbowQVLaPteSaKg/lEYUzw== dependencies: - "@ayanworks/polygon-did-registry-contract" "2.0.1-alpha.7" - "@ayanworks/polygon-did-resolver" "^0.0.16-alpha.15" + "@ayanworks/polygon-did-registry-contract" "3.0.0" + "@ayanworks/polygon-did-resolver" "1.0.0" "@nomicfoundation/hardhat-verify" "^2.0.3" axios "^1.6.3" did-resolver "^4.1.0" @@ -108,155 +108,131 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" - integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== dependencies: - "@babel/highlight" "^7.24.2" + "@babel/highlight" "^7.24.7" picocolors "^1.0.0" -"@babel/compat-data@^7.23.5": - version "7.24.4" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.4.tgz#6f102372e9094f25d908ca0d34fc74c74606059a" - integrity sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ== +"@babel/compat-data@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.2.tgz#e41928bd33475305c586f6acbbb7e3ade7a6f7f5" + integrity sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ== -"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.14.6", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.5.tgz#15ab5b98e101972d171aeef92ac70d8d6718f06a" - integrity sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA== +"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.14.6", "@babel/core@^7.23.9": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" + integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== + dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.24.2" - "@babel/generator" "^7.24.5" - "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-module-transforms" "^7.24.5" - "@babel/helpers" "^7.24.5" - "@babel/parser" "^7.24.5" - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.5" - "@babel/types" "^7.24.5" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.0" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-module-transforms" "^7.25.2" + "@babel/helpers" "^7.25.0" + "@babel/parser" "^7.25.0" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.2" + "@babel/types" "^7.25.2" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.24.5", "@babel/generator@^7.7.2": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.5.tgz#e5afc068f932f05616b66713e28d0f04e99daeb3" - integrity sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA== +"@babel/generator@^7.25.0", "@babel/generator@^7.7.2": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.0.tgz#f858ddfa984350bc3d3b7f125073c9af6988f18e" + integrity sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw== dependencies: - "@babel/types" "^7.24.5" + "@babel/types" "^7.25.0" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" - integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== +"@babel/helper-compilation-targets@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz#e1d9410a90974a3a5a66e84ff55ef62e3c02d06c" + integrity sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw== dependencies: - "@babel/compat-data" "^7.23.5" - "@babel/helper-validator-option" "^7.23.5" - browserslist "^4.22.2" + "@babel/compat-data" "^7.25.2" + "@babel/helper-validator-option" "^7.24.8" + browserslist "^4.23.1" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-environment-visitor@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" - integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== - -"@babel/helper-function-name@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" - integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== - dependencies: - "@babel/template" "^7.22.15" - "@babel/types" "^7.23.0" - -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-imports@^7.24.3": - version "7.24.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz#6ac476e6d168c7c23ff3ba3cf4f7841d46ac8128" - integrity sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg== - dependencies: - "@babel/types" "^7.24.0" - -"@babel/helper-module-transforms@^7.23.3", "@babel/helper-module-transforms@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz#ea6c5e33f7b262a0ae762fd5986355c45f54a545" - integrity sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A== - dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.24.3" - "@babel/helper-simple-access" "^7.24.5" - "@babel/helper-split-export-declaration" "^7.24.5" - "@babel/helper-validator-identifier" "^7.24.5" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.24.0", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz#a924607dd254a65695e5bd209b98b902b3b2f11a" - integrity sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ== - -"@babel/helper-simple-access@^7.22.5", "@babel/helper-simple-access@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz#50da5b72f58c16b07fbd992810be6049478e85ba" - integrity sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ== - dependencies: - "@babel/types" "^7.24.5" - -"@babel/helper-split-export-declaration@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz#b9a67f06a46b0b339323617c8c6213b9055a78b6" - integrity sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q== - dependencies: - "@babel/types" "^7.24.5" - -"@babel/helper-string-parser@^7.24.1": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz#f99c36d3593db9540705d0739a1f10b5e20c696e" - integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== - -"@babel/helper-validator-identifier@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz#918b1a7fa23056603506370089bd990d8720db62" - integrity sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA== - -"@babel/helper-validator-option@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" - integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== - -"@babel/helpers@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.5.tgz#fedeb87eeafa62b621160402181ad8585a22a40a" - integrity sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q== - dependencies: - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.5" - "@babel/types" "^7.24.5" - -"@babel/highlight@^7.10.4", "@babel/highlight@^7.24.2": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.5.tgz#bc0613f98e1dd0720e99b2a9ee3760194a704b6e" - integrity sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw== - dependencies: - "@babel/helper-validator-identifier" "^7.24.5" +"@babel/helper-module-imports@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" + integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/helper-module-transforms@^7.24.8", "@babel/helper-module-transforms@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz#ee713c29768100f2776edf04d4eb23b8d27a66e6" + integrity sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ== + dependencies: + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + "@babel/traverse" "^7.25.2" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.24.8", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" + integrity sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg== + +"@babel/helper-simple-access@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" + integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== + +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + +"@babel/helper-validator-option@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" + integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== + +"@babel/helpers@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.0.tgz#e69beb7841cb93a6505531ede34f34e6a073650a" + integrity sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw== + dependencies: + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.0" + +"@babel/highlight@^7.10.4", "@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" chalk "^2.4.2" js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.24.0", "@babel/parser@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790" - integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.3": + version "7.25.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.3.tgz#91fb126768d944966263f0657ab222a642b82065" + integrity sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw== + dependencies: + "@babel/types" "^7.25.2" "@babel/plugin-proposal-export-namespace-from@^7.14.5": version "7.18.9" @@ -308,6 +284,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-jsx@^7.7.2": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz#39a1fa4a7e3d3d7f34e2acc6be585b718d30e02d" + integrity sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -358,53 +341,50 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz#b3bcc51f396d15f3591683f90239de143c076844" - integrity sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw== + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz#58d458271b4d3b6bb27ee6ac9525acbb259bad1c" + integrity sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA== dependencies: - "@babel/helper-plugin-utils" "^7.24.0" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-transform-modules-commonjs@^7.14.5": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.1.tgz#e71ba1d0d69e049a22bf90b3867e263823d3f1b9" - integrity sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw== - dependencies: - "@babel/helper-module-transforms" "^7.23.3" - "@babel/helper-plugin-utils" "^7.24.0" - "@babel/helper-simple-access" "^7.22.5" - -"@babel/template@^7.22.15", "@babel/template@^7.24.0", "@babel/template@^7.3.3": - version "7.24.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.0.tgz#c6a524aa93a4a05d66aaf31654258fae69d87d50" - integrity sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== - dependencies: - "@babel/code-frame" "^7.23.5" - "@babel/parser" "^7.24.0" - "@babel/types" "^7.24.0" - -"@babel/traverse@^7.24.5", "@babel/traverse@^7.7.2": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.5.tgz#972aa0bc45f16983bf64aa1f877b2dd0eea7e6f8" - integrity sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA== - dependencies: - "@babel/code-frame" "^7.24.2" - "@babel/generator" "^7.24.5" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.24.5" - "@babel/parser" "^7.24.5" - "@babel/types" "^7.24.5" + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz#ab6421e564b717cb475d6fff70ae7f103536ea3c" + integrity sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA== + dependencies: + "@babel/helper-module-transforms" "^7.24.8" + "@babel/helper-plugin-utils" "^7.24.8" + "@babel/helper-simple-access" "^7.24.7" + +"@babel/template@^7.25.0", "@babel/template@^7.3.3": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" + integrity sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.25.0" + "@babel/types" "^7.25.0" + +"@babel/traverse@^7.24.7", "@babel/traverse@^7.25.2": + version "7.25.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.3.tgz#f1b901951c83eda2f3e29450ce92743783373490" + integrity sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.0" + "@babel/parser" "^7.25.3" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.2" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0", "@babel/types@^7.24.5", "@babel/types@^7.3.3": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.5.tgz#7661930afc638a5383eb0c4aee59b74f38db84d7" - integrity sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.3.3": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.2.tgz#55fb231f7dc958cd69ea141a4c2997e819646125" + integrity sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q== dependencies: - "@babel/helper-string-parser" "^7.24.1" - "@babel/helper-validator-identifier" "^7.24.5" + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -629,6 +609,7 @@ version "9.4.0" resolved "https://registry.yarnpkg.com/@digitalcredentials/jsonld-signatures/-/jsonld-signatures-9.4.0.tgz#d5881122c4202449b88a7e2384f8e615ae55582c" integrity sha512-DnR+HDTm7qpcDd0wcD1w6GdlAwfHjQSgu+ahion8REkCkkMRywF+CLunU7t8AZpFB2Gr/+N8naUtiEBNje1Oew== + dependencies: "@digitalbazaar/security-context" "^1.0.0" "@digitalcredentials/jsonld" "^6.0.0" fast-text-encoding "^1.0.3" @@ -709,9 +690,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.5.1": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" - integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + version "4.11.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" + integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== "@eslint/eslintrc@^0.4.3": version "0.4.3" @@ -1125,10 +1106,10 @@ "@hapi/boom" "^10.0.1" "@hapi/hoek" "^11.0.2" -"@hapi/catbox-memory@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@hapi/catbox-memory/-/catbox-memory-6.0.1.tgz#8f6b04c0cf2ce25da470324df360bd4e8d68b6ec" - integrity sha512-sVb+/ZxbZIvaMtJfAbdyY+QJUQg9oKTwamXpEg/5xnfG5WbJLTjvEn4kIGKz9pN3ENNbIL/bIdctmHmqi/AdGA== +"@hapi/catbox-memory@^6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@hapi/catbox-memory/-/catbox-memory-6.0.2.tgz#399fa83e85134d45a548eee978e4c3c1523e1a70" + integrity sha512-H1l4ugoFW/ZRkqeFrIo8p1rWN0PA4MDTfu4JmcoNDvnY975o29mqoZblqFTotxNHlEkMPpIiIBJTV+Mbi+aF0g== dependencies: "@hapi/boom" "^10.0.1" "@hapi/hoek" "^11.0.2" @@ -1163,9 +1144,9 @@ integrity sha512-w+lKW+yRrLhJu620jT3y+5g2mHqnKfepreykvdOcl9/6up8GrQQn+l3FRTsjHTKbkbfQFkuksHpdv2EcpKcJ4Q== "@hapi/hapi@^21.3.3": - version "21.3.9" - resolved "https://registry.yarnpkg.com/@hapi/hapi/-/hapi-21.3.9.tgz#953220abe26d12a7cbd308a57e434dedf0278cb3" - integrity sha512-AT5m+Rb8iSOFG3zWaiEuTJazf4HDYl5UpRpyxMJ3yR+g8tOEmqDv6FmXrLHShdvDOStAAepHGnr1G7egkFSRdw== + version "21.3.10" + resolved "https://registry.yarnpkg.com/@hapi/hapi/-/hapi-21.3.10.tgz#0357db7ca49415e50e5df80ba50ad3964f2a62f3" + integrity sha512-CmEcmTREW394MaGGKvWpoOK4rG8tKlpZLs30tbaBzhCrhiL2Ti/HARek9w+8Ya4nMBGcd+kDAzvU44OX8Ms0Jg== dependencies: "@hapi/accept" "^6.0.1" "@hapi/ammo" "^6.0.1" @@ -1173,7 +1154,7 @@ "@hapi/bounce" "^3.0.1" "@hapi/call" "^9.0.1" "@hapi/catbox" "^12.1.1" - "@hapi/catbox-memory" "^6.0.1" + "@hapi/catbox-memory" "^6.0.2" "@hapi/heavy" "^8.0.1" "@hapi/hoek" "^11.0.2" "@hapi/mimos" "^7.0.1" @@ -1428,178 +1409,201 @@ js-yaml "^3.13.1" resolve-from "^5.0.0" -"@istanbuljs/schema@^0.1.2": +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.5.1.tgz#260fe7239602fe5130a94f1aa386eff54b014bba" - integrity sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg== +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.5.1" - jest-util "^27.5.1" + jest-message-util "^29.7.0" + jest-util "^29.7.0" slash "^3.0.0" -"@jest/core@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.5.1.tgz#267ac5f704e09dc52de2922cbf3af9edcd64b626" - integrity sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ== - dependencies: - "@jest/console" "^27.5.1" - "@jest/reporters" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== + dependencies: + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - emittery "^0.8.1" + ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^27.5.1" - jest-config "^27.5.1" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-resolve-dependencies "^27.5.1" - jest-runner "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - jest-watcher "^27.5.1" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" micromatch "^4.0.4" - rimraf "^3.0.0" + pretty-format "^29.7.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" - integrity sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA== +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== dependencies: - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-mock "^27.5.1" + jest-mock "^29.7.0" -"@jest/fake-timers@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" - integrity sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ== +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== + dependencies: + jest-get-type "^29.6.3" + +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== dependencies: - "@jest/types" "^27.5.1" - "@sinonjs/fake-timers" "^8.0.1" + expect "^29.7.0" + jest-snapshot "^29.7.0" + +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== + dependencies: + "@jest/types" "^29.6.3" + "@sinonjs/fake-timers" "^10.0.2" "@types/node" "*" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-util "^27.5.1" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" -"@jest/globals@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" - integrity sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q== +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== dependencies: - "@jest/environment" "^27.5.1" - "@jest/types" "^27.5.1" - expect "^27.5.1" + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" -"@jest/reporters@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.5.1.tgz#ceda7be96170b03c923c37987b64015812ffec04" - integrity sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw== +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" "@types/node" "*" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" - glob "^7.1.2" + glob "^7.1.3" graceful-fs "^4.2.9" istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" + istanbul-lib-instrument "^6.0.0" istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-haste-map "^27.5.1" - jest-resolve "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" slash "^3.0.0" - source-map "^0.6.0" string-length "^4.0.1" - terminal-link "^2.0.0" - v8-to-istanbul "^8.1.0" + strip-ansi "^6.0.0" + v8-to-istanbul "^9.0.1" -"@jest/source-map@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.5.1.tgz#6608391e465add4205eae073b55e7f279e04e8cf" - integrity sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg== +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== dependencies: + "@jridgewell/trace-mapping" "^0.3.18" callsites "^3.0.0" graceful-fs "^4.2.9" - source-map "^0.6.0" -"@jest/test-result@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.5.1.tgz#56a6585fa80f7cdab72b8c5fc2e871d03832f5bb" - integrity sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag== +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== dependencies: - "@jest/console" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz#4057e0e9cea4439e544c6353c6affe58d095745b" - integrity sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ== +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== dependencies: - "@jest/test-result" "^27.5.1" + "@jest/test-result" "^29.7.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-runtime "^27.5.1" + jest-haste-map "^29.7.0" + slash "^3.0.0" -"@jest/transform@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.5.1.tgz#6c3501dcc00c4c08915f292a600ece5ecfe1f409" - integrity sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw== +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.5.1" + "@babel/core" "^7.11.6" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" + convert-source-map "^2.0.0" + fast-json-stable-stringify "^2.1.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-regex-util "^27.5.1" - jest-util "^27.5.1" + jest-haste-map "^29.7.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" + write-file-atomic "^4.0.2" -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== dependencies: + "@jest/schemas" "^29.6.3" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" - "@types/yargs" "^16.0.0" + "@types/yargs" "^17.0.8" chalk "^4.0.0" "@jridgewell/gen-mapping@^0.3.5": @@ -1622,9 +1626,9 @@ integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== "@jridgewell/trace-mapping@0.3.9": version "0.3.9" @@ -1634,7 +1638,7 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -1696,9 +1700,9 @@ fastq "^1.6.0" "@nomicfoundation/hardhat-verify@^2.0.3": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.6.tgz#02623c431244c92a852c524008239fc616e1c658" - integrity sha512-oKUI5fl8QC8jysE2LUBHE6rObzEmccJcc4b43Ov7LFMlCBZJE27qoqGIsg/++wX7L8Jdga+bkejPxl8NvsecpQ== + version "2.0.9" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.9.tgz#98a1c9a3742b008be71a709d074f10dec23bc5f0" + integrity sha512-7kD8hu1+zlnX87gC+UN4S0HTKBnIsDfXZ/pproq1gYsK94hgCk+exvzXbwR0X2giiY/RZPkqY9oKRi0Uev91hQ== dependencies: "@ethersproject/abi" "^5.1.2" "@ethersproject/address" "^5.0.2" @@ -1711,9 +1715,9 @@ undici "^5.14.0" "@peculiar/asn1-schema@^2.3.8": - version "2.3.8" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz#04b38832a814e25731232dd5be883460a156da3b" - integrity sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA== + version "2.3.13" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz#ec8509cdcbc0da3abe73fd7e690556b57a61b8f4" + integrity sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g== dependencies: asn1js "^3.0.5" pvtsutils "^1.3.5" @@ -1727,15 +1731,15 @@ tslib "^2.0.0" "@peculiar/webcrypto@^1.0.22": - version "1.4.6" - resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.4.6.tgz#607af294c4f205efeeb172aa32cb20024fe4aecf" - integrity sha512-YBcMfqNSwn3SujUJvAaySy5tlYbYm6tVt9SKoXu8BaTdKGROiJDgPR3TXpZdAKUfklzm3lRapJEAltiMQtBgZg== + version "1.5.0" + resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz#9e57174c02c1291051c553600347e12b81469e10" + integrity sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg== dependencies: "@peculiar/asn1-schema" "^2.3.8" "@peculiar/json-schema" "^1.1.12" pvtsutils "^1.3.5" tslib "^2.6.2" - webcrypto-core "^1.7.9" + webcrypto-core "^1.8.0" "@pkgjs/parseargs@^0.11.0": version "0.11.0" @@ -1799,24 +1803,29 @@ resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + "@sindresorhus/is@^4.0.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== -"@sinonjs/commons@^1.7.0": - version "1.8.6" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9" - integrity sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ== +"@sinonjs/commons@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" + integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^8.0.1": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7" - integrity sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg== +"@sinonjs/fake-timers@^10.0.2": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== dependencies: - "@sinonjs/commons" "^1.7.0" + "@sinonjs/commons" "^3.0.0" "@sovpro/delimited-stream@^1.1.0": version "1.1.0" @@ -1926,11 +1935,6 @@ dependencies: defer-to-connect "^2.0.0" -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - "@tsconfig/node10@^1.0.7": version "1.0.11" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" @@ -1951,12 +1955,12 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== -"@tsoa/cli@^6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@tsoa/cli/-/cli-6.2.1.tgz#5deefe40fcf4d9b4ca2c04de2953edd5a2ca171a" - integrity sha512-SS28cvL2uurau2PZbBO8Ks6O9LF497iMlnUfMr7hffbgxh81SftfG+qvddeniNw0ttSB593Mljvv+fPabEbrfQ== +"@tsoa/cli@^6.4.0": + version "6.4.0" + resolved "https://registry.yarnpkg.com/@tsoa/cli/-/cli-6.4.0.tgz#292caca9af23acf7bf9f0e051a1516f97bfd0ce3" + integrity sha512-cuKqIAJ33enhXejMb04P2JF/SZdM3WLFE9Qg8s2dOVOrLbbZGK3H85YSORif0unxbre02psXuUyl3FwWBt0/pQ== dependencies: - "@tsoa/runtime" "^6.2.1" + "@tsoa/runtime" "^6.4.0" "@types/multer" "^1.4.11" fs-extra "^11.2.0" glob "^10.3.10" @@ -1969,10 +1973,10 @@ yaml "^2.4.1" yargs "^17.7.1" -"@tsoa/runtime@^6.0.0", "@tsoa/runtime@^6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@tsoa/runtime/-/runtime-6.2.1.tgz#b99c3e9a4267135b109c0d7095157a1342075ba2" - integrity sha512-YOA7ha6W6GQsSr3Pvb5omb5AwizvQd7GUu54Oi2TjNWYOzfczBROZonReMfKBiNULiZBDmEc5r1Hs+Kbbfjgyw== +"@tsoa/runtime@^6.0.0", "@tsoa/runtime@^6.4.0": + version "6.4.0" + resolved "https://registry.yarnpkg.com/@tsoa/runtime/-/runtime-6.4.0.tgz#9bad66ec812a8118b7376ebb6c6c9502fc5eff3c" + integrity sha512-oiVVK++Svo8KMRVTfOQxtepPQRCpPh8bCmPpmNFePGZYJAtZ8XX1cm8Zs/v87dZZmNEooU6egj1G40ive/9phw== dependencies: "@hapi/boom" "^10.0.1" "@hapi/hapi" "^21.3.3" @@ -1989,7 +1993,7 @@ dependencies: "@types/node" "*" -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": +"@types/babel__core@^7.1.14": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== @@ -2015,10 +2019,10 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.5.tgz#7b7502be0aa80cc4ef22978846b983edaafcd4dd" - integrity sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ== +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.20.6" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" + integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== dependencies: "@babel/types" "^7.20.7" @@ -2075,9 +2079,9 @@ "@types/node" "*" "@types/eslint@^8.40.2": - version "8.56.10" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.10.tgz#eb2370a73bf04a901eeba8f22595c7ee0f7eb58d" - integrity sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ== + version "8.56.11" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.11.tgz#e2ff61510a3b9454b3329fe7731e3b4c6f780041" + integrity sha512-sVBpJMf7UPo/wGecYOpk2aQya2VUGeHhe38WG7/mN5FufNSubf5VT9Uh9Uyp8/eLJpu1/tuhJ/qTo4mhSB4V4Q== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -2088,9 +2092,9 @@ integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== "@types/express-serve-static-core@^4.17.33": - version "4.19.0" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.0.tgz#3ae8ab3767d98d0b682cda063c3339e1e86ccfaa" - integrity sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ== + version "4.19.5" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz#218064e321126fcf9048d1ca25dd2465da55d9c6" + integrity sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg== dependencies: "@types/node" "*" "@types/qs" "*" @@ -2107,7 +2111,7 @@ "@types/qs" "*" "@types/serve-static" "*" -"@types/graceful-fs@^4.1.2": +"@types/graceful-fs@^4.1.3": version "4.1.9" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== @@ -2232,11 +2236,11 @@ form-data "^4.0.0" "@types/node@*": - version "20.12.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.11.tgz#c4ef00d3507000d17690643278a60dc55a9dc9be" - integrity sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw== + version "22.2.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.2.0.tgz#7cf046a99f0ba4d628ad3088cb21f790df9b0c5b" + integrity sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ== dependencies: - undici-types "~5.26.4" + undici-types "~6.13.0" "@types/node@18.15.13": version "18.15.13" @@ -2244,9 +2248,9 @@ integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== "@types/node@^18.18.8": - version "18.19.33" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.33.tgz#98cd286a1b8a5e11aa06623210240bcc28e95c48" - integrity sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A== + version "18.19.44" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.44.tgz#875a8322d17ff12bf82b3af8c07b9310a00e72f8" + integrity sha512-ZsbGerYg72WMXUIE9fYxtvfzLEuq6q8mKERdWFnqTmOvudMxnz+CBNRoOwJ2kNpFOncrKjT1hZwxjlFgQ9qvQA== dependencies: undici-types "~5.26.4" @@ -2255,11 +2259,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== -"@types/prettier@^2.1.5": - version "2.7.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" - integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== - "@types/qs@*": version "6.9.15" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.15.tgz#adde8a060ec9c305a82de1babc1056e73bd64dce" @@ -2336,13 +2335,14 @@ integrity sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ== "@types/superagent@*": - version "8.1.7" - resolved "https://registry.yarnpkg.com/@types/superagent/-/superagent-8.1.7.tgz#1153819ed4db34427409a1cc58f3e2f13eeec862" - integrity sha512-NmIsd0Yj4DDhftfWvvAku482PZum4DBW7U51OvS8gvOkDDY0WT1jsVyDV3hK+vplrsYw8oDwi9QxOM7U68iwww== + version "8.1.8" + resolved "https://registry.yarnpkg.com/@types/superagent/-/superagent-8.1.8.tgz#c1080987a3770f26707778caebb86da532d6a24a" + integrity sha512-nTqHJ2OTa7PFEpLahzSEEeFeqbMpmcN7OeayiOc7v+xk+/vyTKljRe+o4MPqSnPeRCMvtxuLG+5QqluUVQJOnA== dependencies: "@types/cookiejar" "^2.1.5" "@types/methods" "^1.1.4" "@types/node" "*" + form-data "^4.0.0" "@types/supertest@^2.0.12": version "2.0.16" @@ -2365,14 +2365,14 @@ integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== "@types/validator@^13.11.8": - version "13.11.9" - resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.11.9.tgz#adfe96520b437a0eaa798a475877bf2f75ee402d" - integrity sha512-FCTsikRozryfayPuiI46QzH3fnrOoctTjvOYZkho9BTFLCOZ2rgZJHMOVgCOfttjPJcgOx52EpkY0CMfy87MIw== + version "13.12.0" + resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.12.0.tgz#1fe4c3ae9de5cf5193ce64717c99ef2fa7d8756f" + integrity sha512-nH45Lk7oPIJ1RVOF6JgFI6Dy0QpHEzq4QecZhvguxYPDwT8c93prCMqAtiIttm39voZ+DDR+qkNnMpJmMBRqag== "@types/ws@^8.5.4": - version "8.5.10" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787" - integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A== + version "8.5.12" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.12.tgz#619475fe98f35ccca2a2f6c137702d85ec247b7e" + integrity sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ== dependencies: "@types/node" "*" @@ -2381,10 +2381,10 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== -"@types/yargs@^16.0.0": - version "16.0.9" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.9.tgz#ba506215e45f7707e6cbcaf386981155b7ab956e" - integrity sha512-tHhzvkFXZQeTECenFoRljLBYPZJ7jAVxqqtEI0qTLOmuultnFp4I9yKE17vTuhf7BkhCu7I4XuemPgikDVuYqA== +"@types/yargs@^17.0.8": + version "17.0.33" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" + integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== dependencies: "@types/yargs-parser" "*" @@ -2501,11 +2501,6 @@ resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== -abab@^2.0.3, abab@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" - integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== - abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -2526,38 +2521,27 @@ accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" -acorn-globals@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" - integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== - dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" - acorn-jsx@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - acorn-walk@^8.1.1: - version "8.3.2" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" - integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== + version "8.3.3" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" + integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + dependencies: + acorn "^8.11.0" -acorn@^7.1.1, acorn@^7.4.0: +acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.2.4, acorn@^8.4.1: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== +acorn@^8.11.0, acorn@^8.4.1: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== aes-js@3.0.0: version "3.0.0" @@ -2594,14 +2578,14 @@ ajv@^6.10.0, ajv@^6.12.4: uri-js "^4.2.2" ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.13.0.tgz#a3939eaec9fb80d217ddf0c3376948c023f28c91" - integrity sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA== + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.4.1" ansi-colors@^4.1.1: version "4.1.3" @@ -2797,6 +2781,11 @@ async-mutex@^0.4.0: dependencies: tslib "^2.4.0" +async@^3.2.3: + version "3.2.5" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" + integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -2815,9 +2804,9 @@ available-typed-arrays@^1.0.7: possible-typed-array-names "^1.0.0" axios@^1.4.0, axios@^1.6.3: - version "1.6.8" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66" - integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== + version "1.7.3" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.3.tgz#a1125f2faf702bc8e8f2104ec3a76fab40257d85" + integrity sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -2837,16 +2826,15 @@ b64u-lite@^1.0.1: dependencies: b64-lite "^1.4.0" -babel-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" - integrity sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg== +babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== dependencies: - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/transform" "^29.7.0" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^27.5.1" + babel-preset-jest "^29.6.3" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -2862,14 +2850,14 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz#9be98ecf28c331eb9f5df9c72d6f89deb8181c2e" - integrity sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ== +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" + "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" babel-preset-current-node-syntax@^1.0.0: @@ -2890,12 +2878,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz#91f10f58034cb7989cb4f962b69fa6eef6a6bc81" - integrity sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag== +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== dependencies: - babel-plugin-jest-hoist "^27.5.1" + babel-plugin-jest-hoist "^29.6.3" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -3008,32 +2996,27 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== +braces@^3.0.3, braces@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - fill-range "^7.0.1" + fill-range "^7.1.1" brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" - integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - -browserslist@^4.22.2: - version "4.23.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" - integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== +browserslist@^4.23.1: + version "4.23.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" + integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== dependencies: - caniuse-lite "^1.0.30001587" - electron-to-chromium "^1.4.668" - node-releases "^2.0.14" - update-browserslist-db "^1.0.13" + caniuse-lite "^1.0.30001646" + electron-to-chromium "^1.5.4" + node-releases "^2.0.18" + update-browserslist-db "^1.1.0" bs-logger@0.x: version "0.2.6" @@ -3121,10 +3104,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001587: - version "1.0.30001617" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001617.tgz#809bc25f3f5027ceb33142a7d6c40759d7a901eb" - integrity sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA== +caniuse-lite@^1.0.30001646: + version "1.0.30001651" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz#52de59529e8b02b1aedcaaf5c05d9e23c0c28138" + integrity sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg== canonicalize@^1.0.1: version "1.0.8" @@ -3147,7 +3130,7 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -3204,15 +3187,6 @@ class-validator@0.14.1: libphonenumber-js "^1.10.53" validator "^13.9.0" -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -3322,11 +3296,6 @@ content-type@~1.0.4, content-type@~1.0.5: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== -convert-source-map@^1.4.0, convert-source-map@^1.6.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - convert-source-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" @@ -3355,6 +3324,19 @@ cors@^2.8.5: object-assign "^4" vary "^1" +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -3386,23 +3368,6 @@ crypto-ld@^6.0.0: resolved "https://registry.yarnpkg.com/crypto-ld/-/crypto-ld-6.0.0.tgz#cf8dcf566cb3020bdb27f0279e6cc9b46d031cd7" integrity sha512-XWL1LslqggNoaCI/m3I7HcvaSt9b2tYzdrXO+jHLUj9G1BvRfvV7ZTFDVY5nifYuIGAPdAGu7unPxLRustw3VA== -cssom@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" - integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" - integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== - dependencies: - cssom "~0.3.6" - d@1, d@^1.0.1, d@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/d/-/d-1.0.2.tgz#2aefd554b81981e7dccf72d6842ae725cb17e5de" @@ -3421,15 +3386,6 @@ data-uri-to-buffer@^4.0.0: resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== -data-urls@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" - integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== - dependencies: - abab "^2.0.3" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" - data-view-buffer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" @@ -3465,9 +3421,9 @@ debug@2.6.9, debug@^2.2.0: ms "2.0.0" debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== dependencies: ms "2.1.2" @@ -3478,11 +3434,6 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" -decimal.js@^10.2.1: - version "10.4.3" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" - integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== - decode-uri-component@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" @@ -3495,10 +3446,10 @@ decompress-response@^6.0.0: dependencies: mimic-response "^3.1.0" -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +dedent@^1.0.0: + version "1.5.3" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" + integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.4" @@ -3581,6 +3532,11 @@ diff-sequences@^27.5.1: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -3607,12 +3563,10 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -domexception@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" - integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== - dependencies: - webidl-conversions "^5.0.0" +dotenv@^16.4.5: + version "16.4.5" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" + integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== dynamic-dedupe@^0.3.0: version "0.3.0" @@ -3648,10 +3602,17 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -electron-to-chromium@^1.4.668: - version "1.4.761" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.761.tgz#d1bdf8c50a254f8a756641bb1ac48bb52e4d0ec3" - integrity sha512-PIbxpiJGx6Bb8dQaonNc6CGTRlVntdLg/2nMa1YhnrwYOORY9a3ZgGN0UQYE6lAcj/lkyduJN7BPt/JiY+jAQQ== +ejs@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" + integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== + dependencies: + jake "^10.8.5" + +electron-to-chromium@^1.5.4: + version "1.5.6" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.6.tgz#c81d9938b5a877314ad370feb73b4e5409b36abd" + integrity sha512-jwXWsM5RPf6j9dPYzaorcBSUg6AiqocPEyMpkchkvntaH9HGfOOMZwxMJjDY/XEs3T5dM7uyH1VhRMkqUU9qVw== elliptic@6.5.4: version "6.5.4" @@ -3666,10 +3627,10 @@ elliptic@6.5.4: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -emittery@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" - integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== emoji-regex@^8.0.0: version "8.0.0" @@ -3694,9 +3655,9 @@ end-of-stream@^1.1.0: once "^1.4.0" enhanced-resolve@^5.12.0: - version "5.16.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz#e8bc63d51b826d6f1cbc0a150ecb5a8b0c62e567" - integrity sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw== + version "5.17.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -3876,17 +3837,6 @@ escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" -escodegen@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" - integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionalDependencies: - source-map "~0.6.1" - eslint-config-prettier@^8.8.0: version "8.10.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" @@ -4057,9 +4007,9 @@ esprima@^4.0.0, esprima@^4.0.1: integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -4127,9 +4077,9 @@ ethers@^5.1.0: "@ethersproject/wordlists" "5.7.0" ethers@^6.9.0: - version "6.12.1" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.12.1.tgz#517ff6d66d4fd5433e38e903051da3e57c87ff37" - integrity sha512-j6wcVoZf06nqEcBbDWkKg8Fp895SS96dSnTCjiXT+8vt2o02raTn4Lo9ERUuIVU5bAjoPYeA+7ytQFexFmLuVw== + version "6.13.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.2.tgz#4b67d4b49e69b59893931a032560999e5e4419fe" + integrity sha512-9VkriTTed+/27BGuY1s0hf441kqwHJ1wtN2edksEtiRvXx+soxRX3iSXTfFqq2+YwrOqbDoTHjIhQnjJRlzKmg== dependencies: "@adraffy/ens-normalize" "1.10.1" "@noble/curves" "1.2.0" @@ -4137,7 +4087,7 @@ ethers@^6.9.0: "@types/node" "18.15.13" aes-js "4.0.0-beta.5" tslib "2.4.0" - ws "8.5.0" + ws "8.17.1" event-emitter@^0.3.5: version "0.3.5" @@ -4172,15 +4122,16 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== -expect@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.5.1.tgz#83ce59f1e5bdf5f9d2b94b61d2050db48f3fef74" - integrity sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw== +expect@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== dependencies: - "@jest/types" "^27.5.1" - jest-get-type "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" + "@jest/expect-utils" "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" expo-modules-autolinking@^0.0.3: version "0.0.3" @@ -4201,14 +4152,15 @@ expo-random@*: base64-js "^1.3.0" express-rate-limit@^7.1.5: - version "7.2.0" - resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-7.2.0.tgz#06ce387dd5388f429cab8263c514fc07bf90a445" - integrity sha512-T7nul1t4TNyfZMJ7pKRKkdeVJWa2CqB8NA1P8BwYaoDI5QSBZARv5oMS43J7b7I5P+4asjVXjb7ONuwDKucahg== + version "7.4.0" + resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-7.4.0.tgz#5db412b8de83fa07ddb40f610c585ac8c1dab988" + integrity sha512-v1204w3cXu5gCDmAvgvzI6qjzZzoMWKnyVDk3ACgfswTQLYiGen+r8w0VnXnGMmzEN/g8fwIQ4JrFFd4ZP6ssg== express@^4.17.1, express@^4.18.1, express@^4.18.3: version "4.19.2" resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== + dependencies: accepts "~1.3.8" array-flatten "1.1.1" body-parser "1.20.2" @@ -4280,7 +4232,7 @@ fast-glob@^3.2.5, fast-glob@^3.2.9, fast-glob@^3.3.1: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -4300,6 +4252,11 @@ fast-text-encoding@^1.0.3: resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz#0aa25f7f638222e3396d72bf936afcf1d42d6867" integrity sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w== +fast-uri@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" + integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + fastq@^1.6.0: version "1.17.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" @@ -4341,10 +4298,17 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +filelist@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" + integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q== + dependencies: + minimatch "^5.0.1" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" @@ -4425,22 +4389,13 @@ for-each@^0.3.3: is-callable "^1.1.3" foreground-child@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" - integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + version "3.3.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" + integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== dependencies: cross-spawn "^7.0.0" signal-exit "^4.0.1" -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -4606,9 +4561,9 @@ get-symbol-from-current-process-h@^1.0.1, get-symbol-from-current-process-h@^1.0 integrity sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw== get-tsconfig@^4.5.0: - version "4.7.4" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.4.tgz#228e1a3e37125aeb4467e9b992b92c4533093bd2" - integrity sha512-ofbkKj+0pjXjhejr007J/fLf+sW+8H7K5GCm+msC8q3IpvgjobpyPqSRFemNyIMxklC0zeJpi7VDFna19FacvQ== + version "4.7.6" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.6.tgz#118fd5b7b9bae234cc7705a00cd771d7eb65d62a" + integrity sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA== dependencies: resolve-pkg-maps "^1.0.0" @@ -4627,17 +4582,18 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: is-glob "^4.0.1" glob@^10.3.10: - version "10.3.12" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.12.tgz#3a65c363c2e9998d220338e88a5f6ac97302960b" - integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== dependencies: foreground-child "^3.1.0" - jackspeak "^2.3.6" - minimatch "^9.0.1" - minipass "^7.0.4" - path-scurry "^1.10.2" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" -glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: +glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -4805,13 +4761,6 @@ hpagent@^0.1.2: resolved "https://registry.yarnpkg.com/hpagent/-/hpagent-0.1.2.tgz#cab39c66d4df2d4377dbd212295d878deb9bdaa9" integrity sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ== -html-encoding-sniffer@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" - integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== - dependencies: - whatwg-encoding "^1.0.5" - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -4833,15 +4782,6 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - http2-wrapper@^1.0.0-beta.5.2: version "1.0.3" resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" @@ -4881,9 +4821,9 @@ ignore@^4.0.6: integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== ignore@^5.2.0, ignore@^5.2.4: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" @@ -4894,9 +4834,9 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: resolve-from "^4.0.0" import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== dependencies: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" @@ -4981,11 +4921,11 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.13.1: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.0.tgz#71c72ec5442ace7e76b306e9d48db361f22699ea" + integrity sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA== dependencies: - hasown "^2.0.0" + hasown "^2.0.2" is-data-view@^1.0.1: version "1.0.1" @@ -5045,11 +4985,6 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -5091,11 +5026,6 @@ is-typed-array@^1.1.13: dependencies: which-typed-array "^1.1.14" -is-typedarray@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" @@ -5153,7 +5083,7 @@ istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: +istanbul-lib-instrument@^5.0.4: version "5.2.1" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== @@ -5164,6 +5094,17 @@ istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: istanbul-lib-coverage "^3.2.0" semver "^6.3.0" +istanbul-lib-instrument@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== + dependencies: + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + istanbul-lib-report@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" @@ -5190,94 +5131,102 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jackspeak@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" - integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: "@pkgjs/parseargs" "^0.11.0" -jest-changed-files@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5" - integrity sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw== +jake@^10.8.5: + version "10.9.2" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" + integrity sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA== dependencies: - "@jest/types" "^27.5.1" - execa "^5.0.0" - throat "^6.0.1" + async "^3.2.3" + chalk "^4.0.2" + filelist "^1.0.4" + minimatch "^3.1.2" -jest-circus@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.5.1.tgz#37a5a4459b7bf4406e53d637b49d22c65d125ecc" - integrity sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw== +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== dependencies: - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + execa "^5.0.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - dedent "^0.7.0" - expect "^27.5.1" + dedent "^1.0.0" is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + pretty-format "^29.7.0" + pure-rand "^6.0.0" slash "^3.0.0" stack-utils "^2.0.3" - throat "^6.0.1" -jest-cli@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.5.1.tgz#278794a6e6458ea8029547e6c6cbf673bd30b145" - integrity sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw== +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== dependencies: - "@jest/core" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" chalk "^4.0.0" + create-jest "^29.7.0" exit "^0.1.2" - graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - prompts "^2.0.1" - yargs "^16.2.0" - -jest-config@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.5.1.tgz#5c387de33dca3f99ad6357ddeccd91bf3a0e4a41" - integrity sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA== - dependencies: - "@babel/core" "^7.8.0" - "@jest/test-sequencer" "^27.5.1" - "@jest/types" "^27.5.1" - babel-jest "^27.5.1" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + yargs "^17.3.1" + +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== + dependencies: + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" - glob "^7.1.1" + glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-get-type "^27.5.1" - jest-jasmine2 "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runner "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^27.5.1" + pretty-format "^29.7.0" slash "^3.0.0" strip-json-comments "^3.1.1" @@ -5291,106 +5240,84 @@ jest-diff@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" -jest-docblock@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0" - integrity sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ== - dependencies: - detect-newline "^3.0.0" - -jest-each@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.5.1.tgz#5bc87016f45ed9507fed6e4702a5b468a5b2c44e" - integrity sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ== +jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== dependencies: - "@jest/types" "^27.5.1" chalk "^4.0.0" - jest-get-type "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-environment-jsdom@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz#ea9ccd1fc610209655a77898f86b2b559516a546" - integrity sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw== +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" - jsdom "^16.6.0" + detect-newline "^3.0.0" -jest-environment-node@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.5.1.tgz#dedc2cfe52fab6b8f5714b4808aefa85357a365e" - integrity sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw== +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" + chalk "^4.0.0" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" + +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" + jest-mock "^29.7.0" + jest-util "^29.7.0" jest-get-type@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== -jest-haste-map@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.5.1.tgz#9fd8bd7e7b4fa502d9c6164c5640512b4e811e7f" - integrity sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng== +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== + +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== dependencies: - "@jest/types" "^27.5.1" - "@types/graceful-fs" "^4.1.2" + "@jest/types" "^29.6.3" + "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" - jest-regex-util "^27.5.1" - jest-serializer "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + jest-worker "^29.7.0" micromatch "^4.0.4" - walker "^1.0.7" + walker "^1.0.8" optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#a037b0034ef49a9f3d71c4375a796f3b230d1ac4" - integrity sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ== +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== dependencies: - "@jest/environment" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.5.1" - is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - throat "^6.0.1" - -jest-leak-detector@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz#6ec9d54c3579dd6e3e66d70e3498adf80fde3fb8" - integrity sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ== - dependencies: - jest-get-type "^27.5.1" - pretty-format "^27.5.1" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: +jest-matcher-utils@^27.0.0: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== @@ -5400,214 +5327,216 @@ jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" -jest-message-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.5.1.tgz#bdda72806da10d9ed6425e12afff38cd1458b6cf" - integrity sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g== +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== + dependencies: + chalk "^4.0.0" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^27.5.1" + pretty-format "^29.7.0" slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" - integrity sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og== +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/node" "*" + jest-util "^29.7.0" jest-pnp-resolver@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== -jest-regex-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== -jest-resolve-dependencies@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz#d811ecc8305e731cc86dd79741ee98fed06f1da8" - integrity sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg== +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== dependencies: - "@jest/types" "^27.5.1" - jest-regex-util "^27.5.1" - jest-snapshot "^27.5.1" + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" -jest-resolve@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.5.1.tgz#a2f1c5a0796ec18fe9eb1536ac3814c23617b384" - integrity sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw== +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== dependencies: - "@jest/types" "^27.5.1" chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" + jest-haste-map "^29.7.0" jest-pnp-resolver "^1.2.2" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-util "^29.7.0" + jest-validate "^29.7.0" resolve "^1.20.0" - resolve.exports "^1.1.0" + resolve.exports "^2.0.0" slash "^3.0.0" -jest-runner@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.5.1.tgz#071b27c1fa30d90540805c5645a0ec167c7b62e5" - integrity sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ== - dependencies: - "@jest/console" "^27.5.1" - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== + dependencies: + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" - emittery "^0.8.1" + emittery "^0.13.1" graceful-fs "^4.2.9" - jest-docblock "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-haste-map "^27.5.1" - jest-leak-detector "^27.5.1" - jest-message-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runtime "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - source-map-support "^0.5.6" - throat "^6.0.1" - -jest-runtime@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.5.1.tgz#4896003d7a334f7e8e4a53ba93fb9bcd3db0a1af" - integrity sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/globals" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" - execa "^5.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" slash "^3.0.0" strip-bom "^4.0.0" -jest-serializer@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.5.1.tgz#81438410a30ea66fd57ff730835123dea1fb1f64" - integrity sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w== - dependencies: - "@types/node" "*" - graceful-fs "^4.2.9" - -jest-snapshot@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.5.1.tgz#b668d50d23d38054a51b42c4039cab59ae6eb6a1" - integrity sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA== +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== dependencies: - "@babel/core" "^7.7.2" + "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.5.1" + expect "^29.7.0" graceful-fs "^4.2.9" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - jest-haste-map "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-util "^27.5.1" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" natural-compare "^1.4.0" - pretty-format "^27.5.1" - semver "^7.3.2" + pretty-format "^29.7.0" + semver "^7.5.3" -jest-util@^27.0.0, jest-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== +jest-util@^29.0.0, jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067" - integrity sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ== +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^27.5.1" + jest-get-type "^29.6.3" leven "^3.1.0" - pretty-format "^27.5.1" + pretty-format "^29.7.0" -jest-watcher@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.5.1.tgz#71bd85fb9bde3a2c2ec4dc353437971c43c642a2" - integrity sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw== +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== dependencies: - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.5.1" + emittery "^0.13.1" + jest-util "^29.7.0" string-length "^4.0.1" -jest-worker@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== dependencies: "@types/node" "*" + jest-util "^29.7.0" merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^27.3.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc" - integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ== +jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== dependencies: - "@jest/core" "^27.5.1" + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" import-local "^3.0.2" - jest-cli "^27.5.1" + jest-cli "^29.7.0" joi@^17.12.3: - version "17.13.1" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.13.1.tgz#9c7b53dc3b44dd9ae200255cc3b398874918a6ca" - integrity sha512-vaBlIKCyo4FCUtCm7Eu4QZd/q02bWcxfUO6YSXAZOWF6gzcLBeba8kwotUdYJjDLW8Cz8RywsSOqiNJZW0mNvg== + version "17.13.3" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.13.3.tgz#0f5cc1169c999b30d344366d384b12d92558bcec" + integrity sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA== dependencies: "@hapi/hoek" "^9.3.0" "@hapi/topo" "^5.1.0" @@ -5638,39 +5567,6 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -jsdom@^16.6.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" - integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== - dependencies: - abab "^2.0.5" - acorn "^8.2.4" - acorn-globals "^6.0.0" - cssom "^0.4.4" - cssstyle "^2.3.0" - data-urls "^2.0.0" - decimal.js "^10.2.1" - domexception "^2.0.1" - escodegen "^2.0.0" - form-data "^3.0.0" - html-encoding-sniffer "^2.0.1" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.0" - parse5 "6.0.1" - saxes "^5.0.1" - symbol-tree "^3.2.4" - tough-cookie "^4.0.0" - w3c-hr-time "^1.0.2" - w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.1.0" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.5.0" - ws "^7.4.6" - xml-name-validator "^3.0.0" - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -5718,11 +5614,6 @@ json-text-sequence@~0.3.0: dependencies: "@sovpro/delimited-stream" "^1.1.0" -json5@2.x, json5@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - json5@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" @@ -5730,6 +5621,11 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -5745,12 +5641,13 @@ jsonify@^0.0.1: integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== jsonld-signatures@^11.0.0: - version "11.2.1" - resolved "https://registry.yarnpkg.com/jsonld-signatures/-/jsonld-signatures-11.2.1.tgz#e2ff23ac7476fcdb92e5fecd9a1734ceaf904bb0" - integrity sha512-RNaHTEeRrX0jWeidPCwxMq/E/Ze94zFyEZz/v267ObbCHQlXhPO7GtkY6N5PSHQfQhZPXa8NlMBg5LiDF4dNbA== + version "11.3.0" + resolved "https://registry.yarnpkg.com/jsonld-signatures/-/jsonld-signatures-11.3.0.tgz#cc833839c2ff7fd9f1ec651117521815b6ec29d0" + integrity sha512-+KaA2uWhnQ6eYDYqFoopYS8PcmbAdMuM0RFuycZw5Vh0gZiuMHt5/nCLh/p2x5blPGREntTHCQtI/1TtZ1+CUg== dependencies: "@digitalbazaar/security-context" "^1.0.0" jsonld "^8.0.0" + rdf-canonize "^4.0.1" serialize-error "^8.1.0" jsonld@^8.0.0: @@ -5895,9 +5792,9 @@ levn@~0.3.0: type-check "~0.3.2" libphonenumber-js@^1.10.53: - version "1.11.1" - resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.11.1.tgz#2596683e1876bfee74082bb49339fe0a85ae34f9" - integrity sha512-Wze1LPwcnzvcKGcRHFGFECTaLzxOtujwpf924difr5zniyYv1C2PiW0419qDR7m8lKDxsImu5mwxFuXhXpjmvw== + version "1.11.5" + resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.11.5.tgz#50a441da5ff9ed9a322d796a14f1e9cbc0fdabdf" + integrity sha512-TwHR5BZxGRODtAfz03szucAkjT5OArXr+94SMtAM2pYXIlQNVMrxvb6uSCbnaJJV6QXEyICk7+l6QPgn72WHhg== lines-and-columns@^1.1.6: version "1.2.4" @@ -5973,11 +5870,6 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash@^4.7.0: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -5991,9 +5883,9 @@ lowercase-keys@^2.0.0: integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== lru-cache@^10.2.0: - version "10.2.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" - integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== + version "10.4.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== lru-cache@^5.1.1: version "5.1.1" @@ -6015,9 +5907,9 @@ lru_map@^0.4.1: integrity sha512-I+lBvqMMFfqaV8CJCISjI3wbjmwVu/VyOoU7+qtu9d7ioW5klMgsTTiUOUp+DJvfTTzKXoPbyC6YfgkNcyPSOg== luxon@^3.3.0: - version "3.4.4" - resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.4.4.tgz#cf20dc27dc532ba41a169c43fdcc0063601577af" - integrity sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA== + version "3.5.0" + resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.5.0.tgz#6b6f65c5cd1d61d1fd19dbf07ee87a50bf4b8e20" + integrity sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ== make-dir@^3.1.0: version "3.1.0" @@ -6078,18 +5970,23 @@ methods@^1.1.2, methods@~1.1.2: integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== micromatch@^4.0.2, micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + version "4.0.7" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" + integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== dependencies: - braces "^3.0.2" + braces "^3.0.3" picomatch "^2.3.1" -mime-db@1.52.0, mime-db@^1.52.0: +mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== +mime-db@^1.52.0: + version "1.53.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.53.0.tgz#3cb63cd820fc29896d9d4e8c32ab4fcd74ccb447" + integrity sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg== + mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" @@ -6146,10 +6043,17 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^9.0.1: - version "9.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" - integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.1, minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== dependencies: brace-expansion "^2.0.1" @@ -6170,10 +6074,10 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4: - version "7.1.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.0.tgz#b545f84af94e567386770159302ca113469c80b8" - integrity sha512-oGZRv2OT1lO2UF1zUcwdTb3wqUwI0kBGTgt/T7OdSj6M6N5m3o5uPf0AIW6lVxGGoiWUR7e2AwTE+xiwK8WQig== +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== minizlib@^2.1.1: version "2.1.2" @@ -6308,10 +6212,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== nofilter@^3.1.0: version "3.1.0" @@ -6352,20 +6256,15 @@ npmlog@^5.0.1: gauge "^3.0.0" set-blocking "^2.0.0" -nwsapi@^2.2.0: - version "2.2.9" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.9.tgz#7f3303218372db2e9f27c27766bcfc59ae7e61c6" - integrity sha512-2f3F0SEEer8bBu0dsNCFF50N0cTThV1nWFYcEYFZttdW0lDAoybv9cQoK7X7/68Z89S7FoRrVjP1LPX4XRf9vg== - object-assign@^4, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== object-inspect@^1.10.3, object-inspect@^1.13.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" - integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== object-keys@^1.1.1: version "1.1.1" @@ -6480,7 +6379,7 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2: +p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -6506,6 +6405,11 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +package-json-from-dist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" + integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + pako@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" @@ -6528,11 +6432,6 @@ parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse5@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -6579,10 +6478,10 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7" - integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== dependencies: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -6602,10 +6501,10 @@ pend@~1.2.0: resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.0.0, picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" @@ -6665,6 +6564,15 @@ pretty-format@^27.0.0, pretty-format@^27.5.1: ansi-styles "^5.0.0" react-is "^17.0.1" +pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -6691,11 +6599,6 @@ proxy-from-env@^1.1.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== -psl@^1.1.33: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -6704,11 +6607,16 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -punycode@^2.1.0, punycode@^2.1.1: +punycode@^2.1.0: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== +pure-rand@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" + integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== + pvtsutils@^1.3.2, pvtsutils@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.5.tgz#b8705b437b7b134cd7fd858f025a23456f1ce910" @@ -6729,9 +6637,9 @@ qs@6.11.0: side-channel "^1.0.4" qs@^6.11.0: - version "6.12.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.1.tgz#39422111ca7cbdb70425541cba20c7d7b216599a" - integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== dependencies: side-channel "^1.0.6" @@ -6745,11 +6653,6 @@ query-string@^7.0.1: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -6782,11 +6685,23 @@ rdf-canonize@^3.4.0: dependencies: setimmediate "^1.0.5" +rdf-canonize@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/rdf-canonize/-/rdf-canonize-4.0.1.tgz#2b5a37f147d35b484b40ff2140245fc5985a9595" + integrity sha512-B5ynHt4sasbUafzrvYI2GFARgeFcD8Sx9yXPbg7gEyT2EH76rlCv84kyO6tnxzVbxUN/uJDbK1S/MXh+DsnuTA== + dependencies: + setimmediate "^1.0.5" + react-is@^17.0.1: version "17.0.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-is@^18.0.0: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== + react-native-securerandom@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/react-native-securerandom/-/react-native-securerandom-0.1.1.tgz#f130623a412c338b0afadedbc204c5cbb8bf2070" @@ -6860,11 +6775,6 @@ require-from-string@^2.0.2: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - resolve-alpn@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" @@ -6892,10 +6802,10 @@ resolve-pkg-maps@^1.0.0: resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== -resolve.exports@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" - integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== +resolve.exports@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== resolve@^1.0.0, resolve@^1.20.0, resolve@^1.22.4: version "1.22.8" @@ -6925,7 +6835,7 @@ rimraf@^2.6.1, rimraf@^2.6.3: dependencies: glob "^7.1.3" -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -6975,28 +6885,21 @@ safe-regex-test@^1.0.3: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -saxes@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" - integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== - dependencies: - xmlchars "^2.2.0" - scrypt-js@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== -semver@7.x, semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: - version "7.6.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.1.tgz#60bfe090bf907a25aa8119a72b9f90ef7ca281b2" - integrity sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA== - semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== +semver@^7.2.1, semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -7092,7 +6995,7 @@ side-channel@^1.0.4, side-channel@^1.0.6: get-intrinsic "^1.2.4" object-inspect "^1.13.1" -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: +signal-exit@^3.0.0, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -7126,7 +7029,15 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -source-map-support@^0.5.12, source-map-support@^0.5.21, source-map-support@^0.5.6: +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@^0.5.12, source-map-support@^0.5.21: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -7139,11 +7050,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: - version "0.7.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - split-on-first@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" @@ -7191,7 +7097,16 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -7262,7 +7177,14 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -7332,7 +7254,7 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^7.0.0, supports-color@^7.1.0: +supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== @@ -7346,23 +7268,15 @@ supports-color@^8.0.0: dependencies: has-flag "^4.0.0" -supports-hyperlinks@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" - integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== swagger-ui-dist@>=4.11.0: - version "5.17.7" - resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-5.17.7.tgz#64113eefe01b05d49845cf163793c94c5b71a303" - integrity sha512-hKnq2Dss6Nvqxzj+tToBz0IJvKXgp7FExxX0Zj0rMajXJp8CJ98yLAwbKwKu8rxQf+2iIDUTGir84SCA8AN+fQ== + version "5.17.14" + resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-5.17.14.tgz#e2c222e5bf9e15ccf80ec4bc08b4aaac09792fd6" + integrity sha512-CVbSfaLpstV65OnSjbXfVd6Sta3q3F7Cj/yYuvHMp1P90LztOLs6PfUnKEVAeiIVQt9u2SaPwv0LiH/OyMjHRw== swagger-ui-express@^4.4.0: version "4.6.3" @@ -7371,11 +7285,6 @@ swagger-ui-express@^4.4.0: dependencies: swagger-ui-dist ">=4.11.0" -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - table@^6.0.9, table@^6.8.0: version "6.8.2" resolved "https://registry.yarnpkg.com/table/-/table-6.8.2.tgz#c5504ccf201213fa227248bdc8c5569716ac6c58" @@ -7404,14 +7313,6 @@ tar@^6.1.11: mkdirp "^1.0.3" yallist "^4.0.0" -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" - integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -7426,11 +7327,6 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -throat@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe" - integrity sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ== - tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -7460,23 +7356,6 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== -tough-cookie@^4.0.0: - version "4.1.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" - integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.2.0" - url-parse "^1.5.3" - -tr46@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" - integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== - dependencies: - punycode "^2.1.1" - tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -7493,23 +7372,24 @@ ts-api-utils@^1.0.1: integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== ts-deepmerge@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/ts-deepmerge/-/ts-deepmerge-7.0.0.tgz#ee824dc177d452603348c7e6f3b90223434a6b44" - integrity sha512-WZ/iAJrKDhdINv1WG6KZIGHrZDar6VfhftG1QJFpVbOYZMYJLJOvZOo1amictRXVdBXZIgBHKswMTXzElngprA== + version "7.0.1" + resolved "https://registry.yarnpkg.com/ts-deepmerge/-/ts-deepmerge-7.0.1.tgz#4b3dceb5a9b4308b7279d738c8d29834fbd5856b" + integrity sha512-JBFCmNenZdUCc+TRNCtXVM6N8y/nDQHAcpj5BlwXG/gnogjam1NunulB9ia68mnqYI446giMfpqeBFFkOleh+g== -ts-jest@^27.0.7: - version "27.1.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.5.tgz#0ddf1b163fbaae3d5b7504a1e65c914a95cff297" - integrity sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA== +ts-jest@^29.1.2: + version "29.2.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.2.4.tgz#38ccf487407d7a63054a72689f6f99b075e296e5" + integrity sha512-3d6tgDyhCI29HlpwIq87sNuI+3Q6GLTTCeYRHCs7vDz+/3GCMwEtV9jezLyl4ZtnBgx00I7hm8PCP8cTksMGrw== dependencies: bs-logger "0.x" + ejs "^3.1.10" fast-json-stable-stringify "2.x" - jest-util "^27.0.0" - json5 "2.x" + jest-util "^29.0.0" + json5 "^2.2.3" lodash.memoize "4.x" make-error "1.x" - semver "7.x" - yargs-parser "20.x" + semver "^7.5.3" + yargs-parser "^21.0.1" ts-node-dev@^2.0.0: version "2.0.0" @@ -7577,9 +7457,9 @@ tslib@^1.9.3: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.6.1, tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== tslog@^3.3.3: version "3.3.4" @@ -7589,12 +7469,12 @@ tslog@^3.3.3: source-map-support "^0.5.21" tsoa@^6.0.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/tsoa/-/tsoa-6.2.1.tgz#f3dcfeb31835ea1f7f3018bcb46f2d675daf69ac" - integrity sha512-cK+Wmw99IdkVMuNPl8OM+SufIxvS1b5XY9mwjLrTJ4ytwiUkF1AOKvF6pX5k/xDnHXFLCrfHzbgaogj0JJO9EA== + version "6.4.0" + resolved "https://registry.yarnpkg.com/tsoa/-/tsoa-6.4.0.tgz#5bf1089efc173bc78b694d6a4d30a85c6469920d" + integrity sha512-bgNJrpkoTRjbFo/3S3fH+wh9mXTbTAJkzfUXgsAFZJNaDr1+tmiEaP3OO4AbjH0i1acKu9HTTmok3tWau4T83Q== dependencies: - "@tsoa/cli" "^6.2.1" - "@tsoa/runtime" "^6.2.1" + "@tsoa/cli" "^6.4.0" + "@tsoa/runtime" "^6.4.0" tsyringe@^4.6.0, tsyringe@^4.8.0: version "4.8.0" @@ -7641,9 +7521,9 @@ type-is@~1.6.18: mime-types "~2.1.24" type@^2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" - integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + version "2.7.3" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.3.tgz#436981652129285cc3ba94f392886c2637ea0486" + integrity sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ== typed-array-buffer@^1.0.2: version "1.0.2" @@ -7689,22 +7569,15 @@ typed-array-length@^1.0.6: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - typescript@^5.3.3: - version "5.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" - integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + version "5.5.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== uglify-js@^3.1.4: - version "3.17.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" - integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== + version "3.19.2" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.19.2.tgz#319ae26a5fbd18d03c7dc02496cfa1d6f1cd4307" + integrity sha512-S8KA6DDI47nQXJSi2ctQ629YzwOVs+bQML6DAtvy0wgNdpi+0ySpQK0g2pxBq2xfF2z3YCscu7NNA8nXT9PlIQ== uint8arrays@^3.1.1: version "3.1.1" @@ -7733,6 +7606,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.13.0.tgz#e3e79220ab8c81ed1496b5812471afd7cf075ea5" + integrity sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg== + undici@^5.14.0, undici@^5.21.2: version "5.28.4" resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068" @@ -7740,11 +7618,6 @@ undici@^5.14.0, undici@^5.21.2: dependencies: "@fastify/busboy" "^2.0.0" -universalify@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" - integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== - universalify@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" @@ -7755,29 +7628,21 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== -update-browserslist-db@^1.0.13: - version "1.0.15" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.15.tgz#60ed9f8cba4a728b7ecf7356f641a31e3a691d97" - integrity sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA== +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== dependencies: escalade "^3.1.2" - picocolors "^1.0.0" + picocolors "^1.0.1" -uri-js@^4.2.2, uri-js@^4.4.1: +uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" -url-parse@^1.5.3: - version "1.5.10" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -7808,14 +7673,14 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz#cdada8bec61e15865f05d097c5f4fd30e94dc128" integrity sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw== -v8-to-istanbul@^8.1.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz#77b752fd3975e31bbcef938f85e9bd1c7a8d60ed" - integrity sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w== +v8-to-istanbul@^9.0.1: + version "9.3.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== dependencies: + "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" + convert-source-map "^2.0.0" validator@^13.11.0, validator@^13.9.0: version "13.12.0" @@ -7832,21 +7697,7 @@ vary@^1, vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== -w3c-hr-time@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" - integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== - dependencies: - browser-process-hrtime "^1.0.0" - -w3c-xmlserializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" - integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== - dependencies: - xml-name-validator "^3.0.0" - -walker@^1.0.7: +walker@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== @@ -7866,10 +7717,10 @@ web-streams-polyfill@^3.0.3: resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== -webcrypto-core@^1.7.9: - version "1.7.9" - resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.7.9.tgz#a585f0032dbc88d202cff4f266cbef02ba48bd7a" - integrity sha512-FE+a4PPkOmBbgNDIyRmcHhgXn+2ClRl3JzJdDu/P4+B8y81LqKe6RAsI9b3lAOHe1T1BMkSjsRHTYRikImZnVA== +webcrypto-core@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.8.0.tgz#aaea17f3dd9c77c304e3c494eb27ca07cc72ca37" + integrity sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw== dependencies: "@peculiar/asn1-schema" "^2.3.8" "@peculiar/json-schema" "^1.1.12" @@ -7887,28 +7738,6 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -webidl-conversions@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" - integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== - -webidl-conversions@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" - integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== - -whatwg-encoding@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - -whatwg-mimetype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" - integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== - whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -7917,15 +7746,6 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" - integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== - dependencies: - lodash "^4.7.0" - tr46 "^2.1.0" - webidl-conversions "^6.1.0" - which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -7972,7 +7792,16 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -7995,45 +7824,28 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== +write-file-atomic@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== dependencies: imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" + signal-exit "^3.0.7" ws@7.4.6: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - -ws@^7.4.6: - version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== +ws@8.17.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== ws@^8.13.0: - version "8.17.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" - integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== - -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" - integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== xtend@^4.0.0: version "4.0.2" @@ -8061,33 +7873,15 @@ yaml@^1.10.0: integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yaml@^2.2.2, yaml@^2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.2.tgz#7a2b30f2243a5fc299e1f14ca58d475ed4bc5362" - integrity sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA== + version "2.5.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.0.tgz#c6165a721cf8000e91c36490a41d7be25176cf5d" + integrity sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw== -yargs-parser@20.x, yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-parser@^21.1.1: +yargs-parser@^21.0.1, yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - yargs@^17.3.1, yargs@^17.7.1: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"