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 a2f61844..020a0c5c 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", @@ -91,15 +93,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/samples/cliConfig.json b/samples/cliConfig.json index 59027773..eea039ff 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", @@ -25,10 +25,9 @@ ], "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/src/cli.ts b/src/cli.ts index 4b0dd997..54aa3358 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,162 +1,220 @@ -import type { InboundTransport, Transports, AriesRestConfig } from './cliAgent' +import type { AriesRestConfig } from './cliAgent' import yargs from 'yargs' import { runRestAgent } from './cliAgent' +import { IDLE_TIMEOUT, CONNECT_TIMEOUT, MAX_CONNECTIONS } from './utils/util' -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 +224,9 @@ export async function runCliServer() { type: parsed['wallet-type'], config: { host: parsed['wallet-url'], - connectTimeout: 10, - maxConnections: 1000, - idleTimeout: 30000, + connectTimeout: parsed['wallet-connect-timeout'] || CONNECT_TIMEOUT, + maxConnections: parsed['wallet-max-connections'] || MAX_CONNECTIONS, + idleTimeout: parsed['wallet-idle-timeout'] || IDLE_TIMEOUT, }, credentials: { account: parsed['wallet-account'], @@ -179,25 +237,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 233a770a..a9a34f29 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -52,9 +52,17 @@ 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' -import { BCOVRIN_TEST_GENESIS } from './utils/util' +import { + BCOVRIN_TEST_GENESIS, + DID_CONTRACT_ADDRESS, + FILE_SERVER_TOKEN, + RPC_URL, + SCHEMA_MANAGER_CONTRACT_ADDRESS, + SERVER_URL, +} from './utils/util' export type Transports = 'ws' | 'http' export type InboundTransport = { @@ -86,7 +94,6 @@ export interface AriesRestConfig { autoAcceptConnections?: boolean autoAcceptCredentials?: AutoAcceptCredential autoAcceptProofs?: AutoAcceptProof - useLegacyDidSovPrefix?: boolean logLevel?: LogLevel inboundTransports?: InboundTransport[] outboundTransports?: Transports[] @@ -99,6 +106,7 @@ export interface AriesRestConfig { rpcUrl?: string fileServerUrl?: string fileServerToken?: string + walletScheme?: AskarMultiWalletDatabaseScheme schemaFileServerURL?: string } @@ -113,7 +121,19 @@ export type RestMultiTenantAgentModules = Awaited> -const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) => { +// 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() @@ -123,7 +143,7 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) return { askar: new AskarModule({ ariesAskar, - multiWalletDatabaseScheme: AskarMultiWalletDatabaseScheme.ProfilePerWallet, + multiWalletDatabaseScheme: walletScheme || AskarMultiWalletDatabaseScheme.ProfilePerWallet, }), indyVdr: new IndyVdrModule({ @@ -142,10 +162,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, @@ -156,7 +176,7 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) ], }), credentials: new CredentialsModule({ - autoAcceptCredentials: AutoAcceptCredential.Always, + autoAcceptCredentials: autoAcceptCredentials || AutoAcceptCredential.Always, credentialProtocols: [ new V1CredentialProtocol({ indyCredentialFormat: legacyIndyCredentialFormat, @@ -177,18 +197,40 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) questionAnswer: new QuestionAnswerModule(), polygon: new PolygonModule({ - didContractAddress: '0x1adeA199dCf07E17232415Cb232442BE52517Add', - schemaManagerContractAddress: '0x289c7Bd4C7d38cC54bff370d6f9f01b74Df51b11', - fileServerToken: - 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBeWFuV29ya3MiLCJpZCI6ImNhZDI3ZjhjLTMyNWYtNDRmZC04ZmZkLWExNGNhZTY3NTMyMSJ9.I3IR7abjWbfStnxzn1BhxhV0OEzt1x3mULjDdUcgWHk', - rpcUrl: 'https://rpc-amoy.polygon.technology', - serverUrl: 'https://schema.credebl.id', + didContractAddress: didRegistryContractAddress ? didRegistryContractAddress : (DID_CONTRACT_ADDRESS as string), + schemaManagerContractAddress: schemaManagerContractAddress || (SCHEMA_MANAGER_CONTRACT_ADDRESS as string), + fileServerToken: fileServerToken ? fileServerToken : (FILE_SERVER_TOKEN as string), + rpcUrl: rpcUrl ? rpcUrl : (RPC_URL as string), + serverUrl: fileServerUrl ? fileServerUrl : (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: Infinity, @@ -224,7 +266,16 @@ export async function runRestAgent(restConfig: AriesRestConfig) { outboundTransports = [], webhookUrl, adminPort, + didRegistryContractAddress, + fileServerToken, + fileServerUrl, + rpcUrl, + schemaManagerContractAddress, walletConfig, + autoAcceptConnections, + autoAcceptCredentials, + autoAcceptProofs, + walletScheme, ...afjConfig } = restConfig @@ -263,16 +314,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, } } } @@ -292,15 +343,37 @@ export async function runRestAgent(restConfig: AriesRestConfig) { networkConfig = [ { genesisTransactions: BCOVRIN_TEST_GENESIS, - 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: { @@ -357,6 +430,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..f7068dfa 100644 --- a/src/controllers/credentials/CredentialController.ts +++ b/src/controllers/credentials/CredentialController.ts @@ -1,18 +1,10 @@ import type { RestAgentModules } from '../../cliAgent' import type { CredentialExchangeRecordProps, CredentialProtocolVersionType, Routing } from '@credo-ts/core' -import { LegacyIndyCredentialFormatService, V1CredentialProtocol } from '@credo-ts/anoncreds' -import { - CredentialRepository, - CredentialState, - Agent, - RecordNotFoundError, - W3cCredentialService, - Key, - KeyType, -} from '@credo-ts/core' +import { CredentialState, Agent, W3cCredentialService, Key, KeyType, CredentialRole } 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 +15,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 +28,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 +42,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 +97,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 +115,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 +134,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,28 +153,17 @@ 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 routing: Routing const linkSecretIds = await this.agent.modules.anoncreds.getLinkSecretIds() @@ -246,7 +206,7 @@ export class CredentialController extends Controller { recipientKey: outOfBandOption?.recipientKey ? {} : { recipientKey: routing.recipientKey.publicKeyBase58 }, } } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -260,30 +220,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 +243,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 +261,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 dd883633..577bd1d8 100644 --- a/src/controllers/did/DidController.ts +++ b/src/controllers/did/DidController.ts @@ -14,11 +14,13 @@ import axios from 'axios' import { injectable } from 'tsyringe' import { DidMethod, Network, Role } from '../../enums/enum' +import ErrorHandlingService from '../../errorHandlingService' +import { BadRequestError, InternalServerError } from '../../errors' import { BCOVRIN_REGISTER_URL, INDICIO_NYM_URL } from '../../utils/util' -import { Did, DidRecordExample } from '../examples' +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') @@ -40,17 +42,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) + } } /** @@ -60,16 +65,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 @@ -91,33 +94,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()) { @@ -137,7 +140,7 @@ export class DidController extends Controller { break default: - throw new Error(`Network does not exists`) + throw new BadRequestError(`Network does not exists`) } return result } @@ -145,7 +148,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) { @@ -236,7 +239,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 @@ -255,7 +258,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), @@ -279,7 +282,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 } @@ -303,13 +306,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) { @@ -349,19 +352,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 @@ -399,12 +402,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({ @@ -420,12 +429,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 f02568ed..d2271405 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -24,12 +24,10 @@ import { getUnqualifiedCredentialDefinitionId, parseIndyCredentialDefinitionId, parseIndySchemaId, - AnonCredsError, } from '@credo-ts/anoncreds' import { AcceptCredentialOfferOptions, Agent, - CredoError, ConnectionRepository, CredentialRepository, CredentialState, @@ -51,7 +49,16 @@ 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 { 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 { BCOVRIN_REGISTER_URL, INDICIO_NYM_URL } from '../../utils/util' import { SchemaId, CredentialDefinitionId, RecordId, ProofRecordExample, ConnectionRecordExample } from '../examples' import { @@ -66,6 +73,7 @@ import { WriteTransaction, CreateProofRequestOobOptions, CreateOfferOobOptions, + CreateSchemaInput, } from '../types' import { @@ -82,6 +90,7 @@ import { Path, Example, Security, + Response, } from 'tsoa' @Tags('MultiTenancy') @@ -98,34 +107,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) { @@ -155,65 +149,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 @@ -224,40 +206,41 @@ 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 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 +256,7 @@ export class MultiTenancyController extends Controller { } } } else { - if (!createDidOptions.endorserDid) { + if (!endorserDid) { throw Error('endorserDid or role is required') } @@ -281,7 +264,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 +277,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 +311,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,22 +325,22 @@ 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), } } 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}`, @@ -387,26 +372,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, @@ -414,7 +400,7 @@ export class MultiTenancyController extends Controller { keyType: KeyType.Ed25519, }, secret: { - privateKey: TypedArrayEncoder.fromString(createDidOptions.seed), + privateKey: TypedArrayEncoder.fromString(seed), }, }) did = `${didKeyResponse.didState.did}` @@ -477,40 +463,41 @@ 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) .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 })) @@ -577,10 +564,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) => { @@ -588,17 +572,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) => { @@ -619,7 +599,7 @@ export class MultiTenancyController extends Controller { return didCreateSubmitResult } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -627,9 +607,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 { @@ -642,42 +620,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 ) { @@ -705,6 +673,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 }) @@ -721,14 +693,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 @@ -763,7 +734,7 @@ export class MultiTenancyController extends Controller { return getInvitation } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -771,8 +742,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 { @@ -788,7 +758,7 @@ export class MultiTenancyController extends Controller { return receiveInvitationRes } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -796,8 +766,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 { @@ -812,20 +781,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) => { @@ -839,7 +803,7 @@ export class MultiTenancyController extends Controller { return outOfBandRecordsRes } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -847,7 +811,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, @@ -862,7 +825,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, @@ -870,115 +832,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) } } @@ -991,13 +940,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) => { @@ -1007,15 +955,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, @@ -1026,7 +983,7 @@ export class MultiTenancyController extends Controller { return schemaPayload } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1035,28 +992,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) } } @@ -1064,8 +1013,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 ) { @@ -1088,14 +1035,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) } } @@ -1190,45 +1130,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: { @@ -1238,74 +1165,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 + } + + 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 + ) - return internalServerError(500, { message: `something went wrong: ${error}` }) + 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) } } @@ -1313,42 +1246,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 + + 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 internalServerError(500, { message: `something went wrong: ${error}` }) + 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) => { @@ -1362,17 +1289,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 { @@ -1431,20 +1354,19 @@ export class MultiTenancyController extends Controller { }), outOfBandRecord: outOfBandRecord.toJSON(), outOfBandRecordId: outOfBandRecord.id, + credentialRequestThId: offerOob.credentialRecord.threadId, invitationDid: createOfferOptions?.invitationDid ? '' : invitationDid, } }) 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 ) { @@ -1465,13 +1387,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) } } @@ -1479,9 +1395,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 { @@ -1492,13 +1406,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) } } @@ -1511,39 +1419,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) => { @@ -1551,25 +1462,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) => { @@ -1588,7 +1488,7 @@ export class MultiTenancyController extends Controller { return proof } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1596,8 +1496,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 { @@ -1664,7 +1563,7 @@ export class MultiTenancyController extends Controller { return oobProofRecord } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -1675,13 +1574,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 { @@ -1689,65 +1587,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) => { @@ -1756,43 +1629,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) => { @@ -1800,7 +1654,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') @@ -1834,26 +1691,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, @@ -1865,9 +1717,7 @@ export class MultiTenancyController extends Controller { }) return didCreateResponse } catch (error) { - return internalServerError(500, { - message: `something went wrong: ${error}`, - }) + throw ErrorHandlingService.handle(error) } } @@ -1890,16 +1740,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) + } } /** @@ -1915,13 +1769,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 @@ -1934,13 +1787,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) } } @@ -1956,9 +1805,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 @@ -1968,10 +1815,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) } } @@ -1984,23 +1828,19 @@ 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 - }) - - if (!questionAnswerRecord) { - return notFoundError(404, { - reason: `Question Answer Record with id "${id}" not found.`, + 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) } - - return questionAnswerRecord } } 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..46d259fc 100644 --- a/src/controllers/proofs/ProofController.ts +++ b/src/controllers/proofs/ProofController.ts @@ -5,9 +5,10 @@ import type { Routing, } from '@credo-ts/core' -import { Agent, Key, KeyType, RecordNotFoundError } from '@credo-ts/core' +import { Agent, Key, KeyType } from '@credo-ts/core' import { injectable } from 'tsyringe' +import ErrorHandlingService from '../../errorHandlingService' import { ProofRecordExample, RecordId } from '../examples' import { AcceptProofProposal, @@ -16,7 +17,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 +39,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 +58,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 +77,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 +91,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 +105,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,15 +136,16 @@ 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) { @@ -209,7 +187,7 @@ export class ProofController extends Controller { recipientKey: createRequestOptions?.recipientKey ? {} : { recipientKey: routing.recipientKey.publicKeyBase58 }, } } catch (error) { - return internalServerError(500, { message: `something went wrong: ${error}` }) + throw ErrorHandlingService.handle(error) } } @@ -230,9 +208,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 +225,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 +238,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/ReuseConnectionEvents.ts b/src/events/ReuseConnectionEvents.ts new file mode 100644 index 00000000..2bebbc19 --- /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 = { + connectionRecord: 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..b38556ea 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":{}}, @@ -147,7 +152,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 "KeyType": { "dataType": "refEnum", - "enums": ["ed25519","bls12381g1g2","bls12381g1","bls12381g2","x25519","p256","p384","p521","k256"], + "enums": ["ed25519","bls12381g1g2","bls12381g1","bls12381g2","x25519","p256","p384","p521","k256","secp256k1"], }, // 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 "Key": { @@ -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,62 @@ 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 + "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 +754,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 +785,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 +1062,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 +1086,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 +1118,7 @@ const models: TsoaRoute.Models = { "AcceptCredential": { "dataType": "refObject", "properties": { - "credentialRecord": {"ref":"CredentialExchangeRecord","required":true}, + "credentialRecordId": {"ref":"RecordId","required":true}, }, "additionalProperties": false, }, @@ -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 @@ -2869,8 +3163,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 +3200,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 +3237,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 +3315,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 +3353,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 +3390,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 @@ -3141,8 +3426,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 +3462,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 +3497,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 +3570,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 +3605,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 +3640,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 +3676,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 +3713,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 +3749,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 +3784,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 +3896,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 +3932,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 +3967,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 +4004,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 +4040,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 +4075,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 +4111,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 +4147,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 +4225,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 +4261,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 +4297,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 +4333,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 +4368,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 +4441,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 +4586,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 +4623,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 +4659,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..5ac2eceb 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" }, @@ -313,7 +316,8 @@ "p256", "p384", "p521", - "k256" + "k256", + "secp256k1" ], "type": "string" }, @@ -583,10 +587,10 @@ }, "Pick_CreateLegacyInvitationConfig.Exclude_keyofCreateLegacyInvitationConfig.routing__": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -606,6 +610,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 +629,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 +700,7 @@ }, "handshake_protocols": { "items": { - "$ref": "#/components/schemas/HandshakeProtocol" + "$ref": "#/components/schemas/CustomHandshakeProtocol" }, "type": "array" }, @@ -717,10 +731,10 @@ }, "Pick_ReceiveOutOfBandInvitationConfig.Exclude_keyofReceiveOutOfBandInvitationConfig.routing__": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -752,10 +766,10 @@ }, "ReceiveInvitationProps": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -789,10 +803,10 @@ }, "ReceiveInvitationByUrlProps": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -848,6 +862,9 @@ "type": "object", "additionalProperties": false }, + "TenantRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "Pick_TenantConfig.Exclude_keyofTenantConfig.walletConfig__": { "properties": { "label": { @@ -871,21 +888,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 +989,10 @@ }, "Pick_CreateOutOfBandInvitationConfig.Exclude_keyofCreateOutOfBandInvitationConfig.routing__": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -1043,10 +1045,10 @@ }, "Pick_CreateOutOfBandInvitationConfig.Exclude_keyofCreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages__": { "properties": { - "label": { + "alias": { "type": "string" }, - "alias": { + "label": { "type": "string" }, "imageUrl": { @@ -1104,6 +1106,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 +1235,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 +1421,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 +1614,766 @@ "type": "object", "description": "Construct a type with a set of properties K of type T" }, - "DidResolutionMetadata": { + "DidRegistrationSecretOptions": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "DidOperationStateWait": { "properties": { - "contentType": { - "type": "string" - }, - "error": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "invalidDid", - "notFound", - "representationNotSupported", - "unsupportedDidMethod" - ] - } - ] + "state": { + "type": "string", + "enum": [ + "wait" + ], + "nullable": false }, - "message": { + "did": { "type": "string" }, - "servedFromCache": { - "type": "boolean" + "secret": { + "$ref": "#/components/schemas/DidRegistrationSecretOptions" + }, + "didDocument": { + "$ref": "#/components/schemas/DidDocument" } }, + "required": [ + "state" + ], "type": "object", "additionalProperties": false }, - "DIDDocumentMetadata": { - "description": "Represents metadata about the DID document resulting from a {@link Resolvable.resolve} operation.", + "DidOperationStateActionBase": { "properties": { - "created": { - "type": "string" + "state": { + "type": "string", + "enum": [ + "action" + ], + "nullable": false }, - "updated": { + "action": { "type": "string" }, - "deactivated": { - "type": "boolean" - }, - "versionId": { + "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": { + "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" + }, + "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 + }, + "action": { + "type": "string" + }, + "credentialDefinitionId": { + "type": "string" + }, + "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 + }, + "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": "ea4e5e69-fc04-465a-90d2-9f8ff78aa71d" + }, + "CredentialRole": { + "enum": [ + "issuer", + "holder" + ], + "type": "string" + }, + "W3cCredentialRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "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" }, - "equivalentId": { + "schemaId": { "type": "string" }, - "canonicalId": { + "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 }, - "Did": { - "type": "string", - "example": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" - }, - "W3cCredentialRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "ConnectionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" + "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 +2382,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 +2466,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 +2512,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 +2557,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 @@ -1854,7 +2624,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 +2694,9 @@ "description": "ProofRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -1939,42 +2711,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 +2742,9 @@ "description": "ProofRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/ProofExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -2017,43 +2755,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" + } } } } @@ -2089,7 +2791,9 @@ "description": "ProofRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/ProofExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -2104,42 +2808,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 +2840,9 @@ "description": "Ok", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/ProofExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -2187,44 +2857,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 +2887,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,7 +2976,9 @@ "description": "ProofRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -2321,42 +2993,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 request as prover by sending an accept request message\nto the connection associated with the proof record.", @@ -2409,7 +3045,9 @@ "description": "ProofRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/ProofExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -2424,42 +3062,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 +3090,7 @@ "operationId": "ProofFormData", "responses": { "200": { - "description": "Ok", + "description": "ProofRecord", "content": { "application/json": { "schema": {}, @@ -2506,44 +3108,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" ], @@ -2566,46 +3133,28 @@ }, "/polygon/create-keys": { "post": { - "operationId": "CreateKeyPair", - "responses": { - "200": { - "description": "Secp256k1KeyPair", - "content": { - "application/json": { - "schema": { - "properties": { - "address": { - "type": "string" - }, - "publicKeyBase58": { - "type": "string" - }, - "privateKey": { - "type": "string" - } - }, - "required": [ - "address", - "publicKeyBase58", - "privateKey" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", + "operationId": "CreateKeyPair", + "responses": { + "200": { + "description": "Secp256k1KeyPair", "content": { "application/json": { "schema": { "properties": { - "message": { + "address": { + "type": "string" + }, + "publicKeyBase58": { + "type": "string" + }, + "privateKey": { "type": "string" } }, "required": [ - "message" + "address", + "publicKeyBase58", + "privateKey" ], "type": "object" } @@ -2636,42 +3185,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 +3238,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 +3281,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 +3404,9 @@ "description": "OutOfBandRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -3008,24 +3451,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } } }, "description": "Retrieve an out of band record by id", @@ -3051,49 +3476,8 @@ "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" - } - } - } + "204": { + "description": "No content" } }, "description": "Deletes an out of band record from the repository.", @@ -3126,7 +3510,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 +3604,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 +3645,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": { @@ -3320,29 +3729,11 @@ }, "metadata": {}, "id": "42a95528-0e30-4f86-a462-0efb02178b53", - "createdAt": "2022-01-01T00:00:00.000Z", - "reusable": false - } - } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" + "createdAt": "2022-01-01T00:00:00.000Z", + "reusable": false + } + } + } } } } @@ -3385,55 +3776,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 +3860,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 +3936,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 +3968,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 +4044,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 +4076,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 +4152,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.", @@ -3848,44 +4191,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/TenantRecord" } } } @@ -3923,42 +4232,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": [ @@ -3990,34 +4263,16 @@ } } } - }, - "/multi-tenancy/dids/{tenantId}": { - "get": { - "operationId": "GetDids", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } + }, + "/multi-tenancy/dids/{tenantId}": { + "get": { + "operationId": "GetDids", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} } } } @@ -4053,24 +4308,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4109,42 +4346,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 +4421,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4266,24 +4457,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 +4534,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4407,24 +4584,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4468,24 +4627,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4529,24 +4670,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4588,24 +4711,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4687,24 +4792,6 @@ "schema": {} } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4742,42 +4829,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": [ @@ -4802,37 +4853,8 @@ "required": true, "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" + "schema": { + "$ref": "#/components/schemas/CreateSchemaInput" } } } @@ -4852,24 +4874,6 @@ } } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -4931,60 +4935,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 +4984,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 +5027,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 +5069,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": [ @@ -5320,65 +5129,11 @@ "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" - } - } - } - }, - "500": { - "description": "", + "200": { + "description": "Ok", "content": { "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } + "schema": {} } } } @@ -6322,44 +6077,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 +6117,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -6457,24 +6160,6 @@ "schema": {} } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, "tags": [ @@ -6594,42 +6279,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 +6351,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", @@ -6792,24 +6405,6 @@ "schema": {} } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } } }, "description": "Retrieve question answer record by id", @@ -6849,42 +6444,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 +6486,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_" } } } @@ -6961,55 +6512,19 @@ "$ref": "#/components/schemas/DidNymTransaction" } } - } - } - } - }, - "/transactions/write": { - "post": { - "operationId": "WriteSchemaAndCredDefOnLedger", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, - "500": { - "description": "", + } + } + } + }, + "/transactions/write": { + "post": { + "operationId": "WriteSchemaAndCredDefOnLedger", + "responses": { + "200": { + "description": "Ok", "content": { "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } + "schema": {} } } } @@ -7044,37 +6559,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 +6657,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 +6715,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" } } } @@ -7248,10 +6743,12 @@ "operationId": "GetSchemaById", "responses": { "200": { - "description": "Schema", + "description": "get schema by Id", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/GetSchemaReturn" + }, "examples": { "Example 1": { "value": { @@ -7268,81 +6765,9 @@ } } } - }, - "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" - } - } - } } }, - "description": "Retrieve schema by schema id", + "description": "Get schema by schemaId", "tags": [ "Schemas" ], @@ -7357,7 +6782,7 @@ "name": "schemaId", "required": true, "schema": { - "$ref": "#/components/schemas/SchemaId" + "type": "string" } } ] @@ -7368,109 +6793,56 @@ "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" - ], - "security": [ - { - "apiKey": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "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" + "Schemas" + ], + "security": [ + { + "apiKey": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSchemaInput" } } } @@ -7485,7 +6857,9 @@ "description": "CredDef", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/GetCredentialDefinitionReturn" + }, "examples": { "Example 1": { "value": { @@ -7524,60 +6898,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 +6929,16 @@ "description": "CredDef", "content": { "application/json": { - "schema": {}, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/RegisterCredentialDefinitionReturn" + }, + { + "$ref": "#/components/schemas/RegisterCredentialDefinitionReturnStateFinished" + } + ] + }, "examples": { "Example 1": { "value": { @@ -7649,41 +6978,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 +7085,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 +7101,7 @@ "name": "connectionId", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/RecordId" } }, { @@ -7807,6 +7111,14 @@ "schema": { "$ref": "#/components/schemas/CredentialState" } + }, + { + "in": "query", + "name": "role", + "required": false, + "schema": { + "$ref": "#/components/schemas/CredentialRole" + } } ] } @@ -7883,7 +7195,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -7910,42 +7224,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 credential exchange record by credential record id", @@ -7977,7 +7255,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8004,42 +7284,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 +7316,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8080,58 +7326,22 @@ "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" + }, + "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" + } } } } @@ -8167,7 +7377,9 @@ "description": "AgentMessage, CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8194,24 +7406,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 +7436,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 +7512,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8323,42 +7541,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 +7573,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8418,42 +7602,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 +7634,9 @@ "description": "CredentialExchangeRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + }, "examples": { "Example 1": { "value": { @@ -8513,42 +7663,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 +7695,12 @@ "description": "ConnectionRecord[]", "content": { "application/json": { - "schema": {}, + "schema": { + "items": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "type": "array" + }, "examples": { "Example 1": { "value": [ @@ -8681,7 +7800,9 @@ "description": "ConnectionRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -8703,24 +7824,6 @@ } } } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } } }, "description": "Retrieve connection record by connection id", @@ -8738,59 +7841,18 @@ "in": "path", "name": "connectionId", "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - }, - "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" - } - } + "schema": { + "$ref": "#/components/schemas/RecordId" } } + ] + }, + "delete": { + "operationId": "DeleteConnection", + "responses": { + "204": { + "description": "No content" + } }, "description": "Deletes a connection record from the connection repository.", "tags": [ @@ -8822,7 +7884,9 @@ "description": "ConnectionRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -8844,42 +7908,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 +7940,9 @@ "description": "ConnectionRecord", "content": { "application/json": { - "schema": {}, + "schema": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, "examples": { "Example 1": { "value": { @@ -8934,42 +7964,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 +7994,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 +8081,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 +8254,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 +8322,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 +8369,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 56f4c943..427d76d2 100644 --- a/src/server.ts +++ b/src/server.ts @@ -12,16 +12,18 @@ 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 { maxRateLimit, windowMs } from './utils/util' -import { ValidateError, type Exception } from 'tsoa' +import { ValidateError } from 'tsoa' export const setupServer = async (agent: Agent, config: ServerConfig, apiKey?: string) => { container.registerInstance(Agent, agent) @@ -35,6 +37,7 @@ 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 @@ -59,10 +62,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') @@ -71,6 +71,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) @@ -78,30 +82,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/src/utils/util.ts b/src/utils/util.ts index 43b71461..7051fcc5 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -160,4 +160,12 @@ export const maxRateLimit = 800 export const DID_CONTRACT_ADDRESS = '0x12513116875BB3E4F098Ce74624739Ee51bAf023' export const SCHEMA_MANAGER_CONTRACT_ADDRESS = '0x552992e9f14b15bBd76488cD4c38c89B80259f37' -export const RPC_URL = 'https://rpc-mumbai.maticvigil.com' +export const FILE_SERVER_TOKEN = + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBeWFuV29ya3MiLCJpZCI6ImNhZDI3ZjhjLTMyNWYtNDRmZC04ZmZkLWExNGNhZTY3NTMyMSJ9.I3IR7abjWbfStnxzn1BhxhV0OEzt1x3mULjDdUcgWHk' +export const RPC_URL = 'https://polygon-mumbai.infura.io/v3/0579d305568d404e996e49695e9272a3' +export const SERVER_URL = 'https://schema.credebl.id' + +export const CONNECT_TIMEOUT = 10 +export const MAX_CONNECTIONS = 1000 +export const IDLE_TIMEOUT = 30000 +export const LOG_LEVEL = 2 diff --git a/taskdef/credo-ecs-taskdef.json b/taskdef/credo-ecs-taskdef.json new file mode 100644 index 00000000..5f1a6816 --- /dev/null +++ b/taskdef/credo-ecs-taskdef.json @@ -0,0 +1,66 @@ +{ + "family": "DEV_AGENT_SPINUP_TASKDEF", + "containerDefinitions": [ + { + "name": "e7cc1515-a197-4580-9e63-dda70c9c7f08-Platform-admin-service-ODg2YmE4ZDU3", + "image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%", + "cpu": 154, + "memory": 307, + "portMappings": [ + { + "containerPort": 8004, + "hostPort": 8004, + "protocol": "tcp" + }, + { + "containerPort": 9004, + "hostPort": 9004, + "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": "/home/ec2-user/config/e7cc1515-a197-4580-9e63-dda70c9c7f08_Platform-admin.json" + } + } + ] +} diff --git a/taskdef/credo-taskdef.json b/taskdef/credo-taskdef.json new file mode 100644 index 00000000..1d512735 --- /dev/null +++ b/taskdef/credo-taskdef.json @@ -0,0 +1,83 @@ +{ + "family": "AGENT_Platform-admin_TASKDEFIITION", + "containerDefinitions": [ + { + "name": "Platform-admin", + "image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%", + "cpu": 256, + "memory": 512, + "portMappings": [ + { + "containerPort": 8004, + "hostPort": 8004, + "protocol": "tcp" + }, + { + "containerPort": 9004, + "hostPort": 9004, + "protocol": "tcp" + } + ], + "essential": true, + "command": [ + "--auto-accept-connections", + "--config", + "/config/d208988a-0bb0-4620-89af-b948987dd74c_Platform-admin.json" + ], + "environment": [ + { + "name": "AFJ_REST_LOG_LEVEL", + "value": "1" + } + ], + "environmentFiles": [ + { + "value": "${S3_ARN}", + "type": "s3" + } + ], + "mountPoints": [ + { + "sourceVolume": "agent-config", + "containerPath": "/config", + "readOnly": true + } + ], + "volumesFrom": [], + "ulimits": [], + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-create-group": "true", + "awslogs-group": "/ecs/AGENT_Platform-admin_TASKDEFIITION", + "awslogs-region": "me-central-1", + "awslogs-stream-prefix": "ecs" + } + } + } + + ], + "taskRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole", + "executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole", + "networkMode": "awsvpc", + "placementConstraints": [], + "requiresCompatibilities": [ + "FARGATE" + ], + "cpu": "256", + "memory": "512", + "volumes": [ + { + "name": "agent-config", + "efsVolumeConfiguration": { + "fileSystemId": "${EFS}", + "rootDirectory": "/", + "transitEncryption": "ENABLED", + "authorizationConfig": { + "accessPointId": "${AGENT_CONFIG_ACCESS_POINT}", + "iam": "DISABLED" + } + } + } + ] +} 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 0a2cecf0..058bef5c 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,7 +108,7 @@ 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": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": 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== @@ -116,12 +116,49 @@ "@babel/highlight" "^7.24.2" 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/code-frame@^7.24.2", "@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.7" + picocolors "^1.0.0" + +"@babel/code-frame@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.6.tgz#ab88da19344445c3d8889af2216606d3329f3ef2" + integrity sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA== + dependencies: + "@babel/highlight" "^7.24.6" + picocolors "^1.0.0" + +"@babel/compat-data@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" + integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== -"@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": +"@babel/core@^7.11.6", "@babel/core@^7.23.9": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" + integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.7" + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helpers" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/template" "^7.24.7" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + 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/core@^7.12.3", "@babel/core@^7.14.6": version "7.24.5" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.5.tgz#15ab5b98e101972d171aeef92ac70d8d6718f06a" integrity sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA== @@ -142,122 +179,202 @@ 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.24.5", "@babel/generator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" + integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== dependencies: - "@babel/types" "^7.24.5" + "@babel/types" "^7.24.7" "@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/generator@^7.7.2": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.6.tgz#dfac82a228582a9d30c959fe50ad28951d4737a7" + integrity sha512-S7m4eNa6YAPJRHmKsLHIDJhNAGNKoWNiWefz1MBbpnt8g9lvMDl1hir4P9bo/57bQEmuwEhnRU/AMWsD0G/Fbg== dependencies: - "@babel/compat-data" "^7.23.5" - "@babel/helper-validator-option" "^7.23.5" + "@babel/types" "^7.24.6" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + +"@babel/helper-compilation-targets@^7.23.6", "@babel/helper-compilation-targets@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" + integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== + dependencies: + "@babel/compat-data" "^7.24.7" + "@babel/helper-validator-option" "^7.24.7" browserslist "^4.22.2" 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/helper-environment-visitor@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.6.tgz#ac7ad5517821641550f6698dd5468f8cef78620d" + integrity sha512-Y50Cg3k0LKLMjxdPjIl40SdJgMB85iXn27Vk/qbHZCFx/o5XO3PSnpi675h1KEmmDb6OFArfd5SCQEQ5Q4H88g== -"@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== +"@babel/helper-environment-visitor@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" + integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== dependencies: - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.5" - "@babel/types" "^7.24.5" + "@babel/types" "^7.24.7" + +"@babel/helper-function-name@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" + integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== + dependencies: + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/helper-hoist-variables@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" + integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== + dependencies: + "@babel/types" "^7.24.7" + +"@babel/helper-module-imports@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.6.tgz#65e54ffceed6a268dc4ce11f0433b82cfff57852" + integrity sha512-a26dmxFJBF62rRO9mmpgrfTLsAuyHk4e1hKTUkD/fcMfynt8gvEKwQPQDVxWhca8dHoDck+55DFt42zV0QMw5g== + dependencies: + "@babel/types" "^7.24.6" + +"@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.5", "@babel/helper-module-transforms@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" + integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + +"@babel/helper-module-transforms@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.6.tgz#22346ed9df44ce84dee850d7433c5b73fab1fe4e" + integrity sha512-Y/YMPm83mV2HJTbX1Qh2sjgjqcacvOlhbzdCCsSlblOKjSYmQqEbO6rUniWQyRo9ncyfjT8hnUjlG06RXDEmcA== + dependencies: + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-module-imports" "^7.24.6" + "@babel/helper-simple-access" "^7.24.6" + "@babel/helper-split-export-declaration" "^7.24.6" + "@babel/helper-validator-identifier" "^7.24.6" + +"@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.6", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.6.tgz#fa02a32410a15a6e8f8185bcbf608f10528d2a24" + integrity sha512-MZG/JcWfxybKwsA9N9PmtF2lOSFSEMVCpIRrbxccZFLJPrJciJdG/UhSh5W96GEteJI2ARqm5UAHxISwRDLSNg== + +"@babel/helper-plugin-utils@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0" + integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg== + +"@babel/helper-simple-access@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.6.tgz#1d6e04d468bba4fc963b4906f6dac6286cfedff1" + integrity sha512-nZzcMMD4ZhmB35MOOzQuiGO5RzL6tJbsT37Zx8M5L/i9KSrukGXWTjLe1knIbb/RmxoJE9GON9soq0c0VEMM5g== + dependencies: + "@babel/types" "^7.24.6" + +"@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-split-export-declaration@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.6.tgz#e830068f7ba8861c53b7421c284da30ae656d7a3" + integrity sha512-CvLSkwXGWnYlF9+J3iZUvwgAxKiYzK3BWuo+mLzD/MDGOZDj7Gq8+hqaOkMxmJwmlv0iu86uH5fdADd9Hxkymw== + dependencies: + "@babel/types" "^7.24.6" + +"@babel/helper-split-export-declaration@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" + integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== + dependencies: + "@babel/types" "^7.24.7" + +"@babel/helper-string-parser@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz#28583c28b15f2a3339cfafafeaad42f9a0e828df" + integrity sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q== + +"@babel/helper-string-parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" + integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== + +"@babel/helper-validator-identifier@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz#08bb6612b11bdec78f3feed3db196da682454a5e" + integrity sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw== + +"@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.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" + integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== + +"@babel/helpers@^7.24.5", "@babel/helpers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" + integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== + dependencies: + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/highlight@^7.10.4", "@babel/highlight@^7.24.2", "@babel/highlight@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.6.tgz#6d610c1ebd2c6e061cade0153bf69b0590b7b3df" + integrity sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ== + dependencies: + "@babel/helper-validator-identifier" "^7.24.6" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" -"@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== +"@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.5" + "@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.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.6.tgz#5e030f440c3c6c78d195528c3b688b101a365328" + integrity sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q== + +"@babel/parser@^7.23.9", "@babel/parser@^7.24.5", "@babel/parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" + integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== "@babel/plugin-proposal-export-namespace-from@^7.14.5": version "7.18.9" @@ -309,6 +426,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" @@ -359,53 +483,71 @@ "@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.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.6.tgz#769daf2982d60308bc83d8936eaecb7582463c87" + integrity sha512-TzCtxGgVTEJWWwcYwQhCIQ6WaKlo80/B+Onsk4RRCcYqpYGFcG9etPW94VToGte5AAcxRrhjPUFvUS3Y2qKi4A== dependencies: - "@babel/helper-plugin-utils" "^7.24.0" + "@babel/helper-plugin-utils" "^7.24.6" "@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.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.6.tgz#1b8269902f25bd91ca6427230d4735ddd1e1283e" + integrity sha512-JEV8l3MHdmmdb7S7Cmx6rbNEjRCgTQMZxllveHO0mx6uiclB0NflCawlQQ6+o5ZrwjUBYPzHm2XoK4wqGVUFuw== + dependencies: + "@babel/helper-module-transforms" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-simple-access" "^7.24.6" + +"@babel/template@^7.24.0", "@babel/template@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" + integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/template@^7.3.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.6.tgz#048c347b2787a6072b24c723664c8d02b67a44f9" + integrity sha512-3vgazJlLwNXi9jhrR1ef8qiB65L1RK90+lEQwv4OxveHnqC3BfmnHdgySwRLzf6akhlOYenT+b7AfWq+a//AHw== + dependencies: + "@babel/code-frame" "^7.24.6" + "@babel/parser" "^7.24.6" + "@babel/types" "^7.24.6" + +"@babel/traverse@^7.24.5", "@babel/traverse@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" + integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-hoist-variables" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" 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.6", "@babel/types@^7.3.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.6.tgz#ba4e1f59870c10dc2fa95a274ac4feec23b21912" + integrity sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ== dependencies: - "@babel/helper-string-parser" "^7.24.1" - "@babel/helper-validator-identifier" "^7.24.5" + "@babel/helper-string-parser" "^7.24.6" + "@babel/helper-validator-identifier" "^7.24.6" + to-fast-properties "^2.0.0" + +"@babel/types@^7.24.5", "@babel/types@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" + integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== + dependencies: + "@babel/helper-string-parser" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -1430,178 +1572,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: + 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" "^27.5.1" - "@sinonjs/fake-timers" "^8.0.1" + "@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": @@ -1636,7 +1801,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== @@ -1698,9 +1863,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.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.7.tgz#852f754440e177b9c8b61f4f7cec1c26c5eadb8e" + integrity sha512-jiYHBX+K6bBN0YhwFHQ5SWWc3dQZliM3pdgpH33C7tnsVACsX1ubZn6gZ9hfwlzG0tyjFM72XQhpaXQ56cE6Ew== dependencies: "@ethersproject/abi" "^5.1.2" "@ethersproject/address" "^5.0.2" @@ -1729,15 +1894,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" @@ -1801,24 +1966,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" @@ -1928,11 +2098,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" @@ -1991,7 +2156,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== @@ -2017,10 +2182,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" @@ -2090,9 +2255,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.2" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.2.tgz#ca09a37ffbdc66c584c305af0044b8ad3aa7b9ef" + integrity sha512-dPSEQElyVJ97BuGduAqQjpBocZWAs0GR94z+ptL7JXQJeJdHw2WBG3EWdFrK36b8Q6j8P4cXOMhgUoi0IIfIsg== dependencies: "@types/node" "*" "@types/qs" "*" @@ -2109,7 +2274,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== @@ -2234,9 +2399,9 @@ 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 "20.12.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.13.tgz#90ed3b8a4e52dd3c5dc5a42dde5b85b74ad8ed88" + integrity sha512-gBGeanV41c1L171rR7wjbMiEpEI/l5XFQdLLfhr/REwpgDy/4U8y89+i8kRiLzDyZdOkXh+cRaTetUnCYutoXA== dependencies: undici-types "~5.26.4" @@ -2257,11 +2422,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" @@ -2367,9 +2527,9 @@ 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.11.10" + resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.11.10.tgz#feb364018cdd1f3d970a9e8c7f1c314c0a264fff" + integrity sha512-e2PNXoXLr6Z+dbfx5zSh9TRlXJrELycxiaXznp4S5+D2M3b9bqJEitNHA5923jhnB2zzFiZHa2f0SI1HoIahpg== "@types/ws@^8.5.4": version "8.5.10" @@ -2383,10 +2543,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.32" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" + integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== dependencies: "@types/yargs-parser" "*" @@ -2503,11 +2663,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" @@ -2528,35 +2683,22 @@ 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== -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: +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== @@ -2596,9 +2738,9 @@ 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.14.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.14.0.tgz#f514ddfd4756abb200e1704414963620a625ebbb" + integrity sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA== dependencies: fast-deep-equal "^3.1.3" json-schema-traverse "^1.0.0" @@ -2817,9 +2959,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.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" + integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -2839,16 +2981,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" @@ -2864,14 +3005,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: @@ -2892,12 +3033,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: @@ -3010,32 +3151,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== + version "4.23.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" + integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw== dependencies: - caniuse-lite "^1.0.30001587" - electron-to-chromium "^1.4.668" + caniuse-lite "^1.0.30001629" + electron-to-chromium "^1.4.796" node-releases "^2.0.14" - update-browserslist-db "^1.0.13" + update-browserslist-db "^1.0.16" bs-logger@0.x: version "0.2.6" @@ -3123,10 +3259,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.30001629: + version "1.0.30001632" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz#964207b7cba5851701afb4c8afaf1448db3884b6" + integrity sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg== canonicalize@^1.0.1: version "1.0.8" @@ -3206,15 +3342,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" @@ -3324,11 +3451,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" @@ -3357,6 +3479,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" @@ -3388,23 +3523,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" @@ -3423,15 +3541,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" @@ -3466,7 +3575,7 @@ debug@2.6.9, debug@^2.2.0: dependencies: 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: +debug@4, debug@^4.0.1, 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== @@ -3480,10 +3589,12 @@ 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== +debug@^4.1.0: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" decode-uri-component@^0.2.2: version "0.2.2" @@ -3497,10 +3608,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" @@ -3583,6 +3694,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" @@ -3609,13 +3725,6 @@ 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" - dynamic-dedupe@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz#06e44c223f5e4e94d78ef9db23a6515ce2f962a1" @@ -3650,10 +3759,10 @@ 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== +electron-to-chromium@^1.4.796: + version "1.4.796" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.796.tgz#48dd6ff634b7f7df6313bd27aaa713f3af4a2b29" + integrity sha512-NglN/xprcM+SHD2XCli4oC6bWe6kHoytcyLKCWXmRL854F0qhPhaYgUswUsglnPxYaNQIg2uMY4BvaomIf3kLA== elliptic@6.5.4: version "6.5.4" @@ -3668,10 +3777,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" @@ -3878,17 +3987,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" @@ -4174,15 +4272,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" @@ -4283,7 +4382,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== @@ -4344,10 +4443,10 @@ 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== +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" @@ -4435,15 +4534,6 @@ foreground-child@^3.1.0: 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" @@ -4609,9 +4699,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.5" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.5.tgz#5e012498579e9a6947511ed0cd403272c7acbbaf" + integrity sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw== dependencies: resolve-pkg-maps "^1.0.0" @@ -4630,17 +4720,17 @@ 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.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.1.tgz#0cfb01ab6a6b438177bfe6a58e2576f6efe909c2" + integrity sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw== 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" + 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== @@ -4808,13 +4898,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" @@ -4836,15 +4919,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" @@ -5048,11 +5122,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" @@ -5094,11 +5163,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" @@ -5156,7 +5220,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== @@ -5167,6 +5231,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.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz#91655936cf7380e4e473383081e38478b69993b1" + integrity sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw== + 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" @@ -5193,94 +5268,92 @@ 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.1.2" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.1.2.tgz#eada67ea949c6b71de50f1b09c92a961897b90ab" + integrity sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ== 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== +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/types" "^27.5.1" execa "^5.0.0" - throat "^6.0.1" - -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== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + 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" @@ -5294,106 +5367,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== +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: - 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== - 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== - 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== +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-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== @@ -5403,209 +5454,211 @@ 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" @@ -5641,39 +5694,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" @@ -5721,11 +5741,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" @@ -5733,6 +5748,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" @@ -5898,9 +5918,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.2" + resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.11.2.tgz#9ddd7d1a1e1be0e7c596c7e09487c362b4f1210c" + integrity sha512-V9mGLlaXN1WETzqQvSu6qf6XVAr3nFuJvWsHcuzCCCo6xUKawwSxOPTpan5CGOSKTn5w/bQuCZcLPJkyysgC3w== lines-and-columns@^1.1.6: version "1.2.4" @@ -5976,11 +5996,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" @@ -6081,11 +6096,11 @@ 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: @@ -6149,7 +6164,7 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^9.0.1: +minimatch@^9.0.1, minimatch@^9.0.4: version "9.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== @@ -6173,10 +6188,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" @@ -6355,11 +6370,6 @@ 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" @@ -6483,7 +6493,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== @@ -6531,11 +6541,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" @@ -6582,10 +6587,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" @@ -6605,10 +6610,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" @@ -6668,6 +6673,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" @@ -6694,11 +6708,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" @@ -6707,11 +6716,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" @@ -6748,11 +6762,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" @@ -6790,6 +6799,11 @@ react-is@^17.0.1: 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" @@ -6863,11 +6877,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" @@ -6895,10 +6904,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" @@ -6928,7 +6937,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== @@ -6978,28 +6987,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.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -7095,7 +7097,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== @@ -7129,7 +7131,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== @@ -7142,11 +7152,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" @@ -7194,7 +7199,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== @@ -7265,7 +7279,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== @@ -7335,7 +7356,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== @@ -7349,23 +7370,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" @@ -7374,11 +7387,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" @@ -7407,14 +7415,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" @@ -7429,11 +7429,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" @@ -7463,23 +7458,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" @@ -7500,19 +7478,19 @@ ts-deepmerge@^7.0.0: resolved "https://registry.yarnpkg.com/ts-deepmerge/-/ts-deepmerge-7.0.0.tgz#ee824dc177d452603348c7e6f3b90223434a6b44" integrity sha512-WZ/iAJrKDhdINv1WG6KZIGHrZDar6VfhftG1QJFpVbOYZMYJLJOvZOo1amictRXVdBXZIgBHKswMTXzElngprA== -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.1.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.5.tgz#d6c0471cc78bffa2cb4664a0a6741ef36cfe8f69" + integrity sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg== dependencies: bs-logger "0.x" 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" @@ -7692,13 +7670,6 @@ 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" @@ -7743,11 +7714,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" @@ -7758,13 +7724,13 @@ 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.0.16: + version "1.0.16" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" + integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== dependencies: escalade "^3.1.2" - picocolors "^1.0.0" + picocolors "^1.0.1" uri-js@^4.2.2, uri-js@^4.4.1: version "4.4.1" @@ -7773,14 +7739,6 @@ uri-js@^4.2.2, uri-js@^4.4.1: 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" @@ -7811,14 +7769,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.2.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" + integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== 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" @@ -7835,21 +7793,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== @@ -7869,10 +7813,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" @@ -7890,28 +7834,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" @@ -7920,15 +7842,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" @@ -7975,7 +7888,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== @@ -7998,15 +7920,13 @@ 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" @@ -8018,26 +7938,11 @@ ws@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.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== - xtend@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -8068,29 +7973,11 @@ yaml@^2.2.2, yaml@^2.4.1: resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.2.tgz#7a2b30f2243a5fc299e1f14ca58d475ed4bc5362" integrity sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA== -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"