From 5e672ebe4d091c3e4ae0629f23980c4ed0c79376 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Sat, 4 Nov 2023 14:20:57 +0530 Subject: [PATCH 01/23] Agent authentication Signed-off-by: KulkarniShashank --- package.json | 2 +- samples/cliConfig.json | 7 +- src/authentication.ts | 35 +++++ src/cli.ts | 7 +- src/cliAgent.ts | 11 +- src/controllers/did/DidController.ts | 12 +- .../multi-tenancy/MultiTenancyController.ts | 123 +++++++++++------- src/server.ts | 6 +- tsconfig.json | 2 + tsoa.json | 18 ++- 10 files changed, 164 insertions(+), 59 deletions(-) create mode 100644 src/authentication.ts diff --git a/package.json b/package.json index 02348837..d76bef70 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "reflect-metadata": "^0.1.13", "swagger-ui-express": "^4.4.0", "tslog": "^3.3.3", - "tsoa": "^4.1.2", + "tsoa": "^5.1.1", "tsyringe": "^4.7.0", "ws": "^7.5.3", "yargs": "^17.3.1" diff --git a/samples/cliConfig.json b/samples/cliConfig.json index f7f572c0..a91c715d 100644 --- a/samples/cliConfig.json +++ b/samples/cliConfig.json @@ -14,6 +14,10 @@ "genesisTransactions": "https://raw.githubusercontent.com/Indicio-tech/indicio-network/main/genesis_files/pool_transactions_testnet_genesis", "indyNamespace": "indicio:testnet" }, + { + "genesisTransactions": "https://raw.githubusercontent.com/Indicio-tech/indicio-network/main/genesis_files/pool_transactions_demonet_genesis", + "indyNamespace": "indicio:demonet" + }, { "genesisTransactions": "http://test.bcovrin.vonx.io/genesis", "indyNamespace": "bcovrin:testnet" @@ -38,5 +42,6 @@ ], "autoAcceptMediationRequests": false, "adminPort": 4001, - "tenancy": true + "tenancy": true, + "apiKey": "apiKey" } \ No newline at end of file diff --git a/src/authentication.ts b/src/authentication.ts new file mode 100644 index 00000000..2d777305 --- /dev/null +++ b/src/authentication.ts @@ -0,0 +1,35 @@ +import * as express from "express"; + +let dynamicApiKey: string = 'default_api_key'; // Initialize with a default value + +export function expressAuthentication( + request: express.Request, + securityName: string, + secMethod?: { [key: string]: any }, + scopes?: string +) { + if (securityName === 'apiKey') { + const apiKeyHeader = request.headers['authorization']; + + if (apiKeyHeader) { + const providedApiKey = apiKeyHeader as string; + + if (providedApiKey === dynamicApiKey) { + return Promise.resolve("success"); + } + } + + throw Error("unauthorized"); + } + + return Promise.reject("Invalid securityName or secMethod not provided"); +} + + +export function setDynamicApiKey(newApiKey: string) { + dynamicApiKey = newApiKey; +} + +export function getDynamicApiKey() { + return dynamicApiKey; +} \ No newline at end of file diff --git a/src/cli.ts b/src/cli.ts index dc81599d..3b4dc688 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -11,6 +11,10 @@ const parsed = yargs string: true, demandOption: true, }) + .option('api-key', { + string: true, + demandOption: true, + }) .option('wallet-id', { string: true, demandOption: true, @@ -192,6 +196,7 @@ export async function runCliServer() { connectionImageUrl: parsed['connection-image-url'], webhookUrl: parsed['webhook-url'], adminPort: parsed['admin-port'], - tenancy: parsed['tenancy'] + tenancy: parsed['tenancy'], + apiKey: parsed['api-key'] } as AriesRestConfig) } diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 481d8b34..b1531706 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -58,7 +58,8 @@ export interface AriesRestConfig { connectionImageUrl?: string tenancy?: boolean webhookUrl?: string - adminPort: number + adminPort: number, + apiKey: string } export async function readRestConfig(path: string) { @@ -76,7 +77,7 @@ export type RestAgentModules = Awaited> const getWithTenantModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) => { const modules = getModules(networkConfig) return { - tenants: new TenantsModule({}), + tenants: new TenantsModule({ sessionAcquireTimeout: Infinity, sessionLimit: Infinity }), ...modules } } @@ -144,7 +145,7 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) export async function runRestAgent(restConfig: AriesRestConfig) { - const { logLevel, inboundTransports = [], outboundTransports = [], webhookUrl, adminPort, walletConfig, ...afjConfig } = restConfig + const { logLevel, inboundTransports = [], outboundTransports = [], webhookUrl, adminPort, walletConfig, apiKey, ...afjConfig } = restConfig const logger = new TsLogger(logLevel ?? LogLevel.error) @@ -239,7 +240,9 @@ export async function runRestAgent(restConfig: AriesRestConfig) { const app = await setupServer(agent, { webhookUrl, port: adminPort, - }) + }, + apiKey + ) app.listen(adminPort, () => { logger.info(`Successfully started server on port ${adminPort}`) diff --git a/src/controllers/did/DidController.ts b/src/controllers/did/DidController.ts index 64fd864d..e7e154b3 100644 --- a/src/controllers/did/DidController.ts +++ b/src/controllers/did/DidController.ts @@ -1,7 +1,7 @@ import type { DidCreate, DidNymTransaction, DidResolutionResultProps } from '../types' import { KeyType, TypedArrayEncoder, KeyDidCreateOptions, DidDocumentBuilder, getEd25519VerificationKey2018, Key, Hasher } from '@aries-framework/core' import { Agent } from '@aries-framework/core' -import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse } from 'tsoa' +import { Body, Controller, Example, Get, Path, Post, Res, Route, Security, Tags, TsoaResponse } from 'tsoa' import { injectable } from 'tsyringe' import { Did, DidRecordExample } from '../examples' import axios from 'axios'; @@ -11,6 +11,7 @@ import { BCOVRIN_REGISTER_URL, INDICIO_NYM_URL } from '../../utils/util' @Tags('Dids') @Route('/dids') +@Security('apiKey') @injectable() export class DidController extends Controller { private agent: Agent @@ -27,7 +28,9 @@ export class DidController extends Controller { */ @Example(DidRecordExample) @Get('/:did') - public async getDidRecordByDid(@Path('did') did: Did) { + public async getDidRecordByDid( + @Path('did') did: Did + ) { const resolveResult = await this.agent.dids.resolve(did); const importDid = await this.agent.dids.import({ did, @@ -231,7 +234,10 @@ export class DidController extends Controller { @Get('/') - public async getDids() { + public async getDids( + @Res() internalServerError: TsoaResponse<500, { message: string }>, + @Res() unauthorized: TsoaResponse<401, { message: string }> + ) { const createdDids = await this.agent.dids.getCreatedDids() return createdDids; } diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index 5c4dc9cd..75950a1c 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -32,10 +32,10 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const { config } = createTenantOptions; + const tenantRecord: TenantRecord = await this.agent.modules.tenants.createTenant({ config }); + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId: tenantRecord.id }); try { - const { config } = createTenantOptions; - const tenantRecord: TenantRecord = await this.agent.modules.tenants.createTenant({ config }); - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId: tenantRecord.id }); createTenantOptions.role = createTenantOptions.role || 'endorser'; createTenantOptions.method = createTenantOptions.method ?? 'bcovrin:testnet'; @@ -67,6 +67,7 @@ export class MultiTenancyController extends Controller { reason: `Tenant not created`, }); } + await tenantAgent.endSession(); return internalServerError(500, { message: `Something went wrong: ${error}` }); } } @@ -252,8 +253,8 @@ export class MultiTenancyController extends Controller { @Body() didNymTransaction: DidNymTransaction, @Res() internalServerError: TsoaResponse<500, { message: string }>, ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId: tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId: tenantId }); const didCreateSubmitResult = await tenantAgent.dids.create({ did: didNymTransaction.did, options: { @@ -271,6 +272,7 @@ export class MultiTenancyController extends Controller { await tenantAgent.endSession(); return didCreateSubmitResult } catch (error) { + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -282,8 +284,8 @@ export class MultiTenancyController extends Controller { @Res() internalServerError: TsoaResponse<500, { message: string }>, @Res() forbiddenError: TsoaResponse<400, { reason: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const signedTransaction = await tenantAgent.modules.indyVdr.endorseTransaction( endorserTransaction.transaction, endorserTransaction.endorserDid @@ -299,6 +301,7 @@ export class MultiTenancyController extends Controller { }) } } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -326,8 +329,8 @@ export class MultiTenancyController extends Controller { @Path("tenantId") tenantId: string, @Body() config?: Omit // props removed because of issues with serialization ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const outOfBandRecord = await tenantAgent.oob.createInvitation(config); await tenantAgent.endSession(); return { @@ -340,6 +343,7 @@ export class MultiTenancyController extends Controller { outOfBandRecord: outOfBandRecord.toJSON(), } } catch (error) { + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -350,8 +354,8 @@ export class MultiTenancyController extends Controller { @Path("tenantId") tenantId: string, @Body() config?: Omit // props removed because of issues with serialization ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const { outOfBandRecord, invitation } = await tenantAgent.oob.createLegacyInvitation(config) await tenantAgent.endSession(); @@ -366,6 +370,7 @@ export class MultiTenancyController extends Controller { outOfBandRecord: outOfBandRecord.toJSON(), } } catch (error) { + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -376,9 +381,9 @@ export class MultiTenancyController extends Controller { @Path("tenantId") tenantId: string, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { const { invitation, ...config } = invitationRequest - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const invite = new OutOfBandInvitation({ ...invitation, handshakeProtocols: invitation.handshake_protocols }) const { outOfBandRecord, connectionRecord } = await tenantAgent.oob.receiveInvitation(invite, config) @@ -388,6 +393,7 @@ export class MultiTenancyController extends Controller { connectionRecord: connectionRecord?.toJSON(), } } catch (error) { + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -398,9 +404,9 @@ export class MultiTenancyController extends Controller { @Path("tenantId") tenantId: string, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { const { invitationUrl, ...config } = invitationRequest - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const { outOfBandRecord, connectionRecord } = await tenantAgent.oob.receiveInvitationFromUrl(invitationUrl, config) await tenantAgent.endSession(); @@ -409,6 +415,7 @@ export class MultiTenancyController extends Controller { connectionRecord: connectionRecord?.toJSON(), } } catch (error) { + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -416,20 +423,27 @@ export class MultiTenancyController extends Controller { @Get('/oob/:invitationId/:tenantId') public async getAllOutOfBandRecords( @Path('tenantId') tenantId: string, + @Res() internalServerError: TsoaResponse<500, { message: string }>, @Path('invitationId') invitationId?: string, ) { const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + try { - let outOfBandRecords = await tenantAgent.oob.getAll() + let outOfBandRecords = await tenantAgent.oob.getAll() - if (invitationId) outOfBandRecords = outOfBandRecords.filter((o: any) => o.outOfBandInvitation.id === invitationId) - await tenantAgent.endSession(); - return outOfBandRecords.map((c: any) => c.toJSON()) + if (invitationId) outOfBandRecords = outOfBandRecords.filter((o: any) => o.outOfBandInvitation.id === invitationId) + await tenantAgent.endSession(); + return outOfBandRecords.map((c: any) => c.toJSON()) + } catch (error) { + await tenantAgent.endSession(); + return internalServerError(500, { message: `something went wrong: ${error}` }) + } } @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, @@ -439,20 +453,25 @@ export class MultiTenancyController extends Controller { ) { let connections const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); - if (outOfBandId) { - connections = await tenantAgent.connections.findAllByOutOfBandId(outOfBandId) - } else { - const connectionRepository = tenantAgent.dependencyManager.resolve(ConnectionRepository) - - const connections = await connectionRepository.findByQuery(tenantAgent.context, { - alias, - myDid, - theirDid, - theirLabel, - state, - }) + try { + if (outOfBandId) { + connections = await tenantAgent.connections.findAllByOutOfBandId(outOfBandId) + } else { + const connectionRepository = tenantAgent.dependencyManager.resolve(ConnectionRepository) + + const connections = await connectionRepository.findByQuery(tenantAgent.context, { + alias, + myDid, + theirDid, + theirLabel, + state, + }) + await tenantAgent.endSession(); + return connections.map((c: any) => c.toJSON()) + } + } catch (error) { await tenantAgent.endSession(); - return connections.map((c: any) => c.toJSON()) + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -489,9 +508,8 @@ export class MultiTenancyController extends Controller { @Res() forbiddenError: TsoaResponse<400, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); if (!schema.endorse) { const { schemaState } = await tenantAgent.modules.anoncreds.registerSchema({ schema: { @@ -552,6 +570,7 @@ export class MultiTenancyController extends Controller { }) } } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -600,9 +619,9 @@ export class MultiTenancyController extends Controller { endorsedTransaction: string, tenantId: string ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const { issuerId, name, version, attributes } = schema; const { schemaState } = await tenantAgent.modules.anoncreds.registerSchema({ options: { @@ -635,6 +654,7 @@ export class MultiTenancyController extends Controller { return schemaState; } catch (error) { + await tenantAgent.endSession(); return error } } @@ -650,10 +670,10 @@ export class MultiTenancyController extends Controller { endorsedTransaction: string, tenantId: string ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { const { issuerId, schemaId, tag } = credentialDefinition; - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const { credentialDefinitionState } = await tenantAgent.modules.anoncreds.registerCredentialDefinition({ credentialDefinition, options: { @@ -681,6 +701,7 @@ export class MultiTenancyController extends Controller { return credentialDefinitionState; } catch (error) { + await tenantAgent.endSession(); return error } } @@ -694,8 +715,8 @@ export class MultiTenancyController extends Controller { @Res() badRequestError: TsoaResponse<400, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const getSchema = await tenantAgent.modules.anoncreds.getSchema(schemaId); await tenantAgent.endSession(); return getSchema @@ -717,6 +738,7 @@ export class MultiTenancyController extends Controller { } } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -735,9 +757,9 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { credentialDefinitionRequest.endorse = credentialDefinitionRequest.endorse ? credentialDefinitionRequest.endorse : false - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); if (!credentialDefinitionRequest.endorse) { @@ -788,6 +810,7 @@ export class MultiTenancyController extends Controller { }) } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -800,8 +823,8 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const getCredDef = await tenantAgent.modules.anoncreds.getCredentialDefinition(credentialDefinitionId) await tenantAgent.endSession(); return getCredDef @@ -817,6 +840,7 @@ export class MultiTenancyController extends Controller { }) } } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -827,8 +851,8 @@ export class MultiTenancyController extends Controller { @Path('tenantId') tenantId: string, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const offer = await tenantAgent.credentials.offerCredential({ connectionId: createOfferOptions.connectionId, protocolVersion: createOfferOptions.protocolVersion as CredentialProtocolVersionType<[]>, @@ -838,6 +862,7 @@ export class MultiTenancyController extends Controller { await tenantAgent.endSession(); return offer; } catch (error) { + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -848,8 +873,8 @@ export class MultiTenancyController extends Controller { @Body() createOfferOptions: CreateOfferOobOptions, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const linkSecretIds = await tenantAgent.modules.anoncreds.getLinkSecretIds() if (linkSecretIds.length === 0) { await tenantAgent.modules.anoncreds.createLinkSecret() @@ -881,6 +906,7 @@ export class MultiTenancyController extends Controller { outOfBandRecord: outOfBandRecord.toJSON(), } } catch (error) { + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -892,8 +918,8 @@ export class MultiTenancyController extends Controller { @Path('tenantId') tenantId: string, @Body() acceptCredentialOfferOptions: AcceptCredentialOfferOptions ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const linkSecretIds = await tenantAgent.modules.anoncreds.getLinkSecretIds() if (linkSecretIds.length === 0) { await tenantAgent.modules.anoncreds.createLinkSecret() @@ -913,6 +939,7 @@ export class MultiTenancyController extends Controller { reason: `credential with credential record id "${acceptCredentialOfferOptions.credentialRecordId}" not found.`, }) } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -924,8 +951,8 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const credential = await tenantAgent.credentials.getById(credentialRecordId) await tenantAgent.endSession(); @@ -936,6 +963,7 @@ export class MultiTenancyController extends Controller { reason: `credential with credential record id "${credentialRecordId}" not found.`, }) } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -983,8 +1011,8 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const proof = await tenantAgent.proofs.getFormatData(proofRecordId) await tenantAgent.endSession(); @@ -995,6 +1023,7 @@ export class MultiTenancyController extends Controller { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1007,8 +1036,8 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const requestProofPayload = { connectionId: requestProofOptions.connectionId, protocolVersion: requestProofOptions.protocolVersion as ProofsProtocolVersionType<[]>, @@ -1025,6 +1054,7 @@ export class MultiTenancyController extends Controller { await tenantAgent.endSession(); return proof } catch (error) { + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1035,8 +1065,8 @@ export class MultiTenancyController extends Controller { @Body() createRequestOptions: CreateProofRequestOobOptions, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const proof = await tenantAgent.proofs.createRequest({ protocolVersion: createRequestOptions.protocolVersion as ProofsProtocolVersionType<[]>, proofFormats: createRequestOptions.proofFormats, @@ -1066,6 +1096,7 @@ export class MultiTenancyController extends Controller { outOfBandRecord: outOfBandRecord.toJSON(), } } catch (error) { + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1084,8 +1115,8 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const requestedCredentials = await tenantAgent.proofs.selectCredentialsForRequest({ proofRecordId, }) @@ -1106,6 +1137,7 @@ export class MultiTenancyController extends Controller { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1118,8 +1150,8 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const proof = await tenantAgent.proofs.acceptPresentation({ proofRecordId }) await tenantAgent.endSession(); @@ -1130,6 +1162,7 @@ export class MultiTenancyController extends Controller { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1142,8 +1175,8 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); const proof = await tenantAgent.proofs.getById(proofRecordId) await tenantAgent.endSession(); @@ -1154,6 +1187,7 @@ export class MultiTenancyController extends Controller { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } + await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1184,8 +1218,8 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId: tenantAgentOptions.tenantId }); try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId: tenantAgentOptions.tenantId }); await tenantAgent.endSession(); return tenantAgent; @@ -1196,6 +1230,7 @@ export class MultiTenancyController extends Controller { reason: `Tenant with id: ${tenantAgentOptions.tenantId} not found.`, }) } + await tenantAgent.endSession(); return internalServerError(500, { message: `Something went wrong: ${error}` }) } } diff --git a/src/server.ts b/src/server.ts index 3103de9b..86746094 100644 --- a/src/server.ts +++ b/src/server.ts @@ -16,8 +16,9 @@ import { connectionEvents } from './events/ConnectionEvents' import { credentialEvents } from './events/CredentialEvents' import { proofEvents } from './events/ProofEvents' import { RegisterRoutes } from './routes/routes' +import { setDynamicApiKey } from './authentication' -export const setupServer = async (agent: Agent, config: ServerConfig) => { +export const setupServer = async (agent: Agent, config: ServerConfig, apiKey?: string) => { container.registerInstance(Agent, agent) const app = config.app ?? express() @@ -36,6 +37,9 @@ export const setupServer = async (agent: Agent, config: ServerConfig) => { extended: true, }) ) + + setDynamicApiKey(apiKey ? apiKey : ''); + app.use(bodyParser.json()) app.use('/docs', serve, async (_req: ExRequest, res: ExResponse) => { return res.send(generateHTML(await import('./routes/swagger.json'))) diff --git a/tsconfig.json b/tsconfig.json index 8d76269e..ff050101 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,6 +9,8 @@ "paths": { "@aries-framework/*": ["packages/*/src"] }, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, "types": ["jest", "node"] }, "exclude": ["node_modules", "build"] diff --git a/tsoa.json b/tsoa.json index 098f7e42..da491da8 100644 --- a/tsoa.json +++ b/tsoa.json @@ -1,13 +1,23 @@ { "entryFile": "src/index.ts", "noImplicitAdditionalProperties": "throw-on-extras", - "controllerPathGlobs": ["src/**/*Controller.ts"], + "controllerPathGlobs": [ + "src/**/*Controller.ts" + ], "spec": { "outputDirectory": "src/routes", - "specVersion": 3 + "specVersion": 3, + "securityDefinitions": { + "apiKey": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + } }, "routes": { "routesDir": "src/routes", - "iocModule": "./src/utils/tsyringeTsoaIocContainer" + "iocModule": "./src/utils/tsyringeTsoaIocContainer", + "authenticationModule": "src/authentication" } -} +} \ No newline at end of file From abfa5a55183352f4ea77374b1dba5c670ebd9807 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Sat, 4 Nov 2023 19:15:20 +0530 Subject: [PATCH 02/23] Added all API's authentication in controller Signed-off-by: KulkarniShashank --- src/authentication.ts | 15 +++------ src/controllers/agent/AgentController.ts | 3 +- .../basic-messages/BasicMessageController.ts | 3 +- .../connections/ConnectionController.ts | 3 +- .../credentials/CredentialController.ts | 3 +- .../CredentialDefinitionController.ts | 3 +- .../credentials/SchemaController.ts | 3 +- src/controllers/did/DidController.ts | 12 ++++--- .../EndorserTransactionController.ts | 3 +- .../multi-tenancy/MultiTenancyController.ts | 3 +- .../outofband/OutOfBandController.ts | 3 +- src/controllers/proofs/ProofController.ts | 3 +- src/securityMiddleware.ts | 32 +++++++++++++++++++ src/server.ts | 3 ++ 14 files changed, 68 insertions(+), 24 deletions(-) create mode 100644 src/securityMiddleware.ts diff --git a/src/authentication.ts b/src/authentication.ts index 2d777305..0a87cf52 100644 --- a/src/authentication.ts +++ b/src/authentication.ts @@ -1,31 +1,26 @@ import * as express from "express"; -let dynamicApiKey: string = 'default_api_key'; // Initialize with a default value +let dynamicApiKey: string = 'api_key'; // Initialize with a default value -export function expressAuthentication( +export async function expressAuthentication( request: express.Request, securityName: string, secMethod?: { [key: string]: any }, scopes?: string ) { - if (securityName === 'apiKey') { - const apiKeyHeader = request.headers['authorization']; + const apiKeyHeader = request.headers['authorization']; + if (securityName === 'apiKey') { if (apiKeyHeader) { const providedApiKey = apiKeyHeader as string; if (providedApiKey === dynamicApiKey) { - return Promise.resolve("success"); + return "success"; } } - - throw Error("unauthorized"); } - - return Promise.reject("Invalid securityName or secMethod not provided"); } - export function setDynamicApiKey(newApiKey: string) { dynamicApiKey = newApiKey; } diff --git a/src/controllers/agent/AgentController.ts b/src/controllers/agent/AgentController.ts index 30b89c01..4eb76bee 100644 --- a/src/controllers/agent/AgentController.ts +++ b/src/controllers/agent/AgentController.ts @@ -1,11 +1,12 @@ import type { AgentInfo } from '../types' import { Agent, DidCreateOptions, JsonTransformer, KeyType, TypedArrayEncoder } from '@aries-framework/core' -import { Body, Controller, Delete, Get, Path, Post, Res, Route, Tags, TsoaResponse } from 'tsoa' +import { Body, Controller, Delete, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' @Tags('Agent') @Route('/agent') +@Security('apiKey') @injectable() export class AgentController extends Controller { private agent: Agent diff --git a/src/controllers/basic-messages/BasicMessageController.ts b/src/controllers/basic-messages/BasicMessageController.ts index c2b652bb..29a49259 100644 --- a/src/controllers/basic-messages/BasicMessageController.ts +++ b/src/controllers/basic-messages/BasicMessageController.ts @@ -1,13 +1,14 @@ import type { BasicMessageRecord, BasicMessageStorageProps } from '@aries-framework/core' import { Agent, RecordNotFoundError } from '@aries-framework/core' -import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse } from 'tsoa' +import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' import { BasicMessageRecordExample, RecordId } from '../examples' @Tags('Basic Messages') @Route('/basic-messages') +@Security('apiKey') @injectable() export class BasicMessageController extends Controller { private agent: Agent diff --git a/src/controllers/connections/ConnectionController.ts b/src/controllers/connections/ConnectionController.ts index 6717a3ed..ef4b66cf 100644 --- a/src/controllers/connections/ConnectionController.ts +++ b/src/controllers/connections/ConnectionController.ts @@ -7,12 +7,13 @@ import { AriesFrameworkError, RecordNotFoundError, } from '@aries-framework/core' -import { Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse } from 'tsoa' +import { Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' import { ConnectionRecordExample, RecordId } from '../examples' @Tags('Connections') +@Security('apiKey') @Route() @injectable() export class ConnectionController extends Controller { diff --git a/src/controllers/credentials/CredentialController.ts b/src/controllers/credentials/CredentialController.ts index db4fb74a..99a3bfb7 100644 --- a/src/controllers/credentials/CredentialController.ts +++ b/src/controllers/credentials/CredentialController.ts @@ -1,7 +1,7 @@ import { AutoAcceptCredential, CREDENTIALS_CONTEXT_V1_URL, ConnectionRecord, ConnectionState, CredentialExchangeRecord, CredentialExchangeRecordProps, CredentialFormat, CredentialPreviewAttribute, CredentialProtocolVersionType, CustomConnectionTags, CustomCredentialTags, DefaultConnectionTags, DidExchangeRole, DidExchangeState, HandshakeProtocol, JsonCredential, JsonLdCredentialDetailFormat, JsonLdCredentialFormatService, KeyType, ProofsProtocolVersionType, TypedArrayEncoder, V2CredentialPreview, W3cCredentialService, utils } from '@aries-framework/core' import { CredentialRepository, CredentialState, Agent, RecordNotFoundError } from '@aries-framework/core' -import { Body, Controller, Delete, Get, Path, Post, Res, Route, Tags, TsoaResponse, Example, Query } from 'tsoa' +import { Body, Controller, Delete, Get, Path, Post, Res, Route, Tags, TsoaResponse, Example, Query, Security } from 'tsoa' import { injectable } from 'tsyringe' import { LegacyIndyCredentialFormatService, @@ -25,6 +25,7 @@ import { RestAgentModules } from '../../cliAgent' @Tags('Credentials') +@Security('apiKey') @Route('/credentials') @injectable() export class CredentialController extends Controller { diff --git a/src/controllers/credentials/CredentialDefinitionController.ts b/src/controllers/credentials/CredentialDefinitionController.ts index f58f6feb..d6bdc21e 100644 --- a/src/controllers/credentials/CredentialDefinitionController.ts +++ b/src/controllers/credentials/CredentialDefinitionController.ts @@ -4,7 +4,7 @@ import { AnonCredsApi, AnonCredsError, getUnqualifiedCredentialDefinitionId, par // TODO: Chenged IndySdkError to AriesFrameworkError. If approved, the message must be changed too. import { Agent, AriesFrameworkError } from '@aries-framework/core' -import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse } from 'tsoa' +import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' import { IndyVdrAnonCredsRegistry } from '@aries-framework/indy-vdr' import { CredentialDefinitionExample, CredentialDefinitionId } from '../examples' @@ -12,6 +12,7 @@ import { CredentialEnum } from '../../enums/enum'; @Tags('Credential Definitions') @Route('/credential-definitions') +@Security('apiKey') @injectable() export class CredentialDefinitionController extends Controller { private agent: Agent diff --git a/src/controllers/credentials/SchemaController.ts b/src/controllers/credentials/SchemaController.ts index 63e5d9ce..c340d807 100644 --- a/src/controllers/credentials/SchemaController.ts +++ b/src/controllers/credentials/SchemaController.ts @@ -3,7 +3,7 @@ import { AnonCredsError, AnonCredsApi, getUnqualifiedSchemaId, parseIndySchemaId import { Agent, AriesFrameworkError, BaseAgent } from '@aries-framework/core' // import { LedgerError } from '@aries-framework/core/build/modules/ledger/error/LedgerError' // import { isIndyError } from '@aries-framework/core/build/utils/indyError' -import { Body, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse } from 'tsoa' +import { Body, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' import { SchemaId, SchemaExample } from '../examples' import { IndyVdrDidCreateOptions, IndyVdrDidCreateResult } from '@aries-framework/indy-vdr' @@ -12,6 +12,7 @@ import { CredentialEnum } from '../../enums/enum'; @Tags('Schemas') @Route('/schemas') +@Security('apiKey') @injectable() export class SchemaController { private agent: Agent diff --git a/src/controllers/did/DidController.ts b/src/controllers/did/DidController.ts index e7e154b3..30269bac 100644 --- a/src/controllers/did/DidController.ts +++ b/src/controllers/did/DidController.ts @@ -235,10 +235,14 @@ export class DidController extends Controller { @Get('/') public async getDids( - @Res() internalServerError: TsoaResponse<500, { message: string }>, - @Res() unauthorized: TsoaResponse<401, { message: string }> + @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const createdDids = await this.agent.dids.getCreatedDids() - return createdDids; + try{ + const createdDids = await this.agent.dids.getCreatedDids() + return createdDids; + + } catch(error){ + return internalServerError(500, { message: `something went wrong: ${error}` }) + } } } diff --git a/src/controllers/endorser-transaction/EndorserTransactionController.ts b/src/controllers/endorser-transaction/EndorserTransactionController.ts index f4ad06dc..c93c7954 100644 --- a/src/controllers/endorser-transaction/EndorserTransactionController.ts +++ b/src/controllers/endorser-transaction/EndorserTransactionController.ts @@ -1,5 +1,5 @@ import { Agent, AriesFrameworkError } from "@aries-framework/core" -import { Body, Controller, Post, Res, Route, Tags, TsoaResponse } from "tsoa" +import { Body, Controller, Post, Res, Route, Tags, TsoaResponse, Security } from "tsoa" import { injectable } from "tsyringe" import { DidNymTransaction, EndorserTransaction, WriteTransaction } from "../types" import { SchemaId, Version } from "../examples" @@ -9,6 +9,7 @@ import { CredentialEnum } from '../../enums/enum'; @Tags('EndorserTransaction') @Route('/transactions') +@Security('apiKey') @injectable() export class EndorserTransactionController extends Controller { private agent: Agent diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index 75950a1c..a24ae808 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -1,6 +1,6 @@ import { AcceptCredentialOfferOptions, AcceptProofRequestOptions, Agent, AriesFrameworkError, Buffer, CacheModule, ConnectionRecordProps, ConnectionRepository, ConnectionsModule, CreateOutOfBandInvitationConfig, CredentialProtocolVersionType, CredentialRepository, CredentialState, CredentialsModule, DidDocumentBuilder, DidExchangeState, DidsModule, HandshakeProtocol, JsonLdCredentialFormatService, JsonTransformer, KeyDidCreateOptions, KeyType, OutOfBandInvitation, ProofExchangeRecordProps, ProofsModule, ProofsProtocolVersionType, RecordNotFoundError, TypedArrayEncoder, V2CredentialProtocol, V2ProofProtocol, W3cCredentialsModule, getEd25519VerificationKey2018, injectable } from '@aries-framework/core' import { CreateOfferOobOptions, CreateOfferOptions, CreateProofRequestOobOptions, CreateTenantOptions, DidNymTransaction, EndorserTransaction, GetTenantAgentOptions, ReceiveInvitationByUrlProps, ReceiveInvitationProps, WithTenantAgentOptions, WriteTransaction } from '../types'; -import { Body, Controller, Delete, Get, Post, Query, Res, Route, Tags, TsoaResponse, Path, Example } from 'tsoa' +import { Body, Controller, Delete, Get, Post, Query, Res, Route, Tags, TsoaResponse, Path, Example, Security } from 'tsoa' import axios from 'axios'; import { TenantRecord } from '@aries-framework/tenants'; import { getUnqualifiedSchemaId, getUnqualifiedCredentialDefinitionId, AnonCredsCredentialFormatService, AnonCredsModule, AnonCredsProofFormatService, LegacyIndyCredentialFormatService, LegacyIndyProofFormatService, V1CredentialProtocol, V1ProofProtocol, parseIndyCredentialDefinitionId, parseIndySchemaId } from '@aries-framework/anoncreds' @@ -17,6 +17,7 @@ import { CredentialEnum } from '../../enums/enum'; @Tags("MultiTenancy") @Route("/multi-tenancy") +@Security('apiKey') @injectable() export class MultiTenancyController extends Controller { private readonly agent: Agent; diff --git a/src/controllers/outofband/OutOfBandController.ts b/src/controllers/outofband/OutOfBandController.ts index 79719d86..264a7e14 100644 --- a/src/controllers/outofband/OutOfBandController.ts +++ b/src/controllers/outofband/OutOfBandController.ts @@ -9,7 +9,7 @@ import { } from '@aries-framework/core' import { AgentMessage, JsonTransformer, OutOfBandInvitation, Agent, RecordNotFoundError } from '@aries-framework/core' -import { Body, Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse } from 'tsoa' +import { Body, Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' import { ConnectionRecordExample, outOfBandInvitationExample, outOfBandRecordExample, RecordId } from '../examples' @@ -18,6 +18,7 @@ import { V1CredentialProtocol } from '@aries-framework/anoncreds' // import prepareForAnon @Tags('Out Of Band') +@Security('apiKey') @Route('/oob') @injectable() export class OutOfBandController extends Controller { diff --git a/src/controllers/proofs/ProofController.ts b/src/controllers/proofs/ProofController.ts index 965dc3b0..032453d9 100644 --- a/src/controllers/proofs/ProofController.ts +++ b/src/controllers/proofs/ProofController.ts @@ -23,7 +23,7 @@ import { } from '@aries-framework/anoncreds' import { Agent, RecordNotFoundError } from '@aries-framework/core' -import { Body, Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse } from 'tsoa' +import { Body, Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' import { ProofRecordExample, RecordId } from '../examples' @@ -31,6 +31,7 @@ import { AcceptProofProposal, CreateProofRequestOobOptions, RequestProofOptions, @Tags('Proofs') @Route('/proofs') +@Security('apiKey') @injectable() export class ProofController extends Controller { private agent: Agent diff --git a/src/securityMiddleware.ts b/src/securityMiddleware.ts new file mode 100644 index 00000000..bea1f81b --- /dev/null +++ b/src/securityMiddleware.ts @@ -0,0 +1,32 @@ +import * as express from 'express'; +import { NextFunction } from 'express'; +import { Request, Response } from 'express'; +import { Middlewares } from '@tsoa/runtime'; +import { expressAuthentication } from './authentication'; // Import your authentication function + +@Middlewares() +export class SecurityMiddleware { + async use( + request: express.Request, + response: express.Response, + next: NextFunction + ) { + try { + const securityName = 'apiKey'; + + if (securityName) { + const result = await expressAuthentication(request, securityName); + + if (result === 'success') { + next(); + } else { + response.status(401).json({ message: 'Unauthorized' }); + } + } else { + response.status(400).json({ message: 'Bad Request' }); + } + } catch (error) { + next(error); + } + } +} diff --git a/src/server.ts b/src/server.ts index 86746094..b3798216 100644 --- a/src/server.ts +++ b/src/server.ts @@ -17,6 +17,7 @@ import { credentialEvents } from './events/CredentialEvents' import { proofEvents } from './events/ProofEvents' import { RegisterRoutes } from './routes/routes' import { setDynamicApiKey } from './authentication' +import { SecurityMiddleware } from './securityMiddleware' export const setupServer = async (agent: Agent, config: ServerConfig, apiKey?: string) => { container.registerInstance(Agent, agent) @@ -45,6 +46,8 @@ export const setupServer = async (agent: Agent, config: ServerConfig, apiKey?: s return res.send(generateHTML(await import('./routes/swagger.json'))) }) + const securityMiddleware = new SecurityMiddleware(); + app.use(securityMiddleware.use); RegisterRoutes(app) app.use((req, res, next) => { From 691f9b5c63c208c6550a966fd69edf655332f4ad Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Tue, 19 Dec 2023 19:44:22 +0530 Subject: [PATCH 03/23] Added the jwt package Signed-off-by: KulkarniShashank --- package.json | 2 ++ src/cli.ts | 7 +------ src/cliAgent.ts | 50 +++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 47 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index d76bef70..ba619d17 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "body-parser": "^1.20.0", "cors": "^2.8.5", "express": "^4.18.1", + "jsonwebtoken": "^9.0.2", "node-fetch": "^2.6.7", "reflect-metadata": "^0.1.13", "swagger-ui-express": "^4.4.0", @@ -62,6 +63,7 @@ "@types/cors": "^2.8.12", "@types/express": "^4.17.13", "@types/jest": "^27.0.3", + "@types/jsonwebtoken": "^9.0.5", "@types/multer": "^1.4.7", "@types/node": "^16.7.10", "@types/supertest": "^2.0.12", diff --git a/src/cli.ts b/src/cli.ts index 3b4dc688..dc81599d 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -11,10 +11,6 @@ const parsed = yargs string: true, demandOption: true, }) - .option('api-key', { - string: true, - demandOption: true, - }) .option('wallet-id', { string: true, demandOption: true, @@ -196,7 +192,6 @@ export async function runCliServer() { connectionImageUrl: parsed['connection-image-url'], webhookUrl: parsed['webhook-url'], adminPort: parsed['admin-port'], - tenancy: parsed['tenancy'], - apiKey: parsed['api-key'] + tenancy: parsed['tenancy'] } as AriesRestConfig) } diff --git a/src/cliAgent.ts b/src/cliAgent.ts index b1531706..b68c6973 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -9,7 +9,7 @@ import { BCOVRIN_TEST_GENESIS, INDICIO_TEST_GENESIS } from './utils/util' import { setupServer } from './server' import { TsLogger } from './utils/logger' import { AnonCredsCredentialFormatService, AnonCredsModule, AnonCredsProofFormatService, LegacyIndyCredentialFormatService, LegacyIndyProofFormatService, V1CredentialProtocol, V1ProofProtocol } from '@aries-framework/anoncreds' -import { randomUUID } from 'crypto' +import { randomBytes, randomUUID } from 'crypto' import { TenantsModule } from '@aries-framework/tenants' import { JsonLdCredentialFormatService } from '@aries-framework/core' import { W3cCredentialSchema, W3cCredentialsApi, W3cCredentialService, W3cJsonLdVerifyCredentialOptions } from '@aries-framework/core' @@ -20,6 +20,7 @@ import { indyVdr } from '@hyperledger/indy-vdr-nodejs' import { AnonCredsRsModule } from '@aries-framework/anoncreds-rs' import { anoncreds } from '@hyperledger/anoncreds-nodejs' import axios from 'axios'; +import jwt from 'jsonwebtoken'; export type Transports = 'ws' | 'http' export type InboundTransport = { @@ -58,8 +59,7 @@ export interface AriesRestConfig { connectionImageUrl?: string tenancy?: boolean webhookUrl?: string - adminPort: number, - apiKey: string + adminPort: number } export async function readRestConfig(path: string) { @@ -145,7 +145,7 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) export async function runRestAgent(restConfig: AriesRestConfig) { - const { logLevel, inboundTransports = [], outboundTransports = [], webhookUrl, adminPort, walletConfig, apiKey, ...afjConfig } = restConfig + const { logLevel, inboundTransports = [], outboundTransports = [], webhookUrl, adminPort, walletConfig, ...afjConfig } = restConfig const logger = new TsLogger(logLevel ?? LogLevel.error) @@ -236,12 +236,50 @@ export async function runRestAgent(restConfig: AriesRestConfig) { agent.registerInboundTransport(new InboundTransport({ port: inboundTransport.port })) } + async function generateSecretKey(length: number = 32): Promise { + try { + // Asynchronously generate a buffer containing random values + const buffer: Buffer = await new Promise((resolve, reject) => { + randomBytes(length, (error, buf) => { + if (error) { + reject(error); + } else { + resolve(buf); + } + }); + }); + + // Convert the buffer to a hexadecimal string + const secretKey: string = buffer.toString("hex"); + + return secretKey; + } catch (error) { + // Handle any errors that might occur during key generation + console.error("Error generating secret key:", error); + throw error; + } + } + + // Call the async function + const secretKeyInfo: string = await generateSecretKey(); + console.log("secretKey", secretKeyInfo); + await agent.initialize() + + const getData = await agent.genericRecords.save({ + content: { + secretKey: secretKeyInfo, + }, + }); + const getGenericRecord = await agent.genericRecords.findById(getData.id); + const secretKey = getGenericRecord?.content.secretKey as string; + const token = jwt.sign({ agentInfo: 'agentInfo' }, secretKey); + + console.log("token", token) const app = await setupServer(agent, { webhookUrl, port: adminPort, - }, - apiKey + } ) app.listen(adminPort, () => { From 1b526715f32e10f69c1098d80a5c868e8bfb4cd1 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Wed, 20 Dec 2023 18:29:22 +0530 Subject: [PATCH 04/23] Added remove authentication for invitation url Signed-off-by: KulkarniShashank --- src/cliAgent.ts | 3 +- .../connections/ConnectionController.ts | 6 +++- .../multi-tenancy/MultiTenancyController.ts | 32 +++++++++++++++++-- src/securityMiddleware.ts | 17 ++++++++-- 4 files changed, 52 insertions(+), 6 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index b68c6973..32320c74 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -279,7 +279,8 @@ export async function runRestAgent(restConfig: AriesRestConfig) { const app = await setupServer(agent, { webhookUrl, port: adminPort, - } + }, + token ) app.listen(adminPort, () => { diff --git a/src/controllers/connections/ConnectionController.ts b/src/controllers/connections/ConnectionController.ts index ef4b66cf..c1b2dade 100644 --- a/src/controllers/connections/ConnectionController.ts +++ b/src/controllers/connections/ConnectionController.ts @@ -13,7 +13,6 @@ import { injectable } from 'tsyringe' import { ConnectionRecordExample, RecordId } from '../examples' @Tags('Connections') -@Security('apiKey') @Route() @injectable() export class ConnectionController extends Controller { @@ -34,6 +33,7 @@ export class ConnectionController extends Controller { * @returns ConnectionRecord[] */ @Example([ConnectionRecordExample]) + @Security('apiKey') @Get('/connections') public async getAllConnections( @Query('outOfBandId') outOfBandId?: string, @@ -76,6 +76,7 @@ export class ConnectionController extends Controller { * @returns ConnectionRecord */ @Example(ConnectionRecordExample) + @Security('apiKey') @Get('/connections/:connectionId') public async getConnectionById( @Path('connectionId') connectionId: RecordId, @@ -94,6 +95,7 @@ export class ConnectionController extends Controller { * @param connectionId Connection identifier */ @Delete('/connections/:connectionId') + @Security('apiKey') public async deleteConnection( @Path('connectionId') connectionId: RecordId, @Res() notFoundError: TsoaResponse<404, { reason: string }>, @@ -120,6 +122,7 @@ export class ConnectionController extends Controller { * @returns ConnectionRecord */ @Example(ConnectionRecordExample) + @Security('apiKey') @Post('/connections/:connectionId/accept-request') public async acceptRequest( @Path('connectionId') connectionId: RecordId, @@ -147,6 +150,7 @@ export class ConnectionController extends Controller { * @returns ConnectionRecord */ @Example(ConnectionRecordExample) + @Security('apiKey') @Post('/connections/:connectionId/accept-response') public async acceptResponse( @Path('connectionId') connectionId: RecordId, diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index a24ae808..6954285b 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -17,7 +17,6 @@ import { CredentialEnum } from '../../enums/enum'; @Tags("MultiTenancy") @Route("/multi-tenancy") -@Security('apiKey') @injectable() export class MultiTenancyController extends Controller { private readonly agent: Agent; @@ -27,6 +26,7 @@ export class MultiTenancyController extends Controller { this.agent = agent; } + @Security('apiKey') @Post("/create-tenant") public async createTenant( @Body() createTenantOptions: CreateTenantOptions, @@ -248,6 +248,7 @@ export class MultiTenancyController extends Controller { }); } + @Security('apiKey') @Post('/transactions/set-endorser-role/:tenantId') public async didNymTransaction( @Path("tenantId") tenantId: string, @@ -278,6 +279,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/transactions/endorse/:tenantId') public async endorserTransaction( @Path("tenantId") tenantId: string, @@ -308,6 +310,7 @@ export class MultiTenancyController extends Controller { } @Example(ConnectionRecordExample) + @Security('apiKey') @Get('/connections/:connectionId/:tenantId') public async getConnectionById( @Path("tenantId") tenantId: string, @@ -323,7 +326,7 @@ export class MultiTenancyController extends Controller { return connection.toJSON() } - + @Security('apiKey') @Post('/create-invitation/:tenantId') public async createInvitation( @Res() internalServerError: TsoaResponse<500, { message: string }>, @@ -349,6 +352,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/create-legacy-invitation/:tenantId') public async createLegacyInvitation( @Res() internalServerError: TsoaResponse<500, { message: string }>, @@ -376,6 +380,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/receive-invitation/:tenantId') public async receiveInvitation( @Body() invitationRequest: ReceiveInvitationProps, @@ -399,6 +404,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/receive-invitation-url/:tenantId') public async receiveInvitationFromUrl( @Body() invitationRequest: ReceiveInvitationByUrlProps, @@ -421,6 +427,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Get('/oob/:invitationId/:tenantId') public async getAllOutOfBandRecords( @Path('tenantId') tenantId: string, @@ -441,6 +448,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Get('/connections/:tenantId') public async getAllConnections( @Path('tenantId') tenantId: string, @@ -494,6 +502,7 @@ export class MultiTenancyController extends Controller { return invitationJson; } + @Security('apiKey') @Post('/schema/:tenantId') public async createSchema( @Body() @@ -576,6 +585,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/transactions/write/:tenantId') public async writeSchemaAndCredDefOnLedger( @Path("tenantId") tenantId: string, @@ -707,6 +717,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Get('/schema/:schemaId/:tenantId') public async getSchemaById( @Path('schemaId') schemaId: SchemaId, @@ -744,6 +755,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/credential-definition/:tenantId') public async createCredentialDefinition( @Body() @@ -816,6 +828,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Get('/credential-definition/:credentialDefinitionId/:tenantId') public async getCredentialDefinitionById( @Path('credentialDefinitionId') credentialDefinitionId: CredentialDefinitionId, @@ -846,6 +859,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/credentials/create-offer/:tenantId') public async createOffer( @Body() createOfferOptions: CreateOfferOptions, @@ -868,6 +882,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/credentials/create-offer-oob/:tenantId') public async createOfferOob( @Path('tenantId') tenantId: string, @@ -912,6 +927,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/credentials/accept-offer/:tenantId') public async acceptOffer( @Res() notFoundError: TsoaResponse<404, { reason: string }>, @@ -945,6 +961,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Get('/credentials/:credentialRecordId/:tenantId') public async getCredentialById( @Path('credentialRecordId') credentialRecordId: RecordId, @@ -969,6 +986,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Get('/credentials/:tenantId') public async getAllCredentials( @Path('tenantId') tenantId: string, @@ -989,6 +1007,7 @@ export class MultiTenancyController extends Controller { return credentials.map((c: any) => c.toJSON()) } + @Security('apiKey') @Get('/proofs/:tenantId') public async getAllProofs( @Path('tenantId') tenantId: string, @@ -1004,6 +1023,7 @@ export class MultiTenancyController extends Controller { return proofs.map((proof: any) => proof.toJSON()) } + @Security('apiKey') @Get('/form-data/:tenantId/:proofRecordId') @Example(ProofRecordExample) public async proofFormData( @@ -1029,6 +1049,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/proofs/request-proof/:tenantId') @Example(ProofRecordExample) public async requestProof( @@ -1060,6 +1081,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/proofs/create-request-oob/:tenantId') public async createRequest( @Path('tenantId') tenantId: string, @@ -1102,6 +1124,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/proofs/:proofRecordId/accept-request/:tenantId') @Example(ProofRecordExample) public async acceptRequest( @@ -1143,6 +1166,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post('/proofs/:proofRecordId/accept-presentation/:tenantId') @Example(ProofRecordExample) public async acceptPresentation( @@ -1168,6 +1192,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Get('/proofs/:proofRecordId/:tenantId') @Example(ProofRecordExample) public async getProofById( @@ -1193,6 +1218,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Get(":tenantId") public async getTenantById( @Query("tenantId") tenantId: string, @@ -1213,6 +1239,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Post("tenant") public async getTenantAgent( @Body() tenantAgentOptions: GetTenantAgentOptions, @@ -1236,6 +1263,7 @@ export class MultiTenancyController extends Controller { } } + @Security('apiKey') @Delete(":tenantId") public async deleteTenantById( @Query("tenantId") tenantId: string, diff --git a/src/securityMiddleware.ts b/src/securityMiddleware.ts index bea1f81b..762ab3d8 100644 --- a/src/securityMiddleware.ts +++ b/src/securityMiddleware.ts @@ -12,9 +12,21 @@ export class SecurityMiddleware { next: NextFunction ) { try { - const securityName = 'apiKey'; + const securityName = 'apiKey'; - if (securityName) { + // Extract route path or controller name from the request + const routePath = request.path; + + // List of paths for which authentication should be skipped + const pathsToSkipAuthentication = ['/url/', '/multi-tenancy/url/']; + + // Check if authentication should be skipped for this route or controller + const skipAuthentication = pathsToSkipAuthentication.some(path => routePath.includes(path)); + + if (skipAuthentication) { + // Skip authentication for this route or controller + next(); + } else if (securityName) { const result = await expressAuthentication(request, securityName); if (result === 'success') { @@ -30,3 +42,4 @@ export class SecurityMiddleware { } } } + From 789053da999749cada540c3de37be9e549f746c2 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Tue, 21 Nov 2023 12:11:47 +0530 Subject: [PATCH 05/23] fix: add the label on the out-of-band connection Signed-off-by: KulkarniShashank --- src/controllers/credentials/CredentialController.ts | 2 +- src/controllers/proofs/ProofController.ts | 2 +- src/controllers/types.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controllers/credentials/CredentialController.ts b/src/controllers/credentials/CredentialController.ts index 99a3bfb7..d7bcb074 100644 --- a/src/controllers/credentials/CredentialController.ts +++ b/src/controllers/credentials/CredentialController.ts @@ -221,7 +221,7 @@ export class CredentialController extends Controller { const credentialMessage = offerOob.message; const outOfBandRecord = await this.agent.oob.createInvitation({ - label: 'test-connection', + label: outOfBandOption.label, handshakeProtocols: [HandshakeProtocol.Connections], messages: [credentialMessage], autoAcceptConnection: true diff --git a/src/controllers/proofs/ProofController.ts b/src/controllers/proofs/ProofController.ts index 032453d9..e694dc2c 100644 --- a/src/controllers/proofs/ProofController.ts +++ b/src/controllers/proofs/ProofController.ts @@ -194,7 +194,7 @@ export class ProofController extends Controller { }); const proofMessage = proof.message; const outOfBandRecord = await this.agent.oob.createInvitation({ - label: 'test-connection', + label: createRequestOptions.label, handshakeProtocols: [HandshakeProtocol.Connections], messages: [proofMessage], autoAcceptConnection: true diff --git a/src/controllers/types.ts b/src/controllers/types.ts index 8f36c3aa..ddd420e0 100644 --- a/src/controllers/types.ts +++ b/src/controllers/types.ts @@ -136,6 +136,7 @@ export interface CreateOfferOobOptions { goalCode?: string; parentThreadId?: string; willConfirm?: boolean; + label?: string; } export interface CredentialCreateOfferOptions { credentialRecord: CredentialExchangeRecord; @@ -152,6 +153,7 @@ export interface CreateProofRequestOobOptions { willConfirm?: boolean; autoAcceptProof?: AutoAcceptProof; comment?: string; + label?: string; } export interface OfferCredentialOptions { From 8792b19ca5f6a96cd7c0065bc06ce78e45359612 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Tue, 21 Nov 2023 12:32:44 +0530 Subject: [PATCH 06/23] fix: add the label on the out-of-band connection in mutli-tenancy Signed-off-by: KulkarniShashank --- src/controllers/multi-tenancy/MultiTenancyController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index 6954285b..79e4bd08 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -905,7 +905,7 @@ export class MultiTenancyController extends Controller { const credentialMessage = offerOob.message; const outOfBandRecord = await tenantAgent.oob.createInvitation({ - label: 'test-connection', + label: createOfferOptions.label, handshakeProtocols: [HandshakeProtocol.Connections], messages: [credentialMessage], autoAcceptConnection: true @@ -1102,7 +1102,7 @@ export class MultiTenancyController extends Controller { const proofMessage = proof.message; const outOfBandRecord = await tenantAgent.oob.createInvitation({ - label: 'test-connection', + label: createRequestOptions.label, handshakeProtocols: [HandshakeProtocol.Connections], messages: [proofMessage], autoAcceptConnection: true From 2b9418581c6cb3b0182b7d8e35041110f95bfcf4 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Tue, 21 Nov 2023 14:13:04 +0530 Subject: [PATCH 07/23] Added limit as a infinity in tenant session Signed-off-by: KulkarniShashank --- src/cliAgent.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 32320c74..66dee124 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -77,7 +77,10 @@ export type RestAgentModules = Awaited> const getWithTenantModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) => { const modules = getModules(networkConfig) return { - tenants: new TenantsModule({ sessionAcquireTimeout: Infinity, sessionLimit: Infinity }), + tenants: new TenantsModule({ + sessionAcquireTimeout: Infinity, + sessionLimit: Infinity + }), ...modules } } From 09e245f42a77199c81c2f9a8801aa5d43ced8671 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Wed, 22 Nov 2023 14:28:17 +0530 Subject: [PATCH 08/23] fix: delete multi-tenancy by tenant Id Signed-off-by: KulkarniShashank --- src/controllers/multi-tenancy/MultiTenancyController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index 79e4bd08..62aa19f1 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -1221,7 +1221,7 @@ export class MultiTenancyController extends Controller { @Security('apiKey') @Get(":tenantId") public async getTenantById( - @Query("tenantId") tenantId: string, + @Path("tenantId") tenantId: string, @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { @@ -1266,7 +1266,7 @@ export class MultiTenancyController extends Controller { @Security('apiKey') @Delete(":tenantId") public async deleteTenantById( - @Query("tenantId") tenantId: string, + @Path("tenantId") tenantId: string, @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { From c3a0d349b306065fcf0067acbe976536261b313f Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Fri, 24 Nov 2023 16:56:16 +0530 Subject: [PATCH 09/23] feat: Added the author agreement wallet version for indicio:mainnet Signed-off-by: KulkarniShashank --- src/cliAgent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 66dee124..dfa68748 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -180,7 +180,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { if (ledgerConfig.indyNamespace.includes('indicio')) { - if (ledgerConfig.indyNamespace === 'indicio:testnet') { + if (ledgerConfig.indyNamespace === 'indicio:testnet' || ledgerConfig.indyNamespace === 'indicio:mainnet' ) { networkConfig.transactionAuthorAgreement = { version: '1.0', acceptanceMechanism: 'wallet_agreement', From 2130e567b5eb7f54f5c432f3969099b94b20d708 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Thu, 28 Dec 2023 16:20:02 +0530 Subject: [PATCH 10/23] Remove authentication agent status Signed-off-by: KulkarniShashank --- src/controllers/agent/AgentController.ts | 2 +- src/securityMiddleware.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/agent/AgentController.ts b/src/controllers/agent/AgentController.ts index 4eb76bee..d4d7df4b 100644 --- a/src/controllers/agent/AgentController.ts +++ b/src/controllers/agent/AgentController.ts @@ -6,7 +6,6 @@ import { injectable } from 'tsyringe' @Tags('Agent') @Route('/agent') -@Security('apiKey') @injectable() export class AgentController extends Controller { private agent: Agent @@ -32,6 +31,7 @@ export class AgentController extends Controller { /** * Delete wallet */ + @Security('apiKey') @Delete('/wallet') public async deleteWallet() { const deleteWallet = await this.agent.wallet.delete(); diff --git a/src/securityMiddleware.ts b/src/securityMiddleware.ts index 762ab3d8..9d8698a4 100644 --- a/src/securityMiddleware.ts +++ b/src/securityMiddleware.ts @@ -18,7 +18,7 @@ export class SecurityMiddleware { const routePath = request.path; // List of paths for which authentication should be skipped - const pathsToSkipAuthentication = ['/url/', '/multi-tenancy/url/']; + const pathsToSkipAuthentication = ['/url/', '/multi-tenancy/url/', '/agent']; // Check if authentication should be skipped for this route or controller const skipAuthentication = pathsToSkipAuthentication.some(path => routePath.includes(path)); From 8265faf7dd51a003a845ebaa0f0270a19848f0fb Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Fri, 29 Dec 2023 18:31:54 +0530 Subject: [PATCH 11/23] Remove console.log on the cliAgent file Signed-off-by: KulkarniShashank --- src/cliAgent.ts | 1 - src/controllers/credentials/CredentialController.ts | 1 - src/controllers/multi-tenancy/MultiTenancyController.ts | 1 - src/controllers/outofband/OutOfBandController.ts | 1 - 4 files changed, 4 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index dfa68748..75d08b41 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -265,7 +265,6 @@ export async function runRestAgent(restConfig: AriesRestConfig) { // Call the async function const secretKeyInfo: string = await generateSecretKey(); - console.log("secretKey", secretKeyInfo); await agent.initialize() diff --git a/src/controllers/credentials/CredentialController.ts b/src/controllers/credentials/CredentialController.ts index d7bcb074..177c0a84 100644 --- a/src/controllers/credentials/CredentialController.ts +++ b/src/controllers/credentials/CredentialController.ts @@ -195,7 +195,6 @@ export class CredentialController extends Controller { credentialFormats: createOfferOptions.credentialFormats, autoAcceptCredential: createOfferOptions.autoAcceptCredential }) - console.log(offer) return offer; } catch (error) { return internalServerError(500, { message: `something went wrong: ${error}` }) diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index 62aa19f1..4fae946e 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -1070,7 +1070,6 @@ export class MultiTenancyController extends Controller { parentThreadId: requestProofOptions.parentThreadId, willConfirm: requestProofOptions.willConfirm } - console.log(requestProofPayload); const proof = await tenantAgent.proofs.requestProof(requestProofPayload) await tenantAgent.endSession(); diff --git a/src/controllers/outofband/OutOfBandController.ts b/src/controllers/outofband/OutOfBandController.ts index 264a7e14..61221149 100644 --- a/src/controllers/outofband/OutOfBandController.ts +++ b/src/controllers/outofband/OutOfBandController.ts @@ -84,7 +84,6 @@ export class OutOfBandController extends Controller { @Body() config: CreateInvitationOptions // props removed because of issues with serialization ) { try { - console.log(config); const outOfBandRecord = await this.agent.oob.createInvitation(config) return { invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ From 7ee6a95be4cdb7b5c979baf440072e87835ebd03 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Thu, 11 Jan 2024 12:31:32 +0530 Subject: [PATCH 12/23] Patch the aries-framework-core package Signed-off-by: KulkarniShashank --- package.json | 4 +- patches/@aries-framework+core+0.4.2.patch | 51 +++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 patches/@aries-framework+core+0.4.2.patch diff --git a/package.json b/package.json index ba619d17..be31b53d 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "clean": "rimraf -rf ./build", "compile": "tsoa spec-and-routes && tsc -p tsconfig.build.json", "prepublishOnly": "yarn run build", - "test": "jest" + "test": "jest", + "postinstall": "patch-package" }, "dependencies": { "@2060.io/ref-napi": "^3.0.6", @@ -37,6 +38,7 @@ "@aries-framework/core": "^0.4.2", "@aries-framework/indy-vdr": "^0.4.2", "@aries-framework/node": "^0.4.2", + "@aries-framework/push-notifications": "^0.6.0", "@aries-framework/tenants": "^0.4.2", "@hyperledger/anoncreds-nodejs": "^0.1.0", "@hyperledger/aries-askar-nodejs": "^0.1.1", diff --git a/patches/@aries-framework+core+0.4.2.patch b/patches/@aries-framework+core+0.4.2.patch new file mode 100644 index 00000000..22bd8999 --- /dev/null +++ b/patches/@aries-framework+core+0.4.2.patch @@ -0,0 +1,51 @@ +diff --git a/node_modules/@aries-framework/core/build/agent/EnvelopeService.js b/node_modules/@aries-framework/core/build/agent/EnvelopeService.js +index 12261a9..0cdb7b3 100644 +--- a/node_modules/@aries-framework/core/build/agent/EnvelopeService.js ++++ b/node_modules/@aries-framework/core/build/agent/EnvelopeService.js +@@ -32,6 +32,7 @@ let EnvelopeService = class EnvelopeService { + let encryptedMessage = await agentContext.wallet.pack(message, recipientKeysBase58, senderKeyBase58 !== null && senderKeyBase58 !== void 0 ? senderKeyBase58 : undefined); + // If the message has routing keys (mediator) pack for each mediator + for (const routingKeyBase58 of routingKeysBase58) { ++ console.log(`message['@type']`, JSON.stringify(message['@type'])) + const forwardMessage = new messages_1.ForwardMessage({ + // Forward to first recipient key + to: recipientKeysBase58[0], +@@ -39,6 +40,7 @@ let EnvelopeService = class EnvelopeService { + }); + recipientKeysBase58 = [routingKeyBase58]; + this.logger.debug('Forward message created', forwardMessage); ++ forwardMessage["messageType"] = message['@type']; + const forwardJson = forwardMessage.toJSON({ + useDidSovPrefixWhereAllowed: agentContext.config.useDidSovPrefixWhereAllowed, + }); +diff --git a/node_modules/@aries-framework/core/build/modules/routing/messages/ForwardMessage.d.ts b/node_modules/@aries-framework/core/build/modules/routing/messages/ForwardMessage.d.ts +index 4f8577b..396f78a 100644 +--- a/node_modules/@aries-framework/core/build/modules/routing/messages/ForwardMessage.d.ts ++++ b/node_modules/@aries-framework/core/build/modules/routing/messages/ForwardMessage.d.ts +@@ -3,6 +3,7 @@ import { EncryptedMessage } from '../../../types'; + export interface ForwardMessageOptions { + id?: string; + to: string; ++ messageType: string; + message: EncryptedMessage; + } + /** +@@ -19,5 +20,6 @@ export declare class ForwardMessage extends AgentMessage { + readonly type: string; + static readonly type: import("../../../utils/messageType").ParsedMessageType; + to: string; ++ messageType: string; + message: EncryptedMessage; + } +diff --git a/node_modules/@aries-framework/core/build/types.d.ts b/node_modules/@aries-framework/core/build/types.d.ts +index c3e854d..f029ab7 100644 +--- a/node_modules/@aries-framework/core/build/types.d.ts ++++ b/node_modules/@aries-framework/core/build/types.d.ts +@@ -80,6 +80,7 @@ export interface PlaintextMessage { + thid?: string; + pthid?: string; + }; ++ messageType: string; + [key: string]: unknown; + } + export interface OutboundPackage { From 76fb973fac7c0274bfa45e0dd35fdb5872d63420 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Wed, 17 Jan 2024 17:18:14 +0530 Subject: [PATCH 13/23] refactor: added and store the token for get the constant token Signed-off-by: KulkarniShashank --- samples/cliConfig.json | 3 +- src/cliAgent.ts | 72 +++++++++++++++++++++++------------------- 2 files changed, 41 insertions(+), 34 deletions(-) diff --git a/samples/cliConfig.json b/samples/cliConfig.json index a91c715d..b04f2d04 100644 --- a/samples/cliConfig.json +++ b/samples/cliConfig.json @@ -42,6 +42,5 @@ ], "autoAcceptMediationRequests": false, "adminPort": 4001, - "tenancy": true, - "apiKey": "apiKey" + "tenancy": true } \ No newline at end of file diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 75d08b41..56331fa2 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -180,7 +180,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { if (ledgerConfig.indyNamespace.includes('indicio')) { - if (ledgerConfig.indyNamespace === 'indicio:testnet' || ledgerConfig.indyNamespace === 'indicio:mainnet' ) { + if (ledgerConfig.indyNamespace === 'indicio:testnet' || ledgerConfig.indyNamespace === 'indicio:mainnet') { networkConfig.transactionAuthorAgreement = { version: '1.0', acceptanceMechanism: 'wallet_agreement', @@ -239,45 +239,51 @@ export async function runRestAgent(restConfig: AriesRestConfig) { agent.registerInboundTransport(new InboundTransport({ port: inboundTransport.port })) } - async function generateSecretKey(length: number = 32): Promise { - try { - // Asynchronously generate a buffer containing random values - const buffer: Buffer = await new Promise((resolve, reject) => { - randomBytes(length, (error, buf) => { - if (error) { - reject(error); - } else { - resolve(buf); - } + + await agent.initialize() + + let token: string = ''; + const genericRecord = await agent.genericRecords.getAll(); + if (genericRecord.length === 0) { + + async function generateSecretKey(length: number = 32): Promise { + try { + // Asynchronously generate a buffer containing random values + const buffer: Buffer = await new Promise((resolve, reject) => { + randomBytes(length, (error, buf) => { + if (error) { + reject(error); + } else { + resolve(buf); + } + }); }); - }); - // Convert the buffer to a hexadecimal string - const secretKey: string = buffer.toString("hex"); + // Convert the buffer to a hexadecimal string + const secretKey: string = buffer.toString("hex"); - return secretKey; - } catch (error) { - // Handle any errors that might occur during key generation - console.error("Error generating secret key:", error); - throw error; + return secretKey; + } catch (error) { + // Handle any errors that might occur during key generation + logger.error(`Error generating secret key: ${error}`); + throw error; + } } - } - // Call the async function - const secretKeyInfo: string = await generateSecretKey(); + const secretKeyInfo: string = await generateSecretKey(); - await agent.initialize() + token = jwt.sign({ agentInfo: 'agentInfo' }, secretKeyInfo); - const getData = await agent.genericRecords.save({ - content: { - secretKey: secretKeyInfo, - }, - }); - const getGenericRecord = await agent.genericRecords.findById(getData.id); - const secretKey = getGenericRecord?.content.secretKey as string; - const token = jwt.sign({ agentInfo: 'agentInfo' }, secretKey); + await agent.genericRecords.save({ + content: { + secretKey: secretKeyInfo, + token + }, + }); + } else { + token = genericRecord[0]?.content?.token as string; + } - console.log("token", token) const app = await setupServer(agent, { webhookUrl, port: adminPort, @@ -285,6 +291,8 @@ export async function runRestAgent(restConfig: AriesRestConfig) { token ) + logger.info(`\n*** API Toekn: ${token}`); + app.listen(adminPort, () => { logger.info(`Successfully started server on port ${adminPort}`) }) From c461c8a842c8399c720c28dd7afa998df09b6441 Mon Sep 17 00:00:00 2001 From: pallavicoder Date: Fri, 12 Jan 2024 16:46:20 +0530 Subject: [PATCH 14/23] feat:did:web didDocument creation Signed-off-by: pallavicoder --- .../multi-tenancy/MultiTenancyController.ts | 52 ++++++++++++++++++- src/controllers/types.ts | 5 +- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index 4fae946e..edde9df3 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -1,5 +1,5 @@ -import { AcceptCredentialOfferOptions, AcceptProofRequestOptions, Agent, AriesFrameworkError, Buffer, CacheModule, ConnectionRecordProps, ConnectionRepository, ConnectionsModule, CreateOutOfBandInvitationConfig, CredentialProtocolVersionType, CredentialRepository, CredentialState, CredentialsModule, DidDocumentBuilder, DidExchangeState, DidsModule, HandshakeProtocol, JsonLdCredentialFormatService, JsonTransformer, KeyDidCreateOptions, KeyType, OutOfBandInvitation, ProofExchangeRecordProps, ProofsModule, ProofsProtocolVersionType, RecordNotFoundError, TypedArrayEncoder, V2CredentialProtocol, V2ProofProtocol, W3cCredentialsModule, getEd25519VerificationKey2018, injectable } from '@aries-framework/core' -import { CreateOfferOobOptions, CreateOfferOptions, CreateProofRequestOobOptions, CreateTenantOptions, DidNymTransaction, EndorserTransaction, GetTenantAgentOptions, ReceiveInvitationByUrlProps, ReceiveInvitationProps, WithTenantAgentOptions, WriteTransaction } from '../types'; +import { AcceptCredentialOfferOptions, AcceptProofRequestOptions, Agent, AriesFrameworkError, Buffer, CacheModule, ConnectionRecordProps, ConnectionRepository, ConnectionsModule, CreateOutOfBandInvitationConfig, CredentialProtocolVersionType, CredentialRepository, CredentialState, CredentialsModule, DidDocument, DidDocumentBuilder, DidExchangeState, DidsModule, HandshakeProtocol, JsonLdCredentialFormatService, JsonTransformer, KeyDidCreateOptions, KeyType, OutOfBandInvitation, ProofExchangeRecordProps, ProofsModule, ProofsProtocolVersionType, RecordNotFoundError, TypedArrayEncoder, V2CredentialProtocol, V2ProofProtocol, W3cCredentialsModule, getBls12381G2Key2020, getEd25519VerificationKey2018, injectable } from '@aries-framework/core' +import { CreateOfferOobOptions, CreateOfferOptions, CreateProofRequestOobOptions, CreateTenantOptions, DidCreate, DidNymTransaction, EndorserTransaction, GetTenantAgentOptions, ReceiveInvitationByUrlProps, ReceiveInvitationProps, WithTenantAgentOptions, WriteTransaction } from '../types'; import { Body, Controller, Delete, Get, Post, Query, Res, Route, Tags, TsoaResponse, Path, Example, Security } from 'tsoa' import axios from 'axios'; import { TenantRecord } from '@aries-framework/tenants'; @@ -1405,4 +1405,52 @@ export class MultiTenancyController extends Controller { await tenantAgent.endSession(); return ({ CredentialExchangeRecord: acceptOffer }); } + +@Security('apiKey') + @Post("/did/web/:tenantId") + public async createDidWeb( + @Path("tenantId") tenantId: string, + @Body() didOptions: DidCreate, + @Res() internalServerError: TsoaResponse<500, { message: string }> + ) { + try { + const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ + tenantId, + }); + + if(!didOptions.keyType){ + throw Error('keyType is required') + } + const did = `did:${didOptions.method}:${didOptions.domain}` + let didDocument:any + const keyId = `${did}#key-1` + const key = await tenantAgent.wallet.createKey({ + keyType:didOptions.keyType, + seed:TypedArrayEncoder.fromString(didOptions.seed) + }) + if(didOptions.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(didOptions.keyType === "bls12381g2"){ + didDocument = new DidDocumentBuilder(did) + .addContext('https://w3id.org/security/bbs/v1') + .addVerificationMethod(getBls12381G2Key2020({ key, id: keyId, controller: did })) + .addAuthentication(keyId) + .build() + } + + return { + did, + didDocument:didDocument.toJSON() + } + } catch (error) { + return internalServerError(500, { + message: `something went wrong: ${error}`, + }); + } + } + } diff --git a/src/controllers/types.ts b/src/controllers/types.ts index ddd420e0..d64ed1dd 100644 --- a/src/controllers/types.ts +++ b/src/controllers/types.ts @@ -36,7 +36,8 @@ import type { JsonCredential, AgentMessage, Routing, - Attachment + Attachment, + KeyType } from '@aries-framework/core' import type { @@ -48,6 +49,7 @@ import type { import type { DIDDocument } from 'did-resolver' import { Version } from './examples'; + export type TenantConfig = Pick & { walletConfig: Pick; }; @@ -316,6 +318,7 @@ export interface DidCreate { secret?: DidRegistrationSecretOptions; endorserDid?: string; didDocument?: DidDocument; + keyType?:KeyType } export interface CreateTenantOptions { From 7515f87e9770ff7fcd3fa38af4c7f9e2b25aa388 Mon Sep 17 00:00:00 2001 From: pallavicoder Date: Fri, 12 Jan 2024 17:08:45 +0530 Subject: [PATCH 15/23] fix:updated gitignore file Signed-off-by: pallavicoder --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6a7d6d8e..6b5d35c8 100644 --- a/.gitignore +++ b/.gitignore @@ -127,4 +127,6 @@ dist .yarn/unplugged .yarn/build-state.yml .yarn/install-state.gz -.pnp.* \ No newline at end of file +.pnp.* +build +logs.txt \ No newline at end of file From ce290c2380c764f646ac8e6f7dfbd77bc9ad339a Mon Sep 17 00:00:00 2001 From: pallavicoder Date: Fri, 12 Jan 2024 17:25:35 +0530 Subject: [PATCH 16/23] fix:error handling for key type Signed-off-by: pallavicoder --- src/controllers/multi-tenancy/MultiTenancyController.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index edde9df3..6aa54144 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -1421,6 +1421,9 @@ export class MultiTenancyController extends Controller { if(!didOptions.keyType){ throw Error('keyType is required') } + if(didOptions.keyType !== KeyType.Ed25519 && didOptions.keyType !== KeyType.Bls12381g2 ){ + throw Error('Only ed25519 and bls12381g2 type supported') + } const did = `did:${didOptions.method}:${didOptions.domain}` let didDocument:any const keyId = `${did}#key-1` From b00f7a0a13df1269eb41e3db1b1996e7ec10c64d Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Wed, 17 Jan 2024 17:22:50 +0530 Subject: [PATCH 17/23] added comments for the token functionality Signed-off-by: KulkarniShashank --- src/cliAgent.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 56331fa2..3d94279e 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -270,7 +270,15 @@ export async function runRestAgent(restConfig: AriesRestConfig) { } } + // Call the async function const secretKeyInfo: string = await generateSecretKey(); + // Check if the secretKey already exist in the genericRecords + + // if already exist - then don't generate the secret key again + // Check if the JWT token already available in genericRecords - if yes, and also don't generate the JWT token + // instead use the existin JWT token + // if JWT token is not found, create/generate a new token and save in genericRecords + // next time, the same token should be used - instead of creating a new token on every restart event of the agent token = jwt.sign({ agentInfo: 'agentInfo' }, secretKeyInfo); From d743907142a947fae32a025ddcfe766cce9e1ea8 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Mon, 22 Jan 2024 11:09:45 +0530 Subject: [PATCH 18/23] Set infinity in agent session Signed-off-by: KulkarniShashank --- src/cli.ts | 4 +--- src/cliAgent.ts | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index dc81599d..7da0b49e 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -166,9 +166,7 @@ export async function runCliServer() { type: parsed['wallet-type'], config: { host: parsed['wallet-url'], - connectTimeout: 10, - maxConnections: 1000, - idleTimeout: 30000 + connectTimeout: 10 }, credentials: { account: parsed["wallet-account"], diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 3d94279e..a938d8c7 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -244,6 +244,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { let token: string = ''; const genericRecord = await agent.genericRecords.getAll(); + console.log(genericRecord) if (genericRecord.length === 0) { async function generateSecretKey(length: number = 32): Promise { @@ -299,7 +300,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { token ) - logger.info(`\n*** API Toekn: ${token}`); + logger.info(`*** API Toekn: ${token}`); app.listen(adminPort, () => { logger.info(`Successfully started server on port ${adminPort}`) From 59228b73a4c4ee5530f13fb36d2682cd502d3ff1 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Tue, 23 Jan 2024 10:40:32 +0530 Subject: [PATCH 19/23] Add sessionLimit as a infinity Signed-off-by: KulkarniShashank --- src/cliAgent.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cliAgent.ts b/src/cliAgent.ts index a938d8c7..1d3579d1 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -78,7 +78,6 @@ const getWithTenantModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolC const modules = getModules(networkConfig) return { tenants: new TenantsModule({ - sessionAcquireTimeout: Infinity, sessionLimit: Infinity }), ...modules @@ -245,7 +244,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { let token: string = ''; const genericRecord = await agent.genericRecords.getAll(); console.log(genericRecord) - if (genericRecord.length === 0) { + if (genericRecord.length === 0 || genericRecord.some(record => record?.content?.token === undefined)) { async function generateSecretKey(length: number = 32): Promise { try { @@ -280,9 +279,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { // instead use the existin JWT token // if JWT token is not found, create/generate a new token and save in genericRecords // next time, the same token should be used - instead of creating a new token on every restart event of the agent - token = jwt.sign({ agentInfo: 'agentInfo' }, secretKeyInfo); - await agent.genericRecords.save({ content: { secretKey: secretKeyInfo, From fdb6d540c1fa2f3f0d0a332fd1d3fc8b66236515 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Tue, 23 Jan 2024 21:35:35 +0530 Subject: [PATCH 20/23] fix: Add configuration in cli.ts Signed-off-by: KulkarniShashank --- src/cli.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index 7da0b49e..74a1d750 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -166,7 +166,9 @@ export async function runCliServer() { type: parsed['wallet-type'], config: { host: parsed['wallet-url'], - connectTimeout: 10 + connectTimeout: 10, + maxConnections: 50000, + idleTimeout: 30000 }, credentials: { account: parsed["wallet-account"], From 344c897f96756e41f37ee27ab3b57e84d3c4780d Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Tue, 30 Jan 2024 19:05:52 +0530 Subject: [PATCH 21/23] refactor: added the withTenantAgent function for session management for multi-tenancy Signed-off-by: KulkarniShashank --- src/cli.ts | 4 +- src/cliAgent.ts | 12 +- .../multi-tenancy/MultiTenancyController.ts | 1034 ++++++++--------- 3 files changed, 521 insertions(+), 529 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 74a1d750..518d9923 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -167,8 +167,8 @@ export async function runCliServer() { config: { host: parsed['wallet-url'], connectTimeout: 10, - maxConnections: 50000, - idleTimeout: 30000 + maxConnections: 1000, + idleTimeout: 10000 }, credentials: { account: parsed["wallet-account"], diff --git a/src/cliAgent.ts b/src/cliAgent.ts index 1d3579d1..a1ad7add 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -78,7 +78,8 @@ const getWithTenantModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolC const modules = getModules(networkConfig) return { tenants: new TenantsModule({ - sessionLimit: Infinity + sessionLimit: 1000, + sessionAcquireTimeout: 1000 }), ...modules } @@ -243,8 +244,9 @@ export async function runRestAgent(restConfig: AriesRestConfig) { let token: string = ''; const genericRecord = await agent.genericRecords.getAll(); - console.log(genericRecord) - if (genericRecord.length === 0 || genericRecord.some(record => record?.content?.token === undefined)) { + + const recordsWithToken = genericRecord.some(record => record?.content?.token); + if (genericRecord.length === 0 || recordsWithToken === false) { async function generateSecretKey(length: number = 32): Promise { try { @@ -287,7 +289,8 @@ export async function runRestAgent(restConfig: AriesRestConfig) { }, }); } else { - token = genericRecord[0]?.content?.token as string; + const recordWithToken = genericRecord.find(record => record?.content?.token !== undefined); + token = recordWithToken?.content.token as string; } const app = await setupServer(agent, { @@ -303,3 +306,4 @@ export async function runRestAgent(restConfig: AriesRestConfig) { logger.info(`Successfully started server on port ${adminPort}`) }) } + \ No newline at end of file diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index 6aa54144..8257a939 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -1,11 +1,11 @@ -import { AcceptCredentialOfferOptions, AcceptProofRequestOptions, Agent, AriesFrameworkError, Buffer, CacheModule, ConnectionRecordProps, ConnectionRepository, ConnectionsModule, CreateOutOfBandInvitationConfig, CredentialProtocolVersionType, CredentialRepository, CredentialState, CredentialsModule, DidDocument, DidDocumentBuilder, DidExchangeState, DidsModule, HandshakeProtocol, JsonLdCredentialFormatService, JsonTransformer, KeyDidCreateOptions, KeyType, OutOfBandInvitation, ProofExchangeRecordProps, ProofsModule, ProofsProtocolVersionType, RecordNotFoundError, TypedArrayEncoder, V2CredentialProtocol, V2ProofProtocol, W3cCredentialsModule, getBls12381G2Key2020, getEd25519VerificationKey2018, injectable } from '@aries-framework/core' +import { AcceptCredentialOfferOptions, AcceptProofRequestOptions, Agent, AriesFrameworkError, Buffer, CacheModule, ConnectionInvitationMessage, ConnectionRecord, ConnectionRecordProps, ConnectionRepository, ConnectionsModule, CreateOutOfBandInvitationConfig, CredentialProtocolVersionType, CredentialRepository, CredentialState, CredentialsModule, DidDocument, DidDocumentBuilder, DidExchangeState, DidsModule, HandshakeProtocol, JsonLdCredentialFormatService, JsonTransformer, KeyDidCreateOptions, KeyType, OutOfBandInvitation, OutOfBandRecord, ProofExchangeRecordProps, ProofsModule, ProofsProtocolVersionType, RecordNotFoundError, TypedArrayEncoder, V2CredentialProtocol, V2ProofProtocol, W3cCredentialsModule, getBls12381G2Key2020, getEd25519VerificationKey2018, injectable } from '@aries-framework/core' import { CreateOfferOobOptions, CreateOfferOptions, CreateProofRequestOobOptions, CreateTenantOptions, DidCreate, DidNymTransaction, EndorserTransaction, GetTenantAgentOptions, ReceiveInvitationByUrlProps, ReceiveInvitationProps, WithTenantAgentOptions, WriteTransaction } from '../types'; import { Body, Controller, Delete, Get, Post, Query, Res, Route, Tags, TsoaResponse, Path, Example, Security } from 'tsoa' import axios from 'axios'; import { TenantRecord } from '@aries-framework/tenants'; import { getUnqualifiedSchemaId, getUnqualifiedCredentialDefinitionId, AnonCredsCredentialFormatService, AnonCredsModule, AnonCredsProofFormatService, LegacyIndyCredentialFormatService, LegacyIndyProofFormatService, V1CredentialProtocol, V1ProofProtocol, parseIndyCredentialDefinitionId, parseIndySchemaId } from '@aries-framework/anoncreds' import { Version, SchemaId, CredentialDefinitionId, RecordId, ProofRecordExample, ConnectionRecordExample } from '../examples'; -import { IndyVdrAnonCredsRegistry, IndyVdrDidCreateOptions, IndyVdrDidCreateResult, IndyVdrModule } from '@aries-framework/indy-vdr' +import { IndyVdrDidCreateOptions, IndyVdrDidCreateResult, IndyVdrModule } from '@aries-framework/indy-vdr' import { AnonCredsError } from '@aries-framework/anoncreds' import { RequestProofOptions } from '../types'; import { BCOVRIN_REGISTER_URL, INDICIO_NYM_URL } from '../../utils/util' @@ -35,40 +35,39 @@ export class MultiTenancyController extends Controller { ) { const { config } = createTenantOptions; const tenantRecord: TenantRecord = await this.agent.modules.tenants.createTenant({ config }); - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId: tenantRecord.id }); + let didRes; try { + await this.agent.modules.tenants.withTenantAgent({ tenantId: tenantRecord.id }, async (tenantAgent) => { + createTenantOptions.role = createTenantOptions.role || 'endorser'; + createTenantOptions.method = createTenantOptions.method ?? 'bcovrin:testnet'; + const didMethod = `did:indy:${createTenantOptions.method}`; - createTenantOptions.role = createTenantOptions.role || 'endorser'; - createTenantOptions.method = createTenantOptions.method ?? 'bcovrin:testnet'; - const didMethod = `did:indy:${createTenantOptions.method}`; + let result; + if (createTenantOptions.method.includes('bcovrin')) { - let result; + result = await this.handleBcovrin(createTenantOptions, tenantAgent, didMethod); + } else if (createTenantOptions.method.includes('indicio')) { - if (createTenantOptions.method.includes('bcovrin')) { + result = await this.handleIndicio(createTenantOptions, tenantAgent, didMethod); + } else if (createTenantOptions.method === 'key') { - result = await this.handleBcovrin(createTenantOptions, tenantAgent, didMethod); - } else if (createTenantOptions.method.includes('indicio')) { + result = await this.handleKey(createTenantOptions, tenantAgent); + } else if (createTenantOptions.method === 'web') { - result = await this.handleIndicio(createTenantOptions, tenantAgent, didMethod); - } else if (createTenantOptions.method === 'key') { - - result = await this.handleKey(createTenantOptions, tenantAgent); - } else if (createTenantOptions.method === 'web') { - - result = await this.handleWeb(createTenantOptions, tenantAgent); - } else { - return internalServerError(500, { message: `Invalid method: ${createTenantOptions.method}` }); - } + result = await this.handleWeb(createTenantOptions, tenantAgent); + } else { + return internalServerError(500, { message: `Invalid method: ${createTenantOptions.method}` }); + } + didRes = { tenantRecord, ...result }; + }) - await tenantAgent.endSession(); - return { tenantRecord, ...result }; + return didRes; } catch (error) { if (error instanceof RecordNotFoundError) { return notFoundError(404, { reason: `Tenant not created`, }); } - await tenantAgent.endSession(); return internalServerError(500, { message: `Something went wrong: ${error}` }); } } @@ -255,26 +254,28 @@ export class MultiTenancyController extends Controller { @Body() didNymTransaction: DidNymTransaction, @Res() internalServerError: TsoaResponse<500, { message: string }>, ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId: tenantId }); + let didCreateSubmitResult; try { - const didCreateSubmitResult = await tenantAgent.dids.create({ - did: didNymTransaction.did, - options: { - endorserMode: 'external', - endorsedTransaction: { - nymRequest: didNymTransaction.nymRequest, - }, - } + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + didCreateSubmitResult = await tenantAgent.dids.create({ + did: didNymTransaction.did, + options: { + endorserMode: 'external', + endorsedTransaction: { + nymRequest: didNymTransaction.nymRequest, + }, + } + }) + await tenantAgent.dids.import({ + did: didNymTransaction.did, + overwrite: true + }); }) - await tenantAgent.dids.import({ - did: didNymTransaction.did, - overwrite: true - }); - await tenantAgent.endSession(); + return didCreateSubmitResult } catch (error) { - await tenantAgent.endSession(); + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -287,14 +288,16 @@ export class MultiTenancyController extends Controller { @Res() internalServerError: TsoaResponse<500, { message: string }>, @Res() forbiddenError: TsoaResponse<400, { reason: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let signedTransaction; try { - const signedTransaction = await tenantAgent.modules.indyVdr.endorseTransaction( - endorserTransaction.transaction, - endorserTransaction.endorserDid - ) + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + signedTransaction = await tenantAgent.modules.indyVdr.endorseTransaction( + endorserTransaction.transaction, + endorserTransaction.endorserDid + ) + }) + - await tenantAgent.endSession(); return { signedTransaction }; } catch (error) { if (error instanceof AriesFrameworkError) { @@ -304,7 +307,6 @@ export class MultiTenancyController extends Controller { }) } } - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -317,13 +319,15 @@ export class MultiTenancyController extends Controller { @Path('connectionId') connectionId: RecordId, @Res() notFoundError: TsoaResponse<404, { reason: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); - const connection = await tenantAgent.connections.findById(connectionId) + 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.` }) + if (!connection) return notFoundError(404, { reason: `connection with connection id "${connectionId}" not found.` }) + connectionRecord = connection.toJSON(); + }) - await tenantAgent.endSession(); - return connection.toJSON() + return connectionRecord; } @Security('apiKey') @@ -333,21 +337,22 @@ export class MultiTenancyController extends Controller { @Path("tenantId") tenantId: string, @Body() config?: Omit // props removed because of issues with serialization ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let outOfBandRecord: OutOfBandRecord | undefined; try { - const outOfBandRecord = await tenantAgent.oob.createInvitation(config); - await tenantAgent.endSession(); + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + outOfBandRecord = await tenantAgent.oob.createInvitation(config); + }) + return { - invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ + invitationUrl: outOfBandRecord?.outOfBandInvitation.toUrl({ domain: this.agent.config.endpoints[0], }), - invitation: outOfBandRecord.outOfBandInvitation.toJSON({ + invitation: outOfBandRecord?.outOfBandInvitation.toJSON({ useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, }), - outOfBandRecord: outOfBandRecord.toJSON(), + outOfBandRecord: outOfBandRecord?.toJSON(), } } catch (error) { - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -359,24 +364,26 @@ export class MultiTenancyController extends Controller { @Path("tenantId") tenantId: string, @Body() config?: Omit // props removed because of issues with serialization ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + + let getInvitation; try { - const { outOfBandRecord, invitation } = await tenantAgent.oob.createLegacyInvitation(config) + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const { outOfBandRecord, invitation } = await tenantAgent.oob.createLegacyInvitation(config); + getInvitation = { + invitationUrl: invitation.toUrl({ + domain: this.agent.config.endpoints[0], + useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, + }), + invitation: invitation.toJSON({ + useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, + }), + outOfBandRecord: outOfBandRecord.toJSON(), + }; + }); - await tenantAgent.endSession(); - return { - invitationUrl: invitation.toUrl({ - domain: this.agent.config.endpoints[0], - useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, - }), - invitation: invitation.toJSON({ - useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, - }), - outOfBandRecord: outOfBandRecord.toJSON(), - } + return getInvitation; } catch (error) { - await tenantAgent.endSession(); - return internalServerError(500, { message: `something went wrong: ${error}` }) + return internalServerError(500, { message: `something went wrong: ${error}` }); } } @@ -387,19 +394,22 @@ export class MultiTenancyController extends Controller { @Path("tenantId") tenantId: string, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let receiveInvitationRes; try { - const { invitation, ...config } = invitationRequest - const invite = new OutOfBandInvitation({ ...invitation, handshakeProtocols: invitation.handshake_protocols }) - const { outOfBandRecord, connectionRecord } = await tenantAgent.oob.receiveInvitation(invite, config) + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const { invitation, ...config } = invitationRequest + const invite = new OutOfBandInvitation({ ...invitation, handshakeProtocols: invitation.handshake_protocols }); + const { outOfBandRecord, connectionRecord } = await tenantAgent.oob.receiveInvitation(invite, config); + receiveInvitationRes = { + outOfBandRecord: outOfBandRecord.toJSON(), + connectionRecord: connectionRecord?.toJSON(), + } + }) - await tenantAgent.endSession(); - return { - outOfBandRecord: outOfBandRecord.toJSON(), - connectionRecord: connectionRecord?.toJSON(), - } + + return receiveInvitationRes; } catch (error) { - await tenantAgent.endSession(); + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -411,18 +421,20 @@ export class MultiTenancyController extends Controller { @Path("tenantId") tenantId: string, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let receiveInvitationUrl try { - const { invitationUrl, ...config } = invitationRequest - const { outOfBandRecord, connectionRecord } = await tenantAgent.oob.receiveInvitationFromUrl(invitationUrl, config) + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const { invitationUrl, ...config } = invitationRequest; + const { outOfBandRecord, connectionRecord } = await tenantAgent.oob.receiveInvitationFromUrl(invitationUrl, config); + receiveInvitationUrl = { + outOfBandRecord: outOfBandRecord.toJSON(), + connectionRecord: connectionRecord?.toJSON(), + } + }) - await tenantAgent.endSession(); - return { - outOfBandRecord: outOfBandRecord.toJSON(), - connectionRecord: connectionRecord?.toJSON(), - } + return receiveInvitationUrl } catch (error) { - await tenantAgent.endSession(); + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -434,16 +446,21 @@ export class MultiTenancyController extends Controller { @Res() internalServerError: TsoaResponse<500, { message: string }>, @Path('invitationId') invitationId?: string, ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let outOfBandRecordsRes; try { - let outOfBandRecords = await tenantAgent.oob.getAll() + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + let outOfBandRecords; + outOfBandRecords = await tenantAgent.oob.getAll() - if (invitationId) outOfBandRecords = outOfBandRecords.filter((o: any) => o.outOfBandInvitation.id === invitationId) - await tenantAgent.endSession(); - return outOfBandRecords.map((c: any) => c.toJSON()) + if (invitationId) outOfBandRecords = outOfBandRecords.filter((o: any) => o.outOfBandInvitation.id === invitationId); + outOfBandRecords + outOfBandRecordsRes = outOfBandRecords.map((c: any) => c.toJSON()) + }) + + return outOfBandRecordsRes; } catch (error) { - await tenantAgent.endSession(); + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -461,25 +478,29 @@ export class MultiTenancyController extends Controller { @Query('theirLabel') theirLabel?: string ) { let connections - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let connectionRecord; try { - if (outOfBandId) { - connections = await tenantAgent.connections.findAllByOutOfBandId(outOfBandId) - } else { - const connectionRepository = tenantAgent.dependencyManager.resolve(ConnectionRepository) - - const connections = await connectionRepository.findByQuery(tenantAgent.context, { - alias, - myDid, - theirDid, - theirLabel, - state, - }) - await tenantAgent.endSession(); - return connections.map((c: any) => c.toJSON()) - } + + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + if (outOfBandId) { + connections = await tenantAgent.connections.findAllByOutOfBandId(outOfBandId) + } else { + const connectionRepository = tenantAgent.dependencyManager.resolve(ConnectionRepository) + + const connections = await connectionRepository.findByQuery(tenantAgent.context, { + alias, + myDid, + theirDid, + theirLabel, + state, + }) + + connectionRecord = connections.map((c: any) => c.toJSON()) + } + }) + return connectionRecord; } catch (error) { - await tenantAgent.endSession(); + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -490,15 +511,15 @@ export class MultiTenancyController extends Controller { @Path('tenantId') tenantId: string, @Res() notFoundError: TsoaResponse<404, { reason: string }>, ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); - const outOfBandRecord = await tenantAgent.oob.findByCreatedInvitationId(invitationId) + 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') + return notFoundError(404, { reason: `connection with invitationId "${invitationId}" not found.` }) - const invitationJson = outOfBandRecord.outOfBandInvitation.toJSON({ useDidSovPrefixWhereAllowed: true }) - - await tenantAgent.endSession(); + invitationJson = outOfBandRecord.outOfBandInvitation.toJSON({ useDidSovPrefixWhereAllowed: true }); + }) return invitationJson; } @@ -518,60 +539,64 @@ export class MultiTenancyController extends Controller { @Res() forbiddenError: TsoaResponse<400, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let schemaRecord; try { - 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, - }, - }) + 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, + }, + }) - if (!schemaState.schemaId) { - throw Error('SchemaId not found') - } + if (!schemaState.schemaId) { + throw Error('SchemaId not found') + } - const indySchemaId = parseIndySchemaId(schemaState.schemaId) - const getSchemaId = await getUnqualifiedSchemaId( - indySchemaId.namespaceIdentifier, - indySchemaId.schemaName, - indySchemaId.schemaVersion - ); - if (schemaState.state === CredentialEnum.Finished) { - schemaState.schemaId = getSchemaId - } + const indySchemaId = parseIndySchemaId(schemaState.schemaId) + const getSchemaId = await getUnqualifiedSchemaId( + indySchemaId.namespaceIdentifier, + indySchemaId.schemaName, + indySchemaId.schemaVersion + ); + if (schemaState.state === CredentialEnum.Finished) { + schemaState.schemaId = getSchemaId + } - await tenantAgent.endSession(); - return schemaState; - } else { - if (!schema.endorserDid) { - throw new Error('Please provide the endorser DID') - } + schemaRecord = schemaState; + } else { - 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 - }, - }) + if (!schema.endorserDid) { + throw new Error('Please provide the endorser DID') + } - await tenantAgent.endSession(); - return createSchemaTxResult - } + 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 + } + }) + + return schemaRecord; } catch (error) { if (error instanceof AriesFrameworkError) { if (error.message.includes('UnauthorizedClientRequest')) { @@ -580,7 +605,6 @@ export class MultiTenancyController extends Controller { }) } } - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -630,43 +654,42 @@ export class MultiTenancyController extends Controller { endorsedTransaction: string, tenantId: string ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let schemaRecord; try { - const { issuerId, name, version, attributes } = schema; - const { schemaState } = await tenantAgent.modules.anoncreds.registerSchema({ - options: { - endorserMode: 'external', - endorsedTransaction - }, - schema: { - attrNames: attributes, - issuerId: issuerId, - name: name, - version: version - }, - }) - - if (!schemaState.schemaId) { - throw Error('SchemaId not found') - } - - 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 - } + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const { issuerId, name, version, attributes } = schema; + const { schemaState } = await tenantAgent.modules.anoncreds.registerSchema({ + options: { + endorserMode: 'external', + endorsedTransaction + }, + schema: { + attrNames: attributes, + issuerId: issuerId, + name: name, + version: version + }, + }) - await tenantAgent.endSession(); - return schemaState; + if (!schemaState.schemaId) { + throw Error('SchemaId not found') + } + 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 + } + schemaRecord = schemaState; + }) + return schemaRecord; } catch (error) { - await tenantAgent.endSession(); - return error + throw error } } @@ -681,39 +704,39 @@ export class MultiTenancyController extends Controller { endorsedTransaction: string, tenantId: string ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let credentialDefinitionRecord; try { - const { issuerId, schemaId, tag } = credentialDefinition; - const { credentialDefinitionState } = await tenantAgent.modules.anoncreds.registerCredentialDefinition({ - credentialDefinition, - options: { - endorserMode: 'external', - endorsedTransaction: endorsedTransaction, - }, - }) + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const { credentialDefinitionState } = await tenantAgent.modules.anoncreds.registerCredentialDefinition({ + credentialDefinition, + options: { + endorserMode: 'external', + endorsedTransaction: endorsedTransaction, + }, + }) - if (!credentialDefinitionState.credentialDefinitionId) { - throw Error('Credential Definition Id not found') - } + if (!credentialDefinitionState.credentialDefinitionId) { + throw 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.state === CredentialEnum.Action) { + 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; - } + credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId; + } - await tenantAgent.endSession(); - return credentialDefinitionState; + credentialDefinitionRecord = credentialDefinitionState; + }) + return credentialDefinitionRecord; } catch (error) { - await tenantAgent.endSession(); - return error + throw error } } @@ -727,11 +750,13 @@ export class MultiTenancyController extends Controller { @Res() badRequestError: TsoaResponse<400, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let getSchema; try { - const getSchema = await tenantAgent.modules.anoncreds.getSchema(schemaId); - await tenantAgent.endSession(); - return getSchema + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + getSchema = await tenantAgent.modules.anoncreds.getSchema(schemaId); + }) + + return getSchema; } catch (error) { if (error instanceof AnonCredsError && error.message === 'IndyError(LedgerNotFound): LedgerNotFound') { return notFoundError(404, { @@ -750,7 +775,6 @@ export class MultiTenancyController extends Controller { } } - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -770,52 +794,56 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let credentialDefinitionRecord; try { - credentialDefinitionRequest.endorse = credentialDefinitionRequest.endorse ? credentialDefinitionRequest.endorse : false + 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: {} + }) + 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; + } - if (!credentialDefinitionRequest.endorse) { - const { credentialDefinitionState } = await tenantAgent.modules.anoncreds.registerCredentialDefinition({ - credentialDefinition: { - issuerId: credentialDefinitionRequest.issuerId, - schemaId: credentialDefinitionRequest.schemaId, - tag: credentialDefinitionRequest.tag - }, - options: {} - }) - 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; - } + credentialDefinitionRecord = credentialDefinitionState; + } else { + + const createCredDefTxResult = await tenantAgent.modules.anoncreds.registerCredentialDefinition({ + credentialDefinition: { + issuerId: credentialDefinitionRequest.issuerId, + tag: credentialDefinitionRequest.tag, + schemaId: credentialDefinitionRequest.schemaId, + type: 'CL' + }, + options: { + endorserMode: 'external', + endorserDid: credentialDefinitionRequest.endorserDid ? credentialDefinitionRequest.endorserDid : '', + }, + }) - await tenantAgent.endSession(); - return credentialDefinitionState; - } else { + credentialDefinitionRecord = createCredDefTxResult; + } + }) - const createCredDefTxResult = await tenantAgent.modules.anoncreds.registerCredentialDefinition({ - credentialDefinition: { - issuerId: credentialDefinitionRequest.issuerId, - tag: credentialDefinitionRequest.tag, - schemaId: credentialDefinitionRequest.schemaId, - type: 'CL' - }, - options: { - endorserMode: 'external', - endorserDid: credentialDefinitionRequest.endorserDid ? credentialDefinitionRequest.endorserDid : '', - }, - }) - await tenantAgent.endSession(); - return createCredDefTxResult - } + return credentialDefinitionRecord; } catch (error) { if (error instanceof notFoundError) { return notFoundError(404, { @@ -823,7 +851,6 @@ export class MultiTenancyController extends Controller { }) } - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -837,11 +864,14 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let getCredDef; try { - const getCredDef = await tenantAgent.modules.anoncreds.getCredentialDefinition(credentialDefinitionId) - await tenantAgent.endSession(); - return getCredDef + + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + getCredDef = await tenantAgent.modules.anoncreds.getCredentialDefinition(credentialDefinitionId) + }) + + return getCredDef; } catch (error) { if (error instanceof AriesFrameworkError && error.message === 'IndyError(LedgerNotFound): LedgerNotFound') { return notFoundError(404, { @@ -854,7 +884,6 @@ export class MultiTenancyController extends Controller { }) } } - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -866,18 +895,19 @@ export class MultiTenancyController extends Controller { @Path('tenantId') tenantId: string, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let offer; try { - const offer = await tenantAgent.credentials.offerCredential({ - connectionId: createOfferOptions.connectionId, - protocolVersion: createOfferOptions.protocolVersion as CredentialProtocolVersionType<[]>, - credentialFormats: createOfferOptions.credentialFormats, - autoAcceptCredential: createOfferOptions.autoAcceptCredential + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + offer = await tenantAgent.credentials.offerCredential({ + connectionId: createOfferOptions.connectionId, + protocolVersion: createOfferOptions.protocolVersion as CredentialProtocolVersionType<[]>, + credentialFormats: createOfferOptions.credentialFormats, + autoAcceptCredential: createOfferOptions.autoAcceptCredential + }) }) - await tenantAgent.endSession(); + return offer; } catch (error) { - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -889,40 +919,42 @@ export class MultiTenancyController extends Controller { @Body() createOfferOptions: CreateOfferOobOptions, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let createOfferOobRecord; try { - const linkSecretIds = await tenantAgent.modules.anoncreds.getLinkSecretIds() - if (linkSecretIds.length === 0) { - await tenantAgent.modules.anoncreds.createLinkSecret() - } + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const linkSecretIds = await tenantAgent.modules.anoncreds.getLinkSecretIds() + if (linkSecretIds.length === 0) { + await tenantAgent.modules.anoncreds.createLinkSecret() + } - const offerOob = await tenantAgent.credentials.createOffer({ - protocolVersion: 'v1' as CredentialProtocolVersionType<[]>, - credentialFormats: createOfferOptions.credentialFormats, - autoAcceptCredential: createOfferOptions.autoAcceptCredential, - comment: createOfferOptions.comment - }); + const offerOob = await tenantAgent.credentials.createOffer({ + protocolVersion: 'v1' as CredentialProtocolVersionType<[]>, + credentialFormats: createOfferOptions.credentialFormats, + autoAcceptCredential: createOfferOptions.autoAcceptCredential, + comment: createOfferOptions.comment + }); - const credentialMessage = offerOob.message; - const outOfBandRecord = await tenantAgent.oob.createInvitation({ - label: createOfferOptions.label, - handshakeProtocols: [HandshakeProtocol.Connections], - messages: [credentialMessage], - autoAcceptConnection: true - }) + const credentialMessage = offerOob.message; + const outOfBandRecord = await tenantAgent.oob.createInvitation({ + label: createOfferOptions.label, + handshakeProtocols: [HandshakeProtocol.Connections], + messages: [credentialMessage], + autoAcceptConnection: true + }) - await tenantAgent.endSession(); - return { - invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ - domain: this.agent.config.endpoints[0], - }), - invitation: outOfBandRecord.outOfBandInvitation.toJSON({ - useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, - }), - outOfBandRecord: outOfBandRecord.toJSON(), - } + createOfferOobRecord = { + invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ + domain: this.agent.config.endpoints[0], + }), + invitation: outOfBandRecord.outOfBandInvitation.toJSON({ + useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, + }), + outOfBandRecord: outOfBandRecord.toJSON(), + } + }) + return createOfferOobRecord; } catch (error) { - await tenantAgent.endSession(); + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -935,28 +967,28 @@ export class MultiTenancyController extends Controller { @Path('tenantId') tenantId: string, @Body() acceptCredentialOfferOptions: AcceptCredentialOfferOptions ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let acceptOffer; try { - const linkSecretIds = await tenantAgent.modules.anoncreds.getLinkSecretIds() - if (linkSecretIds.length === 0) { - await tenantAgent.modules.anoncreds.createLinkSecret() - } - const acceptOffer = await tenantAgent.credentials.acceptOffer({ - credentialRecordId: acceptCredentialOfferOptions.credentialRecordId, - credentialFormats: acceptCredentialOfferOptions.credentialFormats, - autoAcceptCredential: acceptCredentialOfferOptions.autoAcceptCredential, - comment: acceptCredentialOfferOptions.comment + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const linkSecretIds = await tenantAgent.modules.anoncreds.getLinkSecretIds() + if (linkSecretIds.length === 0) { + await tenantAgent.modules.anoncreds.createLinkSecret() + } + acceptOffer = await tenantAgent.credentials.acceptOffer({ + credentialRecordId: acceptCredentialOfferOptions.credentialRecordId, + credentialFormats: acceptCredentialOfferOptions.credentialFormats, + autoAcceptCredential: acceptCredentialOfferOptions.autoAcceptCredential, + comment: acceptCredentialOfferOptions.comment + }) }) - await tenantAgent.endSession(); - return acceptOffer + return acceptOffer; } catch (error) { if (error instanceof RecordNotFoundError) { return notFoundError(404, { reason: `credential with credential record id "${acceptCredentialOfferOptions.credentialRecordId}" not found.`, }) } - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -969,19 +1001,21 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let credentialRecord; try { - const credential = await tenantAgent.credentials.getById(credentialRecordId) + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const credential = await tenantAgent.credentials.getById(credentialRecordId); + credentialRecord = credential.toJSON(); + }) - await tenantAgent.endSession(); - return credential.toJSON() + + return credentialRecord; } catch (error) { if (error instanceof RecordNotFoundError) { return notFoundError(404, { reason: `credential with credential record id "${credentialRecordId}" not found.`, }) } - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -994,17 +1028,17 @@ export class MultiTenancyController extends Controller { @Query('connectionId') connectionId?: string, @Query('state') state?: CredentialState ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); - const credentialRepository = tenantAgent.dependencyManager.resolve(CredentialRepository) - - const credentials = await credentialRepository.findByQuery(tenantAgent.context, { - connectionId, - threadId, - state, + 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, + }) + credentialRecord = credentials.map((c: any) => c.toJSON()) }) - - await tenantAgent.endSession(); - return credentials.map((c: any) => c.toJSON()) + return credentialRecord; } @Security('apiKey') @@ -1013,14 +1047,13 @@ export class MultiTenancyController extends Controller { @Path('tenantId') tenantId: string, @Query('threadId') threadId?: string, ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); - - let proofs = await tenantAgent.proofs.getAll() - - if (threadId) proofs = proofs.filter((p: any) => p.threadId === threadId) - - await tenantAgent.endSession(); - return proofs.map((proof: any) => proof.toJSON()) + 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; } @Security('apiKey') @@ -1032,19 +1065,18 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let proof; try { - const proof = await tenantAgent.proofs.getFormatData(proofRecordId) - - await tenantAgent.endSession(); - return proof + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + proof = await tenantAgent.proofs.getFormatData(proofRecordId); + }) + return proof; } catch (error) { if (error instanceof RecordNotFoundError) { return notFoundError(404, { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1058,24 +1090,25 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let proof; try { - const requestProofPayload = { - connectionId: requestProofOptions.connectionId, - protocolVersion: requestProofOptions.protocolVersion as ProofsProtocolVersionType<[]>, - comment: requestProofOptions.comment, - proofFormats: requestProofOptions.proofFormats, - autoAcceptProof: requestProofOptions.autoAcceptProof, - goalCode: requestProofOptions.goalCode, - parentThreadId: requestProofOptions.parentThreadId, - willConfirm: requestProofOptions.willConfirm - } - const proof = await tenantAgent.proofs.requestProof(requestProofPayload) + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const requestProofPayload = { + connectionId: requestProofOptions.connectionId, + protocolVersion: requestProofOptions.protocolVersion as ProofsProtocolVersionType<[]>, + comment: requestProofOptions.comment, + proofFormats: requestProofOptions.proofFormats, + autoAcceptProof: requestProofOptions.autoAcceptProof, + goalCode: requestProofOptions.goalCode, + parentThreadId: requestProofOptions.parentThreadId, + willConfirm: requestProofOptions.willConfirm + } + proof = await tenantAgent.proofs.requestProof(requestProofPayload); + }) - await tenantAgent.endSession(); - return proof + return proof; } catch (error) { - await tenantAgent.endSession(); + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1087,38 +1120,41 @@ export class MultiTenancyController extends Controller { @Body() createRequestOptions: CreateProofRequestOobOptions, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let oobProofRecord; try { - const proof = await tenantAgent.proofs.createRequest({ - protocolVersion: createRequestOptions.protocolVersion as ProofsProtocolVersionType<[]>, - proofFormats: createRequestOptions.proofFormats, - goalCode: createRequestOptions.goalCode, - willConfirm: createRequestOptions.willConfirm, - parentThreadId: createRequestOptions.parentThreadId, - autoAcceptProof: createRequestOptions.autoAcceptProof, - comment: createRequestOptions.comment - }); + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const proof = await tenantAgent.proofs.createRequest({ + protocolVersion: createRequestOptions.protocolVersion as ProofsProtocolVersionType<[]>, + proofFormats: createRequestOptions.proofFormats, + goalCode: createRequestOptions.goalCode, + willConfirm: createRequestOptions.willConfirm, + parentThreadId: createRequestOptions.parentThreadId, + autoAcceptProof: createRequestOptions.autoAcceptProof, + comment: createRequestOptions.comment + }); + + const proofMessage = proof.message; + const outOfBandRecord = await tenantAgent.oob.createInvitation({ + label: createRequestOptions.label, + handshakeProtocols: [HandshakeProtocol.Connections], + messages: [proofMessage], + autoAcceptConnection: true + }) - const proofMessage = proof.message; - const outOfBandRecord = await tenantAgent.oob.createInvitation({ - label: createRequestOptions.label, - handshakeProtocols: [HandshakeProtocol.Connections], - messages: [proofMessage], - autoAcceptConnection: true + oobProofRecord = { + invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ + domain: this.agent.config.endpoints[0], + }), + invitation: outOfBandRecord.outOfBandInvitation.toJSON({ + useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, + }), + outOfBandRecord: outOfBandRecord.toJSON(), + } }) - await tenantAgent.endSession(); - return { - invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ - domain: this.agent.config.endpoints[0], - }), - invitation: outOfBandRecord.outOfBandInvitation.toJSON({ - useDidSovPrefixWhereAllowed: this.agent.config.useDidSovPrefixWhereAllowed, - }), - outOfBandRecord: outOfBandRecord.toJSON(), - } + return oobProofRecord; } catch (error) { - await tenantAgent.endSession(); + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1138,29 +1174,31 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let proofRecord; try { - const requestedCredentials = await tenantAgent.proofs.selectCredentialsForRequest({ - proofRecordId, - }) + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const requestedCredentials = await tenantAgent.proofs.selectCredentialsForRequest({ + proofRecordId, + }) - const acceptProofRequest: AcceptProofRequestOptions = { - proofRecordId, - comment: request.comment, - proofFormats: requestedCredentials.proofFormats, - } + const acceptProofRequest: AcceptProofRequestOptions = { + proofRecordId, + comment: request.comment, + proofFormats: requestedCredentials.proofFormats, + } + + const proof = await tenantAgent.proofs.acceptRequest(acceptProofRequest) - const proof = await tenantAgent.proofs.acceptRequest(acceptProofRequest) - await tenantAgent.endSession(); - return proof.toJSON() + proofRecord = proof.toJSON() + }) + return proofRecord; } catch (error) { if (error instanceof RecordNotFoundError) { return notFoundError(404, { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1174,19 +1212,19 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let proof; try { - const proof = await tenantAgent.proofs.acceptPresentation({ proofRecordId }) + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + proof = await tenantAgent.proofs.acceptPresentation({ proofRecordId }); + }) - await tenantAgent.endSession(); - return proof + return proof; } catch (error) { if (error instanceof RecordNotFoundError) { return notFoundError(404, { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } - await tenantAgent.endSession(); return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1200,65 +1238,21 @@ export class MultiTenancyController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId }); + let proofRecord; try { - const proof = await tenantAgent.proofs.getById(proofRecordId) - - await tenantAgent.endSession(); - return proof.toJSON() + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + const proof = await tenantAgent.proofs.getById(proofRecordId) + proofRecord = proof.toJSON() + }) + return proofRecord; } catch (error) { if (error instanceof RecordNotFoundError) { return notFoundError(404, { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } - await tenantAgent.endSession(); - return internalServerError(500, { message: `something went wrong: ${error}` }) - } - } - - @Security('apiKey') - @Get(":tenantId") - public async getTenantById( - @Path("tenantId") tenantId: string, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { - try { - const tenantAgent = await this.agent.modules.tenants.getTenantById(tenantId); - return tenantAgent - } - catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `Tenant with id: ${tenantId} not found.`, - }) - } - return internalServerError(500, { message: `Something went wrong: ${error}` }) - } - } - - @Security('apiKey') - @Post("tenant") - public async getTenantAgent( - @Body() tenantAgentOptions: GetTenantAgentOptions, - @Res() notFoundError: TsoaResponse<404, { reason: string }>, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ tenantId: tenantAgentOptions.tenantId }); - try { - await tenantAgent.endSession(); - return tenantAgent; - } - catch (error) { - if (error instanceof RecordNotFoundError) { - return notFoundError(404, { - reason: `Tenant with id: ${tenantAgentOptions.tenantId} not found.`, - }) - } - await tenantAgent.endSession(); - return internalServerError(500, { message: `Something went wrong: ${error}` }) + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1311,21 +1305,18 @@ export class MultiTenancyController extends Controller { schemaState.schemaId = getSchemaId } - await tenantAgent.endSession(); return schemaState; } async getSchemaWithTenant(tenantAgent: any, schemaId: any) { const schema = await tenantAgent.modules.anoncreds.getSchema(schemaId); - await tenantAgent.endSession(); return schema; } async getCredentialDefinition(tenantAgent: any, credentialDefinitionId: any) { const credDef = await tenantAgent.modules.anoncreds.getCredentialDefinition(credentialDefinitionId); - await tenantAgent.endSession(); return credDef; } @@ -1354,7 +1345,6 @@ export class MultiTenancyController extends Controller { credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId } - await tenantAgent.endSession(); return credentialDefinitionState; } @@ -1364,7 +1354,6 @@ export class MultiTenancyController extends Controller { } const createInvitation = await tenantAgent.oob.createInvitation(config); - await tenantAgent.endSession(); return ({ invitationUrl: createInvitation.outOfBandInvitation.toUrl({ domain: this.agent.config.endpoints[0], @@ -1383,7 +1372,6 @@ export class MultiTenancyController extends Controller { remaining ); - await tenantAgent.endSession(); return ({ outOfBandRecord: outOfBandRecord.toJSON(), connectionRecord: connectionRecord?.toJSON(), @@ -1402,58 +1390,58 @@ export class MultiTenancyController extends Controller { comment }); - await tenantAgent.endSession(); return ({ CredentialExchangeRecord: acceptOffer }); } -@Security('apiKey') - @Post("/did/web/:tenantId") - public async createDidWeb( - @Path("tenantId") tenantId: string, - @Body() didOptions: DidCreate, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { - try { - const tenantAgent = await this.agent.modules.tenants.getTenantAgent({ - tenantId, - }); - - if(!didOptions.keyType){ - throw Error('keyType is required') - } - if(didOptions.keyType !== KeyType.Ed25519 && didOptions.keyType !== KeyType.Bls12381g2 ){ - throw Error('Only ed25519 and bls12381g2 type supported') - } - const did = `did:${didOptions.method}:${didOptions.domain}` - let didDocument:any - const keyId = `${did}#key-1` - const key = await tenantAgent.wallet.createKey({ - keyType:didOptions.keyType, - seed:TypedArrayEncoder.fromString(didOptions.seed) - }) - if(didOptions.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(didOptions.keyType === "bls12381g2"){ - didDocument = new DidDocumentBuilder(did) - .addContext('https://w3id.org/security/bbs/v1') - .addVerificationMethod(getBls12381G2Key2020({ key, id: keyId, controller: did })) - .addAuthentication(keyId) - .build() - } - - return { - did, - didDocument:didDocument.toJSON() - } - } catch (error) { - return internalServerError(500, { - message: `something went wrong: ${error}`, - }); + @Security('apiKey') + @Post("/did/web/:tenantId") + public async createDidWeb( + @Path("tenantId") tenantId: string, + @Body() didOptions: DidCreate, + @Res() internalServerError: TsoaResponse<500, { message: string }> + ) { + try { + + let didDoc; + await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => { + if (!didOptions.keyType) { + throw Error('keyType is required') + } + if (didOptions.keyType !== KeyType.Ed25519 && didOptions.keyType !== KeyType.Bls12381g2) { + throw Error('Only ed25519 and bls12381g2 type supported') + } + const did = `did:${didOptions.method}:${didOptions.domain}` + let didDocument: any + const keyId = `${did}#key-1` + const key = await tenantAgent.wallet.createKey({ + keyType: didOptions.keyType, + seed: TypedArrayEncoder.fromString(didOptions.seed) + }) + if (didOptions.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 (didOptions.keyType === "bls12381g2") { + didDocument = new DidDocumentBuilder(did) + .addContext('https://w3id.org/security/bbs/v1') + .addVerificationMethod(getBls12381G2Key2020({ key, id: keyId, controller: did })) + .addAuthentication(keyId) + .build() + } + + didDoc = { + did, + didDocument: didDocument.toJSON() + } + }) + return didDoc; + } catch (error) { + return internalServerError(500, { + message: `something went wrong: ${error}`, + }); + } } - } } From 5ba6732cd7252f672ca9c478db9026a1e6d1d58c Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Wed, 31 Jan 2024 11:09:26 +0530 Subject: [PATCH 22/23] Fixes sonar lint issues Signed-off-by: KulkarniShashank --- src/controllers/multi-tenancy/MultiTenancyController.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index 8257a939..797a8ada 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -454,7 +454,6 @@ export class MultiTenancyController extends Controller { outOfBandRecords = await tenantAgent.oob.getAll() if (invitationId) outOfBandRecords = outOfBandRecords.filter((o: any) => o.outOfBandInvitation.id === invitationId); - outOfBandRecords outOfBandRecordsRes = outOfBandRecords.map((c: any) => c.toJSON()) }) From eeec7c344688834c76842b7e3f8a8a56e6f37d20 Mon Sep 17 00:00:00 2001 From: Sai Ranjit Tummalapalli Date: Mon, 29 Jan 2024 17:08:52 +0530 Subject: [PATCH 23/23] chore: add eslint and prettier (#49) * chore: add lint and dependencies Signed-off-by: Sai Ranjit Tummalapalli * fix: lint issues Signed-off-by: Sai Ranjit Tummalapalli * fix: build Signed-off-by: Sai Ranjit Tummalapalli * fix: format Signed-off-by: Sai Ranjit Tummalapalli * ci: add integration git action Signed-off-by: Sai Ranjit Tummalapalli * fix: delete build file Signed-off-by: Sai Ranjit Tummalapalli --------- Signed-off-by: Sai Ranjit Tummalapalli --- .eslintrc.js | 78 + .github/workflows/continuous-integration.yml | 38 + .gitignore | 80 +- .prettierignore | 5 + .prettierrc | 5 + CHANGELOG.md | 92 +- build/controllers/did/DidController.d.ts | 29 - jest.config.ts | 4 +- package.json | 26 +- samples/cliConfig.json | 10 +- samples/sample.ts | 1 - samples/sampleWithApp.ts | 3 +- src/cli.ts | 26 +- src/cliAgent.ts | 116 +- src/controllers/agent/AgentController.ts | 9 +- .../basic-messages/BasicMessageController.ts | 3 +- .../connections/ConnectionController.ts | 6 +- .../credentials/CredentialController.ts | 61 +- .../CredentialDefinitionController.ts | 28 +- .../credentials/SchemaController.ts | 31 +- src/controllers/did/DidController.ts | 143 +- .../EndorserTransactionController.ts | 85 +- .../multi-tenancy/MultiTenancyController.ts | 21 +- .../outofband/OutOfBandController.ts | 24 +- src/controllers/proofs/ProofController.ts | 50 +- src/controllers/types.ts | 173 +- src/enums/enum.ts | 6 +- src/routes/routes.ts | 1446 +++--- src/routes/swagger.json | 4012 +++++++++-------- src/server.ts | 3 +- src/utils/agent.ts | 48 +- tsconfig.eslint.json | 12 + tsconfig.json | 2 +- yarn.lock | 1889 ++++++-- 34 files changed, 5227 insertions(+), 3338 deletions(-) create mode 100644 .eslintrc.js create mode 100644 .github/workflows/continuous-integration.yml create mode 100644 .prettierignore create mode 100644 .prettierrc delete mode 100644 build/controllers/did/DidController.d.ts create mode 100644 tsconfig.eslint.json diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..0ab17c34 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,78 @@ +module.exports = { + parser: '@typescript-eslint/parser', + ignorePatterns: ['**/tests/*'], + extends: [ + 'eslint:recommended', + 'plugin:import/recommended', + 'plugin:import/typescript', + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. + ], + parserOptions: { + tsconfigRootDir: __dirname, + project: ['./tsconfig.eslint.json'], + }, + settings: { + 'import/extensions': ['.js', '.ts'], + 'import/parsers': { + '@typescript-eslint/parser': ['.ts', '.tsx'], + }, + 'import/resolver': { + typescript: { + project: './tsconfig.json', + alwaysTryTypes: true, + }, + }, + }, + rules: { + 'no-constant-condition': 'warn', + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: true }], + '@typescript-eslint/explicit-member-accessibility': 'error', + 'no-console': 'error', + '@typescript-eslint/ban-ts-comment': 'warn', + '@typescript-eslint/consistent-type-imports': 'error', + 'import/no-cycle': 'error', + 'import/order': [ + 'error', + { + groups: ['type', ['builtin', 'external'], 'parent', 'sibling', 'index'], + alphabetize: { + order: 'asc', + }, + 'newlines-between': 'always', + }, + ], + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: false, + }, + ], + }, + overrides: [ + { + files: ['jest.config.ts', '.eslintrc.js'], + env: { + node: true, + }, + }, + { + files: ['*.test.ts', '**/__tests__/**', '**/tests/**', 'jest.*.ts', '**/samples/**'], + env: { + jest: true, + node: false, + }, + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: true, + }, + ], + }, + }, + ], +} diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 00000000..eedf2557 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,38 @@ +name: Continuous Integration + +on: + pull_request: + branches: [main] + push: + branches: [main] + +concurrency: + # Cancel previous runs that are not completed yet + group: afj-controller-${{ github.ref }}-${{ github.repository }}-${{ github.event_name }} + cancel-in-progress: true + +jobs: + validate: + runs-on: ubuntu-20.04 + name: Validate + steps: + - name: Checkout afj-controller + uses: actions/checkout@v4 + + - name: Setup NodeJS + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Linting + run: yarn lint + + - name: Prettier + run: yarn check-format + + - name: Compile + run: yarn check-types diff --git a/.gitignore b/.gitignore index 6b5d35c8..d67beb85 100644 --- a/.gitignore +++ b/.gitignore @@ -1,77 +1,13 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul +node_modules +build +.vscode +yarn-error.log +.idea coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' +.DS_Store +logs.txt *.tgz -# Yarn Integrity file -.yarn-integrity - # dotenv environment variable files .env .env.development.local @@ -129,4 +65,4 @@ dist .yarn/install-state.gz .pnp.* build -logs.txt \ No newline at end of file +logs.txt diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..a5a76252 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +node_modules +build +.vscode +.idea +routes \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..cbe842ac --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "printWidth": 120, + "semi": false, + "singleQuote": true +} diff --git a/CHANGELOG.md b/CHANGELOG.md index d821e9a8..1d7bc2bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,171 +2,151 @@ ### [0.9.4](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.9.3...rest-v0.9.4) (2022-10-07) - ### Features -* **rest:** added did resolver endpoint and tests ([#172](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/172)) ([9a1a24e](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/9a1a24ee2c958d09fff13075e0f56e0d3ed9ce7c)) +- **rest:** added did resolver endpoint and tests ([#172](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/172)) ([9a1a24e](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/9a1a24ee2c958d09fff13075e0f56e0d3ed9ce7c)) ### [0.9.3](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.9.2...rest-v0.9.3) (2022-09-21) - ### Features -* **rest:** added create-offer endpoint and tests ([#169](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/169)) ([5458e9e](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/5458e9ee06c8a8d61fb6a812ea04f4d1a59b21dc)) -* **rest:** added filters to getAllCredentials ([#166](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/166)) ([af7ec19](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/af7ec197b317b16cb5d2083d880006f29d0272c6)) -* **rest:** added WebSocket event server ([#170](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/170)) ([e190821](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/e190821b3f71c97e03cc92222fedceeadb514aab)) +- **rest:** added create-offer endpoint and tests ([#169](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/169)) ([5458e9e](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/5458e9ee06c8a8d61fb6a812ea04f4d1a59b21dc)) +- **rest:** added filters to getAllCredentials ([#166](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/166)) ([af7ec19](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/af7ec197b317b16cb5d2083d880006f29d0272c6)) +- **rest:** added WebSocket event server ([#170](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/170)) ([e190821](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/e190821b3f71c97e03cc92222fedceeadb514aab)) ### [0.9.2](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.9.1...rest-v0.9.2) (2022-09-07) - ### Bug Fixes -* **rest:** accept proof properties now optional ([#162](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/162)) ([f927fdc](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/f927fdcd4a6142a6bc086d82d3b6e6ed1317108d)) +- **rest:** accept proof properties now optional ([#162](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/162)) ([f927fdc](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/f927fdcd4a6142a6bc086d82d3b6e6ed1317108d)) ### [0.9.1](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.9.0...rest-v0.9.1) (2022-09-05) - ### Bug Fixes -* **rest:** moved route generation to compile ([#160](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/160)) ([8c70864](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/8c70864cacaada486b0ca7a7f9ba0ca2395f9efd)) +- **rest:** moved route generation to compile ([#160](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/160)) ([8c70864](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/8c70864cacaada486b0ca7a7f9ba0ca2395f9efd)) ## [0.9.0](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.8.1...rest-v0.9.0) (2022-09-02) - ### âš  BREAKING CHANGES -* **rest:** update to AFJ 0.2.0 (#148) +- **rest:** update to AFJ 0.2.0 (#148) ### Features -* **rest:** update to AFJ 0.2.0 ([#148](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/148)) ([8ec4dc4](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/8ec4dc4548305d5cc8180b657f5865002eb3ee4a)) +- **rest:** update to AFJ 0.2.0 ([#148](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/148)) ([8ec4dc4](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/8ec4dc4548305d5cc8180b657f5865002eb3ee4a)) ### [0.8.1](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.8.0...rest-v0.8.1) (2022-06-28) - ### Features -* **rest:** added multi use param to create invitation ([#100](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/100)) ([d00f11d](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/d00f11d78e9f65de3907bd6bf94dd6c38e2ddc3b)) -* **rest:** improved class validation ([#108](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/108)) ([cb48752](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/cb48752f0e222080f46c0699528e901de1226211)) - +- **rest:** added multi use param to create invitation ([#100](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/100)) ([d00f11d](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/d00f11d78e9f65de3907bd6bf94dd6c38e2ddc3b)) +- **rest:** improved class validation ([#108](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/108)) ([cb48752](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/cb48752f0e222080f46c0699528e901de1226211)) ### Bug Fixes -* **rest:** changed webhook event topic to type ([#117](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/117)) ([fed645e](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/fed645ec4ba77313e092bce097444a96aa66cf6e)) -* **rest:** ledger not found error ([2374b42](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/2374b4232a0b11738fb57e23dd2a3ac1b81ad073)) +- **rest:** changed webhook event topic to type ([#117](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/117)) ([fed645e](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/fed645ec4ba77313e092bce097444a96aa66cf6e)) +- **rest:** ledger not found error ([2374b42](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/2374b4232a0b11738fb57e23dd2a3ac1b81ad073)) ## [0.8.0](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.7.0...rest-v0.8.0) (2022-02-26) - ### Features -* **rest:** add cli and docker image publishing ([#96](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/96)) ([87d0205](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/87d02058e4b7d1fba1039265f5d595880f862097)) -* **rest:** add webhooks ([#93](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/93)) ([9fc020d](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/9fc020d7db0f002894e520766987eec327a2ed69)) -* **rest:** added basic messages and receive invitation by url ([#97](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/97)) ([956c928](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/956c928e3599925c65d8f99852bf06cebc06dba7)) +- **rest:** add cli and docker image publishing ([#96](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/96)) ([87d0205](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/87d02058e4b7d1fba1039265f5d595880f862097)) +- **rest:** add webhooks ([#93](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/93)) ([9fc020d](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/9fc020d7db0f002894e520766987eec327a2ed69)) +- **rest:** added basic messages and receive invitation by url ([#97](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/97)) ([956c928](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/956c928e3599925c65d8f99852bf06cebc06dba7)) ## [0.7.0](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.6.1...rest-v0.7.0) (2022-01-04) - ### âš  BREAKING CHANGES -* update aries framework javascript version to 0.1.0 (#86) +- update aries framework javascript version to 0.1.0 (#86) ### Miscellaneous Chores -* update aries framework javascript version to 0.1.0 ([#86](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/86)) ([ebaa11a](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/ebaa11a8f1c4588b020e870abd092a5813ec28ef)) +- update aries framework javascript version to 0.1.0 ([#86](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/86)) ([ebaa11a](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/ebaa11a8f1c4588b020e870abd092a5813ec28ef)) ### [0.6.1](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.6.0...rest-v0.6.1) (2021-12-07) - ### Bug Fixes -* **rest:** made nonce optional on proofrequest ([#84](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/84)) ([c1efe58](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/c1efe58055639e1c3df0429df6a0efe8fcdeb850)) +- **rest:** made nonce optional on proofrequest ([#84](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/84)) ([c1efe58](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/c1efe58055639e1c3df0429df6a0efe8fcdeb850)) ## [0.6.0](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.5.0...rest-v0.6.0) (2021-12-06) - ### âš  BREAKING CHANGES -* **rest:** proof request indy fields are now snake_case as used by indy instead of camelCase as used by AFJ. +- **rest:** proof request indy fields are now snake_case as used by indy instead of camelCase as used by AFJ. ### Bug Fixes -* **deps:** update dependencies ([#78](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/78)) ([ca38eba](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/ca38eba50dbb524269865d4fbfcb2d33720d0b48)) -* **rest:** remove record transformer ([#77](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/77)) ([cda30f5](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/cda30f56b557a11645e9201ecf3e615ce8c890f5)) +- **deps:** update dependencies ([#78](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/78)) ([ca38eba](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/ca38eba50dbb524269865d4fbfcb2d33720d0b48)) +- **rest:** remove record transformer ([#77](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/77)) ([cda30f5](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/cda30f56b557a11645e9201ecf3e615ce8c890f5)) ## [0.5.0](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.4.0...rest-v0.5.0) (2021-11-15) - ### âš  BREAKING CHANGES -* **rest:** the 'extraControllers' config property has been removed in favor of a custom 'app' property. This allows for a more flexible wat to customize the express app. See the sample for an example. +- **rest:** the 'extraControllers' config property has been removed in favor of a custom 'app' property. This allows for a more flexible wat to customize the express app. See the sample for an example. ### Features -* **rest:** allow app instance for custom configuration ([#73](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/73)) ([35400df](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/35400df5bdf1f621109e38aca4fa6644664612c8)) +- **rest:** allow app instance for custom configuration ([#73](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/73)) ([35400df](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/35400df5bdf1f621109e38aca4fa6644664612c8)) ## [0.4.0](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.3.0...rest-v0.4.0) (2021-11-07) - ### âš  BREAKING CHANGES -* **rest:** changed oob proof parameter from c_i to d_m (#67) +- **rest:** changed oob proof parameter from c_i to d_m (#67) ### Features -* **rest:** added outofband offer to credentialController ([#70](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/70)) ([d514688](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/d514688e2ca2c36312ef27b4d4a59ee3059e33de)) -* **rest:** added support for custom label and custom imageUrl ([#71](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/71)) ([686bddd](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/686bddd58d0947ab4dda1b1d4a49ce721c6b464b)) - +- **rest:** added outofband offer to credentialController ([#70](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/70)) ([d514688](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/d514688e2ca2c36312ef27b4d4a59ee3059e33de)) +- **rest:** added support for custom label and custom imageUrl ([#71](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/71)) ([686bddd](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/686bddd58d0947ab4dda1b1d4a49ce721c6b464b)) ### Code Refactoring -* **rest:** changed oob proof parameter from c_i to d_m ([#67](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/67)) ([5f9b1ae](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/5f9b1aeabcd81b5d3a084f69b280ceff84298b7e)) +- **rest:** changed oob proof parameter from c_i to d_m ([#67](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/67)) ([5f9b1ae](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/5f9b1aeabcd81b5d3a084f69b280ceff84298b7e)) ## [0.3.0](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.2.0...rest-v0.3.0) (2021-11-01) - ### âš  BREAKING CHANGES -* **rest:** The credentential-definitions endpoint topic contained a typo (credential-defintions instead of credential-definitions) -* **rest:** The connection id is moved from the path to the request body for credential and proof endpoints +- **rest:** The credentential-definitions endpoint topic contained a typo (credential-defintions instead of credential-definitions) +- **rest:** The connection id is moved from the path to the request body for credential and proof endpoints ### Bug Fixes -* **rest:** typo in credential definition endpoint ([b4d345e](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/b4d345ed2af112679389ad4d8ed76760e442cc26)) - +- **rest:** typo in credential definition endpoint ([b4d345e](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/b4d345ed2af112679389ad4d8ed76760e442cc26)) ### Code Refactoring -* **rest:** moved connectionId from path to requestbody ([#59](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/59)) ([1d37f0b](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/1d37f0bdde96742fc947213f8b934353872c570c)) +- **rest:** moved connectionId from path to requestbody ([#59](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/59)) ([1d37f0b](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/1d37f0bdde96742fc947213f8b934353872c570c)) ## [0.2.0](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.1.2...rest-v0.2.0) (2021-10-05) - ### âš  BREAKING CHANGES -* **rest:** The port property has been moved into a new configuration object. +- **rest:** The port property has been moved into a new configuration object. ### Features -* **rest:** added support for custom controllers ([#39](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/39)) ([8362e30](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/8362e30d8a4c9ef24779769f81b6e74f7f5978cc)) +- **rest:** added support for custom controllers ([#39](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/39)) ([8362e30](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/8362e30d8a4c9ef24779769f81b6e74f7f5978cc)) ### [0.1.2](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.1.1...rest-v0.1.2) (2021-09-17) - ### Bug Fixes -* **rest:** routing fix and moved cors to dependencies ([#31](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/31)) ([0999658](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/09996580a0015004ca18d36487276588460d0dfd)) +- **rest:** routing fix and moved cors to dependencies ([#31](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/31)) ([0999658](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/09996580a0015004ca18d36487276588460d0dfd)) ### [0.1.1](https://www.github.com/hyperledger/aries-framework-javascript-ext/compare/rest-v0.1.0...rest-v0.1.1) (2021-09-16) - ### Bug Fixes -* **rest:** require package.json to avoid error ([43e683a](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/43e683a11f4eed1d848f612c6e32e82d62141769)) +- **rest:** require package.json to avoid error ([43e683a](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/43e683a11f4eed1d848f612c6e32e82d62141769)) ## 0.1.0 (2021-09-16) - ### Features -* add rest package ([#10](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/10)) ([e761767](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/e7617670c3cc05ee63e827cc5a5c5079a5e8eea5)) +- add rest package ([#10](https://www.github.com/hyperledger/aries-framework-javascript-ext/issues/10)) ([e761767](https://www.github.com/hyperledger/aries-framework-javascript-ext/commit/e7617670c3cc05ee63e827cc5a5c5079a5e8eea5)) diff --git a/build/controllers/did/DidController.d.ts b/build/controllers/did/DidController.d.ts deleted file mode 100644 index 270c3669..00000000 --- a/build/controllers/did/DidController.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { DidCreateOptions } from '../types'; -import { Agent } from '@aries-framework/core'; -import { Controller, TsoaResponse } from 'tsoa'; -import { Did } from '../examples'; -export declare class DidController extends Controller { - private agent; - constructor(agent: Agent); - /** - * Resolves did and returns did resolution result - * @param did Decentralized Identifier - * @returns DidResolutionResult - */ - getDidRecordByDid(did: Did): Promise<{ - resolveResult: import("@aries-framework/core").DidResolutionResult; - } | { - didDocument: Record; - didResolutionMetadata: import("@aries-framework/core").DidResolutionMetadata; - didDocumentMetadata: import("did-resolver").DIDDocumentMetadata; - resolveResult?: undefined; - }>; - /** - * Did nym registration - * @body DidCreateOptions - * @returns DidResolutionResult - */ - writeDid(data: DidCreateOptions, internalServerError: TsoaResponse<500, { - message: string; - }>): Promise; -} diff --git a/jest.config.ts b/jest.config.ts index ab5df996..b3f79cc0 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: '@aries-framework/rest', - displayName: '@aries-framework/rest', + name: 'afj-controller', + displayName: 'afj-controller', testTimeout: 120000, } diff --git a/package.json b/package.json index be31b53d..17d32423 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,10 @@ "afj-rest": "bin/afj-rest.js" }, "scripts": { + "check-types": "tsc --noEmit -p tsconfig.build.json", + "prettier": "prettier '**/*.+(js|json|ts|md|yml|yaml)'", + "format": "yarn prettier --write", + "check-format": "yarn prettier --list-different", "tsoa": "tsoa spec-and-routes", "dev": "tsoa spec-and-routes && tsnd --respawn samples/sampleWithApp.ts", "build": "yarn run clean && yarn run compile", @@ -28,7 +32,9 @@ "compile": "tsoa spec-and-routes && tsc -p tsconfig.build.json", "prepublishOnly": "yarn run build", "test": "jest", - "postinstall": "patch-package" + "postinstall": "patch-package", + "lint": "eslint --ignore-path .gitignore .", + "validate": "yarn lint && yarn check-types && yarn check-format" }, "dependencies": { "@2060.io/ref-napi": "^3.0.6", @@ -43,9 +49,6 @@ "@hyperledger/anoncreds-nodejs": "^0.1.0", "@hyperledger/aries-askar-nodejs": "^0.1.1", "@hyperledger/indy-vdr-nodejs": "^0.1.0", - "@types/node-fetch": "^2.6.4", - "@types/ref-struct-di": "^1.1.9", - "@types/ws": "^7.4.7", "axios": "^1.4.0", "body-parser": "^1.20.0", "cors": "^2.8.5", @@ -63,18 +66,30 @@ "devDependencies": { "@types/body-parser": "^1.19.2", "@types/cors": "^2.8.12", + "@types/eslint": "^8.40.2", "@types/express": "^4.17.13", "@types/jest": "^27.0.3", "@types/jsonwebtoken": "^9.0.5", "@types/multer": "^1.4.7", "@types/node": "^16.7.10", + "@types/node-fetch": "^2.6.4", + "@types/ref-struct-di": "^1.1.9", "@types/supertest": "^2.0.12", "@types/swagger-ui-express": "^4.1.3", "@types/uuid": "^8.3.4", + "@types/ws": "^7.4.7", + "@typescript-eslint/eslint-plugin": "^6.19.1", + "@typescript-eslint/parser": "^6.19.1", + "eslint": "^7.32.0", + "eslint-config-prettier": "^8.8.0", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-prettier": "^4.2.1", "jest": "^27.3.1", "ngrok": "^4.3.1", "patch-package": "^8.0.0", "postinstall-postinstall": "^2.1.0", + "prettier": "^2.8.8", "supertest": "^6.2.3", "ts-jest": "^27.0.7", "ts-node-dev": "^2.0.0", @@ -82,5 +97,8 @@ }, "resolutions": { "ref-napi": "npm:@2060.io/ref-napi" + }, + "engines": { + "node": ">= 18" } } diff --git a/samples/cliConfig.json b/samples/cliConfig.json index b04f2d04..b7427ca5 100644 --- a/samples/cliConfig.json +++ b/samples/cliConfig.json @@ -23,9 +23,7 @@ "indyNamespace": "bcovrin:testnet" } ], - "endpoint": [ - "http://localhost:4002" - ], + "endpoint": ["http://localhost:4002"], "autoAcceptConnections": true, "autoAcceptCredentials": "contentApproved", "autoAcceptProofs": "contentApproved", @@ -37,10 +35,8 @@ "port": 4002 } ], - "outboundTransport": [ - "http" - ], + "outboundTransport": ["http"], "autoAcceptMediationRequests": false, "adminPort": 4001, "tenancy": true -} \ No newline at end of file +} diff --git a/samples/sample.ts b/samples/sample.ts index 9cb09840..3bbd6c88 100644 --- a/samples/sample.ts +++ b/samples/sample.ts @@ -10,7 +10,6 @@ const run = async () => { const agent = await setupAgent({ port: 3001, - publicDidSeed: 'testtesttesttesttesttesttesttest', endpoints: [endpoint], name: 'Aries Test Agent', }) diff --git a/samples/sampleWithApp.ts b/samples/sampleWithApp.ts index 52453124..0b837106 100644 --- a/samples/sampleWithApp.ts +++ b/samples/sampleWithApp.ts @@ -13,7 +13,6 @@ const run = async () => { const agent = await setupAgent({ port: 3001, - publicDidSeed: 'testtesttesttesttesttesttesttest', endpoints: [endpoint], name: 'Aries Test Agent', }) @@ -22,7 +21,7 @@ const run = async () => { const jsonParser = bodyParser.json() app.post('/greeting', jsonParser, (req, res) => { - const config = agent.injectionContainer.resolve(AgentConfig) + const config = agent.dependencyManager.resolve(AgentConfig) res.send(`Hello, ${config.label}!`) }) diff --git a/src/cli.ts b/src/cli.ts index 518d9923..7a7a6331 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -127,7 +127,7 @@ const parsed = yargs }) .option('tenancy', { boolean: true, - default: false + default: false, }) // .option('storage-config', { // array: true, @@ -150,11 +150,11 @@ const parsed = yargs .env('AFJ_REST') .parse() +const argv = yargs.argv +const storageConfig = argv['wallet-type'] -const argv = yargs.argv; -const storageConfig = argv["wallet-type"]; - -console.log("Storage Config after YARGS::", storageConfig); +// eslint-disable-next-line no-console +console.log('Storage Config after YARGS::', storageConfig) export async function runCliServer() { await runRestAgent({ @@ -168,15 +168,15 @@ export async function runCliServer() { host: parsed['wallet-url'], connectTimeout: 10, maxConnections: 1000, - idleTimeout: 10000 + idleTimeout: 30000, }, credentials: { - account: parsed["wallet-account"], - password: parsed["wallet-password"], - adminAccount: parsed["wallet-admin-account"], - adminPassword: parsed["wallet-admin-password"], - } - } + account: parsed['wallet-account'], + password: parsed['wallet-password'], + adminAccount: parsed['wallet-admin-account'], + adminPassword: parsed['wallet-admin-password'], + }, + }, }, indyLedger: parsed['indy-ledger'], // publicDidSeed: parsed['public-did-seed'], @@ -192,6 +192,6 @@ export async function runCliServer() { connectionImageUrl: parsed['connection-image-url'], webhookUrl: parsed['webhook-url'], adminPort: parsed['admin-port'], - tenancy: parsed['tenancy'] + tenancy: parsed['tenancy'], } as AriesRestConfig) } diff --git a/src/cliAgent.ts b/src/cliAgent.ts index a1ad7add..df7e8a9b 100644 --- a/src/cliAgent.ts +++ b/src/cliAgent.ts @@ -1,18 +1,34 @@ -import { InitConfig, AutoAcceptCredential, AutoAcceptProof, DidsModule, ProofsModule, V2ProofProtocol, CredentialsModule, V2CredentialProtocol, ConnectionsModule, W3cCredentialsModule, KeyDidRegistrar, KeyDidResolver, CacheModule, InMemoryLruCache, WebDidResolver } from '@aries-framework/core' +import type { InitConfig } from '@aries-framework/core' import type { WalletConfig } from '@aries-framework/core/build/types' - -import { HttpOutboundTransport, WsOutboundTransport, LogLevel, Agent } from '@aries-framework/core' +import { + AutoAcceptCredential, + AutoAcceptProof, + DidsModule, + ProofsModule, + V2ProofProtocol, + CredentialsModule, + V2CredentialProtocol, + ConnectionsModule, + W3cCredentialsModule, + KeyDidRegistrar, + KeyDidResolver, + CacheModule, + InMemoryLruCache, + WebDidResolver, + HttpOutboundTransport, + WsOutboundTransport, + LogLevel, + Agent, +} from '@aries-framework/core' import { agentDependencies, HttpInboundTransport, WsInboundTransport } from '@aries-framework/node' import { readFile } from 'fs/promises' -import { BCOVRIN_TEST_GENESIS, INDICIO_TEST_GENESIS } from './utils/util' import { setupServer } from './server' import { TsLogger } from './utils/logger' import { AnonCredsCredentialFormatService, AnonCredsModule, AnonCredsProofFormatService, LegacyIndyCredentialFormatService, LegacyIndyProofFormatService, V1CredentialProtocol, V1ProofProtocol } from '@aries-framework/anoncreds' -import { randomBytes, randomUUID } from 'crypto' +import { randomBytes } from 'crypto' import { TenantsModule } from '@aries-framework/tenants' import { JsonLdCredentialFormatService } from '@aries-framework/core' -import { W3cCredentialSchema, W3cCredentialsApi, W3cCredentialService, W3cJsonLdVerifyCredentialOptions } from '@aries-framework/core' import { AskarModule, AskarMultiWalletDatabaseScheme } from '@aries-framework/askar' import { ariesAskar } from '@hyperledger/aries-askar-nodejs' import { IndyVdrAnonCredsRegistry, IndyVdrIndyDidResolver, IndyVdrModule, IndyVdrPoolConfig, IndyVdrIndyDidRegistrar } from '@aries-framework/indy-vdr' @@ -21,6 +37,7 @@ import { AnonCredsRsModule } from '@aries-framework/anoncreds-rs' import { anoncreds } from '@hyperledger/anoncreds-nodejs' import axios from 'axios'; import jwt from 'jsonwebtoken'; +import { BCOVRIN_TEST_GENESIS } from './utils/util' export type Transports = 'ws' | 'http' export type InboundTransport = { @@ -73,18 +90,6 @@ export type RestMultiTenantAgentModules = Awaited> - -const getWithTenantModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) => { - const modules = getModules(networkConfig) - return { - tenants: new TenantsModule({ - sessionLimit: 1000, - sessionAcquireTimeout: 1000 - }), - ...modules - } -} - const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) => { const legacyIndyCredentialFormat = new LegacyIndyCredentialFormatService() const legacyIndyProofFormat = new LegacyIndyProofFormatService() @@ -99,7 +104,7 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) indyVdr: new IndyVdrModule({ indyVdr, - networks: networkConfig + networks: networkConfig, }), dids: new DidsModule({ @@ -134,21 +139,42 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) indyCredentialFormat: legacyIndyCredentialFormat, }), new V2CredentialProtocol({ - credentialFormats: [legacyIndyCredentialFormat, jsonLdCredentialFormatService, anonCredsCredentialFormatService], + credentialFormats: [ + legacyIndyCredentialFormat, + jsonLdCredentialFormatService, + anonCredsCredentialFormatService, + ], }), ], }), w3cCredentials: new W3cCredentialsModule(), cache: new CacheModule({ - cache: new InMemoryLruCache({ limit: Infinity }) - }) + cache: new InMemoryLruCache({ limit: Infinity }), + }), } - } +const getWithTenantModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) => { + const modules = getModules(networkConfig) + return { + tenants: new TenantsModule({ + sessionAcquireTimeout: Infinity, + sessionLimit: Infinity, + }), + ...modules, + } +} export async function runRestAgent(restConfig: AriesRestConfig) { - const { logLevel, inboundTransports = [], outboundTransports = [], webhookUrl, adminPort, walletConfig, ...afjConfig } = restConfig + const { + logLevel, + inboundTransports = [], + outboundTransports = [], + webhookUrl, + adminPort, + walletConfig, + ...afjConfig + } = restConfig const logger = new TsLogger(logLevel ?? LogLevel.error) @@ -156,27 +182,30 @@ export async function runRestAgent(restConfig: AriesRestConfig) { walletConfig: { id: walletConfig.id, key: walletConfig.key, - storage: walletConfig.storage + storage: walletConfig.storage, }, ...afjConfig, - logger - }; + logger, + } - async function fetchLedgerData(ledgerConfig: any): Promise { - const urlPattern = /^(https?:\/\/)?([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$/; + async function fetchLedgerData(ledgerConfig: { + genesisTransactions: string + indyNamespace: string + }): Promise { + const urlPattern = /^(https?:\/\/)?([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$/ if (!urlPattern.test(ledgerConfig.genesisTransactions)) { - throw new Error('Not a valid URL'); + throw new Error('Not a valid URL') } - const genesisTransactions = await axios.get(ledgerConfig.genesisTransactions); + const genesisTransactions = await axios.get(ledgerConfig.genesisTransactions) const networkConfig: IndyVdrPoolConfig = { genesisTransactions: genesisTransactions.data, indyNamespace: ledgerConfig.indyNamespace, isProduction: false, connectOnStartup: true, - }; + } if (ledgerConfig.indyNamespace.includes('indicio')) { @@ -184,23 +213,26 @@ export async function runRestAgent(restConfig: AriesRestConfig) { networkConfig.transactionAuthorAgreement = { version: '1.0', acceptanceMechanism: 'wallet_agreement', - }; + } } else { networkConfig.transactionAuthorAgreement = { version: '1.3', acceptanceMechanism: 'wallet_agreement', - }; + } } } - return networkConfig; + return networkConfig } - let networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]; + let networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]] - const parseIndyLedger = afjConfig?.indyLedger; + const parseIndyLedger = afjConfig?.indyLedger if (parseIndyLedger.length !== 0) { - networkConfig = [await fetchLedgerData(parseIndyLedger[0]), ...await Promise.all(parseIndyLedger.slice(1).map(fetchLedgerData))]; + networkConfig = [ + await fetchLedgerData(parseIndyLedger[0]), + ...(await Promise.all(parseIndyLedger.slice(1).map(fetchLedgerData))), + ] } else { networkConfig = [ { @@ -209,7 +241,7 @@ export async function runRestAgent(restConfig: AriesRestConfig) { isProduction: false, connectOnStartup: true, }, - ]; + ] } const tenantModule = await getWithTenantModules(networkConfig) @@ -219,13 +251,13 @@ export async function runRestAgent(restConfig: AriesRestConfig) { modules: { ...(afjConfig.tenancy ? { - ...tenantModule - } + ...tenantModule, + } : {}), ...modules, }, dependencies: agentDependencies, - }); + }) // Register outbound transports for (const outboundTransport of outboundTransports) { diff --git a/src/controllers/agent/AgentController.ts b/src/controllers/agent/AgentController.ts index d4d7df4b..e7ccc708 100644 --- a/src/controllers/agent/AgentController.ts +++ b/src/controllers/agent/AgentController.ts @@ -1,9 +1,10 @@ import type { AgentInfo } from '../types' -import { Agent, DidCreateOptions, JsonTransformer, KeyType, TypedArrayEncoder } from '@aries-framework/core' -import { Body, Controller, Delete, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' +import { Agent } from '@aries-framework/core' import { injectable } from 'tsyringe' +import { Controller, Delete, Get, Route, Tags, Security } from 'tsoa' + @Tags('Agent') @Route('/agent') @injectable() @@ -24,7 +25,7 @@ export class AgentController extends Controller { label: this.agent.config.label, endpoints: this.agent.config.endpoints, isInitialized: this.agent.isInitialized, - publicDid: undefined + publicDid: undefined, } } @@ -34,7 +35,7 @@ export class AgentController extends Controller { @Security('apiKey') @Delete('/wallet') public async deleteWallet() { - const deleteWallet = await this.agent.wallet.delete(); + const deleteWallet = await this.agent.wallet.delete() return deleteWallet } } diff --git a/src/controllers/basic-messages/BasicMessageController.ts b/src/controllers/basic-messages/BasicMessageController.ts index 29a49259..78c0d595 100644 --- a/src/controllers/basic-messages/BasicMessageController.ts +++ b/src/controllers/basic-messages/BasicMessageController.ts @@ -1,11 +1,12 @@ import type { BasicMessageRecord, BasicMessageStorageProps } from '@aries-framework/core' import { Agent, RecordNotFoundError } from '@aries-framework/core' -import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' import { BasicMessageRecordExample, RecordId } from '../examples' +import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' + @Tags('Basic Messages') @Route('/basic-messages') @Security('apiKey') diff --git a/src/controllers/connections/ConnectionController.ts b/src/controllers/connections/ConnectionController.ts index c1b2dade..ba093db9 100644 --- a/src/controllers/connections/ConnectionController.ts +++ b/src/controllers/connections/ConnectionController.ts @@ -7,11 +7,12 @@ import { AriesFrameworkError, RecordNotFoundError, } from '@aries-framework/core' -import { Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' import { ConnectionRecordExample, RecordId } from '../examples' +import { Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' + @Tags('Connections') @Route() @injectable() @@ -172,6 +173,7 @@ export class ConnectionController extends Controller { 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) @@ -180,6 +182,6 @@ export class ConnectionController extends Controller { return notFoundError(404, { reason: `connection with invitationId "${invitationId}" not found.` }) const invitationJson = outOfBandRecord.outOfBandInvitation.toJSON({ useDidSovPrefixWhereAllowed: true }) - return invitationJson; + return invitationJson } } diff --git a/src/controllers/credentials/CredentialController.ts b/src/controllers/credentials/CredentialController.ts index 177c0a84..d1cd9b33 100644 --- a/src/controllers/credentials/CredentialController.ts +++ b/src/controllers/credentials/CredentialController.ts @@ -1,14 +1,18 @@ -import { AutoAcceptCredential, CREDENTIALS_CONTEXT_V1_URL, ConnectionRecord, ConnectionState, CredentialExchangeRecord, CredentialExchangeRecordProps, CredentialFormat, CredentialPreviewAttribute, CredentialProtocolVersionType, CustomConnectionTags, CustomCredentialTags, DefaultConnectionTags, DidExchangeRole, DidExchangeState, HandshakeProtocol, JsonCredential, JsonLdCredentialDetailFormat, JsonLdCredentialFormatService, KeyType, ProofsProtocolVersionType, TypedArrayEncoder, V2CredentialPreview, W3cCredentialService, utils } from '@aries-framework/core' - -import { CredentialRepository, CredentialState, Agent, RecordNotFoundError } from '@aries-framework/core' -import { Body, Controller, Delete, Get, Path, Post, Res, Route, Tags, TsoaResponse, Example, Query, Security } from 'tsoa' -import { injectable } from 'tsyringe' +import type { RestAgentModules } from '../../cliAgent' +import type { CredentialExchangeRecordProps, CredentialProtocolVersionType } from '@aries-framework/core' +import { LegacyIndyCredentialFormatService, V1CredentialProtocol } from '@aries-framework/anoncreds' import { - LegacyIndyCredentialFormatService, - V1CredentialProtocol -} from '@aries-framework/anoncreds' + HandshakeProtocol, + W3cCredentialService, + CredentialRepository, + CredentialState, + Agent, + RecordNotFoundError, +} from '@aries-framework/core' +import { injectable } from 'tsyringe' import { CredentialExchangeRecordExample, RecordId } from '../examples' +import { OutOfBandController } from '../outofband/OutOfBandController' import { AcceptCredentialRequestOptions, ProposeCredentialOptions, @@ -17,12 +21,9 @@ import { CreateOfferOptions, AcceptCredential, CreateOfferOobOptions, - CredentialCreateOfferOptions, } from '../types' -import { OutOfBandController } from '../outofband/OutOfBandController' -import { RestAgentModules } from '../../cliAgent' - +import { Body, Controller, Get, Path, Post, Res, Route, Tags, TsoaResponse, Example, Query, Security } from 'tsoa' @Tags('Credentials') @Security('apiKey') @@ -30,7 +31,7 @@ import { RestAgentModules } from '../../cliAgent' @injectable() export class CredentialController extends Controller { private agent: Agent - private outOfBandController: OutOfBandController; + private outOfBandController: OutOfBandController // private v1CredentialProtocol: V1CredentialProtocol @@ -67,17 +68,13 @@ export class CredentialController extends Controller { @Get('/w3c') public async getAllW3c() { const w3cCredentialService = await this.agent.dependencyManager.resolve(W3cCredentialService) - console.log(await w3cCredentialService.getAllCredentialRecords(this.agent.context)) return await w3cCredentialService.getAllCredentialRecords(this.agent.context) } @Get('/w3c/:id') - public async getW3cById( - @Path('id') id: string - ) { + public async getW3cById(@Path('id') id: string) { const w3cCredentialService = await this.agent.dependencyManager.resolve(W3cCredentialService) - // console.log(await w3cCredentialService.getAllCredentialRecords(this.agent.context)) - return await w3cCredentialService.getCredentialRecordById(this.agent.context, id); + return await w3cCredentialService.getCredentialRecordById(this.agent.context, id) } /** @@ -126,7 +123,7 @@ export class CredentialController extends Controller { protocolVersion: 'v1' as CredentialProtocolVersionType<[]>, credentialFormats: proposeCredentialOptions.credentialFormats, autoAcceptCredential: proposeCredentialOptions.autoAcceptCredential, - comment: proposeCredentialOptions.comment + comment: proposeCredentialOptions.comment, }) return credential } catch (error) { @@ -156,12 +153,11 @@ export class CredentialController extends Controller { @Body() acceptCredentialProposal: AcceptCredentialProposalOptions ) { try { - const credential = await this.agent.credentials.acceptProposal({ credentialRecordId: acceptCredentialProposal.credentialRecordId, credentialFormats: acceptCredentialProposal.credentialFormats, autoAcceptCredential: acceptCredentialProposal.autoAcceptCredential, - comment: acceptCredentialProposal.comment + comment: acceptCredentialProposal.comment, }) return credential @@ -193,7 +189,7 @@ export class CredentialController extends Controller { connectionId: createOfferOptions.connectionId, protocolVersion: createOfferOptions.protocolVersion as CredentialProtocolVersionType<[]>, credentialFormats: createOfferOptions.credentialFormats, - autoAcceptCredential: createOfferOptions.autoAcceptCredential + autoAcceptCredential: createOfferOptions.autoAcceptCredential, }) return offer; } catch (error) { @@ -215,15 +211,15 @@ export class CredentialController extends Controller { protocolVersion: outOfBandOption.protocolVersion as CredentialProtocolVersionType<[]>, credentialFormats: outOfBandOption.credentialFormats, autoAcceptCredential: outOfBandOption.autoAcceptCredential, - comment: outOfBandOption.comment - }); + comment: outOfBandOption.comment, + }) - const credentialMessage = offerOob.message; + const credentialMessage = offerOob.message const outOfBandRecord = await this.agent.oob.createInvitation({ label: outOfBandOption.label, handshakeProtocols: [HandshakeProtocol.Connections], messages: [credentialMessage], - autoAcceptConnection: true + autoAcceptConnection: true, }) return { invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({ @@ -255,7 +251,6 @@ export class CredentialController extends Controller { @Body() acceptCredentialOfferOptions: AcceptCredentialOfferOptions ) { try { - const linkSecretIds = await this.agent.modules.anoncreds.getLinkSecretIds() if (linkSecretIds.length === 0) { await this.agent.modules.anoncreds.createLinkSecret() @@ -264,7 +259,7 @@ export class CredentialController extends Controller { credentialRecordId: acceptCredentialOfferOptions.credentialRecordId, credentialFormats: acceptCredentialOfferOptions.credentialFormats, autoAcceptCredential: acceptCredentialOfferOptions.autoAcceptCredential, - comment: acceptCredentialOfferOptions.comment + comment: acceptCredentialOfferOptions.comment, }) return acceptOffer } catch (error) { @@ -293,9 +288,9 @@ export class CredentialController extends Controller { @Body() acceptCredentialRequestOptions: AcceptCredentialRequestOptions ) { try { - const indyCredentialFormat = new LegacyIndyCredentialFormatService(); + const indyCredentialFormat = new LegacyIndyCredentialFormatService() - const v1CredentialProtocol = new V1CredentialProtocol({ indyCredentialFormat }); + const v1CredentialProtocol = new V1CredentialProtocol({ indyCredentialFormat }) const credential = await v1CredentialProtocol.acceptRequest(this.agent.context, acceptCredentialRequestOptions) return credential } catch (error) { @@ -323,9 +318,9 @@ export class CredentialController extends Controller { @Body() acceptCredential: AcceptCredential ) { try { - const indyCredentialFormat = new LegacyIndyCredentialFormatService(); + const indyCredentialFormat = new LegacyIndyCredentialFormatService() - const v1CredentialProtocol = new V1CredentialProtocol({ indyCredentialFormat }); + const v1CredentialProtocol = new V1CredentialProtocol({ indyCredentialFormat }) const credential = await v1CredentialProtocol.acceptCredential(this.agent.context, acceptCredential) return credential } catch (error) { diff --git a/src/controllers/credentials/CredentialDefinitionController.ts b/src/controllers/credentials/CredentialDefinitionController.ts index d6bdc21e..12436031 100644 --- a/src/controllers/credentials/CredentialDefinitionController.ts +++ b/src/controllers/credentials/CredentialDefinitionController.ts @@ -1,14 +1,18 @@ import type { SchemaId } from '../examples' -import { AnonCredsApi, AnonCredsError, getUnqualifiedCredentialDefinitionId, parseIndyCredentialDefinitionId } from '@aries-framework/anoncreds' -// import { error} +import { + AnonCredsError, + getUnqualifiedCredentialDefinitionId, + parseIndyCredentialDefinitionId, +} from '@aries-framework/anoncreds' // TODO: Chenged IndySdkError to AriesFrameworkError. If approved, the message must be changed too. import { Agent, AriesFrameworkError } from '@aries-framework/core' -import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' -import { IndyVdrAnonCredsRegistry } from '@aries-framework/indy-vdr' + +import { CredentialEnum } from '../../enums/enum' import { CredentialDefinitionExample, CredentialDefinitionId } from '../examples' -import { CredentialEnum } from '../../enums/enum'; + +import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' @Tags('Credential Definitions') @Route('/credential-definitions') @@ -43,7 +47,7 @@ export class CredentialDefinitionController extends Controller { reason: `credential definition with credentialDefinitionId "${credentialDefinitionId}" not found.`, }) } else if (error instanceof AnonCredsError && error.cause instanceof AriesFrameworkError) { - if (error.cause.cause, 'CommonInvalidStructure') { + if ((error.cause.cause, 'CommonInvalidStructure')) { return badRequestError(400, { reason: `credentialDefinitionId "${credentialDefinitionId}" has invalid structure.`, }) @@ -74,18 +78,17 @@ export class CredentialDefinitionController extends Controller { @Res() internalServerError: TsoaResponse<500, { message: string }> ) { try { - const { issuerId, schemaId, tag, endorse, endorserDid } = credentialDefinitionRequest const credentialDefinitionPyload = { issuerId, schemaId, tag, - type: 'CL' + type: 'CL', } if (!endorse) { const { credentialDefinitionState } = await this.agent.modules.anoncreds.registerCredentialDefinition({ credentialDefinition: credentialDefinitionPyload, - options: {} + options: {}, }) const indyCredDefId = parseIndyCredentialDefinitionId(credentialDefinitionState.credentialDefinitionId) @@ -93,14 +96,13 @@ export class CredentialDefinitionController extends Controller { indyCredDefId.namespaceIdentifier, indyCredDefId.schemaSeqNo, indyCredDefId.tag - ); + ) if (credentialDefinitionState.state === CredentialEnum.Finished) { - credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId; + credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId } - return credentialDefinitionState; + return credentialDefinitionState } else { - if (!endorserDid) { throw new Error('Please provide the endorser DID') } diff --git a/src/controllers/credentials/SchemaController.ts b/src/controllers/credentials/SchemaController.ts index c340d807..d37b9458 100644 --- a/src/controllers/credentials/SchemaController.ts +++ b/src/controllers/credentials/SchemaController.ts @@ -1,14 +1,15 @@ import type { Version } from '../examples' import { AnonCredsError, AnonCredsApi, getUnqualifiedSchemaId, parseIndySchemaId } from '@aries-framework/anoncreds' -import { Agent, AriesFrameworkError, BaseAgent } from '@aries-framework/core' // import { LedgerError } from '@aries-framework/core/build/modules/ledger/error/LedgerError' // import { isIndyError } from '@aries-framework/core/build/utils/indyError' -import { Body, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' + +import { Agent, AriesFrameworkError } from '@aries-framework/core' import { injectable } from 'tsyringe' + +import { CredentialEnum } from '../../enums/enum' import { SchemaId, SchemaExample } from '../examples' -import { IndyVdrDidCreateOptions, IndyVdrDidCreateResult } from '@aries-framework/indy-vdr' -import { CredentialEnum } from '../../enums/enum'; +import { Body, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' @Tags('Schemas') @Route('/schemas') @@ -41,17 +42,20 @@ export class SchemaController { try { return await this.agent.modules.anoncreds.getSchema(schemaId) } catch (errorMessage) { - if (errorMessage instanceof AnonCredsError && errorMessage.message === 'IndyError(LedgerNotFound): LedgerNotFound') { + if ( + errorMessage instanceof AnonCredsError && + errorMessage.message === 'IndyError(LedgerNotFound): LedgerNotFound' + ) { 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') { + if ((errorMessage.cause.cause, 'LedgerInvalidTransaction')) { return forbiddenError(403, { reason: `schema definition with schemaId "${schemaId}" can not be returned.`, }) } - if (errorMessage.cause.cause, 'CommonInvalidStructure') { + if ((errorMessage.cause.cause, 'CommonInvalidStructure')) { return badRequestError(400, { reason: `schemaId "${schemaId}" has invalid structure.`, }) @@ -84,14 +88,13 @@ export class SchemaController { @Res() internalServerError: TsoaResponse<500, { message: string }> ) { try { - - const { issuerId, name, version, attributes } = schema; + const { issuerId, name, version, attributes } = schema const schemaPayload = { issuerId: issuerId, name: name, version: version, - attrNames: attributes + attrNames: attributes, } if (!schema.endorse) { @@ -108,15 +111,12 @@ export class SchemaController { indySchemaId.namespaceIdentifier, indySchemaId.schemaName, indySchemaId.schemaVersion - ); + ) if (schemaState.state === CredentialEnum.Finished) { - schemaState.schemaId = getSchemaUnqualifiedId } - return schemaState; - + return schemaState } else { - if (!schema.endorserDid) { throw new Error('Please provide the endorser DID') } @@ -131,7 +131,6 @@ export class SchemaController { return createSchemaTxResult } - } catch (error) { if (error instanceof AriesFrameworkError) { if (error.message.includes('UnauthorizedClientRequest')) { diff --git a/src/controllers/did/DidController.ts b/src/controllers/did/DidController.ts index 30269bac..da1447b4 100644 --- a/src/controllers/did/DidController.ts +++ b/src/controllers/did/DidController.ts @@ -1,13 +1,21 @@ -import type { DidCreate, DidNymTransaction, DidResolutionResultProps } from '../types' -import { KeyType, TypedArrayEncoder, KeyDidCreateOptions, DidDocumentBuilder, getEd25519VerificationKey2018, Key, Hasher } from '@aries-framework/core' -import { Agent } from '@aries-framework/core' -import { Body, Controller, Example, Get, Path, Post, Res, Route, Security, Tags, TsoaResponse } from 'tsoa' +import type { DidResolutionResultProps } from '../types' +import type { KeyDidCreateOptions } from '@aries-framework/core' + +import { + KeyType, + TypedArrayEncoder, + DidDocumentBuilder, + getEd25519VerificationKey2018, + Agent, +} from '@aries-framework/core' +import axios from 'axios' import { injectable } from 'tsyringe' -import { Did, DidRecordExample } from '../examples' -import axios from 'axios'; -import { IndyVdrDidCreateOptions, IndyVdrDidCreateResult } from '@aries-framework/indy-vdr' -import { generateKeyPairFromSeed } from '@stablelib/ed25519' + import { BCOVRIN_REGISTER_URL, INDICIO_NYM_URL } from '../../utils/util' +import { Did, DidRecordExample } from '../examples' +import { DidCreate } from '../types' + +import { Body, Controller, Example, Get, Path, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' @Tags('Dids') @Route('/dids') @@ -34,8 +42,8 @@ export class DidController extends Controller { const resolveResult = await this.agent.dids.resolve(did); const importDid = await this.agent.dids.import({ did, - overwrite: true - }); + overwrite: true, + }) if (!resolveResult.didDocument) { this.setStatus(500) return { importDid } @@ -52,68 +60,65 @@ export class DidController extends Controller { // @Example(DidRecordExample) @Post('/write') - public async writeDid( - @Body() data: DidCreate, - @Res() internalServerError: TsoaResponse<500, { message: string }> - ) { + public async writeDid(@Body() data: DidCreate, @Res() internalServerError: TsoaResponse<500, { message: string }>) { try { - data.method = data.method || 'bcovrin:testnet'; - data.role = data.role || 'endorser'; + data.method = data.method || 'bcovrin:testnet' + data.role = data.role || 'endorser' - const didMethod = `did:indy:${data.method}`; + const didMethod = `did:indy:${data.method}` if (data.method.includes('bcovrin')) { - return this.handleBcovrin(data, didMethod); + return this.handleBcovrin(data, didMethod) } else if (data.method.includes('indicio')) { - return this.handleIndicio(data, didMethod); + return this.handleIndicio(data, didMethod) } else { - throw new Error('Invalid did method'); + throw new Error('Invalid did method') } } catch (error) { - return internalServerError(500, { message: `Something went wrong: ${error}` }); + return internalServerError(500, { message: `Something went wrong: ${error}` }) } } private async handleBcovrin(data: DidCreate, didMethod: string) { if (data?.role?.toLowerCase() === 'endorser') { if (data.did) { - await this.importDid(didMethod, data.did, data.seed); - return { did: `${didMethod}:${data.did}` }; + await this.importDid(didMethod, data.did, data.seed) + return { did: `${didMethod}:${data.did}` } } else { - const res = await axios.post(BCOVRIN_REGISTER_URL, { role: 'ENDORSER', alias: 'Alias', seed: data.seed }); - const { did } = res?.data || {}; - await this.importDid(didMethod, did, data.seed); - return { did: `${didMethod}:${did}` }; + const res = await axios.post(BCOVRIN_REGISTER_URL, { role: 'ENDORSER', alias: 'Alias', seed: data.seed }) + const { did } = res?.data || {} + await this.importDid(didMethod, did, data.seed) + return { did: `${didMethod}:${did}` } } } else { if (!data.endorserDid) { - throw new Error('Please provide the endorser DID'); + throw new Error('Please provide the endorser DID') } - const didCreateTxResult = await this.createEndorserDid(data.endorserDid); - return { did: didCreateTxResult.didState.did }; + const didCreateTxResult = await this.createEndorserDid(data.endorserDid) + return { did: didCreateTxResult.didState.did } } } private async handleIndicio(data: DidCreate, didMethod: string) { if (data?.role?.toLowerCase() === 'endorser') { if (data.did) { - await this.importDid(didMethod, data.did, data.seed); - return { did: `${didMethod}:${data.did}` }; + await this.importDid(didMethod, data.did, data.seed) + return { did: `${didMethod}:${data.did}` } } else { - const method = data.method || 'indicio:testnet'; - const key = await this.createIndicioKey(data.seed, method); - const res = await axios.post(INDICIO_NYM_URL, key); + const method = data.method || 'indicio:testnet' + const key = await this.createIndicioKey(data.seed, method) + const res = await axios.post(INDICIO_NYM_URL, key) if (res.data.statusCode === 200) { - await this.importDid(didMethod, key.did, data.seed); - return { did: `${didMethod}:${key.did}` }; + await this.importDid(didMethod, key.did, data.seed) + return { did: `${didMethod}:${key.did}` } } } } else { if (!data.endorserDid) { - throw new Error('Please provide the endorser DID'); + throw new Error('Please provide the endorser DID') } - const didCreateTxResult = await this.createEndorserDid(data.endorserDid); - return didCreateTxResult; + const didCreateTxResult = await this.createEndorserDid(data.endorserDid) + return didCreateTxResult } } @@ -124,35 +129,35 @@ export class DidController extends Controller { endorserMode: 'external', endorserDid: endorserDid || '', }, - }); + }) } private async createIndicioKey(seed: string, method: string) { const key = await this.agent.wallet.createKey({ privateKey: TypedArrayEncoder.fromString(seed), keyType: KeyType.Ed25519, - }); + }) - const buffer = TypedArrayEncoder.fromBase58(key.publicKeyBase58); - const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)); + const buffer = TypedArrayEncoder.fromBase58(key.publicKeyBase58) + const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16)) - let body; + let body if (method === 'indicio:testnet') { body = { network: 'testnet', did, verkey: TypedArrayEncoder.toBase58(buffer), - }; + } } else if (method === 'indicio:demonet') { body = { network: 'demonet', did, verkey: TypedArrayEncoder.toBase58(buffer), - }; + } } else { - throw new Error('Please provide a valid did method'); + throw new Error('Please provide a valid did method') } - return body; + return body } private async importDid(didMethod: string, did: string, seed: string) { @@ -162,10 +167,10 @@ export class DidController extends Controller { privateKeys: [ { keyType: KeyType.Ed25519, - privateKey: TypedArrayEncoder.fromString(seed) - } - ] - }); + privateKey: TypedArrayEncoder.fromString(seed), + }, + ], + }) } @Post('/did/key') @@ -180,20 +185,20 @@ export class DidController extends Controller { keyType: KeyType.Ed25519, }, secret: { - privateKey: TypedArrayEncoder.fromString(didOptions.seed) - } - }); + privateKey: TypedArrayEncoder.fromString(didOptions.seed), + }, + }) await this.agent.dids.import({ did: `${did.didState.did}`, overwrite: true, privateKeys: [ { keyType: KeyType.Ed25519, - privateKey: TypedArrayEncoder.fromString(didOptions.seed) + privateKey: TypedArrayEncoder.fromString(didOptions.seed), }, ], - }); - return { did: `${did.didState.did}` }; + }) + return { did: `${did.didState.did}` } } catch (error) { return internalServerError(500, { message: `something went wrong: ${error}` }) } @@ -205,34 +210,32 @@ export class DidController extends Controller { @Res() internalServerError: TsoaResponse<500, { message: string }> ) { try { - const domain = didOptions.domain ? didOptions.domain : 'credebl.github.io'; - const did = `did:web:${domain}`; - const keyId = `${did}#key-1`; + const domain = didOptions.domain ? didOptions.domain : 'credebl.github.io' + const did = `did:web:${domain}` + const keyId = `${did}#key-1` const key = await this.agent.wallet.createKey({ keyType: KeyType.Ed25519, - privateKey: TypedArrayEncoder.fromString(didOptions.seed) - }); + privateKey: TypedArrayEncoder.fromString(didOptions.seed), + }) const didDocument = new DidDocumentBuilder(did) .addContext('https://w3id.org/security/suites/ed25519-2018/v1') .addVerificationMethod(getEd25519VerificationKey2018({ key, id: keyId, controller: did })) .addAuthentication(keyId) - .build(); + .build() await this.agent.dids.import({ did, overwrite: true, - didDocument - }); - return { did }; + didDocument, + }) + return { did } } catch (error) { return internalServerError(500, { message: `something went wrong: ${error}` }) } } - - @Get('/') public async getDids( @Res() internalServerError: TsoaResponse<500, { message: string }> diff --git a/src/controllers/endorser-transaction/EndorserTransactionController.ts b/src/controllers/endorser-transaction/EndorserTransactionController.ts index c93c7954..aa7a2ebb 100644 --- a/src/controllers/endorser-transaction/EndorserTransactionController.ts +++ b/src/controllers/endorser-transaction/EndorserTransactionController.ts @@ -1,11 +1,19 @@ -import { Agent, AriesFrameworkError } from "@aries-framework/core" -import { Body, Controller, Post, Res, Route, Tags, TsoaResponse, Security } from "tsoa" -import { injectable } from "tsyringe" -import { DidNymTransaction, EndorserTransaction, WriteTransaction } from "../types" -import { SchemaId, Version } from "../examples" -import { AnonCredsCredentialDefinition, getUnqualifiedCredentialDefinitionId, getUnqualifiedSchemaId, parseIndyCredentialDefinitionId, parseIndySchemaId } from "@aries-framework/anoncreds" -import { IndyVdrAnonCredsRegistry, IndyVdrDidCreateOptions } from "@aries-framework/indy-vdr" -import { CredentialEnum } from '../../enums/enum'; +import type { Version } from '../examples' +import type { IndyVdrDidCreateOptions } from '@aries-framework/indy-vdr' + +import { + getUnqualifiedCredentialDefinitionId, + getUnqualifiedSchemaId, + parseIndyCredentialDefinitionId, + parseIndySchemaId, +} from '@aries-framework/anoncreds' +import { Agent, AriesFrameworkError } from '@aries-framework/core' +import { injectable } from 'tsyringe' + +import { CredentialEnum } from '../../enums/enum' +import { DidNymTransaction, EndorserTransaction, WriteTransaction } from '../types' + +import { Body, Controller, Post, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' @Tags('EndorserTransaction') @Route('/transactions') @@ -31,7 +39,7 @@ export class EndorserTransactionController extends Controller { endorserTransaction.endorserDid ) - return { signedTransaction }; + return { signedTransaction } } catch (error) { if (error instanceof AriesFrameworkError) { if (error.message.includes('UnauthorizedClientRequest')) { @@ -57,7 +65,7 @@ export class EndorserTransactionController extends Controller { endorsedTransaction: { nymRequest: didNymTransaction.nymRequest, }, - } + }, }) return didCreateSubmitResult @@ -75,18 +83,20 @@ export class EndorserTransactionController extends Controller { ) { try { if (writeTransaction.schema) { - - const writeSchema = await this.submitSchemaOnLedger(writeTransaction.schema, writeTransaction.endorsedTransaction); - return writeSchema; + const writeSchema = await this.submitSchemaOnLedger( + writeTransaction.schema, + writeTransaction.endorsedTransaction + ) + return writeSchema } else if (writeTransaction.credentialDefinition) { - - const writeCredDef = await this.submitCredDefOnLedger(writeTransaction.credentialDefinition, writeTransaction.endorsedTransaction); - return writeCredDef; + const writeCredDef = await this.submitCredDefOnLedger( + writeTransaction.credentialDefinition, + writeTransaction.endorsedTransaction + ) + return writeCredDef } else { - - throw new Error('Please provide valid schema or credential-def!'); + throw new Error('Please provide valid schema or credential-def!') } - } catch (error) { if (error instanceof AriesFrameworkError) { if (error.message.includes('UnauthorizedClientRequest')) { @@ -106,21 +116,20 @@ export class EndorserTransactionController extends Controller { version: Version attributes: string[] }, - endorsedTransaction?: string, + endorsedTransaction?: string ) { try { - - const { issuerId, name, version, attributes } = schema; + const { issuerId, name, version, attributes } = schema const { schemaState } = await this.agent.modules.anoncreds.registerSchema({ options: { endorserMode: 'external', - endorsedTransaction + endorsedTransaction, }, schema: { attrNames: attributes, issuerId: issuerId, name: name, - version: version + version: version, }, }) @@ -129,12 +138,11 @@ export class EndorserTransactionController extends Controller { indySchemaId.namespaceIdentifier, indySchemaId.schemaName, indySchemaId.schemaVersion - ); + ) if (schemaState.state === CredentialEnum.Finished || schemaState.state === CredentialEnum.Action) { schemaState.schemaId = getSchemaUnqualifiedId } - return schemaState; - + return schemaState } catch (error) { return error } @@ -142,16 +150,15 @@ export class EndorserTransactionController extends Controller { public async submitCredDefOnLedger( credentialDefinition: { - schemaId: string, - issuerId: string, - tag: string, - value: unknown, + schemaId: string + issuerId: string + tag: string + value: unknown type: string }, endorsedTransaction?: string ) { try { - const { credentialDefinitionState } = await this.agent.modules.anoncreds.registerCredentialDefinition({ credentialDefinition, options: { @@ -165,14 +172,16 @@ export class EndorserTransactionController extends Controller { indyCredDefId.namespaceIdentifier, indyCredDefId.schemaSeqNo, indyCredDefId.tag - ); - if (credentialDefinitionState.state === CredentialEnum.Finished || credentialDefinitionState.state === CredentialEnum.Action) { - credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId; + ) + if ( + credentialDefinitionState.state === CredentialEnum.Finished || + credentialDefinitionState.state === CredentialEnum.Action + ) { + credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId } - return credentialDefinitionState; - + return credentialDefinitionState } catch (error) { return error } } -} \ No newline at end of file +} diff --git a/src/controllers/multi-tenancy/MultiTenancyController.ts b/src/controllers/multi-tenancy/MultiTenancyController.ts index 797a8ada..2af02efc 100644 --- a/src/controllers/multi-tenancy/MultiTenancyController.ts +++ b/src/controllers/multi-tenancy/MultiTenancyController.ts @@ -68,6 +68,7 @@ export class MultiTenancyController extends Controller { reason: `Tenant not created`, }); } + return internalServerError(500, { message: `Something went wrong: ${error}` }); } } @@ -307,6 +308,7 @@ export class MultiTenancyController extends Controller { }) } } + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -353,6 +355,7 @@ export class MultiTenancyController extends Controller { outOfBandRecord: outOfBandRecord?.toJSON(), } } catch (error) { + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -604,6 +607,7 @@ export class MultiTenancyController extends Controller { }) } } + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -774,6 +778,7 @@ export class MultiTenancyController extends Controller { } } + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -850,6 +855,7 @@ export class MultiTenancyController extends Controller { }) } + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -883,6 +889,7 @@ export class MultiTenancyController extends Controller { }) } } + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -988,6 +995,7 @@ export class MultiTenancyController extends Controller { reason: `credential with credential record id "${acceptCredentialOfferOptions.credentialRecordId}" not found.`, }) } + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1015,6 +1023,7 @@ export class MultiTenancyController extends Controller { reason: `credential with credential record id "${credentialRecordId}" not found.`, }) } + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1076,6 +1085,7 @@ export class MultiTenancyController extends Controller { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1198,6 +1208,7 @@ export class MultiTenancyController extends Controller { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1224,6 +1235,7 @@ export class MultiTenancyController extends Controller { reason: `proof with proofRecordId "${proofRecordId}" not found.`, }) } + return internalServerError(500, { message: `something went wrong: ${error}` }) } } @@ -1304,18 +1316,21 @@ export class MultiTenancyController extends Controller { schemaState.schemaId = getSchemaId } + return schemaState; } async getSchemaWithTenant(tenantAgent: any, schemaId: any) { const schema = await tenantAgent.modules.anoncreds.getSchema(schemaId); + return schema; } async getCredentialDefinition(tenantAgent: any, credentialDefinitionId: any) { const credDef = await tenantAgent.modules.anoncreds.getCredentialDefinition(credentialDefinitionId); + return credDef; } @@ -1344,6 +1359,7 @@ export class MultiTenancyController extends Controller { credentialDefinitionState.credentialDefinitionId = getCredentialDefinitionId } + return credentialDefinitionState; } @@ -1353,6 +1369,7 @@ export class MultiTenancyController extends Controller { } const createInvitation = await tenantAgent.oob.createInvitation(config); + return ({ invitationUrl: createInvitation.outOfBandInvitation.toUrl({ domain: this.agent.config.endpoints[0], @@ -1371,6 +1388,7 @@ export class MultiTenancyController extends Controller { remaining ); + return ({ outOfBandRecord: outOfBandRecord.toJSON(), connectionRecord: connectionRecord?.toJSON(), @@ -1389,6 +1407,7 @@ export class MultiTenancyController extends Controller { comment }); + return ({ CredentialExchangeRecord: acceptOffer }); } @@ -1443,4 +1462,4 @@ export class MultiTenancyController extends Controller { } } -} +} \ No newline at end of file diff --git a/src/controllers/outofband/OutOfBandController.ts b/src/controllers/outofband/OutOfBandController.ts index 61221149..8e4f404d 100644 --- a/src/controllers/outofband/OutOfBandController.ts +++ b/src/controllers/outofband/OutOfBandController.ts @@ -1,20 +1,20 @@ import type { OutOfBandInvitationProps, OutOfBandRecordWithInvitationProps } from '../examples' -import type { AgentMessageType, CreateInvitationOptions } from '../types' -import { - ConnectionRecordProps, - CreateOutOfBandInvitationConfig, - CreateLegacyInvitationConfig, - CreateCredentialOfferOptions, - AutoAcceptCredential, -} from '@aries-framework/core' +import type { AgentMessageType } from '../types' +import type { ConnectionRecordProps, CreateLegacyInvitationConfig } from '@aries-framework/core' import { AgentMessage, JsonTransformer, OutOfBandInvitation, Agent, RecordNotFoundError } from '@aries-framework/core' -import { Body, Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' import { injectable } from 'tsyringe' import { ConnectionRecordExample, outOfBandInvitationExample, outOfBandRecordExample, RecordId } from '../examples' -import { AcceptInvitationConfig, ReceiveInvitationByUrlProps, ReceiveInvitationProps } from '../types' -import { V1CredentialProtocol } from '@aries-framework/anoncreds' +import { + AcceptInvitationConfig, + ReceiveInvitationByUrlProps, + ReceiveInvitationProps, + CreateInvitationOptions, +} from '../types' + +import { Body, Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' + // import prepareForAnon @Tags('Out Of Band') @@ -296,5 +296,3 @@ export class OutOfBandController extends Controller { } } } - - diff --git a/src/controllers/proofs/ProofController.ts b/src/controllers/proofs/ProofController.ts index e694dc2c..2370ff19 100644 --- a/src/controllers/proofs/ProofController.ts +++ b/src/controllers/proofs/ProofController.ts @@ -1,33 +1,21 @@ -import { - // AcceptProofPresentationOptions, +import type { AcceptProofRequestOptions, - ConnectionRecord, - CreateProofRequestOptions, - DidExchangeRole, - DidExchangeState, - HandshakeProtocol, - JsonEncoder, - ProofExchangeRecord, - // IndyProofFormat, ProofExchangeRecordProps, ProofsProtocolVersionType, - // ProposeProofOptions, - // V1ProofService, - // V2ProofService, } from '@aries-framework/core' -import { - LegacyIndyCredentialFormatService, - LegacyIndyProofFormatService, - V1ProofProtocol -} from '@aries-framework/anoncreds' - -import { Agent, RecordNotFoundError } from '@aries-framework/core' -import { Body, Controller, Delete, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' +import { HandshakeProtocol, Agent, RecordNotFoundError } from '@aries-framework/core' import { injectable } from 'tsyringe' import { ProofRecordExample, RecordId } from '../examples' -import { AcceptProofProposal, CreateProofRequestOobOptions, RequestProofOptions, RequestProofProposalOptions } from '../types' +import { + AcceptProofProposal, + CreateProofRequestOobOptions, + RequestProofOptions, + RequestProofProposalOptions, +} from '../types' + +import { Body, Controller, Example, Get, Path, Post, Query, Res, Route, Tags, TsoaResponse, Security } from 'tsoa' @Tags('Proofs') @Route('/proofs') @@ -97,9 +85,7 @@ export class ProofController extends Controller { @Res() notFoundError: TsoaResponse<404, { reason: string }>, @Res() internalServerError: TsoaResponse<500, { message: string }> ) { - try { - const proof = await this.agent.proofs.proposeProof({ connectionId: requestProofProposalOptions.connectionId, protocolVersion: 'v1' as ProofsProtocolVersionType<[]>, @@ -107,7 +93,7 @@ export class ProofController extends Controller { comment: requestProofProposalOptions.comment, autoAcceptProof: requestProofProposalOptions.autoAcceptProof, goalCode: requestProofProposalOptions.goalCode, - parentThreadId: requestProofProposalOptions.parentThreadId + parentThreadId: requestProofProposalOptions.parentThreadId, }) return proof @@ -139,7 +125,7 @@ export class ProofController extends Controller { try { const proof = await this.agent.proofs.acceptProposal(acceptProposal) - return proof; + return proof } catch (error) { if (error instanceof RecordNotFoundError) { return notFoundError(404, { @@ -158,7 +144,6 @@ export class ProofController extends Controller { @Res() internalServerError: TsoaResponse<500, { message: string }> ) { try { - const requestProofPayload = { connectionId: requestProofOptions.connectionId, protocolVersion: requestProofOptions.protocolVersion as ProofsProtocolVersionType<[]>, @@ -167,7 +152,7 @@ export class ProofController extends Controller { autoAcceptProof: requestProofOptions.autoAcceptProof, goalCode: requestProofOptions.goalCode, parentThreadId: requestProofOptions.parentThreadId, - willConfirm: requestProofOptions.willConfirm + willConfirm: requestProofOptions.willConfirm, } const proof = await this.agent.proofs.requestProof(requestProofPayload) @@ -190,14 +175,14 @@ export class ProofController extends Controller { willConfirm: createRequestOptions.willConfirm, parentThreadId: createRequestOptions.parentThreadId, autoAcceptProof: createRequestOptions.autoAcceptProof, - comment: createRequestOptions.comment - }); - const proofMessage = proof.message; + comment: createRequestOptions.comment, + }) + const proofMessage = proof.message const outOfBandRecord = await this.agent.oob.createInvitation({ label: createRequestOptions.label, handshakeProtocols: [HandshakeProtocol.Connections], messages: [proofMessage], - autoAcceptConnection: true + autoAcceptConnection: true, }) return { @@ -236,7 +221,6 @@ export class ProofController extends Controller { @Res() internalServerError: TsoaResponse<500, { message: string }> ) { try { - const requestedCredentials = await this.agent.proofs.selectCredentialsForRequest({ proofRecordId, }) diff --git a/src/controllers/types.ts b/src/controllers/types.ts index d64ed1dd..8d63c2fa 100644 --- a/src/controllers/types.ts +++ b/src/controllers/types.ts @@ -1,4 +1,5 @@ // eslint-disable-next-line import/order +import type { Version } from './examples' import type { AutoAcceptCredential, AutoAcceptProof, @@ -12,48 +13,26 @@ import type { ProofExchangeRecord, ProofFormatPayload, ProofFormat, - CreateProofRequestOptions, DidRegistrationExtraOptions, DidDocument, DidRegistrationSecretOptions, InitConfig, WalletConfig, - ModulesMap, - DefaultAgentModules, - CredentialProtocol, - CredentialProtocolVersionType, - // ProofAttributeInfo, - // ProofPredicateInfo, - ProofProtocol, - ProofFormatService, ConnectionRecord, - ExtractProofFormats, CredentialExchangeRecord, DidResolutionOptions, - CreateCredentialOfferOptions, - JsonLdCredentialFormat, - JsonLdCredentialDetailFormat, JsonCredential, AgentMessage, Routing, Attachment, KeyType } from '@aries-framework/core' - -import type { - V1PresentationPreviewAttributeOptions, - V1PresentationPreviewPredicateOptions, -} from '@aries-framework/anoncreds' - - import type { DIDDocument } from 'did-resolver' -import { Version } from './examples'; export type TenantConfig = Pick & { - walletConfig: Pick; -}; - + walletConfig: Pick +} export interface AgentInfo { label: string @@ -86,7 +65,7 @@ export interface ProofRequestMessageResponse { type CredentialFormats = [CredentialFormat] // TODO: added type in protocolVersion -export interface ProposeCredentialOptions { +export interface ProposeCredentialOptions { // protocolVersion: T extends never ? 'v1' | 'v2' : 'v1' | 'v2' | T connectionRecord: ConnectionRecord credentialFormats: { @@ -123,7 +102,7 @@ export interface AcceptCredentialProposalOptions { // TODO: added type in protocolVersion export interface CreateOfferOptions { - protocolVersion: string; + protocolVersion: string connectionId: string credentialFormats: any autoAcceptCredential?: AutoAcceptCredential @@ -131,31 +110,31 @@ export interface CreateOfferOptions { } export interface CreateOfferOobOptions { - protocolVersion: string; - credentialFormats: any; + protocolVersion: string + credentialFormats: any autoAcceptCredential?: AutoAcceptCredential comment?: string - goalCode?: string; - parentThreadId?: string; - willConfirm?: boolean; - label?: string; + goalCode?: string + parentThreadId?: string + willConfirm?: boolean + label?: string } export interface CredentialCreateOfferOptions { - credentialRecord: CredentialExchangeRecord; + credentialRecord: CredentialExchangeRecord credentialFormats: JsonCredential - options: any; - attachmentId?: string; + options: any + attachmentId?: string } export interface CreateProofRequestOobOptions { - protocolVersion: string; - proofFormats: any; - goalCode?: string; - parentThreadId?: string; - willConfirm?: boolean; - autoAcceptProof?: AutoAcceptProof; - comment?: string; - label?: string; + protocolVersion: string + proofFormats: any + goalCode?: string + parentThreadId?: string + willConfirm?: boolean + autoAcceptProof?: AutoAcceptProof + comment?: string + label?: string } export interface OfferCredentialOptions { @@ -174,8 +153,8 @@ export interface OfferCredentialOptions { } export interface V2OfferCredentialOptions { - protocolVersion: string; - connectionId: string; + protocolVersion: string + connectionId: string credentialFormats: { indy: { credentialDefinitionId: string @@ -234,7 +213,7 @@ export interface OutOfBandInvitationSchema { accept?: string[] handshake_protocols?: HandshakeProtocol[] services: Array - imageUrl?: string, + imageUrl?: string } export interface ConnectionInvitationSchema { @@ -265,9 +244,9 @@ export interface RequestProofOptions { proofFormats: any comment: string autoAcceptProof: AutoAcceptProof - goalCode?: string; - parentThreadId?: string; - willConfirm?: boolean; + goalCode?: string + parentThreadId?: string + willConfirm?: boolean } // TODO: added type in protocolVersion @@ -277,8 +256,8 @@ export interface RequestProofProposalOptions { proofFormats: ProofFormatPayload<[ProofFormat], 'createProposal'> goalCode?: string parentThreadId?: string - autoAcceptProof?: AutoAcceptProof; - comment?: string; + autoAcceptProof?: AutoAcceptProof + comment?: string } export interface AcceptProofProposal { @@ -286,8 +265,8 @@ export interface AcceptProofProposal { proofFormats?: ProofFormatPayload<[ProofFormat], 'acceptProposal'> comment?: string autoAcceptProof?: AutoAcceptProof - goalCode?: string; - willConfirm?: boolean; + goalCode?: string + willConfirm?: boolean } export interface GetTenantAgentOptions { @@ -295,12 +274,12 @@ export interface GetTenantAgentOptions { } export interface DidCreateOptions { - method?: string; - did?: string; - options?: DidRegistrationExtraOptions; - secret?: DidRegistrationSecretOptions; - didDocument?: DidDocument; - seed?: any; + method?: string + did?: string + options?: DidRegistrationExtraOptions + secret?: DidRegistrationSecretOptions + didDocument?: DidDocument + seed?: any } export interface ResolvedDid { @@ -309,25 +288,25 @@ export interface ResolvedDid { } export interface DidCreate { - seed: string; - domain?: string; - method?: string; - did?: string; - role?: string; - options?: DidRegistrationExtraOptions; - secret?: DidRegistrationSecretOptions; - endorserDid?: string; - didDocument?: DidDocument; keyType?:KeyType + seed: string + domain?: string + method?: string + did?: string + role?: string + options?: DidRegistrationExtraOptions + secret?: DidRegistrationSecretOptions + endorserDid?: string + didDocument?: DidDocument } export interface CreateTenantOptions { - config: Omit, - seed: string; - method?: string; - role?: string; - endorserDid?: string; - did?: string; + config: Omit + seed: string + method?: string + role?: string + endorserDid?: string + did?: string } // export type WithTenantAgentCallback = ( @@ -335,33 +314,33 @@ export interface CreateTenantOptions { // ) => Promise export interface WithTenantAgentOptions { - tenantId: string; - method: string; - payload?: any; + tenantId: string + method: string + payload?: any } export interface ReceiveConnectionsForTenants { - tenantId: string; - invitationId?: string; + tenantId: string + invitationId?: string } export interface CreateInvitationOptions { - label?: string; - alias?: string; - imageUrl?: string; - goalCode?: string; - goal?: string; - handshake?: boolean; - handshakeProtocols?: HandshakeProtocol[]; - messages?: AgentMessage[]; - multiUseInvitation?: boolean; - autoAcceptConnection?: boolean; - routing?: Routing; - appendedAttachments?: Attachment[]; + label?: string + alias?: string + imageUrl?: string + goalCode?: string + goal?: string + handshake?: boolean + handshakeProtocols?: HandshakeProtocol[] + messages?: AgentMessage[] + multiUseInvitation?: boolean + autoAcceptConnection?: boolean + routing?: Routing + appendedAttachments?: Attachment[] } export interface EndorserTransaction { - transaction: string | Record, + transaction: string | Record endorserDid: string } @@ -378,12 +357,12 @@ export interface WriteTransaction { name: string version: Version attributes: string[] - }, + } credentialDefinition?: { - schemaId: string, - issuerId: string, - tag: string, - value: unknown, + schemaId: string + issuerId: string + tag: string + value: unknown type: string } } diff --git a/src/enums/enum.ts b/src/enums/enum.ts index 16200800..4896c23d 100644 --- a/src/enums/enum.ts +++ b/src/enums/enum.ts @@ -1,4 +1,4 @@ export enum CredentialEnum { - Finished = 'finished', - Action = 'action' -} \ No newline at end of file + Finished = 'finished', + Action = 'action', +} diff --git a/src/routes/routes.ts b/src/routes/routes.ts index 5aeb8c01..0dab3c32 100644 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@ -11,8 +11,6 @@ import { ConnectionController } from './../controllers/connections/ConnectionCon // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { OutOfBandController } from './../controllers/outofband/OutOfBandController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { CredentialController } from './../controllers/credentials/CredentialController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { CredentialDefinitionController } from './../controllers/credentials/CredentialDefinitionController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { SchemaController } from './../controllers/credentials/SchemaController'; @@ -22,6 +20,10 @@ import { DidController } from './../controllers/did/DidController'; import { MultiTenancyController } from './../controllers/multi-tenancy/MultiTenancyController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { ProofController } from './../controllers/proofs/ProofController'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { EndorserTransactionController } from './../controllers/endorser-transaction/EndorserTransactionController'; +// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa +import { CredentialController } from './../controllers/credentials/CredentialController'; import { iocContainer } from './../utils/tsyringeTsoaIocContainer'; import { IocContainer, IocContainerFactory } from '@tsoa/runtime'; import type { RequestHandler } from 'express'; @@ -81,7 +83,7 @@ const models: TsoaRoute.Models = { "properties": { "@type": {"dataType":"string","required":true}, "@id": {"dataType":"string","required":true}, - "~thread": {"dataType":"nestedObjectLiteral","nestedProperties":{"thid":{"dataType":"string"}}}, + "~thread": {"dataType":"nestedObjectLiteral","nestedProperties":{"pthid":{"dataType":"string"},"thid":{"dataType":"string"}}}, }, "additionalProperties": {"dataType":"any"}, }, @@ -285,125 +287,6 @@ 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 - "CredentialState": { - "dataType": "refEnum", - "enums": ["proposal-sent","proposal-received","offer-sent","offer-received","declined","request-sent","request-received","credential-issued","credential-received","done","abandoned"], - }, - // WARNING: This 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": { - "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 - "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 - "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}, - "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, - "comment": {"dataType":"string"}, - "connectionId": {"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 - "CredentialFormatPayload_CredentialFormats.acceptProposal_": { - "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 - "AcceptCredentialProposalOptions": { - "dataType": "refObject", - "properties": { - "credentialRecordId": {"dataType":"string","required":true}, - "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.acceptProposal_"}, - "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 - "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, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "CreateOfferOobOptions": { - "dataType": "refObject", - "properties": { - "protocolVersion": {"dataType":"string","required":true}, - "credentialFormats": {"dataType":"any","required":true}, - "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, - "comment": {"dataType":"string"}, - "goalCode": {"dataType":"string"}, - "parentThreadId": {"dataType":"string"}, - "willConfirm": {"dataType":"boolean"}, - }, - "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":{},"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 - "AcceptCredentialOfferOptions": { - "dataType": "refObject", - "properties": { - "credentialRecordId": {"dataType":"string","required":true}, - "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.acceptOffer_"}, - "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 - "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 - "CredentialFormatPayload_CredentialFormats.acceptRequest_": { - "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 - "AcceptCredentialRequestOptions": { - "dataType": "refObject", - "properties": { - "credentialRecord": {"ref":"CredentialExchangeRecord","required":true}, - "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.acceptRequest_"}, - "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 - "AcceptCredential": { - "dataType": "refObject", - "properties": { - "credentialRecord": {"ref":"CredentialExchangeRecord","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 "CredentialDefinitionId": { "dataType": "refAlias", "type": {"dataType":"string","validators":{}}, @@ -471,8 +354,10 @@ const models: TsoaRoute.Models = { "domain": {"dataType":"string"}, "method": {"dataType":"string"}, "did": {"dataType":"string"}, + "role": {"dataType":"string"}, "options": {"ref":"DidRegistrationExtraOptions"}, "secret": {"ref":"DidRegistrationSecretOptions"}, + "endorserDid": {"dataType":"string"}, "didDocument": {"ref":"DidDocument"}, }, "additionalProperties": false, @@ -499,6 +384,27 @@ const models: TsoaRoute.Models = { "config": {"ref":"Omit_TenantConfig.walletConfig_","required":true}, "seed": {"dataType":"string","required":true}, "method": {"dataType":"string"}, + "role": {"dataType":"string"}, + "endorserDid": {"dataType":"string"}, + "did": {"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 + "DidNymTransaction": { + "dataType": "refObject", + "properties": { + "did": {"dataType":"string","required":true}, + "nymRequest": {"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 + "EndorserTransaction": { + "dataType": "refObject", + "properties": { + "transaction": {"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"Record_string.unknown_"}],"required":true}, + "endorserDid": {"dataType":"string","required":true}, }, "additionalProperties": false, }, @@ -513,6 +419,70 @@ const models: TsoaRoute.Models = { "type": {"ref":"Pick_CreateOutOfBandInvitationConfig.Exclude_keyofCreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages__","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 + "WriteTransaction": { + "dataType": "refObject", + "properties": { + "endorsedTransaction": {"dataType":"string","required":true}, + "endorserDid": {"dataType":"string"}, + "schema": {"dataType":"nestedObjectLiteral","nestedProperties":{"attributes":{"dataType":"array","array":{"dataType":"string"},"required":true},"version":{"ref":"Version","required":true},"name":{"dataType":"string","required":true},"issuerId":{"dataType":"string","required":true}}}, + "credentialDefinition": {"dataType":"nestedObjectLiteral","nestedProperties":{"type":{"dataType":"string","required":true},"value":{"dataType":"any","required":true},"tag":{"dataType":"string","required":true},"issuerId":{"dataType":"string","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 + "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": {"dataType":"string","required":true}, + "connectionId": {"dataType":"string","required":true}, + "credentialFormats": {"dataType":"any","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 + "CreateOfferOobOptions": { + "dataType": "refObject", + "properties": { + "protocolVersion": {"dataType":"string","required":true}, + "credentialFormats": {"dataType":"any","required":true}, + "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, + "comment": {"dataType":"string"}, + "goalCode": {"dataType":"string"}, + "parentThreadId": {"dataType":"string"}, + "willConfirm": {"dataType":"boolean"}, + "label": {"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_CredentialFormatsFromProtocols_CredentialProtocol-Array_.acceptOffer_": { + "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 + "AcceptCredentialOfferOptions": { + "dataType": "refObject", + "properties": { + "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, + "comment": {"dataType":"string"}, + "credentialRecordId": {"dataType":"string","required":true}, + "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormatsFromProtocols_CredentialProtocol-Array_.acceptOffer_"}, + }, + "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 + "CredentialState": { + "dataType": "refEnum", + "enums": ["proposal-sent","proposal-received","offer-sent","offer-received","declined","request-sent","request-received","credential-issued","credential-received","done","abandoned"], + }, + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "AutoAcceptProof": { "dataType": "refEnum", "enums": ["always","contentApproved","never"], @@ -543,6 +513,7 @@ const models: TsoaRoute.Models = { "willConfirm": {"dataType":"boolean"}, "autoAcceptProof": {"ref":"AutoAcceptProof"}, "comment": {"dataType":"string"}, + "label": {"dataType":"string"}, }, "additionalProperties": false, }, @@ -555,16 +526,6 @@ 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 - "WithTenantAgentOptions": { - "dataType": "refObject", - "properties": { - "tenantId": {"dataType":"string","required":true}, - "method": {"dataType":"string","required":true}, - "payload": {"dataType":"any"}, - }, - "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 "ProofFormatPayload_%5BProofFormat%5D.createProposal_": { "dataType": "refAlias", "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}}, @@ -601,62 +562,158 @@ 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 -}; -const validationService = new ValidationService(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 - -export function RegisterRoutes(app: express.Router) { - // ########################################################################################################### - // NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look - // Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa - // ########################################################################################################### - app.get('/agent', - ...(fetchMiddlewares(AgentController)), - ...(fetchMiddlewares(AgentController.prototype.getAgentInfo)), - - async function AgentController_getAgentInfo(request: any, response: any, next: any) { - const args = { - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = getValidatedArgs(args, request, response); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - - const controller: any = await container.get(AgentController); - if (typeof controller['setStatus'] === 'function') { - controller.setStatus(undefined); - } - - - const promise = controller.getAgentInfo.apply(controller, validatedArgs as any); - promiseHandler(controller, promise, response, undefined, next); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/basic-messages/:connectionId', - ...(fetchMiddlewares(BasicMessageController)), - ...(fetchMiddlewares(BasicMessageController.prototype.getBasicMessages)), - - async function BasicMessageController_getBasicMessages(request: any, response: any, next: any) { - const args = { - connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, - }; - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = getValidatedArgs(args, request, response); - - const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - + "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": { + "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 + "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}, + "autoAcceptCredential": {"ref":"AutoAcceptCredential"}, + "comment": {"dataType":"string"}, + "connectionId": {"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 + "CredentialFormatPayload_CredentialFormats.acceptProposal_": { + "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 + "AcceptCredentialProposalOptions": { + "dataType": "refObject", + "properties": { + "credentialRecordId": {"dataType":"string","required":true}, + "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.acceptProposal_"}, + "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 + "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 + "CredentialFormatPayload_CredentialFormats.acceptRequest_": { + "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 + "AcceptCredentialRequestOptions": { + "dataType": "refObject", + "properties": { + "credentialRecord": {"ref":"CredentialExchangeRecord","required":true}, + "credentialFormats": {"ref":"CredentialFormatPayload_CredentialFormats.acceptRequest_"}, + "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 + "AcceptCredential": { + "dataType": "refObject", + "properties": { + "credentialRecord": {"ref":"CredentialExchangeRecord","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 +}; +const validationService = new ValidationService(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 + +export function RegisterRoutes(app: express.Router) { + // ########################################################################################################### + // NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look + // Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa + // ########################################################################################################### + app.get('/agent', + ...(fetchMiddlewares(AgentController)), + ...(fetchMiddlewares(AgentController.prototype.getAgentInfo)), + + async function AgentController_getAgentInfo(request: any, response: any, next: any) { + const args = { + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = getValidatedArgs(args, request, response); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(AgentController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + + const promise = controller.getAgentInfo.apply(controller, validatedArgs as any); + promiseHandler(controller, promise, response, undefined, next); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.delete('/agent/wallet', + ...(fetchMiddlewares(AgentController)), + ...(fetchMiddlewares(AgentController.prototype.deleteWallet)), + + async function AgentController_deleteWallet(request: any, response: any, next: any) { + const args = { + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = getValidatedArgs(args, request, response); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(AgentController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + + const promise = controller.deleteWallet.apply(controller, validatedArgs as any); + promiseHandler(controller, promise, response, undefined, next); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/basic-messages/:connectionId', + ...(fetchMiddlewares(BasicMessageController)), + ...(fetchMiddlewares(BasicMessageController.prototype.getBasicMessages)), + + async function BasicMessageController_getBasicMessages(request: any, response: any, next: any) { + const args = { + connectionId: {"in":"path","name":"connectionId","required":true,"ref":"RecordId"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = getValidatedArgs(args, request, response); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + const controller: any = await container.get(BasicMessageController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); @@ -1179,15 +1236,16 @@ export function RegisterRoutes(app: express.Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/credentials', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.getAllCredentials)), + app.get('/credential-definitions/:credentialDefinitionId', + ...(fetchMiddlewares(CredentialDefinitionController)), + ...(fetchMiddlewares(CredentialDefinitionController.prototype.getCredentialDefinitionById)), - async function CredentialController_getAllCredentials(request: any, response: any, next: any) { + async function CredentialDefinitionController_getCredentialDefinitionById(request: any, response: any, next: any) { const args = { - threadId: {"in":"query","name":"threadId","dataType":"string"}, - connectionId: {"in":"query","name":"connectionId","dataType":"string"}, - state: {"in":"query","name":"state","ref":"CredentialState"}, + 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 @@ -1198,25 +1256,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(CredentialDefinitionController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getAllCredentials.apply(controller, validatedArgs as any); + const promise = controller.getCredentialDefinitionById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/credentials/w3c', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.getAllW3c)), + app.post('/credential-definitions', + ...(fetchMiddlewares(CredentialDefinitionController)), + ...(fetchMiddlewares(CredentialDefinitionController.prototype.createCredentialDefinition)), - async function CredentialController_getAllW3c(request: any, response: any, next: any) { + async function CredentialDefinitionController_createCredentialDefinition(request: any, response: any, next: any) { const args = { + 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 @@ -1227,26 +1288,30 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(CredentialDefinitionController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getAllW3c.apply(controller, validatedArgs as any); + const promise = controller.createCredentialDefinition.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/credentials/w3c/:id', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.getW3cById)), + app.get('/schemas/:schemaId', + ...(fetchMiddlewares(SchemaController)), + ...(fetchMiddlewares(SchemaController.prototype.getSchemaById)), - async function CredentialController_getW3cById(request: any, response: any, next: any) { + async function SchemaController_getSchemaById(request: any, response: any, next: any) { const args = { - id: {"in":"path","name":"id","required":true,"dataType":"string"}, + 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}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1257,27 +1322,27 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(SchemaController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getW3cById.apply(controller, validatedArgs as any); + const promise = controller.getSchemaById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/credentials/:credentialRecordId', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.getCredentialById)), + app.post('/schemas', + ...(fetchMiddlewares(SchemaController)), + ...(fetchMiddlewares(SchemaController.prototype.createSchema)), - async function CredentialController_getCredentialById(request: any, response: any, next: any) { + async function SchemaController_createSchema(request: any, response: any, next: any) { const args = { - credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + 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}}}, }; @@ -1289,28 +1354,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(SchemaController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getCredentialById.apply(controller, validatedArgs as any); + const promise = controller.createSchema.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/credentials/propose-credential', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.proposeCredential)), + app.get('/dids/:did', + ...(fetchMiddlewares(DidController)), + ...(fetchMiddlewares(DidController.prototype.getDidRecordByDid)), - async function CredentialController_proposeCredential(request: any, response: any, next: any) { + async function DidController_getDidRecordByDid(request: any, response: any, next: any) { const args = { - 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}}}, + did: {"in":"path","name":"did","required":true,"ref":"Did"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1321,28 +1384,27 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(DidController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.proposeCredential.apply(controller, validatedArgs as any); + const promise = controller.getDidRecordByDid.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/credentials/accept-proposal', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.acceptProposal)), + app.post('/dids/write', + ...(fetchMiddlewares(DidController)), + ...(fetchMiddlewares(DidController.prototype.writeDid)), - async function CredentialController_acceptProposal(request: any, response: any, next: any) { + async function DidController_writeDid(request: any, response: any, next: any) { const args = { - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + data: {"in":"body","name":"data","required":true,"ref":"DidCreate"}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - acceptCredentialProposal: {"in":"body","name":"acceptCredentialProposal","required":true,"ref":"AcceptCredentialProposalOptions"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1353,26 +1415,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(DidController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.acceptProposal.apply(controller, validatedArgs as any); + const promise = controller.writeDid.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/credentials/create-offer', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.createOffer)), + app.post('/dids/did/key', + ...(fetchMiddlewares(DidController)), + ...(fetchMiddlewares(DidController.prototype.createDidKey)), - async function CredentialController_createOffer(request: any, response: any, next: any) { + async function DidController_createDidKey(request: any, response: any, next: any) { const args = { - createOfferOptions: {"in":"body","name":"createOfferOptions","required":true,"ref":"CreateOfferOptions"}, + didOptions: {"in":"body","name":"didOptions","required":true,"ref":"DidCreate"}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; @@ -1384,26 +1446,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(DidController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.createOffer.apply(controller, validatedArgs as any); + const promise = controller.createDidKey.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/credentials/create-offer-oob', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.createOfferOob)), + app.post('/dids/did/web', + ...(fetchMiddlewares(DidController)), + ...(fetchMiddlewares(DidController.prototype.createDidWeb)), - async function CredentialController_createOfferOob(request: any, response: any, next: any) { + async function DidController_createDidWeb(request: any, response: any, next: any) { const args = { - outOfBandOption: {"in":"body","name":"outOfBandOption","required":true,"ref":"CreateOfferOobOptions"}, + didOptions: {"in":"body","name":"didOptions","required":true,"ref":"DidCreate"}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; @@ -1415,28 +1477,57 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(DidController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.createOfferOob.apply(controller, validatedArgs as any); + const promise = controller.createDidWeb.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/credentials/accept-offer', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.acceptOffer)), + app.get('/dids', + ...(fetchMiddlewares(DidController)), + ...(fetchMiddlewares(DidController.prototype.getDids)), - async function CredentialController_acceptOffer(request: any, response: any, next: any) { + async function DidController_getDids(request: any, response: any, next: any) { + const args = { + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = getValidatedArgs(args, request, response); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(DidController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + + const promise = controller.getDids.apply(controller, validatedArgs as any); + promiseHandler(controller, promise, response, undefined, next); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/multi-tenancy/create-tenant', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.createTenant)), + + async function MultiTenancyController_createTenant(request: any, response: any, next: any) { const args = { + 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}}}, - acceptCredentialOfferOptions: {"in":"body","name":"acceptCredentialOfferOptions","required":true,"ref":"AcceptCredentialOfferOptions"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1447,28 +1538,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.acceptOffer.apply(controller, validatedArgs as any); + const promise = controller.createTenant.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/credentials/accept-request', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.acceptRequest)), + app.post('/multi-tenancy/transactions/set-endorser-role/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.didNymTransaction)), - async function CredentialController_acceptRequest(request: any, response: any, next: any) { + async function MultiTenancyController_didNymTransaction(request: any, response: any, next: any) { const args = { - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + 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}}}, - acceptCredentialRequestOptions: {"in":"body","name":"acceptCredentialRequestOptions","required":true,"ref":"AcceptCredentialRequestOptions"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1479,28 +1570,29 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.acceptRequest.apply(controller, validatedArgs as any); + const promise = controller.didNymTransaction.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/credentials/accept-credential', - ...(fetchMiddlewares(CredentialController)), - ...(fetchMiddlewares(CredentialController.prototype.acceptCredential)), + app.post('/multi-tenancy/transactions/endorse/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.endorserTransaction)), - async function CredentialController_acceptCredential(request: any, response: any, next: any) { + async function MultiTenancyController_endorserTransaction(request: any, response: any, next: any) { const args = { - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + 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}}}, - acceptCredential: {"in":"body","name":"acceptCredential","required":true,"ref":"AcceptCredential"}, + 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 @@ -1511,29 +1603,60 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.acceptCredential.apply(controller, validatedArgs as any); + const promise = controller.endorserTransaction.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/credential-definitions/:credentialDefinitionId', - ...(fetchMiddlewares(CredentialDefinitionController)), - ...(fetchMiddlewares(CredentialDefinitionController.prototype.getCredentialDefinitionById)), + app.get('/multi-tenancy/connections/:connectionId/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getConnectionById)), - async function CredentialDefinitionController_getCredentialDefinitionById(request: any, response: any, next: any) { + async function MultiTenancyController_getConnectionById(request: any, response: any, next: any) { const args = { - credentialDefinitionId: {"in":"path","name":"credentialDefinitionId","required":true,"ref":"CredentialDefinitionId"}, - badRequestError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + 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 + + let validatedArgs: any[] = []; + try { + validatedArgs = getValidatedArgs(args, request, response); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(MultiTenancyController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + + const promise = controller.getConnectionById.apply(controller, validatedArgs as any); + promiseHandler(controller, promise, response, undefined, next); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/multi-tenancy/create-invitation/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.createInvitation)), + + async function MultiTenancyController_createInvitation(request: any, response: any, next: any) { + const args = { 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","ref":"Omit_CreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages_"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1544,28 +1667,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialDefinitionController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getCredentialDefinitionById.apply(controller, validatedArgs as any); + const promise = controller.createInvitation.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/credential-definitions', - ...(fetchMiddlewares(CredentialDefinitionController)), - ...(fetchMiddlewares(CredentialDefinitionController.prototype.createCredentialDefinition)), + app.post('/multi-tenancy/create-legacy-invitation/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.createLegacyInvitation)), - async function CredentialDefinitionController_createCredentialDefinition(request: any, response: any, next: any) { + async function MultiTenancyController_createLegacyInvitation(request: any, response: any, next: any) { const args = { - credentialDefinitionRequest: {"in":"body","name":"credentialDefinitionRequest","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"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}}}, + tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + config: {"in":"body","name":"config","ref":"Omit_CreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages_"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1576,29 +1699,27 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(CredentialDefinitionController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.createCredentialDefinition.apply(controller, validatedArgs as any); + const promise = controller.createLegacyInvitation.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/schemas/:schemaId', - ...(fetchMiddlewares(SchemaController)), - ...(fetchMiddlewares(SchemaController.prototype.getSchemaById)), + app.post('/multi-tenancy/receive-invitation/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.receiveInvitation)), - async function SchemaController_getSchemaById(request: any, response: any, next: any) { + async function MultiTenancyController_receiveInvitation(request: any, response: any, next: any) { const args = { - 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}}}, + 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}}}, }; @@ -1610,27 +1731,27 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(SchemaController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getSchemaById.apply(controller, validatedArgs as any); + const promise = controller.receiveInvitation.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/schemas', - ...(fetchMiddlewares(SchemaController)), - ...(fetchMiddlewares(SchemaController.prototype.createSchema)), + app.post('/multi-tenancy/receive-invitation-url/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.receiveInvitationFromUrl)), - async function SchemaController_createSchema(request: any, response: any, next: any) { + async function MultiTenancyController_receiveInvitationFromUrl(request: any, response: any, next: any) { const args = { - schema: {"in":"body","name":"schema","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"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}}}, + 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}}}, }; @@ -1642,26 +1763,27 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(SchemaController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.createSchema.apply(controller, validatedArgs as any); + const promise = controller.receiveInvitationFromUrl.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/dids/:did', - ...(fetchMiddlewares(DidController)), - ...(fetchMiddlewares(DidController.prototype.getDidRecordByDid)), + app.get('/multi-tenancy/oob/:invitationId/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getAllOutOfBandRecords)), - async function DidController_getDidRecordByDid(request: any, response: any, next: any) { + async function MultiTenancyController_getAllOutOfBandRecords(request: any, response: any, next: any) { const args = { - did: {"in":"path","name":"did","required":true,"ref":"Did"}, + tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + invitationId: {"in":"path","name":"invitationId","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 @@ -1672,26 +1794,96 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(DidController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getDidRecordByDid.apply(controller, validatedArgs as any); + const promise = controller.getAllOutOfBandRecords.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/dids/write', - ...(fetchMiddlewares(DidController)), - ...(fetchMiddlewares(DidController.prototype.writeDid)), + app.get('/multi-tenancy/connections/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getAllConnections)), - async function DidController_writeDid(request: any, response: any, next: any) { + async function MultiTenancyController_getAllConnections(request: any, response: any, next: any) { const args = { - data: {"in":"body","name":"data","required":true,"ref":"DidCreate"}, + tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + outOfBandId: {"in":"query","name":"outOfBandId","dataType":"string"}, + alias: {"in":"query","name":"alias","dataType":"string"}, + state: {"in":"query","name":"state","ref":"DidExchangeState"}, + myDid: {"in":"query","name":"myDid","dataType":"string"}, + theirDid: {"in":"query","name":"theirDid","dataType":"string"}, + theirLabel: {"in":"query","name":"theirLabel","dataType":"string"}, + }; + + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + + let validatedArgs: any[] = []; + try { + validatedArgs = getValidatedArgs(args, request, response); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(MultiTenancyController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + + const promise = controller.getAllConnections.apply(controller, validatedArgs as any); + promiseHandler(controller, promise, response, undefined, next); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/multi-tenancy/url/:tenantId/:invitationId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getInvitation)), + + async function MultiTenancyController_getInvitation(request: any, response: any, next: any) { + const args = { + 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 + + let validatedArgs: any[] = []; + try { + validatedArgs = getValidatedArgs(args, request, response); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(MultiTenancyController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + + const promise = controller.getInvitation.apply(controller, validatedArgs as any); + promiseHandler(controller, promise, response, undefined, next); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.post('/multi-tenancy/schema/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.createSchema)), + + async function MultiTenancyController_createSchema(request: any, response: any, next: any) { + const args = { + 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}}}, + 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}}}, }; @@ -1703,27 +1895,29 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(DidController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.writeDid.apply(controller, validatedArgs as any); + const promise = controller.createSchema.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/dids/did/key', - ...(fetchMiddlewares(DidController)), - ...(fetchMiddlewares(DidController.prototype.createDidKey)), + app.post('/multi-tenancy/transactions/write/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.writeSchemaAndCredDefOnLedger)), - async function DidController_createDidKey(request: any, response: any, next: any) { + async function MultiTenancyController_writeSchemaAndCredDefOnLedger(request: any, response: any, next: any) { const args = { - didOptions: {"in":"body","name":"didOptions","required":true,"ref":"DidCreate"}, + 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"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1734,26 +1928,30 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(DidController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.createDidKey.apply(controller, validatedArgs as any); + const promise = controller.writeSchemaAndCredDefOnLedger.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/dids/did/web', - ...(fetchMiddlewares(DidController)), - ...(fetchMiddlewares(DidController.prototype.createDidWeb)), + app.get('/multi-tenancy/schema/:schemaId/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getSchemaById)), - async function DidController_createDidWeb(request: any, response: any, next: any) { + async function MultiTenancyController_getSchemaById(request: any, response: any, next: any) { const args = { - didOptions: {"in":"body","name":"didOptions","required":true,"ref":"DidCreate"}, + 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}}}, }; @@ -1765,25 +1963,63 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(DidController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.createDidWeb.apply(controller, validatedArgs as any); + const promise = controller.getSchemaById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/dids', - ...(fetchMiddlewares(DidController)), - ...(fetchMiddlewares(DidController.prototype.getDids)), + app.post('/multi-tenancy/credential-definition/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.createCredentialDefinition)), + + async function MultiTenancyController_createCredentialDefinition(request: any, response: any, next: any) { + const args = { + 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 + + let validatedArgs: any[] = []; + try { + validatedArgs = getValidatedArgs(args, request, response); + + const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; + + const controller: any = await container.get(MultiTenancyController); + if (typeof controller['setStatus'] === 'function') { + controller.setStatus(undefined); + } + + + const promise = controller.createCredentialDefinition.apply(controller, validatedArgs as any); + promiseHandler(controller, promise, response, undefined, next); + } catch (err) { + return next(err); + } + }); + // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa + app.get('/multi-tenancy/credential-definition/:credentialDefinitionId/:tenantId', + ...(fetchMiddlewares(MultiTenancyController)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getCredentialDefinitionById)), - async function DidController_getDids(request: any, response: any, next: any) { + async function MultiTenancyController_getCredentialDefinitionById(request: any, response: any, next: any) { const args = { + 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 @@ -1794,27 +2030,27 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(DidController); + const controller: any = await container.get(MultiTenancyController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getDids.apply(controller, validatedArgs as any); + const promise = controller.getCredentialDefinitionById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/create-tenant', + app.post('/multi-tenancy/credentials/create-offer/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.createTenant)), + ...(fetchMiddlewares(MultiTenancyController.prototype.createOffer)), - async function MultiTenancyController_createTenant(request: any, response: any, next: any) { + async function MultiTenancyController_createOffer(request: any, response: any, next: any) { const args = { - createTenantOptions: {"in":"body","name":"createTenantOptions","required":true,"ref":"CreateTenantOptions"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + createOfferOptions: {"in":"body","name":"createOfferOptions","required":true,"ref":"CreateOfferOptions"}, + tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; @@ -1832,22 +2068,22 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.createTenant.apply(controller, validatedArgs as any); + const promise = controller.createOffer.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/connections/:connectionId/:tenantId', + app.post('/multi-tenancy/credentials/create-offer-oob/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getConnectionById)), + ...(fetchMiddlewares(MultiTenancyController.prototype.createOfferOob)), - async function MultiTenancyController_getConnectionById(request: any, response: any, next: any) { + async function MultiTenancyController_createOfferOob(request: any, response: any, next: any) { const args = { 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}}}, + createOfferOptions: {"in":"body","name":"createOfferOptions","required":true,"ref":"CreateOfferOobOptions"}, + internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1864,22 +2100,23 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.getConnectionById.apply(controller, validatedArgs as any); + const promise = controller.createOfferOob.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/create-invitation/:tenantId', + app.post('/multi-tenancy/credentials/accept-offer/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.createInvitation)), + ...(fetchMiddlewares(MultiTenancyController.prototype.acceptOffer)), - async function MultiTenancyController_createInvitation(request: any, response: any, next: any) { + async function MultiTenancyController_acceptOffer(request: any, response: any, next: any) { const args = { + notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - config: {"in":"body","name":"config","ref":"Omit_CreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages_"}, + acceptCredentialOfferOptions: {"in":"body","name":"acceptCredentialOfferOptions","required":true,"ref":"AcceptCredentialOfferOptions"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1896,22 +2133,23 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.createInvitation.apply(controller, validatedArgs as any); + const promise = controller.acceptOffer.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/create-legacy-invitation/:tenantId', + app.get('/multi-tenancy/credentials/:credentialRecordId/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.createLegacyInvitation)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getCredentialById)), - async function MultiTenancyController_createLegacyInvitation(request: any, response: any, next: any) { + async function MultiTenancyController_getCredentialById(request: any, response: any, next: any) { const args = { - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, + credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"ref":"RecordId"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - config: {"in":"body","name":"config","ref":"Omit_CreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages_"}, + 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 @@ -1928,22 +2166,23 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.createLegacyInvitation.apply(controller, validatedArgs as any); + const promise = controller.getCredentialById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/receive-invitation/:tenantId', + app.get('/multi-tenancy/credentials/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.receiveInvitation)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getAllCredentials)), - async function MultiTenancyController_receiveInvitation(request: any, response: any, next: any) { + async function MultiTenancyController_getAllCredentials(request: any, response: any, next: any) { const args = { - 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}}}, + threadId: {"in":"query","name":"threadId","dataType":"string"}, + connectionId: {"in":"query","name":"connectionId","dataType":"string"}, + state: {"in":"query","name":"state","ref":"CredentialState"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -1960,22 +2199,21 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.receiveInvitation.apply(controller, validatedArgs as any); + const promise = controller.getAllCredentials.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/receive-invitation-url/:tenantId', + app.get('/multi-tenancy/proofs/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.receiveInvitationFromUrl)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getAllProofs)), - async function MultiTenancyController_receiveInvitationFromUrl(request: any, response: any, next: any) { + async function MultiTenancyController_getAllProofs(request: any, response: any, next: any) { const args = { - 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}}}, + threadId: {"in":"query","name":"threadId","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 @@ -1992,21 +2230,23 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.receiveInvitationFromUrl.apply(controller, validatedArgs as any); + const promise = controller.getAllProofs.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/oob/:invitationId/:tenantId', + app.get('/multi-tenancy/form-data/:tenantId/:proofRecordId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getAllOutOfBandRecords)), + ...(fetchMiddlewares(MultiTenancyController.prototype.proofFormData)), - async function MultiTenancyController_getAllOutOfBandRecords(request: any, response: any, next: any) { + async function MultiTenancyController_proofFormData(request: any, response: any, next: any) { const args = { + proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - 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 @@ -2023,26 +2263,23 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.getAllOutOfBandRecords.apply(controller, validatedArgs as any); + const promise = controller.proofFormData.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/connections/:tenantId', + app.post('/multi-tenancy/proofs/request-proof/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getAllConnections)), + ...(fetchMiddlewares(MultiTenancyController.prototype.requestProof)), - async function MultiTenancyController_getAllConnections(request: any, response: any, next: any) { + async function MultiTenancyController_requestProof(request: any, response: any, next: any) { const args = { + requestProofOptions: {"in":"body","name":"requestProofOptions","required":true,"ref":"RequestProofOptions"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - outOfBandId: {"in":"query","name":"outOfBandId","dataType":"string"}, - alias: {"in":"query","name":"alias","dataType":"string"}, - state: {"in":"query","name":"state","ref":"DidExchangeState"}, - myDid: {"in":"query","name":"myDid","dataType":"string"}, - theirDid: {"in":"query","name":"theirDid","dataType":"string"}, - theirLabel: {"in":"query","name":"theirLabel","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 @@ -2059,22 +2296,22 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.getAllConnections.apply(controller, validatedArgs as any); + const promise = controller.requestProof.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/url/:tenantId/:invitationId', + app.post('/multi-tenancy/proofs/create-request-oob/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getInvitation)), + ...(fetchMiddlewares(MultiTenancyController.prototype.createRequest)), - async function MultiTenancyController_getInvitation(request: any, response: any, next: any) { + async function MultiTenancyController_createRequest(request: any, response: any, next: any) { const args = { - 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}}}, + 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 @@ -2091,22 +2328,23 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.getInvitation.apply(controller, validatedArgs as any); + const promise = controller.createRequest.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/schema/:tenantId', + app.post('/multi-tenancy/proofs/:proofRecordId/accept-request/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.createSchema)), + ...(fetchMiddlewares(MultiTenancyController.prototype.acceptRequest)), - async function MultiTenancyController_createSchema(request: any, response: any, next: any) { + async function MultiTenancyController_acceptRequest(request: any, response: any, next: any) { const args = { - schema: {"in":"body","name":"schema","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"attributes":{"dataType":"array","array":{"dataType":"string"},"required":true},"version":{"ref":"Version","required":true},"name":{"dataType":"string","required":true},"issuerId":{"dataType":"string","required":true}}}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - forbiddenError: {"in":"res","name":"400","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + 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}}}, }; @@ -2124,24 +2362,22 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.createSchema.apply(controller, validatedArgs as any); + const promise = controller.acceptRequest.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/schema/:schemaId/:tenantId', + app.post('/multi-tenancy/proofs/:proofRecordId/accept-presentation/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getSchemaById)), + ...(fetchMiddlewares(MultiTenancyController.prototype.acceptPresentation)), - async function MultiTenancyController_getSchemaById(request: any, response: any, next: any) { + async function MultiTenancyController_acceptPresentation(request: any, response: any, next: any) { const args = { - schemaId: {"in":"path","name":"schemaId","required":true,"ref":"SchemaId"}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - 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}}}, }; @@ -2159,21 +2395,21 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.getSchemaById.apply(controller, validatedArgs as any); + const promise = controller.acceptPresentation.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/credential-definition/:tenantId', + app.get('/multi-tenancy/proofs/:proofRecordId/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.createCredentialDefinition)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getProofById)), - async function MultiTenancyController_createCredentialDefinition(request: any, response: any, next: any) { + async function MultiTenancyController_getProofById(request: any, response: any, next: any) { const args = { - credentialDefinitionRequest: {"in":"body","name":"credentialDefinitionRequest","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"tag":{"dataType":"string","required":true},"schemaId":{"dataType":"string","required":true},"issuerId":{"dataType":"string","required":true}}}, tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + proofRecordId: {"in":"path","name":"proofRecordId","required":true,"ref":"RecordId"}, notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; @@ -2192,22 +2428,20 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.createCredentialDefinition.apply(controller, validatedArgs as any); + const promise = controller.getProofById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/credential-definition/:credentialDefinitionId/:tenantId', + app.get('/multi-tenancy/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getCredentialDefinitionById)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getTenantById)), - async function MultiTenancyController_getCredentialDefinitionById(request: any, response: any, next: any) { + async function MultiTenancyController_getTenantById(request: any, response: any, next: any) { const args = { - 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}}}, }; @@ -2226,21 +2460,21 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.getCredentialDefinitionById.apply(controller, validatedArgs as any); + const promise = controller.getTenantById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/credentials/create-offer/:tenantId', + app.post('/multi-tenancy/tenant', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.createOffer)), + ...(fetchMiddlewares(MultiTenancyController.prototype.getTenantAgent)), - async function MultiTenancyController_createOffer(request: any, response: any, next: any) { + async function MultiTenancyController_getTenantAgent(request: any, response: any, next: any) { const args = { - createOfferOptions: {"in":"body","name":"createOfferOptions","required":true,"ref":"CreateOfferOptions"}, - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + tenantAgentOptions: {"in":"body","name":"tenantAgentOptions","required":true,"ref":"GetTenantAgentOptions"}, + 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}}}, }; @@ -2258,21 +2492,21 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.createOffer.apply(controller, validatedArgs as any); + const promise = controller.getTenantAgent.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/credentials/create-offer-oob/:tenantId', + app.delete('/multi-tenancy/:tenantId', ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.createOfferOob)), + ...(fetchMiddlewares(MultiTenancyController.prototype.deleteTenantById)), - async function MultiTenancyController_createOfferOob(request: any, response: any, next: any) { + async function MultiTenancyController_deleteTenantById(request: any, response: any, next: any) { const args = { tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - createOfferOptions: {"in":"body","name":"createOfferOptions","required":true,"ref":"CreateOfferOobOptions"}, + 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}}}, }; @@ -2290,23 +2524,20 @@ export function RegisterRoutes(app: express.Router) { } - const promise = controller.createOfferOob.apply(controller, validatedArgs as any); + const promise = controller.deleteTenantById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/credentials/accept-offer/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.acceptOffer)), + app.get('/proofs', + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.getAllProofs)), - async function MultiTenancyController_acceptOffer(request: any, response: any, next: any) { + async function ProofController_getAllProofs(request: any, response: any, next: any) { const args = { - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, - internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - acceptCredentialOfferOptions: {"in":"body","name":"acceptCredentialOfferOptions","required":true,"ref":"AcceptCredentialOfferOptions"}, + threadId: {"in":"query","name":"threadId","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 @@ -2317,27 +2548,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(ProofController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.acceptOffer.apply(controller, validatedArgs as any); + const promise = controller.getAllProofs.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/credentials/:credentialRecordId/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getCredentialById)), + app.get('/proofs/:proofRecordId', + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.getProofById)), - async function MultiTenancyController_getCredentialById(request: any, response: any, next: any) { + async function ProofController_getProofById(request: any, response: any, next: any) { const args = { - credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"ref":"RecordId"}, - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + proofRecordId: {"in":"path","name":"proofRecordId","required":true,"ref":"RecordId"}, notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; @@ -2350,29 +2580,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(ProofController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getCredentialById.apply(controller, validatedArgs as any); + const promise = controller.getProofById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/credentials/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getAllCredentials)), + app.post('/proofs/propose-proof', + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.proposeProof)), - async function MultiTenancyController_getAllCredentials(request: any, response: any, next: any) { + async function ProofController_proposeProof(request: any, response: any, next: any) { const args = { - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - threadId: {"in":"query","name":"threadId","dataType":"string"}, - connectionId: {"in":"query","name":"connectionId","dataType":"string"}, - state: {"in":"query","name":"state","ref":"CredentialState"}, + 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 @@ -2383,27 +2612,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(ProofController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getAllCredentials.apply(controller, validatedArgs as any); + const promise = controller.proposeProof.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/proofs/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getAllProofs)), + app.post('/proofs/:proofRecordId/accept-proposal', + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.acceptProposal)), - async function MultiTenancyController_getAllProofs(request: any, response: any, next: any) { + async function ProofController_acceptProposal(request: any, response: any, next: any) { const args = { - threadId: {"in":"query","name":"threadId","dataType":"string"}, - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + 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 @@ -2414,27 +2644,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(ProofController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getAllProofs.apply(controller, validatedArgs as any); + const promise = controller.acceptProposal.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/form-data/:tenantId/:proofRecordId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.proofFormData)), + app.post('/proofs/request-proof', + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.requestProof)), - async function MultiTenancyController_proofFormData(request: any, response: any, next: any) { + async function ProofController_requestProof(request: any, response: any, next: any) { const args = { - proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, + 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}}}, }; @@ -2447,28 +2676,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(ProofController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.proofFormData.apply(controller, validatedArgs as any); + const promise = controller.requestProof.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/proofs/request-proof/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.requestProof)), + app.post('/proofs/create-request-oob', + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.createRequest)), - async function MultiTenancyController_requestProof(request: any, response: any, next: any) { + async function ProofController_createRequest(request: any, response: any, next: any) { const args = { - requestProofOptions: {"in":"body","name":"requestProofOptions","required":true,"ref":"RequestProofOptions"}, - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + createRequestOptions: {"in":"body","name":"createRequestOptions","required":true,"ref":"CreateProofRequestOobOptions"}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; @@ -2480,27 +2707,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(ProofController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.requestProof.apply(controller, validatedArgs as any); + const promise = controller.createRequest.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/proofs/create-request-oob/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.createRequest)), + app.post('/proofs/:proofRecordId/accept-request', + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.acceptRequest)), - async function MultiTenancyController_createRequest(request: any, response: any, next: any) { + async function ProofController_acceptRequest(request: any, response: any, next: any) { const args = { - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - createRequestOptions: {"in":"body","name":"createRequestOptions","required":true,"ref":"CreateProofRequestOobOptions"}, + 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}}}, }; @@ -2512,28 +2740,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(ProofController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.createRequest.apply(controller, validatedArgs as any); + const promise = controller.acceptRequest.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/proofs/:proofRecordId/accept-request/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.acceptRequest)), + app.post('/proofs/:proofRecordId/accept-presentation', + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.acceptPresentation)), - async function MultiTenancyController_acceptRequest(request: any, response: any, next: any) { + async function ProofController_acceptPresentation(request: any, response: any, next: any) { const args = { - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, - request: {"in":"body","name":"request","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"comment":{"dataType":"string"},"filterByNonRevocationRequirements":{"dataType":"boolean"},"filterByPresentationPreview":{"dataType":"boolean"}}}, notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; @@ -2546,26 +2772,25 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(ProofController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.acceptRequest.apply(controller, validatedArgs as any); + const promise = controller.acceptPresentation.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/proofs/:proofRecordId/accept-presentation/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.acceptPresentation)), + app.get('/proofs/:proofRecordId/form-data', + ...(fetchMiddlewares(ProofController)), + ...(fetchMiddlewares(ProofController.prototype.proofFormData)), - async function MultiTenancyController_acceptPresentation(request: any, response: any, next: any) { + async function ProofController_proofFormData(request: any, response: any, next: any) { const args = { - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, proofRecordId: {"in":"path","name":"proofRecordId","required":true,"dataType":"string"}, notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, @@ -2579,29 +2804,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(ProofController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.acceptPresentation.apply(controller, validatedArgs as any); + const promise = controller.proofFormData.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/proofs/:proofRecordId/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getProofById)), + app.post('/transactions/endorse', + ...(fetchMiddlewares(EndorserTransactionController)), + ...(fetchMiddlewares(EndorserTransactionController.prototype.endorserTransaction)), - async function MultiTenancyController_getProofById(request: any, response: any, next: any) { + async function EndorserTransactionController_endorserTransaction(request: any, response: any, next: any) { const args = { - tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"}, - proofRecordId: {"in":"path","name":"proofRecordId","required":true,"ref":"RecordId"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + 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 @@ -2612,27 +2836,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(EndorserTransactionController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getProofById.apply(controller, validatedArgs as any); + const promise = controller.endorserTransaction.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/multi-tenancy/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getTenantById)), + app.post('/transactions/set-endorser-role', + ...(fetchMiddlewares(EndorserTransactionController)), + ...(fetchMiddlewares(EndorserTransactionController.prototype.didNymTransaction)), - async function MultiTenancyController_getTenantById(request: any, response: any, next: any) { + async function EndorserTransactionController_didNymTransaction(request: any, response: any, next: any) { const args = { - tenantId: {"in":"query","name":"tenantId","required":true,"dataType":"string"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + didNymTransaction: {"in":"body","name":"didNymTransaction","required":true,"ref":"DidNymTransaction"}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; @@ -2644,28 +2867,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(EndorserTransactionController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getTenantById.apply(controller, validatedArgs as any); + const promise = controller.didNymTransaction.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/tenant', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.getTenantAgent)), + app.post('/transactions/write', + ...(fetchMiddlewares(EndorserTransactionController)), + ...(fetchMiddlewares(EndorserTransactionController.prototype.writeSchemaAndCredDefOnLedger)), - async function MultiTenancyController_getTenantAgent(request: any, response: any, next: any) { + async function EndorserTransactionController_writeSchemaAndCredDefOnLedger(request: any, response: any, next: any) { const args = { - tenantAgentOptions: {"in":"body","name":"tenantAgentOptions","required":true,"ref":"GetTenantAgentOptions"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"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}}}, + writeTransaction: {"in":"body","name":"writeTransaction","required":true,"ref":"WriteTransaction"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2676,28 +2899,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(EndorserTransactionController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getTenantAgent.apply(controller, validatedArgs as any); + const promise = controller.writeSchemaAndCredDefOnLedger.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.delete('/multi-tenancy/:tenantId', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.deleteTenantById)), + app.get('/credentials', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.getAllCredentials)), - async function MultiTenancyController_deleteTenantById(request: any, response: any, next: any) { + async function CredentialController_getAllCredentials(request: any, response: any, next: any) { const args = { - tenantId: {"in":"query","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}}}, + threadId: {"in":"query","name":"threadId","dataType":"string"}, + connectionId: {"in":"query","name":"connectionId","dataType":"string"}, + state: {"in":"query","name":"state","ref":"CredentialState"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2708,28 +2931,25 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.deleteTenantById.apply(controller, validatedArgs as any); + const promise = controller.getAllCredentials.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/multi-tenancy/with-tenant-agent', - ...(fetchMiddlewares(MultiTenancyController)), - ...(fetchMiddlewares(MultiTenancyController.prototype.withTenantAgent)), + app.get('/credentials/w3c', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.getAllW3c)), - async function MultiTenancyController_withTenantAgent(request: any, response: any, next: any) { + async function CredentialController_getAllW3c(request: any, response: any, next: any) { const args = { - withTenantAgentOptions: {"in":"body","name":"withTenantAgentOptions","required":true,"ref":"WithTenantAgentOptions"}, - 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 @@ -2740,26 +2960,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(MultiTenancyController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.withTenantAgent.apply(controller, validatedArgs as any); + const promise = controller.getAllW3c.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/proofs', - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.getAllProofs)), + app.get('/credentials/w3c/:id', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.getW3cById)), - async function ProofController_getAllProofs(request: any, response: any, next: any) { + async function CredentialController_getW3cById(request: any, response: any, next: any) { const args = { - threadId: {"in":"query","name":"threadId","dataType":"string"}, + id: {"in":"path","name":"id","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 @@ -2770,26 +2990,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(ProofController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getAllProofs.apply(controller, validatedArgs as any); + const promise = controller.getW3cById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/proofs/:proofRecordId', - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.getProofById)), + app.get('/credentials/:credentialRecordId', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.getCredentialById)), - async function ProofController_getProofById(request: any, response: any, next: any) { + async function CredentialController_getCredentialById(request: any, response: any, next: any) { const args = { - proofRecordId: {"in":"path","name":"proofRecordId","required":true,"ref":"RecordId"}, + 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}}}, }; @@ -2802,26 +3022,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(ProofController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.getProofById.apply(controller, validatedArgs as any); + const promise = controller.getCredentialById.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/proofs/propose-proof', - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.proposeProof)), + app.post('/credentials/propose-credential', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.proposeCredential)), - async function ProofController_proposeProof(request: any, response: any, next: any) { + async function CredentialController_proposeCredential(request: any, response: any, next: any) { const args = { - requestProofProposalOptions: {"in":"body","name":"requestProofProposalOptions","required":true,"ref":"RequestProofProposalOptions"}, + 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}}}, }; @@ -2834,28 +3054,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(ProofController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.proposeProof.apply(controller, validatedArgs as any); + const promise = controller.proposeCredential.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/proofs/:proofRecordId/accept-proposal', - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.acceptProposal)), + app.post('/credentials/accept-proposal', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.acceptProposal)), - async function ProofController_acceptProposal(request: any, response: any, next: any) { + async function CredentialController_acceptProposal(request: any, response: any, next: any) { const args = { - 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}}}, + acceptCredentialProposal: {"in":"body","name":"acceptCredentialProposal","required":true,"ref":"AcceptCredentialProposalOptions"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2866,7 +3086,7 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(ProofController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } @@ -2879,14 +3099,13 @@ export function RegisterRoutes(app: express.Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/proofs/request-proof', - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.requestProof)), + app.post('/credentials/create-offer', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.createOffer)), - async function ProofController_requestProof(request: any, response: any, next: any) { + async function CredentialController_createOffer(request: any, response: any, next: any) { const args = { - requestProofOptions: {"in":"body","name":"requestProofOptions","required":true,"ref":"RequestProofOptions"}, - notFoundError: {"in":"res","name":"404","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"reason":{"dataType":"string","required":true}}}, + createOfferOptions: {"in":"body","name":"createOfferOptions","required":true,"ref":"CreateOfferOptions"}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; @@ -2898,26 +3117,26 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(ProofController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.requestProof.apply(controller, validatedArgs as any); + const promise = controller.createOffer.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/proofs/create-request-oob', - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.createRequest)), + app.post('/credentials/create-offer-oob', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.createOfferOob)), - async function ProofController_createRequest(request: any, response: any, next: any) { + async function CredentialController_createOfferOob(request: any, response: any, next: any) { const args = { - createRequestOptions: {"in":"body","name":"createRequestOptions","required":true,"ref":"CreateProofRequestOobOptions"}, + outOfBandOption: {"in":"body","name":"outOfBandOption","required":true,"ref":"CreateOfferOobOptions"}, internalServerError: {"in":"res","name":"500","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true}}}, }; @@ -2929,29 +3148,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(ProofController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.createRequest.apply(controller, validatedArgs as any); + const promise = controller.createOfferOob.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/proofs/:proofRecordId/accept-request', - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.acceptRequest)), + app.post('/credentials/accept-offer', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.acceptOffer)), - async function ProofController_acceptRequest(request: any, response: any, next: any) { + async function CredentialController_acceptOffer(request: any, response: any, next: any) { const args = { - 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}}}, + acceptCredentialOfferOptions: {"in":"body","name":"acceptCredentialOfferOptions","required":true,"ref":"AcceptCredentialOfferOptions"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2962,28 +3180,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(ProofController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.acceptRequest.apply(controller, validatedArgs as any); + const promise = controller.acceptOffer.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.post('/proofs/:proofRecordId/accept-presentation', - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.acceptPresentation)), + app.post('/credentials/accept-request', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.acceptRequest)), - async function ProofController_acceptPresentation(request: any, response: any, next: any) { + async function CredentialController_acceptRequest(request: any, response: any, next: any) { const args = { - 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}}}, + acceptCredentialRequestOptions: {"in":"body","name":"acceptCredentialRequestOptions","required":true,"ref":"AcceptCredentialRequestOptions"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -2994,28 +3212,28 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(ProofController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.acceptPresentation.apply(controller, validatedArgs as any); + const promise = controller.acceptRequest.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - app.get('/proofs/:proofRecordId/form-data', - ...(fetchMiddlewares(ProofController)), - ...(fetchMiddlewares(ProofController.prototype.proofFormData)), + app.post('/credentials/accept-credential', + ...(fetchMiddlewares(CredentialController)), + ...(fetchMiddlewares(CredentialController.prototype.acceptCredential)), - async function ProofController_proofFormData(request: any, response: any, next: any) { + async function CredentialController_acceptCredential(request: any, response: any, next: any) { const args = { - 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}}}, + acceptCredential: {"in":"body","name":"acceptCredential","required":true,"ref":"AcceptCredential"}, }; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa @@ -3026,13 +3244,13 @@ export function RegisterRoutes(app: express.Router) { const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer; - const controller: any = await container.get(ProofController); + const controller: any = await container.get(CredentialController); if (typeof controller['setStatus'] === 'function') { controller.setStatus(undefined); } - const promise = controller.proofFormData.apply(controller, validatedArgs as any); + const promise = controller.acceptCredential.apply(controller, validatedArgs as any); promiseHandler(controller, promise, response, undefined, next); } catch (err) { return next(err); diff --git a/src/routes/swagger.json b/src/routes/swagger.json index f97c5b24..845ffbfc 100644 --- a/src/routes/swagger.json +++ b/src/routes/swagger.json @@ -89,6 +89,9 @@ }, "~thread": { "properties": { + "pthid": { + "type": "string" + }, "thid": { "type": "string" } @@ -595,416 +598,211 @@ "type": "object", "additionalProperties": false }, - "CredentialState": { - "description": "Issue Credential states as defined in RFC 0036 and RFC 0453", - "enum": [ - "proposal-sent", - "proposal-received", - "offer-sent", - "offer-received", - "declined", - "request-sent", - "request-received", - "credential-issued", - "credential-received", - "done", - "abandoned" - ], - "type": "string" - }, - "W3cCredentialRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" + "CredentialDefinitionId": { + "type": "string", + "example": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag" }, - "ConnectionRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" + "SchemaId": { + "type": "string", + "example": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0" }, - "AutoAcceptCredential": { - "description": "Typing of the state for auto acceptance", - "enum": [ - "always", - "contentApproved", - "never" - ], - "type": "string" + "Version": { + "type": "string", + "example": "1.0.0" }, - "ProposeCredentialOptions": { + "DidResolutionMetadata": { "properties": { - "connectionRecord": { - "$ref": "#/components/schemas/ConnectionRecord" + "contentType": { + "type": "string" }, - "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" + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "invalidDid", + "notFound", + "representationNotSupported", + "unsupportedDidMethod" + ] } - }, - "required": [ - "indy" - ], - "type": "object" - }, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" - }, - "comment": { - "type": "string" + ] }, - "connectionId": { + "message": { "type": "string" } }, - "required": [ - "connectionRecord", - "credentialFormats", - "connectionId" - ], "type": "object", "additionalProperties": false }, - "CredentialFormatPayload_CredentialFormats.acceptProposal_": { - "properties": {}, - "type": "object", - "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" - }, - "AcceptCredentialProposalOptions": { + "DIDDocumentMetadata": { + "description": "Represents metadata about the DID document resulting from a {@link Resolvable.resolve} operation.", "properties": { - "credentialRecordId": { + "created": { "type": "string" }, - "credentialFormats": { - "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.acceptProposal_" + "updated": { + "type": "string" }, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" + "deactivated": { + "type": "boolean" }, - "comment": { + "versionId": { "type": "string" - } - }, - "required": [ - "credentialRecordId" - ], - "type": "object", - "additionalProperties": false - }, - "CreateOfferOptions": { - "properties": { - "protocolVersion": { + }, + "nextUpdate": { "type": "string" }, - "connectionId": { + "nextVersionId": { "type": "string" }, - "credentialFormats": {}, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" + "equivalentId": { + "type": "string" }, - "comment": { + "canonicalId": { "type": "string" } }, - "required": [ - "protocolVersion", - "connectionId", - "credentialFormats" - ], "type": "object", "additionalProperties": false }, - "CreateOfferOobOptions": { + "Did": { + "type": "string", + "example": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + }, + "DidRegistrationExtraOptions": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "DidRegistrationSecretOptions": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "DidDocument": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "DidCreate": { "properties": { - "protocolVersion": { + "seed": { "type": "string" }, - "credentialFormats": {}, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" + "domain": { + "type": "string" }, - "comment": { + "method": { "type": "string" }, - "goalCode": { + "did": { "type": "string" }, - "parentThreadId": { + "role": { "type": "string" }, - "willConfirm": { - "type": "boolean" + "options": { + "$ref": "#/components/schemas/DidRegistrationExtraOptions" + }, + "secret": { + "$ref": "#/components/schemas/DidRegistrationSecretOptions" + }, + "endorserDid": { + "type": "string" + }, + "didDocument": { + "$ref": "#/components/schemas/DidDocument" } }, "required": [ - "protocolVersion", - "credentialFormats" + "seed" ], "type": "object", "additionalProperties": false }, - "CredentialFormatPayload_CredentialFormats.acceptOffer_": { - "properties": {}, - "type": "object", - "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + "DidRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" }, - "AcceptCredentialOfferOptions": { + "Pick_TenantConfig.Exclude_keyofTenantConfig.walletConfig__": { "properties": { - "credentialRecordId": { + "label": { "type": "string" }, - "credentialFormats": { - "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.acceptOffer_" - }, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" - }, - "comment": { + "connectionImageUrl": { "type": "string" } }, "required": [ - "credentialRecordId" + "label" ], "type": "object", - "additionalProperties": false - }, - "CredentialExchangeRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" + "description": "From T, pick a set of properties whose keys are in the union K" }, - "CredentialFormatPayload_CredentialFormats.acceptRequest_": { - "properties": {}, - "type": "object", - "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + "Omit_TenantConfig.walletConfig_": { + "$ref": "#/components/schemas/Pick_TenantConfig.Exclude_keyofTenantConfig.walletConfig__", + "description": "Construct a type with the properties of T except for those in type K." }, - "AcceptCredentialRequestOptions": { + "CreateTenantOptions": { "properties": { - "credentialRecord": { - "$ref": "#/components/schemas/CredentialExchangeRecord" + "config": { + "$ref": "#/components/schemas/Omit_TenantConfig.walletConfig_" }, - "credentialFormats": { - "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.acceptRequest_" - }, - "autoAcceptCredential": { - "$ref": "#/components/schemas/AutoAcceptCredential" - }, - "comment": { - "type": "string" - } - }, - "required": [ - "credentialRecord" - ], - "type": "object", - "additionalProperties": false - }, - "AcceptCredential": { - "properties": { - "credentialRecord": { - "$ref": "#/components/schemas/CredentialExchangeRecord" - } - }, - "required": [ - "credentialRecord" - ], - "type": "object", - "additionalProperties": false - }, - "CredentialDefinitionId": { - "type": "string", - "example": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag" - }, - "SchemaId": { - "type": "string", - "example": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0" - }, - "Version": { - "type": "string", - "example": "1.0.0" - }, - "DidResolutionMetadata": { - "properties": { - "contentType": { - "type": "string" - }, - "error": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "invalidDid", - "notFound", - "representationNotSupported", - "unsupportedDidMethod" - ] - } - ] - }, - "message": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "DIDDocumentMetadata": { - "description": "Represents metadata about the DID document resulting from a {@link Resolvable.resolve} operation.", - "properties": { - "created": { - "type": "string" - }, - "updated": { - "type": "string" - }, - "deactivated": { - "type": "boolean" - }, - "versionId": { - "type": "string" - }, - "nextUpdate": { - "type": "string" - }, - "nextVersionId": { - "type": "string" - }, - "equivalentId": { + "seed": { "type": "string" }, - "canonicalId": { - "type": "string" - } - }, - "type": "object", - "additionalProperties": false - }, - "Did": { - "type": "string", - "example": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" - }, - "DidRegistrationExtraOptions": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "DidRegistrationSecretOptions": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "DidDocument": { - "$ref": "#/components/schemas/Record_string.any_" - }, - "DidCreate": { - "properties": { - "seed": { + "method": { "type": "string" }, - "domain": { + "role": { "type": "string" }, - "method": { + "endorserDid": { "type": "string" }, "did": { "type": "string" - }, - "options": { - "$ref": "#/components/schemas/DidRegistrationExtraOptions" - }, - "secret": { - "$ref": "#/components/schemas/DidRegistrationSecretOptions" - }, - "didDocument": { - "$ref": "#/components/schemas/DidDocument" } }, "required": [ + "config", "seed" ], "type": "object", "additionalProperties": false }, - "DidRecord": { - "$ref": "#/components/schemas/Record_string.unknown_" - }, - "Pick_TenantConfig.Exclude_keyofTenantConfig.walletConfig__": { + "DidNymTransaction": { "properties": { - "label": { + "did": { "type": "string" }, - "connectionImageUrl": { + "nymRequest": { "type": "string" } }, "required": [ - "label" + "did", + "nymRequest" ], "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_TenantConfig.walletConfig_": { - "$ref": "#/components/schemas/Pick_TenantConfig.Exclude_keyofTenantConfig.walletConfig__", - "description": "Construct a type with the properties of T except for those in type K." + "additionalProperties": false }, - "CreateTenantOptions": { + "EndorserTransaction": { "properties": { - "config": { - "$ref": "#/components/schemas/Omit_TenantConfig.walletConfig_" - }, - "seed": { - "type": "string" + "transaction": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Record_string.unknown_" + } + ] }, - "method": { + "endorserDid": { "type": "string" } }, "required": [ - "config", - "seed" + "transaction", + "endorserDid" ], "type": "object", "additionalProperties": false @@ -1049,7 +847,73 @@ "$ref": "#/components/schemas/Pick_CreateOutOfBandInvitationConfig.Exclude_keyofCreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages__", "description": "Construct a type with the properties of T except for those in type K." }, - "AutoAcceptProof": { + "WriteTransaction": { + "properties": { + "endorsedTransaction": { + "type": "string" + }, + "endorserDid": { + "type": "string" + }, + "schema": { + "properties": { + "attributes": { + "items": { + "type": "string" + }, + "type": "array" + }, + "version": { + "$ref": "#/components/schemas/Version" + }, + "name": { + "type": "string" + }, + "issuerId": { + "type": "string" + } + }, + "required": [ + "attributes", + "version", + "name", + "issuerId" + ], + "type": "object" + }, + "credentialDefinition": { + "properties": { + "type": { + "type": "string" + }, + "value": {}, + "tag": { + "type": "string" + }, + "issuerId": { + "type": "string" + }, + "schemaId": { + "type": "string" + } + }, + "required": [ + "type", + "value", + "tag", + "issuerId", + "schemaId" + ], + "type": "object" + } + }, + "required": [ + "endorsedTransaction" + ], + "type": "object", + "additionalProperties": false + }, + "AutoAcceptCredential": { "description": "Typing of the state for auto acceptance", "enum": [ "always", @@ -1058,47 +922,42 @@ ], "type": "string" }, - "RequestProofOptions": { + "CreateOfferOptions": { "properties": { - "connectionId": { - "type": "string" - }, "protocolVersion": { "type": "string" }, - "proofFormats": {}, - "comment": { + "connectionId": { "type": "string" }, - "autoAcceptProof": { - "$ref": "#/components/schemas/AutoAcceptProof" - }, - "goalCode": { - "type": "string" + "credentialFormats": {}, + "autoAcceptCredential": { + "$ref": "#/components/schemas/AutoAcceptCredential" }, - "parentThreadId": { + "comment": { "type": "string" - }, - "willConfirm": { - "type": "boolean" } }, "required": [ - "connectionId", "protocolVersion", - "proofFormats", - "comment", - "autoAcceptProof" + "connectionId", + "credentialFormats" ], "type": "object", "additionalProperties": false }, - "CreateProofRequestOobOptions": { + "CreateOfferOobOptions": { "properties": { "protocolVersion": { "type": "string" }, - "proofFormats": {}, + "credentialFormats": {}, + "autoAcceptCredential": { + "$ref": "#/components/schemas/AutoAcceptCredential" + }, + "comment": { + "type": "string" + }, "goalCode": { "type": "string" }, @@ -1108,45 +967,145 @@ "willConfirm": { "type": "boolean" }, - "autoAcceptProof": { - "$ref": "#/components/schemas/AutoAcceptProof" - }, - "comment": { + "label": { "type": "string" } }, "required": [ "protocolVersion", - "proofFormats" + "credentialFormats" ], "type": "object", "additionalProperties": false }, - "GetTenantAgentOptions": { + "CredentialFormatPayload_CredentialFormatsFromProtocols_CredentialProtocol-Array_.acceptOffer_": { + "properties": {}, + "type": "object", + "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + }, + "AcceptCredentialOfferOptions": { + "description": "Interface for CredentialsApi.acceptOffer. Will send a request\n\ncredentialFormats is optional because this is an accept method", "properties": { - "tenantId": { + "autoAcceptCredential": { + "$ref": "#/components/schemas/AutoAcceptCredential" + }, + "comment": { + "type": "string" + }, + "credentialRecordId": { "type": "string" + }, + "credentialFormats": { + "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormatsFromProtocols_CredentialProtocol-Array_.acceptOffer_" } }, "required": [ - "tenantId" + "credentialRecordId" ], "type": "object", "additionalProperties": false }, - "WithTenantAgentOptions": { + "CredentialState": { + "description": "Issue Credential states as defined in RFC 0036 and RFC 0453", + "enum": [ + "proposal-sent", + "proposal-received", + "offer-sent", + "offer-received", + "declined", + "request-sent", + "request-received", + "credential-issued", + "credential-received", + "done", + "abandoned" + ], + "type": "string" + }, + "AutoAcceptProof": { + "description": "Typing of the state for auto acceptance", + "enum": [ + "always", + "contentApproved", + "never" + ], + "type": "string" + }, + "RequestProofOptions": { "properties": { - "tenantId": { + "connectionId": { "type": "string" }, - "method": { + "protocolVersion": { + "type": "string" + }, + "proofFormats": {}, + "comment": { + "type": "string" + }, + "autoAcceptProof": { + "$ref": "#/components/schemas/AutoAcceptProof" + }, + "goalCode": { + "type": "string" + }, + "parentThreadId": { + "type": "string" + }, + "willConfirm": { + "type": "boolean" + } + }, + "required": [ + "connectionId", + "protocolVersion", + "proofFormats", + "comment", + "autoAcceptProof" + ], + "type": "object", + "additionalProperties": false + }, + "CreateProofRequestOobOptions": { + "properties": { + "protocolVersion": { + "type": "string" + }, + "proofFormats": {}, + "goalCode": { + "type": "string" + }, + "parentThreadId": { + "type": "string" + }, + "willConfirm": { + "type": "boolean" + }, + "autoAcceptProof": { + "$ref": "#/components/schemas/AutoAcceptProof" + }, + "comment": { "type": "string" }, - "payload": {} + "label": { + "type": "string" + } + }, + "required": [ + "protocolVersion", + "proofFormats" + ], + "type": "object", + "additionalProperties": false + }, + "GetTenantAgentOptions": { + "properties": { + "tenantId": { + "type": "string" + } }, "required": [ - "tenantId", - "method" + "tenantId" ], "type": "object", "additionalProperties": false @@ -1215,6 +1174,160 @@ ], "type": "object", "additionalProperties": false + }, + "W3cCredentialRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "ConnectionRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "ProposeCredentialOptions": { + "properties": { + "connectionRecord": { + "$ref": "#/components/schemas/ConnectionRecord" + }, + "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" + }, + "autoAcceptCredential": { + "$ref": "#/components/schemas/AutoAcceptCredential" + }, + "comment": { + "type": "string" + }, + "connectionId": { + "type": "string" + } + }, + "required": [ + "connectionRecord", + "credentialFormats", + "connectionId" + ], + "type": "object", + "additionalProperties": false + }, + "CredentialFormatPayload_CredentialFormats.acceptProposal_": { + "properties": {}, + "type": "object", + "description": "Get the payload for a specific method from a list of CredentialFormat interfaces and a method" + }, + "AcceptCredentialProposalOptions": { + "properties": { + "credentialRecordId": { + "type": "string" + }, + "credentialFormats": { + "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.acceptProposal_" + }, + "autoAcceptCredential": { + "$ref": "#/components/schemas/AutoAcceptCredential" + }, + "comment": { + "type": "string" + } + }, + "required": [ + "credentialRecordId" + ], + "type": "object", + "additionalProperties": false + }, + "CredentialExchangeRecord": { + "$ref": "#/components/schemas/Record_string.unknown_" + }, + "CredentialFormatPayload_CredentialFormats.acceptRequest_": { + "properties": {}, + "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" + }, + "credentialFormats": { + "$ref": "#/components/schemas/CredentialFormatPayload_CredentialFormats.acceptRequest_" + }, + "autoAcceptCredential": { + "$ref": "#/components/schemas/AutoAcceptCredential" + }, + "comment": { + "type": "string" + } + }, + "required": [ + "credentialRecord" + ], + "type": "object", + "additionalProperties": false + }, + "AcceptCredential": { + "properties": { + "credentialRecord": { + "$ref": "#/components/schemas/CredentialExchangeRecord" + } + }, + "required": [ + "credentialRecord" + ], + "type": "object", + "additionalProperties": false } }, "securitySchemes": {} @@ -1253,9 +1366,25 @@ "parameters": [] } }, - "/basic-messages/{connectionId}": { - "get": { - "operationId": "GetBasicMessages", + "/agent/wallet": { + "delete": { + "operationId": "DeleteWallet", + "responses": { + "204": { + "description": "No content" + } + }, + "description": "Delete wallet", + "tags": [ + "Agent" + ], + "security": [], + "parameters": [] + } + }, + "/basic-messages/{connectionId}": { + "get": { + "operationId": "GetBasicMessages", "responses": { "200": { "description": "BasicMessageRecord[]", @@ -2769,169 +2898,168 @@ } } }, - "/credentials": { + "/credential-definitions/{credentialDefinitionId}": { "get": { - "operationId": "GetAllCredentials", + "operationId": "GetCredentialDefinitionById", "responses": { "200": { - "description": "CredentialExchangeRecord[]", + "description": "CredDef", "content": { "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Record_string.any_" - }, - "type": "array" - }, + "schema": {}, "examples": { "Example 1": { - "value": [ - { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } + "value": { + "ver": "1.0", + "id": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", + "schemaId": "351936", + "type": "CL", + "tag": "definition", + "value": { + "primary": { + "n": "string", + "s": "string", + "r": { + "master_secret": "string", + "string": "string" + }, + "rctxt": "string", + "z": "string" }, - "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" + "revocation": { + "g": "1 string", + "g_dash": "string", + "h": "string", + "h0": "string", + "h1": "string", + "h2": "string", + "htilde": "string", + "h_cap": "string", + "u": "string", + "pk": "string", + "y": "string" + } } - ] + } } } } } - } - }, - "description": "Retrieve all credential exchange records", - "tags": [ - "Credentials" - ], - "security": [], - "parameters": [ - { - "in": "query", - "name": "threadId", - "required": false, - "schema": { - "type": "string" - } }, - { - "in": "query", - "name": "connectionId", - "required": false, - "schema": { - "type": "string" + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "reason": { + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } + } } }, - { - "in": "query", - "name": "state", - "required": false, - "schema": { - "$ref": "#/components/schemas/CredentialState" - } - } - ] - } - }, - "/credentials/w3c": { - "get": { - "operationId": "GetAllW3c", - "responses": { - "200": { - "description": "Ok", + "404": { + "description": "", "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/W3cCredentialRecord" + "properties": { + "reason": { + "type": "string" + } }, - "type": "array" + "required": [ + "reason" + ], + "type": "object" } } } - } - }, - "tags": [ - "Credentials" - ], - "security": [], - "parameters": [] - } - }, - "/credentials/w3c/{id}": { - "get": { - "operationId": "GetW3cById", - "responses": { - "200": { - "description": "Ok", + }, + "500": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/W3cCredentialRecord" + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" } } } } }, + "description": "Retrieve credential definition by credential definition id", "tags": [ - "Credentials" + "Credential Definitions" ], "security": [], "parameters": [ { "in": "path", - "name": "id", + "name": "credentialDefinitionId", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/CredentialDefinitionId" } } ] } }, - "/credentials/{credentialRecordId}": { - "get": { - "operationId": "GetCredentialById", + "/credential-definitions": { + "post": { + "operationId": "CreateCredentialDefinition", "responses": { "200": { - "description": "CredentialExchangeRecord", + "description": "CredDef", "content": { "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + "ver": "1.0", + "id": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", + "schemaId": "351936", + "type": "CL", + "tag": "definition", + "value": { + "primary": { + "n": "string", + "s": "string", + "r": { + "master_secret": "string", + "string": "string" + }, + "rctxt": "string", + "z": "string" + }, + "revocation": { + "g": "1 string", + "g_dash": "string", + "h": "string", + "h0": "string", + "h1": "string", + "h2": "string", + "htilde": "string", + "h_cap": "string", + "u": "string", + "pk": "string", + "y": "string" } - }, - "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" + } } } } @@ -2975,60 +3103,73 @@ } } }, - "description": "Retrieve credential exchange record by credential record id", + "description": "Creates a new credential definition.", "tags": [ - "Credentials" + "Credential Definitions" ], "security": [], - "parameters": [ - { - "in": "path", - "name": "credentialRecordId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/credentials/propose-credential": { - "post": { - "operationId": "ProposeCredential", - "responses": { - "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "endorserDid": { + "type": "string" + }, + "endorse": { + "type": "boolean" + }, + "tag": { + "type": "string" + }, + "schemaId": { + "$ref": "#/components/schemas/SchemaId" + }, + "issuerId": { + "type": "string" + } + }, + "required": [ + "tag", + "schemaId", + "issuerId" + ], + "type": "object" + } + } + } + } + } + }, + "/schemas/{schemaId}": { + "get": { + "operationId": "GetSchemaById", + "responses": { + "200": { + "description": "Schema", + "content": { + "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" + "ver": "1.0", + "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", + "name": "schema", + "version": "1.0", + "attrNames": [ + "string" + ], + "seqNo": 351936 } } } } } }, - "404": { + "400": { "description": "", "content": { "application/json": { @@ -3046,78 +3187,23 @@ } } }, - "500": { + "403": { "description": "", "content": { "application/json": { "schema": { "properties": { - "message": { + "reason": { "type": "string" } }, "required": [ - "message" + "reason" ], "type": "object" } } } - } - }, - "description": "Initiate a new credential exchange as holder by sending a propose credential message\nto the connection with a specified connection id.", - "tags": [ - "Credentials" - ], - "security": [], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProposeCredentialOptions" - } - } - } - } - } - }, - "/credentials/accept-proposal": { - "post": { - "operationId": "AcceptProposal", - "responses": { - "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } }, "404": { "description": "", @@ -3156,108 +3242,66 @@ } } }, - "description": "Accept a credential proposal as issuer by sending an accept proposal message\nto the connection associated with the credential exchange record.", + "description": "Retrieve schema by schema id", "tags": [ - "Credentials" + "Schemas" ], "security": [], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptCredentialProposalOptions" - } + "parameters": [ + { + "in": "path", + "name": "schemaId", + "required": true, + "schema": { + "$ref": "#/components/schemas/SchemaId" } } - } + ] } }, - "/credentials/create-offer": { + "/schemas": { "post": { - "operationId": "CreateOffer", + "operationId": "CreateSchema", "responses": { "200": { - "description": "AgentMessage, CredentialExchangeRecord", + "description": "schema", "content": { "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" + "ver": "1.0", + "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", + "name": "schema", + "version": "1.0", + "attrNames": [ + "string" + ], + "seqNo": 351936 } } } } } }, - "500": { + "400": { "description": "", "content": { "application/json": { "schema": { "properties": { - "message": { + "reason": { "type": "string" } }, "required": [ - "message" + "reason" ], "type": "object" } } } - } - }, - "description": "Initiate a new credential exchange as issuer by creating a credential offer\nwithout specifying a connection id", - "tags": [ - "Credentials" - ], - "security": [], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOfferOptions" - } - } - } - } - } - }, - "/credentials/create-offer-oob": { - "post": { - "operationId": "CreateOfferOob", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } }, "500": { "description": "", @@ -3278,8 +3322,9 @@ } } }, + "description": "Creates a new schema and registers schema on ledger", "tags": [ - "Credentials" + "Schemas" ], "security": [], "parameters": [], @@ -3288,64 +3333,160 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateOfferOobOptions" + "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" } } } } } }, - "/credentials/accept-offer": { - "post": { - "operationId": "AcceptOffer", - "responses": { + "/dids/{did}": { + "get": { + "operationId": "GetDidRecordByDid", + "responses": { "200": { - "description": "CredentialExchangeRecord", + "description": "DidResolutionResult", "content": { "application/json": { - "schema": {}, + "schema": { + "anyOf": [ + { + "properties": { + "importDid": {} + }, + "required": [ + "importDid" + ], + "type": "object" + }, + { + "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" + } + ] + }, "examples": { "Example 1": { "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } + "didDocument": { + "@context": [ + "https://w3id.org/did/v1", + "https://w3id.org/security/suites/ed25519-2018/v1", + "https://w3id.org/security/suites/x25519-2019/v1" + ], + "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", + "verificationMethod": [ + { + "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", + "type": "Ed25519VerificationKey2018", + "controller": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", + "publicKeyBase58": "6fioC1zcDPyPEL19pXRS2E4iJ46zH7xP6uSgAaPdwDrx" + } + ], + "authentication": [ + "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + ], + "assertionMethod": [ + "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + ], + "capabilityInvocation": [ + "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + ], + "capabilityDelegation": [ + "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + ], + "keyAgreement": [ + { + "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6LSrdqo4M24WRDJj1h2hXxgtDTyzjjKCiyapYVgrhwZAySn", + "type": "X25519KeyAgreementKey2019", + "controller": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", + "publicKeyBase58": "FxfdY3DCQxVZddKGAtSjZdFW9bCCW7oRwZn1NFJ2Tbg2" + } + ] }, - "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" + "didDocumentMetadata": {}, + "didResolutionMetadata": { + "contentType": "application/did+ld+json" + } } } } } } - }, - "404": { - "description": "", + } + }, + "description": "Resolves did and returns did resolution result", + "tags": [ + "Dids" + ], + "security": [], + "parameters": [ + { + "description": "Decentralized Identifier", + "in": "path", + "name": "did", + "required": true, + "schema": { + "$ref": "#/components/schemas/Did" + } + } + ] + } + }, + "/dids/write": { + "post": { + "operationId": "WriteDid", + "responses": { + "200": { + "description": "DidResolutionResult", "content": { "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } + "schema": {} } } }, @@ -3368,9 +3509,9 @@ } } }, - "description": "Accept a credential offer as holder by sending an accept offer message\nto the connection associated with the credential exchange record.", + "description": "Did nym registration", "tags": [ - "Credentials" + "Dids" ], "security": [], "parameters": [], @@ -3379,64 +3520,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptCredentialOfferOptions" + "$ref": "#/components/schemas/DidCreate" } } } } } }, - "/credentials/accept-request": { + "/dids/did/key": { "post": { - "operationId": "AcceptRequest", + "operationId": "CreateDidKey", "responses": { "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } - }, - "404": { - "description": "", + "description": "Ok", "content": { "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } + "schema": {} } } }, @@ -3459,9 +3558,8 @@ } } }, - "description": "Accept a credential request as issuer by sending an accept request message\nto the connection associated with the credential exchange record.", "tags": [ - "Credentials" + "Dids" ], "security": [], "parameters": [], @@ -3470,64 +3568,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptCredentialRequestOptions" + "$ref": "#/components/schemas/DidCreate" } } } } } }, - "/credentials/accept-credential": { + "/dids/did/web": { "post": { - "operationId": "AcceptCredential", + "operationId": "CreateDidWeb", "responses": { "200": { - "description": "CredentialExchangeRecord", - "content": { - "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "_tags": { - "state": "offer-sent", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" - }, - "metadata": { - "_internal/indyCredential": { - "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", - "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" - } - }, - "credentials": [], - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", - "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", - "credentialAttributes": [], - "protocolVersion": "v1" - } - } - } - } - } - }, - "404": { - "description": "", + "description": "Ok", "content": { "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } + "schema": {} } } }, @@ -3550,9 +3606,8 @@ } } }, - "description": "Accept a credential as holder by sending an accept credential message\nto the connection associated with the credential exchange record.", "tags": [ - "Credentials" + "Dids" ], "security": [], "parameters": [], @@ -3561,62 +3616,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptCredential" + "$ref": "#/components/schemas/DidCreate" } } } } } }, - "/credential-definitions/{credentialDefinitionId}": { + "/dids": { "get": { - "operationId": "GetCredentialDefinitionById", + "operationId": "GetDids", "responses": { "200": { - "description": "CredDef", + "description": "Ok", "content": { "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "ver": "1.0", - "id": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - "schemaId": "351936", - "type": "CL", - "tag": "definition", - "value": { - "primary": { - "n": "string", - "s": "string", - "r": { - "master_secret": "string", - "string": "string" - }, - "rctxt": "string", - "z": "string" - }, - "revocation": { - "g": "1 string", - "g_dash": "string", - "h": "string", - "h0": "string", - "h1": "string", - "h2": "string", - "htilde": "string", - "h_cap": "string", - "u": "string", - "pk": "string", - "y": "string" - } - } - } - } + "schema": { + "items": { + "$ref": "#/components/schemas/DidRecord" + }, + "type": "array" } } } + } + }, + "tags": [ + "Dids" + ], + "security": [], + "parameters": [] + } + }, + "/multi-tenancy/create-tenant": { + "post": { + "operationId": "CreateTenant", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } }, - "400": { + "404": { "description": "", "content": { "application/json": { @@ -3634,23 +3678,53 @@ } } }, - "404": { + "500": { "description": "", "content": { "application/json": { "schema": { "properties": { - "reason": { + "message": { "type": "string" } }, "required": [ - "reason" + "message" ], "type": "object" } } } + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTenantOptions" + } + } + } + } + } + }, + "/multi-tenancy/transactions/set-endorser-role/{tenantId}": { + "post": { + "operationId": "DidNymTransaction", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } }, "500": { "description": "", @@ -3671,72 +3745,45 @@ } } }, - "description": "Retrieve credential definition by credential definition id", "tags": [ - "Credential Definitions" + "MultiTenancy" ], "security": [], "parameters": [ { "in": "path", - "name": "credentialDefinitionId", + "name": "tenantId", "required": true, "schema": { - "$ref": "#/components/schemas/CredentialDefinitionId" + "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DidNymTransaction" + } + } + } + } } }, - "/credential-definitions": { + "/multi-tenancy/transactions/endorse/{tenantId}": { "post": { - "operationId": "CreateCredentialDefinition", + "operationId": "EndorserTransaction", "responses": { "200": { - "description": "CredDef", + "description": "Ok", "content": { "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "ver": "1.0", - "id": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag", - "schemaId": "351936", - "type": "CL", - "tag": "definition", - "value": { - "primary": { - "n": "string", - "s": "string", - "r": { - "master_secret": "string", - "string": "string" - }, - "rctxt": "string", - "z": "string" - }, - "revocation": { - "g": "1 string", - "g_dash": "string", - "h": "string", - "h0": "string", - "h1": "string", - "h2": "string", - "htilde": "string", - "h_cap": "string", - "u": "string", - "pk": "string", - "y": "string" - } - } - } - } - } + "schema": {} } } }, - "404": { + "400": { "description": "", "content": { "application/json": { @@ -3773,67 +3820,64 @@ } } }, - "description": "Creates a new credential definition.", "tags": [ - "Credential Definitions" + "MultiTenancy" ], "security": [], - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "tag": { - "type": "string" - }, - "schemaId": { - "$ref": "#/components/schemas/SchemaId" - }, - "issuerId": { - "type": "string" - } - }, - "required": [ - "tag", - "schemaId", - "issuerId" - ], - "type": "object" + "$ref": "#/components/schemas/EndorserTransaction" } } } } } }, - "/schemas/{schemaId}": { + "/multi-tenancy/connections/{connectionId}/{tenantId}": { "get": { - "operationId": "GetSchemaById", + "operationId": "GetConnectionById", "responses": { "200": { - "description": "Schema", + "description": "Ok", "content": { "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "ver": "1.0", - "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - "name": "schema", - "version": "1.0", - "attrNames": [ - "string" - ], - "seqNo": 351936 + "_tags": { + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", + "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" + }, + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", + "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", + "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" } } } } } }, - "400": { + "404": { "description": "", "content": { "application/json": { @@ -3850,24 +3894,393 @@ } } } + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } }, - "403": { - "description": "", + { + "in": "path", + "name": "connectionId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" + } + } + ] + } + }, + "/multi-tenancy/create-invitation/{tenantId}": { + "post": { + "operationId": "CreateInvitation", + "responses": { + "200": { + "description": "Ok", "content": { "application/json": { - "schema": { + "schema": {} + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { "properties": { - "reason": { + "message": { "type": "string" } }, "required": [ - "reason" + "message" ], "type": "object" } } } + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Omit_CreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages_" + } + } + } + } + } + }, + "/multi-tenancy/create-legacy-invitation/{tenantId}": { + "post": { + "operationId": "CreateLegacyInvitation", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Omit_CreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages_" + } + } + } + } + } + }, + "/multi-tenancy/receive-invitation/{tenantId}": { + "post": { + "operationId": "ReceiveInvitation", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReceiveInvitationProps" + } + } + } + } + } + }, + "/multi-tenancy/receive-invitation-url/{tenantId}": { + "post": { + "operationId": "ReceiveInvitationFromUrl", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReceiveInvitationByUrlProps" + } + } + } + } + } + }, + "/multi-tenancy/oob/{invitationId}/{tenantId}": { + "get": { + "operationId": "GetAllOutOfBandRecords", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": {}, + "type": "array" + } + } + } + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "invitationId", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/multi-tenancy/connections/{tenantId}": { + "get": { + "operationId": "GetAllConnections", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "type": "array" + } + } + } + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "outOfBandId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "alias", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "state", + "required": false, + "schema": { + "$ref": "#/components/schemas/DidExchangeState" + } + }, + { + "in": "query", + "name": "myDid", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "theirDid", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "theirLabel", + "required": false, + "schema": { + "type": "string" + } + } + ] + } + }, + "/multi-tenancy/url/{tenantId}/{invitationId}": { + "get": { + "operationId": "GetInvitation", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } + } }, "404": { "description": "", @@ -3886,66 +4299,41 @@ } } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } } }, - "description": "Retrieve schema by schema id", "tags": [ - "Schemas" + "MultiTenancy" ], "security": [], "parameters": [ { "in": "path", - "name": "schemaId", + "name": "invitationId", "required": true, "schema": { - "$ref": "#/components/schemas/SchemaId" + "type": "string" + } + }, + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" } } ] } }, - "/schemas": { + "/multi-tenancy/schema/{tenantId}": { "post": { "operationId": "CreateSchema", "responses": { "200": { - "description": "schema", + "description": "Ok", "content": { "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "ver": "1.0", - "id": "WgWxqztrNooG92RXvxSTWv:2:schema_name:1.0", - "name": "schema", - "version": "1.0", - "attrNames": [ - "string" - ], - "seqNo": 351936 - } - } - } + "schema": {} } } }, @@ -3986,18 +4374,32 @@ } } }, - "description": "Creates a new schema and registers schema on ledger", "tags": [ - "Schemas" + "MultiTenancy" ], "security": [], - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { + "endorserDid": { + "type": "string" + }, + "endorse": { + "type": "boolean" + }, "attributes": { "items": { "type": "string" @@ -4027,124 +4429,33 @@ } } }, - "/dids/{did}": { - "get": { - "operationId": "GetDidRecordByDid", + "/multi-tenancy/transactions/write/{tenantId}": { + "post": { + "operationId": "WriteSchemaAndCredDefOnLedger", "responses": { "200": { - "description": "DidResolutionResult", + "description": "Ok", "content": { "application/json": { - "schema": { - "anyOf": [ - { - "properties": { - "importDid": {} - }, - "required": [ - "importDid" - ], - "type": "object" - }, - { - "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" - } - ] - }, - "examples": { - "Example 1": { - "value": { - "didDocument": { - "@context": [ - "https://w3id.org/did/v1", - "https://w3id.org/security/suites/ed25519-2018/v1", - "https://w3id.org/security/suites/x25519-2019/v1" - ], - "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", - "verificationMethod": [ - { - "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", - "type": "Ed25519VerificationKey2018", - "controller": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", - "publicKeyBase58": "6fioC1zcDPyPEL19pXRS2E4iJ46zH7xP6uSgAaPdwDrx" - } - ], - "authentication": [ - "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" - ], - "assertionMethod": [ - "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" - ], - "capabilityInvocation": [ - "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" - ], - "capabilityDelegation": [ - "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" - ], - "keyAgreement": [ - { - "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL#z6LSrdqo4M24WRDJj1h2hXxgtDTyzjjKCiyapYVgrhwZAySn", - "type": "X25519KeyAgreementKey2019", - "controller": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL", - "publicKeyBase58": "FxfdY3DCQxVZddKGAtSjZdFW9bCCW7oRwZn1NFJ2Tbg2" - } - ] - }, - "didDocumentMetadata": {}, - "didResolutionMetadata": { - "contentType": "application/did+ld+json" - } - } - } - } + "schema": {} } } - } - }, - "description": "Resolves did and returns did resolution result", - "tags": [ - "Dids" - ], - "security": [], - "parameters": [ - { - "description": "Decentralized Identifier", - "in": "path", - "name": "did", - "required": true, - "schema": { - "$ref": "#/components/schemas/Did" - } - } - ] - } - }, - "/dids/write": { - "post": { - "operationId": "WriteDid", - "responses": { - "200": { - "description": "DidResolutionResult", + }, + "400": { + "description": "", "content": { "application/json": { - "schema": {} + "schema": { + "properties": { + "reason": { + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } } } }, @@ -4167,27 +4478,35 @@ } } }, - "description": "Did nym registration", "tags": [ - "Dids" + "MultiTenancy" ], "security": [], - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DidCreate" + "$ref": "#/components/schemas/WriteTransaction" } } } } } }, - "/dids/did/key": { - "post": { - "operationId": "CreateDidKey", + "/multi-tenancy/schema/{schemaId}/{tenantId}": { + "get": { + "operationId": "GetSchemaById", "responses": { "200": { "description": "Ok", @@ -4197,53 +4516,59 @@ } } }, - "500": { + "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": { - "message": { + "reason": { "type": "string" } }, "required": [ - "message" + "reason" ], "type": "object" } } } - } - }, - "tags": [ - "Dids" - ], - "security": [], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DidCreate" - } - } - } - } - } - }, - "/dids/did/web": { - "post": { - "operationId": "CreateDidWeb", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } }, "500": { "description": "", @@ -4265,50 +4590,32 @@ } }, "tags": [ - "Dids" + "MultiTenancy" ], "security": [], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DidCreate" - } + "parameters": [ + { + "in": "path", + "name": "schemaId", + "required": true, + "schema": { + "$ref": "#/components/schemas/SchemaId" } - } - } - } - }, - "/dids": { - "get": { - "operationId": "GetDids", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/DidRecord" - }, - "type": "array" - } - } + }, + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" } } - }, - "tags": [ - "Dids" - ], - "security": [], - "parameters": [] + ] } }, - "/multi-tenancy/create-tenant": { + "/multi-tenancy/credential-definition/{tenantId}": { "post": { - "operationId": "CreateTenant", + "operationId": "CreateCredentialDefinition", "responses": { "200": { "description": "Ok", @@ -4359,51 +4666,63 @@ "MultiTenancy" ], "security": [], - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "tenantId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateTenantOptions" + "properties": { + "endorserDid": { + "type": "string" + }, + "endorse": { + "type": "boolean" + }, + "tag": { + "type": "string" + }, + "schemaId": { + "type": "string" + }, + "issuerId": { + "type": "string" + } + }, + "required": [ + "tag", + "schemaId", + "issuerId" + ], + "type": "object" } } } } } }, - "/multi-tenancy/connections/{connectionId}/{tenantId}": { + "/multi-tenancy/credential-definition/{credentialDefinitionId}/{tenantId}": { "get": { - "operationId": "GetConnectionById", + "operationId": "GetCredentialDefinitionById", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {}, - "examples": { - "Example 1": { - "value": { - "_tags": { - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationKey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d", - "verkey": "9HG4rJFpLiWf56MWxHj9rgdpErFzim2zEpHuxy1dw7oz" - }, - "metadata": {}, - "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", - "createdAt": "2022-01-01T00:00:00.000Z", - "did": "did:peer:1zQmfQh1T3rSqarP2FZ37uKjdQHPKFdVyo2mGiAPHZ8Ep7hv", - "invitationDid": "did:peer:2.SeyJzIjoiaHR0cHM6Ly9kYTIzLTg5LTIwLTE2Mi0xNDYubmdyb2suaW8iLCJ0IjoiZGlkLWNvbW11bmljYXRpb24iLCJwcmlvcml0eSI6MCwicmVjaXBpZW50S2V5cyI6WyJkaWQ6a2V5Ono2TWtualg3U1lXRmdHMThCYkNEZHJnemhuQnA0UlhyOGVITHZxQ3FvRXllckxiTiN6Nk1rbmpYN1NZV0ZnRzE4QmJDRGRyZ3pobkJwNFJYcjhlSEx2cUNxb0V5ZXJMYk4iXSwiciI6W119", - "outOfBandId": "edbc89fe-785f-4774-a288-46012486881d" - } - } - } + "schema": {} } } }, - "404": { + "400": { "description": "", "content": { "application/json": { @@ -4420,41 +4739,22 @@ } } } - } - }, - "tags": [ - "MultiTenancy" - ], - "security": [], - "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } }, - { - "in": "path", - "name": "connectionId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - } - ] - } - }, - "/multi-tenancy/create-invitation/{tenantId}": { - "post": { - "operationId": "CreateInvitation", - "responses": { - "200": { - "description": "Ok", + "404": { + "description": "", "content": { "application/json": { - "schema": {} + "schema": { + "properties": { + "reason": { + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } } } }, @@ -4482,6 +4782,14 @@ ], "security": [], "parameters": [ + { + "in": "path", + "name": "credentialDefinitionId", + "required": true, + "schema": { + "$ref": "#/components/schemas/CredentialDefinitionId" + } + }, { "in": "path", "name": "tenantId", @@ -4490,22 +4798,12 @@ "type": "string" } } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Omit_CreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages_" - } - } - } - } + ] } }, - "/multi-tenancy/create-legacy-invitation/{tenantId}": { + "/multi-tenancy/credentials/create-offer/{tenantId}": { "post": { - "operationId": "CreateLegacyInvitation", + "operationId": "CreateOffer", "responses": { "200": { "description": "Ok", @@ -4549,20 +4847,20 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Omit_CreateOutOfBandInvitationConfig.routing-or-appendedAttachments-or-messages_" + "$ref": "#/components/schemas/CreateOfferOptions" } } } } } }, - "/multi-tenancy/receive-invitation/{tenantId}": { + "/multi-tenancy/credentials/create-offer-oob/{tenantId}": { "post": { - "operationId": "ReceiveInvitation", + "operationId": "CreateOfferOob", "responses": { "200": { "description": "Ok", @@ -4610,16 +4908,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReceiveInvitationProps" + "$ref": "#/components/schemas/CreateOfferOobOptions" } } } } } }, - "/multi-tenancy/receive-invitation-url/{tenantId}": { + "/multi-tenancy/credentials/accept-offer/{tenantId}": { "post": { - "operationId": "ReceiveInvitationFromUrl", + "operationId": "AcceptOffer", "responses": { "200": { "description": "Ok", @@ -4629,6 +4927,24 @@ } } }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "reason": { + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } + } + } + }, "500": { "description": "", "content": { @@ -4667,16 +4983,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReceiveInvitationByUrlProps" + "$ref": "#/components/schemas/AcceptCredentialOfferOptions" } } } } } }, - "/multi-tenancy/oob/{invitationId}/{tenantId}": { + "/multi-tenancy/credentials/{credentialRecordId}/{tenantId}": { "get": { - "operationId": "GetAllOutOfBandRecords", + "operationId": "GetCredentialById", "responses": { "200": { "description": "Ok", @@ -4685,6 +5001,42 @@ "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": [ @@ -4694,15 +5046,15 @@ "parameters": [ { "in": "path", - "name": "tenantId", + "name": "credentialRecordId", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/RecordId" } }, { "in": "path", - "name": "invitationId", + "name": "tenantId", "required": true, "schema": { "type": "string" @@ -4711,15 +5063,18 @@ ] } }, - "/multi-tenancy/connections/{tenantId}": { + "/multi-tenancy/credentials/{tenantId}": { "get": { - "operationId": "GetAllConnections", + "operationId": "GetAllCredentials", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": { + "items": {}, + "type": "array" + } } } } @@ -4739,7 +5094,7 @@ }, { "in": "query", - "name": "outOfBandId", + "name": "threadId", "required": false, "schema": { "type": "string" @@ -4747,7 +5102,7 @@ }, { "in": "query", - "name": "alias", + "name": "connectionId", "required": false, "schema": { "type": "string" @@ -4758,28 +5113,44 @@ "name": "state", "required": false, "schema": { - "$ref": "#/components/schemas/DidExchangeState" + "$ref": "#/components/schemas/CredentialState" } - }, - { - "in": "query", - "name": "myDid", - "required": false, - "schema": { - "type": "string" + } + ] + } + }, + "/multi-tenancy/proofs/{tenantId}": { + "get": { + "operationId": "GetAllProofs", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": {}, + "type": "array" + } + } } - }, + } + }, + "tags": [ + "MultiTenancy" + ], + "security": [], + "parameters": [ { - "in": "query", - "name": "theirDid", - "required": false, + "in": "path", + "name": "tenantId", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "theirLabel", + "name": "threadId", "required": false, "schema": { "type": "string" @@ -4788,15 +5159,27 @@ ] } }, - "/multi-tenancy/url/{tenantId}/{invitationId}": { + "/multi-tenancy/form-data/{tenantId}/{proofRecordId}": { "get": { - "operationId": "GetInvitation", + "operationId": "ProofFormData", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": {}, + "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" + } + } + } } } }, @@ -4817,6 +5200,24 @@ } } } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } } }, "tags": [ @@ -4826,7 +5227,7 @@ "parameters": [ { "in": "path", - "name": "invitationId", + "name": "proofRecordId", "required": true, "schema": { "type": "string" @@ -4843,19 +5244,31 @@ ] } }, - "/multi-tenancy/schema/{tenantId}": { + "/multi-tenancy/proofs/request-proof/{tenantId}": { "post": { - "operationId": "CreateSchema", + "operationId": "RequestProof", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": {}, + "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" + } + } + } } } }, - "400": { + "404": { "description": "", "content": { "application/json": { @@ -4911,39 +5324,16 @@ "content": { "application/json": { "schema": { - "properties": { - "attributes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "version": { - "$ref": "#/components/schemas/Version" - }, - "name": { - "type": "string" - }, - "issuerId": { - "type": "string" - } - }, - "required": [ - "attributes", - "version", - "name", - "issuerId" - ], - "type": "object" + "$ref": "#/components/schemas/RequestProofOptions" } } } } } }, - "/multi-tenancy/schema/{schemaId}/{tenantId}": { - "get": { - "operationId": "GetSchemaById", + "/multi-tenancy/proofs/create-request-oob/{tenantId}": { + "post": { + "operationId": "CreateRequest", "responses": { "200": { "description": "Ok", @@ -4953,60 +5343,6 @@ } } }, - "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": { @@ -5031,14 +5367,6 @@ ], "security": [], "parameters": [ - { - "in": "path", - "name": "schemaId", - "required": true, - "schema": { - "$ref": "#/components/schemas/SchemaId" - } - }, { "in": "path", "name": "tenantId", @@ -5047,18 +5375,40 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProofRequestOobOptions" + } + } + } + } } }, - "/multi-tenancy/credential-definition/{tenantId}": { + "/multi-tenancy/proofs/{proofRecordId}/accept-request/{tenantId}": { "post": { - "operationId": "CreateCredentialDefinition", + "operationId": "AcceptRequest", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": {}, + "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" + } + } + } } } }, @@ -5111,6 +5461,14 @@ "schema": { "type": "string" } + }, + { + "in": "path", + "name": "proofRecordId", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -5119,21 +5477,16 @@ "application/json": { "schema": { "properties": { - "tag": { + "comment": { "type": "string" }, - "schemaId": { - "type": "string" + "filterByNonRevocationRequirements": { + "type": "boolean" }, - "issuerId": { - "type": "string" + "filterByPresentationPreview": { + "type": "boolean" } }, - "required": [ - "tag", - "schemaId", - "issuerId" - ], "type": "object" } } @@ -5141,32 +5494,26 @@ } } }, - "/multi-tenancy/credential-definition/{credentialDefinitionId}/{tenantId}": { - "get": { - "operationId": "GetCredentialDefinitionById", + "/multi-tenancy/proofs/{proofRecordId}/accept-presentation/{tenantId}": { + "post": { + "operationId": "AcceptPresentation", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" + "schema": {}, + "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" } - }, - "required": [ - "reason" - ], - "type": "object" + } } } } @@ -5215,15 +5562,15 @@ "parameters": [ { "in": "path", - "name": "credentialDefinitionId", + "name": "tenantId", "required": true, "schema": { - "$ref": "#/components/schemas/CredentialDefinitionId" + "type": "string" } }, { "in": "path", - "name": "tenantId", + "name": "proofRecordId", "required": true, "schema": { "type": "string" @@ -5232,74 +5579,47 @@ ] } }, - "/multi-tenancy/credentials/create-offer/{tenantId}": { - "post": { - "operationId": "CreateOffer", + "/multi-tenancy/proofs/{proofRecordId}/{tenantId}": { + "get": { + "operationId": "GetProofById", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": {}, + "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" + } + } + } } } }, - "500": { + "404": { "description": "", "content": { "application/json": { "schema": { "properties": { - "message": { + "reason": { "type": "string" } }, "required": [ - "message" + "reason" ], "type": "object" } } } - } - }, - "tags": [ - "MultiTenancy" - ], - "security": [], - "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOfferOptions" - } - } - } - } - } - }, - "/multi-tenancy/credentials/create-offer-oob/{tenantId}": { - "post": { - "operationId": "CreateOfferOob", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": {} - } - } }, "500": { "description": "", @@ -5332,23 +5652,21 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOfferOobOptions" - } + }, + { + "in": "path", + "name": "proofRecordId", + "required": true, + "schema": { + "$ref": "#/components/schemas/RecordId" } } - } + ] } }, - "/multi-tenancy/credentials/accept-offer/{tenantId}": { - "post": { - "operationId": "AcceptOffer", + "/multi-tenancy/{tenantId}": { + "get": { + "operationId": "GetTenantById", "responses": { "200": { "description": "Ok", @@ -5408,22 +5726,10 @@ "type": "string" } } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptCredentialOfferOptions" - } - } - } - } - } - }, - "/multi-tenancy/credentials/{credentialRecordId}/{tenantId}": { - "get": { - "operationId": "GetCredentialById", + ] + }, + "delete": { + "operationId": "DeleteTenantById", "responses": { "200": { "description": "Ok", @@ -5475,14 +5781,6 @@ ], "security": [], "parameters": [ - { - "in": "path", - "name": "credentialRecordId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RecordId" - } - }, { "in": "path", "name": "tenantId", @@ -5494,9 +5792,9 @@ ] } }, - "/multi-tenancy/credentials/{tenantId}": { - "get": { - "operationId": "GetAllCredentials", + "/multi-tenancy/tenant": { + "post": { + "operationId": "GetTenantAgent", "responses": { "200": { "description": "Ok", @@ -5505,63 +5803,96 @@ "schema": {} } } - } - }, - "tags": [ - "MultiTenancy" - ], - "security": [], - "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "threadId", - "required": false, - "schema": { - "type": "string" - } }, - { - "in": "query", - "name": "connectionId", - "required": false, - "schema": { - "type": "string" + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "reason": { + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } + } } }, - { - "in": "query", - "name": "state", - "required": false, - "schema": { - "$ref": "#/components/schemas/CredentialState" + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } } } - ] + }, + "tags": [ + "MultiTenancy" + ], + "security": [], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTenantAgentOptions" + } + } + } + } } }, - "/multi-tenancy/proofs/{tenantId}": { + "/proofs": { "get": { "operationId": "GetAllProofs", "responses": { "200": { - "description": "Ok", + "description": "ProofRecord[]", "content": { "application/json": { - "schema": {} + "schema": { + "items": { + "$ref": "#/components/schemas/Record_string.any_" + }, + "type": "array" + }, + "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": "Retrieve all proof records", "tags": [ - "MultiTenancy" + "Proofs" ], "security": [], "parameters": [ @@ -5572,24 +5903,16 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } } ] } }, - "/multi-tenancy/form-data/{tenantId}/{proofRecordId}": { + "/proofs/{proofRecordId}": { "get": { - "operationId": "ProofFormData", + "operationId": "GetProofById", "responses": { "200": { - "description": "Ok", + "description": "ProofRecord", "content": { "application/json": { "schema": {}, @@ -5645,8 +5968,9 @@ } } }, + "description": "Retrieve proof record by proof record id", "tags": [ - "MultiTenancy" + "Proofs" ], "security": [], "parameters": [ @@ -5655,26 +5979,18 @@ "name": "proofRecordId", "required": true, "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" + "$ref": "#/components/schemas/RecordId" } } ] } }, - "/multi-tenancy/proofs/request-proof/{tenantId}": { + "/proofs/propose-proof": { "post": { - "operationId": "RequestProof", + "operationId": "ProposeProof", "responses": { "200": { - "description": "Ok", + "description": "ProofRecord", "content": { "application/json": { "schema": {}, @@ -5730,41 +6046,63 @@ } } }, + "description": "Initiate a new presentation exchange as prover by sending a presentation proposal request\nto the connection with the specified connection id.", "tags": [ - "MultiTenancy" + "Proofs" ], "security": [], - "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RequestProofOptions" + "$ref": "#/components/schemas/RequestProofProposalOptions" } } } } } }, - "/multi-tenancy/proofs/create-request-oob/{tenantId}": { + "/proofs/{proofRecordId}/accept-proposal": { "post": { - "operationId": "CreateRequest", + "operationId": "AcceptProposal", "responses": { "200": { - "description": "Ok", + "description": "ProofRecord", "content": { "application/json": { - "schema": {} + "schema": {}, + "examples": { + "Example 1": { + "value": { + "metadata": {}, + "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", + "createdAt": "2022-01-01T00:00:00.000Z", + "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", + "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "protocolVersion": "v1" + } + } + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "reason": { + "type": "string" + } + }, + "required": [ + "reason" + ], + "type": "object" + } } } }, @@ -5787,35 +6125,27 @@ } } }, + "description": "Accept a presentation proposal as verifier by sending an accept proposal message\nto the connection associated with the proof record.", "tags": [ - "MultiTenancy" + "Proofs" ], "security": [], - "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProofRequestOobOptions" + "$ref": "#/components/schemas/AcceptProofProposal" } } } } } }, - "/multi-tenancy/proofs/{proofRecordId}/accept-request/{tenantId}": { + "/proofs/request-proof": { "post": { - "operationId": "AcceptRequest", + "operationId": "RequestProof", "responses": { "200": { "description": "Ok", @@ -5875,56 +6205,76 @@ } }, "tags": [ - "MultiTenancy" + "Proofs" ], "security": [], - "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestProofOptions" + } + } + } + } + } + }, + "/proofs/create-request-oob": { + "post": { + "operationId": "CreateRequest", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": {} + } } }, - { - "in": "path", - "name": "proofRecordId", - "required": true, - "schema": { - "type": "string" + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } } } + }, + "tags": [ + "Proofs" ], + "security": [], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "comment": { - "type": "string" - }, - "filterByNonRevocationRequirements": { - "type": "boolean" - }, - "filterByPresentationPreview": { - "type": "boolean" - } - }, - "type": "object" + "$ref": "#/components/schemas/CreateProofRequestOobOptions" } } } } } }, - "/multi-tenancy/proofs/{proofRecordId}/accept-presentation/{tenantId}": { + "/proofs/{proofRecordId}/accept-request": { "post": { - "operationId": "AcceptPresentation", + "operationId": "AcceptRequest", "responses": { "200": { - "description": "Ok", + "description": "ProofRecord", "content": { "application/json": { "schema": {}, @@ -5980,19 +6330,12 @@ } } }, + "description": "Accept a presentation request as prover by sending an accept request message\nto the connection associated with the proof record.", "tags": [ - "MultiTenancy" + "Proofs" ], "security": [], "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "path", "name": "proofRecordId", @@ -6001,15 +6344,36 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "comment": { + "type": "string" + }, + "filterByNonRevocationRequirements": { + "type": "boolean" + }, + "filterByPresentationPreview": { + "type": "boolean" + } + }, + "type": "object" + } + } + } + } } }, - "/multi-tenancy/proofs/{proofRecordId}/{tenantId}": { - "get": { - "operationId": "GetProofById", + "/proofs/{proofRecordId}/accept-presentation": { + "post": { + "operationId": "AcceptPresentation", "responses": { "200": { - "description": "Ok", + "description": "ProofRecord", "content": { "application/json": { "schema": {}, @@ -6065,39 +6429,44 @@ } } }, + "description": "Accept a presentation as prover by sending an accept presentation message\nto the connection associated with the proof record.", "tags": [ - "MultiTenancy" + "Proofs" ], "security": [], "parameters": [ - { - "in": "path", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "path", "name": "proofRecordId", "required": true, "schema": { - "$ref": "#/components/schemas/RecordId" + "type": "string" } } ] } }, - "/multi-tenancy/{tenantId}": { + "/proofs/{proofRecordId}/form-data": { "get": { - "operationId": "GetTenantById", + "operationId": "ProofFormData", "responses": { "200": { "description": "Ok", "content": { "application/json": { - "schema": {} + "schema": {}, + "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" + } + } + } } } }, @@ -6139,22 +6508,24 @@ } }, "tags": [ - "MultiTenancy" + "Proofs" ], "security": [], "parameters": [ { - "in": "query", - "name": "tenantId", + "in": "path", + "name": "proofRecordId", "required": true, "schema": { "type": "string" } } ] - }, - "delete": { - "operationId": "DeleteTenantById", + } + }, + "/transactions/endorse": { + "post": { + "operationId": "EndorserTransaction", "responses": { "200": { "description": "Ok", @@ -6164,7 +6535,7 @@ } } }, - "404": { + "400": { "description": "", "content": { "application/json": { @@ -6202,24 +6573,25 @@ } }, "tags": [ - "MultiTenancy" + "EndorserTransaction" ], "security": [], - "parameters": [ - { - "in": "query", - "name": "tenantId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndorserTransaction" + } } } - ] + } } }, - "/multi-tenancy/tenant": { + "/transactions/set-endorser-role": { "post": { - "operationId": "GetTenantAgent", + "operationId": "DidNymTransaction", "responses": { "200": { "description": "Ok", @@ -6229,24 +6601,6 @@ } } }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, "500": { "description": "", "content": { @@ -6267,7 +6621,7 @@ } }, "tags": [ - "MultiTenancy" + "EndorserTransaction" ], "security": [], "parameters": [], @@ -6276,16 +6630,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTenantAgentOptions" + "$ref": "#/components/schemas/DidNymTransaction" } } } } } }, - "/multi-tenancy/with-tenant-agent": { + "/transactions/write": { "post": { - "operationId": "WithTenantAgent", + "operationId": "WriteSchemaAndCredDefOnLedger", "responses": { "200": { "description": "Ok", @@ -6295,7 +6649,7 @@ } } }, - "404": { + "400": { "description": "", "content": { "application/json": { @@ -6333,7 +6687,7 @@ } }, "tags": [ - "MultiTenancy" + "EndorserTransaction" ], "security": [], "parameters": [], @@ -6342,19 +6696,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WithTenantAgentOptions" + "$ref": "#/components/schemas/WriteTransaction" } } } } } }, - "/proofs": { + "/credentials": { "get": { - "operationId": "GetAllProofs", + "operationId": "GetAllCredentials", "responses": { "200": { - "description": "ProofRecord[]", + "description": "CredentialExchangeRecord[]", "content": { "application/json": { "schema": { @@ -6367,11 +6721,23 @@ "Example 1": { "value": [ { - "metadata": {}, + "_tags": { + "state": "offer-sent", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" + }, + "metadata": { + "_internal/indyCredential": { + "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", + "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + } + }, + "credentials": [], "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "credentialAttributes": [], "protocolVersion": "v1" } ] @@ -6381,9 +6747,9 @@ } } }, - "description": "Retrieve all proof records", + "description": "Retrieve all credential exchange records", "tags": [ - "Proofs" + "Credentials" ], "security": [], "parameters": [ @@ -6394,27 +6760,111 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "connectionId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "state", + "required": false, + "schema": { + "$ref": "#/components/schemas/CredentialState" + } } ] } }, - "/proofs/{proofRecordId}": { + "/credentials/w3c": { "get": { - "operationId": "GetProofById", + "operationId": "GetAllW3c", "responses": { "200": { - "description": "ProofRecord", + "description": "Ok", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/W3cCredentialRecord" + }, + "type": "array" + } + } + } + } + }, + "tags": [ + "Credentials" + ], + "security": [], + "parameters": [] + } + }, + "/credentials/w3c/{id}": { + "get": { + "operationId": "GetW3cById", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/W3cCredentialRecord" + } + } + } + } + }, + "tags": [ + "Credentials" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/credentials/{credentialRecordId}": { + "get": { + "operationId": "GetCredentialById", + "responses": { + "200": { + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "metadata": {}, + "_tags": { + "state": "offer-sent", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" + }, + "metadata": { + "_internal/indyCredential": { + "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", + "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + } + }, + "credentials": [], "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "credentialAttributes": [], "protocolVersion": "v1" } } @@ -6459,15 +6909,15 @@ } } }, - "description": "Retrieve proof record by proof record id", + "description": "Retrieve credential exchange record by credential record id", "tags": [ - "Proofs" + "Credentials" ], "security": [], "parameters": [ { "in": "path", - "name": "proofRecordId", + "name": "credentialRecordId", "required": true, "schema": { "$ref": "#/components/schemas/RecordId" @@ -6476,23 +6926,35 @@ ] } }, - "/proofs/propose-proof": { + "/credentials/propose-credential": { "post": { - "operationId": "ProposeProof", + "operationId": "ProposeCredential", "responses": { "200": { - "description": "ProofRecord", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "metadata": {}, + "_tags": { + "state": "offer-sent", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" + }, + "metadata": { + "_internal/indyCredential": { + "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", + "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + } + }, + "credentials": [], "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "credentialAttributes": [], "protocolVersion": "v1" } } @@ -6537,9 +6999,9 @@ } } }, - "description": "Initiate a new presentation exchange as prover by sending a presentation proposal request\nto the connection with the specified connection id.", + "description": "Initiate a new credential exchange as holder by sending a propose credential message\nto the connection with a specified connection id.", "tags": [ - "Proofs" + "Credentials" ], "security": [], "parameters": [], @@ -6548,30 +7010,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RequestProofProposalOptions" + "$ref": "#/components/schemas/ProposeCredentialOptions" } } } } } }, - "/proofs/{proofRecordId}/accept-proposal": { + "/credentials/accept-proposal": { "post": { "operationId": "AcceptProposal", "responses": { "200": { - "description": "ProofRecord", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "metadata": {}, + "_tags": { + "state": "offer-sent", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" + }, + "metadata": { + "_internal/indyCredential": { + "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", + "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + } + }, + "credentials": [], "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "credentialAttributes": [], "protocolVersion": "v1" } } @@ -6616,9 +7090,9 @@ } } }, - "description": "Accept a presentation proposal as verifier by sending an accept proposal message\nto the connection associated with the proof record.", + "description": "Accept a credential proposal as issuer by sending an accept proposal message\nto the connection associated with the credential exchange record.", "tags": [ - "Proofs" + "Credentials" ], "security": [], "parameters": [], @@ -6627,30 +7101,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptProofProposal" + "$ref": "#/components/schemas/AcceptCredentialProposalOptions" } } } } } }, - "/proofs/request-proof": { + "/credentials/create-offer": { "post": { - "operationId": "RequestProof", + "operationId": "CreateOffer", "responses": { "200": { - "description": "Ok", + "description": "AgentMessage, CredentialExchangeRecord", "content": { "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "metadata": {}, + "_tags": { + "state": "offer-sent", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" + }, + "metadata": { + "_internal/indyCredential": { + "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", + "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + } + }, + "credentials": [], "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "credentialAttributes": [], "protocolVersion": "v1" } } @@ -6658,24 +7144,6 @@ } } }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "properties": { - "reason": { - "type": "string" - } - }, - "required": [ - "reason" - ], - "type": "object" - } - } - } - }, "500": { "description": "", "content": { @@ -6695,8 +7163,9 @@ } } }, + "description": "Initiate a new credential exchange as issuer by creating a credential offer\nwithout specifying a connection id", "tags": [ - "Proofs" + "Credentials" ], "security": [], "parameters": [], @@ -6705,16 +7174,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RequestProofOptions" + "$ref": "#/components/schemas/CreateOfferOptions" } } } } } }, - "/proofs/create-request-oob": { + "/credentials/create-offer-oob": { "post": { - "operationId": "CreateRequest", + "operationId": "CreateOfferOob", "responses": { "200": { "description": "Ok", @@ -6744,7 +7213,7 @@ } }, "tags": [ - "Proofs" + "Credentials" ], "security": [], "parameters": [], @@ -6753,30 +7222,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProofRequestOobOptions" + "$ref": "#/components/schemas/CreateOfferOobOptions" } } } } } }, - "/proofs/{proofRecordId}/accept-request": { + "/credentials/accept-offer": { "post": { - "operationId": "AcceptRequest", + "operationId": "AcceptOffer", "responses": { "200": { - "description": "ProofRecord", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "metadata": {}, + "_tags": { + "state": "offer-sent", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" + }, + "metadata": { + "_internal/indyCredential": { + "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", + "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + } + }, + "credentials": [], "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "credentialAttributes": [], "protocolVersion": "v1" } } @@ -6821,61 +7302,53 @@ } } }, - "description": "Accept a presentation request as prover by sending an accept request message\nto the connection associated with the proof record.", + "description": "Accept a credential offer as holder by sending an accept offer message\nto the connection associated with the credential exchange record.", "tags": [ - "Proofs" + "Credentials" ], "security": [], - "parameters": [ - { - "in": "path", - "name": "proofRecordId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "comment": { - "type": "string" - }, - "filterByNonRevocationRequirements": { - "type": "boolean" - }, - "filterByPresentationPreview": { - "type": "boolean" - } - }, - "type": "object" + "$ref": "#/components/schemas/AcceptCredentialOfferOptions" } } } } } }, - "/proofs/{proofRecordId}/accept-presentation": { + "/credentials/accept-request": { "post": { - "operationId": "AcceptPresentation", + "operationId": "AcceptRequest", "responses": { "200": { - "description": "ProofRecord", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "metadata": {}, + "_tags": { + "state": "offer-sent", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" + }, + "metadata": { + "_internal/indyCredential": { + "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", + "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + } + }, + "credentials": [], "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "credentialAttributes": [], "protocolVersion": "v1" } } @@ -6920,40 +7393,53 @@ } } }, - "description": "Accept a presentation as prover by sending an accept presentation message\nto the connection associated with the proof record.", + "description": "Accept a credential request as issuer by sending an accept request message\nto the connection associated with the credential exchange record.", "tags": [ - "Proofs" + "Credentials" ], "security": [], - "parameters": [ - { - "in": "path", - "name": "proofRecordId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptCredentialRequestOptions" + } } } - ] + } } }, - "/proofs/{proofRecordId}/form-data": { - "get": { - "operationId": "ProofFormData", + "/credentials/accept-credential": { + "post": { + "operationId": "AcceptCredential", "responses": { "200": { - "description": "Ok", + "description": "CredentialExchangeRecord", "content": { "application/json": { "schema": {}, "examples": { "Example 1": { "value": { - "metadata": {}, + "_tags": { + "state": "offer-sent", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b" + }, + "metadata": { + "_internal/indyCredential": { + "credentialDefinitionId": "q7ATwTYbQDgiigVijUAej:3:CL:318187:latest", + "schemaId": "q7ATwTYbQDgiigVijUAej:2:Employee Badge:1.0" + } + }, + "credentials": [], "id": "821f9b26-ad04-4f56-89b6-e2ef9c72b36e", "createdAt": "2022-01-01T00:00:00.000Z", - "connectionId": "2aecf74c-3073-4f98-9acb-92415d096834", - "threadId": "0019d466-5eea-4269-8c40-031b4896c5b7", + "connectionId": "ac6d0fdd-0db8-4f52-8a3d-de7ff8ddc14b", + "threadId": "82701488-b43c-4d7b-9244-4bb204a7ae26", + "credentialAttributes": [], "protocolVersion": "v1" } } @@ -6998,20 +7484,22 @@ } } }, + "description": "Accept a credential as holder by sending an accept credential message\nto the connection associated with the credential exchange record.", "tags": [ - "Proofs" + "Credentials" ], "security": [], - "parameters": [ - { - "in": "path", - "name": "proofRecordId", - "required": true, - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptCredential" + } } } - ] + } } } }, diff --git a/src/server.ts b/src/server.ts index b3798216..396aabf0 100644 --- a/src/server.ts +++ b/src/server.ts @@ -1,14 +1,13 @@ import 'reflect-metadata' import type { ServerConfig } from './utils/ServerConfig' import type { Response as ExResponse, Request as ExRequest, NextFunction } from 'express' -import type { Exception } from 'tsoa' +import { ValidateError, type Exception } from 'tsoa' import { Agent } from '@aries-framework/core' import bodyParser from 'body-parser' import cors from 'cors' import express from 'express' import { serve, generateHTML } from 'swagger-ui-express' -import { ValidateError } from 'tsoa' import { container } from 'tsyringe' import { basicMessageEvents } from './events/BasicMessageEvents' diff --git a/src/utils/agent.ts b/src/utils/agent.ts index 998f7e50..91012f2d 100644 --- a/src/utils/agent.ts +++ b/src/utils/agent.ts @@ -1,35 +1,36 @@ -import { AutoAcceptCredential, CredentialsModule, DidsModule, InitConfig, KeyDidRegistrar, KeyDidResolver, ProofsModule, V2CredentialProtocol, V2ProofProtocol, WebDidResolver } from '@aries-framework/core' +import type { InitConfig } from '@aries-framework/core' import { + AnonCredsModule, + LegacyIndyCredentialFormatService, + LegacyIndyProofFormatService, + V1CredentialProtocol, + V1ProofProtocol, +} from '@aries-framework/anoncreds' +import { AskarModule } from '@aries-framework/askar' +import { + AutoAcceptCredential, + CredentialsModule, + DidsModule, + KeyDidRegistrar, + KeyDidResolver, + ProofsModule, + WebDidResolver, Agent, ConnectionInvitationMessage, HttpOutboundTransport, LogLevel, } from '@aries-framework/core' -import { agentDependencies, HttpInboundTransport, IndySdkPostgresStorageConfig, IndySdkPostgresWalletScheme, loadIndySdkPostgresPlugin } from '@aries-framework/node' -import path from 'path' - -import { TsLogger } from './logger' -import { BCOVRIN_TEST_GENESIS } from './util' -import { AnonCredsModule, LegacyIndyCredentialFormatService, LegacyIndyProofFormatService, V1CredentialProtocol, V1ProofProtocol } from '@aries-framework/anoncreds' +import { IndyVdrAnonCredsRegistry, IndyVdrModule } from '@aries-framework/indy-vdr' +import { agentDependencies, HttpInboundTransport, IndySdkPostgresWalletScheme } from '@aries-framework/node' import { TenantsModule } from '@aries-framework/tenants' -import { randomUUID } from 'crypto' -import { AskarModule } from '@aries-framework/askar' import { ariesAskar } from '@hyperledger/aries-askar-nodejs' -import { IndyVdrAnonCredsRegistry, IndyVdrModule, IndyVdrPoolConfig } from '@aries-framework/indy-vdr' import { indyVdr } from '@hyperledger/indy-vdr-nodejs' -export const setupAgent = async ({ - name, - publicDidSeed, - endpoints, - port, -}: { - name: string - publicDidSeed: string - endpoints: string[] - port: number -}) => { +import { TsLogger } from './logger' +import { BCOVRIN_TEST_GENESIS } from './util' + +export const setupAgent = async ({ name, endpoints, port }: { name: string; endpoints: string[]; port: number }) => { const logger = new TsLogger(LogLevel.debug) const storageConfig = { @@ -73,7 +74,7 @@ export const setupAgent = async ({ genesisTransactions: BCOVRIN_TEST_GENESIS, connectOnStartup: true, }, - ] + ], }), askar: new AskarModule({ ariesAskar, @@ -101,7 +102,7 @@ export const setupAgent = async ({ }), ], }), - tenants: new TenantsModule() + tenants: new TenantsModule(), }, dependencies: agentDependencies, }) @@ -133,4 +134,3 @@ export const setupAgent = async ({ return agent } - diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 00000000..c1c33460 --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.build.json", + + "compilerOptions": { + "baseUrl": ".", + "paths": { + "afj-controller/*": ["src"] + } + }, + "include": ["./.eslintrc.js", "./jest.config.ts", "./jest.config.base.ts", "types", "tests", "samples", "src", "bin"], + "exclude": ["node_modules", "build"] +} diff --git a/tsconfig.json b/tsconfig.json index ff050101..de0ca16d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "@aries-framework/*": ["packages/*/src"] + "afj-controller/*": ["src"] }, "experimentalDecorators": true, "emitDecoratorMetadata": true, diff --git a/yarn.lock b/yarn.lock index a3c6cd04..f1861fb2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,22 @@ # yarn lockfile v1 +"@2060.io/ref-napi@^3.0.6", ref-napi@3.0.3, "ref-napi@^2.0.1 || ^3.0.2", ref-napi@^3.0.3, "ref-napi@npm:@2060.io/ref-napi": + name ref-napi + version "3.0.6" + resolved "https://registry.yarnpkg.com/@2060.io/ref-napi/-/ref-napi-3.0.6.tgz#32b1a257cada096f95345fd7abae746385ecc5dd" + integrity sha512-8VAIXLdKL85E85jRYpPcZqATBL6fGnC/XjBGNeSgRSMJtrAMSmfRksqIq5AmuZkA2eeJXMWCiN6UQOUdozcymg== + dependencies: + debug "^4.1.1" + get-symbol-from-current-process-h "^1.0.2" + node-addon-api "^3.0.0" + node-gyp-build "^4.2.1" + +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + "@ampproject/remapping@^2.2.0": version "2.2.1" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" @@ -10,21 +26,45 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@aries-framework/anoncreds@0.4.0", "@aries-framework/anoncreds@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@aries-framework/anoncreds/-/anoncreds-0.4.0.tgz#abf0dd6b316d607fbee9fc5ef5d5709dfa2ded36" - integrity sha512-jzZVMXJoTutF5jrATYXHiavUi2APEUbvGiOA8EelP7cabVxCijoWh0DdTEBoGSUv9xuK26iSWVY0MmnAxD7l9g== +"@aries-framework/anoncreds-rs@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@aries-framework/anoncreds-rs/-/anoncreds-rs-0.4.2.tgz#accce59154083dadc91d6a9c8333af8cb10f2188" + integrity sha512-S2QGDlVLJUaqjOj/b+lD+Xq8x4j88IyfJ3vwXaVwkrTlhpCiy/L+xoTaZq8UIcYIWfsrJ9CR6wl+gbCestGnFg== + dependencies: + "@aries-framework/anoncreds" "0.4.2" + "@aries-framework/core" "0.4.2" + class-transformer "^0.5.1" + class-validator "0.14.0" + rxjs "^7.2.0" + tsyringe "^4.8.0" + +"@aries-framework/anoncreds@0.4.2", "@aries-framework/anoncreds@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@aries-framework/anoncreds/-/anoncreds-0.4.2.tgz#0d2bc7a40c8fac777c18325199939866d03c9ea3" + integrity sha512-Jwn9TfzgOhuW6nxOs0DyzU1W/XL1XvyOt8zjhgz0ETDuwVJMtSTyN+1f4y5B0R7fuBYJ6KbdAwfeCRQT8BLa6g== dependencies: - "@aries-framework/core" "0.4.0" + "@aries-framework/core" "0.4.2" bn.js "^5.2.1" class-transformer "0.5.1" class-validator "0.14.0" reflect-metadata "^0.1.13" -"@aries-framework/core@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@aries-framework/core/-/core-0.4.0.tgz#6af11446174d8f690aa1bf4abf6f61ad47a05b52" - integrity sha512-Z/rTgpJMKTl9iQQd8GnNEV5wCZKdV+kkd+Y4e/KS+j+6yMOxrgaVGcAKlcFIPcHUc6l1iOetJFeVLSwftXW2Kg== +"@aries-framework/askar@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@aries-framework/askar/-/askar-0.4.2.tgz#b05051e0a5bbdf95d3c1339aa19b2680ed6d21f0" + integrity sha512-eQuLsXCjVxRRhUCd8yXqP0PD2S3QX3OPV2eUBb7PqkTxdo1ZCbiA8Q1pCP65l9s/zVIGT/2E1ys/n1sZZm1wmQ== + dependencies: + "@aries-framework/core" "0.4.2" + bn.js "^5.2.1" + class-transformer "0.5.1" + class-validator "0.14.0" + rxjs "^7.2.0" + tsyringe "^4.8.0" + +"@aries-framework/core@0.4.2", "@aries-framework/core@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@aries-framework/core/-/core-0.4.2.tgz#f2118c732d6aff8d6557a15de14381e8782b54a1" + integrity sha512-2qmDRkxD5vnPlcMjVTqu/Wxog9bUVU+tSr+7mgANgJ9q170FuoSuChU7WA5VCKEdmbRIM4BmvsnTlU8Y+iQ07A== dependencies: "@digitalcredentials/jsonld" "^5.2.1" "@digitalcredentials/jsonld-signatures" "^9.3.1" @@ -33,6 +73,7 @@ "@stablelib/ed25519" "^1.0.2" "@stablelib/random" "^1.0.1" "@stablelib/sha256" "^1.0.1" + "@types/node-fetch" "2.6.2" "@types/ws" "^8.5.4" abort-controller "^3.0.0" big-integer "^1.6.51" @@ -44,36 +85,29 @@ lru_map "^0.4.1" luxon "^3.3.0" make-error "^1.3.6" - node-fetch "^2.6.1" object-inspect "^1.10.3" query-string "^7.0.1" reflect-metadata "^0.1.13" rxjs "^7.2.0" - tsyringe "^4.7.0" + tsyringe "^4.8.0" uuid "^9.0.0" varint "^6.0.0" web-did-resolver "^2.0.21" -"@aries-framework/indy-sdk@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@aries-framework/indy-sdk/-/indy-sdk-0.4.0.tgz#d4bb59cf010b2e9166982d4a7a0103325bde9b80" - integrity sha512-Z54+a7yxFrynGTgc0vYs0proh+4MnV1e0+1SSwFi+kbi11i9rIpLj8pBN5PN1569qYVtCzSaFz4q6BtvzAHLJw== +"@aries-framework/indy-vdr@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@aries-framework/indy-vdr/-/indy-vdr-0.4.2.tgz#69acee0a268a044ec7c11d3e647230c397580e7a" + integrity sha512-hFZlxWSbwXBY2sTbnCpgWbQAHZM2aeAs5Jj/Id+VJhwVsfwLvlQshBXmVpf6hIswCQsRFl3Q2lSn4MOh4pADYQ== dependencies: - "@aries-framework/anoncreds" "0.4.0" - "@aries-framework/core" "0.4.0" - "@stablelib/ed25519" "^1.0.3" - "@types/indy-sdk" "1.16.26" - class-transformer "0.5.1" - class-validator "0.14.0" - rxjs "^7.2.0" - tsyringe "^4.7.0" + "@aries-framework/anoncreds" "0.4.2" + "@aries-framework/core" "0.4.2" -"@aries-framework/node@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@aries-framework/node/-/node-0.4.0.tgz#2d9f0f58f433c8ef61a5f275e3a1d7a75ecc4dbd" - integrity sha512-ydxkD+Hb8XLLUeX2G27baNUtC3BBB3LG2NfZgy2128q6mAg2mqhLnjWocncE7kWFVneZ5copBIoF2MIPQvwYhg== +"@aries-framework/node@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@aries-framework/node/-/node-0.4.2.tgz#b410cafab8e76cda3ff392c8d08b3c385c8ac507" + integrity sha512-fQOG0BWTewXoLUUd7JcpJeTFmHQfKZVTQFHYpTXwkYVuL3UTWfOEAm1NPtS8TetyHZexFxpKlDRYdFkOG9Z4rw== dependencies: - "@aries-framework/core" "0.4.0" + "@aries-framework/core" "0.4.2" "@types/express" "^4.17.15" express "^4.17.1" ffi-napi "^4.0.3" @@ -81,6 +115,21 @@ ref-napi "^3.0.3" ws "^8.13.0" +"@aries-framework/tenants@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@aries-framework/tenants/-/tenants-0.4.2.tgz#46f295171093cdbec242804f821f60844a046046" + integrity sha512-dRgneBY4z6YAn9ieNSeLEqhW+H03aFZwnxcnWhJfSGeHKUl0kMPmjCqvpP3NFhdB/rX92U9OOZDruIv2efM2ig== + dependencies: + "@aries-framework/core" "0.4.2" + async-mutex "^0.4.0" + +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.21.4": version "7.21.4" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" @@ -205,6 +254,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + "@babel/helper-validator-option@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" @@ -219,6 +273,15 @@ "@babel/traverse" "^7.22.1" "@babel/types" "^7.22.3" +"@babel/highlight@^7.10.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -421,10 +484,102 @@ "@digitalcredentials/jsonld-signatures" "^9.3.1" credentials-context "^2.0.0" -"@gar/promisify@^1.0.1": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" - integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== +"@eslint-community/eslint-utils@^4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.5.1": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + +"@hyperledger/anoncreds-nodejs@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-nodejs/-/anoncreds-nodejs-0.1.0.tgz#925f4004af85e772a3ee55f240b281148cbfb6e6" + integrity sha512-5Z0+nRQow7mcaRim4HncB8GzZr9KZl4a1snUfA/0mrK+eVncFCj13vcr9HnIwAfEOWn7OdHsK44Jy7tHRbYJww== + dependencies: + "@hyperledger/anoncreds-shared" "0.1.0" + "@mapbox/node-pre-gyp" "^1.0.10" + ffi-napi "4.0.3" + node-cache "5.1.2" + ref-array-di "1.2.2" + ref-napi "3.0.3" + ref-struct-di "1.1.1" + +"@hyperledger/anoncreds-shared@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-shared/-/anoncreds-shared-0.1.0.tgz#947c602c385bfa79b63849c9e48b51cc9d41d820" + integrity sha512-DisZFY4YbrugRCCv7AtYFUTsrGigHF1dVaiA36WrhRUgetwDzKgMiYGkxFQmCe0IJ0mDw4M7sbTJBXxfxij/+A== + +"@hyperledger/aries-askar-nodejs@^0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@hyperledger/aries-askar-nodejs/-/aries-askar-nodejs-0.1.1.tgz#93d59cec0a21aae3e06ce6149a2424564a0e3238" + integrity sha512-mgTioLL22Q+Ie8RMY446bRtp/+D3rskhKJuW/qZUOinb8w8t0JKrFSfCr3OBs0/FVsm7cBN9ZqJdJY0+0BkVhQ== + dependencies: + "@hyperledger/aries-askar-shared" "0.1.1" + "@mapbox/node-pre-gyp" "^1.0.10" + ffi-napi "^4.0.3" + node-cache "^5.1.2" + ref-array-di "^1.2.2" + ref-napi "^3.0.3" + ref-struct-di "^1.1.1" + +"@hyperledger/aries-askar-shared@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@hyperledger/aries-askar-shared/-/aries-askar-shared-0.1.1.tgz#bdb34ad718e988db5a47d540fd22ba2c7a86a1d3" + integrity sha512-9jJSgqHt29JEuQ/tBzHmhWaSLyTyw/t7H+Ell/YSHtL9DE0KN0Ew/vuXoDqlt117+EBeQTDKG0hy0ov8K41rmw== + dependencies: + fast-text-encoding "^1.0.3" + +"@hyperledger/indy-vdr-nodejs@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@hyperledger/indy-vdr-nodejs/-/indy-vdr-nodejs-0.1.0.tgz#a006393e3ecb1a4661bbd52299b796247e8bde47" + integrity sha512-XNPy4fygp3vf4cLK36n2Ap8BnIsR5Ic+9sbtHrtQA6tAhrL9Zq8foaYPW8XDeZ6OlEWdViNRYIKGkR1w0zuLJw== + dependencies: + "@hyperledger/indy-vdr-shared" "0.1.0" + "@mapbox/node-pre-gyp" "^1.0.10" + "@types/ref-array-di" "^1.2.5" + ffi-napi "^4.0.3" + ref-array-di "^1.2.2" + ref-napi "^3.0.3" + ref-struct-di "^1.1.1" + +"@hyperledger/indy-vdr-shared@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@hyperledger/indy-vdr-shared/-/indy-vdr-shared-0.1.0.tgz#f8023a2d25ca9395ec2fd0e6a0dfbda6459fab03" + integrity sha512-VfGraHX6RMmNcF4WYD5F1anjJzPN7KSrj5GP3g0hCrdXMDXEtO8t1lHQLVfrBgdjhR7gE82Nx+ZAYlGnTxoE+A== "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" @@ -661,6 +816,21 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" +"@mapbox/node-pre-gyp@^1.0.10": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa" + integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ== + dependencies: + detect-libc "^2.0.0" + https-proxy-agent "^5.0.0" + make-dir "^3.1.0" + node-fetch "^2.6.7" + nopt "^5.0.0" + npmlog "^5.0.1" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.11" + "@multiformats/base-x@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" @@ -687,22 +857,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@npmcli/fs@^1.0.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.1.1.tgz#72f719fe935e687c56a4faecf3c03d06ba593257" - integrity sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ== - dependencies: - "@gar/promisify" "^1.0.1" - semver "^7.3.5" - -"@npmcli/move-file@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" - integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== - dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" - "@peculiar/asn1-schema@^2.3.6": version "2.3.6" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz#3dd3c2ade7f702a9a94dfb395c192f5fa5d6b922" @@ -761,7 +915,7 @@ dependencies: "@stablelib/int" "^1.0.1" -"@stablelib/ed25519@^1.0.2", "@stablelib/ed25519@^1.0.3": +"@stablelib/ed25519@^1.0.2": version "1.0.3" resolved "https://registry.yarnpkg.com/@stablelib/ed25519/-/ed25519-1.0.3.tgz#f8fdeb6f77114897c887bb6a3138d659d3f35996" integrity sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg== @@ -939,6 +1093,19 @@ dependencies: "@types/node" "*" +"@types/eslint@^8.40.2": + version "8.56.2" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.2.tgz#1c72a9b794aa26a8b94ad26d5b9aa51c8a6384bb" + integrity sha512-uQDwm1wFHmbBbCZCqAlq6Do9LYwByNZHWzXppSnay9SuwJ+VRbjkbLABer54kcPnMSlG6Fdiy2yaFXm/z9Z5gw== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + "@types/express-serve-static-core@^4.17.33": version "4.17.35" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz#c95dd4424f0d32e525d23812aa8ab8e4d3906c4f" @@ -971,13 +1138,6 @@ resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== -"@types/indy-sdk@1.16.26", "@types/indy-sdk@^1.16.26": - version "1.16.26" - resolved "https://registry.yarnpkg.com/@types/indy-sdk/-/indy-sdk-1.16.26.tgz#871f82c3f7d241d649aff5eb6800048890efb8f8" - integrity sha512-KlnjsVsX/7yTmyyIlHWcytlBHoQ1vPGeiLnLv5y1vDftL6OQ5V+hebfAr7d3roMEsjCTH3qKkklwGcj1qS90YA== - dependencies: - buffer "^6.0.0" - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" @@ -1005,6 +1165,16 @@ jest-matcher-utils "^27.0.0" pretty-format "^27.0.0" +"@types/json-schema@*", "@types/json-schema@^7.0.12": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/keyv@^3.1.4": version "3.1.4" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" @@ -1029,6 +1199,14 @@ dependencies: "@types/express" "*" +"@types/node-fetch@2.6.2": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da" + integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + "@types/node-fetch@^2.6.4": version "2.6.4" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.4.tgz#1bc3a26de814f6bf466b25aeb1473fa1afe6a660" @@ -1067,6 +1245,27 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== +"@types/ref-array-di@^1.2.5": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@types/ref-array-di/-/ref-array-di-1.2.8.tgz#2b44567b8eaae72c59db68a482f5d26297e955be" + integrity sha512-+re5xrhRXDUR3sicMvN9N3C+6mklq5kd7FkN3ciRWio3BAvUDh2OEUTTG+619r10dqc6de25LIDtgpHtXCKGbA== + dependencies: + "@types/ref-napi" "*" + +"@types/ref-napi@*": + version "3.0.12" + resolved "https://registry.yarnpkg.com/@types/ref-napi/-/ref-napi-3.0.12.tgz#2ddde995ecf769f1e5da01604e468348949c72c3" + integrity sha512-UZPKghRaLlWx2lPAphpdtYe62TbGBaPeqUM6gF1vI6FPRIu/Tff/WMAzpJRFU3jJIiD8HiXpVt2RjcFHtA6YRg== + dependencies: + "@types/node" "*" + +"@types/ref-struct-di@^1.1.9": + version "1.1.12" + resolved "https://registry.yarnpkg.com/@types/ref-struct-di/-/ref-struct-di-1.1.12.tgz#5d9167488692816754c6d2b9064d9b0313609d59" + integrity sha512-R2RNkGIROGoJTbXYTXrsXybnsQD4iAy26ih/G6HCeCB9luWFQKkr537XGz0uGJ1kH8y8RMkdbQmD/wBulrOPHw== + dependencies: + "@types/ref-napi" "*" + "@types/responselike@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" @@ -1074,6 +1273,11 @@ dependencies: "@types/node" "*" +"@types/semver@^7.5.0": + version "7.5.6" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" + integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== + "@types/send@*": version "0.17.1" resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.1.tgz#ed4932b8a2a805f1fe362a70f4e62d0ac994e301" @@ -1171,6 +1375,92 @@ dependencies: "@types/node" "*" +"@typescript-eslint/eslint-plugin@^6.19.1": + version "6.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.19.1.tgz#bb0676af940bc23bf299ca58dbdc6589c2548c2e" + integrity sha512-roQScUGFruWod9CEyoV5KlCYrubC/fvG8/1zXuT0WTcxX87GnMMmnksMwSg99lo1xiKrBzw2icsJPMAw1OtKxg== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.19.1" + "@typescript-eslint/type-utils" "6.19.1" + "@typescript-eslint/utils" "6.19.1" + "@typescript-eslint/visitor-keys" "6.19.1" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/parser@^6.19.1": + version "6.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.19.1.tgz#68a87bb21afaf0b1689e9cdce0e6e75bc91ada78" + integrity sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ== + dependencies: + "@typescript-eslint/scope-manager" "6.19.1" + "@typescript-eslint/types" "6.19.1" + "@typescript-eslint/typescript-estree" "6.19.1" + "@typescript-eslint/visitor-keys" "6.19.1" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@6.19.1": + version "6.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.19.1.tgz#2f527ee30703a6169a52b31d42a1103d80acd51b" + integrity sha512-4CdXYjKf6/6aKNMSly/BP4iCSOpvMmqtDzRtqFyyAae3z5kkqEjKndR5vDHL8rSuMIIWP8u4Mw4VxLyxZW6D5w== + dependencies: + "@typescript-eslint/types" "6.19.1" + "@typescript-eslint/visitor-keys" "6.19.1" + +"@typescript-eslint/type-utils@6.19.1": + version "6.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.19.1.tgz#6a130e3afe605a4898e043fa9f72e96309b54935" + integrity sha512-0vdyld3ecfxJuddDjACUvlAeYNrHP/pDeQk2pWBR2ESeEzQhg52DF53AbI9QCBkYE23lgkhLCZNkHn2hEXXYIg== + dependencies: + "@typescript-eslint/typescript-estree" "6.19.1" + "@typescript-eslint/utils" "6.19.1" + debug "^4.3.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/types@6.19.1": + version "6.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.19.1.tgz#2d4c9d492a63ede15e7ba7d129bdf7714b77f771" + integrity sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg== + +"@typescript-eslint/typescript-estree@6.19.1": + version "6.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.1.tgz#796d88d88882f12e85bb33d6d82d39e1aea54ed1" + integrity sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA== + dependencies: + "@typescript-eslint/types" "6.19.1" + "@typescript-eslint/visitor-keys" "6.19.1" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.19.1": + version "6.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.19.1.tgz#df93497f9cfddde2bcc2a591da80536e68acd151" + integrity sha512-JvjfEZuP5WoMqwh9SPAPDSHSg9FBHHGhjPugSRxu5jMfjvBpq5/sGTD+9M9aQ5sh6iJ8AY/Kk/oUYVEMAPwi7w== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.19.1" + "@typescript-eslint/types" "6.19.1" + "@typescript-eslint/typescript-estree" "6.19.1" + semver "^7.5.4" + +"@typescript-eslint/visitor-keys@6.19.1": + version "6.19.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.1.tgz#2164073ed4fc34a5ff3b5e25bb5a442100454c4c" + integrity sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ== + dependencies: + "@typescript-eslint/types" "6.19.1" + eslint-visitor-keys "^3.4.1" + "@unimodules/core@*": version "7.1.2" resolved "https://registry.yarnpkg.com/@unimodules/core/-/core-7.1.2.tgz#5181b99586476a5d87afd0958f26a04714c47fa1" @@ -1186,6 +1476,11 @@ expo-modules-autolinking "^0.0.3" invariant "^2.2.4" +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + 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" @@ -1219,6 +1514,11 @@ acorn-globals@^6.0.0: 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" @@ -1229,7 +1529,7 @@ acorn-walk@^8.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^7.1.1: +acorn@^7.1.1, 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== @@ -1239,29 +1539,37 @@ acorn@^8.2.4, acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== -agent-base@6, agent-base@^6.0.2: +agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: debug "4" -agentkeepalive@^4.1.3: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.3.0.tgz#bb999ff07412653c1803b3ced35e50729830a255" - integrity sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg== +ajv@^6.10.0, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: - debug "^4.1.0" - depd "^2.0.0" - humanize-ms "^1.2.1" + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== +ajv@^8.0.1: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== ansi-escapes@^4.2.1: version "4.3.2" @@ -1307,10 +1615,10 @@ anymatch@^3.0.3, anymatch@~3.1.2: resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== -are-we-there-yet@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd" - integrity sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg== +are-we-there-yet@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" + integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== dependencies: delegates "^1.0.0" readable-stream "^3.6.0" @@ -1340,6 +1648,61 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== +array-includes@^3.1.7: + version "3.1.7" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda" + integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-string "^1.0.7" + +array-index@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-index/-/array-index-1.0.0.tgz#ec56a749ee103e4e08c790b9c353df16055b97f9" + integrity sha512-jesyNbBkLQgGZMSwA1FanaFjalb1mZUGxGeUEkSDidzgrbjBGhvizJkaItdhkt8eIHFOJC7nDsrXk+BaehTdRw== + dependencies: + debug "^2.2.0" + es6-symbol "^3.0.2" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array.prototype.findlastindex@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" + integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + get-intrinsic "^1.2.1" + +array.prototype.flat@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + array.prototype.map@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.5.tgz#6e43c2fee6c0fb5e4806da2dc92eb00970809e55" @@ -1351,6 +1714,19 @@ array.prototype.map@^1.0.5: es-array-method-boxes-properly "^1.0.0" is-string "^1.0.7" +arraybuffer.prototype.slice@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" + integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-array-buffer "^3.0.2" + is-shared-array-buffer "^1.0.2" + asap@^2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -1370,6 +1746,18 @@ asn1js@^3.0.1, asn1js@^3.0.5: pvutils "^1.1.3" tslib "^2.4.0" +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async-mutex@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.4.1.tgz#bccf55b96f2baf8df90ed798cb5544a1f6ee4c2c" + integrity sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA== + dependencies: + tslib "^2.4.0" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -1385,6 +1773,15 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +axios@^1.4.0: + version "1.6.5" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.5.tgz#2c090da14aeeab3770ad30c3a1461bc970fb0cd8" + integrity sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg== + dependencies: + follow-redirects "^1.15.4" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + b64-lite@^1.3.1, b64-lite@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/b64-lite/-/b64-lite-1.4.0.tgz#e62442de11f1f21c60e38b74f111ac0242283d3d" @@ -1490,13 +1887,6 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bindings@^1.3.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" @@ -1559,6 +1949,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + 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" @@ -1605,7 +2002,7 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@^6.0.0, buffer@^6.0.3: +buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -1618,30 +2015,6 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== -cacache@^15.2.0: - version "15.3.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" - integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== - dependencies: - "@npmcli/fs" "^1.0.0" - "@npmcli/move-file" "^1.0.1" - chownr "^2.0.0" - fs-minipass "^2.0.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^6.0.0" - minipass "^3.1.1" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" - mkdirp "^1.0.3" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^8.0.1" - tar "^6.0.2" - unique-filename "^1.1.1" - cacheable-lookup@^5.0.3: version "5.0.4" resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" @@ -1668,6 +2041,15 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.4, call-bind@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" + integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== + dependencies: + function-bind "^1.1.2" + get-intrinsic "^1.2.1" + set-function-length "^1.1.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1693,7 +2075,7 @@ canonicalize@^1.0.1: resolved "https://registry.yarnpkg.com/canonicalize/-/canonicalize-1.0.8.tgz#24d1f1a00ed202faafd9bf8e63352cd4450c6df1" integrity sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A== -chalk@^2.0.0: +chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1702,7 +2084,7 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1740,12 +2122,17 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== +ci-info@^3.7.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + cjs-module-lexer@^1.0.0: version "1.2.2" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== -class-transformer@0.5.1: +class-transformer@0.5.1, class-transformer@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/class-transformer/-/class-transformer-0.5.1.tgz#24147d5dffd2a6cea930a3250a677addf96ab336" integrity sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw== @@ -1759,11 +2146,6 @@ class-validator@0.14.0: libphonenumber-js "^1.10.14" validator "^13.7.0" -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -1798,6 +2180,11 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" +clone@2.x: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -1832,7 +2219,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-support@^1.1.3: +color-support@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== @@ -1869,7 +2256,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -console-control-strings@^1.1.0: +console-control-strings@^1.0.0, console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== @@ -1931,7 +2318,7 @@ cross-fetch@^3.1.5: dependencies: node-fetch "^2.6.11" -cross-spawn@^7.0.3: +cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -1957,6 +2344,14 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + data-uri-to-buffer@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" @@ -1971,21 +2366,21 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -debug@2.6.9: +debug@2.6.9, debug@^2.2.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.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== dependencies: ms "2.1.2" -debug@^3.1.0: +debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -2019,7 +2414,7 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== -deep-is@~0.1.3: +deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== @@ -2034,6 +2429,15 @@ defer-to-connect@^2.0.0: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== +define-data-property@^1.0.1, define-data-property@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== + dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -2052,7 +2456,7 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== -depd@2.0.0, depd@^2.0.0: +depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== @@ -2062,6 +2466,11 @@ destroy@1.2.0: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== +detect-libc@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" + integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -2090,6 +2499,27 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + 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" @@ -2129,13 +2559,6 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== -encoding@^0.1.12: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -2143,15 +2566,21 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -env-paths@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== +enhanced-resolve@^5.12.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" -err-code@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" - integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== +enquirer@^2.3.5: + version "2.4.1" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" error-ex@^1.3.1: version "1.3.2" @@ -2200,6 +2629,51 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: unbox-primitive "^1.0.2" which-typed-array "^1.1.9" +es-abstract@^1.22.1: + version "1.22.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32" + integrity sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA== + dependencies: + array-buffer-byte-length "^1.0.0" + arraybuffer.prototype.slice "^1.0.2" + available-typed-arrays "^1.0.5" + call-bind "^1.0.5" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.2" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.12" + is-weakref "^1.0.2" + object-inspect "^1.13.1" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.1" + safe-array-concat "^1.0.1" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.8" + string.prototype.trimend "^1.0.7" + string.prototype.trimstart "^1.0.7" + typed-array-buffer "^1.0.0" + typed-array-byte-length "^1.0.0" + typed-array-byte-offset "^1.0.0" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.13" + es-aggregate-error@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/es-aggregate-error/-/es-aggregate-error-1.0.9.tgz#b50925cdf78c8a634bd766704f6f7825902be3d9" @@ -2242,6 +2716,13 @@ es-set-tostringtag@^2.0.1: has "^1.0.3" has-tostringtag "^1.0.0" +es-shim-unscopables@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== + dependencies: + hasown "^2.0.0" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -2251,6 +2732,32 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.0.2, es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -2271,6 +2778,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" @@ -2283,12 +2795,180 @@ escodegen@^2.0.0: 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" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== + +eslint-import-resolver-node@^0.3.9: + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== + dependencies: + debug "^3.2.7" + is-core-module "^2.13.0" + resolve "^1.22.4" + +eslint-import-resolver-typescript@^3.5.5: + version "3.6.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz#7b983680edd3f1c5bce1a5829ae0bc2d57fe9efa" + integrity sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg== + dependencies: + debug "^4.3.4" + enhanced-resolve "^5.12.0" + eslint-module-utils "^2.7.4" + fast-glob "^3.3.1" + get-tsconfig "^4.5.0" + is-core-module "^2.11.0" + is-glob "^4.0.3" + +eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" + integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== + dependencies: + debug "^3.2.7" + +eslint-plugin-import@^2.27.5: + version "2.29.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" + integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== + dependencies: + array-includes "^3.1.7" + array.prototype.findlastindex "^1.2.3" + array.prototype.flat "^1.3.2" + array.prototype.flatmap "^1.3.2" + debug "^3.2.7" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.9" + eslint-module-utils "^2.8.0" + hasown "^2.0.0" + is-core-module "^2.13.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.fromentries "^2.0.7" + object.groupby "^1.0.1" + object.values "^1.1.7" + semver "^6.3.1" + tsconfig-paths "^3.15.0" + +eslint-plugin-prettier@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^7.32.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.1.2" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -estraverse@^5.2.0: +esquery@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -2393,6 +3073,13 @@ express@^4.17.1, express@^4.18.1: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + extract-zip@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" @@ -2404,6 +3091,16 @@ extract-zip@^2.0.1: optionalDependencies: "@types/yauzl" "^2.9.1" +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + fast-glob@^3.2.5: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" @@ -2415,12 +3112,23 @@ fast-glob@^3.2.5: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.2.9, fast-glob@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.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== -fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== @@ -2461,7 +3169,7 @@ fetch-blob@^2.1.1: resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-2.1.2.tgz#a7805db1361bd44c1ef62bb57fb5fe8ea173ef3c" integrity sha512-YKqtUDwqLyfyMnmbw8XD6Q8j9i/HggKtPEI+pZ1+8bvheBu78biSmNaXWusx1TauGqtUUGx/cBb1mKdq2rLYow== -ffi-napi@^4.0.3: +ffi-napi@4.0.3, ffi-napi@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/ffi-napi/-/ffi-napi-4.0.3.tgz#27a8d42a8ea938457154895c59761fbf1a10f441" integrity sha512-PMdLCIvDY9mS32RxZ0XGb95sonPRal8aqRhLbeEtWKZTe2A87qRFG9HjOhvG8EX2UmQw5XNRMIOT+1MYlWmdeg== @@ -2473,10 +3181,12 @@ ffi-napi@^4.0.3: ref-napi "^2.0.1 || ^3.0.2" ref-struct-di "^1.1.0" -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" fill-range@^7.0.1: version "7.0.1" @@ -2519,6 +3229,32 @@ find-up@~5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + +flat-cache@^3.0.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.3" + rimraf "^3.0.2" + +flatted@^3.2.9: + version "3.2.9" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" + integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== + +follow-redirects@^1.15.4: + version "1.15.5" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020" + integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -2573,7 +3309,7 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.1.0: +fs-extra@^9.0.0, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -2605,6 +3341,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + function.prototype.name@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" @@ -2615,24 +3356,40 @@ function.prototype.name@^1.1.5: es-abstract "^1.19.0" functions-have-names "^1.2.2" +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -gauge@^4.0.3: - version "4.0.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" - integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== +gauge@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" + integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== dependencies: aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.3" - console-control-strings "^1.1.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" has-unicode "^2.0.1" - signal-exit "^3.0.7" + object-assign "^4.1.1" + signal-exit "^3.0.0" string-width "^4.2.3" strip-ansi "^6.0.1" - wide-align "^1.1.5" + wide-align "^1.1.2" gensync@^1.0.0-beta.2: version "1.0.0-beta.2" @@ -2654,6 +3411,16 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-proto "^1.0.1" has-symbols "^1.0.3" +get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" + integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA== + dependencies: + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -2684,6 +3451,13 @@ get-symbol-from-current-process-h@^1.0.1, get-symbol-from-current-process-h@^1.0 resolved "https://registry.yarnpkg.com/get-symbol-from-current-process-h/-/get-symbol-from-current-process-h-1.0.2.tgz#510af52eaef873f7028854c3377f47f7bb200265" integrity sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw== +get-tsconfig@^4.5.0: + version "4.7.2" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.2.tgz#0dcd6fb330391d46332f4c6c1bf89a6514c2ddce" + integrity sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A== + dependencies: + resolve-pkg-maps "^1.0.0" + get-uv-event-loop-napi-h@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/get-uv-event-loop-napi-h/-/get-uv-event-loop-napi-h-1.0.6.tgz#42b0b06b74c3ed21fbac8e7c72845fdb7a200208" @@ -2715,6 +3489,13 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^13.6.0, globals@^13.9.0: + version "13.24.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== + dependencies: + type-fest "^0.20.2" + globalthis@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" @@ -2722,6 +3503,18 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -2746,11 +3539,16 @@ got@^11.8.5: p-cancelable "^2.0.0" responselike "^2.0.0" -graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" @@ -2785,6 +3583,13 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-property-descriptors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340" + integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg== + dependencies: + get-intrinsic "^1.2.2" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" @@ -2814,6 +3619,13 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +hasown@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" + integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + dependencies: + function-bind "^1.1.2" + hexoid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-1.0.0.tgz#ad10c6573fb907de23d9ec63a711267d9dc9bc18" @@ -2836,7 +3648,7 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: +http-cache-semantics@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== @@ -2882,13 +3694,6 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" - integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== - dependencies: - ms "^2.0.0" - iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -2896,18 +3701,29 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +ignore@^5.2.0, ignore@^5.2.4: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" + integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-local@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" @@ -2921,25 +3737,6 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -indy-sdk@^1.16.0-dev-1655: - version "1.16.0-dev-1655" - resolved "https://registry.yarnpkg.com/indy-sdk/-/indy-sdk-1.16.0-dev-1655.tgz#098c38df4a6eb4e13f89c0b86ebe9636944b71e0" - integrity sha512-MSWRY8rdnGAegs4v4AnzE6CT9O/3JBMUiE45I0Ihj2DMuH+XS1EJZUQEJsyis6aOQzRavv/xVtaBC8o+6azKuw== - dependencies: - bindings "^1.3.1" - nan "^2.11.1" - node-gyp "^8.0.0" - -infer-owner@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -2969,11 +3766,6 @@ invariant@^2.2.4: dependencies: loose-envify "^1.0.0" -ip@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== - ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" @@ -3035,6 +3827,13 @@ is-core-module@^2.11.0: dependencies: has "^1.0.3" +is-core-module@^2.13.0, is-core-module@^2.13.1: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + is-date-object@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" @@ -3042,6 +3841,11 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -3057,18 +3861,13 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" -is-lambda@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" - integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== - is-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" @@ -3146,6 +3945,13 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" +is-typed-array@^1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" + integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== + dependencies: + which-typed-array "^1.1.11" + is-typedarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -3156,7 +3962,14 @@ is-weakref@^1.0.2: resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.2" + +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" isarray@^2.0.5: version "2.0.5" @@ -3712,6 +4525,31 @@ json-parse-even-better-errors@^2.3.0: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json-stable-stringify@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" + integrity sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg== + dependencies: + call-bind "^1.0.5" + isarray "^2.0.5" + jsonify "^0.0.1" + object-keys "^1.1.1" + json-text-sequence@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/json-text-sequence/-/json-text-sequence-0.3.0.tgz#6603e0ee45da41f949669fd18744b97fb209e6ce" @@ -3724,6 +4562,13 @@ json5@2.x, json5@^2.2.2: 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" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -3740,6 +4585,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jsonify@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== + keyv@^4.0.0: version "4.5.2" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56" @@ -3747,6 +4597,20 @@ keyv@^4.0.0: dependencies: json-buffer "3.0.1" +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -3770,6 +4634,14 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -3812,6 +4684,16 @@ lodash.memoize@4.x: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.truncate@^4.4.2: + version "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" @@ -3853,7 +4735,7 @@ luxon@^3.3.0: resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.3.0.tgz#d73ab5b5d2b49a461c47cedbc7e73309b4805b48" integrity sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg== -make-dir@^3.0.0: +make-dir@^3.0.0, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -3865,28 +4747,6 @@ make-error@1.x, make-error@^1.1.1, make-error@^1.3.6: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -make-fetch-happen@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" - integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== - dependencies: - agentkeepalive "^4.1.3" - cacache "^15.2.0" - http-cache-semantics "^4.1.0" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^6.0.0" - minipass "^3.1.3" - minipass-collect "^1.0.2" - minipass-fetch "^1.3.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.2" - promise-retry "^2.0.1" - socks-proxy-agent "^6.0.0" - ssri "^8.0.0" - makeerror@1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" @@ -3909,7 +4769,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.3.0: +merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -3924,7 +4784,7 @@ methods@^1.1.2, methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^4.0.4: +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== @@ -3969,58 +4829,26 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== -minimatch@^3.0.4, minimatch@^3.1.1: +minimatch@9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -minipass-collect@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" - integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== - dependencies: - minipass "^3.0.0" - -minipass-fetch@^1.3.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.4.1.tgz#d75e0091daac1b0ffd7e9d41629faff7d0c1f1b6" - integrity sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw== - dependencies: - minipass "^3.1.0" - minipass-sized "^1.0.3" - minizlib "^2.0.0" - optionalDependencies: - encoding "^0.1.12" - -minipass-flush@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" - integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - dependencies: - minipass "^3.0.0" - -minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" - integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - dependencies: - minipass "^3.0.0" - -minipass-sized@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" - integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== - dependencies: - minipass "^3.0.0" - -minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: +minipass@^3.0.0: version "3.3.6" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== @@ -4032,7 +4860,7 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -minizlib@^2.0.0, minizlib@^2.1.1: +minizlib@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== @@ -4055,7 +4883,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: +ms@2.1.3, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -4065,17 +4893,12 @@ msrcrypto@^1.5.6: resolved "https://registry.yarnpkg.com/msrcrypto/-/msrcrypto-1.5.8.tgz#be419be4945bf134d8af52e9d43be7fa261f4a1c" integrity sha512-ujZ0TRuozHKKm6eGbKHfXef7f+esIhEckmThVnz7RNyiOJd7a6MXj2JGBoL9cnPDW+JMG16MoTUh5X+XXjI66Q== -nan@^2.11.1: - version "2.17.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" - integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -negotiator@0.6.3, negotiator@^0.6.2: +negotiator@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== @@ -4085,6 +4908,11 @@ neo-async@^2.6.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + ngrok@^4.3.1: version "4.3.3" resolved "https://registry.yarnpkg.com/ngrok/-/ngrok-4.3.3.tgz#c51a1c4af2271ac3c9092ede3b0975caf7833217" @@ -4104,6 +4932,13 @@ node-addon-api@^3.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== +node-cache@5.1.2, node-cache@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-cache/-/node-cache-5.1.2.tgz#f264dc2ccad0a780e76253a694e9fd0ed19c398d" + integrity sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg== + dependencies: + clone "2.x" + node-fetch@3.0.0-beta.9: version "3.0.0-beta.9" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.0.0-beta.9.tgz#0a7554cfb824380dd6812864389923c783c80d9b" @@ -4124,22 +4959,6 @@ node-gyp-build@^4.2.1: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== -node-gyp@^8.0.0: - version "8.4.1" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937" - integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.6" - make-fetch-happen "^9.1.0" - nopt "^5.0.0" - npmlog "^6.0.0" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.2" - which "^2.0.2" - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -4174,14 +4993,14 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -npmlog@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" - integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== +npmlog@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" + integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== dependencies: - are-we-there-yet "^3.0.0" + are-we-there-yet "^2.0.0" console-control-strings "^1.1.0" - gauge "^4.0.3" + gauge "^3.0.0" set-blocking "^2.0.0" nwsapi@^2.2.0: @@ -4189,7 +5008,7 @@ nwsapi@^2.2.0: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.5.tgz#a52744c61b3889dd44b0a158687add39b8d935e2" integrity sha512-6xpotnECFy/og7tKSBVmUNft7J3jyXAka4XvG6AUhFWRz+Q/Ljus7znJAA3bxColfQLdS+XsjoodtJfCgeTEFQ== -object-assign@^4: +object-assign@^4, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -4199,6 +5018,11 @@ object-inspect@^1.10.3, object-inspect@^1.12.3, object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-inspect@^1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -4214,6 +5038,34 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +object.fromentries@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" + integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +object.groupby@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" + integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + +object.values@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" + integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + on-finished@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" @@ -4235,6 +5087,14 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -4247,6 +5107,23 @@ optionator@^0.8.1: type-check "~0.3.2" word-wrap "~1.2.3" +optionator@^0.9.1: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + p-cancelable@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" @@ -4280,18 +5157,18 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + parse-json@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -4312,6 +5189,27 @@ parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== +patch-package@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.0.tgz#d191e2f1b6e06a4624a0116bcb88edd6714ede61" + integrity sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^4.1.2" + ci-info "^3.7.0" + cross-spawn "^7.0.3" + find-yarn-workspace-root "^2.0.0" + fs-extra "^9.0.0" + json-stable-stringify "^1.0.2" + klaw-sync "^6.0.0" + minimist "^1.2.6" + open "^7.4.2" + rimraf "^2.6.3" + semver "^7.5.3" + slash "^2.0.0" + tmp "^0.0.33" + yaml "^2.2.2" + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -4337,6 +5235,11 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" @@ -4364,11 +5267,33 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +postinstall-postinstall@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" + integrity sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ== + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^2.8.8: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + pretty-format@^27.0.0, pretty-format@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" @@ -4378,18 +5303,10 @@ pretty-format@^27.0.0, pretty-format@^27.5.1: ansi-styles "^5.0.0" react-is "^17.0.1" -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== - -promise-retry@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" - integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== - dependencies: - err-code "^2.0.2" - retry "^0.12.0" +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== promise.any@^2.0.2: version "2.0.5" @@ -4420,6 +5337,11 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-from-env@^1.1.0: + version "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" @@ -4433,6 +5355,11 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.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== + punycode@^2.1.1: version "2.3.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" @@ -4542,17 +5469,15 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -"ref-napi@^2.0.1 || ^3.0.2", ref-napi@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ref-napi/-/ref-napi-3.0.3.tgz#e259bfc2bbafb3e169e8cd9ba49037dd00396b22" - integrity sha512-LiMq/XDGcgodTYOMppikEtJelWsKQERbLQsYm0IOOnzhwE9xYZC7x8txNnFC9wJNOkPferQI4vD4ZkC0mDyrOA== +ref-array-di@1.2.2, ref-array-di@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/ref-array-di/-/ref-array-di-1.2.2.tgz#ceee9d667d9c424b5a91bb813457cc916fb1f64d" + integrity sha512-jhCmhqWa7kvCVrWhR/d7RemkppqPUdxEil1CtTtm7FkZV8LcHHCK3Or9GinUiFP5WY3k0djUkMvhBhx49Jb2iA== dependencies: - debug "^4.1.1" - get-symbol-from-current-process-h "^1.0.2" - node-addon-api "^3.0.0" - node-gyp-build "^4.2.1" + array-index "^1.0.0" + debug "^3.1.0" -ref-struct-di@^1.1.0: +ref-struct-di@1.1.1, ref-struct-di@^1.1.0, ref-struct-di@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ref-struct-di/-/ref-struct-di-1.1.1.tgz#5827b1d3b32372058f177547093db1fe1602dc10" integrity sha512-2Xyn/0Qgz89VT+++WP0sTosdm9oeowLP23wRJYhG4BFdMUrLj3jhwHZNEytYNYgtPKLNTP3KJX4HEgBvM1/Y2g== @@ -4573,11 +5498,30 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.2.0" functions-have-names "^1.2.3" +regexp.prototype.flags@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" + integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + set-function-name "^2.0.0" + +regexpp@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== +require-from-string@^2.0.2: + version "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== + require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -4600,11 +5544,21 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve-from@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +resolve-pkg-maps@^1.0.0: + version "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" @@ -4619,6 +5573,15 @@ resolve@^1.0.0, resolve@^1.20.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.22.4: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + responselike@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" @@ -4626,17 +5589,12 @@ responselike@^2.0.0: dependencies: lowercase-keys "^2.0.0" -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^2.6.1: +rimraf@^2.6.1, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -4664,6 +5622,16 @@ rxjs@^7.2.0: dependencies: tslib "^2.1.0" +safe-array-concat@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.0.tgz#8d0cae9cb806d6d1c06e08ab13d847293ebe0692" + integrity sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg== + dependencies: + call-bind "^1.0.5" + get-intrinsic "^1.2.2" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-buffer@5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -4678,7 +5646,7 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": +"safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -4702,6 +5670,18 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +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.5.3, semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -4743,6 +5723,26 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.0.tgz#2f81dc6c16c7059bda5ab7c82c11f03a515ed8e1" + integrity sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w== + dependencies: + define-data-property "^1.1.1" + function-bind "^1.1.2" + get-intrinsic "^1.2.2" + gopd "^1.0.1" + has-property-descriptors "^1.0.1" + +set-function-name@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" + integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== + dependencies: + define-data-property "^1.0.1" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.0" + setprototypeof@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" @@ -4769,7 +5769,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: 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== @@ -4779,32 +5779,24 @@ sisteransi@^1.0.5: resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -smart-buffer@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" - integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== - -socks-proxy-agent@^6.0.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz#2687a31f9d7185e38d530bef1944fe1f1496d6ce" - integrity sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ== - dependencies: - agent-base "^6.0.2" - debug "^4.3.3" - socks "^2.6.2" - -socks@^2.6.2: - version "2.7.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" - integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== dependencies: - ip "^2.0.0" - smart-buffer "^4.2.0" + ansi-styles "^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: version "0.5.21" @@ -4834,13 +5826,6 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -ssri@^8.0.0, ssri@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" - integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== - dependencies: - minipass "^3.1.1" - stack-utils@^2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" @@ -4896,6 +5881,15 @@ string.prototype.trim@^1.2.7: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + string.prototype.trimend@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" @@ -4905,6 +5899,15 @@ string.prototype.trimend@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + string.prototype.trimstart@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" @@ -4914,6 +5917,15 @@ string.prototype.trimstart@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -4948,7 +5960,7 @@ strip-json-comments@^2.0.0: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -strip-json-comments@^3.1.1: +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -5028,10 +6040,26 @@ symbol-tree@^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== -tar@^6.0.2, tar@^6.1.2: - version "6.1.15" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.15.tgz#c9738b0b98845a3b344d334b8fa3041aaba53a69" - integrity sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A== +table@^6.0.9: + version "6.8.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" + integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +tar@^6.1.11: + version "6.2.0" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.0.tgz#b14ce49a79cb1cd23bc9b016302dea5474493f73" + integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ== dependencies: chownr "^2.0.0" fs-minipass "^2.0.0" @@ -5057,11 +6085,23 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" +text-table@^0.2.0: + version "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" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -5111,6 +6151,11 @@ tree-kill@^1.2.2: resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== +ts-api-utils@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" + integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== + ts-jest@^27.0.7: version "27.1.5" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.5.tgz#0ddf1b163fbaae3d5b7504a1e65c914a95cff297" @@ -5160,6 +6205,16 @@ ts-node@^10.4.0: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +tsconfig-paths@^3.15.0: + version "3.15.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" + integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tsconfig@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-7.0.0.tgz#84538875a4dc216e5c4a5432b3a4dec3d54e91b7" @@ -5202,6 +6257,20 @@ tsyringe@^4.7.0: dependencies: tslib "^1.9.3" +tsyringe@^4.8.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/tsyringe/-/tsyringe-4.8.0.tgz#d599651b36793ba872870fee4f845bd484a5cac1" + integrity sha512-YB1FG+axdxADa3ncEtRnQCFq/M0lALGLxSZeVNbTU8NqhOVc51nnv2CISTcvc1kyv6EGPtXVr0v6lWeDxiijOA== + dependencies: + tslib "^1.9.3" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -5232,6 +6301,46 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + +typed-array-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" + integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-typed-array "^1.1.10" + +typed-array-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" + integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" + integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" @@ -5273,20 +6382,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -5315,6 +6410,13 @@ update-browserslist-db@^1.0.11: escalade "^3.1.1" picocolors "^1.0.0" +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + url-parse@^1.5.3: version "1.5.10" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" @@ -5348,6 +6450,11 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== +v8-compile-cache@^2.0.3: + version "2.4.0" + 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" @@ -5477,6 +6584,17 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== +which-typed-array@^1.1.11, which-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36" + integrity sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.4" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + which-typed-array@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" @@ -5489,14 +6607,14 @@ which-typed-array@^1.1.9: has-tostringtag "^1.0.0" is-typed-array "^1.1.10" -which@^2.0.1, which@^2.0.2: +which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" -wide-align@^1.1.5: +wide-align@^1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== @@ -5596,6 +6714,11 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yaml@^2.2.2: + version "2.3.4" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.4.tgz#53fc1d514be80aabf386dc6001eb29bf3b7523b2" + integrity sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA== + yamljs@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.3.0.tgz#dc060bf267447b39f7304e9b2bfbe8b5a7ddb03b"