diff --git a/.github/workflows/add-documentation-to-repo.yaml b/.github/workflows/add-documentation-to-repo.yaml index b8bf7df981..08aa3c1dbf 100644 --- a/.github/workflows/add-documentation-to-repo.yaml +++ b/.github/workflows/add-documentation-to-repo.yaml @@ -17,7 +17,7 @@ jobs: mongodb-version: [ 7.0.5 ] steps: - name: Harden Runner - uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/api-after-commit.yml b/.github/workflows/api-after-commit.yml index 75aac56e93..57e4690055 100644 --- a/.github/workflows/api-after-commit.yml +++ b/.github/workflows/api-after-commit.yml @@ -19,7 +19,7 @@ jobs: mongodb-version: [ 7.0.5 ] steps: - name: Harden Runner - uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/api-manual.yml b/.github/workflows/api-manual.yml index 7da40bd265..c7ec3840c1 100644 --- a/.github/workflows/api-manual.yml +++ b/.github/workflows/api-manual.yml @@ -23,7 +23,7 @@ jobs: mongodb-version: [ 7.0.5 ] steps: - name: Harden Runner - uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b7dcbf66fc..2226232879 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: node-version: [ 20.18.1 ] steps: - name: Harden Runner - uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 with: egress-policy: audit diff --git a/.gitignore b/.gitignore index 568ca7bf89..0a3354c945 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,5 @@ runtime-data/ .idea logs/ -**/logs/ \ No newline at end of file +**/logs/ +/.run/ diff --git a/Methodology Library/American Carbon Registry/ACR Landfill/ACM0007 Schema Design with Sample Data.xlsx b/Methodology Library/American Carbon Registry/ACR Landfill/ACM0007 Schema Design with Sample Data.xlsx new file mode 100644 index 0000000000..6e4fbf955d Binary files /dev/null and b/Methodology Library/American Carbon Registry/ACR Landfill/ACM0007 Schema Design with Sample Data.xlsx differ diff --git a/ai-service/package.json b/ai-service/package.json index 4feaeed532..219d99ff10 100644 --- a/ai-service/package.json +++ b/ai-service/package.json @@ -1,17 +1,17 @@ { "name": "ai-service", - "version": "3.0.0", + "version": "3.1.0-rc", "main": "dist/app.js", "license": "Apache-2.0", "dependencies": { - "@guardian/common": "^3.0.0", - "@guardian/interfaces": "^3.0.0", + "@guardian/common": "^3.1.0-rc", + "@guardian/interfaces": "^3.1.0-rc", "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", "@types/express": "^4.17.18", - "@types/node": "^20.8.0", + "@types/node": "^22.10.10", "dotenv": "^16.3.1", "module-alias": "^2.2.2", "express": "^4.18.2", diff --git a/analytics-service/package.json b/analytics-service/package.json index f528053a8d..d41da9f046 100644 --- a/analytics-service/package.json +++ b/analytics-service/package.json @@ -13,8 +13,8 @@ }, "author": "Envision Blockchain Solutions ", "dependencies": { - "@guardian/common": "^3.0.0", - "@guardian/interfaces": "^3.0.0", + "@guardian/common": "^3.1.0-rc", + "@guardian/interfaces": "^3.1.0-rc", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", "@nestjs/jwt": "^10.0.3", @@ -52,7 +52,7 @@ "@types/gulp": "^4", "@types/gulp-rename": "^2", "@types/jszip": "^3.4.1", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "@types/ws": "^8.2.2", "chai": "^4.3.4", "cross-env": "^7.0.3", @@ -82,5 +82,5 @@ "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/api-gateway/package.json b/api-gateway/package.json index e7f3c5c924..4c062271db 100644 --- a/api-gateway/package.json +++ b/api-gateway/package.json @@ -2,10 +2,10 @@ "author": "Envision Blockchain Solutions ", "dependencies": { "@fastify/formbody": "^7.4.0", - "@fastify/multipart": "^8.2.0", + "@fastify/multipart": "^8.3.1", "@fastify/static": "^7.0.0", - "@guardian/common": "^3.0.0", - "@guardian/interfaces": "^3.0.0", + "@guardian/common": "^3.1.0-rc", + "@guardian/interfaces": "^3.1.0-rc", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", "@nestjs/jwt": "^10.0.3", @@ -46,7 +46,7 @@ "@types/gulp": "^4", "@types/gulp-rename": "^2", "@types/jszip": "^3.4.1", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "@types/ws": "^8.2.2", "chai": "^4.3.4", "cross-env": "^7.0.3", @@ -88,5 +88,5 @@ "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/api-gateway/src/api/service/formulas.ts b/api-gateway/src/api/service/formulas.ts new file mode 100644 index 0000000000..f3d1923905 --- /dev/null +++ b/api-gateway/src/api/service/formulas.ts @@ -0,0 +1,505 @@ +import { IAuthUser, PinoLogger } from '@guardian/common'; +import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Query, Response } from '@nestjs/common'; +import { Permissions, UserPermissions } from '@guardian/interfaces'; +import { ApiBody, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags, ApiQuery, ApiExtraModels, ApiParam } from '@nestjs/swagger'; +import { Examples, InternalServerErrorDTO, FormulaDTO, FormulaRelationshipsDTO, pageHeader, FormulasOptionsDTO, FormulasDataDTO } from '#middlewares'; +import { Guardians, InternalException, EntityOwner } from '#helpers'; +import { AuthUser, Auth } from '#auth'; + +@Controller('formulas') +@ApiTags('formulas') +export class FormulasApi { + constructor(private readonly logger: PinoLogger) { } + + /** + * Creates a new formula + */ + @Post('/') + @Auth(Permissions.FORMULAS_FORMULA_CREATE) + @ApiOperation({ + summary: 'Creates a new formula.', + description: 'Creates a new formula.', + }) + @ApiBody({ + description: 'Configuration.', + type: FormulaDTO, + required: true + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: FormulaDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(FormulaDTO, InternalServerErrorDTO) + @HttpCode(HttpStatus.CREATED) + async createFormula( + @AuthUser() user: IAuthUser, + @Body() formula: FormulaDTO + ): Promise { + try { + if (!formula) { + throw new HttpException('Invalid config.', HttpStatus.UNPROCESSABLE_ENTITY); + } + const owner = new EntityOwner(user); + const guardian = new Guardians(); + return await guardian.createFormula(formula, owner); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Get page + */ + @Get('/') + @Auth(Permissions.FORMULAS_FORMULA_READ) + @ApiOperation({ + summary: 'Return a list of all formulas.', + description: 'Returns all formulas.', + }) + @ApiQuery({ + name: 'pageIndex', + type: Number, + description: 'The number of pages to skip before starting to collect the result set', + required: false, + example: 0 + }) + @ApiQuery({ + name: 'pageSize', + type: Number, + description: 'The numbers of items to return', + required: false, + example: 20 + }) + @ApiQuery({ + name: 'policyId', + type: String, + description: 'Policy Id', + required: false, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Successful operation.', + isArray: true, + headers: pageHeader, + type: FormulaDTO + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(FormulaDTO, InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async getFormulas( + @AuthUser() user: IAuthUser, + @Response() res: any, + @Query('pageIndex') pageIndex?: number, + @Query('pageSize') pageSize?: number, + @Query('policyId') policyId?: string + ): Promise { + try { + const owner = new EntityOwner(user); + const guardians = new Guardians(); + const { items, count } = await guardians.getFormulas({ + policyId, + pageIndex, + pageSize + }, owner); + return res.header('X-Total-Count', count).send(items); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Get formula by id + */ + @Get('/:formulaId') + @Auth(Permissions.FORMULAS_FORMULA_READ) + @ApiOperation({ + summary: 'Retrieves formula.', + description: 'Retrieves formula for the specified ID.' + }) + @ApiParam({ + name: 'formulaId', + type: String, + description: 'Formula Identifier', + required: true, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: FormulaDTO + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(FormulaDTO, InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async getFormulaById( + @AuthUser() user: IAuthUser, + @Param('formulaId') formulaId: string + ): Promise { + try { + if (!formulaId) { + throw new HttpException('Invalid ID.', HttpStatus.UNPROCESSABLE_ENTITY); + } + const owner = new EntityOwner(user); + const guardian = new Guardians(); + return await guardian.getFormulaById(formulaId, owner); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Update formula + */ + @Put('/:formulaId') + @Auth(Permissions.FORMULAS_FORMULA_CREATE) + @ApiOperation({ + summary: 'Updates formula.', + description: 'Updates formula configuration for the specified formula ID.', + }) + @ApiParam({ + name: 'formulaId', + type: 'string', + required: true, + description: 'Formula Identifier', + example: Examples.DB_ID, + }) + @ApiBody({ + description: 'Object that contains a configuration.', + required: true, + type: FormulaDTO + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: FormulaDTO + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO + }) + @ApiExtraModels(FormulaDTO, InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async updateFormula( + @AuthUser() user: IAuthUser, + @Param('formulaId') formulaId: string, + @Body() item: FormulaDTO + ): Promise { + try { + if (!formulaId) { + throw new HttpException('Invalid ID.', HttpStatus.UNPROCESSABLE_ENTITY); + } + const owner = new EntityOwner(user); + const guardians = new Guardians(); + const oldItem = await guardians.getFormulaById(formulaId, owner); + if (!oldItem) { + throw new HttpException('Item not found.', HttpStatus.NOT_FOUND); + } + return await guardians.updateFormula(formulaId, item, owner); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Delete formula + */ + @Delete('/:formulaId') + @Auth(Permissions.FORMULAS_FORMULA_CREATE) + @ApiOperation({ + summary: 'Deletes the formula.', + description: 'Deletes the formula with the provided ID.', + }) + @ApiParam({ + name: 'formulaId', + type: 'string', + required: true, + description: 'Formula Identifier', + example: Examples.DB_ID, + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: Boolean + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO + }) + @ApiExtraModels(InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async deleteFormula( + @AuthUser() user: IAuthUser, + @Param('formulaId') formulaId: string + ): Promise { + try { + if (!formulaId) { + throw new HttpException('Invalid ID.', HttpStatus.UNPROCESSABLE_ENTITY) + } + const owner = new EntityOwner(user); + const guardians = new Guardians(); + return await guardians.deleteFormula(formulaId, owner); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Get relationships by id + */ + @Get('/:formulaId/relationships') + @Auth(Permissions.FORMULAS_FORMULA_CREATE) + @ApiOperation({ + summary: 'Retrieves Formula relationships.', + description: 'Retrieves Formula relationships for the specified ID.' + }) + @ApiParam({ + name: 'formulaId', + type: String, + description: 'Formula Identifier', + required: true, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: FormulaRelationshipsDTO + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(FormulaRelationshipsDTO, InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async getSchemaRuleRelationships( + @AuthUser() user: IAuthUser, + @Param('formulaId') formulaId: string + ): Promise { + try { + if (!formulaId) { + throw new HttpException('Invalid ID.', HttpStatus.UNPROCESSABLE_ENTITY); + } + const owner = new EntityOwner(user); + const guardian = new Guardians(); + return await guardian.getFormulaRelationships(formulaId, owner); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Import formula + */ + @Post('/:policyId/import/file') + @Auth(Permissions.FORMULAS_FORMULA_CREATE) + @ApiOperation({ + summary: 'Imports new formula from a zip file.', + description: 'Imports new formula from the provided zip file into the local DB.', + }) + @ApiParam({ + name: 'policyId', + type: String, + description: 'Policy Id', + required: true, + example: Examples.DB_ID + }) + @ApiBody({ + description: 'A zip file containing formula to be imported.', + required: true + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: FormulaDTO + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO + }) + @ApiExtraModels(FormulaDTO, InternalServerErrorDTO) + @HttpCode(HttpStatus.CREATED) + async importFormula( + @AuthUser() user: IAuthUser, + @Param('policyId') policyId: string, + @Body() zip: any + ): Promise { + const guardian = new Guardians(); + try { + const owner = new EntityOwner(user); + return await guardian.importFormula(zip, policyId, owner); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Export formula + */ + @Get('/:formulaId/export/file') + @Auth(Permissions.FORMULAS_FORMULA_READ) + @ApiOperation({ + summary: 'Returns a zip file containing formula.', + description: 'Returns a zip file containing formula.', + }) + @ApiParam({ + name: 'formulaId', + type: String, + description: 'Formula Identifier', + required: true, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Successful operation. Response zip file.' + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO + }) + @ApiExtraModels(InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async exportFormula( + @AuthUser() user: IAuthUser, + @Param('formulaId') formulaId: string, + @Response() res: any + ): Promise { + const guardian = new Guardians(); + try { + const owner = new EntityOwner(user); + const file: any = await guardian.exportFormula(formulaId, owner); + res.header('Content-disposition', `attachment; filename=theme_${Date.now()}`); + res.header('Content-type', 'application/zip'); + return res.send(file); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Preview formula + */ + @Post('/import/file/preview') + @Auth(Permissions.FORMULAS_FORMULA_CREATE) + @ApiOperation({ + summary: 'Imports a zip file containing formula.', + description: 'Imports a zip file containing formula.', + }) + @ApiBody({ + description: 'File.', + }) + @ApiOkResponse({ + description: 'Formula preview.', + type: FormulaDTO + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(FormulaDTO, InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async previewFormula( + @AuthUser() user: IAuthUser, + @Body() body: any + ): Promise { + try { + const owner = new EntityOwner(user); + const guardian = new Guardians(); + return await guardian.previewFormula(body, owner); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Publish formula + */ + @Put('/:formulaId/publish') + @Auth(Permissions.FORMULAS_FORMULA_CREATE) + @ApiOperation({ + summary: 'Publishes formula.', + description: 'Publishes formula for the specified formula ID.', + }) + @ApiParam({ + name: 'formulaId', + type: String, + description: 'Formula Identifier', + required: true, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: FormulaDTO + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO + }) + @ApiExtraModels(FormulaDTO, InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async publishPolicyLabel( + @AuthUser() user: IAuthUser, + @Param('formulaId') formulaId: string + ): Promise { + try { + if (!formulaId) { + throw new HttpException('Invalid ID.', HttpStatus.UNPROCESSABLE_ENTITY); + } + const owner = new EntityOwner(user); + const guardians = new Guardians(); + const oldItem = await guardians.getFormulaById(formulaId, owner); + if (!oldItem) { + throw new HttpException('Item not found.', HttpStatus.NOT_FOUND); + } + return await guardians.publishFormula(formulaId, owner); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Get formulas and data + */ + @Post('/data') + @Auth() + @ApiOperation({ + summary: '', + description: '', + }) + @ApiBody({ + description: 'Options.', + type: FormulasOptionsDTO, + required: true + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: FormulasDataDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(FormulasDataDTO, InternalServerErrorDTO) + @HttpCode(HttpStatus.CREATED) + async getSchemaRuleData( + @AuthUser() user: IAuthUser, + @Body() options: FormulasOptionsDTO + ): Promise { + try { + if (!options) { + throw new HttpException('Invalid config.', HttpStatus.UNPROCESSABLE_ENTITY); + } + if (!UserPermissions.has(user, [Permissions.POLICIES_POLICY_EXECUTE, Permissions.POLICIES_POLICY_MANAGE])) { + return null; + } else { + const owner = new EntityOwner(user); + const guardian = new Guardians(); + return await guardian.getFormulasData(options, owner); + } + } catch (error) { + await InternalException(error, this.logger); + } + } +} diff --git a/api-gateway/src/api/service/policy.ts b/api-gateway/src/api/service/policy.ts index 0861022f15..7e1af8d575 100644 --- a/api-gateway/src/api/service/policy.ts +++ b/api-gateway/src/api/service/policy.ts @@ -2826,8 +2826,8 @@ export class PolicyApi { // UserRole.STANDARD_REGISTRY, ) @ApiOperation({ - summary: 'Create dru-run savepoint.', - description: 'Create dru-run savepoint.' + ONLY_SR + summary: 'Create dry-run savepoint.', + description: 'Create dry-run savepoint.' + ONLY_SR }) @ApiParam({ name: 'policyId', @@ -2882,8 +2882,8 @@ export class PolicyApi { // UserRole.STANDARD_REGISTRY, ) @ApiOperation({ - summary: 'Delete dru-run savepoint.', - description: 'Delete dru-run savepoint.' + ONLY_SR + summary: 'Delete dry-run savepoint.', + description: 'Delete dry-run savepoint.' + ONLY_SR }) @ApiParam({ name: 'policyId', @@ -2929,6 +2929,59 @@ export class PolicyApi { } } + /** + * Get savepoint state. + */ + @Get('/:policyId/savepoint/restore') + @Auth( + Permissions.POLICIES_POLICY_UPDATE + // UserRole.STANDARD_REGISTRY, + ) + @ApiOperation({ + summary: 'Get savepoint state.', + description: 'Get savepoint state.' + ONLY_SR + }) + @ApiParam({ + name: 'policyId', + type: String, + description: 'Policy Id', + required: true, + example: Examples.DB_ID + }) + @ApiBody({ + description: '.' + }) + @ApiOkResponse({ + description: '.' + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO + }) + @ApiExtraModels(InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async getSavepointState( + @AuthUser() user: IAuthUser, + @Param('policyId') policyId: string, + @Req() req + ) { + const engineService = new PolicyEngine(); + const owner = new EntityOwner(user); + const policy = await engineService.accessPolicy(policyId, owner, 'read'); + if (!PolicyHelper.isDryRunMode(policy)) { + throw new HttpException('Invalid status.', HttpStatus.FORBIDDEN); + } + + const invalidedCacheTags = [`${PREFIXES.POLICIES}${policyId}/navigation`, `${PREFIXES.POLICIES}${policyId}/groups`]; + await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], user)); + + try { + return await engineService.getSavepointState(owner, policyId); + } catch (error) { + await InternalException(error, this.logger); + } + } + /** * Clear dry-run state. */ @@ -2938,8 +2991,8 @@ export class PolicyApi { // UserRole.STANDARD_REGISTRY, ) @ApiOperation({ - summary: 'Restore dru-run savepoint.', - description: 'Restore dru-run savepoint.' + ONLY_SR + summary: 'Restore dry-run savepoint.', + description: 'Restore dry-run savepoint.' + ONLY_SR }) @ApiParam({ name: 'policyId', diff --git a/api-gateway/src/api/service/schema-rules.ts b/api-gateway/src/api/service/schema-rules.ts index f43f25a05a..c166fd243c 100644 --- a/api-gateway/src/api/service/schema-rules.ts +++ b/api-gateway/src/api/service/schema-rules.ts @@ -2,7 +2,7 @@ import { IAuthUser, PinoLogger } from '@guardian/common'; import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Query, Response } from '@nestjs/common'; import { Permissions, UserPermissions } from '@guardian/interfaces'; import { ApiBody, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags, ApiQuery, ApiExtraModels, ApiParam } from '@nestjs/swagger'; -import { Examples, InternalServerErrorDTO, SchemaRuleDTO, SchemaRuleDataDTO, SchemaRuleRelationshipsDTO, pageHeader } from '#middlewares'; +import { Examples, InternalServerErrorDTO, SchemaRuleDTO, SchemaRuleDataDTO, SchemaRuleOptionsDTO, SchemaRuleRelationshipsDTO, pageHeader } from '#middlewares'; import { Guardians, InternalException, EntityOwner } from '#helpers'; import { AuthUser, Auth } from '#auth'; @@ -390,24 +390,25 @@ export class SchemaRulesApi { description: '', }) @ApiBody({ - description: 'Configuration.', - type: SchemaRuleDataDTO, + description: 'Options.', + type: SchemaRuleOptionsDTO, required: true }) @ApiOkResponse({ description: 'Successful operation.', type: SchemaRuleDataDTO, + isArray: true }) @ApiInternalServerErrorResponse({ description: 'Internal server error.', type: InternalServerErrorDTO, }) - @ApiExtraModels(SchemaRuleDataDTO, InternalServerErrorDTO) + @ApiExtraModels(SchemaRuleOptionsDTO, SchemaRuleDataDTO, InternalServerErrorDTO) @HttpCode(HttpStatus.CREATED) async getSchemaRuleData( @AuthUser() user: IAuthUser, - @Body() options: any - ): Promise { + @Body() options: SchemaRuleOptionsDTO + ): Promise { try { if (!options) { throw new HttpException('Invalid config.', HttpStatus.UNPROCESSABLE_ENTITY); diff --git a/api-gateway/src/app.module.ts b/api-gateway/src/app.module.ts index 163d17416c..6c4a35d5b7 100644 --- a/api-gateway/src/app.module.ts +++ b/api-gateway/src/app.module.ts @@ -44,6 +44,7 @@ import { PolicyStatisticsApi } from './api/service/policy-statistics.js'; import { SchemaRulesApi } from './api/service/schema-rules.js'; import { loggerMongoProvider, pinoLoggerProvider } from './helpers/providers/index.js'; import { PolicyLabelsApi } from './api/service/policy-labels.js'; +import { FormulasApi } from './api/service/formulas.js'; // const JSON_REQUEST_LIMIT = process.env.JSON_REQUEST_LIMIT || '1mb'; // const RAW_REQUEST_LIMIT = process.env.RAW_REQUEST_LIMIT || '1gb'; @@ -97,6 +98,7 @@ import { PolicyLabelsApi } from './api/service/policy-labels.js'; PermissionsApi, PolicyStatisticsApi, SchemaRulesApi, + FormulasApi, PolicyLabelsApi, WorkerTasksController ], diff --git a/api-gateway/src/helpers/guardians.ts b/api-gateway/src/helpers/guardians.ts index 7eba0430bb..6da3f5e027 100644 --- a/api-gateway/src/helpers/guardians.ts +++ b/api-gateway/src/helpers/guardians.ts @@ -18,7 +18,6 @@ import { IToken, ITokenInfo, IUser, - IVC, IVCDocument, IVPDocument, MessageAPI, @@ -49,7 +48,12 @@ import { PolicyLabelRelationshipsDTO, PolicyLabelDocumentRelationshipsDTO, PolicyLabelComponentsDTO, - PolicyLabelFiltersDTO + PolicyLabelFiltersDTO, + FormulaDTO, + SchemaRuleOptionsDTO, + FormulasOptionsDTO, + FormulasDataDTO, + FormulaRelationshipsDTO } from '#middlewares'; /** @@ -2953,7 +2957,7 @@ export class Guardians extends NatsService { * @param definition * @param owner * - * @returns theme + * @returns statistic */ public async updateStatisticDefinition( definitionId: string, @@ -2981,7 +2985,7 @@ export class Guardians extends NatsService { * @param definitionId * @param owner * - * @returns Operation Success + * @returns statistic */ public async publishStatisticDefinition(definitionId: string, owner: IOwner): Promise { return await this.sendMessage(MessageAPI.PUBLISH_STATISTIC_DEFINITION, { definitionId, owner }); @@ -3028,7 +3032,7 @@ export class Guardians extends NatsService { * @param assessmentId * @param owner * - * @returns Operation Success + * @returns assessment */ public async getStatisticAssessment( definitionId: string, @@ -3045,7 +3049,7 @@ export class Guardians extends NatsService { * @param assessmentId * @param owner * - * @returns Operation Success + * @returns relationships */ public async getStatisticAssessmentRelationships( definitionId: string, @@ -3111,7 +3115,7 @@ export class Guardians extends NatsService { * * @param ruleId * @param owner - * @returns Operation Success + * @returns schema rule */ public async getSchemaRuleById(ruleId: string, owner: IOwner): Promise { return await this.sendMessage(MessageAPI.GET_SCHEMA_RULE, { ruleId, owner }); @@ -3136,7 +3140,7 @@ export class Guardians extends NatsService { * @param definition * @param owner * - * @returns theme + * @returns schema rule */ public async updateSchemaRule( ruleId: string, @@ -3164,7 +3168,7 @@ export class Guardians extends NatsService { * @param ruleId * @param owner * - * @returns Operation Success + * @returns schema rule */ public async activateSchemaRule(ruleId: string, owner: IOwner): Promise { return await this.sendMessage(MessageAPI.ACTIVATE_SCHEMA_RULE, { ruleId, owner }); @@ -3176,7 +3180,7 @@ export class Guardians extends NatsService { * @param ruleId * @param owner * - * @returns Operation Success + * @returns schema rule */ public async inactivateSchemaRule(ruleId: string, owner: IOwner): Promise { return await this.sendMessage(MessageAPI.INACTIVATE_SCHEMA_RULE, { ruleId, owner }); @@ -3188,9 +3192,9 @@ export class Guardians extends NatsService { * @param options * @param owner * - * @returns Operation Success + * @returns Schema Rule Data */ - public async getSchemaRuleData(options: any, owner: IOwner): Promise { + public async getSchemaRuleData(options: SchemaRuleOptionsDTO, owner: IOwner): Promise { return await this.sendMessage(MessageAPI.GET_SCHEMA_RULE_DATA, { options, owner }); } @@ -3222,7 +3226,6 @@ export class Guardians extends NatsService { return await this.sendMessage(MessageAPI.PREVIEW_SCHEMA_RULE_FILE, { zip, owner }); } - /** * Get Indexer availability */ @@ -3258,7 +3261,7 @@ export class Guardians extends NatsService { * * @param definitionId * @param owner - * @returns Operation Success + * @returns policy label */ public async getPolicyLabelById(definitionId: string, owner: IOwner): Promise { return await this.sendMessage(MessageAPI.GET_POLICY_LABEL, { definitionId, owner }); @@ -3283,7 +3286,7 @@ export class Guardians extends NatsService { * @param label * @param owner * - * @returns theme + * @returns policy label */ public async updatePolicyLabel( definitionId: string, @@ -3311,7 +3314,7 @@ export class Guardians extends NatsService { * @param definitionId * @param owner * - * @returns Operation Success + * @returns policy label */ public async publishPolicyLabel(definitionId: string, owner: IOwner): Promise { return await this.sendMessage(MessageAPI.PUBLISH_POLICY_LABEL, { definitionId, owner }); @@ -3450,7 +3453,7 @@ export class Guardians extends NatsService { * @param documentId * @param owner * - * @returns Operation Success + * @returns policy label document */ public async getLabelDocument( definitionId: string, @@ -3469,7 +3472,7 @@ export class Guardians extends NatsService { * @param documentId * @param owner * - * @returns Operation Success + * @returns relationships */ public async getLabelDocumentRelationships( definitionId: string, @@ -3480,4 +3483,132 @@ export class Guardians extends NatsService { { definitionId, documentId, owner } ); } + + /** + * Create formula + * + * @param formula + * @param owner + * + * @returns formula + */ + public async createFormula(formula: FormulaDTO, owner: IOwner): Promise { + return await this.sendMessage(MessageAPI.CREATE_FORMULA, { formula, owner }); + } + + /** + * Return formulas + * + * @param filters + * @param owner + * + * @returns {ResponseAndCount} + */ + public async getFormulas(filters: IFilter, owner: IOwner): Promise> { + return await this.sendMessage(MessageAPI.GET_FORMULAS, { filters, owner }); + } + + /** + * Get formula + * + * @param formulaId + * @param owner + * @returns formula + */ + public async getFormulaById(formulaId: string, owner: IOwner): Promise { + return await this.sendMessage(MessageAPI.GET_FORMULA, { formulaId, owner }); + } + + /** + * Update formula + * + * @param formulaId + * @param definition + * @param owner + * + * @returns formula + */ + public async updateFormula( + formulaId: string, + formula: FormulaDTO, + owner: IOwner + ): Promise { + return await this.sendMessage(MessageAPI.UPDATE_FORMULA, { formulaId, formula, owner }); + } + + /** + * Delete formula + * + * @param formulaId + * @param owner + * + * @returns Operation Success + */ + public async deleteFormula(formulaId: string, owner: IOwner): Promise { + return await this.sendMessage(MessageAPI.DELETE_FORMULA, { formulaId, owner }); + } + + /** + * Load formula file for import + * @param zip + * @param owner + */ + public async importFormula(zip: any, policyId: string, owner: IOwner): Promise { + return await this.sendMessage(MessageAPI.IMPORT_FORMULA_FILE, { zip, policyId, owner }); + } + + /** + * Get formula export file + * @param formulaId + * @param owner + */ + public async exportFormula(formulaId: string, owner: IOwner) { + const file = await this.sendMessage(MessageAPI.EXPORT_FORMULA_FILE, { formulaId, owner }) as any; + return Buffer.from(file, 'base64'); + } + + /** + * Get formula info from file + * @param zip + * @param owner + */ + public async previewFormula(zip: any, owner: IOwner) { + return await this.sendMessage(MessageAPI.PREVIEW_FORMULA_FILE, { zip, owner }); + } + + /** + * Get formula relationships + * + * @param formulaId + * @param owner + * + * @returns Operation Success + */ + public async getFormulaRelationships(formulaId: string, owner: IOwner): Promise { + return await this.sendMessage(MessageAPI.GET_FORMULA_RELATIONSHIPS, { formulaId, owner }); + } + + /** + * Get Formulas Data + * + * @param options + * @param owner + * + * @returns Formulas Data + */ + public async getFormulasData(options: FormulasOptionsDTO, owner: IOwner): Promise { + return await this.sendMessage(MessageAPI.GET_FORMULAS_DATA, { options, owner }); + } + + /** + * Publish Formula + * + * @param formulaId + * @param owner + * + * @returns statistic + */ + public async publishFormula(formulaId: string, owner: IOwner): Promise { + return await this.sendMessage(MessageAPI.PUBLISH_FORMULA, { formulaId, owner }); + } } diff --git a/api-gateway/src/helpers/policy-engine.ts b/api-gateway/src/helpers/policy-engine.ts index 5c2ed1c0ce..16170e4a7b 100644 --- a/api-gateway/src/helpers/policy-engine.ts +++ b/api-gateway/src/helpers/policy-engine.ts @@ -663,6 +663,18 @@ export class PolicyEngine extends NatsService { return await this.sendMessage(PolicyEngineEvents.RESTORE_SAVEPOINT, {model, owner, policyId}); } + /** + * Get savepoint state + * @param owner + * @param policyId + */ + public async getSavepointState( + owner: IOwner, + policyId: string + ) { + return await this.sendMessage(PolicyEngineEvents.GET_SAVEPOINT, {owner, policyId}); + } + /** * Get Virtual Documents * @param policyId diff --git a/api-gateway/src/middlewares/validation/schemas/formulas.dto.ts b/api-gateway/src/middlewares/validation/schemas/formulas.dto.ts new file mode 100644 index 0000000000..20f80a665b --- /dev/null +++ b/api-gateway/src/middlewares/validation/schemas/formulas.dto.ts @@ -0,0 +1,220 @@ +import { ApiExtraModels, ApiProperty } from '@nestjs/swagger'; +import { Examples } from '../examples.js'; +import { IsArray, IsObject, IsOptional, IsString } from 'class-validator'; +import { EntityStatus } from '@guardian/interfaces'; +import { VcDocumentDTO } from './document.dto.js'; +import { SchemaDTO } from './schemas.dto.js'; +import { PolicyDTO } from './policies.dto.js'; + +export class FormulaDTO { + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DB_ID + }) + id?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.UUID + }) + @IsOptional() + @IsString() + uuid?: string; + + @ApiProperty({ + type: 'string', + required: true, + example: 'Tool name' + }) + @IsString() + name: string; + + @ApiProperty({ + type: 'string', + required: false, + example: 'Description' + }) + @IsOptional() + @IsString() + description?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DID + }) + @IsOptional() + @IsString() + creator?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DID + }) + @IsOptional() + @IsString() + owner?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.MESSAGE_ID + }) + @IsOptional() + @IsString() + messageId?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + policyId?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.ACCOUNT_ID + }) + @IsOptional() + @IsString() + policyTopicId?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.ACCOUNT_ID + }) + @IsOptional() + @IsString() + policyInstanceTopicId?: string; + + @ApiProperty({ + type: 'string', + required: false, + enum: EntityStatus, + example: EntityStatus.DRAFT + }) + @IsOptional() + @IsString() + status?: EntityStatus; + + @ApiProperty({ + type: 'object', + nullable: true, + required: false + }) + @IsOptional() + @IsObject() + config?: any; +} + +@ApiExtraModels(PolicyDTO, SchemaDTO, FormulaDTO) +export class FormulaRelationshipsDTO { + @ApiProperty({ + type: () => PolicyDTO, + required: false, + }) + @IsOptional() + @IsObject() + policy?: PolicyDTO; + + @ApiProperty({ + type: () => SchemaDTO, + required: false, + isArray: true, + }) + @IsOptional() + @IsArray() + schemas?: SchemaDTO[]; + + @ApiProperty({ + type: () => FormulaDTO, + required: false, + isArray: true, + }) + @IsOptional() + @IsObject() + formulas?: FormulaDTO[]; +} + +export class FormulasOptionsDTO { + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + policyId?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + schemaId?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + documentId?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + parentId?: string; +} + +@ApiExtraModels(FormulaDTO, SchemaDTO, VcDocumentDTO) +export class FormulasDataDTO { + @ApiProperty({ + type: () => FormulaDTO, + required: false, + isArray: true + }) + @IsOptional() + @IsArray() + formulas?: FormulaDTO[]; + + @ApiProperty({ + type: () => VcDocumentDTO, + required: false, + }) + @IsOptional() + @IsObject() + document?: VcDocumentDTO; + + @ApiProperty({ + type: () => VcDocumentDTO, + required: false, + isArray: true, + }) + @IsOptional() + @IsArray() + relationships?: VcDocumentDTO[]; + + @ApiProperty({ + type: () => SchemaDTO, + required: false, + isArray: true, + }) + @IsOptional() + @IsArray() + schemas?: SchemaDTO[]; +} \ No newline at end of file diff --git a/api-gateway/src/middlewares/validation/schemas/index.ts b/api-gateway/src/middlewares/validation/schemas/index.ts index 23aad8015f..b1f8a3fa8f 100644 --- a/api-gateway/src/middlewares/validation/schemas/index.ts +++ b/api-gateway/src/middlewares/validation/schemas/index.ts @@ -31,4 +31,5 @@ export * from './profiles.dto.js' export * from './worker-tasks.dto.js' export * from './policy-statistics.dto.js' export * from './schema-rules.dto.js' -export * from './policy-labels.dto.js' \ No newline at end of file +export * from './policy-labels.dto.js' +export * from './formulas.dto.js' \ No newline at end of file diff --git a/api-gateway/src/middlewares/validation/schemas/schema-rules.dto.ts b/api-gateway/src/middlewares/validation/schemas/schema-rules.dto.ts index 012b64843e..c519241574 100644 --- a/api-gateway/src/middlewares/validation/schemas/schema-rules.dto.ts +++ b/api-gateway/src/middlewares/validation/schemas/schema-rules.dto.ts @@ -125,6 +125,44 @@ export class SchemaRuleRelationshipsDTO { schemas?: SchemaDTO[]; } +export class SchemaRuleOptionsDTO { + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + policyId?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + schemaId?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + documentId?: string; + + @ApiProperty({ + type: 'string', + required: false, + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + parentId?: string; +} + @ApiExtraModels(SchemaRuleDTO, VcDocumentDTO) export class SchemaRuleDataDTO { @ApiProperty({ @@ -149,6 +187,6 @@ export class SchemaRuleDataDTO { isArray: true, }) @IsOptional() - @IsObject() - relationships?: VcDocumentDTO; + @IsArray() + relationships?: VcDocumentDTO[]; } \ No newline at end of file diff --git a/api-tests/package.json b/api-tests/package.json index 935f9a0c20..95fd3a20bc 100644 --- a/api-tests/package.json +++ b/api-tests/package.json @@ -1,6 +1,6 @@ { "name": "api-tests", - "version": "3.0.0", + "version": "3.1.0-rc", "description": "API Tests", "main": "index.js", "type": "module", diff --git a/application-events/package.json b/application-events/package.json index dfac83d43b..984b9886ac 100644 --- a/application-events/package.json +++ b/application-events/package.json @@ -49,7 +49,7 @@ "@types/http-errors": "^2.0.1", "@types/js-yaml": "^4.0.5", "@types/mocha": "^10.0.1", - "@types/node": "^18.11.9", + "@types/node": "^22.10.10", "@types/swagger-ui-express": "^4.1.3", "chai": "^4.3.7", "chai-http": "^4.3.0", diff --git a/auth-service/package.json b/auth-service/package.json index 33eab6f07e..36e1ca625b 100644 --- a/auth-service/package.json +++ b/auth-service/package.json @@ -10,8 +10,8 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "^3.0.0", - "@guardian/interfaces": "^3.0.0", + "@guardian/common": "^3.1.0-rc", + "@guardian/interfaces": "^3.1.0-rc", "@meeco/cryppo": "^2.0.2", "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", @@ -45,7 +45,7 @@ "@types/gulp": "^4", "@types/gulp-rename": "^2", "@types/jsonwebtoken": "^8.5.4", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "@types/node-vault": "^0", "chai": "^4.3.4", "cross-env": "^7.0.3", @@ -79,5 +79,5 @@ "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/common/package.json b/common/package.json index 445d9b4369..7d6f566437 100644 --- a/common/package.json +++ b/common/package.json @@ -5,7 +5,7 @@ "@azure/identity": "^3.2.2", "@azure/keyvault-secrets": "^4.9.0", "@google-cloud/secret-manager": "^4.2.2", - "@guardian/interfaces": "^3.0.0", + "@guardian/interfaces": "^3.1.0-rc", "@hashgraph/sdk": "2.52.0", "@mattrglobal/jsonld-signatures-bbs": "^1.1.2", "@meeco/cryppo": "^2.0.2", @@ -15,7 +15,7 @@ "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", "@nestjs/microservices": "^9.4.1", - "jsonld-signatures": "7.0.0", + "jsonld-signatures": "11.5.0", "@transmute/credentials-context": "0.7.0-unstable.80", "@transmute/did-context": "0.7.0-unstable.80", "@transmute/ed25519-signature-2018": "0.7.0-unstable.80", @@ -60,7 +60,7 @@ "@types/gulp": "^4", "@types/gulp-rename": "^2", "@types/jszip": "^3.4.1", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "mocha-junit-reporter": "^2.0.2", "tslint": "^6.1.3", "typescript": "^4.5.5", @@ -89,5 +89,5 @@ "test:stability": "mocha tests/stability.test.js" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/common/src/database-modules/database-server.ts b/common/src/database-modules/database-server.ts index 2971113251..374804dc1a 100644 --- a/common/src/database-modules/database-server.ts +++ b/common/src/database-modules/database-server.ts @@ -8,7 +8,6 @@ import { AggregateVC, ApprovalDocument as ApprovalDocumentCollection, Artifact as ArtifactCollection, - Artifact, ArtifactChunk as ArtifactChunkCollection, AssignEntity, BlockCache, @@ -19,6 +18,7 @@ import { DryRun, DryRunFiles, ExternalDocument, + Formula, MintRequest, MintTransaction, MultiDocuments, @@ -70,10 +70,9 @@ export class DatabaseServer extends AbstractDatabaseServer { /** * Documents handling chunk size */ - private static readonly DOCUMENTS_HANDLING_CHUNK_SIZE = process.env - .DOCUMENTS_HANDLING_CHUNK_SIZE - ? parseInt(process.env.DOCUMENTS_HANDLING_CHUNK_SIZE, 10) - : 500; + private static readonly DOCUMENTS_HANDLING_CHUNK_SIZE = process.env.DOCUMENTS_HANDLING_CHUNK_SIZE + ? parseInt(process.env.DOCUMENTS_HANDLING_CHUNK_SIZE, 10) + : 500; /** * Add dry run id @@ -135,13 +134,13 @@ export class DatabaseServer extends AbstractDatabaseServer { const naturalCount = Math.floor(amount / DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE); for (let i = 0; i < naturalCount; i++) { const items = await new DataBaseHelper(DryRun).find({dryRunId}, limit); - for (let item of items) { + for (const item of items) { item.savepoint = true; } await new DataBaseHelper(DryRun).update(items); } const restItems = await new DataBaseHelper(DryRun).find({dryRunId}); - for (let item of restItems) { + for (const item of restItems) { item.savepoint = true; } await new DataBaseHelper(DryRun).update(restItems); @@ -170,6 +169,18 @@ export class DatabaseServer extends AbstractDatabaseServer { // await new DataBaseHelper(DryRunFiles).remove(files); } + /** + * Get savepoint state + * @param dryRunId + * @param systemMode + */ + public static async getSavepointSate(dryRunId: string): Promise { + return await new DataBaseHelper(DryRun).findOne({dryRunId, savepoint: true}); + + // const files = await new DataBaseHelper(DryRunFiles).find({ policyId: dryRunId }); + // await new DataBaseHelper(DryRunFiles).remove(files); + } + /** * Get schemas * @param filters @@ -497,6 +508,65 @@ export class DatabaseServer extends AbstractDatabaseServer { } } + /** + * Create Formula + * @param formula + */ + public static async createFormula( + formula: FilterObject + ): Promise { + const item = new DataBaseHelper(Formula).create(formula); + return await new DataBaseHelper(Formula).save(item); + } + + /** + * Get Formulas + * @param filters + * @param options + */ + public static async getFormulasAndCount( + filters?: FilterObject, + options?: FindOptions + ): Promise<[Formula[], number]> { + return await new DataBaseHelper(Formula).findAndCount(filters, options); + } + + /** + * Get Formulas + * @param filters + * @param options + */ + public static async getFormulas( + filters?: FilterObject, + options?: unknown + ): Promise { + return await new DataBaseHelper(Formula).find(filters, options); + } + + /** + * Get Formula By ID + * @param id + */ + public static async getFormulaById(id: string): Promise { + return await new DataBaseHelper(Formula).findOne(id); + } + + /** + * Update Formula + * @param formula + */ + public static async updateFormula(formula: Formula): Promise { + return await new DataBaseHelper(Formula).update(formula); + } + + /** + * Delete Formula + * @param formula + */ + public static async removeFormula(formula: Formula): Promise { + return await new DataBaseHelper(Formula).remove(formula); + } + /** * Dry-run * @private @@ -560,7 +630,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param item Item * @param amount Amount */ - private async createMuchData(entityClass: new () => T, item: Partial & {id: string, _id: string}, amount: number): Promise { + private async createMuchData(entityClass: new () => T, item: Partial & { id: string, _id: string }, amount: number): Promise { const naturalCount = Math.floor((amount / DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE)); const restCount = (amount % DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE); @@ -609,7 +679,7 @@ export class DatabaseServer extends AbstractDatabaseServer { did: string, owner: string ): Promise { - const item = new DataBaseHelper(AssignEntity).create({type, entityId, assigned, did, owner}); + const item = new DataBaseHelper(AssignEntity).create({ type, entityId, assigned, did, owner }); return await new DataBaseHelper(AssignEntity).save(item); } @@ -619,7 +689,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * * @virtual */ - public async checkUserInGroup(group: {policyId: string, did: string, owner: string, uuid: string}): Promise { + public async checkUserInGroup(group: { policyId: string, did: string, owner: string, uuid: string }): Promise { return await this.findOne(PolicyRolesCollection, { policyId: group.policyId, did: group.did, @@ -663,15 +733,15 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async clearPolicyCacheData(cachePolicyId: string) { const amount = await new DataBaseHelper(PolicyCacheData).count({ - cachePolicyId - }); + cachePolicyId + }); const naturalCount = Math.floor( amount / DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE ); for (let i = 0; i < naturalCount; i++) { const items = await new DataBaseHelper(PolicyCacheData).find( - {cachePolicyId}, - {limit: DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE} + { cachePolicyId }, + { limit: DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE } ); await new DataBaseHelper(PolicyCacheData).remove( items.map((item) => { @@ -682,8 +752,8 @@ export class DatabaseServer extends AbstractDatabaseServer { ); } const restItems = await new DataBaseHelper(PolicyCacheData).find({ - cachePolicyId - }); + cachePolicyId + }); await new DataBaseHelper(PolicyCacheData).remove( restItems.map((item) => { item._id = item.newId; @@ -745,7 +815,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param policyId */ public static async countMultiPolicyTransactions(policyId: string): Promise { - return await new DataBaseHelper(MultiPolicyTransaction).count({policyId, status: 'Waiting'}); + return await new DataBaseHelper(MultiPolicyTransaction).count({ policyId, status: 'Waiting' }); } /** @@ -768,7 +838,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * * @virtual */ - public async createAggregateDocuments(item: VcDocumentCollection & {blockId: string}, blockId: string): Promise { + public async createAggregateDocuments(item: VcDocumentCollection & { blockId: string }, blockId: string): Promise { item.blockId = blockId; const newVC = this.create(AggregateVC, item); await this.save(AggregateVC, newVC); @@ -820,7 +890,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param amount Amount */ public async createMintTransactions(transaction: Partial, amount: number): Promise { - await this.createMuchData(MintTransaction, transaction as Partial & {id: string, _id: string}, amount); + await this.createMuchData(MintTransaction, transaction as Partial & { id: string, _id: string }, amount); } /** @@ -833,9 +903,9 @@ export class DatabaseServer extends AbstractDatabaseServer { const item = dbHelper.create(module); if ( (await dbHelper.count({ - name: item.name, - owner: item.owner - })) > 0 + name: item.name, + owner: item.owner + })) > 0 ) { throw new Error(`Module with name ${item.name} is already exists`); } @@ -883,9 +953,9 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param config * @param buffer */ - public static async createPolicyTest(config: {[key: string]: unknown}, buffer: Buffer): Promise { + public static async createPolicyTest(config: { [key: string]: unknown }, buffer: Buffer): Promise { const file = await DatabaseServer.saveFile(GenerateUUIDv4(), buffer); - const item = new DataBaseHelper(PolicyTest).create({...config, file}); + const item = new DataBaseHelper(PolicyTest).create({ ...config, file }); return await new DataBaseHelper(PolicyTest).save(item); } @@ -1015,18 +1085,18 @@ export class DatabaseServer extends AbstractDatabaseServer { systemMode?: boolean ): Promise { await new DataBaseHelper(DryRun).save(DatabaseServer.addDryRunId({ - did, - username, - hederaAccountId, - active - }, policyId, 'VirtualUsers', !!systemMode)); + did, + username, + hederaAccountId, + active + }, policyId, 'VirtualUsers', !!systemMode)); if (hederaAccountKey) { await new DataBaseHelper(DryRun).save(DatabaseServer.addDryRunId({ - did, - type: did, - hederaAccountKey - }, policyId, 'VirtualKey', !!systemMode)); + did, + type: did, + hederaAccountKey + }, policyId, 'VirtualKey', !!systemMode)); } } @@ -1083,7 +1153,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param id Policy ID */ public static async deletePolicy(id: string): Promise { - await new DataBaseHelper(Policy).delete({id}); + await new DataBaseHelper(Policy).delete({ id }); } /** @@ -1093,7 +1163,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @returns tests */ public static async deletePolicyTest(policyId: string, id: string): Promise { - await new DataBaseHelper(PolicyTest).delete({id, policyId}); + await new DataBaseHelper(PolicyTest).delete({ id, policyId }); } /** @@ -1103,7 +1173,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @returns tests */ public static async deletePolicyTests(policyId: string): Promise { - await new DataBaseHelper(PolicyTest).delete({policyId}); + await new DataBaseHelper(PolicyTest).delete({ policyId }); } /** @@ -1111,7 +1181,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param id */ public static async deleteSchemas(id: string): Promise { - await new DataBaseHelper(SchemaCollection).delete({id}); + await new DataBaseHelper(SchemaCollection).delete({ id }); } /** @@ -1190,9 +1260,9 @@ export class DatabaseServer extends AbstractDatabaseServer { blockId: string ): Promise { return await this.find(ExternalDocument, { - policyId: {$eq: policyId}, - blockId: {$eq: blockId}, - active: {$eq: true} + policyId: { $eq: policyId }, + blockId: { $eq: blockId }, + active: { $eq: true } }); } @@ -1207,7 +1277,7 @@ export class DatabaseServer extends AbstractDatabaseServer { if (!did) { return null; } - return await this.findOne(PolicyRolesCollection, {policyId, did, active: true}); + return await this.findOne(PolicyRolesCollection, { policyId, did, active: true }); } /** @@ -1261,7 +1331,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @virtual */ public async getAllPolicyUsers(policyId: string): Promise { - return await this.find(PolicyRolesCollection, {policyId, active: true}); + return await this.find(PolicyRolesCollection, { policyId, active: true }); } /** @@ -1273,7 +1343,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @virtual */ public async getAllUsersByRole(policyId: string, uuid: string, role: string): Promise { - return await this.find(PolicyRolesCollection, {policyId, uuid, role}); + return await this.find(PolicyRolesCollection, { policyId, uuid, role }); } /** @@ -1345,6 +1415,8 @@ export class DatabaseServer extends AbstractDatabaseServer { return await new DataBaseHelper(ArtifactCollection).findOne(filters); } + //Static + /** * Get Artifact File By UUID * @param uuid File UUID @@ -1352,12 +1424,12 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async getArtifactFileByUUID(uuid: string): Promise { const artifactChunks = (await new DataBaseHelper(ArtifactChunkCollection).find({ - uuid - }, { - orderBy: { - number: 'ASC' - } - })).map(item => item.data.buffer); + uuid + }, { + orderBy: { + number: 'ASC' + } + })).map(item => item.data.buffer); return artifactChunks.length > 0 ? Buffer.concat(artifactChunks) : Buffer.from(''); } @@ -1367,7 +1439,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param options Options * @returns Artifacts */ - public static async getArtifacts(filters?: FilterQuery, options?: FindOptions): Promise { + public static async getArtifacts(filters?: FilterQuery, options?: FindOptions): Promise { return await new DataBaseHelper(ArtifactCollection).find(filters, options); } @@ -1388,9 +1460,9 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async getAssignedEntities(did: string, type?: AssignedEntityType): Promise { if (type) { - return await (new DataBaseHelper(AssignEntity)).find({type, did}); + return await (new DataBaseHelper(AssignEntity)).find({ type, did }); } else { - return await (new DataBaseHelper(AssignEntity)).find({did}); + return await (new DataBaseHelper(AssignEntity)).find({ did }); } } @@ -1401,7 +1473,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param did */ public static async getAssignedEntity(type: AssignedEntityType, entityId: string, did: string): Promise { - return await (new DataBaseHelper(AssignEntity)).findOne({type, entityId, did}); + return await (new DataBaseHelper(AssignEntity)).findOne({ type, entityId, did }); } /** @@ -1478,7 +1550,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param did */ public async getDidDocument(did: string): Promise { - return await this.findOne(DidDocumentCollection, {did}); + return await this.findOne(DidDocumentCollection, { did }); } /** @@ -1486,7 +1558,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param did */ public static async getDidDocument(did: string): Promise { - return await (new DataBaseHelper(DidDocumentCollection)).findOne({did}); + return await (new DataBaseHelper(DidDocumentCollection)).findOne({ did }); } /** @@ -1556,9 +1628,9 @@ export class DatabaseServer extends AbstractDatabaseServer { userId: string ): Promise { return await this.findOne(ExternalDocument, { - policyId: {$eq: policyId}, - blockId: {$eq: blockId}, - owner: {$eq: userId} + policyId: { $eq: policyId }, + blockId: { $eq: blockId }, + owner: { $eq: userId } }); } @@ -1571,7 +1643,7 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async getFilteredPolicies(categoryIds: string[], text: string): Promise { const conditions = await GetConditionsPoliciesByCategories(categoryIds, text); - return await new DataBaseHelper(Policy).find({$and: conditions}); + return await new DataBaseHelper(Policy).find({ $and: conditions }); } /** @@ -1593,7 +1665,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @virtual */ public async getGroupByID(policyId: string, uuid: string): Promise { - return await this.findOne(PolicyRolesCollection, {policyId, uuid}); + return await this.findOne(PolicyRolesCollection, { policyId, uuid }); } /** @@ -1604,7 +1676,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @returns Group */ public static async getGroupByID(policyId: string, uuid: string): Promise { - return await new DataBaseHelper(PolicyRolesCollection).findOne({policyId, uuid}); + return await new DataBaseHelper(PolicyRolesCollection).findOne({ policyId, uuid }); } /** @@ -1634,7 +1706,7 @@ export class DatabaseServer extends AbstractDatabaseServer { if (!did) { return []; } - return await new DataBaseHelper(PolicyRolesCollection).find({policyId, did}, options); + return await new DataBaseHelper(PolicyRolesCollection).find({ policyId, did }, options); } /** @@ -1722,7 +1794,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param uuid */ public static async getModuleByUUID(uuid: string): Promise { - return await new DataBaseHelper(PolicyModule).findOne({uuid}); + return await new DataBaseHelper(PolicyModule).findOne({ uuid }); } /** @@ -1750,7 +1822,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @returns MultiPolicy */ public static async getMultiPolicy(instanceTopicId: string, owner: string): Promise { - return await new DataBaseHelper(MultiPolicy).findOne({instanceTopicId, owner}); + return await new DataBaseHelper(MultiPolicy).findOne({ instanceTopicId, owner }); } /** @@ -1759,7 +1831,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param owner */ public static async getMultiPolicyTransactions(policyId: string, user: string): Promise { - return await new DataBaseHelper(MultiPolicyTransaction).find({policyId, user, status: 'Waiting'}); + return await new DataBaseHelper(MultiPolicyTransaction).find({ policyId, user, status: 'Waiting' }); } /** @@ -1817,7 +1889,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @virtual */ public async getMultiSignStatus(uuid: string, documentId: string, userId: string = 'Group'): Promise { - return await this.findOne(MultiDocuments, {uuid, documentId, userId}); + return await this.findOne(MultiDocuments, { uuid, documentId, userId }); } /** @@ -1848,8 +1920,6 @@ export class DatabaseServer extends AbstractDatabaseServer { return await new DataBaseHelper(Policy).findOne(policyId); } - //Static - /** * Get policy * @param filters @@ -1871,7 +1941,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param policyTag */ public static async getPolicyByTag(policyTag: string): Promise { - return await new DataBaseHelper(Policy).findOne({policyTag}); + return await new DataBaseHelper(Policy).findOne({ policyTag }); } /** @@ -1879,7 +1949,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param uuid */ public static async getPolicyByUUID(uuid: string): Promise { - return await new DataBaseHelper(Policy).findOne({uuid}); + return await new DataBaseHelper(Policy).findOne({ uuid }); } /** @@ -1946,7 +2016,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @returns tests */ public static async getPolicyTest(policyId: string, id: string): Promise { - return await new DataBaseHelper(PolicyTest).findOne({id, policyId}); + return await new DataBaseHelper(PolicyTest).findOne({ id, policyId }); } /** @@ -1956,7 +2026,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @returns tests */ public static async getPolicyTestByRecord(resultId: string): Promise { - return await new DataBaseHelper(PolicyTest).findOne({resultId}); + return await new DataBaseHelper(PolicyTest).findOne({ resultId }); } /** @@ -1965,7 +2035,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @returns tests */ public static async getPolicyTests(policyId: string): Promise { - return await new DataBaseHelper(PolicyTest).find({policyId}); + return await new DataBaseHelper(PolicyTest).find({ policyId }); } /** @@ -1975,7 +2045,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @returns tests */ public static async getPolicyTestsByStatus(policyId: string, status: PolicyTestStatus): Promise { - return await new DataBaseHelper(PolicyTest).find({status, policyId}); + return await new DataBaseHelper(PolicyTest).find({ status, policyId }); } /** @@ -1985,7 +2055,7 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async getPublishPolicies(): Promise { return await new DataBaseHelper(Policy).find({ - status: {$eq: PolicyType.PUBLISH} + status: { $eq: PolicyType.PUBLISH } }); } @@ -2023,7 +2093,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @returns Retire pools */ public static async getRetirePools(tokenIds: string[]): Promise { - return await new DataBaseHelper(RetirePool).find({tokenIds: {$in: tokenIds}}); + return await new DataBaseHelper(RetirePool).find({ tokenIds: { $in: tokenIds } }); } /** @@ -2033,9 +2103,9 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async getSchemaByIRI(iri: string, topicId?: string): Promise { if (topicId) { - return await new DataBaseHelper(SchemaCollection).findOne({iri, topicId}); + return await new DataBaseHelper(SchemaCollection).findOne({ iri, topicId }); } else { - return await new DataBaseHelper(SchemaCollection).findOne({iri}); + return await new DataBaseHelper(SchemaCollection).findOne({ iri }); } } @@ -2054,10 +2124,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async getSchemaByType(topicId: string, entity: SchemaEntity): Promise { return await new DataBaseHelper(SchemaCollection).findOne({ - entity, - readonly: true, - topicId - }); + entity, + readonly: true, + topicId + }); } /** @@ -2067,10 +2137,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async getSchemaByType(topicId: string, entity: SchemaEntity): Promise { return await new DataBaseHelper(SchemaCollection).findOne({ - entity, - readonly: true, - topicId - }); + entity, + readonly: true, + topicId + }); } /** @@ -2096,7 +2166,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param ids */ public static async getSchemasByIds(ids: string[]): Promise { - return await new DataBaseHelper(SchemaCollection).find({id: {$in: ids}}); + return await new DataBaseHelper(SchemaCollection).find({ id: { $in: ids } }); } /** @@ -2129,7 +2199,7 @@ export class DatabaseServer extends AbstractDatabaseServer { did: string ): Promise { return await new DataBaseHelper(SuggestionsConfig).findOne({ - user: did + user: did }); } @@ -2139,9 +2209,9 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async getSystemSchema(entity: SchemaEntity): Promise { return await new DataBaseHelper(SchemaCollection).findOne({ - entity, - system: true, - active: true + entity, + system: true, + active: true }); } @@ -2150,7 +2220,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param uuid */ public async getTagById(uuid: string): Promise { - return await this.findOne(Tag, {uuid}); + return await this.findOne(Tag, { uuid }); } /** @@ -2158,7 +2228,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param uuid */ public static async getTagById(uuid: string): Promise { - return await new DataBaseHelper(Tag).findOne({uuid}); + return await new DataBaseHelper(Tag).findOne({ uuid }); } /** @@ -2231,9 +2301,9 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async getToken(tokenId: string, dryRun: string = null): Promise { if (dryRun) { - return this.findOne(TokenCollection, {tokenId}); + return this.findOne(TokenCollection, { tokenId }); } else { - return await new DataBaseHelper(TokenCollection).findOne({tokenId}); + return await new DataBaseHelper(TokenCollection).findOne({ tokenId }); } } @@ -2242,7 +2312,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param tokenId */ public static async getToken(tokenId: string): Promise { - return await new DataBaseHelper(TokenCollection).findOne({tokenId}); + return await new DataBaseHelper(TokenCollection).findOne({ tokenId }); } /** @@ -2283,7 +2353,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param uuid */ public static async getToolByUUID(uuid: string): Promise { - return await new DataBaseHelper(PolicyTool).findOne({uuid}); + return await new DataBaseHelper(PolicyTool).findOne({ uuid }); } /** @@ -2342,7 +2412,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param topicId */ public async getTopicById(topicId: string): Promise { - return await this.findOne(TopicCollection, {topicId}); + return await this.findOne(TopicCollection, { topicId }); } /** @@ -2350,7 +2420,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param topicId */ public static async getTopicById(topicId: string): Promise { - return await new DataBaseHelper(TopicCollection).findOne({topicId}); + return await new DataBaseHelper(TopicCollection).findOne({ topicId }); } /** @@ -2359,7 +2429,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param type */ public static async getTopicByType(owner: string, type: TopicType): Promise { - return await new DataBaseHelper(TopicCollection).findOne({owner, type}); + return await new DataBaseHelper(TopicCollection).findOne({ owner, type }); } /** @@ -2463,7 +2533,7 @@ export class DatabaseServer extends AbstractDatabaseServer { if (!did && !uuid) { return null; } - return await this.findOne(PolicyRolesCollection, {policyId, did, uuid}); + return await this.findOne(PolicyRolesCollection, { policyId, did, uuid }); } /** @@ -2475,7 +2545,7 @@ export class DatabaseServer extends AbstractDatabaseServer { if (!did) { return null; } - return await new DataBaseHelper(PolicyRolesCollection).find({policyId, did}); + return await new DataBaseHelper(PolicyRolesCollection).find({ policyId, did }); } /** @@ -2487,7 +2557,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @virtual */ public async getUserRoles(policyId: string, did: string): Promise { - return await this.find(PolicyRolesCollection, {policyId, did}); + return await this.find(PolicyRolesCollection, { policyId, did }); } /** @@ -2498,7 +2568,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @virtual */ public async getUsersByRole(policyId: string, role: string): Promise { - return await this.find(PolicyRolesCollection, {policyId, role}); + return await this.find(PolicyRolesCollection, { policyId, role }); } /** @@ -2784,10 +2854,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async getVirtualHederaAccountInfo(hederaAccountId: string): Promise { const item = (await new DataBaseHelper(DryRun).findOne({ - dryRunId: this.dryRun, - dryRunClass: 'HederaAccountInfo', - hederaAccountId - })); + dryRunId: this.dryRun, + dryRunClass: 'HederaAccountInfo', + hederaAccountId + })); return item?.tokenMap || {}; } @@ -2800,11 +2870,11 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async getVirtualKey(did: string, keyName: string): Promise { const item = (await new DataBaseHelper(DryRun).findOne({ - dryRunId: this.dryRun, - dryRunClass: 'VirtualKey', - did, - type: keyName - })); + dryRunId: this.dryRun, + dryRunClass: 'VirtualKey', + did, + type: keyName + })); return item?.hederaAccountKey; } @@ -2834,10 +2904,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async getVirtualMessage(dryRun: string, messageId: string): Promise { return (await new DataBaseHelper(DryRun).findOne({ - dryRunId: dryRun, - dryRunClass: 'Message', - messageId - })); + dryRunId: dryRun, + dryRunClass: 'Message', + messageId + })); } /** @@ -2863,10 +2933,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async getVirtualUser(did: string): Promise { return (await new DataBaseHelper(DryRun).findOne({ - dryRunId: this.dryRun, - dryRunClass: 'VirtualUsers', - did - })) as unknown as IAuthUser; + dryRunId: this.dryRun, + dryRunClass: 'VirtualUsers', + did + })) as unknown as IAuthUser; } /** @@ -2877,18 +2947,18 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async getVirtualUser(policyId: string): Promise { return await new DataBaseHelper(DryRun).findOne({ - dryRunId: policyId, - dryRunClass: 'VirtualUsers', - active: true - }, { - fields: [ - 'id', - 'did', - 'username', - 'hederaAccountId', - 'active' - ] - } as unknown as FindOptions); + dryRunId: policyId, + dryRunClass: 'VirtualUsers', + active: true + }, { + fields: [ + 'id', + 'did', + 'username', + 'hederaAccountId', + 'active' + ] + } as unknown as FindOptions); } /** @@ -2899,19 +2969,19 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async getVirtualUsers(policyId: string): Promise { return (await new DataBaseHelper(DryRun).find({ - dryRunId: policyId, - dryRunClass: 'VirtualUsers' - }, { - fields: [ - 'id', - 'did', - 'username', - 'hederaAccountId', - 'active' - ] as unknown as PopulatePath.ALL[], - orderBy: { - createDate: 1 - } + dryRunId: policyId, + dryRunClass: 'VirtualUsers' + }, { + fields: [ + 'id', + 'did', + 'username', + 'hederaAccountId', + 'active' + ] as unknown as PopulatePath.ALL[], + orderBy: { + createDate: 1 + } })); } @@ -3002,7 +3072,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @virtual */ public async removeAggregateDocument(hash: string, blockId: string): Promise { - const item = await this.find(AggregateVC, {blockId, hash}); + const item = await this.find(AggregateVC, { blockId, hash }); await this.remove(AggregateVC, item); } @@ -3040,7 +3110,7 @@ export class DatabaseServer extends AbstractDatabaseServer { did: string, owner?: string ): Promise { - const filters: {type: AssignedEntityType, entityId: string, did: string, owner?: string} = {type, entityId, did}; + const filters: { type: AssignedEntityType, entityId: string, did: string, owner?: string } = { type, entityId, did }; if (owner) { filters.owner = owner; @@ -3439,10 +3509,10 @@ export class DatabaseServer extends AbstractDatabaseServer { const topicId = message.getTopicId(); await new DataBaseHelper(DryRun).save(DatabaseServer.addDryRunId({ - document, - topicId, - messageId - }, dryRun, 'Message', false)); + document, + topicId, + messageId + }, dryRun, 'Message', false)); } /** @@ -3455,7 +3525,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @virtual */ public async setActiveGroup(policyId: string, did: string, uuid: string): Promise { - const groups = await this.find(PolicyRolesCollection, {policyId, did}); + const groups = await this.find(PolicyRolesCollection, { policyId, did }); for (const group of groups) { group.active = group.uuid === uuid; } @@ -3483,7 +3553,7 @@ export class DatabaseServer extends AbstractDatabaseServer { public async setMultiSigDocument( uuid: string, documentId: string, - user: {id: string, did: string, group: string, username: string}, + user: { id: string, did: string, group: string, username: string }, status: string, document: IVC ): Promise { @@ -3517,10 +3587,10 @@ export class DatabaseServer extends AbstractDatabaseServer { status: string ): Promise { let item = await this.findOne(MultiDocuments, { - uuid: {$eq: uuid}, - documentId: {$eq: documentId}, - group: {$eq: group}, - userId: {$eq: 'Group'} + uuid: { $eq: uuid }, + documentId: { $eq: documentId }, + group: { $eq: group }, + userId: { $eq: 'Group' } }); if (item) { item.status = status; @@ -3600,14 +3670,14 @@ export class DatabaseServer extends AbstractDatabaseServer { public static async setVirtualFile( policyId: string, file: ArrayBuffer, - url: {url: string} + url: { url: string } ): Promise { await new DataBaseHelper(DryRun).save(DatabaseServer.addDryRunId({ - document: { - size: file?.byteLength - }, - documentURL: url?.url - }, policyId, 'Files', false)); + document: { + size: file?.byteLength + }, + documentURL: url?.url + }, policyId, 'Files', false)); } /** @@ -3620,12 +3690,12 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async setVirtualKey(did: string, keyName: string, key: string): Promise { await new DataBaseHelper(DryRun).save({ - dryRunId: this.dryRun, - dryRunClass: 'VirtualKey', - did, - type: keyName, - hederaAccountKey: key - } as Partial); + dryRunId: this.dryRun, + dryRunClass: 'VirtualKey', + did, + type: keyName, + hederaAccountKey: key + } as Partial); } /** @@ -3642,9 +3712,9 @@ export class DatabaseServer extends AbstractDatabaseServer { operatorId?: string ): Promise { await new DataBaseHelper(DryRun).save(DatabaseServer.addDryRunId({ - type, - hederaAccountId: operatorId - }, policyId, 'Transactions', false)); + type, + hederaAccountId: operatorId + }, policyId, 'Transactions', false)); } /** @@ -3656,9 +3726,9 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public static async setVirtualUser(policyId: string, did: string): Promise { const items = (await new DataBaseHelper(DryRun).find({ - dryRunId: policyId, - dryRunClass: 'VirtualUsers' - })); + dryRunId: policyId, + dryRunClass: 'VirtualUsers' + })); for (const item of items) { item.active = item.did === did; await new DataBaseHelper(DryRun).save(item); @@ -3813,7 +3883,7 @@ export class DatabaseServer extends AbstractDatabaseServer { * @param item */ public static async updateSchema(id: string, item: SchemaCollection): Promise { - await new DataBaseHelper(SchemaCollection).update(item, {id}); + await new DataBaseHelper(SchemaCollection).update(item, { id }); } /** @@ -3966,10 +4036,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async virtualAssociate(hederaAccountId: string, token: TokenCollection): Promise { const item = await new DataBaseHelper(DryRun).findOne({ - dryRunId: this.dryRun, - dryRunClass: 'HederaAccountInfo', - hederaAccountId - }); + dryRunId: this.dryRun, + dryRunClass: 'HederaAccountInfo', + hederaAccountId + }); if (item) { if (item.tokenMap[token.tokenId]) { throw new Error('Token already associated'); @@ -3987,11 +4057,11 @@ export class DatabaseServer extends AbstractDatabaseServer { kyc: token.enableKYC ? false : null }; await new DataBaseHelper(DryRun).save({ - dryRunId: this.dryRun, - dryRunClass: 'HederaAccountInfo', - hederaAccountId, - tokenMap - }); + dryRunId: this.dryRun, + dryRunClass: 'HederaAccountInfo', + hederaAccountId, + tokenMap + }); } return true; } @@ -4005,10 +4075,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async virtualDissociate(hederaAccountId: string, tokenId: string): Promise { const item = await new DataBaseHelper(DryRun).findOne({ - dryRunId: this.dryRun, - dryRunClass: 'HederaAccountInfo', - hederaAccountId - }); + dryRunId: this.dryRun, + dryRunClass: 'HederaAccountInfo', + hederaAccountId + }); if (!item || !item.tokenMap[tokenId]) { throw new Error('Token is not associated'); } @@ -4026,10 +4096,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async virtualFreeze(hederaAccountId: string, tokenId: string): Promise { const item = await new DataBaseHelper(DryRun).findOne({ - dryRunId: this.dryRun, - dryRunClass: 'HederaAccountInfo', - hederaAccountId - }); + dryRunId: this.dryRun, + dryRunClass: 'HederaAccountInfo', + hederaAccountId + }); if (!item || !item.tokenMap[tokenId]) { throw new Error('Token is not associated'); } @@ -4053,10 +4123,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async virtualGrantKyc(hederaAccountId: string, tokenId: string): Promise { const item = await new DataBaseHelper(DryRun).findOne({ - dryRunId: this.dryRun, - dryRunClass: 'HederaAccountInfo', - hederaAccountId - }); + dryRunId: this.dryRun, + dryRunClass: 'HederaAccountInfo', + hederaAccountId + }); if (!item || !item.tokenMap[tokenId]) { throw new Error('Token is not associated'); } @@ -4080,10 +4150,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async virtualRevokeKyc(hederaAccountId: string, tokenId: string): Promise { const item = await new DataBaseHelper(DryRun).findOne({ - dryRunId: this.dryRun, - dryRunClass: 'HederaAccountInfo', - hederaAccountId - }); + dryRunId: this.dryRun, + dryRunClass: 'HederaAccountInfo', + hederaAccountId + }); if (!item || !item.tokenMap[tokenId]) { throw new Error('Token is not associated'); } @@ -4107,10 +4177,10 @@ export class DatabaseServer extends AbstractDatabaseServer { */ public async virtualUnfreeze(hederaAccountId: string, tokenId: string): Promise { const item = await new DataBaseHelper(DryRun).findOne({ - dryRunId: this.dryRun, - dryRunClass: 'HederaAccountInfo', - hederaAccountId - }); + dryRunId: this.dryRun, + dryRunClass: 'HederaAccountInfo', + hederaAccountId + }); if (!item || !item.tokenMap[tokenId]) { throw new Error('Token is not associated'); } diff --git a/common/src/entity/formula.ts b/common/src/entity/formula.ts new file mode 100644 index 0000000000..99461dd883 --- /dev/null +++ b/common/src/entity/formula.ts @@ -0,0 +1,96 @@ +import { BeforeCreate, Entity, Property } from '@mikro-orm/core'; +import { BaseEntity } from '../models/index.js'; +import { EntityStatus, GenerateUUIDv4, IFormula, IFormulaConfig } from '@guardian/interfaces'; + +/** + * Formula collection + */ +@Entity() +export class Formula extends BaseEntity implements IFormula { + /** + * ID + */ + @Property({ nullable: true }) + uuid?: string; + + /** + * Label + */ + @Property({ nullable: true }) + name?: string; + + /** + * Description + */ + @Property({ nullable: true }) + description?: string; + + /** + * Owner + */ + @Property({ + nullable: true, + index: true + }) + owner?: string; + + /** + * Creator + */ + @Property({ nullable: true }) + creator?: string; + + /** + * Status + */ + @Property({ nullable: true }) + status?: EntityStatus; + + /** + * Message id + */ + @Property({ nullable: true }) + messageId?: string; + + /** + * Policy id + */ + @Property({ + nullable: true, + index: true + }) + policyId?: string; + + /** + * Policy id + */ + @Property({ + nullable: true, + index: true + }) + policyTopicId?: string; + + /** + * Policy Instance Topic id + */ + @Property({ + nullable: true, + index: true + }) + policyInstanceTopicId?: string; + + /** + * Config + */ + @Property({ nullable: true, type: 'unknown' }) + config?: IFormulaConfig; + + /** + * Set defaults + */ + @BeforeCreate() + setDefaults() { + this.uuid = this.uuid || GenerateUUIDv4(); + this.status = this.status || EntityStatus.DRAFT; + } +} \ No newline at end of file diff --git a/common/src/entity/index.ts b/common/src/entity/index.ts index 4665137b12..fc50a08d76 100644 --- a/common/src/entity/index.ts +++ b/common/src/entity/index.ts @@ -47,4 +47,5 @@ export * from './policy-statistic.js'; export * from './policy-statistic-document.js'; export * from './schema-rule.js'; export * from './policy-label.js'; -export * from './policy-label-document.js'; \ No newline at end of file +export * from './policy-label-document.js'; +export * from './formula.js'; \ No newline at end of file diff --git a/common/src/entity/schema.ts b/common/src/entity/schema.ts index be1df8013a..8011e563e4 100644 --- a/common/src/entity/schema.ts +++ b/common/src/entity/schema.ts @@ -1,23 +1,8 @@ -import { - ISchema, - ISchemaDocument, - SchemaCategory, - SchemaEntity, - SchemaStatus, - GenerateUUIDv4, -} from '@guardian/interfaces'; -import { - Entity, - Property, - Enum, - BeforeCreate, - OnLoad, - BeforeUpdate, - AfterDelete, -} from '@mikro-orm/core'; -import { BaseEntity } from '../models/index.js'; -import { DataBaseHelper, SchemaConverterUtils } from '../helpers/index.js'; +import { GenerateUUIDv4, ISchema, ISchemaDocument, SchemaCategory, SchemaEntity, SchemaStatus } from '@guardian/interfaces'; +import { AfterDelete, BeforeCreate, BeforeUpdate, Entity, Enum, OnLoad, Property } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; +import { DataBaseHelper, SchemaConverterUtils } from '../helpers/index.js'; +import { BaseEntity } from '../models/index.js'; /** * Schema collection diff --git a/common/src/hedera-modules/message/formula-message.ts b/common/src/hedera-modules/message/formula-message.ts new file mode 100644 index 0000000000..0e011a4d99 --- /dev/null +++ b/common/src/hedera-modules/message/formula-message.ts @@ -0,0 +1,202 @@ +import { Message } from './message.js'; +import { IURL, UrlType } from './url.interface.js'; +import { MessageAction } from './message-action.js'; +import { MessageType } from './message-type.js'; +import { FormulaMessageBody } from './message-body.interface.js'; +import { Formula } from '../../entity/index.js'; +import { IPFS } from '../../helpers/index.js'; + +/** + * Formula message + */ +export class FormulaMessage extends Message { + /** + * Name + */ + public name: string; + /** + * Description + */ + public description: string; + /** + * Owner + */ + public owner: string; + /** + * UUID + */ + public uuid: string; + /** + * Policy topic id + */ + public policyTopicId: string; + /** + * Policy Instance topic id + */ + public policyInstanceTopicId: string; + + /** + * Document + */ + public config: ArrayBuffer; + + constructor(action: MessageAction) { + super(action, MessageType.Formula); + } + + /** + * Set document + * @param item + */ + public setDocument(item: Formula, zip: ArrayBuffer): void { + this.name = item.name; + this.description = item.description; + this.owner = item.owner; + this.uuid = item.uuid; + this.policyTopicId = item.policyTopicId; + this.policyInstanceTopicId = item.policyInstanceTopicId; + this.config = zip; + } + + /** + * Get document + */ + public getDocument(): ArrayBuffer { + return this.config; + } + + /** + * To message object + */ + public override toMessageObject(): FormulaMessageBody { + return { + id: null, + status: null, + type: this.type, + action: this.action, + lang: this.lang, + name: this.name, + description: this.description, + owner: this.owner, + uuid: this.uuid, + policyTopicId: this.policyTopicId, + policyInstanceTopicId: this.policyInstanceTopicId, + cid: this.getDocumentUrl(UrlType.cid), + uri: this.getDocumentUrl(UrlType.url), + }; + } + + /** + * To documents + */ + public async toDocuments(): Promise { + if (this.config) { + return [this.config]; + } + return []; + } + + /** + * Load documents + * @param documents + */ + public loadDocuments(documents: string[]): FormulaMessage { + if (documents && documents.length === 1) { + this.config = Buffer.from(documents[0]); + } + return this; + } + + /** + * From message + * @param message + */ + public static fromMessage(message: string): FormulaMessage { + if (!message) { + throw new Error('Message Object is empty'); + } + + const json = JSON.parse(message); + return FormulaMessage.fromMessageObject(json); + } + + /** + * From message object + * @param json + */ + public static fromMessageObject(json: FormulaMessageBody): FormulaMessage { + if (!json) { + throw new Error('JSON Object is empty'); + } + + let message = new FormulaMessage(json.action); + message = Message._fromMessageObject(message, json); + message._id = json.id; + message._status = json.status; + message.name = json.name; + message.description = json.description; + message.owner = json.owner; + message.uuid = json.uuid; + message.policyTopicId = json.policyTopicId; + message.policyInstanceTopicId = json.policyInstanceTopicId; + const urls = [ + { + cid: json.cid, + url: IPFS.IPFS_PROTOCOL + json.cid, + }, + ]; + message.setUrls(urls); + return message; + } + + /** + * Get URL + */ + public override getUrl(): IURL[] { + return this.getUrls(); + } + + /** + * Get document URL + * @param type + */ + public getDocumentUrl(type: UrlType): string | null { + return this.getUrlValue(0, type); + } + + /** + * Get context URL + * @param type + */ + public getContextUrl(type: UrlType): string | null { + return this.getUrlValue(1, type); + } + + /** + * Validate + */ + public override validate(): boolean { + return true; + } + + /** + * To JSON + */ + public override toJson(): any { + const result = super.toJson(); + result.name = this.name; + result.description = this.description; + result.owner = this.owner; + result.uuid = this.uuid; + result.policyTopicId = this.policyTopicId; + result.policyInstanceTopicId = this.policyInstanceTopicId; + result.config = this.config; + } + + /** + * Get User DID + */ + public override getOwner(): string { + return this.owner; + } +} diff --git a/common/src/hedera-modules/message/index.ts b/common/src/hedera-modules/message/index.ts index afbee0dacd..15226ac62c 100644 --- a/common/src/hedera-modules/message/index.ts +++ b/common/src/hedera-modules/message/index.ts @@ -22,4 +22,5 @@ export { UserPermissionsMessage } from './user-permissions-message.js'; export { StatisticMessage } from './statistic-message.js'; export { StatisticAssessmentMessage } from './statistic-assessment-message.js'; export { LabelMessage } from './label-message.js'; -export { LabelDocumentMessage } from './label-document-message.js'; \ No newline at end of file +export { LabelDocumentMessage } from './label-document-message.js'; +export { FormulaMessage } from './formula-message.js'; \ No newline at end of file diff --git a/common/src/hedera-modules/message/message-action.ts b/common/src/hedera-modules/message/message-action.ts index 302737bff9..daadbf8221 100644 --- a/common/src/hedera-modules/message/message-action.ts +++ b/common/src/hedera-modules/message/message-action.ts @@ -39,4 +39,5 @@ export enum MessageAction { CreateStatisticAssessment = 'create-assessment-document', PublishPolicyLabel = 'publish-policy-label', CreateLabelDocument = 'create-label-document', + PublishFormula = 'publish-formula', } \ No newline at end of file diff --git a/common/src/hedera-modules/message/message-body.interface.ts b/common/src/hedera-modules/message/message-body.interface.ts index e74123af45..a8a8e02584 100644 --- a/common/src/hedera-modules/message/message-body.interface.ts +++ b/common/src/hedera-modules/message/message-body.interface.ts @@ -642,6 +642,44 @@ export interface LabelMessageBody extends MessageBody { uri: string; } +/** + * Formula message body + */ +export interface FormulaMessageBody extends MessageBody { + /** + * UUID + */ + uuid: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + /** + * Owner + */ + owner: string; + /** + * Policy topic ID + */ + policyTopicId: string; + /** + * Policy instance topic ID + */ + policyInstanceTopicId: string; + /** + * CID + */ + cid: string; + /** + * URI + */ + uri: string; +} + /** * Statistic Assessment message body */ diff --git a/common/src/hedera-modules/message/message-server.ts b/common/src/hedera-modules/message/message-server.ts index f615ca0c5d..bdd9a62603 100644 --- a/common/src/hedera-modules/message/message-server.ts +++ b/common/src/hedera-modules/message/message-server.ts @@ -25,6 +25,7 @@ import { GuardianRoleMessage } from './guardian-role-message.js'; import { UserPermissionsMessage } from './user-permissions-message.js'; import { StatisticMessage } from './statistic-message.js'; import { LabelMessage } from './label-message.js'; +import { FormulaMessage } from './formula-message.js'; /** * Message server @@ -315,6 +316,9 @@ export class MessageServer { case MessageType.PolicyLabel: message = LabelMessage.fromMessageObject(json); break; + case MessageType.Formula: + message = FormulaMessage.fromMessageObject(json); + break; // Default schemas case 'schema-document': message = SchemaMessage.fromMessageObject(json); @@ -425,7 +429,7 @@ export class MessageServer { message.setLang(MessageServer.lang); const time = await this.messageStartLog('Hedera'); const buffer = message.toMessage(); - const timestamp = await new Workers().addRetryableTask({ + const timestamp = await new Workers().addRetryableTask({ type: WorkerTaskType.SEND_HEDERA, data: { topicId: this.topicId, @@ -441,7 +445,7 @@ export class MessageServer { } }, 10, 0, userId); await this.messageEndLog(time, 'Hedera'); - message.setId(timestamp); + message.setId(timestamp); message.setTopicId(this.topicId); return message; } diff --git a/common/src/hedera-modules/message/message-type.ts b/common/src/hedera-modules/message/message-type.ts index 53ea82402b..f6fb25210b 100644 --- a/common/src/hedera-modules/message/message-type.ts +++ b/common/src/hedera-modules/message/message-type.ts @@ -21,5 +21,6 @@ export enum MessageType { Contract = 'Contract', UserPermissions = 'User-Permissions', PolicyStatistic = 'Policy-Statistic', - PolicyLabel = 'Policy-Label' + PolicyLabel = 'Policy-Label', + Formula = 'Formula' } diff --git a/common/src/hedera-modules/message/message.ts b/common/src/hedera-modules/message/message.ts index 6e2c9ae6c1..26acead869 100644 --- a/common/src/hedera-modules/message/message.ts +++ b/common/src/hedera-modules/message/message.ts @@ -1,10 +1,10 @@ +import { GenerateUUIDv4 } from '@guardian/interfaces'; import { TopicId } from '@hashgraph/sdk'; -import { IURL, UrlType } from './url.interface.js'; +import { Hashing } from '../hashing.js'; import { MessageAction } from './message-action.js'; -import { MessageType } from './message-type.js'; import { MessageBody } from './message-body.interface.js'; -import { GenerateUUIDv4 } from '@guardian/interfaces'; -import { Hashing } from '../hashing.js'; +import { MessageType } from './message-type.js'; +import { IURL, UrlType } from './url.interface.js'; /** * Message status @@ -100,7 +100,7 @@ export abstract class Message { return this._responseType; } - constructor(action: MessageAction, type: MessageType) { + constructor(action: MessageAction, type: MessageType) { this.type = type; this.lang = 'en-US'; this._action = action; @@ -137,7 +137,7 @@ export abstract class Message { * @param url */ public setUrls(url: IURL[]): void { - this.urls = url?.filter(u => { + this.urls = url?.filter(u => { return !!u.cid }); } diff --git a/common/src/import-export/formula.ts b/common/src/import-export/formula.ts new file mode 100644 index 0000000000..0b8c8af7db --- /dev/null +++ b/common/src/import-export/formula.ts @@ -0,0 +1,107 @@ +import JSZip from 'jszip'; +import { Formula } from '../entity/index.js'; +import { IFormulaConfig } from '@guardian/interfaces'; + +/** + * Formula components + */ +export interface IFormulaComponents { + formula: Formula; +} + +/** + * Formula import export + */ +export class FormulaImportExport { + /** + * Formula filename + */ + public static readonly formulaFileName = 'formula.json'; + + /** + * Load Formula components + * @param formula Formula + * + * @returns components + */ + public static async loadFormulaComponents(formula: Formula): Promise { + return { formula }; + } + + /** + * Generate Zip File + * @param formula formula + * + * @returns Zip file + */ + public static async generate(formula: Formula): Promise { + const components = await FormulaImportExport.loadFormulaComponents(formula); + const file = await FormulaImportExport.generateZipFile(components); + return file; + } + + /** + * Generate Zip File + * @param components formula components + * + * @returns Zip file + */ + public static async generateZipFile(components: IFormulaComponents): Promise { + const object = { ...components.formula }; + delete object.id; + delete object._id; + delete object.owner; + delete object.createDate; + delete object.updateDate; + const zip = new JSZip(); + zip.file(FormulaImportExport.formulaFileName, JSON.stringify(object)); + return zip; + } + + /** + * Parse zip formula file + * @param zipFile Zip file + * @returns Parsed formula + */ + public static async parseZipFile(zipFile: any): Promise { + const zip = new JSZip(); + const content = await zip.loadAsync(zipFile); + if ( + !content.files[FormulaImportExport.formulaFileName] || + content.files[FormulaImportExport.formulaFileName].dir + ) { + throw new Error('Zip file is not a formula'); + } + const formulaString = await content.files[FormulaImportExport.formulaFileName].async('string'); + const formula = JSON.parse(formulaString); + return { formula }; + } + + /** + * Validate Config + * + * @param data config + */ + public static validateConfig(data?: IFormulaConfig): IFormulaConfig { + return data; + } + + /** + * Replace Ids + * + * @param data config + */ + public static replaceIds(data: IFormulaConfig, oldId: string, newId: string): IFormulaConfig { + if (data) { + const formulas = data.formulas; + if (Array.isArray(formulas)) { + for (const component of formulas) { + if (component.link && component.link.entityId === oldId) { + component.link.entityId = newId; + } + } + } + } + return data; + } +} diff --git a/common/src/import-export/index.ts b/common/src/import-export/index.ts index e20ed2504a..ed65502035 100644 --- a/common/src/import-export/index.ts +++ b/common/src/import-export/index.ts @@ -7,4 +7,5 @@ export * from './record.js'; export * from './utils.js'; export * from './schema-rule.js'; export * from './policy-statistic.js'; -export * from './policy-label.js'; \ No newline at end of file +export * from './policy-label.js'; +export * from './formula.js'; \ No newline at end of file diff --git a/common/src/import-export/policy.ts b/common/src/import-export/policy.ts index 1fa9506321..e0f16ea8a8 100644 --- a/common/src/import-export/policy.ts +++ b/common/src/import-export/policy.ts @@ -1,5 +1,5 @@ import JSZip from 'jszip'; -import { Artifact, Policy, PolicyCategory, PolicyTool, Schema, Tag, Token } from '../entity/index.js'; +import { Artifact, Formula, Policy, PolicyCategory, PolicyTool, Schema, Tag, Token } from '../entity/index.js'; import { DatabaseServer } from '../database-modules/index.js'; import { ImportExportUtils } from './utils.js'; import { PolicyCategoryExport } from '@guardian/interfaces'; @@ -18,6 +18,7 @@ export interface IPolicyComponents { policy: Policy; tokens: Token[]; schemas: Schema[]; + formulas: Formula[]; artifacts: IArtifact[]; tags: Tag[]; tools: PolicyTool[]; @@ -116,7 +117,9 @@ export class PolicyImportExport { const allCategories = await DatabaseServer.getPolicyCategories(); policy.categoriesExport = policy.categories?.length ? PolicyImportExport.getPolicyCategoriesExport(policy, allCategories) : []; - return { policy, tokens, schemas, tools, artifacts, tags, tests }; + const formulas = await dataBaseServer.find(Formula, { policyId: policy.id }); + + return { policy, tokens, schemas, tools, artifacts, tags, tests, formulas }; } /** @@ -234,6 +237,16 @@ export class PolicyImportExport { zip.file(`tests/${test.uuid}.record`, test.data); } + zip.folder('formulas'); + for (const formula of components.formulas) { + const item = { ...formula }; + delete item._id; + delete item.id; + delete item.status; + item.id = formula.id.toString(); + zip.file(`formulas/${item.uuid}.json`, JSON.stringify(item)); + } + zip.file(PolicyImportExport.policyFileName, JSON.stringify(policyObject)); return zip; } @@ -253,17 +266,19 @@ export class PolicyImportExport { const policy = JSON.parse(policyString); const fileEntries = Object.entries(content.files).filter(file => !file[1].dir); - const [tokensStringArray, schemasStringArray, toolsStringArray, tagsStringArray] = await Promise.all([ + const [tokensStringArray, schemasStringArray, toolsStringArray, tagsStringArray, formulasStringArray] = await Promise.all([ Promise.all(fileEntries.filter(file => /^tokens\/.+/.test(file[0])).map(file => file[1].async('string'))), Promise.all(fileEntries.filter(file => /^schem[a,e]s\/.+/.test(file[0])).map(file => file[1].async('string'))), Promise.all(fileEntries.filter(file => /^tools\/.+/.test(file[0])).map(file => file[1].async('string'))), - Promise.all(fileEntries.filter(file => /^tags\/.+/.test(file[0])).map(file => file[1].async('string'))) + Promise.all(fileEntries.filter(file => /^tags\/.+/.test(file[0])).map(file => file[1].async('string'))), + Promise.all(fileEntries.filter(file => /^formulas\/.+/.test(file[0])).map(file => file[1].async('string'))) ]); const tokens = tokensStringArray.map(item => JSON.parse(item)); const schemas = schemasStringArray.map(item => JSON.parse(item)); const tools = toolsStringArray.map(item => JSON.parse(item)); const tags = tagsStringArray.map(item => JSON.parse(item)); + const formulas = formulasStringArray.map(item => JSON.parse(item)); const metaDataFile = (Object.entries(content.files).find(file => file[0] === 'artifacts/metadata.json')); const metaDataString = metaDataFile && await metaDataFile[1].async('string') || '[]'; @@ -309,7 +324,7 @@ export class PolicyImportExport { policy.categoriesExport = []; } - return { policy, tokens, schemas, artifacts, tags, tools, tests }; + return { policy, tokens, schemas, artifacts, tags, tools, tests, formulas }; } /** @@ -359,4 +374,18 @@ export class PolicyImportExport { return policyCategoryIds; } -} + /** + * Load all schemas (deep find) + * @param policy policy + * + * @returns schemas + */ + public static async fastLoadSchemas(policy: Policy) { + const topicId = policy.topicId; + const tools: any[] = policy.tools || []; + const toolsTopicMap = tools.map((t) => t.topicId); + const schemas = await new DatabaseServer().find(Schema, { topicId, readonly: false }); + const toolSchemas = await DatabaseServer.getSchemas({ topicId: { $in: toolsTopicMap } }); + return { schemas, toolSchemas }; + } +} \ No newline at end of file diff --git a/common/src/interfaces/database-server.ts b/common/src/interfaces/database-server.ts index 6484492865..971ee9bc60 100644 --- a/common/src/interfaces/database-server.ts +++ b/common/src/interfaces/database-server.ts @@ -1,89 +1,65 @@ -import {TopicId} from '@hashgraph/sdk'; - //entities -import { - AssignedEntityType, - IVC, - MintTransactionStatus, - PolicyTestStatus, - SchemaEntity, - TopicType -} from '@guardian/interfaces'; -import { BaseEntity } from '../models/index.js'; +import { AssignedEntityType, IVC, MintTransactionStatus, PolicyTestStatus, SchemaEntity, TopicType } from '@guardian/interfaces'; +import { TopicId } from '@hashgraph/sdk'; +import { FilterQuery } from '@mikro-orm/core'; import { AggregateVC, ApprovalDocument as ApprovalDocumentCollection, Artifact as ArtifactCollection, + AssignEntity, BlockCache, BlockState, + Contract as ContractCollection, DidDocument as DidDocumentCollection, DocumentState, DryRun, ExternalDocument, + Message, MintRequest, MintTransaction, MultiDocuments, + MultiPolicy, MultiPolicyTransaction, Policy, + PolicyCache, + PolicyCacheData, PolicyCategory, PolicyInvitations, PolicyModule, + PolicyProperty, PolicyRoles as PolicyRolesCollection, + PolicyTest, + PolicyTool, + Record, + RetirePool, Schema as SchemaCollection, SplitDocuments, + SuggestionsConfig, Tag, TagCache, + Theme, Token as TokenCollection, Topic as TopicCollection, VcDocument as VcDocumentCollection, VpDocument, - VpDocument as VpDocumentCollection, - Message, - PolicyProperty, - PolicyTool, - PolicyCache, - PolicyCacheData, - MultiPolicy, - RetirePool, - Contract as ContractCollection, - Theme, - SuggestionsConfig, - Record, - AssignEntity, - PolicyTest, + VpDocument as VpDocumentCollection } from '../index.js'; +import { BaseEntity } from '../models/index.js'; //interfaces -import {IAuthUser, IGetDocumentAggregationFilters, IOrmConnection, STATUS_IMPLEMENTATION} from './index.js'; -import { FilterQuery } from '@mikro-orm/core'; +import { IAuthUser, IGetDocumentAggregationFilters, IOrmConnection, STATUS_IMPLEMENTATION } from './index.js'; export interface IAddDryRunIdItem { dryRunId: string, dryRunClass: string, systemMode: boolean + savepoint?: boolean } /** * Abstract database server */ export abstract class AbstractDatabaseServer { - /** - * Set Dry Run id - * @param id - */ - public abstract setDryRun(id: string): void; - - /** - * Get Dry Run id - * @returns Dry Run id - */ - public abstract getDryRun(): string; - /** - * Set System Mode - * @param systemMode - */ - public abstract setSystemMode(systemMode: boolean): void; - /** * Set MongoDriver * @param db @@ -92,12 +68,6 @@ export abstract class AbstractDatabaseServer { throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.connectBD.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } - /** - * Clear Dry Run table - * @param all - */ - public abstract clear(all: boolean): Promise; - /** * Clear Dry Run table * @param dryRunId @@ -107,133 +77,6 @@ export abstract class AbstractDatabaseServer { throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.clearDryRun.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } - /** - * Overriding the findOne method - * @param entityClass - * @param filters - * @param options - */ - public abstract findOne(entityClass: new () => T, filters: Partial, options: unknown): Promise; - - /** - * Overriding the find method - * @param entityClass - * @param filters - * @param options - */ - public abstract find(entityClass: new () => T, filters: Partial | unknown, options?: unknown): Promise; - - /** - * Overriding the create method - * @param entityClass - * @param item - */ - public abstract create(entityClass: new () => T, item: Partial): T; - - /** - * Overriding the update method - * @param entityClass - * @param criteria - * @param row - */ - public abstract update(entityClass: new () => T, criteria: Partial, row: unknown | unknown[]): Promise; - - /** - * Update many method - * @param entityClass - * @param entities - * @param filter - */ - public abstract updateMany(entityClass: new () => T, entities: T[], filter: FilterQuery): Promise; - - /** - * Overriding the remove method - * @param entityClass - * @param entities - */ - public abstract remove(entityClass: new () => T, entities: T | T[]): Promise; - - /** - * Overriding the count method - * @param entityClass - * @param filters - * @param options - */ - public abstract count(entityClass: new () => T, filters: Partial, options?: unknown): Promise; - - /** - * Overriding the findAndCount method - * @param entityClass - * @param filters - * @param options - */ - public abstract findAndCount(entityClass: new () => T, filters: Partial | unknown, options?: unknown): Promise<[T[], number]>; - - /** - * Overriding the findAll method - * @param entityClass - * @param options - */ - public abstract findAll(entityClass: new () => T, options?: unknown): Promise; - - /** - * Find data by aggregation - * @param entityClass Entity class - * @param aggregation aggregate filter - * @returns - */ - public abstract aggregate(entityClass: new () => T, aggregation: Partial[]): Promise; - - /** - * Overriding the save method - * @param entityClass - * @param item - * @param filter - */ - public abstract save(entityClass: new () => T, item: unknown | unknown[], filter?: Partial): Promise - - /** - * Save many - * @param entityClass - * @param item - * @param filter - */ - public abstract saveMany(entityClass: new () => T, item: unknown[], filter?: Partial): Promise - - /** - * Save Block State - * @param policyId - * @param uuid - * @param state - * - * @virtual - */ - public abstract saveBlockState(policyId: string, uuid: string, state: unknown): Promise; - - /** - * Get Block State - * @param policyId - * @param uuid - * - * @virtual - */ - public abstract getBlockState(policyId: string, uuid: string): Promise; - - /** - * Get block states - * @param policyId Policy identifier - * @returns Block states - */ - public abstract getBlockStates(policyId: string): Promise; - - /** - * Get Virtual User - * @param did - * - * @virtual - */ - public abstract getVirtualUser(did: string): Promise; - /** * Get Current Virtual User * @param policyId @@ -303,256 +146,65 @@ export abstract class AbstractDatabaseServer { } /** - * Get Key from Virtual User - * @param did - * @param keyName - * - * @virtual + * Get VC + * @param id */ - public abstract getVirtualKey(did: string, keyName: string): Promise; + public static async getVCById(id: string): Promise | null { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVCById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get virtual keys - * @param filters Filters - * @returns Virtual keys + * Get VC + * @param filters + * @param options */ - public abstract getVirtualKeys(filters: Partial): Promise; + public static async getVC(filters?: Partial, options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVC.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Set Key from Virtual User - * @param did - * @param keyName - * @param key - * - * @virtual + * Get VCs + * @param filters + * @param options */ - public abstract setVirtualKey(did: string, keyName: string, key: string): Promise; + public static async getVCs(filters?: Partial, options?: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVCs.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Virtual Hedera Account - * @param hederaAccountId - * - * @virtual + * Get VC + * @param id */ - public abstract getVirtualHederaAccountInfo(hederaAccountId: string): Promise; + public static async getVPById(id: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVPById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Virtual Associate Token - * @param hederaAccountId - * @param token - * - * @virtual + * Get VC + * @param filters + * @param options */ - public abstract virtualAssociate(hederaAccountId: string, token: TokenCollection): Promise; + public static async getVP(filters?: Partial, options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Virtual Dissociate Token - * @param hederaAccountId - * @param tokenId - * - * @virtual + * Get VCs + * @param filters + * @param options */ - public abstract virtualDissociate(hederaAccountId: string, tokenId: string): Promise; + public static async getVPs(filters?: Partial, options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVP.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Virtual Freeze Token - * @param hederaAccountId - * @param tokenId - * - * @virtual - */ - public abstract virtualFreeze(hederaAccountId: string, tokenId: string): Promise; - - /** - * Virtual Unfreeze Token - * @param hederaAccountId - * @param tokenId - * - * @virtual - */ - public abstract virtualUnfreeze(hederaAccountId: string, tokenId: string): Promise; - - /** - * Virtual GrantKyc Token - * @param hederaAccountId - * @param tokenId - * - * @virtual - */ - public abstract virtualGrantKyc(hederaAccountId: string, tokenId: string): Promise; - - /** - * Virtual RevokeKyc Token - * @param hederaAccountId - * @param tokenId - * - * @virtual - */ - public abstract virtualRevokeKyc(hederaAccountId: string, tokenId: string): Promise; - - /** - * Save Block State - * @param {string} policyId - policy ID - * @param {string} blockId - block UUID - * @param {string} did - user DID - * @param {string} name - variable name - * @param {unknown} value - variable value - * @param {boolean} isLongValue - if long value - * @virtual - */ - public abstract saveBlockCache(policyId: string, blockId: string, did: string, name: string, value: unknown, isLongValue: boolean): Promise; - - /** - * Get Block State - * @param {string} policyId - policy ID - * @param {string} blockId - block UUID - * @param {string} did - user DID - * @param {string} name - variable name - * - * @returns {BlockCache | null} - variable value - * @virtual - */ - public abstract getBlockCache(policyId: string, blockId: string, did: string, name: string): Promise; - - /** - * Save Document State - * @param row - * - * @virtual - */ - public abstract saveDocumentState(row: Partial): Promise; - - /** - * Create Token - * @param token - * @returns - */ - public abstract createToken(token: unknown): Promise; - - /** - * Update Approval VC - * @param row - * - * @virtual - */ - public abstract updateApproval(row: ApprovalDocumentCollection): Promise; - - /** - * Update VC - * @param row - * - * @virtual - */ - public abstract updateVC(row: VcDocumentCollection): Promise; - - /** - * Update VP - * @param row - * - * @virtual - */ - public abstract updateVP(row: VpDocumentCollection): Promise; - - /** - * Update Did - * @param row - * - * @virtual - */ - public abstract updateDid(row: DidDocumentCollection): Promise; - - /** - * Save Approval VC - * @param row - * - * @virtual - */ - public abstract saveApproval(row: Partial): Promise; - - /** - * Save VC - * @param row - * - * @virtual - */ - public abstract saveVC(row: Partial): Promise; - - /** - * Get VC - * @param id - */ - public static async getVCById(id: string): Promise | null { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVCById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } - - /** - * Get VC - * @param filters - * @param options - */ - public static async getVC(filters?: Partial, options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVC.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } - - /** - * Get VCs - * @param filters - * @param options - */ - public static async getVCs(filters?: Partial, options?: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVCs.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } - - /** - * Get VC - * @param id - */ - public static async getVPById(id: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVPById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } - - /** - * Get VC - * @param filters - * @param options - */ - public static async getVP(filters?: Partial, options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } - - /** - * Get VCs - * @param filters - * @param options - */ - public static async getVPs(filters?: Partial, options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVP.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } - - /** - * Save VC - * @param row + * Save VC + * @param row */ public static async saveVC(row: Partial): Promise { throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveVC.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } - /** - * Save VP - * @param row - * - * @virtual - */ - public abstract saveVP(row: Partial): Promise; - - /** - * Save Did - * @param row - * - * @virtual - */ - public abstract saveDid(row: Partial): Promise; - /** * Get policy * @param filters @@ -668,14 +320,6 @@ export abstract class AbstractDatabaseServer { throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTopicByType.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } - /** - * Get Policy - * @param policyId - * - * @virtual - */ - public abstract getPolicy(policyId: string): Promise; - /** * Get Publish Policies * @@ -715,1698 +359,2048 @@ export abstract class AbstractDatabaseServer { } /** - * Get Aggregate Documents - * @param policyId - * @param blockId - * @param filters - * - * @virtual + * Save topic + * @param row */ - public abstract getAggregateDocuments(policyId: string, blockId: string, filters: unknown): Promise; + public static async saveTopic(row: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveTopic.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get aggregate document by policy identifier - * @param policyId Policy identifier - * @returns Aggregate documents + * Update topic + * @param row */ - public abstract getAggregateDocumentsByPolicy(policyId: string): Promise; + public static async updateTopic(row: TopicCollection): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTopic.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Remove Aggregate Documents - * @param removeMsp - * - * @virtual + * Get schema + * @param item */ - public abstract removeAggregateDocuments(removeMsp: AggregateVC[]): Promise; + public static createSchema(item: Partial): SchemaCollection { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createSchema.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Remove Aggregate Document - * @param hash - * @param blockId - * - * @virtual + * Get schema + * @param items */ - public abstract removeAggregateDocument(hash: string, blockId: string): Promise; + public static async saveSchema(items: SchemaCollection): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveSchema.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Create Aggregate Documents + * Get schema * @param item - * @param blockId - * - * @virtual */ - public abstract createAggregateDocuments(item: VcDocumentCollection & { blockId: string }, blockId: string): Promise; + public static async saveSchemas(item: SchemaCollection[]): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveSchemas.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Vc Document - * @param filters - * - * @virtual + * Get schema + * @param item */ - public abstract getVcDocument(filters: Partial): Promise; + public static async createAndSaveSchema(item: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createAndSaveSchema.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Vp Document + * Get schema * @param filters - * - * @virtual + * @param options */ - public abstract getVpDocument(filters: Partial): Promise; + public static async getSchemasAndCount(filters?: Partial, options?: unknown): Promise<[SchemaCollection[], number]> { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemasAndCount.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Approval Document - * @param filters - * - * @virtual + * Get schema + * @param ids */ - public abstract getApprovalDocument(filters: Partial): Promise; + public static async getSchemasByIds(ids: string[]): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemasByIds.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Vc Documents - * @param aggregation - * @virtual + * Get schema + * @param id */ - public abstract getVcDocumentsByAggregation(aggregation: Partial[]): Promise; + public static async getSchemaById(id: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemaById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Vp Documents - * @param aggregation - * @virtual + * Get schema + * @param filters */ - public abstract getVpDocumentsByAggregation(aggregation: Partial[]): Promise; + public static async getSchemasCount(filters?: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemasCount.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Did Documents - * @param aggregation - * @virtual + * Get schema + * @param topicId + * @param entity */ - public abstract getDidDocumentsByAggregation(aggregation: Partial[]): Promise; + public static async getSchemaByType(topicId: string, entity: SchemaEntity): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemaByType.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Approval Documents - * @param aggregation - * @virtual + * Get system schema + * @param entity */ - public abstract getApprovalDocumentsByAggregation(aggregation: Partial[]): Promise; + public static async getSystemSchema(entity: SchemaEntity): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSystemSchema.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Vc Documents + * Get schemas * @param filters * @param options - * @param countResult - * @virtual */ - public abstract getVcDocuments(filters: Partial, options?: unknown, countResult?: boolean): Promise; + public static async getSchemas(filters?: Partial, options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemas.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Vp Documents - * @param filters - * - * @param options - * @param countResult - * @virtual + * Delete schemas + * @param id */ - public abstract getVpDocuments(filters: Partial, options?: unknown, countResult?: boolean): Promise; + public static async deleteSchemas(id: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.deleteSchemas.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Did Documents - * @param filters - * - * @param options - * @param countResult - * @virtual + * Get user role in policy + * @param policyId + * @param did */ - public abstract getDidDocuments(filters: Partial, options?: unknown, countResult?: boolean): Promise; + public static async getUserRole(policyId: string, did: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getUserRole.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Did Document - * @param did + * Update policy + * @param policyId + * @param data */ - public abstract getDidDocument(did: string): Promise; + public static async updatePolicyConfig(policyId: string, data: Policy): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updatePolicyConfig.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Approval Documents - * @param filters - * @param options - * @param countResult + * Create Virtual User + * @param policyId + * @param username + * @param did + * @param hederaAccountId + * @param hederaAccountKey + * @param active + * @param systemMode + * * @virtual */ - public abstract getApprovalDocuments(filters: Partial, options?: unknown, countResult?: boolean): Promise; + public static async createVirtualUser( + policyId: string, + username: string, + did: string, + hederaAccountId: string, + hederaAccountKey: string, + active: boolean, + systemMode?: boolean + ): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createVirtualUser.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Document States - * @param filters - * @param options + * Save Virtual Message + * @param dryRun + * @param message * * @virtual */ - public abstract getDocumentStates(filters: Partial, options?: unknown): Promise; + public static async saveVirtualMessage(dryRun: string, message: Message): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveVirtualMessage.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Topic - * @param filters + * Get Virtual Messages + * @param dryRun + * @param topicId * * @virtual */ - public abstract getTopic( - filters: { - /** - * policyId - */ - policyId?: string, - /** - * type - */ - type?: TopicType, - /** - * name - */ - name?: string, - /** - * owner - */ - owner?: string, - /** - * topicId - */ - topicId?: string - }): Promise; + public static async getVirtualMessages(dryRun: string, topicId: string | TopicId): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVirtualMessages.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Topics - * @param filters + * Get Virtual Message + * @param dryRun + * @param messageId * * @virtual */ - public abstract getTopics( - filters: { - /** - * policyId - */ - policyId?: string, - /** - * type - */ - type?: TopicType, - /** - * name - */ - name?: string, - /** - * owner - */ - owner?: string, - /** - * topicId - */ - topicId?: string - }): Promise; + public static async getVirtualMessage(dryRun: string, messageId: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVirtualMessage.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get topic by id - * @param topicId + * Get tokens + * @param filters Filters + * @returns Tokens */ - public abstract getTopicById(topicId: string): Promise; + public static async getTokens(filters?: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTokens.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** * Get Token * @param tokenId - * @param dryRun */ - public abstract getToken(tokenId: string, dryRun?: string): Promise; + public static async getToken(tokenId: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getToken.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Save topic - * @param row + * Get Token by ID + * @param id */ - public static async saveTopic(row: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveTopic.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async getTokenById(id: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTokenById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Save Topic - * @param topic - * - * @virtual + * Get Contract by ID + * @param id */ - public abstract saveTopic(topic: TopicCollection): Promise; + public static async getContractById(id: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getContractById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Update topic - * @param row + * Create MultiPolicyTransaction + * @param transaction */ - public static async updateTopic(row: TopicCollection): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTopic.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async createMultiPolicyTransaction(transaction: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createMultiPolicyTransaction.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get schema - * @param iri - * @param topicId + * Get MultiPolicyTransaction + * @param policyId + * @param owner */ - public abstract getSchemaByIRI(iri: string, topicId?: string): Promise; + public static async getMultiPolicyTransactions(policyId: string, owner: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getMultiPolicyTransactions.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get schema - * @param item + * Get MultiPolicyTransaction count + * @param policyId */ - public static createSchema(item: Partial): SchemaCollection { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createSchema.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async countMultiPolicyTransactions(policyId: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.countMultiPolicyTransactions.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get schema - * @param items + * Create createModules + * @param module */ - public static async saveSchema(items: SchemaCollection): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveSchema.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async createModules(module: PolicyModule): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createModules.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get schema - * @param item + * Get Modules + * @param filters + * @param options */ - public static async saveSchemas(item: SchemaCollection[]): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveSchemas.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async getModulesAndCount(filters?: Partial, options?: unknown): Promise<[PolicyModule[], number]> { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getModulesAndCount.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get schema - * @param item + * Get Module By UUID + * @param uuid */ - public static async createAndSaveSchema(item: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createAndSaveSchema.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async getModuleByUUID(uuid: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getModuleByUUID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get schema + * Get Module * @param filters - * @param options */ - public static async getSchemasAndCount(filters?: Partial, options?: unknown): Promise<[SchemaCollection[], number]> { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemasAndCount.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async getModule(filters: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getModuleByUUID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get schema - * @param ids + * Delete Module + * @param module */ - public static async getSchemasByIds(ids: string[]): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemasByIds.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async removeModule(module: PolicyModule): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeModule.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get schema - * @param id + * Get Modules + * @param filters + * @param options */ - public static async getSchemaById(id: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemaById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } - - /** - * Get schema - * @param filters - */ - public static async getSchemasCount(filters?: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemasCount.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async getModules(filters?: Partial, options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getModules.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get schema - * @param topicId - * @param entity + * Update Module + * @param row */ - public static async getSchemaByType(topicId: string, entity: SchemaEntity): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemaByType.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async updateModule(row: PolicyModule): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateModule.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get system schema - * @param entity + * Create Tool + * @param tool */ - public static async getSystemSchema(entity: SchemaEntity): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSystemSchema.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async createTool(tool: PolicyTool): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createTool.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get schemas + * Get Tools * @param filters * @param options */ - public static async getSchemas(filters?: Partial, options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getSchemas.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async getToolsAndCount(filters?: PolicyTool, options?: unknown): Promise<[PolicyTool[], number]> { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getToolsAndCount.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Delete schemas - * @param id + * Get Tool By UUID + * @param uuid */ - public static async deleteSchemas(id: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.deleteSchemas.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async getToolByUUID(uuid: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getToolByUUID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get schema - * @param topicId - * @param entity + * Get Tool + * @param filters */ - public abstract getSchemaByType(topicId: string, entity: SchemaEntity): Promise; + public static async getTool(filters: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTool.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Set user in group - * - * @param group - * - * @virtual + * Delete Tool + * @param tool */ - public abstract setUserInGroup(group: unknown): Promise; + public static async removeTool(tool: PolicyTool): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeTool.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Set Active Group - * - * @param policyId - * @param did - * @param uuid - * - * @virtual + * Get Tools + * @param filters + * @param options */ - public abstract setActiveGroup(policyId: string, did: string, uuid: string): Promise; + public static async getTools(filters?: Partial, options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTools.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Group By UUID - * @param policyId - * @param uuid - * - * @virtual + * Update Tool + * @param row */ - public abstract getGroupByID(policyId: string, uuid: string): Promise; + public static async updateTool(row: PolicyTool): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTool.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Group By Name - * @param policyId - * @param groupName - * - * @virtual + * Create tag + * @param tag */ - public abstract getGlobalGroup(policyId: string, groupName: string): Promise; + public static async createTag(tag: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createTag.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get User In Group - * @param policyId - * @param did - * @param uuid - * - * @virtual + * Delete tag + * @param tag */ - public abstract getUserInGroup(policyId: string, did: string, uuid: string): Promise; + public static async removeTag(tag: Tag): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeTag.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Check User In Group - * @param group - * - * @virtual + * Get tag By UUID + * @param uuid */ - public abstract checkUserInGroup(group: { policyId: string, did: string, owner: string, uuid: string }): Promise; + public static async getTagById(uuid: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTagById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Groups By User - * @param policyId - * @param did + * Get tags + * @param filters * @param options - * - * @virtual */ - public abstract getGroupsByUser(policyId: string, did: string, options?: unknown): Promise; + public static async getTags(filters?: Partial, options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTags.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Active Group By User - * @param policyId - * @param did - * - * @virtual + * Update tag + * @param tag */ - public abstract getActiveGroupByUser(policyId: string, did: string): Promise; + public static async updateTag(tag: Tag): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTag.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get members - * - * @param group - * - * @virtual + * Update tags + * @param tags */ - public abstract getAllMembersByGroup(group: PolicyRolesCollection): Promise; + public static async updateTags(tags: Tag[]): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTag.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get all policy users - * @param policyId - * - * @virtual + * Create tag cache + * @param tag */ - public abstract getAllPolicyUsers(policyId: string): Promise; + public static async createTagCache(tag: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createTagCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get all policy users - * @param policyId - * @param uuid - * @param role - * - * @virtual + * Get tags + * @param filters + * @param options */ - public abstract getAllUsersByRole(policyId: string, uuid: string, role: string): Promise; + public static async getTagCache(filters?: Partial , options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTagCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get all policy users by role - * @param policyId - * @param role - * - * @virtual + * Update tag cache + * @param row */ - public abstract getUsersByRole(policyId: string, role: string): Promise; + public static async updateTagCache(row: TagCache): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTagCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get user role in policy - * @param policyId - * @param did + * Update tags cache + * @param rows */ - public static async getUserRole(policyId: string, did: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getUserRole.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + public static async updateTagsCache(rows: TagCache[]): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTagsCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); } /** - * Get user roles - * @param policyId - * @param did - * @returns - * - * @virtual + * Create Theme + * @param theme */ - public abstract getUserRoles(policyId: string, did: string): Promise; + public static async createTheme(theme: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createTheme.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Delete user - * @param group - * - * @virtual + * Get Theme + * @param filters */ - public abstract deleteGroup(group: PolicyRolesCollection): Promise; + public static async getTheme(filters: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTheme.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Create invite token - * @param policyId - * @param uuid - * @param owner - * @param role - * - * @virtual + * Get Themes + * @param filters */ - public abstract createInviteToken(policyId: string, uuid: string, owner: string, role: string): Promise; + public static async getThemes(filters: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getThemes.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Parse invite token - * @param policyId - * @param invitationId - * - * @virtual + * Delete Theme + * @param theme */ - public abstract parseInviteToken(policyId: string, invitationId: string): Promise; + public static async removeTheme(theme: Theme): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeTheme.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get MultiSign Status by document or user - * @param uuid - * @param documentId - * @param userId - * - * @virtual + * Update Theme + * @param row */ - public abstract getMultiSignStatus(uuid: string, documentId: string, userId: string): Promise; + public static async updateTheme(row: Theme): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTheme.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get MultiSign Statuses - * @param uuid - * @param documentId - * @param group + * Save suggestions config + * @param config + * @returns config + */ + public static async setSuggestionsConfig(config: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.setSuggestionsConfig.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get suggestions config + * @param did + * @returns config + */ + public static async getSuggestionsConfig(did: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.setSuggestionsConfig.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get retire pools + * @param tokenIds Token identifiers + * @returns Retire pools + */ + public static async getRetirePools(tokenIds: string[]): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getRetirePools.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Save Artifact + * @param artifact Artifact + * @returns Saved Artifact + */ + public static async saveArtifact(artifact: ArtifactCollection): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveArtifact.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Save Artifacts + * @param artifacts Artifacts + * @returns Saved Artifacts + */ + public static async saveArtifacts(artifacts: ArtifactCollection[]): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveArtifact.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get Artifact + * @param filters Filters + * @returns Artifact + */ + public static async getArtifact(filters?: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getArtifact.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get Artifacts + * @param filters Filters + * @param options Options + * @returns Artifacts + */ + public static async getArtifacts(filters?: Partial, options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getArtifacts.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get Artifacts + * @param filters Filters + * @param options Options + * @returns Artifacts + */ + public static async getArtifactsAndCount(filters?: Partial, options?: unknown): Promise<[ArtifactCollection[], number]> { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getArtifactsAndCount.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Remove Artifact + * @param artifact Artifact + */ + public static async removeArtifact(artifact?: ArtifactCollection): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeArtifact.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Save Artifact File + * @param uuid File UUID + * @param data Data + */ + public static async saveArtifactFile(uuid: string, data: Buffer): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveArtifactFile.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get Artifact File By UUID + * @param uuid File UUID + * @returns Buffer + */ + public static async getArtifactFileByUUID(uuid: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getArtifactFileByUUID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get Multi Policy link + * @param instanceTopicId + * @param owner + * @returns MultiPolicy + */ + public static async getMultiPolicy(instanceTopicId: string, owner: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getArtifactFileByUUID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Create Multi Policy object + * @param multiPolicy + * @returns MultiPolicy + */ + public static createMultiPolicy(multiPolicy: MultiPolicy): MultiPolicy { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createMultiPolicy.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Save Multi Policy object + * @param multiPolicy + * @returns multiPolicy + */ + public static async saveMultiPolicy(multiPolicy: MultiPolicy): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveMultiPolicy.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get Module By ID + * @param id + */ + public static async getModuleById(id: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getModuleById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get Tool By ID + * @param id + */ + public static async getToolById(id: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getToolById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Update MultiPolicyTransaction + * @param item + */ + public static async updateMultiPolicyTransactions(item: MultiPolicyTransaction): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateMultiPolicyTransactions.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Update schema + * @param id + * @param item + */ + public static async updateSchema(id: string, item: SchemaCollection): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateSchema.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Update schemas + * @param items Schemas + */ + public static async updateSchemas(items: SchemaCollection[]): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateSchemas.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get policy caches + * @param filters Filters + * @returns Policy caches + */ + public static async getPolicyCaches(filters?: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyCaches.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Save policy cache + * @param entity Entity + * @returns Policy cache + */ + public static async savePolicyCache(entity: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.savePolicyCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get policy cache + * @param filters Filters + * @returns Policy cache + */ + public static async getPolicyCache(filters: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.savePolicyCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get policy cache data + * @param filters Filters + * @param options Options + * @returns Policy cache data + */ + public static async getPolicyCacheData(filters?: Partial, options?: PolicyCacheData): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyCacheData.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Save policy cache data + * @param entity Policy cache data + * @returns Policy cache data + */ + public static async savePolicyCacheData(entity: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.savePolicyCacheData.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get and count policy cache data + * @param filters Filters + * @param options Options + * @returns Policy cache data and count + */ + public static async getAndCountPolicyCacheData(filters?: Partial, options?: unknown): Promise<[PolicyCacheData[], number]> { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getAndCountPolicyCacheData.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Clear policy caches + * @param filters Filters + */ + public static async clearPolicyCaches(filters?: Partial | string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.clearPolicyCaches.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Clear policy cache data + * @param cachePolicyId Cache policy id + */ + public static async clearPolicyCacheData(cachePolicyId: string) { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.clearPolicyCacheData.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Update VP Documents + * @param value + * @param filters + * @param dryRun + */ + public static async updateVpDocuments(value: unknown, filters: Partial, dryRun?: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateVpDocuments.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Create Record + * @param record + */ + public static async createRecord(record: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createRecord.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get Record + * @param filters Filters + * @param options Options + * @returns Record + */ + public static async getRecord(filters?: Partial, options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getRecord.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get Group By UUID + * @param policyId + * @param uuid * - * @virtual + * @returns Group */ - public abstract getMultiSignDocuments(uuid: string, documentId: string, group: string): Promise + public static async getGroupByID(policyId: string, uuid: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getGroupByID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get multi sign documents by document identifiers - * @param documentIds Document identifiers - * @returns Multi sign documents + * Get Groups By User + * @param policyId + * @param did + * @param options + * + * @returns Groups */ - public abstract getMultiSignDocumentsByDocumentIds(documentIds: string[]): Promise + public static async getGroupsByUser(policyId: string, did: string, options?: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getGroupsByUser.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get MultiSign Statuses by group - * @param uuid - * @param group + * Save VCs + * @param data * - * @virtual + * @returns VCs */ - public abstract getMultiSignDocumentsByGroup(uuid: string, group: string): Promise + // tslint:disable-next-line:adjacent-overload-signatures + public static async saveVCs(data: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveVCs.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Set MultiSign Status by document + * Save VPs + * @param data + * + * @returns VPs + */ + public static async saveVPs(data: Partial): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveVPs.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get Did Document + * @param did + */ + public static async getDidDocument(did: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getDidDocument.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Assign entity + * @param type + * @param entityId + * @param assigned + * @param did + * @param owner + */ + public static async assignEntity(type: AssignedEntityType, entityId: string, assigned: boolean, did: string, owner: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.assignEntity.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Check entity + * @param type + * @param entityId + * @param did + */ + public static async getAssignedEntity(type: AssignedEntityType, entityId: string, did: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getAssignedEntity.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get assigned entities + * @param did + * @param type + */ + public static async getAssignedEntities(did: string, type?: AssignedEntityType): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getAssignedEntities.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Remove assign entity + * @param type + * @param entityId + * @param did + * @param owner + */ + public static async removeAssignEntity(type: AssignedEntityType, entityId: string, did: string, owner?: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeAssignEntity.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Save file * @param uuid - * @param documentId - * @param group - * @param status + * @param buffer * - * @virtual + * @returns file ID */ - public abstract setMultiSigStatus(uuid: string, documentId: string, group: string, status: string): Promise + public static async saveFile(uuid: string, buffer: Buffer): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveFile.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Save mint request - * @param data Mint request - * @returns Saved mint request + * Load file + * @param id + * + * @returns file ID */ - public abstract saveMintRequest(data: Partial): Promise; + public static async loadFile(id: unknown): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.loadFile.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Create Residue object + * Get policy tests * @param policyId - * @param blockId - * @param userId - * @param value - * @param document + * @returns tests */ - public abstract createResidue( - policyId: string, - blockId: string, - userId: string, - value: unknown, - document: unknown - ): SplitDocuments; + public static async getPolicyTests(policyId: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyTests.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get Residue objects + * Assign entity + * @param config + * @param buffer + */ + public static async createPolicyTest(config: { [key: string]: unknown }, buffer: Buffer): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createPolicyTest.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get policy test * @param policyId - * @param blockId - * @param userId + * @param id + * @returns tests */ - public abstract getResidue(policyId: string, blockId: string, userId: string): Promise; + public static async getPolicyTest(policyId: string, id: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyTest.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get External Topic + * Get policy test * @param policyId - * @param blockId - * @param userId + * @param status + * @returns tests + */ + public static async getPolicyTestsByStatus(policyId: string, status: PolicyTestStatus): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyTestsByStatus.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Get policy tests + * @param resultId * - * @virtual + * @returns tests */ - public abstract getExternalTopic(policyId: string, blockId: string, userId: string): Promise + public static async getPolicyTestByRecord(resultId: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyTestByRecord.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Get split documents in policy - * @param policyId Policy identifier - * @returns Split documents + * Get policy tests + * @param policyId + * @param id + * @returns tests */ - public abstract getSplitDocumentsByPolicy(policyId: string): Promise + public static async deletePolicyTest(policyId: string, id: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.deletePolicyTest.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Set Residue objects - * @param residue + * Get policy tests + * @param test + * + * @returns tests */ - public abstract setResidue(residue: SplitDocuments[]): Promise + public static async updatePolicyTest(test: PolicyTest): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updatePolicyTest.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Remove Residue objects - * @param residue + * Get policy tests + * @param policyId + * + * @returns tests */ - public abstract removeResidue(residue: SplitDocuments[]): Promise; + public static async deletePolicyTests(policyId: string): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.deletePolicyTests.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } /** - * Create tag - * @param tag + * Get policy tests + * @returns tests */ - public abstract createTag(tag: Tag): Promise; + public static async removePolicyTests(tests: PolicyTest[]): Promise { + throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removePolicyTests.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); + } + + /** + * Set Dry Run id + * @param id + */ + public abstract setDryRun(id: string): void; + + /** + * Get Dry Run id + * @returns Dry Run id + */ + public abstract getDryRun(): string; + + /** + * Set System Mode + * @param systemMode + */ + public abstract setSystemMode(systemMode: boolean): void; + + /** + * Clear Dry Run table + * @param all + */ + public abstract clear(all: boolean): Promise; + + /** + * Overriding the findOne method + * @param entityClass + * @param filters + * @param options + */ + public abstract findOne(entityClass: new () => T, filters: Partial, options: unknown): Promise; + + /** + * Overriding the find method + * @param entityClass + * @param filters + * @param options + */ + public abstract find(entityClass: new () => T, filters: Partial | unknown, options?: unknown): Promise; + + /** + * Overriding the create method + * @param entityClass + * @param item + */ + public abstract create(entityClass: new () => T, item: Partial): T; /** - * Get tags - * @param filters - * @param options + * Overriding the update method + * @param entityClass + * @param criteria + * @param row */ - public abstract getTags(filters?: Partial, options?: unknown): Promise + public abstract update(entityClass: new () => T, criteria: Partial, row: unknown | unknown[]): Promise; /** - * Get tags - * @param filters - * @param options + * Update many method + * @param entityClass + * @param entities + * @param filter */ - public abstract getTagCache(filters?: Partial, options?: unknown): Promise + public abstract updateMany(entityClass: new () => T, entities: T[], filter: FilterQuery): Promise; /** - * Delete tag - * @param tag + * Overriding the remove method + * @param entityClass + * @param entities */ - public abstract removeTag(tag: Tag): Promise + public abstract remove(entityClass: new () => T, entities: T | T[]): Promise; /** - * Update tag - * @param tag + * Overriding the count method + * @param entityClass + * @param filters + * @param options */ - public abstract updateTag(tag: Tag): Promise + public abstract count(entityClass: new () => T, filters: Partial, options?: unknown): Promise; /** - * Update tags - * @param tags + * Overriding the findAndCount method + * @param entityClass + * @param filters + * @param options */ - public abstract updateTags(tags: Tag[]): Promise + public abstract findAndCount(entityClass: new () => T, filters: Partial | unknown, options?: unknown): Promise<[T[], number]>; /** - * Get tag By UUID - * @param uuid + * Overriding the findAll method + * @param entityClass + * @param options */ - public abstract getTagById(uuid: string): Promise + public abstract findAll(entityClass: new () => T, options?: unknown): Promise; /** - * Create tag cache - * @param tag + * Find data by aggregation + * @param entityClass Entity class + * @param aggregation aggregate filter + * @returns */ - public abstract createTagCache(tag: Partial): Promise; + public abstract aggregate(entityClass: new () => T, aggregation: Partial[]): Promise; /** - * Update tag cache - * @param row + * Overriding the save method + * @param entityClass + * @param item + * @param filter */ - public abstract updateTagCache(row: TagCache): Promise + public abstract save(entityClass: new () => T, item: unknown | unknown[], filter?: Partial): Promise /** - * Get VP mint information - * @param vpDocument VP - * @returns Serials and amount + * Save many + * @param entityClass + * @param item + * @param filter */ - public abstract getVPMintInformation( - vpDocument: VpDocument - ): Promise< - [ - serials: { serial: number; tokenId: string }[], - amount: number, - error: string, - wasTransferNeeded: boolean, - transferSerials: number[], - transferAmount: number, - tokenIds: string[], - target: string, - ] - > + public abstract saveMany(entityClass: new () => T, item: unknown[], filter?: Partial): Promise /** - * Set MultiSign Status by user + * Save Block State + * @param policyId * @param uuid - * @param documentId - * @param user - * @param status - * @param document + * @param state * * @virtual */ - public abstract setMultiSigDocument( - uuid: string, - documentId: string, - user: { id: string, did: string, group: string, username: string }, - status: string, - document: IVC - ): Promise + public abstract saveBlockState(policyId: string, uuid: string, state: unknown): Promise; /** - * Get Active External Topic + * Get Block State * @param policyId - * @param blockId + * @param uuid * * @virtual */ - public abstract getActiveExternalTopics( - policyId: string, - blockId: string - ): Promise + public abstract getBlockState(policyId: string, uuid: string): Promise; /** - * Create External Topic - * @param row + * Get block states + * @param policyId Policy identifier + * @returns Block states + */ + public abstract getBlockStates(policyId: string): Promise; + + /** + * Get Virtual User + * @param did * * @virtual */ - public abstract createExternalTopic(row: unknown): Promise + public abstract getVirtualUser(did: string): Promise; /** - * Update External Topic - * @param item + * Get Key from Virtual User + * @param did + * @param keyName * * @virtual */ - public abstract updateExternalTopic(item: ExternalDocument): Promise + public abstract getVirtualKey(did: string, keyName: string): Promise; /** - * get document aggregation filters for analytics - * @param nameFilterMap - * @param nameFilterAttributes - * @param existingAttributes - * - * @returns Result + * Get virtual keys + * @param filters Filters + * @returns Virtual keys */ - public abstract getAttributesAggregationFilters(nameFilterMap: string, nameFilterAttributes: string, existingAttributes: string[] | []): unknown[] + public abstract getVirtualKeys(filters: Partial): Promise; /** - * get tasks aggregation filters - * @param nameFilter - * @param processTimeout + * Set Key from Virtual User + * @param did + * @param keyName + * @param key * - * @returns Result + * @virtual */ - public abstract getTasksAggregationFilters(nameFilter: string, processTimeout: number): unknown[] + public abstract setVirtualKey(did: string, keyName: string, key: string): Promise; /** - * get document aggregation filters - * @param props + * Get Virtual Hedera Account + * @param hederaAccountId * - * @returns Result + * @virtual */ - public abstract getDocumentAggregationFilters(props: IGetDocumentAggregationFilters): void + public abstract getVirtualHederaAccountInfo(hederaAccountId: string): Promise; /** - * get document aggregation filters for analytics - * @param nameFilter - * @param uuid + * Virtual Associate Token + * @param hederaAccountId + * @param token * - * @returns Result + * @virtual */ - public abstract getAnalyticsDocAggregationFilters(nameFilter: string, uuid: string): unknown[] + public abstract virtualAssociate(hederaAccountId: string, token: TokenCollection): Promise; /** - * Update policy - * @param policyId - * @param data + * Virtual Dissociate Token + * @param hederaAccountId + * @param tokenId + * + * @virtual */ - public static async updatePolicyConfig(policyId: string, data: Policy): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updatePolicyConfig.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract virtualDissociate(hederaAccountId: string, tokenId: string): Promise; /** - * Create Virtual User - * @param policyId - * @param username - * @param did + * Virtual Freeze Token * @param hederaAccountId - * @param hederaAccountKey - * @param active - * @param systemMode + * @param tokenId * * @virtual */ - public static async createVirtualUser( - policyId: string, - username: string, - did: string, - hederaAccountId: string, - hederaAccountKey: string, - active: boolean, - systemMode?: boolean - ): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createVirtualUser.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract virtualFreeze(hederaAccountId: string, tokenId: string): Promise; /** - * Create Virtual User - * @param policyId - * @param username - * @param did + * Virtual Unfreeze Token * @param hederaAccountId - * @param hederaAccountKey - * @param active + * @param tokenId * * @virtual */ - public abstract createVirtualUser(username: string, did: string, hederaAccountId: string, hederaAccountKey: string, active: boolean): Promise + public abstract virtualUnfreeze(hederaAccountId: string, tokenId: string): Promise; /** - * Save Virtual Message - * @param dryRun - * @param message + * Virtual GrantKyc Token + * @param hederaAccountId + * @param tokenId * * @virtual */ - public static async saveVirtualMessage(dryRun: string, message: Message): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveVirtualMessage.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract virtualGrantKyc(hederaAccountId: string, tokenId: string): Promise; /** - * Get Virtual Messages - * @param dryRun - * @param topicId + * Virtual RevokeKyc Token + * @param hederaAccountId + * @param tokenId * * @virtual */ - public static async getVirtualMessages(dryRun: string, topicId: string | TopicId): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVirtualMessages.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract virtualRevokeKyc(hederaAccountId: string, tokenId: string): Promise; /** - * Get Virtual Message - * @param dryRun - * @param messageId - * + * Save Block State + * @param {string} policyId - policy ID + * @param {string} blockId - block UUID + * @param {string} did - user DID + * @param {string} name - variable name + * @param {unknown} value - variable value + * @param {boolean} isLongValue - if long value * @virtual */ - public static async getVirtualMessage(dryRun: string, messageId: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getVirtualMessage.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract saveBlockCache(policyId: string, blockId: string, did: string, name: string, value: unknown, isLongValue: boolean): Promise; /** - * Get tokens - * @param filters Filters - * @returns Tokens + * Get Block State + * @param {string} policyId - policy ID + * @param {string} blockId - block UUID + * @param {string} did - user DID + * @param {string} name - variable name + * + * @returns {BlockCache | null} - variable value + * @virtual */ - public static async getTokens(filters?: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTokens.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getBlockCache(policyId: string, blockId: string, did: string, name: string): Promise; /** - * Get Token - * @param tokenId + * Save Document State + * @param row + * + * @virtual */ - public static async getToken(tokenId: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getToken.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract saveDocumentState(row: Partial): Promise; /** - * Get Token by ID - * @param id + * Create Token + * @param token + * @returns */ - public static async getTokenById(id: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTokenById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract createToken(token: unknown): Promise; /** - * Get Contract by ID - * @param id + * Update Approval VC + * @param row + * + * @virtual */ - public static async getContractById(id: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getContractById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract updateApproval(row: ApprovalDocumentCollection): Promise; /** - * Create MultiPolicyTransaction - * @param transaction + * Update VC + * @param row + * + * @virtual */ - public static async createMultiPolicyTransaction(transaction: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createMultiPolicyTransaction.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract updateVC(row: VcDocumentCollection): Promise; /** - * Get MultiPolicyTransaction - * @param policyId - * @param owner + * Update VP + * @param row + * + * @virtual */ - public static async getMultiPolicyTransactions(policyId: string, owner: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getMultiPolicyTransactions.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract updateVP(row: VpDocumentCollection): Promise; /** - * Get MultiPolicyTransaction count - * @param policyId + * Update Did + * @param row + * + * @virtual */ - public static async countMultiPolicyTransactions(policyId: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.countMultiPolicyTransactions.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract updateDid(row: DidDocumentCollection): Promise; /** - * Create createModules - * @param module + * Save Approval VC + * @param row + * + * @virtual */ - public static async createModules(module: PolicyModule): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createModules.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract saveApproval(row: Partial): Promise; /** - * Get Modules - * @param filters - * @param options + * Save VC + * @param row + * + * @virtual */ - public static async getModulesAndCount(filters?: Partial, options?: unknown): Promise<[PolicyModule[], number]> { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getModulesAndCount.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract saveVC(row: Partial): Promise; /** - * Get Module By UUID - * @param uuid + * Save VP + * @param row + * + * @virtual */ - public static async getModuleByUUID(uuid: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getModuleByUUID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract saveVP(row: Partial): Promise; /** - * Get Module - * @param filters + * Save Did + * @param row + * + * @virtual */ - public static async getModule(filters: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getModuleByUUID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract saveDid(row: Partial): Promise; /** - * Delete Module - * @param module + * Get Policy + * @param policyId + * + * @virtual */ - public static async removeModule(module: PolicyModule): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeModule.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getPolicy(policyId: string): Promise; /** - * Get Modules + * Get Aggregate Documents + * @param policyId + * @param blockId * @param filters - * @param options + * + * @virtual */ - public static async getModules(filters?: Partial, options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getModules.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getAggregateDocuments(policyId: string, blockId: string, filters: unknown): Promise; /** - * Update Module - * @param row + * Get aggregate document by policy identifier + * @param policyId Policy identifier + * @returns Aggregate documents */ - public static async updateModule(row: PolicyModule): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateModule.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getAggregateDocumentsByPolicy(policyId: string): Promise; /** - * Create Tool - * @param tool + * Remove Aggregate Documents + * @param removeMsp + * + * @virtual */ - public static async createTool(tool: PolicyTool): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createTool.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract removeAggregateDocuments(removeMsp: AggregateVC[]): Promise; /** - * Get Tools - * @param filters - * @param options + * Remove Aggregate Document + * @param hash + * @param blockId + * + * @virtual */ - public static async getToolsAndCount(filters?: PolicyTool, options?: unknown): Promise<[PolicyTool[], number]> { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getToolsAndCount.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract removeAggregateDocument(hash: string, blockId: string): Promise; /** - * Get Tool By UUID - * @param uuid + * Create Aggregate Documents + * @param item + * @param blockId + * + * @virtual */ - public static async getToolByUUID(uuid: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getToolByUUID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract createAggregateDocuments(item: VcDocumentCollection & {blockId: string}, blockId: string): Promise; /** - * Get Tool + * Get Vc Document * @param filters + * + * @virtual */ - public static async getTool(filters: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTool.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getVcDocument(filters: Partial): Promise; /** - * Delete Tool - * @param tool + * Get Vp Document + * @param filters + * + * @virtual */ - public static async removeTool(tool: PolicyTool): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeTool.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getVpDocument(filters: Partial): Promise; /** - * Get Tools + * Get Approval Document * @param filters - * @param options + * + * @virtual */ - public static async getTools(filters?: Partial, options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTools.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getApprovalDocument(filters: Partial): Promise; /** - * Update Tool - * @param row + * Get Vc Documents + * @param aggregation + * @virtual */ - public static async updateTool(row: PolicyTool): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTool.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getVcDocumentsByAggregation(aggregation: Partial[]): Promise; /** - * Create tag - * @param tag + * Get Vp Documents + * @param aggregation + * @virtual */ - public static async createTag(tag: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createTag.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getVpDocumentsByAggregation(aggregation: Partial[]): Promise; /** - * Delete tag - * @param tag + * Get Did Documents + * @param aggregation + * @virtual */ - public static async removeTag(tag: Tag): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeTag.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getDidDocumentsByAggregation(aggregation: Partial[]): Promise; /** - * Get tag By UUID - * @param uuid + * Get Approval Documents + * @param aggregation + * @virtual */ - public static async getTagById(uuid: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTagById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getApprovalDocumentsByAggregation(aggregation: Partial[]): Promise; /** - * Get tags + * Get Vc Documents * @param filters * @param options + * @param countResult + * @virtual */ - public static async getTags(filters?: Partial, options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTags.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } - - /** - * Update tag - * @param tag - */ - public static async updateTag(tag: Tag): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTag.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } - - /** - * Update tags - * @param tags - */ - public static async updateTags(tags: Tag[]): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTag.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getVcDocuments(filters: Partial, options?: unknown, countResult?: boolean): Promise; /** - * Create tag cache - * @param tag + * Get Vp Documents + * @param filters + * + * @param options + * @param countResult + * @virtual */ - public static async createTagCache(tag: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createTagCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getVpDocuments(filters: Partial, options?: unknown, countResult?: boolean): Promise; /** - * Get tags + * Get Did Documents * @param filters + * * @param options + * @param countResult + * @virtual */ - public static async getTagCache(filters?: Partial , options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTagCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getDidDocuments(filters: Partial, options?: unknown, countResult?: boolean): Promise; /** - * Update tag cache - * @param row + * Get Did Document + * @param did */ - public static async updateTagCache(row: TagCache): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTagCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getDidDocument(did: string): Promise; /** - * Update tags cache - * @param rows + * Get Approval Documents + * @param filters + * @param options + * @param countResult + * @virtual */ - public static async updateTagsCache(rows: TagCache[]): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTagsCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getApprovalDocuments(filters: Partial, options?: unknown, countResult?: boolean): Promise; /** - * Create Theme - * @param theme + * Get Document States + * @param filters + * @param options + * + * @virtual */ - public static async createTheme(theme: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createTheme.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getDocumentStates(filters: Partial, options?: unknown): Promise; /** - * Get Theme + * Get Topic * @param filters + * + * @virtual */ - public static async getTheme(filters: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getTheme.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getTopic( + filters: { + /** + * policyId + */ + policyId?: string, + /** + * type + */ + type?: TopicType, + /** + * name + */ + name?: string, + /** + * owner + */ + owner?: string, + /** + * topicId + */ + topicId?: string + }): Promise; /** - * Get Themes + * Get Topics * @param filters + * + * @virtual */ - public static async getThemes(filters: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getThemes.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getTopics( + filters: { + /** + * policyId + */ + policyId?: string, + /** + * type + */ + type?: TopicType, + /** + * name + */ + name?: string, + /** + * owner + */ + owner?: string, + /** + * topicId + */ + topicId?: string + }): Promise; /** - * Delete Theme - * @param theme + * Get topic by id + * @param topicId */ - public static async removeTheme(theme: Theme): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeTheme.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getTopicById(topicId: string): Promise; /** - * Update Theme - * @param row + * Get Token + * @param tokenId + * @param dryRun */ - public static async updateTheme(row: Theme): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateTheme.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getToken(tokenId: string, dryRun?: string): Promise; /** - * Save suggestions config - * @param config - * @returns config + * Save Topic + * @param topic + * + * @virtual */ - public static async setSuggestionsConfig(config: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.setSuggestionsConfig.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract saveTopic(topic: TopicCollection): Promise; /** - * Get suggestions config - * @param did - * @returns config + * Get schema + * @param iri + * @param topicId */ - public static async getSuggestionsConfig(did: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.setSuggestionsConfig.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getSchemaByIRI(iri: string, topicId?: string): Promise; /** - * Get retire pools - * @param tokenIds Token identifiers - * @returns Retire pools + * Get schema + * @param topicId + * @param entity */ - public static async getRetirePools(tokenIds: string[]): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getRetirePools.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getSchemaByType(topicId: string, entity: SchemaEntity): Promise; /** - * Save Artifact - * @param artifact Artifact - * @returns Saved Artifact + * Set user in group + * + * @param group + * + * @virtual */ - public static async saveArtifact(artifact: ArtifactCollection): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveArtifact.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract setUserInGroup(group: unknown): Promise; /** - * Save Artifacts - * @param artifacts Artifacts - * @returns Saved Artifacts + * Set Active Group + * + * @param policyId + * @param did + * @param uuid + * + * @virtual */ - public static async saveArtifacts(artifacts: ArtifactCollection[]): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveArtifact.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract setActiveGroup(policyId: string, did: string, uuid: string): Promise; /** - * Get Artifact - * @param filters Filters - * @returns Artifact + * Get Group By UUID + * @param policyId + * @param uuid + * + * @virtual */ - public static async getArtifact(filters?: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getArtifact.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getGroupByID(policyId: string, uuid: string): Promise; /** - * Get Artifacts - * @param filters Filters - * @param options Options - * @returns Artifacts + * Get Group By Name + * @param policyId + * @param groupName + * + * @virtual */ - public static async getArtifacts(filters?: Partial, options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getArtifacts.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getGlobalGroup(policyId: string, groupName: string): Promise; /** - * Get Artifacts - * @param filters Filters - * @param options Options - * @returns Artifacts + * Get User In Group + * @param policyId + * @param did + * @param uuid + * + * @virtual */ - public static async getArtifactsAndCount(filters?: Partial, options?: unknown): Promise<[ArtifactCollection[], number]> { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getArtifactsAndCount.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getUserInGroup(policyId: string, did: string, uuid: string): Promise; /** - * Remove Artifact - * @param artifact Artifact + * Check User In Group + * @param group + * + * @virtual */ - public static async removeArtifact(artifact?: ArtifactCollection): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeArtifact.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract checkUserInGroup(group: {policyId: string, did: string, owner: string, uuid: string}): Promise; /** - * Save Artifact File - * @param uuid File UUID - * @param data Data + * Get Groups By User + * @param policyId + * @param did + * @param options + * + * @virtual */ - public static async saveArtifactFile(uuid: string, data: Buffer): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveArtifactFile.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getGroupsByUser(policyId: string, did: string, options?: unknown): Promise; /** - * Get Artifact File By UUID - * @param uuid File UUID - * @returns Buffer + * Get Active Group By User + * @param policyId + * @param did + * + * @virtual */ - public static async getArtifactFileByUUID(uuid: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getArtifactFileByUUID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getActiveGroupByUser(policyId: string, did: string): Promise; /** - * Get Multi Policy link - * @param instanceTopicId - * @param owner - * @returns MultiPolicy + * Get members + * + * @param group + * + * @virtual */ - public static async getMultiPolicy(instanceTopicId: string, owner: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getArtifactFileByUUID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getAllMembersByGroup(group: PolicyRolesCollection): Promise; /** - * Create Multi Policy object - * @param multiPolicy - * @returns MultiPolicy + * Get all policy users + * @param policyId + * + * @virtual */ - public static createMultiPolicy(multiPolicy: MultiPolicy): MultiPolicy { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createMultiPolicy.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getAllPolicyUsers(policyId: string): Promise; /** - * Save Multi Policy object - * @param multiPolicy - * @returns multiPolicy + * Get all policy users + * @param policyId + * @param uuid + * @param role + * + * @virtual */ - public static async saveMultiPolicy(multiPolicy: MultiPolicy): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveMultiPolicy.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getAllUsersByRole(policyId: string, uuid: string, role: string): Promise; /** - * Get Module By ID - * @param id + * Get all policy users by role + * @param policyId + * @param role + * + * @virtual */ - public static async getModuleById(id: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getModuleById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getUsersByRole(policyId: string, role: string): Promise; /** - * Get Tool By ID - * @param id + * Get user roles + * @param policyId + * @param did + * @returns + * + * @virtual */ - public static async getToolById(id: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getToolById.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getUserRoles(policyId: string, did: string): Promise; /** - * Save mint transaction - * @param transaction Transaction - * @returns Saved transaction + * Delete user + * @param group + * + * @virtual */ - public abstract saveMintTransaction(transaction: Partial): Promise + public abstract deleteGroup(group: PolicyRolesCollection): Promise; /** - * Get mint transactions - * @param filters Filters - * @param options Options - * @returns Mint transactions + * Create invite token + * @param policyId + * @param uuid + * @param owner + * @param role + * + * @virtual */ - public abstract getMintTransactions(filters: Partial, options?: unknown): Promise + public abstract createInviteToken(policyId: string, uuid: string, owner: string, role: string): Promise; /** - * Get mint transactions - * @param filters Filters - * @returns Mint transaction + * Parse invite token + * @param policyId + * @param invitationId + * + * @virtual */ - public abstract getMintTransaction(filters: Partial): Promise + public abstract parseInviteToken(policyId: string, invitationId: string): Promise; /** - * Get transactions serials count - * @param mintRequestId Mint request identifier - * @param transferStatus Transfer status + * Get MultiSign Status by document or user + * @param uuid + * @param documentId + * @param userId * - * @returns Serials count + * @virtual */ - public abstract getTransactionsSerialsCount(mintRequestId: string, transferStatus?: MintTransactionStatus | unknown): Promise + public abstract getMultiSignStatus(uuid: string, documentId: string, userId: string): Promise; /** - * Update MultiPolicyTransaction - * @param item + * Get MultiSign Statuses + * @param uuid + * @param documentId + * @param group + * + * @virtual */ - public static async updateMultiPolicyTransactions(item: MultiPolicyTransaction): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateMultiPolicyTransactions.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getMultiSignDocuments(uuid: string, documentId: string, group: string): Promise /** - * Update schema - * @param id - * @param item + * Get multi sign documents by document identifiers + * @param documentIds Document identifiers + * @returns Multi sign documents */ - public static async updateSchema(id: string, item: SchemaCollection): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateSchema.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getMultiSignDocumentsByDocumentIds(documentIds: string[]): Promise /** - * Update schemas - * @param items Schemas + * Get MultiSign Statuses by group + * @param uuid + * @param group + * + * @virtual */ - public static async updateSchemas(items: SchemaCollection[]): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateSchemas.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getMultiSignDocumentsByGroup(uuid: string, group: string): Promise /** - * Get transactions count - * @param filters Mint request identifier - * @returns Transactions count + * Set MultiSign Status by document + * @param uuid + * @param documentId + * @param group + * @param status + * + * @virtual */ - public abstract getTransactionsCount(filters: Partial): Promise + public abstract setMultiSigStatus(uuid: string, documentId: string, group: string, status: string): Promise /** - * Get mint request minted serials - * @param mintRequestId Mint request identifier - * @returns Serials + * Save mint request + * @param data Mint request + * @returns Saved mint request */ - public abstract getMintRequestSerials(mintRequestId: string): Promise + public abstract saveMintRequest(data: Partial): Promise; /** - * Get transactions serials - * @param mintRequestId Mint request identifier - * @param transferStatus Transfer status - * - * @returns Serials + * Create Residue object + * @param policyId + * @param blockId + * @param userId + * @param value + * @param document */ - public abstract getTransactionsSerials(mintRequestId: string, transferStatus?: MintTransactionStatus | unknown): Promise + public abstract createResidue( + policyId: string, + blockId: string, + userId: string, + value: unknown, + document: unknown + ): SplitDocuments; /** - * Get policy caches - * @param filters Filters - * @returns Policy caches + * Get Residue objects + * @param policyId + * @param blockId + * @param userId */ - public static async getPolicyCaches(filters?: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyCaches.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getResidue(policyId: string, blockId: string, userId: string): Promise; /** - * Save policy cache - * @param entity Entity - * @returns Policy cache + * Get External Topic + * @param policyId + * @param blockId + * @param userId + * + * @virtual */ - public static async savePolicyCache(entity: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.savePolicyCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getExternalTopic(policyId: string, blockId: string, userId: string): Promise /** - * Get policy cache - * @param filters Filters - * @returns Policy cache + * Get split documents in policy + * @param policyId Policy identifier + * @returns Split documents */ - public static async getPolicyCache(filters: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.savePolicyCache.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getSplitDocumentsByPolicy(policyId: string): Promise /** - * Get policy cache data - * @param filters Filters - * @param options Options - * @returns Policy cache data + * Set Residue objects + * @param residue */ - public static async getPolicyCacheData(filters?: Partial, options?: PolicyCacheData): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyCacheData.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract setResidue(residue: SplitDocuments[]): Promise /** - * Save policy cache data - * @param entity Policy cache data - * @returns Policy cache data + * Remove Residue objects + * @param residue */ - public static async savePolicyCacheData(entity: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.savePolicyCacheData.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract removeResidue(residue: SplitDocuments[]): Promise; /** - * Get and count policy cache data - * @param filters Filters - * @param options Options - * @returns Policy cache data and count + * Create tag + * @param tag */ - public static async getAndCountPolicyCacheData(filters?: Partial, options?: unknown): Promise<[PolicyCacheData[], number]> { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getAndCountPolicyCacheData.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract createTag(tag: Tag): Promise; /** - * Clear policy caches - * @param filters Filters + * Get tags + * @param filters + * @param options */ - public static async clearPolicyCaches(filters?: Partial | string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.clearPolicyCaches.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getTags(filters?: Partial, options?: unknown): Promise /** - * Clear policy cache data - * @param cachePolicyId Cache policy id + * Get tags + * @param filters + * @param options */ - public static async clearPolicyCacheData(cachePolicyId: string) { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.clearPolicyCacheData.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getTagCache(filters?: Partial, options?: unknown): Promise /** - * Create mint transactions - * @param transaction Transaction - * @param amount Amount + * Delete tag + * @param tag */ - public abstract createMintTransactions(transaction: Partial, amount: number): Promise + public abstract removeTag(tag: Tag): Promise /** - * Get mint request transfer serials - * @param mintRequestId Mint request identifier - * @returns Serials + * Update tag + * @param tag */ - public abstract getMintRequestTransferSerials(mintRequestId: string): Promise + public abstract updateTag(tag: Tag): Promise /** - * Update VP Documents - * @param value - * @param filters - * @param dryRun + * Update tags + * @param tags */ - public static async updateVpDocuments(value: unknown, filters: Partial, dryRun?: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updateVpDocuments.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract updateTags(tags: Tag[]): Promise /** - * Create Record - * @param record + * Get tag By UUID + * @param uuid */ - public static async createRecord(record: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createRecord.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getTagById(uuid: string): Promise /** - * Get Record - * @param filters Filters - * @param options Options - * @returns Record + * Create tag cache + * @param tag */ - public static async getRecord(filters?: Partial, options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getRecord.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract createTagCache(tag: Partial): Promise; /** - * Get Group By UUID - * @param policyId - * @param uuid - * - * @returns Group + * Update tag cache + * @param row */ - public static async getGroupByID(policyId: string, uuid: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getGroupByID.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract updateTagCache(row: TagCache): Promise /** - * Get Groups By User - * @param policyId - * @param did - * @param options - * - * @returns Groups + * Get VP mint information + * @param vpDocument VP + * @returns Serials and amount */ - public static async getGroupsByUser(policyId: string, did: string, options?: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getGroupsByUser.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getVPMintInformation( + vpDocument: VpDocument + ): Promise< + [ + serials: {serial: number; tokenId: string}[], + amount: number, + error: string, + wasTransferNeeded: boolean, + transferSerials: number[], + transferAmount: number, + tokenIds: string[], + target: string, + ] + > /** - * Save VCs - * @param data + * Set MultiSign Status by user + * @param uuid + * @param documentId + * @param user + * @param status + * @param document * - * @returns VCs + * @virtual */ - // tslint:disable-next-line:adjacent-overload-signatures - public static async saveVCs(data: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveVCs.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract setMultiSigDocument( + uuid: string, + documentId: string, + user: {id: string, did: string, group: string, username: string}, + status: string, + document: IVC + ): Promise /** - * Save VPs - * @param data + * Get Active External Topic + * @param policyId + * @param blockId * - * @returns VPs + * @virtual */ - public static async saveVPs(data: Partial): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveVPs.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getActiveExternalTopics( + policyId: string, + blockId: string + ): Promise /** - * Get Did Document - * @param did + * Create External Topic + * @param row + * + * @virtual */ - public static async getDidDocument(did: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getDidDocument.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract createExternalTopic(row: unknown): Promise /** - * Assign entity - * @param type - * @param entityId - * @param assigned - * @param did - * @param owner + * Update External Topic + * @param item + * + * @virtual */ - public static async assignEntity(type: AssignedEntityType, entityId: string, assigned: boolean, did: string, owner: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.assignEntity.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract updateExternalTopic(item: ExternalDocument): Promise /** - * Check entity - * @param type - * @param entityId - * @param did + * get document aggregation filters for analytics + * @param nameFilterMap + * @param nameFilterAttributes + * @param existingAttributes + * + * @returns Result */ - public static async getAssignedEntity(type: AssignedEntityType, entityId: string, did: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getAssignedEntity.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getAttributesAggregationFilters(nameFilterMap: string, nameFilterAttributes: string, existingAttributes: string[] | []): unknown[] /** - * Get assigned entities - * @param did - * @param type + * get tasks aggregation filters + * @param nameFilter + * @param processTimeout + * + * @returns Result */ - public static async getAssignedEntities(did: string, type?: AssignedEntityType): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getAssignedEntities.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getTasksAggregationFilters(nameFilter: string, processTimeout: number): unknown[] /** - * Remove assign entity - * @param type - * @param entityId - * @param did - * @param owner + * get document aggregation filters + * @param props + * + * @returns Result */ - public static async removeAssignEntity(type: AssignedEntityType, entityId: string, did: string, owner?: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removeAssignEntity.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getDocumentAggregationFilters(props: IGetDocumentAggregationFilters): void /** - * Save file + * get document aggregation filters for analytics + * @param nameFilter * @param uuid - * @param buffer * - * @returns file ID + * @returns Result */ - public static async saveFile(uuid: string, buffer: Buffer): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.saveFile.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getAnalyticsDocAggregationFilters(nameFilter: string, uuid: string): unknown[] /** - * Load file - * @param id + * Create Virtual User + * @param policyId + * @param username + * @param did + * @param hederaAccountId + * @param hederaAccountKey + * @param active * - * @returns file ID + * @virtual */ - public static async loadFile(id: unknown): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.loadFile.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract createVirtualUser(username: string, did: string, hederaAccountId: string, hederaAccountKey: string, active: boolean): Promise /** - * Get policy tests - * @param policyId - * @returns tests + * Save mint transaction + * @param transaction Transaction + * @returns Saved transaction */ - public static async getPolicyTests(policyId: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyTests.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract saveMintTransaction(transaction: Partial): Promise /** - * Assign entity - * @param config - * @param buffer + * Get mint transactions + * @param filters Filters + * @param options Options + * @returns Mint transactions */ - public static async createPolicyTest(config: { [key: string]: unknown }, buffer: Buffer): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.createPolicyTest.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getMintTransactions(filters: Partial, options?: unknown): Promise /** - * Get policy test - * @param policyId - * @param id - * @returns tests + * Get mint transactions + * @param filters Filters + * @returns Mint transaction */ - public static async getPolicyTest(policyId: string, id: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyTest.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getMintTransaction(filters: Partial): Promise /** - * Get policy test - * @param policyId - * @param status - * @returns tests + * Get transactions serials count + * @param mintRequestId Mint request identifier + * @param transferStatus Transfer status + * + * @returns Serials count */ - public static async getPolicyTestsByStatus(policyId: string, status: PolicyTestStatus): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyTestsByStatus.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getTransactionsSerialsCount(mintRequestId: string, transferStatus?: MintTransactionStatus | unknown): Promise /** - * Get policy tests - * @param resultId - * - * @returns tests + * Get transactions count + * @param filters Mint request identifier + * @returns Transactions count */ - public static async getPolicyTestByRecord(resultId: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.getPolicyTestByRecord.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getTransactionsCount(filters: Partial): Promise /** - * Get policy tests - * @param policyId - * @param id - * @returns tests + * Get mint request minted serials + * @param mintRequestId Mint request identifier + * @returns Serials */ - public static async deletePolicyTest(policyId: string, id: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.deletePolicyTest.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getMintRequestSerials(mintRequestId: string): Promise /** - * Get policy tests - * @param test + * Get transactions serials + * @param mintRequestId Mint request identifier + * @param transferStatus Transfer status * - * @returns tests + * @returns Serials */ - public static async updatePolicyTest(test: PolicyTest): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.updatePolicyTest.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getTransactionsSerials(mintRequestId: string, transferStatus?: MintTransactionStatus | unknown): Promise /** - * Get policy tests - * @param policyId - * - * @returns tests + * Create mint transactions + * @param transaction Transaction + * @param amount Amount */ - public static async deletePolicyTests(policyId: string): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.deletePolicyTests.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract createMintTransactions(transaction: Partial, amount: number): Promise /** - * Get policy tests - * @returns tests + * Get mint request transfer serials + * @param mintRequestId Mint request identifier + * @returns Serials */ - public static async removePolicyTests(tests: PolicyTest[]): Promise { - throw new Error(`${AbstractDatabaseServer.name}.${AbstractDatabaseServer.removePolicyTests.name}: ${STATUS_IMPLEMENTATION.METHOD_IS_NOT_IMPLEMENTED}`); - } + public abstract getMintRequestTransferSerials(mintRequestId: string): Promise /** * Overriding the create method diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png new file mode 100644 index 0000000000..64dcbfce4a Binary files /dev/null and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 64dcbfce4a..fd487e4449 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index fd487e4449..f215c151a7 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index f215c151a7..e40832f472 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index e40832f472..f9e2ba27c1 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index f9e2ba27c1..33409f86c1 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 33409f86c1..5e9d4c646e 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 5e9d4c646e..bf2fded8de 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index bf2fded8de..7831536a6b 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 7831536a6b..125594f5bf 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 125594f5bf..8bbc766be5 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 8bbc766be5..15e1d7a135 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 15e1d7a135..f5dd83b397 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index f5dd83b397..424e1766a0 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 424e1766a0..dc800439cd 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index dc800439cd..401e85023b 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 401e85023b..df14f02f7c 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index df14f02f7c..962f491b30 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 962f491b30..00dbcf6b0d 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 00dbcf6b0d..9fab550b02 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 9fab550b02..d2057dcfc2 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index d2057dcfc2..40c124f8b0 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 40c124f8b0..5d6f7d6428 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 5d6f7d6428..ae454578e4 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index ae454578e4..557a2754a1 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 557a2754a1..08b83fec02 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 08b83fec02..aabe1bae8f 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index aabe1bae8f..226f735c8f 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 226f735c8f..8a7159d9a8 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png index 8a7159d9a8..627943dd2d 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png index 627943dd2d..94f832a0a0 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1).png index 94f832a0a0..22c2aa044b 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1).png index 22c2aa044b..9405c9913b 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1).png index 9405c9913b..ff91f48b5a 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1).png index ff91f48b5a..3f85c4b01c 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1).png b/docs/.gitbook/assets/image (1) (1).png index 3f85c4b01c..022d0621d7 100644 Binary files a/docs/.gitbook/assets/image (1) (1).png and b/docs/.gitbook/assets/image (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1).png b/docs/.gitbook/assets/image (1).png index 022d0621d7..6bc8f0f4df 100644 Binary files a/docs/.gitbook/assets/image (1).png and b/docs/.gitbook/assets/image (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png new file mode 100644 index 0000000000..75381204f2 Binary files /dev/null and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 75381204f2..9fc0c8426e 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 9fc0c8426e..00b72f5662 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 00b72f5662..003d493bc5 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 003d493bc5..6dbe4b9004 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 6dbe4b9004..600c763d47 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 600c763d47..fa3093c027 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index fa3093c027..165ea0128f 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 165ea0128f..a5ac75df9e 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index a5ac75df9e..15e1d7a135 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 15e1d7a135..e902436b66 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index e902436b66..db8e8487be 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index db8e8487be..ba57f9d76b 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index ba57f9d76b..3bb0367973 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 3bb0367973..2620dcfb7d 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 2620dcfb7d..7c8b624c1c 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 7c8b624c1c..ddceb5a332 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index ddceb5a332..e114d28ddd 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index e114d28ddd..a4af865679 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index a4af865679..20393e47d1 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 20393e47d1..eae7c8adfb 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index eae7c8adfb..b25cf7a64e 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index b25cf7a64e..1fbaf2067a 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 1fbaf2067a..5ff37a56e4 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png index 5ff37a56e4..d42defb1f4 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png index d42defb1f4..7d5412b915 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1).png index 7d5412b915..3e21b9aaa4 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1).png index 3e21b9aaa4..a870c06c00 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1).png index a870c06c00..150cf56411 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1).png index 150cf56411..7234c75374 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1).png index 7234c75374..2f2c1d5893 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1).png b/docs/.gitbook/assets/image (2) (1).png index 2f2c1d5893..b6e6b975df 100644 Binary files a/docs/.gitbook/assets/image (2) (1).png and b/docs/.gitbook/assets/image (2) (1).png differ diff --git a/docs/.gitbook/assets/image (2).png b/docs/.gitbook/assets/image (2).png index b6e6b975df..d8b266a9b7 100644 Binary files a/docs/.gitbook/assets/image (2).png and b/docs/.gitbook/assets/image (2).png differ diff --git a/docs/.gitbook/assets/image.png b/docs/.gitbook/assets/image.png index d8b266a9b7..00b82fc946 100644 Binary files a/docs/.gitbook/assets/image.png and b/docs/.gitbook/assets/image.png differ diff --git a/docs/.gitbook/assets/swagger (2) (1) (1) (1).yaml b/docs/.gitbook/assets/swagger (2) (1) (1) (1).yaml new file mode 100644 index 0000000000..26784dd621 --- /dev/null +++ b/docs/.gitbook/assets/swagger (2) (1) (1) (1).yaml @@ -0,0 +1,12210 @@ +openapi: 3.0.0 +paths: + /accounts/session: + get: + operationId: AccountApi_getSession + summary: Returns current session of the user. + description: Returns current user session. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsSessionResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_0 + - accounts + security: + - bearer: [] + /accounts/register: + post: + operationId: AccountApi_register + summary: Registers a new user account. + description: Object that contain username, password and role (optional) fields. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterUserDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /accounts/login: + post: + operationId: AccountApi_login + summary: Logs user into the system. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LoginUserDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsSessionResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /accounts/access-token: + post: + operationId: AccountApi_getAccessToken + summary: Returns access token. + description: Returns access token. + parameters: [] + responses: + '200': + description: Successful operation. + tags: *ref_0 + /accounts: + get: + operationId: AccountApi_getAllAccounts + summary: Returns a list of users, excluding Standard Registry and Auditors. + description: >- + Returns all users except those with roles Standard Registry and Auditor. + Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearerAuth: [] + /accounts/standard-registries: + get: + operationId: AccountApi_getStandatdRegistries + summary: Returns all Standard Registries. + description: Returns all Standard Registries. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearerAuth: [] + /accounts/standard-registries/aggregated: + get: + operationId: AccountApi_getAggregatedStandardRegistries + summary: Returns all Standard Registries aggregated with polices and vcDocuments. + description: Returns all Standard Registries aggregated with polices and vcDocuments + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AggregatedDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearerAuth: [] + /accounts/balance: + get: + operationId: AccountApi_getBalance + summary: Returns user's Hedera account balance. + description: Requests current Hedera account balance. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearerAuth: [] + /analytics/search/policies: + post: + operationId: AnalyticsApi_searchPolicies + summary: Search policies. + description: >- + Search policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSearchPoliciesDTO' + examples: + Filter: + value: + policyId: '000000000000000000000000' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SearchPoliciesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_1 + - analytics + security: + - bearerAuth: [] + /analytics/compare/policies: + post: + operationId: AnalyticsApi_comparePolicies + summary: Compare policies. + description: >- + Compare policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterPoliciesDTO' + examples: + Filter1: + value: + policyId1: '000000000000000000000001' + policyId2: '000000000000000000000002' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter2: + value: + policyIds: + - '000000000000000000000001' + - '000000000000000000000002' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ComparePoliciesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /analytics/compare/modules: + post: + operationId: AnalyticsApi_compareModules + summary: Compare modules. + description: >- + Compare modules. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterModulesDTO' + examples: + Filter: + value: + moduleId1: '000000000000000000000001' + moduleId2: '000000000000000000000002' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareModulesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /analytics/compare/schemas: + post: + operationId: AnalyticsApi_compareSchemas + summary: Compare schemas. + description: >- + Compare schemas. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSchemasDTO' + examples: + Filter: + value: + schemaId1: '000000000000000000000001' + schemaId2: '000000000000000000000002' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareSchemasDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /analytics/compare/documents: + post: + operationId: AnalyticsApi_compareDocuments + summary: Compare documents. + description: >- + Compare documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000002' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000002' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDocumentsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /analytics/compare/tools: + post: + operationId: AnalyticsApi_compareTools + summary: Compare tools. + description: >- + Compare tools. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterToolsDTO' + examples: + Filter1: + value: + toolId1: '000000000000000000000001' + toolId2: '000000000000000000000002' + Filter2: + value: + toolIds: + - '000000000000000000000001' + - '000000000000000000000002' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareToolsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /analytics/compare/policies/export: + post: + operationId: AnalyticsApi_comparePoliciesExport + summary: Compare policies. + description: >- + Compare policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterPoliciesDTO' + examples: + Filter1: + value: + policyId1: '000000000000000000000001' + policyId2: '000000000000000000000002' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter2: + value: + policyIds: + - '000000000000000000000001' + - '000000000000000000000002' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /analytics/compare/modules/export: + post: + operationId: AnalyticsApi_compareModulesExport + summary: Compare modules. + description: >- + Compare modules. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterModulesDTO' + examples: + Filter: + value: + moduleId1: '000000000000000000000001' + moduleId2: '000000000000000000000002' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /analytics/compare/schemas/export: + post: + operationId: AnalyticsApi_compareSchemasExport + summary: Compare schemas. + description: >- + Compare schemas. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSchemasDTO' + examples: + Filter: + value: + schemaId1: '000000000000000000000001' + schemaId2: '000000000000000000000002' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /analytics/compare/documents/export: + post: + operationId: AnalyticsApi_compareDocumentsExport + summary: Compare documents. + description: >- + Compare documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000002' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000002' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /analytics/compare/tools/export: + post: + operationId: AnalyticsApi_compareToolsExport + summary: Compare tools. + description: >- + Compare tools. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterToolsDTO' + examples: + Filter1: + value: + toolId1: '000000000000000000000001' + toolId2: '000000000000000000000002' + Filter2: + value: + toolIds: + - '000000000000000000000001' + - '000000000000000000000002' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /analytics/search/blocks: + post: + operationId: AnalyticsApi_searchBlocks + summary: Search same blocks. + description: >- + Search same blocks. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSearchPoliciesDTO' + examples: + Filter: + value: + uuid: '' + config: {} + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SearchPoliciesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearerAuth: [] + /artifacts: + get: + tags: + - artifacts + description: Returns all artifacts. + security: + - bearerAuth: [] + summary: Returns all artifacts. + parameters: + - in: query + name: policyId + schema: + type: string + description: Policy identifier + - in: query + name: pageIndex + schema: + type: integer + description: >- + The number of pages to skip before starting to collect the result + set + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer + description: The numbers of items to return + examples: + pageSize: + summary: Example of a pageSize + value: 100 + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Artifact' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /artifacts/{parentId}: + post: + operationId: ArtifactApi_uploadArtifacts + summary: Upload artifact. + description: Upload artifact. For users with the Standard Registry role only. + parameters: + - name: parentId + required: true + in: path + description: Parent ID + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ArtifactDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - artifacts + security: + - bearerAuth: [] + /artifacts/{artifactId}: + delete: + tags: + - artifacts + description: Delete artifact. + security: + - bearerAuth: [] + summary: Delete artifact. + parameters: + - in: path + name: artifactId + schema: + type: string + required: true + description: Artifact identifier + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /contracts: + get: + operationId: ContractsApi_getContracts + summary: Return a list of all contracts. + description: Returns all contracts. + parameters: + - name: type + required: false + in: query + description: Contract type + example: RETIRE + schema: + enum: + - WIPE + - RETIRE + type: string + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + responses: + '200': + description: Contracts. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_2 + - contracts + security: + - bearer: [] + post: + operationId: ContractsApi_createContract + summary: Create contract. + description: >- + Create smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + description: + type: string + responses: + '201': + description: Created contract. + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/import: + post: + operationId: ContractsApi_importContract + summary: Import contract. + description: >- + Import smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + contractId: + type: string + description: Hedera Identifier + example: 0.0.1 + description: + type: string + required: + - contractId + responses: + '200': + description: Imported contract. + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/{contractId}/permissions: + get: + operationId: ContractsApi_contractPermissions + summary: Get contract permissions. + description: >- + Get smart-contract permissions. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Contract permissions. + content: + application/json: + schema: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/{contractId}: + delete: + operationId: ContractsApi_removeContract + summary: Remove contract. + description: >- + Remove smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/wipe/requests: + get: + operationId: ContractsApi_getWipeRequests + summary: Return a list of all wipe requests. + description: >- + Returns all wipe requests. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: false + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WiperRequestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests/enable: + post: + operationId: ContractsApi_enableWipeRequests + summary: Enable wipe requests. + description: >- + Enable wipe contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: false + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests/disable: + post: + operationId: ContractsApi_disableWipeRequests + summary: Disable wipe requests. + description: >- + Disable wipe contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: false + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/wipe/requests/{requestId}/approve: + post: + operationId: ContractsApi_approveWipeRequest + summary: Approve wipe request. + description: >- + Approve wipe contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/wipe/requests/{requestId}/reject: + delete: + operationId: ContractsApi_rejectWipeRequest + summary: Reject wipe request. + description: >- + Reject wipe contract request. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: ban + required: false + in: query + description: Reject and ban + schema: + type: boolean + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests: + delete: + operationId: ContractsApi_clearWipeRequests + summary: Clear wipe requests. + description: >- + Clear wipe contract requests. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/wipe/{contractId}/admin/{hederaId}: + post: + operationId: ContractsApi_wipeAddAdmin + summary: Add wipe admin. + description: >- + Add wipe contract admin. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveAdmin + summary: Remove wipe admin. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/wipe/{contractId}/manager/{hederaId}: + post: + operationId: ContractsApi_wipeAddManager + summary: Add wipe manager. + description: >- + Add wipe contract manager. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveManager + summary: Remove wipe manager. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/wipe/{contractId}/wiper/{hederaId}: + post: + operationId: ContractsApi_wipeAddWiper + summary: Add wipe wiper. + description: >- + Add wipe contract wiper. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveWiper + summary: Remove wipe wiper. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/{contractId}/pools/sync: + post: + operationId: ContractsApi_retireSyncPools + summary: Sync retire pools. + description: >- + Sync retire contract pools. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: false + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Sync date. + content: + application/json: + schema: + $ref: '#/components/schemas/Date' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/requests: + get: + operationId: ContractsApi_getRetireRequests + summary: Return a list of all retire requests. + description: Returns all retire requests. + parameters: + - name: contractId + required: false + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RetireRequestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/pools: + get: + operationId: ContractsApi_getRetirePools + summary: Return a list of all retire pools. + description: Returns all retire pools. + parameters: + - name: tokens + required: false + in: query + description: Tokens + example: 0.0.1,0.0.2,0.0.3 + schema: + type: string + - name: contractId + required: false + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RetirePoolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/{contractId}/requests: + delete: + operationId: ContractsApi_clearRetireRequests + summary: Clear retire requests. + description: >- + Clear retire contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: false + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/{contractId}/pools: + delete: + operationId: ContractsApi_clearRetirePools + summary: Clear retire pools. + description: >- + Clear retire contract pools. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: false + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + post: + operationId: ContractsApi_setRetirePool + summary: Set retire pool. + description: >- + Set retire contract pool. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: false + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RetirePoolTokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RetirePoolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/pools/{poolId}: + delete: + operationId: ContractsApi_unsetRetirePool + summary: Unset retire pool. + description: >- + Unset retire contract pool. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: poolId + required: false + in: path + description: Pool Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/requests/{requestId}: + delete: + operationId: ContractsApi_unsetRetireRequest + summary: Unset retire request. + description: >- + Unset retire contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: false + in: path + description: Request Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/pools/{poolId}/retire: + post: + operationId: ContractsApi_retire + summary: Retire tokens. + description: Retire tokens. + parameters: + - name: poolId + required: false + in: path + description: Pool Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RetireRequestTokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/requests/{requestId}/approve: + post: + operationId: ContractsApi_approveRetire + summary: Approve retire request. + description: >- + Approve retire contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/requests/{requestId}/cancel: + delete: + operationId: ContractsApi_cancelRetireRequest + summary: Cancel retire request. + description: Cancel retire contract request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire/{contractId}/admin/{hederaId}: + post: + operationId: ContractsApi_retireAddAdmin + summary: Add retire admin. + description: >- + Add retire contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + delete: + operationId: ContractsApi_retireRemoveAdmin + summary: Remove wipe admin. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts/retire: + get: + operationId: ContractsApi_getRetireVCs + summary: Return a list of all retire vcs. + description: Returns all retire vcs. + parameters: + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /demo/registered-users: + get: + operationId: DemoApi_registeredUsers + summary: Returns list of registered users. + description: Returns list of registered users. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RegisteredUsersDTO' + tags: + - demo + /demo/random-key: + get: + tags: + - demo + description: Generates a new Hedera account with a random private key. + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/HederaAccount' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /demo/push/random-key: + get: + tags: + - demo + description: Generates a new Hedera account with a random private key. + security: + - bearerAuth: [] + summary: Generates a new Hedera account with a random private key. + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /external: + post: + tags: + - external + description: Sends data from an external source. + summary: Sends data from an external source. + requestBody: + description: Object that contains a VC Document. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalData' + responses: + '200': + description: Successful operation. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /ipfs/file: + post: + operationId: IpfsApi_postFile + summary: Add file from ipfs. + description: Add file from ipfs. + parameters: [] + responses: + '201': + description: '' + tags: + - ipfs + security: + - bearerAuth: [] + /ipfs/file/{cid}: + get: + tags: + - ipfs + description: Get file from ipfs. + summary: Get file from ipfs. + parameters: + - in: path + name: cid + schema: + type: string + required: true + description: File CID. + security: + - bearerAuth: [] + responses: + '201': + description: Created. + content: + binary/octet-stream: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /logs: + post: + tags: + - logs + description: Returns logs. For users with the Standard Registry role only. + security: + - bearerAuth: [] + requestBody: + description: Log filters. + content: + application/json: + schema: + $ref: '#/components/schemas/LogFilters' + summary: Returns logs. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + totalCount: + type: number + logs: + $ref: '#/components/schemas/Log' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /logs/attributes: + get: + tags: + - logs + description: Returns logs attributes. For users with the Standard Registry role only. + parameters: + - in: query + name: name + schema: + type: string + description: Part of name. + - in: query + name: existingAttributes + schema: + type: array + items: + type: string + description: Attributes to exclude. + security: + - bearerAuth: [] + summary: Returns logs attributes. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /map/key: + get: + tags: + - maps + description: Returns map api key. + security: + - bearerAuth: [] + summary: Returns map api key. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /map/sh: + get: + operationId: MapApi_getSentinelKey + parameters: [] + responses: + '200': + description: '' + tags: + - map + /metrics: + get: + operationId: MetricsApi_getMetrics + parameters: [] + responses: + '200': + description: '' + tags: + - metrics + /modules: + get: + tags: + - modules + description: >- + Returns all modules. Only users with the Standard Registry and Installer + role are allowed to make the request. + security: + - bearerAuth: [] + summary: Return a list of all modules. + parameters: + - in: query + name: pageIndex + schema: + type: integer + description: >- + The number of pages to skip before starting to collect the result + set + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer + description: The numbers of items to return + examples: + pageSize: + summary: Example of a pageSize + value: 100 + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + $ref: '#/components/schemas/Module' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + tags: + - modules + description: >- + Creates a new module. Only users with the Standard Registry role are + allowed to make the request. + security: + - bearerAuth: [] + summary: Creates a new module. + requestBody: + description: Object that contains module configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Module' + responses: + '201': + description: Created. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /modules/schemas: + get: + operationId: ModulesApi_getModuleSchemas + parameters: [] + responses: + '200': + description: '' + tags: &ref_3 + - modules + post: + operationId: ModulesApi_postSchemas + parameters: [] + responses: + '201': + description: '' + tags: *ref_3 + /modules/{uuid}: + get: + tags: + - modules + description: >- + Retrieves module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - in: path + name: uuid + schema: + type: string + required: true + description: Selected module ID. + summary: Retrieves module configuration. + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Module' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: + tags: + - modules + description: >- + Updates module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + summary: Updates module configuration. + parameters: + - in: path + name: uuid + description: Selected module ID. + required: true + schema: + type: string + requestBody: + description: Object that contains module configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Module' + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Module' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - modules + description: >- + Deletes the module with the provided module ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - in: path + name: uuid + schema: + type: string + required: true + description: Module ID. + security: + - bearerAuth: [] + summary: Deletes the module. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /modules/menu: + get: + tags: + - modules + description: >- + Returns modules menu. Only users with the Standard Registry and + Installer role are allowed to make the request. + security: + - bearerAuth: [] + summary: Return a list of modules. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Module' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /modules/{uuid}/export/file: + get: + tags: + - modules + description: >- + Returns a zip file containing the published module and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - in: path + name: uuid + schema: + type: string + required: true + description: Selected module ID. + security: + - bearerAuth: [] + summary: >- + Return module and its artifacts in a zip file format for the specified + module. + responses: + '200': + description: Successful operation. Response zip file + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /modules/{uuid}/export/message: + get: + tags: + - modules + description: >- + Returns the Hedera message ID for the specified module published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - in: path + name: uuid + schema: + type: string + required: true + description: Selected module ID. + security: + - bearerAuth: [] + summary: Return Heder message ID for the specified published module. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportModule' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /modules/import/message: + post: + tags: + - modules + description: >- + Imports new module and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + security: + - bearerAuth: [] + summary: Imports new module from IPFS. + requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the module. + required: true + content: + application/json: + schema: + type: object + properties: + messageId: + type: string + responses: + '201': + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/Module' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /modules/import/file: + post: + tags: + - modules + description: >- + Imports new module and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Imports new module from a zip file. + requestBody: + description: >- + A zip file that contains the module and associated schemas and VCs to + be imported. + required: true + content: + binary/octet-stream: + schema: + type: string + format: binary + responses: + '201': + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/Module' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /modules/import/message/preview: + post: + tags: + - modules + description: >- + Previews the module from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + summary: Module preview from IPFS. + security: + - bearerAuth: [] + requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the module. + required: true + content: + application/json: + schema: + type: object + properties: + messageId: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewModule' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /modules/import/file/preview: + post: + tags: + - modules + description: >- + Previews the module from a zip file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + summary: Module preview from a zip file. + security: + - bearerAuth: [] + requestBody: + description: >- + A zip file that contains the module and associated schemas and VCs to + be viewed. + required: true + content: + binary/octet-stream: + schema: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewModule' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /modules/{uuid}/publish: + put: + tags: + - modules + description: >- + Publishes the module with the specified (internal) module ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - in: path + name: uuid + schema: + type: string + required: true + description: Selected module ID. + summary: Publishes the module onto IPFS. + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PublishModule' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /modules/validate: + post: + tags: + - modules + description: >- + Validates selected module. Only users with the Standard Registry role + are allowed to make the request. + security: + - bearerAuth: [] + summary: Validates module. + requestBody: + description: Object that contains module configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Module' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateModule' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tools: + post: + operationId: ToolsApi_createNewTool + summary: Creates a new tool. + description: >- + Creates a new tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_4 + - tools + security: + - bearerAuth: [] + get: + operationId: ToolsApi_getTools + summary: Return a list of all tools. + description: >- + Returns all tools. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageSize + required: false + in: query + description: The numbers of items to return + schema: + type: number + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + schema: + type: number + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/push: + post: + operationId: ToolsApi_createNewToolAsync + summary: Creates a new tool. + description: >- + Creates a new tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/{id}: + delete: + operationId: ToolsApi_deleteTool + summary: >- + Deletes the tool with the provided tool ID. Only users with the Standard + Registry role are allowed to make the request. + description: Deletes the tool. + parameters: + - name: id + required: true + in: path + description: Tool ID + schema: + type: string + responses: + '200': + description: Successful operation. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + get: + operationId: ToolsApi_getToolById + summary: Retrieves tool configuration. + description: >- + Retrieves tool configuration for the specified tool ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + put: + operationId: ToolsApi_updateTool + summary: Updates tool configuration. + description: >- + Updates tool configuration for the specified tool ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/{id}/publish: + put: + operationId: ToolsApi_publishTool + summary: Publishes the tool onto IPFS. + description: >- + Publishes the tool with the specified (internal) tool ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/{id}/push/publish: + put: + operationId: ToolsApi_publishToolAsync + summary: Publishes the tool onto IPFS. + description: >- + Publishes the tool with the specified (internal) tool ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/validate: + post: + operationId: ToolsApi_validateTool + summary: Validates selected tool. + description: >- + Validates selected tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/{id}/export/file: + get: + operationId: ToolsApi_toolExportFile + summary: >- + Return tool and its artifacts in a zip file format for the specified + tool. + description: >- + Returns a zip file containing the published tool and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/{id}/export/message: + get: + operationId: ToolsApi_toolExportMessage + summary: Return Heder message ID for the specified published tool. + description: >- + Returns the Hedera message ID for the specified tool published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: id + required: true + in: path + description: Tool ID + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/import/message/preview: + post: + operationId: ToolsApi_toolImportMessagePreview + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/import/message: + post: + operationId: ToolsApi_toolImportMessage + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/import/file/preview: + post: + operationId: ToolsApi_toolImportFilePreview + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/import/file: + post: + operationId: ToolsApi_toolImportFile + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/push/import/file: + post: + operationId: ToolsApi_toolImportFileAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/push/import/message: + post: + operationId: ToolsApi_toolImportMessageAsync + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /tools/menu/all: + get: + operationId: ToolsApi_getMenu + summary: Return a list of tools. + description: >- + Returns tools menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearerAuth: [] + /profiles/{username}: + get: + operationId: ProfileApi_getProfile + summary: Returns user account info. + description: >- + Returns user account information. For users with the Standard Registry + role it also returns address book and VC document information. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to fetch the information + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ProfileDTO' + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_5 + - profiles + security: + - bearerAuth: [] + - bearer: [] + put: + operationId: ProfileApi_setUserProfile + summary: Sets Hedera credentials for the user. + description: >- + Sets Hedera credentials for the user. For users with the Standard + Registry role it also creates an address book. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to update the information. + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Created. + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearerAuth: [] + - bearer: [] + /profiles/push/{username}: + put: + operationId: ProfileApi_setUserProfileAsync + summary: Sets Hedera credentials for the user. + description: >- + Sets Hedera credentials for the user. For users with the Standard + Registry role it also creates an address book. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to update the information. + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearerAuth: [] + - bearer: [] + /profiles/{username}/balance: + get: + operationId: ProfileApi_getUserBalance + summary: Returns user's Hedera account balance. + description: >- + Requests Hedera account balance. Only users with the Installer role are + allowed to make the request. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to fetch the balance. + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearerAuth: [] + - bearer: [] + /profiles/restore/{username}: + put: + operationId: ProfileApi_restoreUserProfile + summary: Restore user data (policy, DID documents, VC documents). + description: Restore user data (policy, DID documents, VC documents). + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to restore the information. + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearerAuth: [] + - bearer: [] + /profiles/restore/topics/{username}: + put: + operationId: ProfileApi_restoreTopic + summary: List of available recovery topics. + description: List of available recovery topics. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to restore the information. + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearerAuth: [] + - bearer: [] + /profiles/did-document/validate: + post: + operationId: ProfileApi_validateDidDocument + summary: Validate DID document format. + description: Validate DID document format. + parameters: [] + requestBody: + required: true + description: DID Document. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentStatusDTO' + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearerAuth: [] + - bearer: [] + /profiles/did-keys/validate: + post: + operationId: ProfileApi_validateDidKeys + summary: Validate DID document keys. + description: Validate DID document keys. + parameters: [] + requestBody: + required: true + description: DID Document and keys. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentWithKeyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/DidKeyStatusDTO' + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearerAuth: [] + - bearer: [] + /policies: + get: + tags: + - policies + description: >- + Returns all policies. Only users with the Standard Registry and + Installer role are allowed to make the request. + security: + - bearerAuth: [] + summary: Return a list of all policies. + parameters: + - in: query + name: pageIndex + schema: + type: integer + description: >- + The number of pages to skip before starting to collect the result + set + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer + description: The numbers of items to return + examples: + pageSize: + summary: Example of a pageSize + value: 100 + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + allOf: + - $ref: '#/components/schemas/PolicyConfig' + - type: object + properties: + userRoles: + type: array + items: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + tags: + - policies + description: >- + Creates a new policy. Only users with the Standard Registry role are + allowed to make the request. + security: + - bearerAuth: [] + summary: Creates a new policy. + requestBody: + description: Object that contains policy configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyConfig' + responses: + '201': + description: Created. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/migrate-data: + post: + operationId: PolicyApi_migrateData + summary: Migrate policy data. + description: >- + Migrate policy data. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Migration config. + content: + application/json: + schema: + $ref: '#/components/schemas/MigrationConfigDTO' + responses: + '200': + description: Errors while migration. + content: + application/json: + schema: + type: array + items: + type: object + properties: + error: + type: string + id: + type: string + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_6 + - policies + security: + - bearerAuth: [] + /policies/push/migrate-data: + post: + operationId: PolicyApi_migrateDataAsync + summary: Migrate policy data asynchronous. + description: >- + Migrate policy data asynchronous. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Migration config. + content: + application/json: + schema: + $ref: '#/components/schemas/MigrationConfigDTO' + responses: + '202': + description: Created task. + content: + application/json: + schema: + type: object + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + /policies/push: + post: + tags: + - policies + description: >- + Creates a new policy. Only users with the Standard Registry role are + allowed to make the request. + security: + - bearerAuth: [] + summary: Creates a new policy. + requestBody: + description: Object that contains policy configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyConfig' + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/push/{policyId}: + post: + operationId: PolicyApi_updatePolicyAsync + summary: '' + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearerAuth: [] + delete: + operationId: PolicyApi_deletePolicyAsync + parameters: [] + responses: + '202': + description: '' + tags: *ref_6 + security: + - bearerAuth: [] + /policies/{policyId}: + get: + tags: + - policies + description: >- + Retrieves policy configuration for the specified policy ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + summary: Retrieves policy configuration. + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PolicyConfig' + - type: object + properties: + userRoles: + type: array + items: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: + tags: + - policies + description: >- + Updates policy configuration for the specified policy ID. Only users + with the Standard Registry role are allowed to make the request. + summary: Updates policy configuration. + parameters: + - in: path + name: policyId + description: Selected policy ID. + required: true + schema: + type: string + requestBody: + description: Object that contains policy configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyConfig' + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyConfig' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/publish: + put: + tags: + - policies + description: >- + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + requestBody: + description: Object that contains policy version. + required: true + content: + application/json: + schema: + type: object + properties: + policyVersion: + type: string + summary: Publishes the policy onto IPFS. + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PublishPolicy' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/push/{policyId}/publish: + put: + tags: + - policies + description: >- + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + security: + - bearerAuth: [] + summary: >- + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + requestBody: + description: Object that contains policy version. + required: true + content: + application/json: + schema: + type: object + properties: + policyVersion: + type: string + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/dry-run: + put: + tags: + - policies + description: >- + Run policy without making any persistent changes or executing + transaction. Only users with the Standard Registry role are allowed to + make the request. + security: + - bearerAuth: [] + summary: Dry Run policy. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + responses: + '201': + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/PublishPolicy' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/discontinue: + put: + operationId: PolicyApi_discontinuePolicy + summary: Discontunue policy. + description: >- + Discontunue policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy identifier. + schema: {} + requestBody: + required: true + description: Discontinue details. + content: + application/json: + schema: + type: object + properties: + date: + type: date + responses: + '200': + description: Policies. + content: + application/json: + schema: + type: array + items: + type: object + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearerAuth: [] + /policies/{policyId}/draft: + put: + tags: + - policies + description: >- + Return policy to editing. Only users with the Standard Registry role are + allowed to make the request. + security: + - bearerAuth: [] + summary: Return policy to editing. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PublishPolicy' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/validate: + post: + tags: + - policies + description: >- + Validates selected policy. Only users with the Standard Registry role + are allowed to make the request. + security: + - bearerAuth: [] + summary: Validates policy. + requestBody: + description: Object that contains policy configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyConfig' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ValidatePolicy' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/navigation: + get: + operationId: PolicyApi_getPolicyNavigation + summary: Returns a policy navigation. + description: Returns a policy navigation. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearerAuth: [] + /policies/{policyId}/groups: + get: + tags: + - policies + description: Returns a list of groups the user is a member of. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + summary: Returns a list of groups the user is a member of. + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + uuid: + type: string + role: + type: string + groupLabel: + type: string + groupName: + type: string + active: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + tags: + - policies + description: >- + Makes the selected group active. if UUID is not set then returns the + user to the default state. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + summary: Makes the selected group active. + requestBody: + description: Selected group. + required: true + content: + application/json: + schema: + type: object + properties: + uuid: + type: string + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/documents: + get: + operationId: PolicyApi_getPolicyDocuments + summary: Get policy documents. + description: >- + Get policy documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageSize + required: true + in: query + description: Page size. + schema: + type: number + - name: pageIndex + required: true + in: query + description: Page index. + schema: + type: number + - name: type + required: true + in: query + description: Document type. + schema: + enum: + - VC + - VP + type: string + - name: includeDocument + required: true + in: query + description: Include document field. + schema: + type: boolean + - name: policyId + required: true + in: path + description: Policy identifier. + schema: {} + responses: + '200': + description: Documents. + headers: + X-Total-Count: + description: Total documents count. + content: + application/json: + schema: + type: array + items: + type: object + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearerAuth: [] + /policies/{policyId}/blocks: + get: + tags: + - policies + description: >- + Returns data from the root policy block. Only users with the Standard + Registry and Installer role are allowed to make the request. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + summary: Retrieves data for the policy root block. + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyBlock' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/blocks/{uuid}: + get: + tags: + - policies + description: >- + Requests block data. Only users with a role that described in block are + allowed to make the request. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + - in: path + name: uuid + schema: + type: string + required: true + description: Selected block UUID. + summary: Requests block data. + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyBlockData' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + tags: + - policies + description: Sends data to the specified block. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + - in: path + name: uuid + schema: + type: string + required: true + description: Selected block UUID. + summary: Sends data to the specified block. + requestBody: + description: Object with the data to be sent to the block. + required: true + content: + application/json: + schema: + type: object + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/tag/{tagName}/blocks: + post: + operationId: PolicyApi_setBlocksByTagName + summary: Sends data to the specified block. + description: Sends data to the specified block. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearerAuth: [] + get: + operationId: PolicyApi_getBlocksByTagName + summary: Requests block data. + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearerAuth: [] + /policies/{policyId}/tag/{tagName}: + get: + operationId: PolicyApi_getBlockByTagName + summary: Requests block data. + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearerAuth: [] + /policies/{policyId}/blocks/{uuid}/parents: + get: + operationId: PolicyApi_getBlockParents + parameters: [] + responses: + '200': + description: '' + tags: *ref_6 + /policies/{policyId}/export/file: + get: + tags: + - policies + description: >- + Returns a zip file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + security: + - bearerAuth: [] + summary: >- + Return policy and its artifacts in a zip file format for the specified + policy. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportPolicy' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/export/message: + get: + tags: + - policies + description: >- + Returns the Hedera message ID for the specified policy published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + security: + - bearerAuth: [] + summary: Return Heder message ID for the specified published policy. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportPolicy' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/export/xlsx: + get: + operationId: PolicyApi_getPolicyExportXlsx + summary: >- + Return policy and its artifacts in a xlsx file format for the specified + policy. + description: >- + Returns a xlsx file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearer: [] + /policies/import/message: + post: + tags: + - policies + description: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - in: query + name: versionOfTopicId + schema: + type: string + description: The topic ID of policy version. + examples: + pageIndex: + summary: Example of a topic ID of policy version. + value: 0.0.00000001 + security: + - bearerAuth: [] + summary: Imports new policy from IPFS. + requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the Policy. + required: true + content: + application/json: + schema: + type: object + properties: + messageId: + type: string + responses: + '201': + description: Created. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyConfig' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/push/import/message: + post: + tags: + - policies + description: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + security: + - bearerAuth: [] + summary: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. + requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the Policy. + required: true + content: + application/json: + schema: + type: object + properties: + messageId: + type: string + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/import/message/preview: + post: + tags: + - policies + description: >- + Previews the policy from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + summary: Policy preview from IPFS. + security: + - bearerAuth: [] + requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the policy. + required: true + content: + application/json: + schema: + type: object + properties: + messageId: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewPolicy' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/push/import/message/preview: + post: + tags: + - policies + description: >- + Previews the policy from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Previews the policy from IPFS without loading it into the local DB. + requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the policy. + required: true + content: + application/json: + schema: + type: object + properties: + messageId: + type: string + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/import/file: + post: + tags: + - policies + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - in: query + name: versionOfTopicId + schema: + type: string + description: The topic ID of policy version. + examples: + pageIndex: + summary: Example of a topic ID of policy version. + value: 0.0.00000001 + security: + - bearerAuth: [] + summary: Imports new policy from a zip file. + requestBody: + description: >- + A zip file that contains the policy and associated schemas and VCs to + be imported. + required: true + content: + binary/octet-stream: + schema: + type: string + format: binary + responses: + '201': + description: Created. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyConfig' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/push/import/file: + post: + tags: + - policies + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. + requestBody: + description: >- + A zip file that contains the policy and associated schemas and VCs to + be imported. + required: true + content: + binary/octet-stream: + schema: + type: string + format: binary + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/import/file/preview: + post: + tags: + - policies + description: >- + Previews the policy from a zip file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + summary: Policy preview from a zip file. + security: + - bearerAuth: [] + requestBody: + description: >- + A zip file that contains the policy and associated schemas and VCs to + be viewed. + required: true + content: + binary/octet-stream: + schema: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewPolicy' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/import/xlsx: + post: + operationId: PolicyApi_importPolicyFromXlsx + summary: Imports new policy from a xlsx file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided xlsx file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: query + description: Policy Id + schema: + type: string + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearer: [] + /policies/push/import/xlsx: + post: + operationId: PolicyApi_importPolicyFromXlsxAsync + summary: Imports new policy from a xlsx file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided xlsx file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: query + description: Policy Id + schema: + type: string + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearer: [] + /policies/import/xlsx/preview: + post: + operationId: PolicyApi_importPolicyFromXlsxPreview + summary: Policy preview from a xlsx file. + description: >- + Previews the policy from a xlsx file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearerAuth: [] + - bearer: [] + /policies/blocks/about: + get: + operationId: PolicyApi_getBlockAbout + parameters: [] + responses: + '200': + description: '' + tags: *ref_6 + /policies/{policyId}/dry-run/users: + get: + tags: + - policies + description: >- + Returns all virtual users. Only users with the Standard Registry role + are allowed to make the request. + security: + - bearerAuth: [] + summary: Returns all virtual users. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: object + properties: + username: + type: string + did: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/dry-run/user: + post: + tags: + - policies + description: >- + Create a new virtual account. Only users with the Standard Registry role + are allowed to make the request. + security: + - bearerAuth: [] + summary: Create a new virtual account. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: object + properties: + username: + type: string + did: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/dry-run/login: + post: + tags: + - policies + description: >- + Logs virtual user into the system. Only users with the Standard Registry + role are allowed to make the request. + security: + - bearerAuth: [] + summary: Logs virtual user into the system. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + requestBody: + description: Virtual user + required: true + content: + application/json: + schema: + type: object + properties: + did: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: object + properties: + username: + type: string + did: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/dry-run/restart: + post: + tags: + - policies + description: >- + Restarts the execution of the policy. Clear data in database. Only users + with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Restarts the execution of the policy. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/dry-run/transactions: + get: + tags: + - policies + description: >- + Returns lists of virtual transactions. Only users with the Standard + Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Returns lists of virtual transactions. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: object + properties: + createDate: + type: string + type: + type: string + hederaAccountId: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/dry-run/artifacts: + get: + tags: + - policies + description: >- + Returns lists of virtual artifacts. Only users with the Standard + Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Returns lists of virtual artifacts. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: object + properties: + createDate: + type: string + type: + type: string + owner: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/dry-run/ipfs: + get: + tags: + - policies + description: >- + Returns lists of virtual artifacts. Only users with the Standard + Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Returns lists of virtual artifacts. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: object + properties: + createDate: + type: string + documentURL: + type: string + document: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/multiple: + post: + tags: + - policies + description: >- + Creates a link between the current policy and the main policy. Or + creates a group making the current policy the main one. + security: + - bearerAuth: [] + summary: Creates Multi policy config. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + requestBody: + description: Multi policy config. + required: true + content: + application/json: + schema: + type: object + required: + - mainPolicyTopicId + - synchronizationTopicId + properties: + mainPolicyTopicId: + type: string + synchronizationTopicId: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/MultiPolicyConfig' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + get: + tags: + - policies + description: Requests Multi policy config. + security: + - bearerAuth: [] + summary: Requests Multi policy config. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/MultiPolicyConfig' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/methodologies/categories: + get: + operationId: PolicyApi_getPolicyCategoriesAsync + summary: Get all categories + description: Get all categories + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyCategoryDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + /policies/methodologies/search: + post: + operationId: PolicyApi_getPoliciesByCategory + summary: Get filtered policies + description: Get policies by categories and text + parameters: [] + requestBody: + required: true + description: Filters + content: + application/json: + schema: + type: string + examples: + Filter1: + value: + categoryIds: + - '000000000000000000000001' + - '000000000000000000000002' + text: abc + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + /schema/{schemaId}: + get: + tags: + - schema + description: Returns schema by schema ID. + security: + - bearerAuth: [] + summary: Returns schema by schema ID. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schema/{schemaId}/parents: + get: + operationId: SingleSchemaApi_getSchemaParents + summary: Returns all parent schemas. + description: Returns all parent schemas. + parameters: + - name: schemaId + required: true + in: path + description: Schema identifier + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_7 + - schema + security: + - bearerAuth: [] + /schema/{schemaId}/tree: + get: + operationId: SingleSchemaApi_getSchemaTree + summary: Returns schema tree. + description: Returns schema tree. + parameters: + - name: schemaId + required: true + in: path + description: Schema identifier + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + name: + type: string + type: + type: string + children: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearerAuth: [] + /schemas: + get: + tags: + - schemas + description: Returns all schemas. + security: + - bearerAuth: [] + summary: Returns all schemas. + parameters: + - in: query + name: pageIndex + schema: + type: integer + description: >- + The number of pages to skip before starting to collect the result + set + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer + description: The numbers of items to return + examples: + pageSize: + summary: Example of a pageSize + value: 100 + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/{topicId}: + post: + tags: + - schemas + description: >- + Creates new schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - in: path + name: topicId + schema: + type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + security: + - bearerAuth: [] + summary: Create new schema. + requestBody: + description: Object that contains a valid schema. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + responses: + '201': + description: Created. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + get: + tags: + - schemas + description: Returns all schemas by topicId. + security: + - bearerAuth: [] + summary: Returns all schemas by topicId. + parameters: + - in: path + name: topicId + schema: + type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + - in: query + name: pageIndex + schema: + type: integer + description: >- + The number of pages to skip before starting to collect the result + set + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer + description: The numbers of items to return + examples: + pageSize: + summary: Example of a pageSize + value: 100 + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/type/{schemaType}: + get: + operationId: SchemaApi_getSchemaByType + summary: Finds the schema using the json document type. + description: Finds the schema using the json document type. + parameters: + - name: schemaType + required: true + in: path + description: Type + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_8 + - schemas + security: + - bearerAuth: [] + /schemas/list/all: + get: + operationId: SchemaApi_getAll + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearerAuth: [] + /schemas/list/sub: + get: + operationId: SchemaApi_getSub + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: category + required: false + in: query + description: Schema category + schema: + type: string + - name: topicId + required: false + in: query + description: Topic Id + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearerAuth: [] + /schemas/push/copy: + post: + operationId: SchemaApi_copySchemaAsync + summary: Copy schema. + description: >- + Copy schema. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + - bearerAuth: [] + /schemas/push/{topicId}: + post: + tags: + - schemas + description: >- + Creates new schema. Only users with the Standard Registry role are + allowed to make the request. + security: + - bearerAuth: [] + summary: Create new schema. + parameters: + - in: path + name: topicId + schema: + type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + requestBody: + description: Object that contains a valid schema. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/{schemaId}: + put: + tags: + - schemas + description: >- + Updates the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Updates the schema. + requestBody: + description: Object that contains a valid schema. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - schemas + description: >- + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Deletes the schema. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/{schemaId}/publish: + put: + tags: + - schemas + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Publishes the schema. + requestBody: + description: Object that contains policy version. + required: true + content: + application/json: + schema: + type: object + properties: + version: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/push/{schemaId}/publish: + put: + tags: + - schemas + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + security: + - bearerAuth: [] + summary: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + requestBody: + description: Object that contains policy version. + required: true + content: + application/json: + schema: + type: object + properties: + version: + type: string + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/import/message/preview: + post: + tags: + - schemas + description: >- + Previews the schema from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Schema preview from IPFS. + requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the schema. + required: true + content: + application/json: + schema: + type: object + properties: + messageId: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/push/import/message/preview: + post: + tags: + - schemas + description: >- + Previews the schema from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Schema preview from IPFS. + requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the schema. + required: true + content: + application/json: + schema: + type: object + properties: + messageId: + type: string + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/import/file/preview: + post: + tags: + - schemas + description: >- + Previews the schema from a zip file. Only users with the Standard + Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Schema preview from a zip file. + requestBody: + description: A zip file containing the schema to be viewed. + required: true + content: + binary/octet-stream: + schema: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/{topicId}/import/message: + post: + tags: + - schemas + description: >- + Imports new schema from IPFS into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - in: path + name: topicId + schema: + type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + security: + - bearerAuth: [] + summary: Imports new schema from IPFS. + requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the schema. + required: true + content: + application/json: + schema: + type: object + properties: + messageId: + type: string + responses: + '201': + description: Created. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/push/{topicId}/import/message: + post: + tags: + - schemas + description: >- + Imports new schema from IPFS into the local DB. Only users with the + Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Imports new schema from IPFS. + requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the schema. + required: true + content: + application/json: + schema: + type: object + properties: + messageId: + type: string + parameters: + - in: path + name: topicId + schema: + type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/{topicId}/import/file: + post: + tags: + - schemas + description: >- + Imports new schema from a zip file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - in: path + name: topicId + schema: + type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + security: + - bearerAuth: [] + summary: Imports new schema from a zip file. + requestBody: + description: A zip file containing schema to be imported. + content: + binary/octet-stream: + schema: + type: string + format: binary + required: true + responses: + '201': + description: Created. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/push/{topicId}/import/file: + post: + tags: + - schemas + description: >- + Imports new schema from a zip file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Imports new schema from a zip file. + requestBody: + description: A zip file containing schema to be imported. + content: + binary/octet-stream: + schema: + type: string + format: binary + required: true + parameters: + - in: path + name: topicId + schema: + type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/{schemaId}/export/message: + post: + tags: + - schemas + description: >- + Returns Hedera message IDs of the published schemas, these messages + contain IPFS CIDs of these schema files. Only users with the Standard + Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: List Hedera message IDs of published schemas. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Selected schema ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportSchema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/{schemaId}/export/file: + post: + tags: + - schemas + description: >- + Returns schema files for the schemas. Only users with the Standard + Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Return zip file with schemas. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Selected schema ID. + responses: + '200': + description: Successful operation. Response zip file + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/system/{username}: + post: + tags: + - schemas + description: >- + Creates new system schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - in: path + name: username + schema: + type: string + required: true + description: Username. + security: + - bearerAuth: [] + summary: Creates new system schema. + requestBody: + description: Object that contains a valid schema. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + responses: + '201': + description: Created. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + get: + tags: + - schemas + description: >- + Returns all system schemas by username. Only users with the Standard + Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Returns all system schemas by username. + parameters: + - in: path + name: username + schema: + type: string + required: true + description: Username. + - in: query + name: pageIndex + schema: + type: integer + description: >- + The number of pages to skip before starting to collect the result + set. + examples: + pageIndex: + summary: Example of a pageIndex. + value: 0 + - in: query + name: pageSize + schema: + type: integer + description: The number of items to return. + examples: + pageSize: + summary: Example of a pageSize. + value: 100 + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total number of items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/system/{schemaId}: + put: + tags: + - schemas + description: >- + Updates the system schema with the provided schema ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Updates the schema. + requestBody: + description: Object that contains a valid schema. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - schemas + description: >- + Deletes the system schema with the provided schema ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Deletes the schema. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/system/{schemaId}/active: + put: + tags: + - schemas + description: >- + Makes the selected scheme active. Other schemes of the same type become + inactive. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Publishes the schema. + requestBody: + description: Object that contains policy version. + required: true + content: + application/json: + schema: + type: object + properties: + version: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/system/entity/{schemaEntity}: + get: + tags: + - schemas + description: Finds the schema using the schema type. + parameters: + - in: path + name: schemaEntity + schema: + type: string + enum: + - STANDARD_REGISTRY + - USER + - POLICY + - MINT_TOKEN + - WIPE_TOKEN + - MINT_NFTOKEN + required: true + description: schema type. + security: + - bearerAuth: [] + summary: Returns schema by schema type. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /schemas/{schemaId}/export/xlsx: + get: + operationId: SchemaApi_getPolicyExportXlsx + summary: Return schemas in a xlsx file format for the specified policy. + description: >- + Returns a xlsx file containing schemas. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearerAuth: [] + - bearer: [] + /schemas/{topicId}/import/xlsx: + post: + operationId: SchemaApi_importPolicyFromXlsx + summary: Imports new schema from a xlsx file into the local DB. + description: >- + Imports new schema from a xlsx file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + schema: + type: string + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearerAuth: [] + - bearer: [] + /schemas/push/{topicId}/import/xlsx: + post: + operationId: SchemaApi_importPolicyFromXlsxAsync + summary: Imports new schema from a xlsx file into the local DB. + description: >- + Imports new schema from a xlsx file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + schema: + type: string + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearerAuth: [] + - bearer: [] + /schemas/import/xlsx/preview: + post: + operationId: SchemaApi_importPolicyFromXlsxPreview + summary: Previews the schema from a xlsx file. + description: >- + Previews the schema from a xlsx file. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearerAuth: [] + - bearer: [] + /schemas/export/template: + get: + operationId: SchemaApi_exportTemplate + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearerAuth: [] + - bearer: [] + /settings: + get: + tags: + - settings + description: >- + Returns current settings. For users with the Standard Registry role + only. + security: + - bearerAuth: [] + summary: Returns current settings. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CommonSettings' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + tags: + - settings + description: Set settings. For users with the Standard Registry role only. + security: + - bearerAuth: [] + summary: Set settings. + responses: + '201': + description: Created. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/CommonSettings' + /settings/environment: + get: + tags: + - settings + description: Returns current environment name. + security: + - bearerAuth: [] + summary: Returns current environment name. + responses: + '200': + description: Successful operation. + content: + text/plain: + schema: + type: string + example: testnet + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /settings/about: + get: + operationId: SettingsApi_getAbout + parameters: [] + responses: + '200': + description: '' + tags: + - settings + /tags: + post: + operationId: TagsApi_setTags + parameters: [] + responses: + '201': + description: '' + tags: + - tags + /tags/search: + post: + tags: + - tags + description: Search tags. + security: + - bearerAuth: [] + requestBody: + description: Object that contains filters. + required: true + content: + application/json: + schema: + oneOf: + - type: object + required: + - entity + - target + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + target: + type: string + - type: object + required: + - entity + - targets + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + targets: + type: array + items: + type: string + examples: + Single: + value: + entity: PolicyDocument + target: targetId1 + Multiple: + value: + entity: PolicyDocument + targets: + - targetId1 + - targetId2 + summary: Search tags. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + description: a (targetId, Tags) map. `targetId1` is an example key + properties: + targetId1: + $ref: '#/components/schemas/TagMap' + additionalProperties: + $ref: '#/components/schemas/TagMap' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tags/{uuid}: + delete: + tags: + - tags + description: Delete tag. + security: + - bearerAuth: [] + summary: Delete tag. + parameters: + - in: path + name: uuid + schema: + type: string + example: 00000000-0000-0000-0000-000000000000 + required: true + description: Tag identifier + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tags/synchronization: + post: + tags: + - tags + description: synchronization. + security: + - bearerAuth: [] + requestBody: + description: Object that contains filters. + required: true + content: + application/json: + schema: + type: object + required: + - entity + - target + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: targetId + summary: synchronization. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TagMap' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tags/schemas: + get: + tags: + - tags + description: Returns all schema. + security: + - bearerAuth: [] + summary: Returns all schemas. + parameters: + - in: query + name: pageIndex + schema: + type: integer + description: >- + The number of pages to skip before starting to collect the result + set + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer + description: The numbers of items to return + examples: + pageSize: + summary: Example of a pageSize + value: 100 + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + tags: + - tags + description: >- + Creates new schema. Only users with the Standard Registry role are + allowed to make the request. + security: + - bearerAuth: [] + summary: Creates new schema. + requestBody: + description: Object that contains a valid schema. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + responses: + '201': + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tags/schemas/{schemaId}: + delete: + tags: + - tags + description: >- + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Delete the schema. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: + tags: + - tags + description: >- + Updates the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Updates the schema. + requestBody: + description: Object that contains a valid schema. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tags/schemas/{schemaId}/publish: + put: + tags: + - tags + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Publishes the schema. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tags/schemas/published: + get: + tags: + - tags + description: Return a list of all published schemas. + security: + - bearerAuth: [] + summary: Return a list of all published schemas. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tasks/{taskId}: + get: + tags: + - tasks + description: Returns task statuses by Id. + security: + - bearerAuth: [] + summary: Returns task statuses. + parameters: + - in: path + name: taskId + schema: + type: string + required: true + description: Task ID. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskStatus' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens: + get: + tags: + - tokens + description: >- + Returns all tokens. For the Standard Registry role it returns only the + list of tokens, for other users it also returns token balances as well + as the KYC, Freeze, and Association statuses. Not allowed for the + Auditor role. + security: + - bearerAuth: [] + summary: Return a list of tokens. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + allOf: + - $ref: '#/components/schemas/TokenInfo' + - type: object + properties: + policies: + type: array + items: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + tags: + - tokens + description: >- + Creates a new token. Only users with the Standard Registry role are + allowed to make the request. + security: + - bearerAuth: [] + summary: Creates a new token. + requestBody: + description: Object that contains token information. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Token' + responses: + '201': + description: Created. + content: + application/json: + schema: + type: array + items: + allOf: + - $ref: '#/components/schemas/TokenInfo' + - type: object + properties: + policies: + type: array + items: + type: string + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/push: + post: + tags: + - tokens + description: >- + Creates a new token. Only users with the Standard Registry role are + allowed to make the request. + security: + - bearerAuth: [] + summary: Creates a new token. + requestBody: + description: Object that contains token information. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Token' + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/push/{tokenId}: + delete: + operationId: TokensApi_deleteTokenAsync + parameters: [] + responses: + '202': + description: '' + tags: &ref_9 + - tokens + /tokens/{tokenId}/associate: + put: + tags: + - tokens + description: >- + Associates the user with the provided Hedera token. Only users with the + Installer role are allowed to make the request. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + security: + - bearerAuth: [] + summary: Associates the user with the provided Hedera token. + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/push/{tokenId}/associate: + put: + tags: + - tokens + description: >- + Associates the user with the provided Hedera token. Only users with the + Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Associates the user with the provided Hedera token. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/{tokenId}/dissociate: + put: + tags: + - tokens + description: >- + Disassociates the user with the provided Hedera token. Only users with + the Installer role are allowed to make the request. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + security: + - bearerAuth: [] + summary: Associate the user with the provided Hedera token. + responses: + '202': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/push/{tokenId}/dissociate: + put: + tags: + - tokens + description: >- + Disassociates the user with the provided Hedera token. Only users with + the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Disassociates the user with the provided Hedera token. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/{tokenId}/{username}/grant-kyc: + put: + tags: + - tokens + description: >- + Sets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + - in: path + name: username + schema: + type: string + required: true + description: Username. + security: + - bearerAuth: [] + summary: Sets the KYC flag for the user. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfo' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/push/{tokenId}/{username}/grant-kyc: + put: + tags: + - tokens + description: >- + Sets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + security: + - bearerAuth: [] + summary: Sets the KYC flag for the user. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + - in: path + name: username + schema: + type: string + required: true + description: Username. + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/{tokenId}/{username}/revoke-kyc: + put: + tags: + - tokens + description: >- + Unsets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + - in: path + name: username + schema: + type: string + required: true + description: Username. + security: + - bearerAuth: [] + summary: Unsets the KYC flag for the user. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfo' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/push/{tokenId}/{username}/revoke-kyc: + put: + tags: + - tokens + description: >- + Unsets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + security: + - bearerAuth: [] + summary: Unsets the KYC flag for the user. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + - in: path + name: username + schema: + type: string + required: true + description: Username. + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/{tokenId}/{username}/freeze: + put: + tags: + - tokens + description: >- + Freezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + - in: path + name: username + schema: + type: string + required: true + description: Username. + security: + - bearerAuth: [] + summary: Freeze transfers of the specified token for the user. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfo' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/{tokenId}/{username}/unfreeze: + put: + tags: + - tokens + description: >- + Unfreezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + - in: path + name: username + schema: + type: string + required: true + description: Username. + security: + - bearerAuth: [] + summary: Unfreezes transfers of the specified token for the user. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfo' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/push/{tokenId}/{username}/freeze: + put: + tags: + - tokens + description: >- + Freezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Freeze transfers of the specified token for the user. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + - in: path + name: username + schema: + type: string + required: true + description: Username. + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/push/{tokenId}/{username}/unfreeze: + put: + tags: + - tokens + description: >- + Unfreezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Unfreezes transfers of the specified token for the user. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + - in: path + name: username + schema: + type: string + required: true + description: Username. + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/{tokenId}/{username}/info: + get: + tags: + - tokens + description: >- + Returns user information for the selected token. Only users with the + Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + - in: path + name: username + schema: + type: string + required: true + description: Username. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfo' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tokens/{tokenId}/serials: + get: + operationId: TokensApi_getTokenSerials + summary: Return token serials. + description: Returns token serials of current user. + parameters: + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Token serials. + content: + application/json: + schema: + type: array + items: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /themes: + get: + tags: + - themes + description: Returns all themes. + security: + - bearerAuth: [] + summary: Return a list of all themes. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Theme' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + tags: + - themes + description: Creates a new theme. + security: + - bearerAuth: [] + summary: Creates a new theme. + requestBody: + description: Object that contains theme configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Theme' + responses: + '201': + description: Created. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /themes/{themeId}: + put: + tags: + - themes + description: Updates theme configuration for the specified theme ID. + summary: Updates theme configuration. + parameters: + - in: path + name: themeId + description: Selected theme ID. + required: true + schema: + type: string + requestBody: + description: Object that contains theme configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Theme' + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Theme' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - themes + description: Deletes the theme with the provided theme ID. + parameters: + - in: path + name: themeId + schema: + type: string + required: true + description: Theme ID. + security: + - bearerAuth: [] + summary: Deletes the theme. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /themes/import/file: + post: + tags: + - themes + description: Imports new theme from the provided zip file into the local DB. + security: + - bearerAuth: [] + summary: Imports new theme from a zip file. + requestBody: + description: A zip file that contains the theme to be imported. + required: true + content: + binary/octet-stream: + schema: + type: string + format: binary + responses: + '201': + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/Theme' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /themes/{themeId}/export/file: + get: + tags: + - themes + description: Returns a zip file containing the theme. + parameters: + - in: path + name: themeId + schema: + type: string + required: true + description: Selected theme ID. + security: + - bearerAuth: [] + summary: Returns a zip file containing the theme. + responses: + '200': + description: Successful operation. Response zip file + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /trust-chains: + get: + tags: + - trustchains + description: >- + Requests all VP documents. Only users with the Auditor role are allowed + to make the request. + security: + - bearerAuth: [] + summary: Returns a list of all VP documents. + parameters: + - in: query + name: pageIndex + schema: + type: integer + description: >- + The number of pages to skip before starting to collect the result + set + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer + description: The numbers of items to return + examples: + pageSize: + summary: Example of a pageSize + value: 100 + - in: query + name: policyId + schema: + type: string + description: Selected policy ID. + - in: query + name: policyOwner + schema: + type: string + description: Selected Standard Registry (DID). + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VerifiablePresentation' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /trust-chains/{hash}: + get: + tags: + - trustchains + description: >- + Builds and returns a trustchain, from the VP to the root VC document. + Only users with the Auditor role are allowed to make the request. + parameters: + - in: path + name: hash + schema: + type: string + required: true + description: Hash or ID of a VP document. + security: + - bearerAuth: [] + summary: Returns a trustchain for a VP document. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TrustChains' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /wizard/policy: + post: + tags: + - wizard + description: >- + Creates a new policy by wizard. Only users with the Standard Registry + role are allowed to make the request. + security: + - bearerAuth: [] + summary: Creates a new policy. + requestBody: + description: Object that contains wizard configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfig' + responses: + '201': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + policyId: + type: string + wizardConfig: + $ref: '#/components/schemas/WizardConfig' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /wizard/push/policy: + post: + operationId: WizardApi_setPolicyAsync + summary: Creates a new policy. + description: >- + Creates a new policy by wizard. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + saveState: + type: boolean + wizardConfig: + type: object + required: + - policy + - roles + - schemas + - trustChain + properties: + roles: + type: array + items: + type: string + policy: + type: object + properties: + name: + type: string + description: + type: string + topicDescription: + type: string + policyTag: + type: string + schemas: + type: array + items: + type: object + properties: + name: + type: string + iri: + type: string + isApproveEnable: + type: boolean + isMintSchema: + type: boolean + mintOptions: + type: object + properties: + tokenId: + type: string + rule: + type: string + dependencySchemaIri: + type: string + relationshipsSchemaIri: + type: string + initialRolesFor: + type: array + items: + type: string + rolesConfig: + type: array + items: + type: object + properties: + role: + type: string + isApprover: + type: boolean + isCreator: + type: boolean + gridColumns: + type: array + items: + type: object + properties: + field: + type: string + title: + type: string + trustChain: + type: array + items: + type: object + properties: + role: + type: string + mintSchemaIri: + type: string + viewOnlyOwnDocuments: + type: boolean + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - wizard + /wizard/{policyId}/config: + post: + tags: + - wizard + description: >- + Get policy config by wizard. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy identifier. + security: + - bearerAuth: [] + summary: Get policy config. + requestBody: + description: Object that contains wizard configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfig' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + policyConfig: + $ref: '#/components/schemas/PolicyConfig' + wizardConfig: + $ref: '#/components/schemas/WizardConfig' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /branding: + post: + operationId: BrandingApi_setBranding + parameters: [] + responses: + '401': + description: Unauthorized + tags: &ref_10 + - branding + security: + - bearer: [] + get: + operationId: BrandingApi_getBranding + parameters: [] + responses: + '200': + description: '' + tags: *ref_10 + /suggestions: + post: + operationId: SuggestionsApi_policySuggestions + summary: Get next and nested suggested block types + description: >- + Get next and nested suggested block types. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsInputDTO' + responses: + '200': + description: >- + Successful operation. Suggested next and nested block types + respectively. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsOutputDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_11 + - suggestions + security: + - bearer: [] + - bearerAuth: [] + /suggestions/config: + post: + operationId: SuggestionsApi_setPolicySuggestionsConfig + summary: Set suggestions config + description: >- + Set suggestions config. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + responses: + '201': + description: Successful operation. Response setted suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + '401': + description: Unauthorized. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + - bearerAuth: [] + get: + operationId: SuggestionsApi_getPolicySuggestionsConfig + summary: Get suggestions config + description: >- + Get suggestions config. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. Response suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + '401': + description: Unauthorized. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + - bearerAuth: [] + /notifications: + get: + operationId: NotificationsApi_getAllNotifications + summary: Get all notifications + description: Returns all notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns notifications and count. + headers: + X-Total-Count: + description: Count of notifications + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_12 + - notifications + security: + - bearer: [] + - bearerAuth: [] + /notifications/new: + get: + operationId: NotificationsApi_getNewNotifications + summary: Get new notifications + description: Returns new notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns new notifications. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + - bearerAuth: [] + /notifications/progresses: + get: + operationId: NotificationsApi_getProgresses + summary: Get progresses + description: Returns progresses. + parameters: [] + responses: + '200': + description: Successful operation. Returns progresses. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProgressDTO' + '401': + description: Unauthorized. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + - bearerAuth: [] + /notifications/read/all: + post: + operationId: NotificationsApi_readAll + summary: Read all notifications + description: Returns new notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns notifications. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + - bearerAuth: [] + /notifications/delete/{notificationId}: + delete: + operationId: NotificationsApi_delete + summary: Delete notifications up to this point + description: Returns deleted notifications count. + parameters: + - name: notificationId + required: true + in: path + schema: + type: string + responses: + '200': + description: Successful operation. Returns deleted notifications count. + content: + application/json: + schema: + type: number + '401': + description: Unauthorized. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + - bearerAuth: [] + /projects/search: + post: + operationId: ProjectsAPI_projectSearch + summary: Search projects + description: Search projects by filters + parameters: [] + requestBody: + required: true + description: The question of choosing a methodology + content: + application/json: + schema: + type: string + examples: + q: + value: >- + What methodology can I use for production of electricity using + renewable energy technologies? + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_13 + - projects + /projects/compare/documents: + post: + operationId: ProjectsAPI_compareDocuments + summary: Compare documents. + description: Compare documents. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000002' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000002' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDocumentsDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + /projects/properties: + get: + operationId: ProjectsAPI_getPolicyProperties + summary: Get all properties + description: Get all properties + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PropertiesDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + /record/{policyId}/status: + get: + operationId: RecordApi_getRecordStatus + summary: Get recording or running status. + description: >- + Get recording or running status. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RecordStatusDTO' + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_14 + - record + security: + - bearerAuth: [] + - bearer: [] + /record/{policyId}/recording/start: + post: + operationId: RecordApi_startRecord + summary: Start recording. + description: >- + Start recording. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearerAuth: [] + - bearer: [] + /record/{policyId}/recording/stop: + post: + operationId: RecordApi_stopRecord + summary: Stop recording. + description: >- + Stop recording. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearerAuth: [] + - bearer: [] + /record/{policyId}/recording/actions: + get: + operationId: RecordApi_getRecordActions + summary: Get recorded actions. + description: >- + Get recorded actions. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RecordActionDTO' + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearerAuth: [] + - bearer: [] + /record/{policyId}/running/start: + post: + operationId: RecordApi_runRecord + summary: Run record from a zip file. + description: >- + Run record from a zip file. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + requestBody: + required: true + description: A zip file containing record to be run. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearerAuth: [] + - bearer: [] + /record/{policyId}/running/stop: + post: + operationId: RecordApi_stopRunning + summary: Stop running. + description: >- + Stop running. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearerAuth: [] + - bearer: [] + /record/{policyId}/running/results: + get: + operationId: RecordApi_getRecordResults + summary: Get running results. + description: >- + Get running results. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningResultDTO' + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearerAuth: [] + - bearer: [] + /record/{policyId}/running/details: + get: + operationId: RecordApi_getRecordDetails + summary: Get running details. + description: >- + Get running details. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningDetailsDTO' + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearerAuth: [] + - bearer: [] + /record/{policyId}/running/fast-forward: + post: + operationId: RecordApi_fastForward + summary: Fast Forward. + description: >- + Fast Forward. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearerAuth: [] + - bearer: [] + /record/{policyId}/running/retry: + post: + operationId: RecordApi_retryStep + summary: Retry step. + description: >- + Retry step. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearerAuth: [] + - bearer: [] + /record/{policyId}/running/skip: + post: + operationId: RecordApi_skipStep + summary: Skip step. + description: >- + Skip step. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearerAuth: [] + - bearer: [] + /ai-suggestions/ask: + get: + operationId: AISuggestionsAPI_getAIAnswer + summary: Get methodology suggestion + description: Returns AI response to the current question + parameters: + - name: q + required: true + in: path + description: The question of choosing a methodology + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + example: ACM0001, ACM0002, ACM0006, ACM0007, ACM0018 + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_15 + - ai-suggestions + /ai-suggestions/rebuild-vector: + put: + operationId: AISuggestionsAPI_rebuildVector + summary: Rebuild AI vector + description: Rebuilds vector based on policy data in the DB + parameters: [] + responses: + '200': + description: '' + tags: *ref_15 + /schemas/type/{type}: + get: + tags: + - schemas + description: Finds the schema using the json document type. + parameters: + - in: path + name: type + schema: + type: string + required: true + description: JSON type. + security: + - bearerAuth: [] + summary: Returns schema by type. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/tag/{tag}: + get: + tags: + - policies + description: >- + Requests block ID from a policy by tag. Only users with the Standard + Registry and Installer roles are allowed to make the request. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + - in: path + name: tag + schema: + type: string + required: true + description: Tag from the selected policy. + summary: Requests block ID from a policy by tag. + security: + - bearerAuth: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + id: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /policies/{policyId}/tag/{tag}/blocks: + post: + tags: + - policies + description: Sends data to the specified block. + security: + - bearerAuth: [] + summary: Sends data to the specified block. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + - in: path + name: tag + schema: + type: string + required: true + description: Tag from the selected policy. + requestBody: + description: Object with the data to be sent to the block. + required: true + content: + application/json: + schema: + type: object + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyBlockData' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + get: + tags: + - policies + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. + security: + - bearerAuth: [] + summary: Requests block data. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + - in: path + name: tag + schema: + type: string + required: true + description: Tag from the selected policy. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyBlockData' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /ipfs/file/: + post: + tags: + - ipfs + description: Add file to ipfs. + summary: Add file to ipfs. + requestBody: + description: Data array of file. + required: true + content: + binary/octet-stream: + schema: + type: string + format: binary + security: + - bearerAuth: [] + responses: + '201': + description: Created. + content: + application/json: + schema: + description: CID of added file. + type: string + '401': + description: Unauthorized. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /artifacts/{policyId}: + post: + tags: + - artifacts + description: Upload artifact. For users with the Standard Registry role only. + security: + - bearerAuth: [] + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + artifacts: + type: array + items: + type: string + format: binary + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy identifier + summary: Upload Artifact. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Artifact' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /artifact: + get: + deprecated: true + tags: + - artifacts + description: Returns all artifacts. + security: + - bearerAuth: [] + summary: Returns all artifacts. + parameters: + - in: query + name: policyId + schema: + type: string + description: Policy identifier + - in: query + name: pageIndex + schema: + type: integer + description: >- + The number of pages to skip before starting to collect the result + set + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer + description: The numbers of items to return + examples: + pageSize: + summary: Example of a pageSize + value: 100 + responses: + '200': + description: Successful operation. + headers: + x-total-count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Artifact' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /artifact/{policyId}: + post: + deprecated: true + tags: + - artifacts + description: Upload artifact. For users with the Standard Registry role only. + security: + - bearerAuth: [] + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + artifacts: + type: array + items: + type: string + format: binary + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy identifier + summary: Upload Artifact. + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Artifact' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /artifact/{artifactId}: + delete: + deprecated: true + tags: + - artifacts + description: Delete artifact. + security: + - bearerAuth: [] + summary: Delete artifact. + parameters: + - in: path + name: artifactId + schema: + type: string + required: true + description: Artifact identifier + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /tags/: + post: + tags: + - tags + description: Creates new tag. + security: + - bearerAuth: [] + summary: Creates new tag. + requestBody: + description: Object that contains tag information. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + responses: + '201': + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +info: + title: Guardian + description: >- + The Guardian is a modular open-source solution that includes best-in-class + identity management and decentralized ledger technology (DLT) libraries. At + the heart of the Guardian solution is a sophisticated Policy Workflow Engine + (PWE) that enables applications to offer a requirements-based tokenization + implementation. + version: 2.21.1 + contact: + name: API developer + url: https://envisionblockchain.com + email: info@envisionblockchain.com + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html +tags: [] +servers: + - url: /api/v1 + description: version 1.0 +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + AccountsResponseDTO: + type: object + properties: + username: + type: string + role: + type: string + did: + type: string + required: + - username + - role + - did + InternalServerErrorDTO: + type: object + properties: + code: + type: number + message: + type: string + required: + - code + - message + RegisterUserDTO: + type: object + properties: + username: + type: string + password: + type: string + password_confirmation: + type: string + role: + type: string + required: + - username + - password + - password_confirmation + - role + AccountsSessionResponseDTO: + type: object + properties: + username: + type: string + role: + type: string + accessToken: + type: string + required: + - username + - role + - accessToken + LoginUserDTO: + type: object + properties: + username: + type: string + password: + type: string + required: + - username + - password + CredentialSubjectDTO: + type: object + properties: + geography: + type: string + law: + type: string + tags: + type: string + ISIC: + type: string + '@context': + type: array + items: + type: string + id: + type: string + type: + type: string + required: + - geography + - law + - tags + - ISIC + - '@context' + - id + - type + ProofDTO: + type: object + properties: + type: + type: string + created: + format: date-time + type: string + verificationMethod: + type: string + proofPurpose: + type: string + jws: + type: string + required: + - type + - created + - verificationMethod + - proofPurpose + - jws + VcDocumentDTO: + type: object + properties: + id: + type: string + type: + type: array + items: + type: string + issuer: + type: string + issuanceDate: + format: date-time + type: string + '@context': + type: array + items: + type: string + credentialSubject: + $ref: '#/components/schemas/CredentialSubjectDTO' + proof: + $ref: '#/components/schemas/ProofDTO' + required: + - id + - type + - issuer + - issuanceDate + - '@context' + - credentialSubject + - proof + PolicyDTO: + type: object + properties: + _id: + type: string + createDate: + format: date-time + type: string + uuid: + type: string + name: + type: string + description: + type: string + status: + type: string + creator: + type: string + owner: + type: string + topicId: + type: string + policyTag: + type: string + codeVersion: + type: string + userRoles: + type: array + items: + type: string + userGroups: + type: array + items: + type: string + userRole: + type: string + userGroup: + type: string + id: + type: string + required: + - _id + - createDate + - uuid + - name + - description + - status + - creator + - owner + - topicId + - policyTag + - codeVersion + - userRoles + - userGroups + - userRole + - userGroup + - id + AggregatedDTOItem: + type: object + properties: + did: + type: string + hederaAccountId: + type: string + vcDocument: + $ref: '#/components/schemas/VcDocumentDTO' + policies: + $ref: '#/components/schemas/PolicyDTO' + required: + - did + - hederaAccountId + - vcDocument + - policies + UserDTO: + type: object + properties: + username: + type: string + did: + type: string + required: + - username + - did + BalanceResponseDTO: + type: object + properties: + balance: + type: number + unit: + type: string + user: + $ref: '#/components/schemas/UserDTO' + required: + - balance + - unit + - user + FilterSearchPoliciesDTO: + type: object + properties: + policyId: + type: string + required: + - policyId + SearchPoliciesDTO: + type: object + properties: + target: + type: object + result: + type: object + required: + - target + - result + FilterPoliciesDTO: + type: object + properties: + policyId1: + type: string + policyId2: + type: string + policyIds: + type: string + eventsLvl: + type: number + propLvl: + type: number + childrenLvl: + type: number + idLvl: + type: number + required: + - policyId1 + - policyId2 + - policyIds + - eventsLvl + - propLvl + - childrenLvl + - idLvl + ComparePoliciesDTO: + type: object + properties: + blocks: + type: object + groups: + type: object + left: + type: object + right: + type: object + roles: + type: object + tokens: + type: object + topics: + type: object + total: + type: object + required: + - blocks + - groups + - left + - right + - roles + - tokens + - topics + - total + FilterModulesDTO: + type: object + properties: + moduleId1: + type: string + moduleId2: + type: string + eventsLvl: + type: number + propLvl: + type: number + childrenLvl: + type: number + idLvl: + type: number + required: + - moduleId1 + - moduleId2 + - eventsLvl + - propLvl + - childrenLvl + - idLvl + CompareModulesDTO: + type: object + properties: + blocks: + type: object + left: + type: object + right: + type: object + inputEvents: + type: object + outputEvents: + type: object + variables: + type: object + total: + type: object + required: + - blocks + - left + - right + - inputEvents + - outputEvents + - variables + - total + FilterSchemasDTO: + type: object + properties: + schemaId1: + type: string + schemaId2: + type: string + idLvl: + type: number + required: + - schemaId1 + - schemaId2 + - idLvl + CompareSchemasDTO: + type: object + properties: + fields: + type: object + left: + type: object + right: + type: object + total: + type: object + required: + - fields + - left + - right + - total + FilterDocumentsDTO: + type: object + properties: + documentId1: + type: string + documentId2: + type: string + documentIds: + type: string + required: + - documentId1 + - documentId2 + - documentIds + CompareDocumentsDTO: + type: object + properties: + documents: + type: object + left: + type: object + right: + type: object + total: + type: object + required: + - documents + - left + - right + - total + FilterToolsDTO: + type: object + properties: + toolId1: + type: string + toolId2: + type: string + toolIds: + type: string + required: + - toolId1 + - toolId2 + - toolIds + CompareToolsDTO: + type: object + properties: + blocks: + type: object + left: + type: object + right: + type: object + inputEvents: + type: object + outputEvents: + type: object + variables: + type: object + total: + type: object + required: + - blocks + - left + - right + - inputEvents + - outputEvents + - variables + - total + ArtifactDTOItem: + type: object + properties: + id: + type: string + name: + type: string + uuid: + type: string + extention: + type: string + type: + type: string + required: + - id + - name + - uuid + - extention + - type + ContractDTO: + type: object + properties: + id: + type: string + contractId: + type: string + description: + type: string + owner: + type: string + permissions: + type: number + topicId: + type: string + type: + type: string + enum: + - WIPE + - RETIRE + syncRequestsDate: + format: date-time + type: string + syncPoolsDate: + format: date-time + type: string + lastSyncEventTimeStamp: + type: string + wipeContractIds: + type: array + items: + type: string + required: + - id + - contractId + - description + - owner + - permissions + - topicId + - type + - syncRequestsDate + - syncPoolsDate + - lastSyncEventTimeStamp + - wipeContractIds + WiperRequestDTO: + type: object + properties: + id: + type: string + contractId: + type: string + user: + type: string + required: + - id + - contractId + - user + RetireRequestDTO: + type: object + properties: + id: + type: string + contractId: + type: string + tokens: + type: object + properties: + token: + type: string + count: + type: number + serials: + type: array + items: + type: number + decimals: + type: number + type: + enum: + - non-fungible + - fungible + tokenSymbol: + type: string + tokenIds: + type: array + items: + type: string + user: + type: string + required: + - id + - contractId + - tokens + - tokenIds + - user + Date: + type: object + properties: {} + RetirePoolDTO: + type: object + properties: + id: + type: string + contractId: + type: string + tokens: + type: object + properties: + token: + type: string + contract: + type: string + count: + type: number + decimals: + type: number + type: + enum: + - non-fungible + - fungible + tokenSymbol: + type: string + tokenIds: + type: array + items: + type: string + immediately: + type: boolean + enabled: + type: boolean + required: + - id + - contractId + - tokens + - tokenIds + - immediately + - enabled + RetirePoolTokenDTO: + type: object + properties: + token: + type: string + count: + type: number + required: + - token + - count + RetireRequestTokenDTO: + type: object + properties: + token: + type: string + count: + type: number + serials: + type: array + items: + type: string + required: + - token + - count + - serials + ProfileDTO: + type: object + properties: + username: + type: string + nullable: false + role: + type: string + nullable: false + did: + type: string + nullable: true + parent: + type: string + nullable: true + hederaAccountId: + type: string + nullable: true + confirmed: + type: boolean + nullable: true + failed: + type: boolean + nullable: true + topicId: + type: string + nullable: true + parentTopicId: + type: string + nullable: true + didDocument: + type: object + nullable: true + vcDocument: + type: object + nullable: true + required: + - username + - role + SubjectDTO: + type: object + properties: + '@context': + nullable: true + type: array + items: + type: string + id: + type: string + nullable: true + type: + type: string + nullable: true + required: + - '@context' + DidDocumentDTO: + type: object + properties: + id: + type: string + nullable: false + context: + nullable: true + type: array + items: + type: string + alsoKnownAs: + nullable: true + type: array + items: + type: string + controller: + nullable: true + type: array + items: + type: string + verificationMethod: + nullable: true + type: array + items: + type: object + authentication: + nullable: true + type: array + items: + type: object + assertionMethod: + nullable: true + type: array + items: + type: object + keyAgreement: + nullable: true + type: array + items: + type: object + capabilityInvocation: + nullable: true + type: array + items: + type: object + capabilityDelegation: + nullable: true + type: array + items: + type: object + service: + nullable: true + type: array + items: + type: object + required: + - id + - context + - alsoKnownAs + - controller + - verificationMethod + - authentication + - assertionMethod + - keyAgreement + - capabilityInvocation + - capabilityDelegation + - service + DidKeyDTO: + type: object + properties: + id: + type: string + nullable: false + key: + type: string + nullable: false + required: + - id + - key + CredentialsDTO: + type: object + properties: + entity: + type: string + nullable: false + hederaAccountId: + type: string + nullable: false + hederaAccountKey: + type: string + nullable: false + parent: + type: string + nullable: true + vcDocument: + nullable: true + allOf: + - $ref: '#/components/schemas/SubjectDTO' + didDocument: + nullable: true + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + didKeys: + nullable: true + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' + required: + - entity + - hederaAccountId + - hederaAccountKey + TaskDTO: + type: object + properties: + taskId: + type: string + expectation: + type: number + required: + - taskId + - expectation + DidDocumentStatusDTO: + type: object + properties: + valid: + type: boolean + nullable: false + error: + type: string + nullable: true + didDocument: + type: object + nullable: false + required: + - valid + - error + - didDocument + DidDocumentWithKeyDTO: + type: object + properties: + document: + nullable: false + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + keys: + nullable: false + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' + required: + - document + - keys + DidKeyStatusDTO: + type: object + properties: + id: + type: string + nullable: false + key: + type: string + nullable: false + valid: + type: boolean + nullable: false + required: + - id + - key + - valid + MigrationConfigPoliciesDTO: + type: object + properties: + src: + type: string + dst: + type: string + required: + - src + - dst + MigrationConfigDTO: + type: object + properties: + policies: + $ref: '#/components/schemas/MigrationConfigPoliciesDTO' + vcs: + type: array + items: + type: string + vps: + type: array + items: + type: string + schemas: + type: object + groups: + type: object + roles: + type: object + required: + - policies + - vcs + - vps + - schemas + - groups + - roles + PolicyCategoryDTO: + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - id + - name + - type + SchemaDTO: + type: object + properties: + id: + type: string + name: + type: string + description: + type: string + entity: + type: string + document: + type: string + uuid: + type: string + iri: + type: string + hash: + type: string + status: + type: string + topicId: + type: string + version: + type: string + owner: + type: string + messageId: + type: string + required: + - id + - name + - description + - entity + - document + - uuid + - iri + - hash + - status + - topicId + - version + - owner + - messageId + VersionSchemaDTO: + type: object + properties: + version: + type: string + required: + - version + MessageSchemaDTO: + type: object + properties: + messageId: + type: string + required: + - messageId + ExportSchemaDTO: + type: object + properties: + id: + type: string + name: + type: string + description: + type: string + version: + type: string + owner: + type: string + messageId: + type: string + required: + - id + - name + - description + - version + - owner + - messageId + SystemSchemaDTO: + type: object + properties: + name: + type: string + entity: + type: string + required: + - name + - entity + SettingsDTO: + type: object + properties: + ipfsStorageApiKey: + type: string + operatorId: + type: string + operatorKey: + type: string + required: + - ipfsStorageApiKey + - operatorId + - operatorKey + SuggestionsInputDTO: + type: object + properties: + blockType: + type: string + children: + nullable: true + type: array + items: + type: object + required: + - blockType + - children + SuggestionsOutputDTO: + type: object + properties: + next: + type: string + nested: + type: string + required: + - next + - nested + SuggestionsConfigItemDTO: + type: object + properties: + id: + type: string + type: + type: string + enum: + - Policy + - Module + index: + type: number + required: + - id + - type + - index + SuggestionsConfigDTO: + type: object + properties: + items: + $ref: '#/components/schemas/SuggestionsConfigItemDTO' + required: + - items + NotificationDTO: + type: object + properties: + title: + type: string + message: + type: string + type: + type: string + enum: + - INFO + - ERROR + - WARN + - SUCCESS + action: + type: string + enum: + - POLICY_CONFIGURATION + - POLICY_VIEW + - POLICIES_PAGE + - SCHEMAS_PAGE + - TOKENS_PAGE + - PROFILE_PAGE + result: + type: object + read: + type: boolean + old: + type: boolean + required: + - title + - message + - type + - action + - result + - read + - old + ProgressDTO: + type: object + properties: + action: + type: string + message: + type: string + progress: + type: number + type: + type: string + enum: + - INFO + - ERROR + - WARN + - SUCCESS + taskId: + type: string + required: + - action + - message + - progress + - type + - taskId + ProjectDTO: + type: object + properties: + id: + type: string + policyId: + type: string + policyName: + type: string + registered: + type: string + title: + type: string + companyName: + type: string + sectoralScope: + type: string + required: + - id + - policyId + - policyName + - registered + - title + - companyName + - sectoralScope + PropertiesDTO: + type: object + properties: + id: + type: string + title: + type: string + value: + type: string + required: + - id + - title + - value + RecordStatusDTO: + type: object + properties: + type: + type: string + policyId: + type: string + uuid: + type: string + status: + type: string + required: + - type + - policyId + - uuid + - status + Object: + type: object + properties: {} + RecordActionDTO: + type: object + properties: + uuid: + type: string + policyId: + type: string + method: + type: string + action: + type: string + time: + type: string + user: + type: string + target: + type: string + required: + - uuid + - policyId + - method + - action + - time + - user + - target + ResultInfoDTO: + type: object + properties: + tokens: + type: number + documents: + type: number + required: + - tokens + - documents + ResultDocumentDTO: + type: object + properties: + type: + type: string + schema: + type: string + rate: + type: string + documents: + type: object + required: + - type + - schema + - rate + - documents + RunningResultDTO: + type: object + properties: + info: + $ref: '#/components/schemas/ResultInfoDTO' + total: + type: number + documents: + $ref: '#/components/schemas/ResultDocumentDTO' + required: + - info + - total + - documents + RunningDetailsDTO: + type: object + properties: + left: + type: object + right: + type: object + total: + type: number + documents: + type: object + required: + - left + - right + - total + - documents + ToolDTO: + type: object + properties: + id: + type: string + uuid: + type: string + name: + type: string + description: + type: string + config: + type: object + status: + type: string + creator: + type: string + owner: + type: string + topicId: + type: string + messageId: + type: string + codeVersion: + type: string + createDate: + type: string + required: + - id + - uuid + - name + - description + - config + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + RegisteredUsersDTO: + type: object + properties: + username: + type: string + did: + type: string + parent: + type: string + role: + type: string + policyRoles: + type: array + items: + type: string + required: + - username + - did + - parent + - role + - policyRoles + Credentials: + type: object + required: + - username + - password + properties: + username: + type: string + password: + type: string + Account: + type: object + required: + - username + - role + properties: + username: + type: string + role: + type: string + did: + type: string + Session: + type: object + required: + - username + - role + - accessToken + properties: + username: + type: string + role: + type: string + accessToken: + type: string + User: + type: object + required: + - username + - role + properties: + confirmed: + type: string + failed: + type: string + username: + type: string + role: + type: string + hederaAccountId: + type: string + hederaAccountKey: + type: string + did: + type: string + didDocument: + type: object + vcDocument: + type: object + parent: + type: string + topicId: + type: string + Schema: + type: object + required: + - id + - name + - description + - entity + - document + properties: + id: + type: string + iri: + type: string + uuid: + type: string + name: + type: string + description: + type: string + entity: + type: string + hash: + type: string + status: + type: string + document: + oneOf: + - type: string + - type: object + topicId: + type: string + version: + type: string + owner: + type: string + messageId: + type: string + ImportSchema: + type: object + required: + - schemes + properties: + schemes: + type: array + items: + type: object + required: + - document + - entity + - name + - uuid + properties: + document: + type: string + entity: + type: string + hash: + type: string + name: + type: string + uuid: + type: string + ExportSchema: + type: object + required: + - ids + properties: + name: + type: string + version: + type: string + messageId: + type: string + Token: + type: object + required: + - changeSupply + - decimals + - enableAdmin + - enableKYC + - enableFreeze + - enableWipe + - initialSupply + - tokenName + - tokenSymbol + - tokenType + properties: + changeSupply: + type: boolean + decimals: + type: string + enableAdmin: + type: boolean + enableFreeze: + type: boolean + enableKYC: + type: boolean + enableWipe: + type: boolean + initialSupply: + type: string + tokenName: + type: string + tokenSymbol: + type: string + tokenType: + type: string + TokenInfo: + type: object + required: + - id + - tokenId + - tokenName + - tokenSymbol + - tokenType + - decimals + - associated + - balance + - frozen + - kyc + properties: + id: + type: string + tokenId: + type: string + tokenName: + type: string + tokenSymbol: + type: string + tokenType: + type: string + decimals: + type: string + associated: + type: boolean + balance: + type: string + frozen: + type: boolean + kyc: + type: boolean + enableAdmin: + type: boolean + enableKYC: + type: boolean + enableFreeze: + type: boolean + enableWipe: + type: boolean + PolicyConfig: + type: object + required: + - name + - version + - description + - topicDescription + - config + - topicId + - policyTag + properties: + id: + type: string + uuid: + type: string + name: + type: string + version: + type: string + description: + type: string + topicDescription: + type: string + config: + type: object + status: + type: string + owner: + type: string + policyRoles: + type: array + items: + type: string + topicId: + type: string + policyTag: + type: string + policyTopics: + type: array + items: + type: object + properties: + name: + type: string + description: + type: string + type: + type: string + static: + type: boolean + TrustChains: + type: object + required: + - chain + - userMap + properties: + chain: + type: array + items: + type: object + required: + - id + - type + - tag + - label + - schema + - owner + - document + properties: + id: + type: string + type: + type: string + tag: + type: string + label: + type: string + schema: + type: string + owner: + type: string + document: + type: object + userMap: + type: array + items: + type: object + required: + - did + - username + properties: + did: + type: string + username: + type: string + VerifiablePresentation: + type: object + required: + - hash + - id + - policyId + - signature + - status + - tag + - type + - updateDate + - createDate + - owner + - document + properties: + hash: + type: string + id: + type: string + policyId: + type: string + signature: + type: string + status: + type: string + tag: + type: string + type: + type: string + updateDate: + type: string + createDate: + type: string + owner: + type: string + document: + type: object + PublishPolicy: + type: object + required: + - errors + - isValid + - policies + properties: + errors: + type: array + items: + type: object + isValid: + type: boolean + policies: + type: array + items: + type: object + ValidatePolicy: + type: object + required: + - config + - results + properties: + config: + type: object + results: + type: object + PolicyBlock: + type: object + required: + - id + - blockType + - isActive + - uiMetaData + properties: + id: + type: string + blockType: + type: string + isActive: + type: boolean + uiMetaData: + type: object + blocks: + type: array + items: + type: object + PolicyBlockData: + type: object + required: + - id + - isActive + - uiMetaData + - data + properties: + id: + type: string + blockType: + type: string + isActive: + type: boolean + uiMetaData: + type: object + data: + type: object + fields: + type: array + items: + type: object + index: + type: number + roles: + type: array + items: + type: string + blocks: + type: array + items: + $ref: '#/components/schemas/PolicyBlock' + ExportPolicy: + type: object + required: + - name + - version + - messageId + properties: + name: + type: string + version: + type: string + tokens: + type: string + PreviewPolicy: + type: object + required: + - policy + - schemas + - tokens + properties: + policy: + type: object + schemas: + type: array + items: + type: object + tokens: + type: array + items: + type: object + Error: + type: object + required: + - code + - message + properties: + code: + type: number + message: + type: string + ExternalData: + type: object + required: + - owner + - policyTag + - document + properties: + owner: + type: string + policyTag: + type: string + document: + type: object + HederaAccount: + type: object + required: + - id + - key + properties: + id: + type: string + key: + type: string + CommonSettings: + type: object + properties: + operatorId: + type: string + operatorKey: + type: string + nftApiKey: + deprecated: true + type: string + ipfsStorageApiKey: + type: string + LogFilters: + type: object + properties: + type: + type: string + startDate: + type: string + endDate: + type: string + attributes: + type: array + items: + type: string + message: + type: string + pageSize: + type: number + pageIndex: + type: number + sortDirection: + type: string + enum: + - ASC + - DESC + Log: + type: object + properties: + type: + type: string + datetime: + type: string + message: + type: string + attributes: + type: array + items: + type: string + Task: + type: object + properties: + taskId: + type: string + expectation: + type: number + TaskStatus: + type: object + properties: + date: + type: string + name: + type: string + statuses: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + result: + type: object + error: + type: object + Artifact: + type: object + properties: + id: + type: string + name: + type: string + uuid: + type: string + extention: + type: string + type: + type: string + MultiPolicyConfig: + type: object + properties: + id: + type: string + uuid: + type: string + owner: + type: string + type: + type: string + instanceTopicId: + type: string + mainPolicyTopicId: + type: string + synchronizationTopicId: + type: string + policyOwner: + type: string + user: + type: string + Contract: + type: object + properties: + id: + type: string + contractId: + type: string + description: + type: string + owner: + type: string + isOwnerCreator: + type: string + status: + type: string + RetireRequest: + type: object + properties: + id: + type: string + contractId: + type: string + baseTokenId: + type: string + owner: + type: string + oppositeTokenId: + type: string + baseTokenCount: + type: number + oppositeTokenCount: + type: number + Module: + type: object + properties: + id: + type: string + uuid: + type: string + name: + type: string + description: + type: string + config: + type: object + status: + type: string + creator: + type: string + owner: + type: string + topicId: + type: string + messageId: + type: string + codeVersion: + type: string + createDate: + type: string + type: + type: string + PreviewModule: + type: object + properties: + module: + $ref: '#/components/schemas/Module' + ExportModule: + type: object + properties: + uuid: + type: string + name: + type: string + description: + type: string + messageId: + type: string + owner: + type: string + PublishModule: + type: object + properties: + errors: + type: object + isValid: + type: boolean + module: + $ref: '#/components/schemas/Module' + ValidateModule: + type: object + properties: + module: + $ref: '#/components/schemas/Module' + results: + type: object + Tag: + type: object + required: + - name + - entity + - localTarget + properties: + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tag label + description: + type: string + example: Description + owner: + type: string + example: did + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: '0000000000.000000000' + localTarget: + type: string + example: db id + status: + type: string + enum: + - Draft + - Published + - History + example: Published + operation: + type: string + enum: + - Create + - Delete + example: Create + date: + type: string + example: '1900-01-01T00:00:00.000Z' + topicId: + type: string + example: 0.0.0000000 + messageId: + type: string + example: '0000000000.000000000' + policyId: + type: string + example: db id + uri: + type: string + example: document uri + document: + type: object + TagMap: + type: object + required: + - entity + - target + - refreshDate + - tags + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: db id + refreshDate: + type: string + example: '1900-01-01T00:00:00.000Z' + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + Theme: + type: object + required: + - uuid + - name + - rules + properties: + id: + type: string + example: db id + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Theme name + rules: + type: array + items: + type: object + required: + - text + - background + - border + - shape + - borderWidth + - filterType + - filterValue + properties: + description: + type: string + example: description + text: + type: string + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + background: + type: string + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + border: + type: string + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + shape: + type: string + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - '5' + example: '0' + borderWidth: + type: string + enum: + - 0px + - 1px + - 2px + - 3px + - 4px + - 5px + - 6px + - 7px + example: 2px + filterType: + type: string + enum: + - type + - api + - role + example: type + filterValue: + oneOf: + - type: string + - type: array + items: + type: string + example: + - type + WizardConfig: + type: object + required: + - policy + - roles + - schemas + - trustChain + properties: + roles: + type: array + items: + type: string + policy: + type: object + properties: + name: + type: string + description: + type: string + topicDescription: + type: string + policyTag: + type: string + schemas: + type: array + items: + type: object + properties: + name: + type: string + iri: + type: string + isApproveEnable: + type: boolean + isMintSchema: + type: boolean + mintOptions: + type: object + properties: + tokenId: + type: string + rule: + type: string + dependencySchemaIri: + type: string + relationshipsSchemaIri: + type: string + initialRolesFor: + type: array + items: + type: string + rolesConfig: + type: array + items: + type: object + properties: + role: + type: string + isApprover: + type: boolean + isCreator: + type: boolean + gridColumns: + type: array + items: + type: object + properties: + field: + type: string + title: + type: string + trustChain: + type: array + items: + type: object + properties: + role: + type: string + mintSchemaIri: + type: string + viewOnlyOwnDocuments: + type: boolean diff --git a/docs/.gitbook/assets/swagger (2) (1) (1).yaml b/docs/.gitbook/assets/swagger (2) (1) (1).yaml index 26784dd621..79eefbaddc 100644 --- a/docs/.gitbook/assets/swagger (2) (1) (1).yaml +++ b/docs/.gitbook/assets/swagger (2) (1) (1).yaml @@ -112,7 +112,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /accounts/standard-registries: get: operationId: AccountApi_getStandatdRegistries @@ -138,7 +139,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 security: - - bearerAuth: [] + - bearer: [] /accounts/standard-registries/aggregated: get: operationId: AccountApi_getAggregatedStandardRegistries @@ -166,7 +167,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 security: - - bearerAuth: [] + - bearer: [] /accounts/balance: get: operationId: AccountApi_getBalance @@ -192,7 +193,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 security: - - bearerAuth: [] + - bearer: [] /analytics/search/policies: post: operationId: AnalyticsApi_searchPolicies @@ -232,7 +233,8 @@ paths: tags: &ref_1 - analytics security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/compare/policies: post: operationId: AnalyticsApi_comparePolicies @@ -285,7 +287,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/compare/modules: post: operationId: AnalyticsApi_compareModules @@ -328,7 +331,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/compare/schemas: post: operationId: AnalyticsApi_compareSchemas @@ -369,7 +373,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/compare/documents: post: operationId: AnalyticsApi_compareDocuments @@ -414,7 +419,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/compare/tools: post: operationId: AnalyticsApi_compareTools @@ -459,7 +465,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/compare/policies/export: post: operationId: AnalyticsApi_comparePoliciesExport @@ -512,7 +519,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/compare/modules/export: post: operationId: AnalyticsApi_compareModulesExport @@ -555,7 +563,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/compare/schemas/export: post: operationId: AnalyticsApi_compareSchemasExport @@ -596,7 +605,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/compare/documents/export: post: operationId: AnalyticsApi_compareDocumentsExport @@ -641,7 +651,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/compare/tools/export: post: operationId: AnalyticsApi_compareToolsExport @@ -686,7 +697,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /analytics/search/blocks: post: operationId: AnalyticsApi_searchBlocks @@ -726,14 +738,15 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /artifacts: get: tags: - artifacts description: Returns all artifacts. security: - - bearerAuth: [] + - bearer: [] summary: Returns all artifacts. parameters: - in: query @@ -797,6 +810,19 @@ paths: description: Parent ID schema: type: string + requestBody: + required: true + description: Form data with artifacts. + content: + multipart/form-data: + schema: + type: array + items: + type: object + properties: + artifacts: + type: string + format: binary responses: '200': description: Successful operation. @@ -819,14 +845,15 @@ paths: tags: - artifacts security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /artifacts/{artifactId}: delete: tags: - artifacts description: Delete artifact. security: - - bearerAuth: [] + - bearer: [] summary: Delete artifact. parameters: - in: path @@ -912,6 +939,7 @@ paths: - contracts security: - bearer: [] + - bearer: [] post: operationId: ContractsApi_createContract summary: Create contract. @@ -948,6 +976,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/import: post: operationId: ContractsApi_importContract @@ -991,6 +1020,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/{contractId}/permissions: get: operationId: ContractsApi_contractPermissions @@ -1026,6 +1056,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/{contractId}: delete: operationId: ContractsApi_removeContract @@ -1061,6 +1092,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/wipe/requests: get: operationId: ContractsApi_getWipeRequests @@ -1119,6 +1151,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/wipe/{contractId}/requests/enable: post: operationId: ContractsApi_enableWipeRequests @@ -1128,7 +1161,7 @@ paths: role are allowed to make the request. parameters: - name: contractId - required: false + required: true in: path description: Contract identifier example: 652745597a7b53526de37c05 @@ -1150,6 +1183,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/wipe/{contractId}/requests/disable: post: operationId: ContractsApi_disableWipeRequests @@ -1159,7 +1193,7 @@ paths: role are allowed to make the request. parameters: - name: contractId - required: false + required: true in: path description: Contract identifier example: 652745597a7b53526de37c05 @@ -1181,6 +1215,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/wipe/requests/{requestId}/approve: post: operationId: ContractsApi_approveWipeRequest @@ -1212,6 +1247,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/wipe/requests/{requestId}/reject: delete: operationId: ContractsApi_rejectWipeRequest @@ -1249,6 +1285,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/wipe/{contractId}/requests: delete: operationId: ContractsApi_clearWipeRequests @@ -1280,6 +1317,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/wipe/{contractId}/admin/{hederaId}: post: operationId: ContractsApi_wipeAddAdmin @@ -1318,6 +1356,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] delete: operationId: ContractsApi_wipeRemoveAdmin summary: Remove wipe admin. @@ -1355,6 +1394,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/wipe/{contractId}/manager/{hederaId}: post: operationId: ContractsApi_wipeAddManager @@ -1393,6 +1433,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] delete: operationId: ContractsApi_wipeRemoveManager summary: Remove wipe manager. @@ -1430,6 +1471,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/wipe/{contractId}/wiper/{hederaId}: post: operationId: ContractsApi_wipeAddWiper @@ -1468,6 +1510,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] delete: operationId: ContractsApi_wipeRemoveWiper summary: Remove wipe wiper. @@ -1505,6 +1548,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/{contractId}/pools/sync: post: operationId: ContractsApi_retireSyncPools @@ -1514,7 +1558,7 @@ paths: are allowed to make the request. parameters: - name: contractId - required: false + required: true in: path description: Contract identifier example: 652745597a7b53526de37c05 @@ -1540,6 +1584,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/requests: get: operationId: ContractsApi_getRetireRequests @@ -1596,6 +1641,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/pools: get: operationId: ContractsApi_getRetirePools @@ -1659,6 +1705,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/{contractId}/requests: delete: operationId: ContractsApi_clearRetireRequests @@ -1668,7 +1715,7 @@ paths: role are allowed to make the request. parameters: - name: contractId - required: false + required: true in: path description: Contract identifier example: 652745597a7b53526de37c05 @@ -1694,6 +1741,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/{contractId}/pools: delete: operationId: ContractsApi_clearRetirePools @@ -1703,7 +1751,7 @@ paths: are allowed to make the request. parameters: - name: contractId - required: false + required: true in: path description: Contract identifier example: 652745597a7b53526de37c05 @@ -1729,6 +1777,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] post: operationId: ContractsApi_setRetirePool summary: Set retire pool. @@ -1737,7 +1786,7 @@ paths: allowed to make the request. parameters: - name: contractId - required: false + required: true in: path description: Contract identifier example: 652745597a7b53526de37c05 @@ -1769,6 +1818,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/pools/{poolId}: delete: operationId: ContractsApi_unsetRetirePool @@ -1778,7 +1828,7 @@ paths: are allowed to make the request. parameters: - name: poolId - required: false + required: true in: path description: Pool Identifier example: 652745597a7b53526de37c05 @@ -1804,6 +1854,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/requests/{requestId}: delete: operationId: ContractsApi_unsetRetireRequest @@ -1813,7 +1864,7 @@ paths: role are allowed to make the request. parameters: - name: requestId - required: false + required: true in: path description: Request Identifier example: 652745597a7b53526de37c05 @@ -1839,6 +1890,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/pools/{poolId}/retire: post: operationId: ContractsApi_retire @@ -1846,7 +1898,7 @@ paths: description: Retire tokens. parameters: - name: poolId - required: false + required: true in: path description: Pool Identifier example: 652745597a7b53526de37c05 @@ -1878,6 +1930,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/requests/{requestId}/approve: post: operationId: ContractsApi_approveRetire @@ -1909,6 +1962,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/requests/{requestId}/cancel: delete: operationId: ContractsApi_cancelRetireRequest @@ -1938,6 +1992,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire/{contractId}/admin/{hederaId}: post: operationId: ContractsApi_retireAddAdmin @@ -1976,6 +2031,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] delete: operationId: ContractsApi_retireRemoveAdmin summary: Remove wipe admin. @@ -2013,6 +2069,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /contracts/retire: get: operationId: ContractsApi_getRetireVCs @@ -2046,9 +2103,7 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/' + type: object '401': description: Unauthorized. '403': @@ -2062,6 +2117,7 @@ paths: tags: *ref_2 security: - bearer: [] + - bearer: [] /demo/registered-users: get: operationId: DemoApi_registeredUsers @@ -2083,7 +2139,7 @@ paths: - demo description: Generates a new Hedera account with a random private key. security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -2107,7 +2163,7 @@ paths: - demo description: Generates a new Hedera account with a random private key. security: - - bearerAuth: [] + - bearer: [] summary: Generates a new Hedera account with a random private key. responses: '202': @@ -2155,12 +2211,31 @@ paths: description: Add file from ipfs. parameters: [] responses: - '201': - description: '' - tags: + '401': + description: Unauthorized + tags: &ref_3 - ipfs security: - - bearerAuth: [] + - bearer: [] + /ipfs/file/dry-run/{policyId}: + post: + operationId: IpfsApi_postFileDryRun + summary: Add file from ipfs for dry run mode. + description: Add file from ipfs for dry run mode. + parameters: + - name: policyId + required: true + in: path + description: Policy identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '401': + description: Unauthorized + tags: *ref_3 + security: + - bearer: [] /ipfs/file/{cid}: get: tags: @@ -2175,7 +2250,7 @@ paths: required: true description: File CID. security: - - bearerAuth: [] + - bearer: [] responses: '201': description: Created. @@ -2192,13 +2267,30 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + /ipfs/file/{cid}/dry-run: + get: + operationId: IpfsApi_getFileDryRun + summary: Get file from ipfs for dry run mode. + description: Get file from ipfs for dry run mode. + parameters: + - name: cid + required: true + in: path + schema: + type: string + responses: + '401': + description: Unauthorized + tags: *ref_3 + security: + - bearer: [] /logs: post: tags: - logs description: Returns logs. For users with the Standard Registry role only. security: - - bearerAuth: [] + - bearer: [] requestBody: description: Log filters. content: @@ -2247,7 +2339,7 @@ paths: type: string description: Attributes to exclude. security: - - bearerAuth: [] + - bearer: [] summary: Returns logs attributes. responses: '200': @@ -2274,7 +2366,7 @@ paths: - maps description: Returns map api key. security: - - bearerAuth: [] + - bearer: [] summary: Returns map api key. responses: '200': @@ -2317,7 +2409,7 @@ paths: Returns all modules. Only users with the Standard Registry and Installer role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Return a list of all modules. parameters: - in: query @@ -2369,7 +2461,7 @@ paths: Creates a new module. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Creates a new module. requestBody: description: Object that contains module configuration. @@ -2396,17 +2488,21 @@ paths: operationId: ModulesApi_getModuleSchemas parameters: [] responses: - '200': - description: '' - tags: &ref_3 + '401': + description: Unauthorized + tags: &ref_4 - modules + security: + - bearer: [] post: operationId: ModulesApi_postSchemas parameters: [] responses: - '201': - description: '' - tags: *ref_3 + '401': + description: Unauthorized + tags: *ref_4 + security: + - bearer: [] /modules/{uuid}: get: tags: @@ -2423,7 +2519,7 @@ paths: description: Selected module ID. summary: Retrieves module configuration. security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -2463,7 +2559,7 @@ paths: schema: $ref: '#/components/schemas/Module' security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -2495,7 +2591,7 @@ paths: required: true description: Module ID. security: - - bearerAuth: [] + - bearer: [] summary: Deletes the module. responses: '200': @@ -2522,7 +2618,7 @@ paths: Returns modules menu. Only users with the Standard Registry and Installer role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Return a list of modules. responses: '200': @@ -2559,7 +2655,7 @@ paths: required: true description: Selected module ID. security: - - bearerAuth: [] + - bearer: [] summary: >- Return module and its artifacts in a zip file format for the specified module. @@ -2592,7 +2688,7 @@ paths: required: true description: Selected module ID. security: - - bearerAuth: [] + - bearer: [] summary: Return Heder message ID for the specified published module. responses: '200': @@ -2620,7 +2716,7 @@ paths: DB. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Imports new module from IPFS. requestBody: description: >- @@ -2660,7 +2756,7 @@ paths: VCs, from the provided zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Imports new module from a zip file. requestBody: description: >- @@ -2698,7 +2794,7 @@ paths: users with the Standard Registry role are allowed to make the request. summary: Module preview from IPFS. security: - - bearerAuth: [] + - bearer: [] requestBody: description: >- Object that contains the identifier of the Hedera message which @@ -2738,7 +2834,7 @@ paths: request. summary: Module preview from a zip file. security: - - bearerAuth: [] + - bearer: [] requestBody: description: >- A zip file that contains the module and associated schemas and VCs to @@ -2784,7 +2880,7 @@ paths: description: Selected module ID. summary: Publishes the module onto IPFS. security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -2810,7 +2906,7 @@ paths: Validates selected module. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Validates module. requestBody: description: Object that contains module configuration. @@ -2851,16 +2947,19 @@ paths: application/json: schema: $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_4 + tags: &ref_5 - tools security: - - bearerAuth: [] + - bearer: [] + - bearer: [] get: operationId: ToolsApi_getTools summary: Return a list of all tools. @@ -2889,15 +2988,18 @@ paths: application/json: schema: $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/push: post: operationId: ToolsApi_createNewToolAsync @@ -2913,15 +3015,18 @@ paths: application/json: schema: $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/{id}: delete: operationId: ToolsApi_deleteTool @@ -2939,15 +3044,18 @@ paths: responses: '200': description: Successful operation. + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] get: operationId: ToolsApi_getToolById summary: Retrieves tool configuration. @@ -2978,9 +3086,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] put: operationId: ToolsApi_updateTool summary: Updates tool configuration. @@ -3011,9 +3120,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/{id}/publish: put: operationId: ToolsApi_publishTool @@ -3047,9 +3157,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/{id}/push/publish: put: operationId: ToolsApi_publishToolAsync @@ -3083,9 +3194,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/validate: post: operationId: ToolsApi_validateTool @@ -3111,9 +3223,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/{id}/export/file: get: operationId: ToolsApi_toolExportFile @@ -3144,9 +3257,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/{id}/export/message: get: operationId: ToolsApi_toolExportMessage @@ -3179,9 +3293,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/import/message/preview: post: operationId: ToolsApi_toolImportMessagePreview @@ -3208,9 +3323,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/import/message: post: operationId: ToolsApi_toolImportMessage @@ -3237,9 +3353,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/import/file/preview: post: operationId: ToolsApi_toolImportFilePreview @@ -3266,9 +3383,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/import/file: post: operationId: ToolsApi_toolImportFile @@ -3295,25 +3413,40 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] - /tools/push/import/file: + - bearer: [] + - bearer: [] + /tools/import/file-metadata: post: - operationId: ToolsApi_toolImportFileAsync + operationId: ToolsApi_toolImportFileWithMetadata summary: Imports new tool from a zip file. description: >- Imports new tool and all associated artifacts, such as schemas and VCs, from the provided zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. parameters: [] + requestBody: + required: true + description: Form data with tool file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + metadata: + type: string + format: binary responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/ToolDTO' '401': description: Unauthorized. '403': @@ -3324,14 +3457,89 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] - /tools/push/import/message: + - bearer: [] + - bearer: [] + /tools/push/import/file: post: - operationId: ToolsApi_toolImportMessageAsync - summary: Imports new tool from IPFS. - description: >- + operationId: ToolsApi_toolImportFileAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + - bearer: [] + /tools/push/import/file-metadata: + post: + operationId: ToolsApi_toolImportFileWithMetadataAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Form data with tool file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + - bearer: [] + /tools/push/import/message: + post: + operationId: ToolsApi_toolImportMessageAsync + summary: Imports new tool from IPFS. + description: >- Imports new tool and all associated artifacts from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request. @@ -3353,9 +3561,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /tools/menu/all: get: operationId: ToolsApi_getMenu @@ -3371,6 +3580,8 @@ paths: application/json: schema: type: array + items: + type: object '401': description: Unauthorized. '403': @@ -3381,9 +3592,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 + tags: *ref_5 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /profiles/{username}: get: operationId: ProfileApi_getProfile @@ -3415,10 +3627,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_5 + tags: &ref_6 - profiles security: - - bearerAuth: [] + - bearer: [] - bearer: [] put: operationId: ProfileApi_setUserProfile @@ -3453,9 +3665,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_6 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /profiles/push/{username}: put: @@ -3495,9 +3707,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_6 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /profiles/{username}/balance: get: @@ -3530,9 +3742,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_6 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /profiles/restore/{username}: put: @@ -3570,9 +3782,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_6 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /profiles/restore/topics/{username}: put: @@ -3610,9 +3822,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_6 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /profiles/did-document/validate: post: @@ -3644,9 +3856,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_6 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /profiles/did-keys/validate: post: @@ -3678,9 +3890,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_6 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /policies: get: @@ -3690,7 +3902,7 @@ paths: Returns all policies. Only users with the Standard Registry and Installer role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Return a list of all policies. parameters: - in: query @@ -3751,7 +3963,7 @@ paths: Creates a new policy. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Creates a new policy. requestBody: description: Object that contains policy configuration. @@ -3802,16 +4014,19 @@ paths: type: string id: type: string + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_6 + tags: &ref_7 - policies security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /policies/push/migrate-data: post: operationId: PolicyApi_migrateDataAsync @@ -3834,15 +4049,18 @@ paths: application/json: schema: type: object + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /policies/push: post: tags: @@ -3851,7 +4069,7 @@ paths: Creates a new policy. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Creates a new policy. requestBody: description: Object that contains policy configuration. @@ -3881,7 +4099,14 @@ paths: post: operationId: PolicyApi_updatePolicyAsync summary: '' - parameters: [] + parameters: + - name: policyId + required: true + in: path + description: Policy identifier + example: 652745597a7b53526de37c05 + schema: + type: string responses: '200': description: Successful operation. @@ -3889,25 +4114,34 @@ paths: application/json: schema: type: object + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] delete: operationId: PolicyApi_deletePolicyAsync - parameters: [] + parameters: + - name: policyId + required: true + in: path + description: Policy identifier + example: 652745597a7b53526de37c05 + schema: + type: string responses: - '202': - description: '' - tags: *ref_6 + '401': + description: Unauthorized + tags: *ref_7 security: - - bearerAuth: [] + - bearer: [] /policies/{policyId}: get: tags: @@ -3924,7 +4158,7 @@ paths: description: Selected policy ID. summary: Retrieves policy configuration. security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -3971,7 +4205,7 @@ paths: schema: $ref: '#/components/schemas/PolicyConfig' security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -4017,7 +4251,7 @@ paths: type: string summary: Publishes the policy onto IPFS. security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -4045,7 +4279,7 @@ paths: topic. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: >- Publishes the policy with the specified (internal) policy ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera @@ -4093,7 +4327,7 @@ paths: transaction. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Dry Run policy. parameters: - in: path @@ -4141,7 +4375,7 @@ paths: type: object properties: date: - type: date + type: object responses: '200': description: Policies. @@ -4151,16 +4385,19 @@ paths: type: array items: type: object + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] + - bearer: [] /policies/{policyId}/draft: put: tags: @@ -4169,7 +4406,7 @@ paths: Return policy to editing. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Return policy to editing. parameters: - in: path @@ -4203,7 +4440,7 @@ paths: Validates selected policy. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Validates policy. requestBody: description: Object that contains policy configuration. @@ -4234,7 +4471,14 @@ paths: operationId: PolicyApi_getPolicyNavigation summary: Returns a policy navigation. description: Returns a policy navigation. - parameters: [] + parameters: + - name: policyId + required: true + in: path + description: Policy identifier + example: 652745597a7b53526de37c05 + schema: + type: string responses: '200': description: Successful operation. @@ -4242,16 +4486,18 @@ paths: application/json: schema: type: object + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] /policies/{policyId}/groups: get: tags: @@ -4266,7 +4512,7 @@ paths: description: Selected policy ID. summary: Returns a list of groups the user is a member of. security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -4324,7 +4570,7 @@ paths: uuid: type: string security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -4380,26 +4626,202 @@ paths: schema: {} responses: '200': - description: Documents. - headers: - X-Total-Count: - description: Total documents count. - content: - application/json: - schema: - type: array - items: - type: object + description: Documents. + headers: + X-Total-Count: + description: Total documents count. + schema: + type: integer + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearer: [] + /policies/{policyId}/data: + get: + operationId: PolicyApi_downloadPolicyData + summary: Get policy data. + description: >- + Get policy data. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy identifier. + schema: {} + responses: + '200': + description: Policy data. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearer: [] + - bearer: [] + - bearer: [] + /policies/data: + post: + operationId: PolicyApi_uploadPolicyData + summary: Upload policy data. + description: >- + Upload policy data. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy data file + content: + application/json: + schema: + type: string + format: binary + responses: + '200': + description: Uploaded policy. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearer: [] + - bearer: [] + - bearer: [] + /policies/{policyId}/tag-block-map: + get: + operationId: PolicyApi_getTagBlockMap + summary: Get policy tag block map. + description: >- + Get policy tag block map. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy identifier. + schema: {} + responses: + '200': + description: Policy tag block map. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearer: [] + - bearer: [] + - bearer: [] + /policies/{policyId}/virtual-keys: + get: + operationId: PolicyApi_downloadVirtualKeys + summary: Get policy virtual keys. + description: >- + Get policy virtual keys. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy identifier. + schema: {} + responses: + '200': + description: Policy virtual keys. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearer: [] + - bearer: [] + - bearer: [] + post: + operationId: PolicyApi_uploadVirtualKeys + summary: Upload policy virtual keys. + description: >- + Upload policy virtual keys. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy identifier. + schema: {} + requestBody: + required: true + description: Virtual keys file + content: + application/json: + schema: + type: string + format: binary + responses: + '200': + description: Operation completed. + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] + - bearer: [] /policies/{policyId}/blocks: get: tags: @@ -4416,7 +4838,7 @@ paths: description: Selected policy ID. summary: Retrieves data for the policy root block. security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -4456,7 +4878,7 @@ paths: description: Selected block UUID. summary: Requests block data. security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -4500,7 +4922,7 @@ paths: schema: type: object security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -4519,7 +4941,21 @@ paths: operationId: PolicyApi_setBlocksByTagName summary: Sends data to the specified block. description: Sends data to the specified block. - parameters: [] + parameters: + - name: tagName + required: true + in: path + description: Policy block tag + example: someTag + schema: + type: string + - name: policyId + required: true + in: path + description: Policy identifier + example: 652745597a7b53526de37c05 + schema: + type: string responses: '200': description: Successful operation. @@ -4527,23 +4963,38 @@ paths: application/json: schema: type: object + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] - - bearerAuth: [] + - bearer: [] get: operationId: PolicyApi_getBlocksByTagName summary: Requests block data. description: >- Requests block data by tag. Only users with a role that described in block are allowed to make the request. - parameters: [] + parameters: + - name: tagName + required: true + in: path + description: Policy block tag + example: someTag + schema: + type: string + - name: policyId + required: true + in: path + description: Policy identifier + example: 652745597a7b53526de37c05 + schema: + type: string responses: '200': description: Successful operation. @@ -4551,16 +5002,17 @@ paths: application/json: schema: type: object + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] - - bearerAuth: [] + - bearer: [] /policies/{policyId}/tag/{tagName}: get: operationId: PolicyApi_getBlockByTagName @@ -4568,7 +5020,21 @@ paths: description: >- Requests block data by tag. Only users with a role that described in block are allowed to make the request. - parameters: [] + parameters: + - name: tagName + required: true + in: path + description: Policy block tag + example: someTag + schema: + type: string + - name: policyId + required: true + in: path + description: Policy identifier + example: 652745597a7b53526de37c05 + schema: + type: string responses: '200': description: Successful operation. @@ -4576,24 +5042,41 @@ paths: application/json: schema: type: object + '401': + description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] - - bearerAuth: [] + - bearer: [] /policies/{policyId}/blocks/{uuid}/parents: get: operationId: PolicyApi_getBlockParents - parameters: [] + parameters: + - name: uuid + required: true + in: path + description: Block identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: policyId + required: true + in: path + description: Policy identifier + example: 652745597a7b53526de37c05 + schema: + type: string responses: - '200': - description: '' - tags: *ref_6 + '401': + description: Unauthorized + tags: *ref_7 + security: + - bearer: [] /policies/{policyId}/export/file: get: tags: @@ -4610,7 +5093,7 @@ paths: required: true description: Selected policy ID. security: - - bearerAuth: [] + - bearer: [] summary: >- Return policy and its artifacts in a zip file format for the specified policy. @@ -4647,7 +5130,7 @@ paths: required: true description: Selected policy ID. security: - - bearerAuth: [] + - bearer: [] summary: Return Heder message ID for the specified published policy. responses: '200': @@ -4701,9 +5184,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /policies/import/message: post: @@ -4724,7 +5207,7 @@ paths: summary: Example of a topic ID of policy version. value: 0.0.00000001 security: - - bearerAuth: [] + - bearer: [] summary: Imports new policy from IPFS. requestBody: description: >- @@ -4766,7 +5249,7 @@ paths: DB. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: >- Imports new policy and all associated artifacts from IPFS into the local DB. @@ -4808,7 +5291,7 @@ paths: users with the Standard Registry role are allowed to make the request. summary: Policy preview from IPFS. security: - - bearerAuth: [] + - bearer: [] requestBody: description: >- Object that contains the identifier of the Hedera message which @@ -4846,7 +5329,7 @@ paths: Previews the policy from IPFS without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Previews the policy from IPFS without loading it into the local DB. requestBody: description: >- @@ -4896,7 +5379,7 @@ paths: summary: Example of a topic ID of policy version. value: 0.0.00000001 security: - - bearerAuth: [] + - bearer: [] summary: Imports new policy from a zip file. requestBody: description: >- @@ -4927,6 +5410,56 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + /policies/import/file-metadata: + post: + operationId: PolicyApi_importPolicyFromFileWithMetadata + summary: Imports new policy from a zip file with metadata. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: Topic Id + schema: + type: string + requestBody: + required: true + description: Form data with policy file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + policyFile: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearer: [] + - bearer: [] /policies/push/import/file: post: tags: @@ -4936,7 +5469,7 @@ paths: VCs, from the provided zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: >- Imports new policy and all associated artifacts, such as schemas and VCs, from the provided zip file into the local DB. @@ -4967,6 +5500,56 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + /policies/push/import/file-metadata: + post: + operationId: PolicyApi_importPolicyFromFileWithMetadataAsync + summary: Imports new policy from a zip file with metadata. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: Topic Id + schema: + type: string + requestBody: + required: true + description: Form data with policy file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + policyFile: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearer: [] + - bearer: [] /policies/import/file/preview: post: tags: @@ -4977,7 +5560,7 @@ paths: request. summary: Policy preview from a zip file. security: - - bearerAuth: [] + - bearer: [] requestBody: description: >- A zip file that contains the policy and associated schemas and VCs to @@ -5044,9 +5627,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /policies/push/import/xlsx: post: @@ -5087,9 +5670,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /policies/import/xlsx/preview: post: @@ -5124,18 +5707,20 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /policies/blocks/about: get: operationId: PolicyApi_getBlockAbout parameters: [] responses: - '200': - description: '' - tags: *ref_6 + '401': + description: Unauthorized + tags: *ref_7 + security: + - bearer: [] /policies/{policyId}/dry-run/users: get: tags: @@ -5144,7 +5729,7 @@ paths: Returns all virtual users. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Returns all virtual users. parameters: - in: path @@ -5185,7 +5770,7 @@ paths: Create a new virtual account. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Create a new virtual account. parameters: - in: path @@ -5226,7 +5811,7 @@ paths: Logs virtual user into the system. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Logs virtual user into the system. parameters: - in: path @@ -5277,7 +5862,7 @@ paths: Restarts the execution of the policy. Clear data in database. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Restarts the execution of the policy. parameters: - in: path @@ -5307,7 +5892,7 @@ paths: Returns lists of virtual transactions. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Returns lists of virtual transactions. parameters: - in: path @@ -5350,7 +5935,7 @@ paths: Returns lists of virtual artifacts. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Returns lists of virtual artifacts. parameters: - in: path @@ -5393,7 +5978,7 @@ paths: Returns lists of virtual artifacts. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Returns lists of virtual artifacts. parameters: - in: path @@ -5436,7 +6021,7 @@ paths: Creates a link between the current policy and the main policy. Or creates a group making the current policy the main one. security: - - bearerAuth: [] + - bearer: [] summary: Creates Multi policy config. parameters: - in: path @@ -5482,7 +6067,7 @@ paths: - policies description: Requests Multi policy config. security: - - bearerAuth: [] + - bearer: [] summary: Requests Multi policy config. parameters: - in: path @@ -5529,7 +6114,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 /policies/methodologies/search: post: operationId: PolicyApi_getPoliciesByCategory @@ -5563,14 +6148,14 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_7 /schema/{schemaId}: get: tags: - schema description: Returns schema by schema ID. security: - - bearerAuth: [] + - bearer: [] summary: Returns schema by schema ID. parameters: - in: path @@ -5627,10 +6212,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_7 + tags: &ref_8 - schema security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /schema/{schemaId}/tree: get: operationId: SingleSchemaApi_getSchemaTree @@ -5669,16 +6255,17 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_8 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /schemas: get: tags: - schemas description: Returns all schemas. security: - - bearerAuth: [] + - bearer: [] summary: Returns all schemas. parameters: - in: query @@ -5744,7 +6331,7 @@ paths: summary: Example of a Topic ID value: 0.0.00000001 security: - - bearerAuth: [] + - bearer: [] summary: Create new schema. requestBody: description: Object that contains a valid schema. @@ -5771,7 +6358,7 @@ paths: - schemas description: Returns all schemas by topicId. security: - - bearerAuth: [] + - bearer: [] summary: Returns all schemas by topicId. parameters: - in: path @@ -5857,10 +6444,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_8 + tags: &ref_9 - schemas security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /schemas/list/all: get: operationId: SchemaApi_getAll @@ -5888,9 +6476,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 + tags: *ref_9 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /schemas/list/sub: get: operationId: SchemaApi_getSub @@ -5930,9 +6519,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 + tags: *ref_9 security: - - bearerAuth: [] + - bearer: [] + - bearer: [] /schemas/push/copy: post: operationId: SchemaApi_copySchemaAsync @@ -5965,10 +6555,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 + tags: *ref_9 security: - bearer: [] - - bearerAuth: [] + - bearer: [] /schemas/push/{topicId}: post: tags: @@ -5977,7 +6567,7 @@ paths: Creates new schema. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Create new schema. parameters: - in: path @@ -6029,7 +6619,7 @@ paths: required: true description: Schema ID. security: - - bearerAuth: [] + - bearer: [] summary: Updates the schema. requestBody: description: Object that contains a valid schema. @@ -6071,7 +6661,7 @@ paths: required: true description: Schema ID. security: - - bearerAuth: [] + - bearer: [] summary: Deletes the schema. responses: '200': @@ -6109,7 +6699,7 @@ paths: required: true description: Schema ID. security: - - bearerAuth: [] + - bearer: [] summary: Publishes the schema. requestBody: description: Object that contains policy version. @@ -6150,7 +6740,7 @@ paths: Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: >- Publishes the schema with the provided (internal) schema ID onto IPFS, sends a message featuring IPFS CID into the corresponding Hedera topic. @@ -6196,7 +6786,7 @@ paths: Previews the schema from IPFS without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Schema preview from IPFS. requestBody: description: >- @@ -6237,7 +6827,7 @@ paths: Previews the schema from IPFS without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Schema preview from IPFS. requestBody: description: >- @@ -6276,7 +6866,7 @@ paths: Previews the schema from a zip file. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Schema preview from a zip file. requestBody: description: A zip file containing the schema to be viewed. @@ -6324,7 +6914,7 @@ paths: summary: Example of a Topic ID value: 0.0.00000001 security: - - bearerAuth: [] + - bearer: [] summary: Imports new schema from IPFS. requestBody: description: >- @@ -6365,7 +6955,7 @@ paths: Imports new schema from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Imports new schema from IPFS. requestBody: description: >- @@ -6426,7 +7016,7 @@ paths: summary: Example of a Topic ID value: 0.0.00000001 security: - - bearerAuth: [] + - bearer: [] summary: Imports new schema from a zip file. requestBody: description: A zip file containing schema to be imported. @@ -6463,7 +7053,7 @@ paths: Imports new schema from a zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Imports new schema from a zip file. requestBody: description: A zip file containing schema to be imported. @@ -6510,7 +7100,7 @@ paths: contain IPFS CIDs of these schema files. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: List Hedera message IDs of published schemas. parameters: - in: path @@ -6544,7 +7134,7 @@ paths: Returns schema files for the schemas. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Return zip file with schemas. parameters: - in: path @@ -6581,7 +7171,7 @@ paths: required: true description: Username. security: - - bearerAuth: [] + - bearer: [] summary: Creates new system schema. requestBody: description: Object that contains a valid schema. @@ -6610,7 +7200,7 @@ paths: Returns all system schemas by username. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Returns all system schemas by username. parameters: - in: path @@ -6678,7 +7268,7 @@ paths: required: true description: Schema ID. security: - - bearerAuth: [] + - bearer: [] summary: Updates the schema. requestBody: description: Object that contains a valid schema. @@ -6720,7 +7310,7 @@ paths: required: true description: Schema ID. security: - - bearerAuth: [] + - bearer: [] summary: Deletes the schema. responses: '200': @@ -6757,7 +7347,7 @@ paths: required: true description: Schema ID. security: - - bearerAuth: [] + - bearer: [] summary: Publishes the schema. requestBody: description: Object that contains policy version. @@ -6808,7 +7398,7 @@ paths: required: true description: schema type. security: - - bearerAuth: [] + - bearer: [] summary: Returns schema by schema type. responses: '200': @@ -6859,9 +7449,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 + tags: *ref_9 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /schemas/{topicId}/import/xlsx: post: @@ -6901,9 +7491,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 + tags: *ref_9 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /schemas/push/{topicId}/import/xlsx: post: @@ -6943,9 +7533,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 + tags: *ref_9 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /schemas/import/xlsx/preview: post: @@ -6979,9 +7569,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 + tags: *ref_9 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /schemas/export/template: get: @@ -7009,9 +7599,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 + tags: *ref_9 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /settings: get: @@ -7021,7 +7611,7 @@ paths: Returns current settings. For users with the Standard Registry role only. security: - - bearerAuth: [] + - bearer: [] summary: Returns current settings. responses: '200': @@ -7045,7 +7635,7 @@ paths: - settings description: Set settings. For users with the Standard Registry role only. security: - - bearerAuth: [] + - bearer: [] summary: Set settings. responses: '201': @@ -7066,7 +7656,7 @@ paths: - settings description: Returns current environment name. security: - - bearerAuth: [] + - bearer: [] summary: Returns current environment name. responses: '200': @@ -7087,26 +7677,30 @@ paths: operationId: SettingsApi_getAbout parameters: [] responses: - '200': - description: '' + '401': + description: Unauthorized tags: - settings + security: + - bearer: [] /tags: post: operationId: TagsApi_setTags parameters: [] responses: - '201': - description: '' + '401': + description: Unauthorized tags: - tags + security: + - bearer: [] /tags/search: post: tags: - tags description: Search tags. security: - - bearerAuth: [] + - bearer: [] requestBody: description: Object that contains filters. required: true @@ -7188,7 +7782,7 @@ paths: - tags description: Delete tag. security: - - bearerAuth: [] + - bearer: [] summary: Delete tag. parameters: - in: path @@ -7221,7 +7815,7 @@ paths: - tags description: synchronization. security: - - bearerAuth: [] + - bearer: [] requestBody: description: Object that contains filters. required: true @@ -7270,7 +7864,7 @@ paths: - tags description: Returns all schema. security: - - bearerAuth: [] + - bearer: [] summary: Returns all schemas. parameters: - in: query @@ -7324,7 +7918,7 @@ paths: Creates new schema. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Creates new schema. requestBody: description: Object that contains a valid schema. @@ -7358,7 +7952,7 @@ paths: Deletes the schema with the provided schema ID. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Delete the schema. parameters: - in: path @@ -7398,7 +7992,7 @@ paths: required: true description: Schema ID. security: - - bearerAuth: [] + - bearer: [] summary: Updates the schema. requestBody: description: Object that contains a valid schema. @@ -7443,7 +8037,7 @@ paths: required: true description: Schema ID. security: - - bearerAuth: [] + - bearer: [] summary: Publishes the schema. responses: '200': @@ -7470,7 +8064,7 @@ paths: - tags description: Return a list of all published schemas. security: - - bearerAuth: [] + - bearer: [] summary: Return a list of all published schemas. responses: '200': @@ -7497,7 +8091,7 @@ paths: - tasks description: Returns task statuses by Id. security: - - bearerAuth: [] + - bearer: [] summary: Returns task statuses. parameters: - in: path @@ -7533,7 +8127,7 @@ paths: as the KYC, Freeze, and Association statuses. Not allowed for the Auditor role. security: - - bearerAuth: [] + - bearer: [] summary: Return a list of tokens. responses: '200': @@ -7568,7 +8162,7 @@ paths: Creates a new token. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Creates a new token. requestBody: description: Object that contains token information. @@ -7617,7 +8211,7 @@ paths: Creates a new token. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Creates a new token. requestBody: description: Object that contains token information. @@ -7646,12 +8240,21 @@ paths: /tokens/push/{tokenId}: delete: operationId: TokensApi_deleteTokenAsync - parameters: [] + parameters: + - name: tokenId + required: true + in: path + description: Token identifier + example: 652745597a7b53526de37c05 + schema: + type: string responses: - '202': - description: '' - tags: &ref_9 + '401': + description: Unauthorized + tags: &ref_10 - tokens + security: + - bearer: [] /tokens/{tokenId}/associate: put: tags: @@ -7667,7 +8270,7 @@ paths: required: true description: Token ID. security: - - bearerAuth: [] + - bearer: [] summary: Associates the user with the provided Hedera token. responses: '200': @@ -7690,7 +8293,7 @@ paths: Associates the user with the provided Hedera token. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Associates the user with the provided Hedera token. parameters: - in: path @@ -7731,7 +8334,7 @@ paths: required: true description: Token ID. security: - - bearerAuth: [] + - bearer: [] summary: Associate the user with the provided Hedera token. responses: '202': @@ -7754,7 +8357,7 @@ paths: Disassociates the user with the provided Hedera token. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Disassociates the user with the provided Hedera token. parameters: - in: path @@ -7801,7 +8404,7 @@ paths: required: true description: Username. security: - - bearerAuth: [] + - bearer: [] summary: Sets the KYC flag for the user. responses: '200': @@ -7834,7 +8437,7 @@ paths: Sets the KYC flag for the user. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Sets the KYC flag for the user. parameters: - in: path @@ -7887,7 +8490,7 @@ paths: required: true description: Username. security: - - bearerAuth: [] + - bearer: [] summary: Unsets the KYC flag for the user. responses: '200': @@ -7920,7 +8523,7 @@ paths: Unsets the KYC flag for the user. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Unsets the KYC flag for the user. parameters: - in: path @@ -7973,7 +8576,7 @@ paths: required: true description: Username. security: - - bearerAuth: [] + - bearer: [] summary: Freeze transfers of the specified token for the user. responses: '200': @@ -8019,7 +8622,7 @@ paths: required: true description: Username. security: - - bearerAuth: [] + - bearer: [] summary: Unfreezes transfers of the specified token for the user. responses: '200': @@ -8052,7 +8655,7 @@ paths: Freezes transfers of the specified token for the user. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Freeze transfers of the specified token for the user. parameters: - in: path @@ -8092,7 +8695,7 @@ paths: Unfreezes transfers of the specified token for the user. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Unfreezes transfers of the specified token for the user. parameters: - in: path @@ -8132,7 +8735,7 @@ paths: Returns user information for the selected token. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] parameters: - in: path name: tokenId @@ -8201,16 +8804,17 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_10 security: - bearer: [] + - bearer: [] /themes: get: tags: - themes description: Returns all themes. security: - - bearerAuth: [] + - bearer: [] summary: Return a list of all themes. responses: '200': @@ -8236,7 +8840,7 @@ paths: - themes description: Creates a new theme. security: - - bearerAuth: [] + - bearer: [] summary: Creates a new theme. requestBody: description: Object that contains theme configuration. @@ -8279,7 +8883,7 @@ paths: schema: $ref: '#/components/schemas/Theme' security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -8309,7 +8913,7 @@ paths: required: true description: Theme ID. security: - - bearerAuth: [] + - bearer: [] summary: Deletes the theme. responses: '200': @@ -8334,7 +8938,7 @@ paths: - themes description: Imports new theme from the provided zip file into the local DB. security: - - bearerAuth: [] + - bearer: [] summary: Imports new theme from a zip file. requestBody: description: A zip file that contains the theme to be imported. @@ -8374,7 +8978,7 @@ paths: required: true description: Selected theme ID. security: - - bearerAuth: [] + - bearer: [] summary: Returns a zip file containing the theme. responses: '200': @@ -8397,7 +9001,7 @@ paths: Requests all VP documents. Only users with the Auditor role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Returns a list of all VP documents. parameters: - in: query @@ -8469,7 +9073,7 @@ paths: required: true description: Hash or ID of a VP document. security: - - bearerAuth: [] + - bearer: [] summary: Returns a trustchain for a VP document. responses: '200': @@ -8496,7 +9100,7 @@ paths: Creates a new policy by wizard. Only users with the Standard Registry role are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Creates a new policy. requestBody: description: Object that contains wizard configuration. @@ -8633,6 +9237,8 @@ paths: application/json: schema: type: boolean + '401': + description: Unauthorized '500': description: Internal server error. content: @@ -8641,6 +9247,8 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: - wizard + security: + - bearer: [] /wizard/{policyId}/config: post: tags: @@ -8656,7 +9264,7 @@ paths: required: true description: Policy identifier. security: - - bearerAuth: [] + - bearer: [] summary: Get policy config. requestBody: description: Object that contains wizard configuration. @@ -8694,7 +9302,7 @@ paths: responses: '401': description: Unauthorized - tags: &ref_10 + tags: &ref_11 - branding security: - bearer: [] @@ -8704,7 +9312,7 @@ paths: responses: '200': description: '' - tags: *ref_10 + tags: *ref_11 /suggestions: post: operationId: SuggestionsApi_policySuggestions @@ -8738,11 +9346,12 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_11 + tags: &ref_12 - suggestions security: - bearer: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] /suggestions/config: post: operationId: SuggestionsApi_setPolicySuggestionsConfig @@ -8772,10 +9381,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_12 security: - bearer: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] get: operationId: SuggestionsApi_getPolicySuggestionsConfig summary: Get suggestions config @@ -8798,10 +9408,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_12 security: - bearer: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] /notifications: get: operationId: NotificationsApi_getAllNotifications @@ -8814,6 +9425,8 @@ paths: headers: X-Total-Count: description: Count of notifications + schema: + type: integer content: application/json: schema: @@ -8828,11 +9441,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_12 + tags: &ref_13 - notifications security: - bearer: [] - - bearerAuth: [] + - bearer: [] /notifications/new: get: operationId: NotificationsApi_getNewNotifications @@ -8856,10 +9469,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 + tags: *ref_13 security: - bearer: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] /notifications/progresses: get: operationId: NotificationsApi_getProgresses @@ -8883,10 +9497,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 + tags: *ref_13 security: - bearer: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] /notifications/read/all: post: operationId: NotificationsApi_readAll @@ -8910,10 +9525,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 + tags: *ref_13 security: - bearer: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] /notifications/delete/{notificationId}: delete: operationId: NotificationsApi_delete @@ -8940,10 +9556,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 + tags: *ref_13 security: - bearer: [] - - bearerAuth: [] + - bearer: [] + - bearer: [] /projects/search: post: operationId: ProjectsAPI_projectSearch @@ -8977,11 +9594,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_13 + tags: &ref_14 - projects /projects/compare/documents: post: - operationId: ProjectsAPI_compareDocuments + operationId: ProjectsAPI_compareDocumentsV2 summary: Compare documents. description: Compare documents. parameters: [] @@ -9008,14 +9625,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CompareDocumentsDTO' + $ref: '#/components/schemas/CompareDocumentsDTOV2' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_14 /projects/properties: get: operationId: ProjectsAPI_getPolicyProperties @@ -9037,7 +9654,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_14 /record/{policyId}/status: get: operationId: RecordApi_getRecordStatus @@ -9069,10 +9686,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_14 + tags: &ref_15 - record security: - - bearerAuth: [] + - bearer: [] - bearer: [] /record/{policyId}/recording/start: post: @@ -9112,9 +9729,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 + tags: *ref_15 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /record/{policyId}/recording/stop: post: @@ -9155,9 +9772,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 + tags: *ref_15 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /record/{policyId}/recording/actions: get: @@ -9192,9 +9809,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 + tags: *ref_15 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /record/{policyId}/running/start: post: @@ -9234,9 +9851,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 + tags: *ref_15 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /record/{policyId}/running/stop: post: @@ -9276,9 +9893,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 + tags: *ref_15 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /record/{policyId}/running/results: get: @@ -9311,9 +9928,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 + tags: *ref_15 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /record/{policyId}/running/details: get: @@ -9346,9 +9963,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 + tags: *ref_15 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /record/{policyId}/running/fast-forward: post: @@ -9388,9 +10005,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 + tags: *ref_15 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /record/{policyId}/running/retry: post: @@ -9430,9 +10047,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 + tags: *ref_15 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /record/{policyId}/running/skip: post: @@ -9472,9 +10089,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 + tags: *ref_15 security: - - bearerAuth: [] + - bearer: [] - bearer: [] /ai-suggestions/ask: get: @@ -9484,8 +10101,9 @@ paths: parameters: - name: q required: true - in: path + in: query description: The question of choosing a methodology + example: Find me large scale projects schema: type: string responses: @@ -9501,7 +10119,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_15 + tags: &ref_16 - ai-suggestions /ai-suggestions/rebuild-vector: put: @@ -9512,7 +10130,7 @@ paths: responses: '200': description: '' - tags: *ref_15 + tags: *ref_16 /schemas/type/{type}: get: tags: @@ -9526,7 +10144,7 @@ paths: required: true description: JSON type. security: - - bearerAuth: [] + - bearer: [] summary: Returns schema by type. responses: '200': @@ -9567,7 +10185,7 @@ paths: description: Tag from the selected policy. summary: Requests block ID from a policy by tag. security: - - bearerAuth: [] + - bearer: [] responses: '200': description: Successful operation. @@ -9594,7 +10212,7 @@ paths: - policies description: Sends data to the specified block. security: - - bearerAuth: [] + - bearer: [] summary: Sends data to the specified block. parameters: - in: path @@ -9640,7 +10258,7 @@ paths: Requests block data by tag. Only users with a role that described in block are allowed to make the request. security: - - bearerAuth: [] + - bearer: [] summary: Requests block data. parameters: - in: path @@ -9687,7 +10305,7 @@ paths: type: string format: binary security: - - bearerAuth: [] + - bearer: [] responses: '201': description: Created. @@ -9710,7 +10328,7 @@ paths: - artifacts description: Upload artifact. For users with the Standard Registry role only. security: - - bearerAuth: [] + - bearer: [] requestBody: content: multipart/form-data: @@ -9756,7 +10374,7 @@ paths: - artifacts description: Returns all artifacts. security: - - bearerAuth: [] + - bearer: [] summary: Returns all artifacts. parameters: - in: query @@ -9815,7 +10433,7 @@ paths: - artifacts description: Upload artifact. For users with the Standard Registry role only. security: - - bearerAuth: [] + - bearer: [] requestBody: content: multipart/form-data: @@ -9861,7 +10479,7 @@ paths: - artifacts description: Delete artifact. security: - - bearerAuth: [] + - bearer: [] summary: Delete artifact. parameters: - in: path @@ -9893,7 +10511,7 @@ paths: - tags description: Creates new tag. security: - - bearerAuth: [] + - bearer: [] summary: Creates new tag. requestBody: description: Object that contains tag information. @@ -9933,7 +10551,7 @@ info: the heart of the Guardian solution is a sophisticated Policy Workflow Engine (PWE) that enables applications to offer a requirements-based tokenization implementation. - version: 2.21.1 + version: 2.24.1 contact: name: API developer url: https://envisionblockchain.com @@ -9947,7 +10565,7 @@ servers: description: version 1.0 components: securitySchemes: - bearerAuth: + bearer: type: http scheme: bearer bearerFormat: JWT @@ -10834,6 +11452,18 @@ components: type: object roles: type: object + blocks: + type: object + tokens: + type: object + migrateState: + type: boolean + migrateRetirePools: + type: boolean + editedVCs: + type: object + retireContractId: + type: string required: - policies - vcs @@ -10841,6 +11471,12 @@ components: - schemas - groups - roles + - blocks + - tokens + - migrateState + - migrateRetirePools + - editedVCs + - retireContractId PolicyCategoryDTO: type: object properties: @@ -11088,6 +11724,16 @@ components: - title - companyName - sectoralScope + CompareDocumentsDTOV2: + type: object + properties: + projects: + $ref: '#/components/schemas/CompareDocumentsDTO' + presentations: + $ref: '#/components/schemas/CompareDocumentsDTO' + required: + - projects + - presentations PropertiesDTO: type: object properties: @@ -11200,6 +11846,27 @@ components: - right - total - documents + RegisteredUsersDTO: + type: object + properties: + username: + type: string + did: + type: string + parent: + type: string + role: + type: string + policyRoles: + type: array + items: + type: string + required: + - username + - did + - parent + - role + - policyRoles ToolDTO: type: object properties: @@ -11240,27 +11907,6 @@ components: - messageId - codeVersion - createDate - RegisteredUsersDTO: - type: object - properties: - username: - type: string - did: - type: string - parent: - type: string - role: - type: string - policyRoles: - type: array - items: - type: string - required: - - username - - did - - parent - - role - - policyRoles Credentials: type: object required: diff --git a/docs/.gitbook/assets/swagger (2) (1).yaml b/docs/.gitbook/assets/swagger (2) (1).yaml index 79eefbaddc..1d18f0fd00 100644 --- a/docs/.gitbook/assets/swagger (2) (1).yaml +++ b/docs/.gitbook/assets/swagger (2) (1).yaml @@ -74,6 +74,32 @@ paths: schema: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 + /accounts/change-password: + post: + operationId: AccountApi_changePassword + summary: Change user password. + parameters: [] + requestBody: + required: true + description: User credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/ChangePasswordDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsSessionResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 /accounts/access-token: post: operationId: AccountApi_getAccessToken @@ -113,10 +139,9 @@ paths: tags: *ref_0 security: - bearer: [] - - bearer: [] /accounts/standard-registries: get: - operationId: AccountApi_getStandatdRegistries + operationId: AccountApi_getStandardRegistries summary: Returns all Standard Registries. description: Returns all Standard Registries. parameters: [] @@ -212,7 +237,7 @@ paths: examples: Filter: value: - policyId: '000000000000000000000000' + policyId: '000000000000000000000001' responses: '200': description: Successful operation. @@ -234,7 +259,6 @@ paths: - analytics security: - bearer: [] - - bearer: [] /analytics/compare/policies: post: operationId: AnalyticsApi_comparePolicies @@ -254,7 +278,7 @@ paths: Filter1: value: policyId1: '000000000000000000000001' - policyId2: '000000000000000000000002' + policyId2: '000000000000000000000001' eventsLvl: '0' propLvl: '0' childrenLvl: '0' @@ -263,7 +287,23 @@ paths: value: policyIds: - '000000000000000000000001' - - '000000000000000000000002' + - '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter3: + value: + policies: + - type: id + value: '000000000000000000000001' + - type: message + value: '0000000000.000000001' + - type: file + value: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... eventsLvl: '0' propLvl: '0' childrenLvl: '0' @@ -288,7 +328,6 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /analytics/compare/modules: post: operationId: AnalyticsApi_compareModules @@ -308,7 +347,7 @@ paths: Filter: value: moduleId1: '000000000000000000000001' - moduleId2: '000000000000000000000002' + moduleId2: '000000000000000000000001' propLvl: '0' childrenLvl: '0' idLvl: '0' @@ -332,7 +371,6 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /analytics/compare/schemas: post: operationId: AnalyticsApi_compareSchemas @@ -352,7 +390,7 @@ paths: Filter: value: schemaId1: '000000000000000000000001' - schemaId2: '000000000000000000000002' + schemaId2: '000000000000000000000001' idLvl: '0' responses: '200': @@ -374,7 +412,6 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /analytics/compare/documents: post: operationId: AnalyticsApi_compareDocuments @@ -394,12 +431,12 @@ paths: Filter1: value: documentId1: '000000000000000000000001' - documentId2: '000000000000000000000002' + documentId2: '000000000000000000000001' Filter2: value: documentIds: - '000000000000000000000001' - - '000000000000000000000002' + - '000000000000000000000001' responses: '200': description: Successful operation. @@ -420,7 +457,6 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /analytics/compare/tools: post: operationId: AnalyticsApi_compareTools @@ -440,12 +476,12 @@ paths: Filter1: value: toolId1: '000000000000000000000001' - toolId2: '000000000000000000000002' + toolId2: '000000000000000000000001' Filter2: value: toolIds: - '000000000000000000000001' - - '000000000000000000000002' + - '000000000000000000000001' responses: '200': description: Successful operation. @@ -466,7 +502,6 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /analytics/compare/policies/export: post: operationId: AnalyticsApi_comparePoliciesExport @@ -474,7 +509,14 @@ paths: description: >- Compare policies. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string requestBody: required: true description: Filters. @@ -486,7 +528,7 @@ paths: Filter1: value: policyId1: '000000000000000000000001' - policyId2: '000000000000000000000002' + policyId2: '000000000000000000000001' eventsLvl: '0' propLvl: '0' childrenLvl: '0' @@ -495,7 +537,23 @@ paths: value: policyIds: - '000000000000000000000001' - - '000000000000000000000002' + - '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter3: + value: + policies: + - type: id + value: '000000000000000000000001' + - type: message + value: '0000000000.000000001' + - type: file + value: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... eventsLvl: '0' propLvl: '0' childrenLvl: '0' @@ -520,7 +578,6 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /analytics/compare/modules/export: post: operationId: AnalyticsApi_compareModulesExport @@ -528,7 +585,14 @@ paths: description: >- Compare modules. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string requestBody: required: true description: Filters. @@ -540,7 +604,7 @@ paths: Filter: value: moduleId1: '000000000000000000000001' - moduleId2: '000000000000000000000002' + moduleId2: '000000000000000000000001' propLvl: '0' childrenLvl: '0' idLvl: '0' @@ -564,7 +628,6 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /analytics/compare/schemas/export: post: operationId: AnalyticsApi_compareSchemasExport @@ -572,7 +635,14 @@ paths: description: >- Compare schemas. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string requestBody: required: true description: Filters. @@ -584,7 +654,7 @@ paths: Filter: value: schemaId1: '000000000000000000000001' - schemaId2: '000000000000000000000002' + schemaId2: '000000000000000000000001' idLvl: '0' responses: '200': @@ -606,7 +676,6 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /analytics/compare/documents/export: post: operationId: AnalyticsApi_compareDocumentsExport @@ -614,7 +683,14 @@ paths: description: >- Compare documents. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string requestBody: required: true description: Filters. @@ -626,12 +702,12 @@ paths: Filter1: value: documentId1: '000000000000000000000001' - documentId2: '000000000000000000000002' + documentId2: '000000000000000000000001' Filter2: value: documentIds: - '000000000000000000000001' - - '000000000000000000000002' + - '000000000000000000000001' responses: '200': description: Successful operation. @@ -652,7 +728,6 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /analytics/compare/tools/export: post: operationId: AnalyticsApi_compareToolsExport @@ -660,7 +735,14 @@ paths: description: >- Compare tools. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string requestBody: required: true description: Filters. @@ -672,12 +754,12 @@ paths: Filter1: value: toolId1: '000000000000000000000001' - toolId2: '000000000000000000000002' + toolId2: '000000000000000000000001' Filter2: value: toolIds: - '000000000000000000000001' - - '000000000000000000000002' + - '000000000000000000000001' responses: '200': description: Successful operation. @@ -698,7 +780,6 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /analytics/search/blocks: post: operationId: AnalyticsApi_searchBlocks @@ -713,7 +794,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FilterSearchPoliciesDTO' + $ref: '#/components/schemas/FilterSearchBlocksDTO' examples: Filter: value: @@ -725,7 +806,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SearchPoliciesDTO' + type: array + items: + $ref: '#/components/schemas/SearchBlocksDTO' '401': description: Unauthorized. '403': @@ -739,46 +822,64 @@ paths: tags: *ref_1 security: - bearer: [] - - bearer: [] /artifacts: get: - tags: - - artifacts - description: Returns all artifacts. - security: - - bearer: [] + operationId: ArtifactApi_getArtifactsV2 summary: Returns all artifacts. + description: Returns all artifacts. parameters: - - in: query - name: policyId + - name: id + required: false + in: query + description: Artifact identifier + example: '000000000000000000000001' + schema: + type: string + - name: type + required: false + in: query + description: Tool|Policy + example: policy schema: + enum: + - tool + - policy type: string + - name: policyId + required: false + in: query description: Policy identifier - - in: query - name: pageIndex + example: '000000000000000000000001' + schema: + type: string + - name: toolId + required: false + in: query + description: Tool identifier + example: '000000000000000000000001' schema: - type: integer + type: string + - name: pageIndex + required: false + in: query description: >- The number of pages to skip before starting to collect the result set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 + example: 20 + schema: + type: number responses: '200': description: Successful operation. headers: - x-total-count: + X-Total-Count: schema: type: integer description: Total items in the collection. @@ -787,7 +888,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Artifact' + $ref: '#/components/schemas/ArtifactDTOItem' '401': description: Unauthorized. '403': @@ -797,7 +898,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_2 + - artifacts + security: + - bearer: [] /artifacts/{parentId}: post: operationId: ArtifactApi_uploadArtifacts @@ -808,6 +913,7 @@ paths: required: true in: path description: Parent ID + example: '000000000000000000000001' schema: type: string requestBody: @@ -842,26 +948,22 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: - - artifacts + tags: *ref_2 security: - bearer: [] - - bearer: [] /artifacts/{artifactId}: delete: - tags: - - artifacts - description: Delete artifact. - security: - - bearer: [] + operationId: ArtifactApi_deleteArtifact summary: Delete artifact. + description: Delete artifact. parameters: - - in: path - name: artifactId + - name: artifactId + required: true + in: path + description: Artifact ID + example: '000000000000000000000001' schema: type: string - required: true - description: Artifact identifier responses: '200': description: Successful operation. @@ -878,7 +980,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] /contracts: get: operationId: ContractsApi_getContracts @@ -886,7 +991,7 @@ paths: description: Returns all contracts. parameters: - name: type - required: false + required: true in: query description: Contract type example: RETIRE @@ -895,13 +1000,6 @@ paths: - WIPE - RETIRE type: string - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - name: pageIndex required: false in: query @@ -911,11 +1009,18 @@ paths: example: 0 schema: type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': description: Contracts. headers: - x-total-count: + X-Total-Count: schema: type: integer description: Total items in the collection. @@ -935,11 +1040,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_2 + tags: &ref_3 - contracts security: - bearer: [] - - bearer: [] post: operationId: ContractsApi_createContract summary: Create contract. @@ -952,10 +1056,7 @@ paths: content: application/json: schema: - type: object - properties: - description: - type: string + $ref: '#/components/schemas/ContractConfigDTO' responses: '201': description: Created contract. @@ -973,10 +1074,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/import: post: operationId: ContractsApi_importContract @@ -1017,10 +1117,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/{contractId}/permissions: get: operationId: ContractsApi_contractPermissions @@ -1053,10 +1152,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/{contractId}: delete: operationId: ContractsApi_removeContract @@ -1089,10 +1187,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/wipe/requests: get: operationId: ContractsApi_getWipeRequests @@ -1102,19 +1199,12 @@ paths: are allowed to make the request. parameters: - name: contractId - required: false + required: true in: query description: Contract identifier example: 0.0.1 schema: type: string - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - name: pageIndex required: false in: query @@ -1124,11 +1214,18 @@ paths: example: 0 schema: type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': description: Successful operation. headers: - x-total-count: + X-Total-Count: schema: type: integer description: Total items in the collection. @@ -1148,10 +1245,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/wipe/{contractId}/requests/enable: post: operationId: ContractsApi_enableWipeRequests @@ -1170,6 +1266,10 @@ paths: responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1180,10 +1280,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/wipe/{contractId}/requests/disable: post: operationId: ContractsApi_disableWipeRequests @@ -1202,6 +1301,10 @@ paths: responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1212,10 +1315,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/wipe/requests/{requestId}/approve: post: operationId: ContractsApi_approveWipeRequest @@ -1234,6 +1336,10 @@ paths: responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1244,10 +1350,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/wipe/requests/{requestId}/reject: delete: operationId: ContractsApi_rejectWipeRequest @@ -1256,12 +1361,6 @@ paths: Reject wipe contract request. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: ban - required: false - in: query - description: Reject and ban - schema: - type: boolean - name: requestId required: true in: path @@ -1269,9 +1368,20 @@ paths: example: 652745597a7b53526de37c05 schema: type: string + - name: ban + required: false + in: query + description: Reject and ban + example: true + schema: + type: boolean responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1282,10 +1392,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/wipe/{contractId}/requests: delete: operationId: ContractsApi_clearWipeRequests @@ -1304,6 +1413,10 @@ paths: responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1314,18 +1427,24 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] - /contracts/wipe/{contractId}/admin/{hederaId}: - post: - operationId: ContractsApi_wipeAddAdmin - summary: Add wipe admin. + /contracts/wipe/{contractId}/requests/{hederaId}: + delete: + operationId: ContractsApi_clearWipeRequestsWithHederaId + summary: Clear wipe requests for hedera account. description: >- - Add wipe contract admin. Only users with the Standard Registry role are - allowed to make the request. + Clear wipe contract requests for specific hedera account. Only users + with the Standard Registry role are allowed to make the request. parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string - name: hederaId required: true in: path @@ -1333,6 +1452,34 @@ paths: example: 0.0.1 schema: type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/admin/{hederaId}: + post: + operationId: ContractsApi_wipeAddAdmin + summary: Add wipe admin. + description: >- + Add wipe contract admin. Only users with the Standard Registry role are + allowed to make the request. + parameters: - name: contractId required: true in: path @@ -1340,9 +1487,20 @@ paths: example: 652745597a7b53526de37c05 schema: type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1353,10 +1511,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] delete: operationId: ContractsApi_wipeRemoveAdmin summary: Remove wipe admin. @@ -1364,23 +1521,27 @@ paths: Remove wipe contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1391,10 +1552,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/wipe/{contractId}/manager/{hederaId}: post: operationId: ContractsApi_wipeAddManager @@ -1403,23 +1563,27 @@ paths: Add wipe contract manager. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1430,10 +1594,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] delete: operationId: ContractsApi_wipeRemoveManager summary: Remove wipe manager. @@ -1441,23 +1604,27 @@ paths: Remove wipe contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1468,10 +1635,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/wipe/{contractId}/wiper/{hederaId}: post: operationId: ContractsApi_wipeAddWiper @@ -1480,23 +1646,27 @@ paths: Add wipe contract wiper. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1507,10 +1677,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] delete: operationId: ContractsApi_wipeRemoveWiper summary: Remove wipe wiper. @@ -1518,6 +1687,13 @@ paths: Remove wipe contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string - name: hederaId required: true in: path @@ -1525,6 +1701,34 @@ paths: example: 0.0.1 schema: type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/wiper/{hederaId}/{tokenId}: + post: + operationId: ContractsApi_wipeAddWiperWithToken + summary: Add wipe wiper for token. + description: >- + Add wipe contract wiper for specific token. Only users with the Standard + Registry role are allowed to make the request. + parameters: - name: contractId required: true in: path @@ -1532,9 +1736,27 @@ paths: example: 652745597a7b53526de37c05 schema: type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1 + schema: + type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1545,9 +1767,56 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveWiperWithToken + summary: Remove wipe wiper for token. + description: >- + Remove wipe contract wiper for specific token. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: - bearer: [] /contracts/retire/{contractId}/pools/sync: post: @@ -1581,10 +1850,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire/requests: get: operationId: ContractsApi_getRetireRequests @@ -1592,19 +1860,12 @@ paths: description: Returns all retire requests. parameters: - name: contractId - required: false + required: true in: query description: Contract identifier example: 0.0.1 schema: type: string - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - name: pageIndex required: false in: query @@ -1614,11 +1875,18 @@ paths: example: 0 schema: type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': description: Successful operation. headers: - x-total-count: + X-Total-Count: schema: type: integer description: Total items in the collection. @@ -1638,37 +1906,29 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire/pools: get: operationId: ContractsApi_getRetirePools summary: Return a list of all retire pools. description: Returns all retire pools. parameters: - - name: tokens - required: false + - name: contractId + required: true in: query - description: Tokens - example: 0.0.1,0.0.2,0.0.3 + description: Contract identifier + example: 0.0.1 schema: type: string - - name: contractId - required: false + - name: tokens + required: true in: query - description: Contract identifier - example: 0.0.1 + description: Tokens + example: 0.0.1,0.0.2,0.0.3 schema: type: string - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - name: pageIndex required: false in: query @@ -1678,11 +1938,18 @@ paths: example: 0 schema: type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': description: Successful operation. headers: - x-total-count: + X-Total-Count: schema: type: integer description: Total items in the collection. @@ -1702,10 +1969,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire/{contractId}/requests: delete: operationId: ContractsApi_clearRetireRequests @@ -1738,10 +2004,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire/{contractId}/pools: delete: operationId: ContractsApi_clearRetirePools @@ -1774,10 +2039,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] post: operationId: ContractsApi_setRetirePool summary: Set retire pool. @@ -1815,10 +2079,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire/pools/{poolId}: delete: operationId: ContractsApi_unsetRetirePool @@ -1851,10 +2114,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire/requests/{requestId}: delete: operationId: ContractsApi_unsetRetireRequest @@ -1887,10 +2149,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire/pools/{poolId}/retire: post: operationId: ContractsApi_retire @@ -1927,10 +2188,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire/requests/{requestId}/approve: post: operationId: ContractsApi_approveRetire @@ -1949,6 +2209,10 @@ paths: responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1959,10 +2223,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire/requests/{requestId}/cancel: delete: operationId: ContractsApi_cancelRetireRequest @@ -1979,6 +2242,10 @@ paths: responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -1989,10 +2256,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire/{contractId}/admin/{hederaId}: post: operationId: ContractsApi_retireAddAdmin @@ -2001,23 +2267,27 @@ paths: Add retire contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -2028,10 +2298,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] delete: operationId: ContractsApi_retireRemoveAdmin summary: Remove wipe admin. @@ -2039,23 +2308,27 @@ paths: Remove wipe contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '401': description: Unauthorized. '403': @@ -2066,23 +2339,15 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /contracts/retire: get: operationId: ContractsApi_getRetireVCs summary: Return a list of all retire vcs. description: Returns all retire vcs. parameters: - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - name: pageIndex required: false in: query @@ -2092,18 +2357,27 @@ paths: example: 0 schema: type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': description: Successful operation. headers: - x-total-count: + X-Total-Count: schema: type: integer description: Total items in the collection. content: application/json: schema: - type: object + type: array + items: + type: object '401': description: Unauthorized. '403': @@ -2114,10 +2388,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: *ref_3 security: - bearer: [] - - bearer: [] /demo/registered-users: get: operationId: DemoApi_registeredUsers @@ -2131,22 +2404,23 @@ paths: application/json: schema: $ref: '#/components/schemas/RegisteredUsersDTO' - tags: + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_4 - demo /demo/random-key: get: - tags: - - demo - description: Generates a new Hedera account with a random private key. - security: - - bearer: [] + operationId: DemoApi_randomKey + summary: Generate demo key. + description: Generate demo key. + parameters: [] responses: '200': description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/HederaAccount' '401': description: Unauthorized. '403': @@ -2156,22 +2430,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /demo/push/random-key: - get: - tags: - - demo - description: Generates a new Hedera account with a random private key. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 security: - bearer: [] - summary: Generates a new Hedera account with a random private key. + /demo/push/random-key: + get: + operationId: DemoApi_pushRandomKey + summary: Generate demo key. + description: Generate demo key. + parameters: [] responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -2181,39 +2456,69 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearer: [] /external: post: - tags: - - external - description: Sends data from an external source. + operationId: ExternalApi_receiveExternalData summary: Sends data from an external source. + description: Sends data from an external source. + parameters: [] requestBody: - description: Object that contains a VC Document. required: true + description: Object that contains a VC Document. content: application/json: schema: - $ref: '#/components/schemas/ExternalData' + $ref: '#/components/schemas/ExternalDocumentDTO' responses: '200': description: Successful operation. + content: + application/json: + schema: + type: boolean '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - external /ipfs/file: post: operationId: IpfsApi_postFile summary: Add file from ipfs. description: Add file from ipfs. parameters: [] + requestBody: + required: true + description: Binary data. + content: + application/json: + schema: + type: string responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string '401': - description: Unauthorized - tags: &ref_3 + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_5 - ipfs security: - bearer: [] @@ -2226,47 +2531,70 @@ paths: - name: policyId required: true in: path - description: Policy identifier - example: 652745597a7b53526de37c05 + description: Policy id + example: '000000000000000000000001' schema: type: string + requestBody: + required: true + description: Binary data. + content: + application/json: + schema: + type: string responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string '401': - description: Unauthorized - tags: *ref_3 + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 security: - bearer: [] /ipfs/file/{cid}: get: - tags: - - ipfs - description: Get file from ipfs. + operationId: IpfsApi_getFile summary: Get file from ipfs. + description: Get file from ipfs. parameters: - - in: path - name: cid + - name: cid + required: true + in: path + description: File cid schema: type: string - required: true - description: File CID. - security: - - bearer: [] responses: - '201': - description: Created. + '200': + description: Successful operation. content: - binary/octet-stream: + application/json: schema: type: string format: binary '401': description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] /ipfs/file/{cid}/dry-run: get: operationId: IpfsApi_getFileDryRun @@ -2276,40 +2604,17 @@ paths: - name: cid required: true in: path + description: File cid schema: type: string - responses: - '401': - description: Unauthorized - tags: *ref_3 - security: - - bearer: [] - /logs: - post: - tags: - - logs - description: Returns logs. For users with the Standard Registry role only. - security: - - bearer: [] - requestBody: - description: Log filters. - content: - application/json: - schema: - $ref: '#/components/schemas/LogFilters' - summary: Returns logs. responses: '200': description: Successful operation. content: application/json: schema: - type: object - properties: - totalCount: - type: number - logs: - $ref: '#/components/schemas/Log' + type: string + format: binary '401': description: Unauthorized. '403': @@ -2319,37 +2624,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /logs/attributes: - get: - tags: - - logs - description: Returns logs attributes. For users with the Standard Registry role only. - parameters: - - in: query - name: name - schema: - type: string - description: Part of name. - - in: query - name: existingAttributes - schema: - type: array - items: - type: string - description: Attributes to exclude. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 security: - bearer: [] - summary: Returns logs attributes. + /logs: + post: + operationId: LoggerApi_getLogs + summary: Return a list of all logs. + description: >- + Return a list of all logs. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/LogFilterDTO' responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - type: string + $ref: '#/components/schemas/LogResultDTO' '401': description: Unauthorized. '403': @@ -2359,91 +2659,71 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /map/key: - get: - tags: - - maps - description: Returns map api key. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_6 + - logs security: - bearer: [] - summary: Returns map api key. + /logs/attributes: + get: + operationId: LoggerApi_getAttributes + summary: Return a list of attributes. + description: >- + Return a list of attributes. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: name + required: false + in: query + description: Name + example: Search + schema: + type: number + - name: existingAttributes + required: false + in: query + description: Existing attributes + example: + - WORKER + schema: + type: array + items: + type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: string '401': description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/Error' - /map/sh: - get: - operationId: MapApi_getSentinelKey - parameters: [] - responses: - '200': - description: '' - tags: - - map - /metrics: - get: - operationId: MetricsApi_getMetrics - parameters: [] - responses: - '200': - description: '' - tags: - - metrics - /modules: - get: - tags: - - modules - description: >- - Returns all modules. Only users with the Standard Registry and Installer - role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 security: - bearer: [] - summary: Return a list of all modules. - parameters: - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 + /logs/seq: + get: + operationId: LoggerApi_getSeqUrl + summary: Return url on seq store. + description: >- + Return url on seq store. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] responses: '200': description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. content: application/json: schema: - $ref: '#/components/schemas/Module' + type: object + properties: + seq_url: + type: string + example: http://localhost:5341 '401': description: Unauthorized. '403': @@ -2453,26 +2733,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - post: - tags: - - modules - description: >- - Creates a new module. Only users with the Standard Registry role are - allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 security: - bearer: [] - summary: Creates a new module. - requestBody: - description: Object that contains module configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Module' + /map/key: + get: + operationId: MapApi_getKey + summary: Get map API key. + description: Return map API key. + parameters: [] responses: - '201': - description: Created. + '200': + description: Successful operation. + content: + application/json: + schema: + type: string '401': description: Unauthorized. '403': @@ -2482,51 +2759,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /modules/schemas: - get: - operationId: ModulesApi_getModuleSchemas - parameters: [] - responses: - '401': - description: Unauthorized - tags: &ref_4 - - modules - security: - - bearer: [] - post: - operationId: ModulesApi_postSchemas - parameters: [] - responses: - '401': - description: Unauthorized - tags: *ref_4 + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_7 + - map security: - bearer: [] - /modules/{uuid}: + /map/sh: get: - tags: - - modules - description: >- - Retrieves module configuration for the specified module ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: uuid - schema: - type: string - required: true - description: Selected module ID. - summary: Retrieves module configuration. - security: - - bearer: [] + operationId: MapApi_getSentinelKey + summary: Get sentinel API key. + description: Return sentinel API key. + parameters: [] responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Module' + type: string '401': description: Unauthorized. '403': @@ -2536,37 +2786,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - put: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearer: [] + /metrics: + get: + operationId: MetricsApi_getMetrics + parameters: [] + responses: + '200': + description: '' tags: - - modules + - metrics + /modules: + post: + operationId: ModulesApi_postModules + summary: Creates a new module. description: >- - Updates module configuration for the specified module ID. Only users - with the Standard Registry role are allowed to make the request. - summary: Updates module configuration. - parameters: - - in: path - name: uuid - description: Selected module ID. - required: true - schema: - type: string + Creates a new module. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] requestBody: - description: Object that contains module configuration. required: true + description: Module config. content: application/json: schema: - $ref: '#/components/schemas/Module' - security: - - bearer: [] + $ref: '#/components/schemas/ModuleDTO' responses: '200': - description: Successful operation. + description: Created module. content: application/json: schema: - $ref: '#/components/schemas/Module' + $ref: '#/components/schemas/ModuleDTO' '401': description: Unauthorized. '403': @@ -2576,59 +2830,48 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - delete: - tags: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_8 - modules - description: >- - Deletes the module with the provided module ID. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - in: path - name: uuid - schema: - type: string - required: true - description: Module ID. security: - bearer: [] - summary: Deletes the module. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/menu: get: - tags: - - modules + operationId: ModulesApi_getModulesV2 + summary: Return a list of all modules. description: >- - Returns modules menu. Only users with the Standard Registry and - Installer role are allowed to make the request. - security: - - bearer: [] - summary: Return a list of modules. + Returns all modules. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: type: array items: - $ref: '#/components/schemas/Module' + $ref: '#/components/schemas/ModuleDTO' '401': description: Unauthorized. '403': @@ -2638,65 +2881,55 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /modules/{uuid}/export/file: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/schemas: get: - tags: - - modules + operationId: ModulesApi_getModuleSchemas + summary: Return a list of all module schemas. description: >- - Returns a zip file containing the published module and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. + Returns all module schemas. Only users with the Standard Registry role + are allowed to make the request. parameters: - - in: path - name: uuid + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 schema: - type: string - required: true - description: Selected module ID. - security: - - bearer: [] - summary: >- - Return module and its artifacts in a zip file format for the specified - module. - responses: - '200': - description: Successful operation. Response zip file - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/{uuid}/export/message: - get: - tags: - - modules - description: >- - Returns the Hedera message ID for the specified module published onto - IPFS. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - in: path - name: uuid + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: topicId + required: false + in: query + description: Topic id + example: 0.0.1 schema: type: string - required: true - description: Selected module ID. - security: - - bearer: [] - summary: Return Heder message ID for the specified published module. responses: '200': description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: - $ref: '#/components/schemas/ExportModule' + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -2706,37 +2939,33 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /modules/import/message: - post: - tags: - - modules - description: >- - Imports new module and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 security: - bearer: [] - summary: Imports new module from IPFS. + post: + operationId: ModulesApi_postSchemas + summary: Creates a new module schema. + description: >- + Creates a new module schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the module. required: true + description: Schema config. content: application/json: schema: - type: object - properties: - messageId: - type: string + $ref: '#/components/schemas/SchemaDTO' responses: '201': - description: Created. + description: Created schema. content: application/json: schema: - $ref: '#/components/schemas/Module' + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -2746,35 +2975,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /modules/import/file: - post: - tags: - - modules - description: >- - Imports new module and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 security: - bearer: [] - summary: Imports new module from a zip file. - requestBody: - description: >- - A zip file that contains the module and associated schemas and VCs to - be imported. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary + /modules/{uuid}: + delete: + operationId: ModulesApi_deleteModule + summary: Deletes the module. + description: >- + Deletes the module with the provided module ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string responses: - '201': - description: Created. + '200': + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Module' + type: boolean '401': description: Unauthorized. '403': @@ -2784,36 +3010,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /modules/import/message/preview: - post: - tags: - - modules - description: >- - Previews the module from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - summary: Module preview from IPFS. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 security: - bearer: [] - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the module. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string + get: + operationId: ModulesApi_getModule + summary: Retrieves module configuration. + description: >- + Retrieves module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PreviewModule' + $ref: '#/components/schemas/ModuleDTO' '401': description: Unauthorized. '403': @@ -2823,35 +3044,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /modules/import/file/preview: - post: - tags: - - modules - description: >- - Previews the module from a zip file without loading it into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - summary: Module preview from a zip file. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 security: - bearer: [] + put: + operationId: ModulesApi_putModule + summary: Updates module configuration. + description: >- + Updates module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string requestBody: - description: >- - A zip file that contains the module and associated schemas and VCs to - be viewed. required: true + description: Module config. content: - binary/octet-stream: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/ModuleDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PreviewModule' + $ref: '#/components/schemas/ModuleDTO' '401': description: Unauthorized. '403': @@ -2861,33 +3085,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /modules/{uuid}/publish: - put: - tags: - - modules - description: >- - Publishes the module with the specified (internal) module ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - in: path - name: uuid - schema: - type: string - required: true - description: Selected module ID. - summary: Publishes the module onto IPFS. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 security: - bearer: [] + /modules/menu: + get: + operationId: ModulesApi_getMenu + summary: Return a list of modules. + description: >- + Returns modules menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] responses: '200': - description: Successful operation. + description: Modules. content: application/json: schema: - $ref: '#/components/schemas/PublishModule' + type: array + items: + $ref: '#/components/schemas/ModuleDTO' '401': description: Unauthorized. '403': @@ -2897,31 +3115,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /modules/validate: - post: - tags: - - modules - description: >- - Validates selected module. Only users with the Standard Registry role - are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 security: - bearer: [] - summary: Validates module. - requestBody: - description: Object that contains module configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Module' + /modules/{uuid}/export/file: + get: + operationId: ModulesApi_moduleExportFile + summary: >- + Return module and its artifacts in a zip file format for the specified + module. + description: >- + Returns a zip file containing the published module and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string responses: '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ValidateModule' + description: File. '401': description: Unauthorized. '403': @@ -2931,151 +3149,141 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tools: - post: - operationId: ToolsApi_createNewTool - summary: Creates a new tool. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}/export/message: + get: + operationId: ModulesApi_moduleExportMessage + summary: Return Heder message ID for the specified published module. description: >- - Creates a new tool. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] + Returns the Hedera message ID for the specified module published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string responses: '200': - description: Successful operation. + description: Message. content: application/json: schema: - $ref: '#/components/schemas/ToolDTO' + $ref: '#/components/schemas/ExportMessageDTO' '401': - description: Unauthorized - '500': - description: Internal server error. + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_5 - - tools + tags: *ref_8 security: - bearer: [] - - bearer: [] - get: - operationId: ToolsApi_getTools - summary: Return a list of all tools. + /modules/import/message: + post: + operationId: ModulesApi_moduleImportMessage + summary: Imports new module from IPFS. description: >- - Returns all tools. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: pageSize - required: false - in: query - description: The numbers of items to return - schema: - type: number - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - schema: - type: number + Imports new module and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' responses: '200': - description: Successful operation. + description: Created module. content: application/json: schema: - $ref: '#/components/schemas/ToolDTO' + $ref: '#/components/schemas/ModuleDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_8 security: - bearer: [] - - bearer: [] - /tools/push: + /modules/import/file: post: - operationId: ToolsApi_createNewToolAsync - summary: Creates a new tool. + operationId: ModulesApi_moduleImportFile + summary: Imports new module from a zip file. description: >- - Creates a new tool. Only users with the Standard Registry role are - allowed to make the request. + Imports new module and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string responses: '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized - '500': - description: Internal server error. + description: Created module. content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearer: [] - - bearer: [] - /tools/{id}: - delete: - operationId: ToolsApi_deleteTool - summary: >- - Deletes the tool with the provided tool ID. Only users with the Standard - Registry role are allowed to make the request. - description: Deletes the tool. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string - responses: - '200': - description: Successful operation. + $ref: '#/components/schemas/ModuleDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_8 security: - bearer: [] - - bearer: [] - get: - operationId: ToolsApi_getToolById - summary: Retrieves tool configuration. + /modules/import/message/preview: + post: + operationId: ModulesApi_moduleImportMessagePreview + summary: Imports new module from IPFS. description: >- - Retrieves tool configuration for the specified tool ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string + Imports new module and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' responses: '200': - description: Successful operation. + description: Module preview. content: application/json: schema: - $ref: '#/components/schemas/ToolDTO' + $ref: '#/components/schemas/ModulePreviewDTO' '401': description: Unauthorized. '403': @@ -3086,30 +3294,32 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_8 security: - bearer: [] - - bearer: [] - put: - operationId: ToolsApi_updateTool - summary: Updates tool configuration. + /modules/import/file/preview: + post: + operationId: ModulesApi_moduleImportFilePreview + summary: Imports new module from a zip file. description: >- - Updates tool configuration for the specified tool ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string + Imports new module and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string responses: '200': - description: Successful operation. + description: Module preview. content: application/json: schema: - $ref: '#/components/schemas/ToolDTO' + $ref: '#/components/schemas/ModulePreviewDTO' '401': description: Unauthorized. '403': @@ -3120,33 +3330,40 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_8 security: - bearer: [] - - bearer: [] - /tools/{id}/publish: + /modules/{uuid}/publish: put: - operationId: ToolsApi_publishTool - summary: Publishes the tool onto IPFS. + operationId: ModulesApi_publishModule + summary: Publishes the module onto IPFS. description: >- - Publishes the tool with the specified (internal) tool ID onto IPFS, + Publishes the module with the specified (internal) module ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: id + - name: uuid required: true in: path - description: Tool ID + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 schema: type: string + requestBody: + required: true + description: Module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ToolDTO' + $ref: '#/components/schemas/ModuleDTO' '401': description: Unauthorized. '403': @@ -3157,33 +3374,31 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_8 security: - bearer: [] - - bearer: [] - /tools/{id}/push/publish: - put: - operationId: ToolsApi_publishToolAsync - summary: Publishes the tool onto IPFS. + /modules/validate: + post: + operationId: ModulesApi_validateModule + summary: Validates selected module. description: >- - Publishes the tool with the specified (internal) tool ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string + Validates selected module. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Module config. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' responses: '200': - description: Successful operation. + description: Validation result. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/ModuleValidationDTO' '401': description: Unauthorized. '403': @@ -3194,25 +3409,31 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_8 security: - bearer: [] - - bearer: [] - /tools/validate: + /tools: post: - operationId: ToolsApi_validateTool - summary: Validates selected tool. + operationId: ToolsApi_createNewTool + summary: Creates a new tool. description: >- - Validates selected tool. Only users with the Standard Registry role are + Creates a new tool. Only users with the Standard Registry role are allowed to make the request. parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' responses: '200': - description: '' + description: Successful operation. content: application/json: schema: - type: object + $ref: '#/components/schemas/ToolDTO' '401': description: Unauthorized. '403': @@ -3223,66 +3444,47 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: &ref_9 + - tools security: - bearer: [] - - bearer: [] - /tools/{id}/export/file: get: - operationId: ToolsApi_toolExportFile - summary: >- - Return tool and its artifacts in a zip file format for the specified - tool. + operationId: ToolsApi_getToolsV2 + summary: Return a list of all tools. description: >- - Returns a zip file containing the published tool and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. + Returns all tools. Only users with the Standard Registry role are + allowed to make the request. parameters: - - name: id - required: true - in: path - description: Tool ID + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 schema: - type: string - responses: - '200': - description: Successful operation. Response zip file. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearer: [] - - bearer: [] - /tools/{id}/export/message: - get: - operationId: ToolsApi_toolExportMessage - summary: Return Heder message ID for the specified published tool. - description: >- - Returns the Hedera message ID for the specified tool published onto - IPFS. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: id - required: true - in: path - description: Tool ID + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 schema: - type: string + type: number responses: '200': description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: - type: object + type: array + items: + $ref: '#/components/schemas/ToolDTO' '401': description: Unauthorized. '403': @@ -3293,26 +3495,31 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /tools/import/message/preview: + /tools/push: post: - operationId: ToolsApi_toolImportMessagePreview - summary: Imports new tool from IPFS. + operationId: ToolsApi_createNewToolAsync + summary: Creates a new tool. description: >- - Imports new tool and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. + Creates a new tool. Only users with the Standard Registry role are + allowed to make the request. parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' responses: '200': description: Successful operation. content: application/json: schema: - type: object + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -3323,26 +3530,31 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /tools/import/message: - post: - operationId: ToolsApi_toolImportMessage - summary: Imports new tool from IPFS. - description: >- - Imports new tool and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] + /tools/{id}: + delete: + operationId: ToolsApi_deleteTool + summary: >- + Deletes the tool with the provided tool ID. Only users with the Standard + Registry role are allowed to make the request. + description: Deletes the tool. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ToolDTO' + type: boolean '401': description: Unauthorized. '403': @@ -3353,26 +3565,30 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /tools/import/file/preview: - post: - operationId: ToolsApi_toolImportFilePreview - summary: Imports new tool from a zip file. + get: + operationId: ToolsApi_getToolById + summary: Retrieves tool configuration. description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] + Retrieves tool configuration for the specified tool ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - type: object + $ref: '#/components/schemas/ToolDTO' '401': description: Unauthorized. '403': @@ -3383,19 +3599,30 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /tools/import/file: - post: - operationId: ToolsApi_toolImportFile - summary: Imports new tool from a zip file. + put: + operationId: ToolsApi_updateTool + summary: Updates tool configuration. description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] + Updates tool configuration for the specified tool ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' responses: '200': description: Successful operation. @@ -3413,40 +3640,40 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /tools/import/file-metadata: - post: - operationId: ToolsApi_toolImportFileWithMetadata - summary: Imports new tool from a zip file. + /tools/{id}/publish: + put: + operationId: ToolsApi_publishTool + summary: Publishes the tool onto IPFS. description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] + Publishes the tool with the specified (internal) tool ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string requestBody: required: true - description: Form data with tool file and metadata. + description: Tool configuration. content: - multipart/form-data: + application/json: schema: - type: object - properties: - file: - type: string - format: binary - metadata: - type: string - format: binary + $ref: '#/components/schemas/ToolDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ToolDTO' + $ref: '#/components/schemas/ToolValidationDTO' '401': description: Unauthorized. '403': @@ -3457,19 +3684,33 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /tools/push/import/file: - post: - operationId: ToolsApi_toolImportFileAsync - summary: Imports new tool from a zip file. + /tools/{id}/push/publish: + put: + operationId: ToolsApi_publishToolAsync + summary: Publishes the tool onto IPFS. description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] + Publishes the tool with the specified (internal) tool ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' responses: '200': description: Successful operation. @@ -3487,40 +3728,31 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /tools/push/import/file-metadata: + /tools/validate: post: - operationId: ToolsApi_toolImportFileWithMetadataAsync - summary: Imports new tool from a zip file. + operationId: ToolsApi_validateTool + summary: Validates selected tool. description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. + Validates selected tool. Only users with the Standard Registry role are + allowed to make the request. parameters: [] requestBody: required: true - description: Form data with tool file and metadata. + description: Tool configuration. content: - multipart/form-data: + application/json: schema: - type: object - properties: - file: - type: string - format: binary - metadata: - type: string - format: binary + $ref: '#/components/schemas/ToolDTO' responses: '200': - description: Successful operation. + description: Validation result. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/ToolValidationDTO' '401': description: Unauthorized. '403': @@ -3531,57 +3763,30 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /tools/push/import/message: - post: - operationId: ToolsApi_toolImportMessageAsync - summary: Imports new tool from IPFS. + /tools/{id}/export/file: + get: + operationId: ToolsApi_toolExportFile + summary: >- + Return tool and its artifacts in a zip file format for the specified + tool. description: >- - Imports new tool and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearer: [] - - bearer: [] - /tools/menu/all: - get: - operationId: ToolsApi_getMenu - summary: Return a list of tools. - description: >- - Returns tools menu. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] + Returns a zip file containing the published tool and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string responses: '200': - description: '' - content: - application/json: - schema: - type: array - items: - type: object + description: Successful operation. Response zip file. '401': description: Unauthorized. '403': @@ -3592,22 +3797,23 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /profiles/{username}: + /tools/{id}/export/message: get: - operationId: ProfileApi_getProfile - summary: Returns user account info. + operationId: ToolsApi_toolExportMessage + summary: Return Heder message ID for the specified published tool. description: >- - Returns user account information. For users with the Standard Registry - role it also returns address book and VC document information. + Returns the Hedera message ID for the specified tool published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. parameters: - - name: username + - name: id required: true in: path - description: The name of the user for whom to fetch the information + description: Tool ID + example: '000000000000000000000001' schema: type: string responses: @@ -3616,9 +3822,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ProfileDTO' + $ref: '#/components/schemas/ExportMessageDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -3627,36 +3833,34 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_6 - - profiles + tags: *ref_9 security: - bearer: [] - - bearer: [] - put: - operationId: ProfileApi_setUserProfile - summary: Sets Hedera credentials for the user. + /tools/import/message/preview: + post: + operationId: ToolsApi_toolImportMessagePreview + summary: Imports new tool from IPFS. description: >- - Sets Hedera credentials for the user. For users with the Standard - Registry role it also creates an address book. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to update the information. - schema: - type: string + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] requestBody: required: true - description: Object that contains the Hedera account data. + description: Message. content: application/json: schema: - $ref: '#/components/schemas/CredentialsDTO' + $ref: '#/components/schemas/ImportMessageDTO' responses: '200': - description: Created. + description: Tool preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolPreviewDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -3665,40 +3869,34 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /profiles/push/{username}: - put: - operationId: ProfileApi_setUserProfileAsync - summary: Sets Hedera credentials for the user. + /tools/import/message: + post: + operationId: ToolsApi_toolImportMessage + summary: Imports new tool from IPFS. description: >- - Sets Hedera credentials for the user. For users with the Standard - Registry role it also creates an address book. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to update the information. - schema: - type: string + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] requestBody: required: true - description: Object that contains the Hedera account data. + description: Message. content: application/json: schema: - $ref: '#/components/schemas/CredentialsDTO' + $ref: '#/components/schemas/ImportMessageDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/ToolDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -3707,33 +3905,34 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /profiles/{username}/balance: - get: - operationId: ProfileApi_getUserBalance - summary: Returns user's Hedera account balance. + /tools/import/file/preview: + post: + operationId: ToolsApi_toolImportFilePreview + summary: Imports new tool from a zip file. description: >- - Requests Hedera account balance. Only users with the Installer role are - allowed to make the request. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to fetch the balance. - schema: - type: string + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string responses: '200': - description: Successful operation. + description: Module preview. content: application/json: schema: - type: string + $ref: '#/components/schemas/ToolPreviewDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -3742,38 +3941,34 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /profiles/restore/{username}: - put: - operationId: ProfileApi_restoreUserProfile - summary: Restore user data (policy, DID documents, VC documents). - description: Restore user data (policy, DID documents, VC documents). - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to restore the information. - schema: - type: string + /tools/import/file: + post: + operationId: ToolsApi_toolImportFile + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] requestBody: required: true - description: Object that contains the Hedera account data. + description: File. content: application/json: schema: - $ref: '#/components/schemas/CredentialsDTO' + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/ToolDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -3782,38 +3977,41 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /profiles/restore/topics/{username}: - put: - operationId: ProfileApi_restoreTopic - summary: List of available recovery topics. - description: List of available recovery topics. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to restore the information. - schema: - type: string + /tools/import/file-metadata: + post: + operationId: ToolsApi_toolImportFileWithMetadata + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] requestBody: required: true - description: Object that contains the Hedera account data. + description: Form data with tool file and metadata. content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/CredentialsDTO' + type: object + properties: + file: + type: string + format: binary + metadata: + type: string + format: binary responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/ToolDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -3822,32 +4020,34 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /profiles/did-document/validate: + /tools/push/import/file: post: - operationId: ProfileApi_validateDidDocument - summary: Validate DID document format. - description: Validate DID document format. + operationId: ToolsApi_toolImportFileAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. parameters: [] requestBody: required: true - description: DID Document. + description: A zip file containing tool config. content: application/json: schema: - $ref: '#/components/schemas/DidDocumentDTO' + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/DidDocumentStatusDTO' + $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -3856,32 +4056,41 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /profiles/did-keys/validate: + /tools/push/import/file-metadata: post: - operationId: ProfileApi_validateDidKeys - summary: Validate DID document keys. - description: Validate DID document keys. + operationId: ToolsApi_toolImportFileWithMetadataAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. parameters: [] requestBody: required: true - description: DID Document and keys. + description: Form data with tool file and metadata. content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/DidDocumentWithKeyDTO' + type: object + properties: + file: + type: string + format: binary + metadata: + type: string + format: binary responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/DidKeyStatusDTO' + $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -3890,62 +4099,32 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 + tags: *ref_9 security: - bearer: [] - - bearer: [] - /policies: - get: - tags: - - policies + /tools/push/import/message: + post: + operationId: ToolsApi_toolImportMessageAsync + summary: Imports new tool from IPFS. description: >- - Returns all policies. Only users with the Standard Registry and - Installer role are allowed to make the request. - security: - - bearer: [] - summary: Return a list of all policies. - parameters: - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' responses: '200': description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. content: application/json: schema: - type: array - items: - allOf: - - $ref: '#/components/schemas/PolicyConfig' - - type: object - properties: - userRoles: - type: array - items: - type: string + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -3955,26 +4134,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - post: - tags: - - policies - description: >- - Creates a new policy. Only users with the Standard Registry role are - allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 security: - bearer: [] - summary: Creates a new policy. - requestBody: - description: Object that contains policy configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyConfig' + /tools/menu/all: + get: + operationId: ToolsApi_getMenu + summary: Return a list of tools. + description: >- + Returns tools menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] responses: - '201': - description: Created. + '200': + description: Modules. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ToolDTO' '401': description: Unauthorized. '403': @@ -3984,107 +4164,112 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/migrate-data: - post: - operationId: PolicyApi_migrateData - summary: Migrate policy data. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /profiles/{username}: + get: + operationId: ProfileApi_getProfile + summary: Returns user account info. description: >- - Migrate policy data. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Migration config. - content: - application/json: - schema: - $ref: '#/components/schemas/MigrationConfigDTO' + Returns user account information. For users with the Standard Registry + role it also returns address book and VC document information. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to fetch the information + example: username + schema: + type: string responses: '200': - description: Errors while migration. + description: Successful operation. content: application/json: schema: - type: array - items: - type: object - properties: - error: - type: string - id: - type: string + $ref: '#/components/schemas/ProfileDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_7 - - policies + tags: &ref_10 + - profiles security: - bearer: [] - - bearer: [] - /policies/push/migrate-data: - post: - operationId: PolicyApi_migrateDataAsync - summary: Migrate policy data asynchronous. + put: + operationId: ProfileApi_setUserProfile + summary: Sets Hedera credentials for the user. description: >- - Migrate policy data asynchronous. Only users with the Standard Registry - role are allowed to make the request. - parameters: [] + Sets Hedera credentials for the user. For users with the Standard + Registry role it also creates an address book. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to update the information. + example: username + schema: + type: string requestBody: required: true - description: Migration config. + description: Object that contains the Hedera account data. content: application/json: schema: - $ref: '#/components/schemas/MigrationConfigDTO' + $ref: '#/components/schemas/CredentialsDTO' responses: - '202': - description: Created task. - content: - application/json: - schema: - type: object + '200': + description: Created. '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_10 security: - bearer: [] - - bearer: [] - /policies/push: - post: - tags: - - policies + /profiles/push/{username}: + put: + operationId: ProfileApi_setUserProfileAsync + summary: Sets Hedera credentials for the user. description: >- - Creates a new policy. Only users with the Standard Registry role are - allowed to make the request. - security: - - bearer: [] - summary: Creates a new policy. + Sets Hedera credentials for the user. For users with the Standard + Registry role it also creates an address book. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to update the information. + example: username + schema: + type: string requestBody: - description: Object that contains policy configuration. required: true + description: Object that contains the Hedera account data. content: application/json: schema: - $ref: '#/components/schemas/PolicyConfig' + $ref: '#/components/schemas/CredentialsDTO' responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -4094,17 +4279,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/push/{policyId}: - post: - operationId: PolicyApi_updatePolicyAsync - summary: '' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/{username}/balance: + get: + operationId: ProfileApi_getUserBalance + summary: Returns user's Hedera account balance. + description: >- + Requests Hedera account balance. Only users with the Installer role are + allowed to make the request. parameters: - - name: policyId + - name: username required: true in: path - description: Policy identifier - example: 652745597a7b53526de37c05 + description: The name of the user for whom to fetch the balance. + example: username schema: type: string responses: @@ -4113,66 +4304,47 @@ paths: content: application/json: schema: - type: object + type: string '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_10 security: - bearer: [] - - bearer: [] - delete: - operationId: PolicyApi_deletePolicyAsync + /profiles/restore/{username}: + put: + operationId: ProfileApi_restoreUserProfile + summary: Restore user data (policy, DID documents, VC documents). + description: Restore user data (policy, DID documents, VC documents). parameters: - - name: policyId + - name: username required: true in: path - description: Policy identifier - example: 652745597a7b53526de37c05 + description: The name of the user for whom to restore the information. + example: username schema: type: string - responses: - '401': - description: Unauthorized - tags: *ref_7 - security: - - bearer: [] - /policies/{policyId}: - get: - tags: - - policies - description: >- - Retrieves policy configuration for the specified policy ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - summary: Retrieves policy configuration. - security: - - bearer: [] + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' responses: '200': description: Successful operation. content: application/json: schema: - allOf: - - $ref: '#/components/schemas/PolicyConfig' - - type: object - properties: - userRoles: - type: array - items: - type: string + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -4182,37 +4354,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/restore/topics/{username}: put: - tags: - - policies - description: >- - Updates policy configuration for the specified policy ID. Only users - with the Standard Registry role are allowed to make the request. - summary: Updates policy configuration. + operationId: ProfileApi_restoreTopic + summary: List of available recovery topics. + description: List of available recovery topics. parameters: - - in: path - name: policyId - description: Selected policy ID. + - name: username required: true + in: path + description: The name of the user for whom to restore the information. + example: username schema: type: string requestBody: - description: Object that contains policy configuration. required: true + description: Object that contains the Hedera account data. content: application/json: schema: - $ref: '#/components/schemas/PolicyConfig' - security: - - bearer: [] + $ref: '#/components/schemas/CredentialsDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PolicyConfig' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -4222,43 +4394,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/publish: - put: - tags: - - policies - description: >- - Publishes the policy with the specified (internal) policy ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/did-document/validate: + post: + operationId: ProfileApi_validateDidDocument + summary: Validate DID document format. + description: Validate DID document format. + parameters: [] requestBody: - description: Object that contains policy version. required: true + description: DID Document. content: application/json: schema: - type: object - properties: - policyVersion: - type: string - summary: Publishes the policy onto IPFS. - security: - - bearer: [] + $ref: '#/components/schemas/DidDocumentDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PublishPolicy' + $ref: '#/components/schemas/DidDocumentStatusDTO' '401': description: Unauthorized. '403': @@ -4268,46 +4427,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/push/{policyId}/publish: - put: - tags: - - policies - description: >- - Publishes the policy with the specified (internal) policy ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 security: - bearer: [] - summary: >- - Publishes the policy with the specified (internal) policy ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. + /profiles/did-keys/validate: + post: + operationId: ProfileApi_validateDidKeys + summary: Validate DID document keys. + description: Validate DID document keys. + parameters: [] requestBody: - description: Object that contains policy version. required: true + description: DID Document and keys. content: application/json: schema: - type: object - properties: - policyVersion: - type: string + $ref: '#/components/schemas/DidDocumentWithKeyDTO' responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/DidKeyStatusDTO' '401': description: Unauthorized. '403': @@ -4317,32 +4460,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run: - put: - tags: - - policies - description: >- - Run policy without making any persistent changes or executing - transaction. Only users with the Standard Registry role are allowed to - make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 security: - bearer: [] - summary: Dry Run policy. + /policies: + get: + operationId: PolicyApi_getPoliciesV2 + summary: Return a list of all policies. + description: Returns all policies. parameters: - - in: path - name: policyId + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 schema: - type: string - required: true - description: Policy ID. + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: - '201': - description: Created. + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: - $ref: '#/components/schemas/PublishPolicy' + type: array + items: + $ref: '#/components/schemas/PolicyDTO' '401': description: Unauthorized. '403': @@ -4352,76 +4509,76 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/discontinue: - put: - operationId: PolicyApi_discontinuePolicy - summary: Discontunue policy. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_11 + - policies + security: + - bearer: [] + post: + operationId: PolicyApi_createPolicy + summary: Creates a new policy. description: >- - Discontunue policy. Only users with the Standard Registry role are + Creates a new policy. Only users with the Standard Registry role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy identifier. - schema: {} + parameters: [] requestBody: required: true - description: Discontinue details. + description: Policy configuration. content: application/json: schema: - type: object - properties: - date: - type: object + $ref: '#/components/schemas/PolicyDTO' responses: '200': - description: Policies. + description: Successful operation. content: application/json: schema: type: array items: - type: object + $ref: '#/components/schemas/PolicyDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - - bearer: [] - - bearer: [] - /policies/{policyId}/draft: - put: - tags: - - policies + /policies/migrate-data: + post: + operationId: PolicyApi_migrateData + summary: Migrate policy data. description: >- - Return policy to editing. Only users with the Standard Registry role are + Migrate policy data. Only users with the Standard Registry role are allowed to make the request. - security: - - bearer: [] - summary: Return policy to editing. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. + parameters: [] + requestBody: + required: true + description: Migration config. + content: + application/json: + schema: + $ref: '#/components/schemas/MigrationConfigDTO' responses: '200': - description: Successful operation. + description: Errors while migration. content: application/json: schema: - $ref: '#/components/schemas/PublishPolicy' + type: array + items: + type: object + properties: + error: + type: string + id: + type: string '401': description: Unauthorized. '403': @@ -4431,110 +4588,67 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/validate: - post: - tags: - - policies - description: >- - Validates selected policy. Only users with the Standard Registry role - are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Validates policy. + /policies/push/migrate-data: + post: + operationId: PolicyApi_migrateDataAsync + summary: Migrate policy data asynchronous. + description: >- + Migrate policy data asynchronous. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] requestBody: - description: Object that contains policy configuration. required: true + description: Migration configuration. content: application/json: schema: - $ref: '#/components/schemas/PolicyConfig' + $ref: '#/components/schemas/MigrationConfigDTO' responses: - '200': - description: Successful operation. + '202': + description: Created task. content: application/json: schema: - $ref: '#/components/schemas/ValidatePolicy' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/navigation: - get: - operationId: PolicyApi_getPolicyNavigation - summary: Returns a policy navigation. - description: Returns a policy navigation. - parameters: - - name: policyId - required: true - in: path - description: Policy identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearer: [] - - bearer: [] - /policies/{policyId}/groups: - get: - tags: - - policies - description: Returns a list of groups the user is a member of. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - summary: Returns a list of groups the user is a member of. + tags: *ref_11 security: - bearer: [] + /policies/push: + post: + operationId: PolicyApi_createPolicyAsync + summary: Creates a new policy. + description: >- + Creates a new policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - type: object - properties: - id: - type: string - uuid: - type: string - role: - type: string - groupLabel: - type: string - groupName: - type: string - active: - type: boolean + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -4544,36 +4658,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/{policyId}: post: - tags: - - policies + operationId: PolicyApi_updatePolicyAsync + summary: Clones policy. description: >- - Makes the selected group active. if UUID is not set then returns the - user to the default state. + Clones policy. Only users with the Standard Registry role are allowed to + make the request. parameters: - - in: path - name: policyId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string - required: true - description: Selected policy ID. - summary: Makes the selected group active. requestBody: - description: Selected group. required: true + description: Policy configuration. content: application/json: schema: - type: object - properties: - uuid: - type: string - security: - - bearer: [] + $ref: '#/components/schemas/PolicyDTO' responses: '200': description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -4583,269 +4700,277 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/documents: - get: - operationId: PolicyApi_getPolicyDocuments - summary: Get policy documents. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + delete: + operationId: PolicyApi_deletePolicyAsync + summary: Remove policy. description: >- - Get policy documents. Only users with the Standard Registry role are - allowed to make the request. + Remove policy. Only users with the Standard Registry role are allowed to + make the request. parameters: - - name: pageSize - required: true - in: query - description: Page size. - schema: - type: number - - name: pageIndex - required: true - in: query - description: Page index. - schema: - type: number - - name: type - required: true - in: query - description: Document type. - schema: - enum: - - VC - - VP - type: string - - name: includeDocument - required: true - in: query - description: Include document field. - schema: - type: boolean - name: policyId required: true in: path - description: Policy identifier. - schema: {} + description: Policy Id + example: '000000000000000000000001' + schema: + type: string responses: '200': - description: Documents. - headers: - X-Total-Count: - description: Total documents count. - schema: - type: integer + description: Successful operation. content: application/json: schema: - type: array - items: - type: object + $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - /policies/{policyId}/data: + /policies/{policyId}: get: - operationId: PolicyApi_downloadPolicyData - summary: Get policy data. + operationId: PolicyApi_getPolicy + summary: Retrieves policy configuration. description: >- - Get policy data. Only users with the Standard Registry role are allowed - to make the request. + Retrieves policy configuration for the specified policy ID. Only users + with the Standard Registry role are allowed to make the request. parameters: - name: policyId required: true in: path - description: Policy identifier. - schema: {} + description: Policy Id + example: '000000000000000000000001' + schema: + type: string responses: '200': - description: Policy data. + description: Policy configuration. content: application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/PolicyDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - - bearer: [] - - bearer: [] - /policies/data: - post: - operationId: PolicyApi_uploadPolicyData - summary: Upload policy data. + put: + operationId: PolicyApi_updatePolicy + summary: Updates policy configuration. description: >- - Upload policy data. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] + Updates policy configuration for the specified policy ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string requestBody: required: true - description: Policy data file + description: Policy configuration. content: application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/PolicyDTO' responses: '200': - description: Uploaded policy. + description: Policy configuration. content: application/json: schema: - type: object + $ref: '#/components/schemas/PolicyDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - - bearer: [] - - bearer: [] - /policies/{policyId}/tag-block-map: - get: - operationId: PolicyApi_getTagBlockMap - summary: Get policy tag block map. + /policies/{policyId}/publish: + put: + operationId: PolicyApi_publishPolicy + summary: Publishes the policy onto IPFS. description: >- - Get policy tag block map. Only users with the Standard Registry role are - allowed to make the request. + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. parameters: - name: policyId required: true in: path - description: Policy identifier. - schema: {} + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' responses: '200': - description: Policy tag block map. + description: Successful operation. content: application/json: schema: - type: object + $ref: '#/components/schemas/PoliciesValidationDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - - bearer: [] - - bearer: [] - /policies/{policyId}/virtual-keys: - get: - operationId: PolicyApi_downloadVirtualKeys - summary: Get policy virtual keys. + /policies/push/{policyId}/publish: + put: + operationId: PolicyApi_publishPolicyAsync + summary: Publishes the policy onto IPFS. description: >- - Get policy virtual keys. Only users with the Standard Registry role are - allowed to make the request. + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. parameters: - name: policyId required: true in: path - description: Policy identifier. - schema: {} + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' responses: '200': - description: Policy virtual keys. + description: Successful operation. content: application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - - bearer: [] - - bearer: [] - post: - operationId: PolicyApi_uploadVirtualKeys - summary: Upload policy virtual keys. + /policies/{policyId}/dry-run: + put: + operationId: PolicyApi_dryRunPolicy + summary: Dry Run policy. description: >- - Upload policy virtual keys. Only users with the Standard Registry role - are allowed to make the request. + Run policy without making any persistent changes or executing + transaction. Only users with the Standard Registry role are allowed to + make the request. parameters: - name: policyId required: true in: path - description: Policy identifier. - schema: {} - requestBody: - required: true - description: Virtual keys file - content: - application/json: - schema: - type: string - format: binary + description: Policy Id + example: '000000000000000000000001' + schema: + type: string responses: '200': - description: Operation completed. + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PoliciesValidationDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - - bearer: [] - - bearer: [] - /policies/{policyId}/blocks: - get: - tags: - - policies + /policies/{policyId}/discontinue: + put: + operationId: PolicyApi_discontinuePolicy + summary: Discontinue policy. description: >- - Returns data from the root policy block. Only users with the Standard - Registry and Installer role are allowed to make the request. + Discontinue policy. Only users with the Standard Registry role are + allowed to make the request. parameters: - - in: path - name: policyId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string - required: true - description: Selected policy ID. - summary: Retrieves data for the policy root block. - security: - - bearer: [] + requestBody: + required: true + description: Discontinue details. + content: + application/json: + schema: + type: object + properties: + date: + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PolicyBlock' + type: array + items: + $ref: '#/components/schemas/PolicyDTO' '401': description: Unauthorized. '403': @@ -4855,37 +4980,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/blocks/{uuid}: - get: - tags: - - policies + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/draft: + put: + operationId: PolicyApi_draftPolicy + summary: Return policy to editing. description: >- - Requests block data. Only users with a role that described in block are + Return policy to editing. Only users with the Standard Registry role are allowed to make the request. parameters: - - in: path - name: policyId - schema: - type: string + - name: policyId required: true - description: Selected policy ID. - - in: path - name: uuid + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string - required: true - description: Selected block UUID. - summary: Requests block data. - security: - - bearer: [] responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PolicyBlockData' + type: array + items: + $ref: '#/components/schemas/PolicyDTO' '401': description: Unauthorized. '403': @@ -4895,37 +5017,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/validate: post: - tags: - - policies - description: Sends data to the specified block. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - - in: path - name: uuid - schema: - type: string - required: true - description: Selected block UUID. - summary: Sends data to the specified block. + operationId: PolicyApi_validatePolicy + summary: Validates policy. + description: >- + Validates selected policy. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] requestBody: - description: Object with the data to be sent to the block. required: true + description: Policy configuration. content: application/json: schema: - type: object - security: - - bearer: [] + $ref: '#/components/schemas/PolicyDTO' responses: '200': - description: Successful operation. + description: Validation result. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyValidationDTO' '401': description: Unauthorized. '403': @@ -4935,25 +5052,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/tag/{tagName}/blocks: - post: - operationId: PolicyApi_setBlocksByTagName - summary: Sends data to the specified block. - description: Sends data to the specified block. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/navigation: + get: + operationId: PolicyApi_getPolicyNavigation + summary: Returns a policy navigation. + description: Returns a policy navigation. parameters: - - name: tagName - required: true - in: path - description: Policy block tag - example: someTag - schema: - type: string - name: policyId required: true in: path - description: Policy identifier - example: 652745597a7b53526de37c05 + description: Policy Id + example: '000000000000000000000001' schema: type: string responses: @@ -4964,35 +5077,29 @@ paths: schema: type: object '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] + /policies/{policyId}/groups: get: - operationId: PolicyApi_getBlocksByTagName - summary: Requests block data. - description: >- - Requests block data by tag. Only users with a role that described in - block are allowed to make the request. + operationId: PolicyApi_getPolicyGroups + summary: Returns a list of groups the user is a member of. + description: Returns a list of groups the user is a member of. parameters: - - name: tagName - required: true - in: path - description: Policy block tag - example: someTag - schema: - type: string - name: policyId required: true in: path - description: Policy identifier - example: 652745597a7b53526de37c05 + description: Policy Id + example: '000000000000000000000001' schema: type: string responses: @@ -5003,38 +5110,39 @@ paths: schema: type: object '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - /policies/{policyId}/tag/{tagName}: - get: - operationId: PolicyApi_getBlockByTagName - summary: Requests block data. + post: + operationId: PolicyApi_setPolicyGroups + summary: Makes the selected group active. description: >- - Requests block data by tag. Only users with a role that described in - block are allowed to make the request. + Makes the selected group active. if UUID is not set then returns the + user to the default state. parameters: - - name: tagName - required: true - in: path - description: Policy block tag - example: someTag - schema: - type: string - name: policyId required: true in: path - description: Policy identifier - example: 652745597a7b53526de37c05 + description: Policy Id + example: '000000000000000000000001' schema: type: string + requestBody: + required: true + description: Group + content: + application/json: + schema: + $ref: '#/components/schemas/Object' responses: '200': description: Successful operation. @@ -5043,67 +5151,80 @@ paths: schema: type: object '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - /policies/{policyId}/blocks/{uuid}/parents: + /policies/{policyId}/documents: get: - operationId: PolicyApi_getBlockParents + operationId: PolicyApi_getPolicyDocuments + summary: Get policy documents. + description: >- + Get policy documents. Only users with the Standard Registry role are + allowed to make the request. parameters: - - name: uuid - required: true - in: path - description: Block identifier - example: 652745597a7b53526de37c05 - schema: - type: string - name: policyId required: true in: path - description: Policy identifier - example: 652745597a7b53526de37c05 + description: Policy Id + example: '000000000000000000000001' schema: type: string - responses: - '401': - description: Unauthorized - tags: *ref_7 - security: - - bearer: [] - /policies/{policyId}/export/file: - get: - tags: - - policies - description: >- - Returns a zip file containing the published policy and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - in: path - name: policyId + - name: type + required: false + in: query + description: Document type. + example: VC schema: + enum: + - VC + - VP type: string - required: true - description: Selected policy ID. - security: - - bearer: [] - summary: >- - Return policy and its artifacts in a zip file format for the specified - policy. + - name: includeDocument + required: false + in: query + description: Include document field. + example: true + schema: + type: boolean + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': - description: Successful operation. + description: Documents. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: - $ref: '#/components/schemas/ExportPolicy' + type: array + items: + type: object '401': description: Unauthorized. '403': @@ -5113,32 +5234,69 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/export/message: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/data: get: - tags: - - policies + operationId: PolicyApi_downloadPolicyData + summary: Get policy data. description: >- - Returns the Hedera message ID for the specified policy published onto - IPFS. Only users with the Standard Registry role are allowed to make the - request. + Get policy data. Only users with the Standard Registry role are allowed + to make the request. parameters: - - in: path - name: policyId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string - required: true - description: Selected policy ID. + responses: + '200': + description: Policy data. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Return Heder message ID for the specified published policy. + /policies/data: + post: + operationId: PolicyApi_uploadPolicyData + summary: Upload policy data. + description: >- + Upload policy data. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy data file + content: + application/json: + schema: + type: string + format: binary responses: '200': - description: Successful operation. + description: Uploaded policy. content: application/json: schema: - $ref: '#/components/schemas/ExportPolicy' + type: object '401': description: Unauthorized. '403': @@ -5148,34 +5306,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/export/xlsx: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/virtual-keys: get: - operationId: PolicyApi_getPolicyExportXlsx - summary: >- - Return policy and its artifacts in a xlsx file format for the specified - policy. + operationId: PolicyApi_downloadVirtualKeys + summary: Get policy virtual keys. description: >- - Returns a xlsx file containing the published policy and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. + Get policy virtual keys. Only users with the Standard Registry role are + allowed to make the request. parameters: - name: policyId required: true in: path description: Policy Id + example: '000000000000000000000001' schema: type: string responses: '200': - description: Successful operation. + description: Policy virtual keys. content: application/json: schema: type: string format: binary '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -5184,52 +5343,69 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - - bearer: [] - /policies/import/message: post: - tags: - - policies + operationId: PolicyApi_uploadVirtualKeys + summary: Upload policy virtual keys. description: >- - Imports new policy and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. + Upload policy virtual keys. Only users with the Standard Registry role + are allowed to make the request. parameters: - - in: query - name: versionOfTopicId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string - description: The topic ID of policy version. - examples: - pageIndex: - summary: Example of a topic ID of policy version. - value: 0.0.00000001 - security: - - bearer: [] - summary: Imports new policy from IPFS. requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the Policy. required: true + description: Virtual keys file content: application/json: schema: - type: object - properties: - messageId: - type: string + type: string + format: binary responses: - '201': - description: Created. + '200': + description: Operation completed. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/PolicyConfig' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag-block-map: + get: + operationId: PolicyApi_getTagBlockMap + summary: Get policy tag block map. + description: >- + Get policy tag block map. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy tag block map. + content: + application/json: + schema: + type: object '401': description: Unauthorized. '403': @@ -5239,39 +5415,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/push/import/message: - post: - tags: - - policies - description: >- - Imports new policy and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: >- - Imports new policy and all associated artifacts from IPFS into the local - DB. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the Policy. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string + /policies/{policyId}/blocks: + get: + operationId: PolicyApi_getPolicyBlocks + summary: Retrieves data for the policy root block. + description: >- + Returns data from the root policy block. Only users with the Standard + Registry and Installer role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/BlockDTO' '401': description: Unauthorized. '403': @@ -5281,36 +5450,45 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/import/message/preview: - post: - tags: - - policies - description: >- - Previews the policy from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - summary: Policy preview from IPFS. + $ref: '#/components/schemas/InternalServerErrorDTO' + '503': + description: Block Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableErrorDTO' + tags: *ref_11 security: - bearer: [] - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the policy. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string + /policies/{policyId}/blocks/{uuid}: + get: + operationId: PolicyApi_getBlockData + summary: Requests block data. + description: >- + Requests block data. Only users with a role that described in block are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PreviewPolicy' + $ref: '#/components/schemas/BlockDTO' '401': description: Unauthorized. '403': @@ -5320,36 +5498,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/push/import/message/preview: - post: - tags: - - policies - description: >- - Previews the policy from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + '503': + description: Block Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Previews the policy from IPFS without loading it into the local DB. + post: + operationId: PolicyApi_setBlockData + summary: Sends data to the specified block. + description: Sends data to the specified block. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the policy. required: true + description: Data content: application/json: schema: - type: object - properties: - messageId: - type: string + $ref: '#/components/schemas/Object' responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/BlockDTO' '401': description: Unauthorized. '403': @@ -5359,47 +5550,50 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/import/file: - post: - tags: - - policies - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + '503': + description: Block Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag/{tagName}/blocks: + post: + operationId: PolicyApi_setBlocksByTagName + summary: Sends data to the specified block. + description: Sends data to the specified block. parameters: - - in: query - name: versionOfTopicId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag schema: type: string - description: The topic ID of policy version. - examples: - pageIndex: - summary: Example of a topic ID of policy version. - value: 0.0.00000001 - security: - - bearer: [] - summary: Imports new policy from a zip file. requestBody: - description: >- - A zip file that contains the policy and associated schemas and VCs to - be imported. required: true + description: Data content: - binary/octet-stream: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/Object' responses: - '201': - description: Created. + '200': + description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/PolicyConfig' + $ref: '#/components/schemas/BlockDTO' '401': description: Unauthorized. '403': @@ -5409,45 +5603,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/import/file-metadata: - post: - operationId: PolicyApi_importPolicyFromFileWithMetadata - summary: Imports new policy from a zip file with metadata. + $ref: '#/components/schemas/InternalServerErrorDTO' + '503': + description: Block Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableErrorDTO' + tags: *ref_11 + security: + - bearer: [] + get: + operationId: PolicyApi_getBlocksByTagName + summary: Requests block data. description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. parameters: - - name: versionOfTopicId - required: false - in: query - description: Topic Id + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag schema: type: string - requestBody: - required: true - description: Form data with policy file and metadata. - content: - multipart/form-data: - schema: - type: object - properties: - policyFile: - type: string - format: binary - metadata: - type: string - format: binary responses: '200': description: Successful operation. content: application/json: schema: - type: object + $ref: '#/components/schemas/BlockDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -5456,40 +5651,44 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + '503': + description: Block Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableErrorDTO' + tags: *ref_11 security: - bearer: [] - - bearer: [] - /policies/push/import/file: - post: - tags: - - policies + /policies/{policyId}/tag/{tagName}: + get: + operationId: PolicyApi_getBlockByTagName + summary: Requests block config. description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - security: - - bearer: [] - summary: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. - requestBody: - description: >- - A zip file that contains the policy and associated schemas and VCs to - be imported. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag + schema: + type: string responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/BlockDTO' '401': description: Unauthorized. '403': @@ -5499,45 +5698,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/push/import/file-metadata: - post: - operationId: PolicyApi_importPolicyFromFileWithMetadataAsync - summary: Imports new policy from a zip file with metadata. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/blocks/{uuid}/parents: + get: + operationId: PolicyApi_getBlockParents + summary: Requests block's parents. description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. + Requests block's parents. Only users with a role that described in block + are allowed to make the request. parameters: - - name: versionOfTopicId - required: false - in: query - description: Topic Id + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 schema: type: string - requestBody: - required: true - description: Form data with policy file and metadata. - content: - multipart/form-data: - schema: - type: object - properties: - policyFile: - type: string - format: binary - metadata: - type: string - format: binary responses: '200': description: Successful operation. content: application/json: schema: - type: object + type: array + items: + $ref: '#/components/schemas/BlockDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -5546,38 +5743,20 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - - bearer: [] - /policies/import/file/preview: - post: - tags: - - policies + /policies/blocks/about: + get: + operationId: PolicyApi_getBlockAbout + summary: Returns block descriptions. description: >- - Previews the policy from a zip file without loading it into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - summary: Policy preview from a zip file. - security: - - bearer: [] - requestBody: - description: >- - A zip file that contains the policy and associated schemas and VCs to - be viewed. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary + Returns block descriptions. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] responses: '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PreviewPolicy' + description: Block descriptions. '401': description: Unauthorized. '403': @@ -5587,38 +5766,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/import/xlsx: - post: - operationId: PolicyApi_importPolicyFromXlsx - summary: Imports new policy from a xlsx file. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/export/file: + get: + operationId: PolicyApi_getPolicyExportFile + summary: >- + Return policy and its artifacts in a zip file format for the specified + policy. description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided xlsx file into the local DB. Only users with the - Standard Registry role are allowed to make the request. + Returns a zip file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. parameters: - name: policyId required: true - in: query + in: path description: Policy Id + example: '000000000000000000000001' schema: type: string - requestBody: - required: true - description: A xlsx file containing policy config. - content: - application/json: - schema: - type: string responses: '200': description: Successful operation. content: application/json: schema: - type: object + type: string + format: binary '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -5627,41 +5806,34 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - - bearer: [] - /policies/push/import/xlsx: - post: - operationId: PolicyApi_importPolicyFromXlsxAsync - summary: Imports new policy from a xlsx file. + /policies/{policyId}/export/message: + get: + operationId: PolicyApi_getPolicyExportMessage + summary: Return Heder message ID for the specified published policy. description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided xlsx file into the local DB. Only users with the - Standard Registry role are allowed to make the request. + Returns the Hedera message ID for the specified policy published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. parameters: - name: policyId required: true - in: query + in: path description: Policy Id + example: '000000000000000000000001' schema: type: string - requestBody: - required: true - description: A xlsx file containing policy config. - content: - application/json: - schema: - type: string responses: '200': - description: Successful operation. + description: Message. content: application/json: schema: - type: object + $ref: '#/components/schemas/ExportMessageDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -5670,35 +5842,37 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - - bearer: [] - /policies/import/xlsx/preview: - post: - operationId: PolicyApi_importPolicyFromXlsxPreview - summary: Policy preview from a xlsx file. + /policies/{policyId}/export/xlsx: + get: + operationId: PolicyApi_getPolicyExportXlsx + summary: >- + Return policy and its artifacts in a xlsx file format for the specified + policy. description: >- - Previews the policy from a xlsx file without loading it into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - requestBody: - required: true - description: A xlsx file containing policy config. - content: - application/json: - schema: - type: string + Returns a xlsx file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - type: object + type: string + format: binary '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -5707,51 +5881,48 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearer: [] - - bearer: [] - /policies/blocks/about: - get: - operationId: PolicyApi_getBlockAbout - parameters: [] - responses: - '401': - description: Unauthorized - tags: *ref_7 + tags: *ref_11 security: - bearer: [] - /policies/{policyId}/dry-run/users: - get: - tags: - - policies + /policies/import/message: + post: + operationId: PolicyApi_importPolicyFromMessage + summary: Imports new policy from IPFS. description: >- - Returns all virtual users. Only users with the Standard Registry role - are allowed to make the request. - security: - - bearer: [] - summary: Returns all virtual users. + Imports new policy and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. parameters: - - in: path - name: policyId + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 schema: type: string - required: true - description: Policy ID. + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' responses: '200': - description: Successful operation. + description: Created policy. content: application/json: schema: type: array items: - type: object - properties: - username: - type: string - did: - type: string + $ref: '#/components/schemas/PolicyDTO' '401': description: Unauthorized. '403': @@ -5761,38 +5932,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/user: - post: - tags: - - policies - description: >- - Create a new virtual account. Only users with the Standard Registry role - are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Create a new virtual account. + /policies/push/import/message: + post: + operationId: PolicyApi_importPolicyFromMessageAsync + summary: Imports new policy from IPFS. + description: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. parameters: - - in: path - name: policyId + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 schema: type: string - required: true - description: Policy ID. + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - type: object - properties: - username: - type: string - did: - type: string + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -5802,48 +5982,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/login: - post: - tags: - - policies - description: >- - Logs virtual user into the system. Only users with the Standard Registry - role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Logs virtual user into the system. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. + /policies/import/message/preview: + post: + operationId: PolicyApi_importMessage + summary: Policy preview from IPFS. + description: >- + Previews the policy from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] requestBody: - description: Virtual user required: true + description: Message. content: application/json: schema: - type: object - properties: - did: - type: string + $ref: '#/components/schemas/ImportMessageDTO' responses: '200': - description: Successful operation. + description: Policy preview. content: application/json: schema: - type: array - items: - type: object - properties: - username: - type: string - did: - type: string + $ref: '#/components/schemas/PolicyPreviewDTO' '401': description: Unauthorized. '403': @@ -5853,70 +6017,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/restart: - post: - tags: - - policies - description: >- - Restarts the execution of the policy. Clear data in database. Only users - with the Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Restarts the execution of the policy. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/transactions: - get: - tags: - - policies + /policies/push/import/message/preview: + post: + operationId: PolicyApi_importFromMessagePreview + summary: Policy preview from IPFS. description: >- - Returns lists of virtual transactions. Only users with the Standard - Registry role are allowed to make the request. - security: - - bearer: [] - summary: Returns lists of virtual transactions. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. + Previews the policy from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - type: object - properties: - createDate: - type: string - type: - type: string - hederaAccountId: - type: string + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -5926,40 +6052,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/artifacts: - get: - tags: - - policies - description: >- - Returns lists of virtual artifacts. Only users with the Standard - Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Returns lists of virtual artifacts. + /policies/import/file: + post: + operationId: PolicyApi_importPolicyFromFile + summary: Imports new policy from a zip file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. parameters: - - in: path - name: policyId + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 schema: type: string - required: true - description: Policy ID. + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string responses: '200': - description: Successful operation. + description: Created policy. content: application/json: schema: type: array items: - type: object - properties: - createDate: - type: string - type: - type: string - owner: - type: string + $ref: '#/components/schemas/PolicyDTO' '401': description: Unauthorized. '403': @@ -5969,24 +6104,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/ipfs: - get: - tags: - - policies - description: >- - Returns lists of virtual artifacts. Only users with the Standard - Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Returns lists of virtual artifacts. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. + /policies/import/file-metadata: + post: + operationId: PolicyApi_importPolicyFromFileWithMetadata + summary: Imports new policy from a zip file with metadata. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Form data with policy file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + policyFile: + type: string + format: binary + metadata: + type: string + format: binary responses: '200': description: Successful operation. @@ -5995,14 +6153,7 @@ paths: schema: type: array items: - type: object - properties: - createDate: - type: string - documentURL: - type: string - document: - type: object + $ref: '#/components/schemas/PolicyDTO' '401': description: Unauthorized. '403': @@ -6012,46 +6163,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/multiple: - post: - tags: - - policies - description: >- - Creates a link between the current policy and the main policy. Or - creates a group making the current policy the main one. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Creates Multi policy config. + /policies/push/import/file: + post: + operationId: PolicyApi_importPolicyFromFileAsync + summary: Imports new policy from a zip file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. parameters: - - in: path - name: policyId + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 schema: type: string - required: true - description: Policy ID. + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean requestBody: - description: Multi policy config. required: true + description: A zip file containing policy config. content: application/json: schema: - type: object - required: - - mainPolicyTopicId - - synchronizationTopicId - properties: - mainPolicyTopicId: - type: string - synchronizationTopicId: - type: string + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/MultiPolicyConfig' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -6061,28 +6213,54 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - get: - tags: - - policies - description: Requests Multi policy config. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Requests Multi policy config. + /policies/push/import/file-metadata: + post: + operationId: PolicyApi_importPolicyFromFileWithMetadataAsync + summary: Imports new policy from a zip file with metadata. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. parameters: - - in: path - name: policyId + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 schema: type: string - required: true - description: Policy ID. + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Form data with policy file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + policyFile: + type: string + format: binary + metadata: + type: string + format: binary responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/MultiPolicyConfig' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -6092,49 +6270,69 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/methodologies/categories: - get: - operationId: PolicyApi_getPolicyCategoriesAsync - summary: Get all categories - description: Get all categories + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/file/preview: + post: + operationId: PolicyApi_importPolicyFromFilePreview + summary: Policy preview from a zip file. + description: >- + Previews the policy from a zip file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. parameters: [] + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string responses: '200': - description: Successful operation. + description: Policy preview. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/PolicyCategoryDTO' + $ref: '#/components/schemas/PolicyPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - /policies/methodologies/search: + tags: *ref_11 + security: + - bearer: [] + /policies/import/xlsx: post: - operationId: PolicyApi_getPoliciesByCategory - summary: Get filtered policies - description: Get policies by categories and text - parameters: [] + operationId: PolicyApi_importPolicyFromXlsx + summary: Imports new policy from a xlsx file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided xlsx file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string requestBody: required: true - description: Filters + description: A xlsx file containing policy config. content: application/json: schema: type: string - examples: - Filter1: - value: - categoryIds: - - '000000000000000000000001' - - '000000000000000000000002' - text: abc responses: '200': description: Successful operation. @@ -6142,35 +6340,49 @@ paths: application/json: schema: type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - /schema/{schemaId}: - get: - tags: - - schema - description: Returns schema by schema ID. + tags: *ref_11 security: - bearer: [] - summary: Returns schema by schema ID. + /policies/push/import/xlsx: + post: + operationId: PolicyApi_importPolicyFromXlsxAsync + summary: Imports new policy from a xlsx file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided xlsx file into the local DB. Only users with the + Standard Registry role are allowed to make the request. parameters: - - in: path - name: schemaId + - name: policyId + required: true + in: query + description: Policy Id + example: '000000000000000000000001' schema: type: string - required: true - description: Schema ID. + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -6180,28 +6392,33 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schema/{schemaId}/parents: - get: - operationId: SingleSchemaApi_getSchemaParents - summary: Returns all parent schemas. - description: Returns all parent schemas. - parameters: - - name: schemaId - required: true - in: path - description: Schema identifier - schema: - type: string + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/xlsx/preview: + post: + operationId: PolicyApi_importPolicyFromXlsxPreview + summary: Policy preview from a xlsx file. + description: >- + Previews the policy from a xlsx file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' + type: object '401': description: Unauthorized. '403': @@ -6212,39 +6429,58 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_8 - - schema + tags: *ref_11 security: - bearer: [] - - bearer: [] - /schema/{schemaId}/tree: + /policies/{policyId}/dry-run/users: get: - operationId: SingleSchemaApi_getSchemaTree - summary: Returns schema tree. - description: Returns schema tree. + operationId: PolicyApi_getDryRunUsers + summary: Returns virtual users. + description: >- + Returns virtual users. Only users with the Standard Registry role are + allowed to make the request. parameters: - - name: schemaId + - name: policyId required: true in: path - description: Schema identifier + description: Policy Id + example: '000000000000000000000001' schema: type: string responses: '200': - description: Successful operation. + description: Virtual users. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. content: application/json: schema: - type: object - properties: - name: - type: string - type: - type: string - children: - type: array - items: - type: object + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/user: + post: + operationId: PolicyApi_setDryRunUser + summary: Creates virtual users. + description: >- + Creates virtual users. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Virtual users. '401': description: Unauthorized. '403': @@ -6255,53 +6491,34 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - - bearer: [] - /schemas: - get: - tags: - - schemas - description: Returns all schemas. + tags: *ref_11 security: - bearer: [] - summary: Returns all schemas. + /policies/{policyId}/dry-run/login: + post: + operationId: PolicyApi_loginDryRunUser + summary: Change active virtual user. + description: >- + Change active virtual user. Only users with the Standard Registry role + are allowed to make the request. parameters: - - in: query - name: pageIndex + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 + type: string + requestBody: + required: true + description: Credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/Object' responses: '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' + description: Virtual users. '401': description: Unauthorized. '403': @@ -6311,38 +6528,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/{topicId}: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/restart: post: - tags: - - schemas + operationId: PolicyApi_restartDryRun + summary: Clear dry-run state. description: >- - Creates new schema. Only users with the Standard Registry role are + Clear dry-run state. Only users with the Standard Registry role are allowed to make the request. parameters: - - in: path - name: topicId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - security: - - bearer: [] - summary: Create new schema. requestBody: - description: Object that contains a valid schema. required: true + description: . content: application/json: schema: - $ref: '#/components/schemas/Schema' + type: string responses: - '201': - description: Created. + '200': + description: . '401': description: Unauthorized. '403': @@ -6352,50 +6566,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - get: - tags: - - schemas - description: Returns all schemas by topicId. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Returns all schemas by topicId. + /policies/{policyId}/dry-run/transactions: + get: + operationId: PolicyApi_getDryRunTransactions + summary: Get dry-run details (Transactions). + description: >- + Get dry-run details (Transactions). Only users with the Standard + Registry role are allowed to make the request. parameters: - - in: path - name: topicId - schema: - type: string + - name: policyId required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - - in: query - name: pageIndex + in: path + description: Policy Id + example: '000000000000000000000001' schema: - type: integer + type: string + - name: pageIndex + required: false + in: query description: >- The number of pages to skip before starting to collect the result set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 + example: 20 + schema: + type: number responses: '200': - description: Successful operation. + description: Transactions. headers: - x-total-count: + X-Total-Count: schema: type: integer description: Total items in the collection. @@ -6404,7 +6614,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Schema' + type: object '401': description: Unauthorized. '403': @@ -6414,26 +6624,55 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/type/{schemaType}: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/artifacts: get: - operationId: SchemaApi_getSchemaByType - summary: Finds the schema using the json document type. - description: Finds the schema using the json document type. + operationId: PolicyApi_getDryRunArtifacts + summary: Get dry-run details (Artifacts). + description: >- + Get dry-run details (Artifacts). Only users with the Standard Registry + role are allowed to make the request. parameters: - - name: schemaType + - name: policyId required: true in: path - description: Type + description: Policy Id + example: '000000000000000000000001' schema: type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': - description: Successful operation. + description: Artifacts. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: - $ref: '#/components/schemas/SchemaDTO' + type: array + items: + type: object '401': description: Unauthorized. '403': @@ -6444,28 +6683,54 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_9 - - schemas + tags: *ref_11 security: - bearer: [] - - bearer: [] - /schemas/list/all: + /policies/{policyId}/dry-run/ipfs: get: - operationId: SchemaApi_getAll - summary: Returns a list of schemas. + operationId: PolicyApi_getDryRunIpfs + summary: Get dry-run details (Files). description: >- - Returns a list of schemas. Only users with the Standard Registry role + Get dry-run details (Files). Only users with the Standard Registry role are allowed to make the request. - parameters: [] + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 20 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': - description: Successful operation. + description: Files. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + type: object '401': description: Unauthorized. '403': @@ -6476,39 +6741,27 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_11 security: - bearer: [] - - bearer: [] - /schemas/list/sub: + /policies/{policyId}/multiple: get: - operationId: SchemaApi_getSub - summary: Returns a list of schemas. + operationId: PolicyApi_getMultiplePolicies + summary: Requests policy links. description: >- - Returns a list of schemas. Only users with the Standard Registry role + Requests policy links. Only users with a role that described in block are allowed to make the request. parameters: - - name: category - required: false - in: query - description: Schema category - schema: - type: string - - name: topicId - required: false - in: query - description: Topic Id + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -6519,32 +6772,33 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_11 security: - bearer: [] - - bearer: [] - /schemas/push/copy: post: - operationId: SchemaApi_copySchemaAsync - summary: Copy schema. + operationId: PolicyApi_setMultiplePolicies + summary: Creates policy link. description: >- - Copy schema. Only users with the Standard Registry role are allowed to - make the request. - parameters: [] + Creates policy link. Only users with a role that described in block are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string requestBody: required: true - description: Object that contains a valid schema. + description: '' content: application/json: schema: - type: string + $ref: '#/components/schemas/Object' responses: '200': description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -6555,45 +6809,46 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_11 security: - bearer: [] - - bearer: [] - /schemas/push/{topicId}: + /policies/{policyId}/test: post: - tags: - - schemas + operationId: PolicyApi_addPolicyTest + summary: Add policy test. description: >- - Creates new schema. Only users with the Standard Registry role are - allowed to make the request. - security: - - bearer: [] - summary: Create new schema. + Add policy test. Only users with the Standard Registry role are allowed + to make the request. parameters: - - in: path - name: topicId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 requestBody: - description: Object that contains a valid schema. required: true + description: Form data with tests. content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/Schema' + type: array + items: + type: object + properties: + tests: + type: string + format: binary responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + type: array + items: + $ref: '#/components/schemas/PolicyTestDTO' '401': description: Unauthorized. '403': @@ -6603,40 +6858,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/{schemaId}: - put: - tags: - - schemas + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}: + get: + operationId: PolicyApi_getPolicyTest + summary: Get policy test. description: >- - Updates the schema with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. + Get policy test. Only users with the Standard Registry role are allowed + to make the request. parameters: - - in: path - name: schemaId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string + - name: testId required: true - description: Schema ID. - security: - - bearer: [] - summary: Updates the schema. - requestBody: - description: Object that contains a valid schema. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/PolicyTestDTO' '401': description: Unauthorized. '403': @@ -6646,32 +6900,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] delete: - tags: - - schemas + operationId: PolicyApi_deletePolicyTest + summary: Delete policy test. description: >- - Deletes the schema with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. + Delete policy test. Only users with the Standard Registry role are + allowed to make the request. parameters: - - in: path - name: schemaId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string + - name: testId required: true - description: Schema ID. - security: - - bearer: [] - summary: Deletes the schema. + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Schema' + type: boolean '401': description: Unauthorized. '403': @@ -6681,45 +6941,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/{schemaId}/publish: - put: - tags: - - schemas + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}/start: + post: + operationId: PolicyApi_startPolicyTest + summary: Start policy test. description: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - Only users with the Standard Registry role are allowed to make the - request. + Start policy test. Only users with the Standard Registry role are + allowed to make the request. parameters: - - in: path - name: schemaId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string + - name: testId required: true - description: Schema ID. - security: - - bearer: [] - summary: Publishes the schema. - requestBody: - description: Object that contains policy version. - required: true - content: - application/json: - schema: - type: object - properties: - version: - type: string + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/PolicyTestDTO' '401': description: Unauthorized. '403': @@ -6729,45 +6983,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/push/{schemaId}/publish: - put: - tags: - - schemas - description: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - Only users with the Standard Registry role are allowed to make the - request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. + /policies/{policyId}/test/{testId}/stop: + post: + operationId: PolicyApi_stopPolicyTest + summary: Stop policy test. + description: >- + Stop policy test. Only users with the Standard Registry role are + allowed to make the request. parameters: - - in: path - name: schemaId + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' schema: type: string + - name: testId required: true - description: Schema ID. - requestBody: - description: Object that contains policy version. - required: true - content: - application/json: - schema: - type: object - properties: - version: - type: string + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/PolicyTestDTO' '401': description: Unauthorized. '403': @@ -6777,38 +7025,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/import/message/preview: - post: - tags: - - schemas - description: >- - Previews the schema from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Schema preview from IPFS. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the schema. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string + /policies/{policyId}/test/{testId}/details: + get: + operationId: PolicyApi_getTestDetails + summary: Get test details. + description: >- + Get test details. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/RunningDetailsDTO' '401': description: Unauthorized. '403': @@ -6818,64 +7067,52 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/push/import/message/preview: - post: - tags: - - schemas - description: >- - Previews the schema from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 security: - bearer: [] - summary: Schema preview from IPFS. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the schema. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string + /policies/methodologies/categories: + get: + operationId: PolicyApi_getPolicyCategoriesAsync + summary: Get all categories + description: Get all categories + parameters: [] responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. + type: array + items: + $ref: '#/components/schemas/PolicyCategoryDTO' '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/import/file/preview: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + /policies/methodologies/search: post: - tags: - - schemas - description: >- - Previews the schema from a zip file. Only users with the Standard - Registry role are allowed to make the request. - security: - - bearer: [] - summary: Schema preview from a zip file. + operationId: PolicyApi_getPoliciesByCategory + summary: Get filtered policies + description: Get policies by categories and text + parameters: [] requestBody: - description: A zip file containing the schema to be viewed. required: true + description: Filters content: - binary/octet-stream: + application/json: schema: type: string - format: binary + examples: + Filter1: + value: + categoryIds: + - '000000000000000000000001' + - '000000000000000000000001' + text: abc responses: '200': description: Successful operation. @@ -6884,59 +7121,36 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. + $ref: '#/components/schemas/PolicyDTO' '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/{topicId}/import/message: - post: - tags: - - schemas + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + /schema/{schemaId}: + get: + operationId: SingleSchemaApi_getSchema + summary: Returns schema by schema ID. description: >- - Imports new schema from IPFS into the local DB. Only users with the - Standard Registry role are allowed to make the request. + Returns schema by schema ID. Only users with the Standard Registry role + are allowed to make the request. parameters: - - in: path - name: topicId + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' schema: type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - security: - - bearer: [] - summary: Imports new schema from IPFS. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the schema. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string responses: - '201': - description: Created. + '200': + description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -6946,47 +7160,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/push/{topicId}/import/message: - post: - tags: - - schemas - description: >- - Imports new schema from IPFS into the local DB. Only users with the - Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_12 + - schema security: - bearer: [] - summary: Imports new schema from IPFS. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the schema. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string + /schema/{schemaId}/parents: + get: + operationId: SingleSchemaApi_getSchemaParents + summary: Returns all parent schemas. + description: Returns all parent schemas. parameters: - - in: path - name: topicId + - name: schemaId + required: true + in: path + description: Schema identifier schema: type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -6996,45 +7195,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/{topicId}/import/file: - post: - tags: - - schemas - description: >- - Imports new schema from a zip file into the local DB. Only users with - the Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + /schema/{schemaId}/tree: + get: + operationId: SingleSchemaApi_getSchemaTree + summary: Returns schema tree. + description: Returns schema tree. parameters: - - in: path - name: topicId + - name: schemaId + required: true + in: path + description: Schema identifier schema: type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - security: - - bearer: [] - summary: Imports new schema from a zip file. - requestBody: - description: A zip file containing schema to be imported. - content: - binary/octet-stream: - schema: - type: string - format: binary - required: true responses: - '201': - description: Created. + '200': + description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Schema' + type: object + properties: + name: + type: string + type: + type: string + children: + type: array + items: + type: object '401': description: Unauthorized. '403': @@ -7044,43 +7236,81 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/push/{topicId}/import/file: - post: - tags: - - schemas - description: >- - Imports new schema from a zip file into the local DB. Only users with - the Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 security: - bearer: [] - summary: Imports new schema from a zip file. - requestBody: - description: A zip file containing schema to be imported. - content: - binary/octet-stream: - schema: - type: string - format: binary - required: true + /schemas: + get: + operationId: SchemaApi_getSchemasPageV2 + summary: Return a list of all schemas. + description: Returns all schemas. parameters: - - in: path - name: topicId + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: policyId + required: false + in: query + description: Policy id + example: '000000000000000000000001' + schema: + type: string + - name: moduleId + required: false + in: query + description: Module id + example: '000000000000000000000001' + schema: + type: string + - name: toolId + required: false + in: query + description: Tool id + example: '000000000000000000000001' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic id + example: 0.0.1 schema: type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 responses: - '202': + '200': description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: - $ref: '#/components/schemas/Task' + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7090,32 +7320,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/{schemaId}/export/message: - post: - tags: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_13 - schemas - description: >- - Returns Hedera message IDs of the published schemas, these messages - contain IPFS CIDs of these schema files. Only users with the Standard - Registry role are allowed to make the request. security: - bearer: [] - summary: List Hedera message IDs of published schemas. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Selected schema ID. + put: + operationId: SchemaApi_setSchema + summary: Updates the schema. + description: >- + Updates the schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ExportSchema' + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7125,27 +7357,60 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/{schemaId}/export/file: - post: - tags: - - schemas - description: >- - Returns schema files for the schemas. Only users with the Standard - Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Return zip file with schemas. + /schemas/{topicId}: + get: + operationId: SchemaApi_getSchemasPageByTopicId + summary: Return a list of all schemas. + description: Returns all schemas. parameters: - - in: path - name: schemaId + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: category + required: false + in: query + description: Schema category + example: POLICY schema: type: string - required: true - description: Selected schema ID. responses: '200': - description: Successful operation. Response zip file + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7155,34 +7420,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/system/{username}: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] post: - tags: - - schemas + operationId: SchemaApi_createNewSchema + summary: Creates a new schema. description: >- - Creates new system schema. Only users with the Standard Registry role - are allowed to make the request. + Creates a new schema. Only users with the Standard Registry role are + allowed to make the request. parameters: - - in: path - name: username + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 schema: type: string - required: true - description: Username. - security: - - bearer: [] - summary: Creates new system schema. requestBody: - description: Object that contains a valid schema. required: true + description: Object that contains a valid schema. content: application/json: schema: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/SchemaDTO' responses: - '201': - description: Created. + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7192,57 +7463,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - get: - tags: - - schemas - description: >- - Returns all system schemas by username. Only users with the Standard - Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Returns all system schemas by username. + /schemas/type/{schemaType}: + get: + operationId: SchemaApi_getSchemaByType + summary: Finds the schema using the json document type. + description: Finds the schema using the json document type. parameters: - - in: path - name: username - schema: - type: string + - name: schemaType required: true - description: Username. - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set. - examples: - pageIndex: - summary: Example of a pageIndex. - value: 0 - - in: query - name: pageSize + in: path + description: Type schema: - type: integer - description: The number of items to return. - examples: - pageSize: - summary: Example of a pageSize. - value: 100 + type: string responses: '200': description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total number of items in the collection. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7252,31 +7495,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/system/{schemaId}: - put: - tags: - - schemas - description: >- - Updates the system schema with the provided schema ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Updates the schema. - requestBody: - description: Object that contains a valid schema. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' + /schemas/list/all: + get: + operationId: SchemaApi_getAll + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] responses: '200': description: Successful operation. @@ -7285,7 +7515,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7295,23 +7525,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - delete: - tags: - - schemas + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/list/sub: + get: + operationId: SchemaApi_getSub + summary: Returns a list of schemas. description: >- - Deletes the system schema with the provided schema ID. Only users with - the Standard Registry role are allowed to make the request. + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. parameters: - - in: path - name: schemaId + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: topicId + required: false + in: query + description: Topic Id + example: 0.0.1 schema: type: string - required: true - description: Schema ID. - security: - - bearer: [] - summary: Deletes the schema. responses: '200': description: Successful operation. @@ -7320,7 +7559,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7330,35 +7569,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/system/{schemaId}/active: - put: - tags: - - schemas + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/schema-with-sub-schemas: + get: + operationId: SchemaApi_getSchemaWithSubSchemas + summary: Returns a list of schemas. description: >- - Makes the selected scheme active. Other schemes of the same type become - inactive. Only users with the Standard Registry role are allowed to make - the request. + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. parameters: - - in: path - name: schemaId + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: topicId + required: false + in: query + description: Topic Id + example: 0.0.1 schema: type: string + - name: schemaId required: true - description: Schema ID. - security: - - bearer: [] - summary: Publishes the schema. - requestBody: - description: Object that contains policy version. - required: true - content: - application/json: - schema: - type: object - properties: - version: - type: string + in: query + schema: + type: string responses: '200': description: Successful operation. @@ -7367,7 +7608,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7377,36 +7618,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/system/entity/{schemaEntity}: - get: - tags: - - schemas - description: Finds the schema using the schema type. - parameters: - - in: path - name: schemaEntity - schema: - type: string - enum: - - STANDARD_REGISTRY - - USER - - POLICY - - MINT_TOKEN - - WIPE_TOKEN - - MINT_NFTOKEN - required: true - description: schema type. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Returns schema by schema type. + /schemas/push/copy: + post: + operationId: SchemaApi_copySchemaAsync + summary: Copy schema. + description: >- + Copy schema. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -7416,31 +7653,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /schemas/{schemaId}/export/xlsx: - get: - operationId: SchemaApi_getPolicyExportXlsx - summary: Return schemas in a xlsx file format for the specified policy. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}: + post: + operationId: SchemaApi_createNewSchemaAsync + summary: Creates a new schema. description: >- - Returns a xlsx file containing schemas. Only users with the Standard - Registry role are allowed to make the request. + Creates a new schema. Only users with the Standard Registry role are + allowed to make the request. parameters: - - name: schemaId + - name: topicId required: true in: path - description: Schema ID + description: Topic Id + example: 0.0.1 schema: type: string + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' responses: '200': description: Successful operation. content: application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -7449,40 +7696,35 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_13 security: - bearer: [] - - bearer: [] - /schemas/{topicId}/import/xlsx: - post: - operationId: SchemaApi_importPolicyFromXlsx - summary: Imports new schema from a xlsx file into the local DB. + /schemas/{schemaId}: + delete: + operationId: SchemaApi_deleteSchema + summary: Deletes the schema with the provided schema ID. description: >- - Imports new schema from a xlsx file into the local DB. Only users with - the Standard Registry role are allowed to make the request. + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. parameters: - - name: topicId + - name: schemaId required: true in: path - description: Topic Id + description: Schema ID + example: '000000000000000000000001' schema: type: string - requestBody: - required: true - description: A xlsx file containing schema config. - content: - application/json: - schema: - type: string responses: '200': description: Successful operation. content: application/json: schema: - type: object + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -7491,40 +7733,53 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_13 security: - bearer: [] - - bearer: [] - /schemas/push/{topicId}/import/xlsx: - post: - operationId: SchemaApi_importPolicyFromXlsxAsync - summary: Imports new schema from a xlsx file into the local DB. + /schemas/{schemaId}/publish: + put: + operationId: SchemaApi_publishSchema + summary: Publishes the schema with the provided schema ID. description: >- - Imports new schema from a xlsx file into the local DB. Only users with - the Standard Registry role are allowed to make the request. + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. parameters: - - name: topicId + - name: schemaId required: true in: path - description: Topic Id + description: Schema ID + example: '000000000000000000000001' schema: type: string requestBody: required: true - description: A xlsx file containing schema config. + description: Object that contains version. content: application/json: schema: - type: string + $ref: '#/components/schemas/VersionSchemaDTO' + examples: + Version: + value: + version: 1.0.0 responses: '200': description: Successful operation. - content: - application/json: + headers: + X-Total-Count: schema: - type: object + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -7533,34 +7788,46 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_13 security: - bearer: [] - - bearer: [] - /schemas/import/xlsx/preview: - post: - operationId: SchemaApi_importPolicyFromXlsxPreview - summary: Previews the schema from a xlsx file. + /schemas/push/{schemaId}/publish: + put: + operationId: SchemaApi_publishSchemaAsync + summary: Publishes the schema with the provided schema ID. description: >- - Previews the schema from a xlsx file. Only users with the Standard - Registry role are allowed to make the request. - parameters: [] + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string requestBody: required: true - description: A xlsx file containing schema config. + description: Object that contains version. content: application/json: schema: - type: string + $ref: '#/components/schemas/VersionSchemaDTO' + examples: + Version: + value: + version: 1.0.0 responses: '200': description: Successful operation. content: application/json: schema: - type: object + $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -7569,28 +7836,39 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_13 security: - bearer: [] - - bearer: [] - /schemas/export/template: - get: - operationId: SchemaApi_exportTemplate - summary: Returns a list of schemas. + /schemas/import/message/preview: + post: + operationId: SchemaApi_importFromMessagePreview + summary: Previews the schema from IPFS without loading it into the local DB. description: >- - Returns a list of schemas. Only users with the Standard Registry role - are allowed to make the request. + Previews the schema from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. parameters: [] + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' responses: '200': description: Successful operation. content: application/json: schema: - type: string - format: binary + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -7599,47 +7877,35 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_13 security: - bearer: [] - - bearer: [] - /settings: - get: - tags: - - settings + /schemas/push/import/message/preview: + post: + operationId: SchemaApi_importFromMessagePreviewAsync + summary: Previews the schema from IPFS without loading it into the local DB. description: >- - Returns current settings. For users with the Standard Registry role - only. - security: - - bearer: [] - summary: Returns current settings. + Previews the schema from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/CommonSettings' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - tags: - - settings - description: Set settings. For users with the Standard Registry role only. - security: - - bearer: [] - summary: Set settings. - responses: - '201': - description: Created. + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -7649,123 +7915,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CommonSettings' - /settings/environment: - get: - tags: - - settings - description: Returns current environment name. - security: - - bearer: [] - summary: Returns current environment name. - responses: - '200': - description: Successful operation. - content: - text/plain: - schema: - type: string - example: testnet - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /settings/about: - get: - operationId: SettingsApi_getAbout - parameters: [] - responses: - '401': - description: Unauthorized - tags: - - settings + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - /tags: + /schemas/import/file/preview: post: - operationId: TagsApi_setTags + operationId: SchemaApi_importFromFilePreview + summary: Previews the schema from a zip file. + description: >- + Previews the schema from a zip file. Only users with the Standard + Registry role are allowed to make the request. parameters: [] - responses: - '401': - description: Unauthorized - tags: - - tags - security: - - bearer: [] - /tags/search: - post: - tags: - - tags - description: Search tags. - security: - - bearer: [] requestBody: - description: Object that contains filters. required: true + description: A zip file containing schema to be imported. content: application/json: schema: - oneOf: - - type: object - required: - - entity - - target - properties: - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - target: - type: string - - type: object - required: - - entity - - targets - properties: - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - targets: - type: array - items: - type: string - examples: - Single: - value: - entity: PolicyDocument - target: targetId1 - Multiple: - value: - entity: PolicyDocument - targets: - - targetId1 - - targetId2 - summary: Search tags. + type: string responses: '200': description: Successful operation. content: application/json: schema: - description: a (targetId, Tags) map. `targetId1` is an example key - properties: - targetId1: - $ref: '#/components/schemas/TagMap' - additionalProperties: - $ref: '#/components/schemas/TagMap' + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7775,30 +7952,50 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tags/{uuid}: - delete: - tags: - - tags - description: Delete tag. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Delete tag. + /schemas/{topicId}/import/message: + post: + operationId: SchemaApi_importFromMessage + summary: Imports new schema from IPFS into the local DB. + description: >- + Imports new schema from IPFS into the local DB. Only users with the + Standard Registry role are allowed to make the request. parameters: - - in: path - name: uuid + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 schema: type: string - example: 00000000-0000-0000-0000-000000000000 - required: true - description: Tag identifier + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' responses: '200': description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: - type: boolean + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7808,46 +8005,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tags/synchronization: - post: - tags: - - tags - description: synchronization. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] + /schemas/push/{topicId}/import/message: + post: + operationId: SchemaApi_importFromMessageAsync + summary: Imports new schema from IPFS into the local DB. + description: >- + Imports new schema from IPFS into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string requestBody: - description: Object that contains filters. required: true + description: Object that contains version. content: application/json: schema: - type: object - required: - - entity - - target - properties: - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - target: - type: string - example: targetId - summary: synchronization. + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TagMap' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -7857,41 +8051,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tags/schemas: - get: - tags: - - tags - description: Returns all schema. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Returns all schemas. + /schemas/{topicId}/import/file: + post: + operationId: SchemaApi_importToTopicFromFile + summary: Imports new schema from a zip file into the local DB. + description: >- + Imports new schema from a zip file into the local DB. Only users with + the Standard Registry role are allowed to make the request. parameters: - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A zip file containing schema to be imported. + content: + application/json: + schema: + type: string responses: '200': description: Successful operation. headers: - x-total-count: + X-Total-Count: schema: type: integer description: Total items in the collection. @@ -7900,7 +8090,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -7910,30 +8100,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - post: - tags: - - tags - description: >- - Creates new schema. Only users with the Standard Registry role are - allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Creates new schema. + /schemas/push/{topicId}/import/file: + post: + operationId: SchemaApi_importToTopicFromFileAsync + summary: Imports new schema from a zip file into the local DB. + description: >- + Imports new schema from a zip file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string requestBody: - description: Object that contains a valid schema. required: true + description: A zip file containing schema to be imported. content: application/json: schema: - $ref: '#/components/schemas/Schema' + type: string responses: - '201': - description: Created. + '200': + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -7943,31 +8142,33 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tags/schemas/{schemaId}: - delete: - tags: - - tags - description: >- - Deletes the schema with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Delete the schema. + /schemas/{schemaId}/export/message: + get: + operationId: SchemaApi_exportMessage + summary: Returns Hedera message IDs of the published schemas. + description: >- + Returns Hedera message IDs of the published schemas, these messages + contain IPFS CIDs of these schema files. Only users with the Standard + Registry role are allowed to make the request. parameters: - - in: path - name: schemaId + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' schema: type: string - required: true - description: Schema ID. responses: '200': description: Successful operation. content: application/json: schema: - type: boolean + $ref: '#/components/schemas/ExportSchemaDTO' '401': description: Unauthorized. '403': @@ -7977,39 +8178,69 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - put: - tags: - - tags + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/export/file: + get: + operationId: SchemaApi_exportToFile + summary: Returns schema files for the schema. description: >- - Updates the schema with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. + Returns schema files for the schema. Only users with the Standard + Registry role are allowed to make the request. parameters: - - in: path - name: schemaId + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' schema: type: string - required: true - description: Schema ID. + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Updates the schema. + /schemas/system/{username}: + post: + operationId: SchemaApi_postSystemSchema + summary: Creates a new system schema. + description: >- + Creates a new system schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: username + required: true + in: path + description: username + example: username + schema: + type: string requestBody: - description: Object that contains a valid schema. required: true content: application/json: schema: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/SystemSchemaDTO' responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -8019,35 +8250,54 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tags/schemas/{schemaId}/publish: - put: - tags: - - tags + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + get: + operationId: SchemaApi_getSystemSchemaV2 + summary: Return a list of all system schemas. description: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - Only users with the Standard Registry role are allowed to make the - request. + Returns all system schemas. Only users with the Standard Registry role + are allowed to make the request. parameters: - - in: path - name: schemaId + - name: username + required: true + in: path + description: username + example: username schema: type: string - required: true - description: Schema ID. - security: - - bearer: [] - summary: Publishes the schema. + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: type: array items: - $ref: '#/components/schemas/Schema' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -8057,24 +8307,28 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tags/schemas/published: - get: - tags: - - tags - description: Return a list of all published schemas. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Return a list of all published schemas. + /schemas/system/{schemaId}: + delete: + operationId: SchemaApi_deleteSystemSchema + summary: Deletes the system schema with the provided schema ID. + description: >- + Deletes the system schema with the provided schema ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -8084,29 +8338,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tasks/{taskId}: - get: - tags: - - tasks - description: Returns task statuses by Id. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Returns task statuses. + put: + operationId: SchemaApi_setSystemSchema + summary: Updates the system schema. + description: >- + Updates the system schema. Only users with the Standard Registry role + are allowed to make the request. parameters: - - in: path - name: taskId + - name: schemaId + required: true + in: path + description: Schema ID + example: 0.0.1 schema: type: string - required: true - description: Task ID. + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskStatus' + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -8116,35 +8381,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens: - get: - tags: - - tokens - description: >- - Returns all tokens. For the Standard Registry role it returns only the - list of tokens, for other users it also returns token balances as well - as the KYC, Freeze, and Association statuses. Not allowed for the - Auditor role. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Return a list of tokens. + /schemas/system/{schemaId}/active: + put: + operationId: SchemaApi_activeSystemSchema + summary: >- + Makes the selected scheme active. Other schemes of the same type become + inactive + description: >- + Makes the selected scheme active. Other schemes of the same type become + inactive Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: array - items: - allOf: - - $ref: '#/components/schemas/TokenInfo' - - type: object - properties: - policies: - type: array - items: - type: string '401': description: Unauthorized. '403': @@ -8154,45 +8415,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - post: - tags: - - tokens - description: >- - Creates a new token. Only users with the Standard Registry role are - allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Creates a new token. - requestBody: - description: Object that contains token information. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Token' - responses: - '201': - description: Created. - content: - application/json: - schema: - type: array - items: - allOf: - - $ref: '#/components/schemas/TokenInfo' - - type: object - properties: - policies: - type: array - items: - type: string - '400': - description: Bad Request. + /schemas/system/entity/{schemaEntity}: + get: + operationId: SchemaApi_getSchemaEntity + summary: Finds the schema using the schema type. + description: Finds the schema using the schema type. + parameters: + - name: schemaEntity + required: true + in: path + description: Entity name + example: STANDARD_REGISTRY + schema: + type: string + enum: + - STANDARD_REGISTRY + - USER + - POLICY + - MINT_TOKEN + - WIPE_TOKEN + - MINT_NFTOKEN + responses: + '200': + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -8202,31 +8455,33 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/push: - post: - tags: - - tokens - description: >- - Creates a new token. Only users with the Standard Registry role are - allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Creates a new token. - requestBody: - description: Object that contains token information. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Token' + /schemas/{schemaId}/export/xlsx: + get: + operationId: SchemaApi_getPolicyExportXlsx + summary: Return schemas in a xlsx file format for the specified policy. + description: >- + Returns a xlsx file containing schemas. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + type: string + format: binary '401': description: Unauthorized. '403': @@ -8236,45 +8491,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}: - delete: - operationId: TokensApi_deleteTokenAsync - parameters: - - name: tokenId - required: true - in: path - description: Token identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '401': - description: Unauthorized - tags: &ref_10 - - tokens + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - /tokens/{tokenId}/associate: - put: - tags: - - tokens + /schemas/{topicId}/import/xlsx: + post: + operationId: SchemaApi_importPolicyFromXlsx + summary: Imports new schema from a xlsx file into the local DB. description: >- - Associates the user with the provided Hedera token. Only users with the - Installer role are allowed to make the request. + Imports new schema from a xlsx file into the local DB. Only users with + the Standard Registry role are allowed to make the request. parameters: - - in: path - name: tokenId + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 schema: type: string - required: true - description: Token ID. - security: - - bearer: [] - summary: Associates the user with the provided Hedera token. + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + type: object '401': description: Unauthorized. '403': @@ -8284,31 +8533,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/associate: - put: - tags: - - tokens - description: >- - Associates the user with the provided Hedera token. Only users with the - Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Associates the user with the provided Hedera token. + /schemas/push/{topicId}/import/xlsx: + post: + operationId: SchemaApi_importPolicyFromXlsxAsync + summary: Imports new schema from a xlsx file into the local DB. + description: >- + Imports new schema from a xlsx file into the local DB. Only users with + the Standard Registry role are allowed to make the request. parameters: - - in: path - name: tokenId + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 schema: type: string - required: true - description: Token ID. + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + type: object '401': description: Unauthorized. '403': @@ -8318,27 +8575,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/dissociate: - put: - tags: - - tokens - description: >- - Disassociates the user with the provided Hedera token. Only users with - the Installer role are allowed to make the request. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Associate the user with the provided Hedera token. + /schemas/import/xlsx/preview: + post: + operationId: SchemaApi_importPolicyFromXlsxPreview + summary: Previews the schema from a xlsx file. + description: >- + Previews the schema from a xlsx file. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string responses: - '202': + '200': description: Successful operation. + content: + application/json: + schema: + type: object '401': description: Unauthorized. '403': @@ -8348,31 +8610,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/dissociate: - put: - tags: - - tokens - description: >- - Disassociates the user with the provided Hedera token. Only users with - the Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Disassociates the user with the provided Hedera token. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. + /schemas/export/template: + get: + operationId: SchemaApi_exportTemplate + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + type: string + format: binary '401': description: Unauthorized. '403': @@ -8382,43 +8639,54 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/{username}/grant-kyc: - put: - tags: - - tokens - description: >- - Sets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 security: - bearer: [] - summary: Sets the KYC flag for the user. + /settings: + post: + operationId: SettingsApi_updateSettings + summary: Set settings. + description: Set settings. For users with the Standard Registry role only. + parameters: [] + requestBody: + required: true + description: Settings. + content: + application/json: + schema: + $ref: '#/components/schemas/SettingsDTO' responses: '200': description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/TokenInfo' - '400': - description: Bad Request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_14 + - settings + security: + - bearer: [] + get: + operationId: SettingsApi_getSettings + summary: Returns current settings. + description: >- + Returns current settings. For users with the Standard Registry role + only. + parameters: [] + responses: + '200': + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/SettingsDTO' '401': description: Unauthorized. '403': @@ -8428,37 +8696,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/{username}/grant-kyc: - put: - tags: - - tokens - description: >- - Sets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 security: - bearer: [] - summary: Sets the KYC flag for the user. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. + /settings/environment: + get: + operationId: SettingsApi_getEnvironment + summary: Returns current environment name. + description: Returns current environment name. + parameters: [] responses: - '202': + '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Task' + type: string '401': description: Unauthorized. '403': @@ -8468,43 +8722,52 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/{username}/revoke-kyc: - put: - tags: - - tokens - description: >- - Unsets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 security: - bearer: [] - summary: Unsets the KYC flag for the user. + /settings/about: + get: + operationId: SettingsApi_getAbout + summary: Returns package version. + description: Returns package version. For users with the Standard Registry role only. + parameters: [] responses: '200': description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/TokenInfo' - '400': - description: Bad Request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearer: [] + /tags: + post: + operationId: TagsApi_setTags + summary: Creates new tag. + description: Creates new tag. + parameters: [] + requestBody: + required: true + description: Object that contains tag information. + content: + application/json: + schema: + $ref: '#/components/schemas/TagDTO' + responses: + '200': + description: Created tag. content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/TagDTO' '401': description: Unauthorized. '403': @@ -8514,37 +8777,42 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/{username}/revoke-kyc: - put: - tags: - - tokens - description: >- - Unsets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_15 + - tags security: - bearer: [] - summary: Unsets the KYC flag for the user. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. + /tags/search: + post: + operationId: TagsApi_searchTags + summary: Search tags. + description: Search tags. + parameters: [] + requestBody: + required: true + description: Object that contains filters + content: + application/json: + schema: + $ref: '#/components/schemas/TagFilterDTO' + examples: + Single: + value: + entity: PolicyDocument + target: '0000000000.000000001' + Multiple: + value: + entity: PolicyDocument + targets: + - '0000000000.000000001' + - '0000000000.000000001' responses: - '202': - description: Successful operation. + '200': + description: Created tag. content: application/json: schema: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/TagMapDTO' '401': description: Unauthorized. '403': @@ -8554,43 +8822,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/{username}/freeze: - put: - tags: - - tokens - description: >- - Freezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/{uuid}: + delete: + operationId: TagsApi_deleteTag + summary: Delete tag. + description: Delete tag. parameters: - - in: path - name: tokenId - schema: - type: string + - name: uuid required: true - description: Token ID. - - in: path - name: username + in: path + description: Tag identifier + example: 00000000-0000-0000-0000-000000000000 schema: type: string - required: true - description: Username. - security: - - bearer: [] - summary: Freeze transfers of the specified token for the user. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TokenInfo' - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + type: boolean '401': description: Unauthorized. '403': @@ -8600,43 +8855,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/{username}/unfreeze: - put: - tags: - - tokens - description: >- - Unfreezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 security: - bearer: [] - summary: Unfreezes transfers of the specified token for the user. + /tags/synchronization: + post: + operationId: TagsApi_synchronizationTags + summary: Synchronization of tags with an external network. + description: Synchronization of tags with an external network. + parameters: [] + requestBody: + required: true + description: Object that contains filters + content: + application/json: + schema: + $ref: '#/components/schemas/TagFilterDTO' + examples: + Single: + value: + entity: PolicyDocument + target: '0000000000.000000001' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TokenInfo' - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/TagMapDTO' '401': description: Unauthorized. '403': @@ -8646,37 +8893,48 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/{username}/freeze: - put: - tags: - - tokens - description: >- - Freezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 security: - bearer: [] - summary: Freeze transfers of the specified token for the user. + /tags/schemas: + get: + operationId: TagsApi_getSchemasV2 + summary: Return a list of all tag schemas. + description: >- + Returns all tag schemas. Only users with the Standard Registry role are + allowed to make the request. parameters: - - in: path - name: tokenId + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 schema: - type: string - required: true - description: Token ID. - - in: path - name: username + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 schema: - type: string - required: true - description: Username. + type: number responses: - '202': + '200': description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: - $ref: '#/components/schemas/Task' + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -8686,37 +8944,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/{username}/unfreeze: - put: - tags: - - tokens - description: >- - Unfreezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 security: - bearer: [] - summary: Unfreezes transfers of the specified token for the user. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. + post: + operationId: TagsApi_postSchemas + summary: Creates a new tag schema. + description: >- + Creates a new tag schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' responses: - '202': - description: Successful operation. + '201': + description: Created schema. content: application/json: schema: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -8726,42 +8978,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/{username}/info: - get: - tags: - - tokens - description: >- - Returns user information for the selected token. Only users with the - Standard Registry role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 security: - bearer: [] + /tags/schemas/{schemaId}: + delete: + operationId: TagsApi_deleteSchema + summary: Deletes the schema. + description: >- + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. parameters: - - in: path - name: tokenId - schema: - type: string + - name: schemaId required: true - description: Token ID. - - in: path - name: username + in: path + description: Schema Identifier + example: '000000000000000000000001' schema: type: string - required: true - description: Username. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TokenInfo' - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + type: boolean '401': description: Unauthorized. '403': @@ -8771,29 +9013,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/serials: - get: - operationId: TokensApi_getTokenSerials - summary: Return token serials. - description: Returns token serials of current user. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + put: + operationId: TagsApi_updateSchema + summary: Updates schema configuration. + description: >- + Updates schema configuration for the specified schema ID. Only users + with the Standard Registry role are allowed to make the request. parameters: - - name: tokenId + - name: schemaId required: true in: path - description: Token identifier - example: 0.0.1 + description: Schema Identifier + example: '000000000000000000000001' schema: type: string + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' responses: '200': - description: Token serials. + description: Successful operation. content: application/json: schema: type: array items: - type: number + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -8804,18 +9057,26 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 - security: - - bearer: [] - - bearer: [] - /themes: - get: - tags: - - themes - description: Returns all themes. + tags: *ref_15 security: - bearer: [] - summary: Return a list of all themes. + /tags/schemas/{schemaId}/publish: + put: + operationId: TagsApi_publishTag + summary: Publishes the schema. + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema Identifier + example: '000000000000000000000001' + schema: + type: string responses: '200': description: Successful operation. @@ -8824,7 +9085,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/Theme' + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -8834,24 +9095,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - post: - tags: - - themes - description: Creates a new theme. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 security: - bearer: [] - summary: Creates a new theme. - requestBody: - description: Object that contains theme configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Theme' + /tags/schemas/published: + get: + operationId: TagsApi_getPublished + summary: Return a list of all published schemas. + description: >- + Return a list of all published schemas. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] responses: - '201': - description: Created. + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' '401': description: Unauthorized. '403': @@ -8861,36 +9125,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /themes/{themeId}: - put: - tags: - - themes - description: Updates theme configuration for the specified theme ID. - summary: Updates theme configuration. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tasks/{taskId}: + get: + operationId: TaskApi_getTask + summary: Returns task statuses by Id. + description: Returns task statuses by Id. parameters: - - in: path - name: themeId - description: Selected theme ID. + - name: taskId required: true + in: path + description: Task Id + example: 00000000-0000-0000-0000-000000000000 schema: type: string - requestBody: - description: Object that contains theme configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Theme' - security: - - bearer: [] responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Theme' + $ref: '#/components/schemas/TaskStatusDTO' '401': description: Unauthorized. '403': @@ -8900,28 +9158,68 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - delete: + $ref: '#/components/schemas/InternalServerErrorDTO' tags: - - themes - description: Deletes the theme with the provided theme ID. + - tasks + security: + - bearer: [] + /tokens: + get: + operationId: TokensApi_getTokensV2 + summary: Return a list of tokens. + description: >- + Returns all tokens. For the Standard Registry role it returns only the + list of tokens, for other users it also returns token balances as well + as the KYC, Freeze, and Association statuses. Not allowed for the + Auditor role. parameters: - - in: path - name: themeId + - name: policyId + required: false + in: query + description: Policy Id + example: '000000000000000000000001' schema: type: string - required: true - description: Theme ID. - security: - - bearer: [] - summary: Deletes the theme. + - name: status + required: false + in: query + description: Token status + example: All + schema: + enum: + - Associated + - All + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: - type: boolean + type: array + items: + $ref: '#/components/schemas/TokenDTO' '401': description: Unauthorized. '403': @@ -8931,30 +9229,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /themes/import/file: - post: - tags: - - themes - description: Imports new theme from the provided zip file into the local DB. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_16 + - tokens security: - bearer: [] - summary: Imports new theme from a zip file. + post: + operationId: TokensApi_newToken + summary: Creates a new token. + description: >- + Creates a new token. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] requestBody: - description: A zip file that contains the theme to be imported. required: true + description: Object that contains token information. content: - binary/octet-stream: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/TokenDTO' responses: - '201': - description: Created. + '200': + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Theme' + type: array + items: + $ref: '#/components/schemas/TokenDTO' '401': description: Unauthorized. '403': @@ -8964,25 +9266,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /themes/{themeId}/export/file: - get: - tags: - - themes - description: Returns a zip file containing the theme. - parameters: - - in: path - name: themeId - schema: - type: string - required: true - description: Selected theme ID. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 security: - bearer: [] - summary: Returns a zip file containing the theme. + put: + operationId: TokensApi_updateToken + summary: Update token. + description: >- + Update token. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' responses: '200': - description: Successful operation. Response zip file + description: Updated token. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' '401': description: Unauthorized. '403': @@ -8992,53 +9300,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /trust-chains: - get: - tags: - - trustchains - description: >- - Requests all VP documents. Only users with the Auditor role are allowed - to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 security: - bearer: [] - summary: Returns a list of all VP documents. + /tokens/{tokenId}: + get: + operationId: TokensApi_getTokenByIdWithPolicies + summary: Return a token by id. + description: Return the token. parameters: - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 - - in: query - name: policyId + - name: tokenId + required: true + in: path schema: type: string - description: Selected policy ID. - - in: query - name: policyOwner + - name: policyId + required: true + in: query schema: type: string - description: Selected Standard Registry (DID). responses: '200': description: Successful operation. headers: - x-total-count: + X-Total-Count: schema: type: integer description: Total items in the collection. @@ -9047,7 +9333,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/VerifiablePresentation' + $ref: '#/components/schemas/TokenDTO' '401': description: Unauthorized. '403': @@ -9057,31 +9343,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /trust-chains/{hash}: - get: - tags: - - trustchains - description: >- - Builds and returns a trustchain, from the VP to the root VC document. - Only users with the Auditor role are allowed to make the request. - parameters: - - in: path - name: hash - schema: - type: string - required: true - description: Hash or ID of a VP document. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 security: - bearer: [] - summary: Returns a trustchain for a VP document. + /tokens/push: + post: + operationId: TokensApi_pushTokenAsync + summary: Creates a new token. + description: >- + Creates a new token. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TrustChains' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -9091,200 +9378,66 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /wizard/policy: - post: - tags: - - wizard - description: >- - Creates a new policy by wizard. Only users with the Standard Registry - role are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 security: - bearer: [] - summary: Creates a new policy. - requestBody: - description: Object that contains wizard configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/WizardConfig' - responses: - '201': - description: Successful operation. - content: - application/json: - schema: - type: object - properties: - policyId: - type: string - wizardConfig: - $ref: '#/components/schemas/WizardConfig' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /wizard/push/policy: - post: - operationId: WizardApi_setPolicyAsync - summary: Creates a new policy. + put: + operationId: TokensApi_updateTokenAsync + summary: Update token. description: >- - Creates a new policy by wizard. Only users with the Standard Registry - role are allowed to make the request. + Update token. Only users with the Standard Registry role are allowed to + make the request. parameters: [] requestBody: required: true + description: Object that contains token information. content: application/json: schema: - type: object - properties: - saveState: - type: boolean - wizardConfig: - type: object - required: - - policy - - roles - - schemas - - trustChain - properties: - roles: - type: array - items: - type: string - policy: - type: object - properties: - name: - type: string - description: - type: string - topicDescription: - type: string - policyTag: - type: string - schemas: - type: array - items: - type: object - properties: - name: - type: string - iri: - type: string - isApproveEnable: - type: boolean - isMintSchema: - type: boolean - mintOptions: - type: object - properties: - tokenId: - type: string - rule: - type: string - dependencySchemaIri: - type: string - relationshipsSchemaIri: - type: string - initialRolesFor: - type: array - items: - type: string - rolesConfig: - type: array - items: - type: object - properties: - role: - type: string - isApprover: - type: boolean - isCreator: - type: boolean - gridColumns: - type: array - items: - type: object - properties: - field: - type: string - title: - type: string - trustChain: - type: array - items: - type: object - properties: - role: - type: string - mintSchemaIri: - type: string - viewOnlyOwnDocuments: - type: boolean + $ref: '#/components/schemas/TokenDTO' responses: '200': description: Successful operation. content: application/json: schema: - type: boolean + $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: - - wizard + tags: *ref_16 security: - bearer: [] - /wizard/{policyId}/config: - post: - tags: - - wizard + /tokens/push/{tokenId}: + delete: + operationId: TokensApi_deleteTokenAsync + summary: Deletes the token with the provided schema ID. description: >- - Get policy config by wizard. Only users with the Standard Registry role - are allowed to make the request. + Deletes the token with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. parameters: - - in: path - name: policyId + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' schema: type: string - required: true - description: Policy identifier. - security: - - bearer: [] - summary: Get policy config. - requestBody: - description: Object that contains wizard configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/WizardConfig' responses: '200': description: Successful operation. content: application/json: schema: - type: object - properties: - policyConfig: - $ref: '#/components/schemas/PolicyConfig' - wizardConfig: - $ref: '#/components/schemas/WizardConfig' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -9294,48 +9447,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /branding: - post: - operationId: BrandingApi_setBranding - parameters: [] - responses: - '401': - description: Unauthorized - tags: &ref_11 - - branding + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 security: - bearer: [] - get: - operationId: BrandingApi_getBranding - parameters: [] - responses: - '200': - description: '' - tags: *ref_11 - /suggestions: - post: - operationId: SuggestionsApi_policySuggestions - summary: Get next and nested suggested block types + /tokens/{tokenId}/associate: + put: + operationId: TokensApi_associateToken + summary: Associates the user with the provided Hedera token. description: >- - Get next and nested suggested block types. Only users with the Standard - Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsInputDTO' + Associates the user with the provided Hedera token. Only users with the + Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string responses: '200': - description: >- - Successful operation. Suggested next and nested block types - respectively. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/SuggestionsOutputDTO' + $ref: '#/components/schemas/TokenInfoDTO' '401': description: Unauthorized. '403': @@ -9346,327 +9483,428 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_12 - - suggestions + tags: *ref_16 security: - bearer: [] - - bearer: [] - - bearer: [] - /suggestions/config: - post: - operationId: SuggestionsApi_setPolicySuggestionsConfig - summary: Set suggestions config + /tokens/push/{tokenId}/associate: + put: + operationId: TokensApi_associateTokenAsync + summary: Associates the user with the provided Hedera token. description: >- - Set suggestions config. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsConfigDTO' + Associates the user with the provided Hedera token. Only users with the + Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string responses: - '201': - description: Successful operation. Response setted suggestions config. + '200': + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/SuggestionsConfigDTO' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 + tags: *ref_16 security: - bearer: [] - - bearer: [] - - bearer: [] - get: - operationId: SuggestionsApi_getPolicySuggestionsConfig - summary: Get suggestions config + /tokens/{tokenId}/dissociate: + put: + operationId: TokensApi_dissociateToken + summary: Associate the user with the provided Hedera token. description: >- - Get suggestions config. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] + Disassociates the user with the provided Hedera token. Only users with + the Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string responses: '200': - description: Successful operation. Response suggestions config. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/SuggestionsConfigDTO' + $ref: '#/components/schemas/TokenInfoDTO' '401': description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 + tags: *ref_16 security: - bearer: [] - - bearer: [] - - bearer: [] - /notifications: - get: - operationId: NotificationsApi_getAllNotifications - summary: Get all notifications - description: Returns all notifications. - parameters: [] + /tokens/push/{tokenId}/dissociate: + put: + operationId: TokensApi_dissociateTokenAsync + summary: Associate the user with the provided Hedera token. + description: >- + Disassociates the user with the provided Hedera token. Only users with + the Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string responses: '200': - description: Successful operation. Returns notifications and count. - headers: - X-Total-Count: - description: Count of notifications - schema: - type: integer + description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/NotificationDTO' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_13 - - notifications + tags: *ref_16 security: - bearer: [] - - bearer: [] - /notifications/new: - get: - operationId: NotificationsApi_getNewNotifications - summary: Get new notifications - description: Returns new notifications. - parameters: [] + /tokens/{tokenId}/{username}/grant-kyc: + put: + operationId: TokensApi_grantKyc + summary: Sets the KYC flag for the user. + description: >- + Sets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string responses: '200': - description: Successful operation. Returns new notifications. + description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/NotificationDTO' + $ref: '#/components/schemas/TokenInfoDTO' '401': description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_16 security: - bearer: [] - - bearer: [] - - bearer: [] - /notifications/progresses: - get: - operationId: NotificationsApi_getProgresses - summary: Get progresses - description: Returns progresses. - parameters: [] + /tokens/push/{tokenId}/{username}/grant-kyc: + put: + operationId: TokensApi_grantKycAsync + summary: Sets the KYC flag for the user. + description: >- + Sets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string responses: '200': - description: Successful operation. Returns progresses. + description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/ProgressDTO' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_16 security: - bearer: [] - - bearer: [] - - bearer: [] - /notifications/read/all: - post: - operationId: NotificationsApi_readAll - summary: Read all notifications - description: Returns new notifications. - parameters: [] + /tokens/{tokenId}/{username}/revoke-kyc: + put: + operationId: TokensApi_revokeKyc + summary: Unsets the KYC flag for the user. + description: >- + Unsets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string responses: '200': - description: Successful operation. Returns notifications. + description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/NotificationDTO' + $ref: '#/components/schemas/TokenInfoDTO' '401': description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_16 security: - bearer: [] - - bearer: [] - - bearer: [] - /notifications/delete/{notificationId}: - delete: - operationId: NotificationsApi_delete - summary: Delete notifications up to this point - description: Returns deleted notifications count. + /tokens/push/{tokenId}/{username}/revoke-kyc: + put: + operationId: TokensApi_revokeKycAsync + summary: Unsets the KYC flag for the user. + description: >- + Unsets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. parameters: - - name: notificationId + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username required: true in: path + description: Username + example: username schema: type: string responses: '200': - description: Successful operation. Returns deleted notifications count. + description: Successful operation. content: application/json: schema: - type: number + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_16 security: - bearer: [] - - bearer: [] - - bearer: [] - /projects/search: - post: - operationId: ProjectsAPI_projectSearch - summary: Search projects - description: Search projects by filters - parameters: [] - requestBody: - required: true - description: The question of choosing a methodology - content: - application/json: - schema: - type: string - examples: - q: - value: >- - What methodology can I use for production of electricity using - renewable energy technologies? + /tokens/{tokenId}/{username}/freeze: + put: + operationId: TokensApi_freezeToken + summary: Freeze transfers of the specified token for the user. + description: >- + Freezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/ProjectDTO' + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_14 - - projects - /projects/compare/documents: - post: - operationId: ProjectsAPI_compareDocumentsV2 - summary: Compare documents. - description: Compare documents. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterDocumentsDTO' - examples: - Filter1: - value: - documentId1: '000000000000000000000001' - documentId2: '000000000000000000000002' - Filter2: - value: - documentIds: - - '000000000000000000000001' - - '000000000000000000000002' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/unfreeze: + put: + operationId: TokensApi_unfreezeToken + summary: Unfreezes transfers of the specified token for the user. + description: >- + Unfreezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/CompareDocumentsDTOV2' + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 - /projects/properties: - get: - operationId: ProjectsAPI_getPolicyProperties - summary: Get all properties - description: Get all properties - parameters: [] + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/freeze: + put: + operationId: TokensApi_freezeTokenAsync + summary: Freeze transfers of the specified token for the user. + description: >- + Freezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/PropertiesDTO' + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 - /record/{policyId}/status: - get: - operationId: RecordApi_getRecordStatus - summary: Get recording or running status. + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/unfreeze: + put: + operationId: TokensApi_unfreezeTokenAsync + summary: Unfreezes transfers of the specified token for the user. description: >- - Get recording or running status. Only users with the Standard Registry - role are allowed to make the request. + Unfreezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. parameters: - - name: policyId + - name: tokenId required: true in: path - description: Policy Id + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username schema: type: string responses: @@ -9675,9 +9913,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RecordStatusDTO' + $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -9686,84 +9924,40 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_15 - - record + tags: *ref_16 security: - bearer: [] - - bearer: [] - /record/{policyId}/recording/start: - post: - operationId: RecordApi_startRecord - summary: Start recording. + /tokens/{tokenId}/{username}/info: + get: + operationId: TokensApi_getTokenInfo + summary: Returns user information for the selected token. description: >- - Start recording. Only users with the Standard Registry role are allowed - to make the request. + Returns user information for the selected token. Only users with the + Standard Registry role are allowed to make the request. parameters: - - name: policyId + - name: tokenId required: true in: path - description: Policy Id + description: Token ID + example: '000000000000000000000001' schema: type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] - - bearer: [] - /record/{policyId}/recording/stop: - post: - operationId: RecordApi_stopRecord - summary: Stop recording. - description: >- - Stop recording. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: policyId + - name: username required: true in: path - description: Policy Id + description: Username + example: username schema: type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' responses: '200': description: Successful operation. content: application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/TokenInfoDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -9772,35 +9966,33 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 + tags: *ref_16 security: - bearer: [] - - bearer: [] - /record/{policyId}/recording/actions: + /tokens/{tokenId}/serials: get: - operationId: RecordApi_getRecordActions - summary: Get recorded actions. - description: >- - Get recorded actions. Only users with the Standard Registry role are - allowed to make the request. + operationId: TokensApi_getTokenSerials + summary: Return token serials. + description: Returns token serials of current user. parameters: - - name: policyId + - name: tokenId required: true in: path - description: Policy Id + description: Token ID + example: '000000000000000000000001' schema: type: string responses: '200': - description: Successful operation. + description: Token serials. content: application/json: schema: type: array items: - $ref: '#/components/schemas/RecordActionDTO' + type: number '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -9809,40 +10001,28 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 + tags: *ref_16 security: - bearer: [] - - bearer: [] - /record/{policyId}/running/start: - post: - operationId: RecordApi_runRecord - summary: Run record from a zip file. + /tokens/menu/all: + get: + operationId: TokensApi_getMenu + summary: Return a list of tokens. description: >- - Run record from a zip file. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - requestBody: - required: true - description: A zip file containing record to be run. - content: - application/json: - schema: - type: string + Returns tokens menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] responses: '200': - description: Successful operation. + description: Modules. content: application/json: schema: - type: boolean + type: array + items: + $ref: '#/components/schemas/TokenDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -9851,40 +10031,33 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 + tags: *ref_16 security: - bearer: [] - - bearer: [] - /record/{policyId}/running/stop: + /themes: post: - operationId: RecordApi_stopRunning - summary: Stop running. + operationId: ThemesApi_setThemes + summary: Creates a new theme. description: >- - Stop running. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string + Creates a new theme. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] requestBody: required: true - description: Object that contains options + description: Object that contains a theme. content: application/json: schema: - $ref: '#/components/schemas/Object' + $ref: '#/components/schemas/ThemeDTO' responses: '200': description: Successful operation. content: application/json: schema: - type: boolean + $ref: '#/components/schemas/ThemeDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -9893,33 +10066,28 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 + tags: &ref_17 + - themes security: - bearer: [] - - bearer: [] - /record/{policyId}/running/results: get: - operationId: RecordApi_getRecordResults - summary: Get running results. + operationId: ThemesApi_getThemes + summary: Returns a list of all themes. description: >- - Get running results. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string + Returns a list of all themes. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/RunningResultDTO' + type: array + items: + $ref: '#/components/schemas/ThemeDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -9928,33 +10096,40 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 + tags: *ref_17 security: - bearer: [] - - bearer: [] - /record/{policyId}/running/details: - get: - operationId: RecordApi_getRecordDetails - summary: Get running details. + /themes/{themeId}: + put: + operationId: ThemesApi_updateTheme + summary: Updates theme configuration. description: >- - Get running details. Only users with the Standard Registry role are - allowed to make the request. + Updates theme configuration for the specified theme ID. Only users with + the Standard Registry role are allowed to make the request. parameters: - - name: policyId + - name: themeId required: true in: path - description: Policy Id + description: Theme Identifier + example: '000000000000000000000001' schema: type: string + requestBody: + required: true + description: Object that contains a theme. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/RunningDetailsDTO' + $ref: '#/components/schemas/ThemeDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -9963,31 +10138,23 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 + tags: *ref_17 security: - bearer: [] - - bearer: [] - /record/{policyId}/running/fast-forward: - post: - operationId: RecordApi_fastForward - summary: Fast Forward. + delete: + operationId: ThemesApi_deleteTheme + summary: Deletes the theme. description: >- - Fast Forward. Only users with the Standard Registry role are allowed to - make the request. + Deletes the theme with the provided theme ID. Only users with the + Standard Registry role are allowed to make the request. parameters: - - name: policyId + - name: themeId required: true in: path - description: Policy Id + description: Theme Identifier + example: '000000000000000000000001' schema: type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' responses: '200': description: Successful operation. @@ -9996,7 +10163,7 @@ paths: schema: type: boolean '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -10005,40 +10172,33 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 + tags: *ref_17 security: - bearer: [] - - bearer: [] - /record/{policyId}/running/retry: + /themes/import/file: post: - operationId: RecordApi_retryStep - summary: Retry step. + operationId: ThemesApi_importTheme + summary: Imports new theme from a zip file. description: >- - Retry step. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string + Imports new theme from the provided zip file into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] requestBody: required: true - description: Object that contains options + description: A zip file containing theme to be imported. content: application/json: schema: - $ref: '#/components/schemas/Object' + type: string responses: '200': description: Successful operation. content: application/json: schema: - type: boolean + $ref: '#/components/schemas/ThemeDTO' '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -10047,40 +10207,29 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 + tags: *ref_17 security: - bearer: [] - - bearer: [] - /record/{policyId}/running/skip: - post: - operationId: RecordApi_skipStep - summary: Skip step. + /themes/{themeId}/export/file: + get: + operationId: ThemesApi_exportTheme + summary: Returns a zip file containing the theme. description: >- - Skip step. Only users with the Standard Registry role are allowed to - make the request. + Returns a zip file containing the theme. Only users with the Standard + Registry role are allowed to make the request. parameters: - - name: policyId + - name: themeId required: true in: path - description: Policy Id + description: Theme Identifier + example: '000000000000000000000001' schema: type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' responses: '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean + description: Successful operation. Response zip file. '401': - description: Unauthorized + description: Unauthorized. '403': description: Forbidden. '500': @@ -10089,70 +10238,62 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 + tags: *ref_17 security: - bearer: [] - - bearer: [] - /ai-suggestions/ask: + /trust-chains: get: - operationId: AISuggestionsAPI_getAIAnswer - summary: Get methodology suggestion - description: Returns AI response to the current question + operationId: TrustChainsApi_getTrustChains + summary: Returns a list of all VP documents. + description: >- + Returns a list of all VP documents. Only users with the Standard + Registry role are allowed to make the request. parameters: - - name: q - required: true + - name: pageIndex + required: false in: query - description: The question of choosing a methodology - example: Find me large scale projects + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: policyId + required: false + in: query + description: Policy Id + example: '000000000000000000000001' schema: type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - example: ACM0001, ACM0002, ACM0006, ACM0007, ACM0018 - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_16 - - ai-suggestions - /ai-suggestions/rebuild-vector: - put: - operationId: AISuggestionsAPI_rebuildVector - summary: Rebuild AI vector - description: Rebuilds vector based on policy data in the DB - parameters: [] - responses: - '200': - description: '' - tags: *ref_16 - /schemas/type/{type}: - get: - tags: - - schemas - description: Finds the schema using the json document type. - parameters: - - in: path - name: type + - name: policyOwner + required: false + in: query + description: Policy Owner + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 schema: type: string - required: true - description: JSON type. - security: - - bearer: [] - summary: Returns schema by type. responses: '200': description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: - $ref: '#/components/schemas/Schema' + type: array + items: + $ref: '#/components/schemas/VpDocumentDTO' '401': description: Unauthorized. '403': @@ -10162,30 +10303,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/tag/{tag}: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_18 + - trust-chains + security: + - bearer: [] + /trust-chains/{hash}: get: - tags: - - policies + operationId: TrustChainsApi_getTrustChainByHash + summary: Builds and returns a trustchain, from the VP to the root VC document. description: >- - Requests block ID from a policy by tag. Only users with the Standard - Registry and Installer roles are allowed to make the request. + Builds and returns a trustchain, from the VP to the root VC document. + Only users with the Standard Registry role are allowed to make the + request. parameters: - - in: path - name: policyId - schema: - type: string + - name: hash required: true - description: Selected policy ID. - - in: path - name: tag + in: path + description: Hash + example: hash schema: type: string - required: true - description: Tag from the selected policy. - summary: Requests block ID from a policy by tag. - security: - - bearer: [] responses: '200': description: Successful operation. @@ -10194,8 +10332,48 @@ paths: schema: type: object properties: - id: - type: string + chain: + type: array + items: + type: object + properties: + id: + type: string + type: + type: string + tag: + type: string + label: + type: string + schema: + type: string + owner: + type: string + document: + type: object + required: + - id + - type + - tag + - label + - schema + - owner + - document + userMap: + type: array + items: + type: object + properties: + did: + type: string + username: + type: string + required: + - did + - username + required: + - chain + - userMap '401': description: Unauthorized. '403': @@ -10205,42 +10383,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/tag/{tag}/blocks: - post: - tags: - - policies - description: Sends data to the specified block. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_18 security: - bearer: [] - summary: Sends data to the specified block. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - - in: path - name: tag - schema: - type: string - required: true - description: Tag from the selected policy. + /wizard/policy: + post: + operationId: WizardApi_setPolicy + summary: Creates a new policy. + description: >- + Creates a new policy by wizard. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] requestBody: - description: Object with the data to be sent to the block. required: true + description: Object that contains wizard configuration. content: application/json: schema: - type: object + $ref: '#/components/schemas/WizardConfigDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PolicyBlockData' + $ref: '#/components/schemas/WizardResultDTO' '401': description: Unauthorized. '403': @@ -10250,36 +10418,33 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - get: - tags: - - policies - description: >- - Requests block data by tag. Only users with a role that described in - block are allowed to make the request. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_19 + - wizard security: - bearer: [] - summary: Requests block data. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - - in: path - name: tag - schema: - type: string - required: true - description: Tag from the selected policy. + /wizard/push/policy: + post: + operationId: WizardApi_setPolicyAsync + summary: Creates a new policy. + description: >- + Creates a new policy by wizard. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains wizard configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfigAsyncDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PolicyBlockData' + $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -10289,74 +10454,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /ipfs/file/: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_19 + security: + - bearer: [] + /wizard/{policyId}/config: post: - tags: - - ipfs - description: Add file to ipfs. - summary: Add file to ipfs. + operationId: WizardApi_setPolicyConfig + summary: Get policy config. + description: >- + Get policy config by wizard. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string requestBody: - description: Data array of file. required: true + description: Object that contains wizard configuration. content: - binary/octet-stream: + application/json: schema: - type: string - format: binary - security: - - bearer: [] + $ref: '#/components/schemas/WizardConfigDTO' responses: - '201': - description: Created. + '200': + description: Successful operation. content: application/json: schema: - description: CID of added file. - type: string + $ref: '#/components/schemas/WizardPreviewDTO' '401': description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/Error' - /artifacts/{policyId}: - post: - tags: - - artifacts - description: Upload artifact. For users with the Standard Registry role only. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_19 security: - bearer: [] + /branding: + post: + operationId: BrandingApi_setBranding + summary: Update branding. + description: >- + Update branding. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] requestBody: + required: true + description: Object that contains config. content: - multipart/form-data: + application/json: schema: - type: object - properties: - artifacts: - type: array - items: - type: string - format: binary - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy identifier - summary: Upload Artifact. + $ref: '#/components/schemas/BrandingDTO' responses: '200': description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Artifact' '401': description: Unauthorized. '403': @@ -10366,102 +10527,164 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /artifact: - get: - deprecated: true - tags: - - artifacts - description: Returns all artifacts. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_20 + - branding security: - bearer: [] - summary: Returns all artifacts. - parameters: - - in: query - name: policyId - schema: - type: string - description: Policy identifier - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 + get: + operationId: BrandingApi_getBranding + parameters: [] responses: '200': description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Artifact' - '401': - description: Unauthorized. - '403': - description: Forbidden. + $ref: '#/components/schemas/BrandingDTO' '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/Error' - /artifact/{policyId}: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_20 + /suggestions: post: - deprecated: true - tags: - - artifacts - description: Upload artifact. For users with the Standard Registry role only. - security: - - bearer: [] + operationId: SuggestionsApi_policySuggestions + summary: Get next and nested suggested block types + description: >- + Get next and nested suggested block types. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] requestBody: + required: true + description: Data. content: - multipart/form-data: + application/json: schema: - type: object - properties: - artifacts: - type: array - items: - type: string - format: binary + $ref: '#/components/schemas/SuggestionsInputDTO' + responses: + '200': + description: >- + Successful operation. Suggested next and nested block types + respectively. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsOutputDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_21 + - suggestions + security: + - bearer: [] + /suggestions/config: + post: + operationId: SuggestionsApi_setPolicySuggestionsConfig + summary: Set suggestions config + description: >- + Set suggestions config. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + responses: + '201': + description: Successful operation. Response setted suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_21 + security: + - bearer: [] + get: + operationId: SuggestionsApi_getPolicySuggestionsConfig + summary: Get suggestions config + description: >- + Get suggestions config. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. Response suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_21 + security: + - bearer: [] + /notifications: + get: + operationId: NotificationsApi_getAllNotifications + summary: Get all notifications + description: Returns all notifications. parameters: - - in: path - name: policyId + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 schema: - type: string - required: true - description: Policy identifier - summary: Upload Artifact. + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number responses: '200': - description: Successful operation. + description: Successful operation. Returns notifications and count. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. content: application/json: schema: type: array items: - $ref: '#/components/schemas/Artifact' + $ref: '#/components/schemas/NotificationDTO' '401': description: Unauthorized. '403': @@ -10471,30 +10694,115 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /artifact/{artifactId}: - delete: - deprecated: true - tags: - - artifacts - description: Delete artifact. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_22 + - notifications security: - bearer: [] - summary: Delete artifact. + /notifications/new: + get: + operationId: NotificationsApi_getNewNotifications + summary: Get new notifications + description: Returns new notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns new notifications. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/progresses: + get: + operationId: NotificationsApi_getProgresses + summary: Get progresses + description: Returns progresses. + parameters: [] + responses: + '200': + description: Successful operation. Returns progresses. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProgressDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/read/all: + post: + operationId: NotificationsApi_readAll + summary: Read all notifications + description: Returns new notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns notifications. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/delete/{notificationId}: + delete: + operationId: NotificationsApi_delete + summary: Delete notifications up to this point + description: Returns deleted notifications count. parameters: - - in: path - name: artifactId + - name: notificationId + required: true + in: path + description: Notification Identifier + example: 00000000-0000-0000-0000-000000000000 schema: type: string - required: true - description: Artifact identifier responses: '200': - description: Successful operation. + description: Successful operation. Returns deleted notifications count. content: application/json: schema: - type: boolean + type: number '401': description: Unauthorized. '403': @@ -10504,54 +10812,1282 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Error' - /tags/: - post: - tags: - - tags - description: Creates new tag. + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 security: - bearer: [] - summary: Creates new tag. + /projects/search: + post: + operationId: ProjectsAPI_projectSearch + summary: Search projects + description: Search projects by filters + parameters: [] requestBody: - description: Object that contains tag information. required: true + description: The question of choosing a methodology content: application/json: schema: - $ref: '#/components/schemas/Tag' + type: string + examples: + q: + value: >- + What methodology can I use for production of electricity using + renewable energy technologies? responses: - '201': - description: Created. - content: - application/json: - schema: - $ref: '#/components/schemas/Tag' - '400': - description: Bad Request. + '200': + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized. - '403': - description: Forbidden. + type: array + items: + $ref: '#/components/schemas/ProjectDTO' '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/Error' -info: - title: Guardian - description: >- - The Guardian is a modular open-source solution that includes best-in-class - identity management and decentralized ledger technology (DLT) libraries. At - the heart of the Guardian solution is a sophisticated Policy Workflow Engine + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_23 + - projects + /projects/compare/documents: + post: + operationId: ProjectsAPI_compareDocumentsV2 + summary: Compare documents. + description: Compare documents. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000001' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDocumentsV2DTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_23 + /projects/properties: + get: + operationId: ProjectsAPI_getPolicyProperties + summary: Get all properties + description: Get all properties + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PropertiesDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_23 + /record/{policyId}/status: + get: + operationId: RecordApi_getRecordStatus + summary: Get recording or running status. + description: >- + Get recording or running status. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RecordStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_24 + - record + security: + - bearer: [] + /record/{policyId}/recording/start: + post: + operationId: RecordApi_startRecord + summary: Start recording. + description: >- + Start recording. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/recording/stop: + post: + operationId: RecordApi_stopRecord + summary: Stop recording. + description: >- + Stop recording. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/recording/actions: + get: + operationId: RecordApi_getRecordActions + summary: Get recorded actions. + description: >- + Get recorded actions. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RecordActionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/start: + post: + operationId: RecordApi_runRecord + summary: Run record from a zip file. + description: >- + Run record from a zip file. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A zip file containing record to be run. + content: + application/json: + schema: + type: string + responses: + '200': + description: Record UUID. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/stop: + post: + operationId: RecordApi_stopRunning + summary: Stop running. + description: >- + Stop running. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/results: + get: + operationId: RecordApi_getRecordResults + summary: Get running results. + description: >- + Get running results. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningResultDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/details: + get: + operationId: RecordApi_getRecordDetails + summary: Get running details. + description: >- + Get running details. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningDetailsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/fast-forward: + post: + operationId: RecordApi_fastForward + summary: Fast Forward. + description: >- + Fast Forward. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/retry: + post: + operationId: RecordApi_retryStep + summary: Retry step. + description: >- + Retry step. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/skip: + post: + operationId: RecordApi_skipStep + summary: Skip step. + description: >- + Skip step. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /ai-suggestions/ask: + get: + operationId: AISuggestionsAPI_getAIAnswer + summary: Get methodology suggestion + description: Returns AI response to the current question + parameters: + - name: q + required: true + in: query + description: The question of choosing a methodology + example: Find me large scale projects + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + example: ACM0001, ACM0002, ACM0006, ACM0007, ACM0018 + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_25 + - ai-suggestions + /ai-suggestions/rebuild-vector: + put: + operationId: AISuggestionsAPI_rebuildVector + summary: Rebuild AI vector + description: Rebuilds vector based on policy data in the DB + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_25 + /permissions: + get: + operationId: PermissionsApi_getPermissions + summary: Return a list of all permissions. + description: Returns all permissions. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PermissionsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_26 + - permissions + security: + - bearer: [] + /permissions/roles: + get: + operationId: PermissionsApi_getRoles + summary: Return a list of all roles. + description: Returns all roles. + parameters: + - name: name + required: false + in: query + description: Filter by role name + example: name + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + post: + operationId: PermissionsApi_createRole + summary: Creates new role. + description: Creates new role. + parameters: [] + requestBody: + required: true + description: Object that contains role information. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + responses: + '200': + description: Created role. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/roles/{id}: + put: + operationId: PermissionsApi_updateRole + summary: Updates role configuration. + description: Updates role configuration for the specified role ID. + parameters: + - name: id + required: true + in: path + description: Role Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Role configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + responses: + '200': + description: Role configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + delete: + operationId: PermissionsApi_deleteModule + summary: Deletes the role. + description: Deletes the role with the provided role ID. + parameters: + - name: id + required: true + in: path + description: Role Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/roles/default: + post: + operationId: PermissionsApi_setDefaultRole + summary: Set default role. + description: Set the role as default for new users. + parameters: [] + requestBody: + required: true + description: Object that contains role information. + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: Role Identifier + example: '000000000000000000000001' + required: + - id + examples: + Default: + value: + id: '000000000000000000000001' + responses: + '200': + description: Created role. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users: + get: + operationId: PermissionsApi_getUsers + summary: Return a list of all users. + description: Returns all users. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: role + required: false + in: query + description: Filter by role + example: '000000000000000000000001' + schema: + type: string + - name: status + required: false + in: query + description: Filter by status + example: Active + schema: + enum: + - Active + - Inactive + type: string + - name: username + required: false + in: query + description: Filter by username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}: + get: + operationId: PermissionsApi_getUser + summary: Updates user permissions. + description: Updates user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + put: + operationId: PermissionsApi_updateUser + summary: Updates user permissions. + description: Updates user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: User permissions. + content: + application/json: + schema: + type: array + items: + type: string + examples: + Roles: + value: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies: + get: + operationId: PermissionsApi_getAssignedPolicies + summary: Return a list of all roles. + description: Returns all roles. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: status + required: false + in: query + description: Filter by status + example: Active + schema: + enum: + - DRY-RUN + - DRAFT + - PUBLISH_ERROR + - PUBLISH + - DISCONTINUED + - DEMO + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies/assign: + post: + operationId: PermissionsApi_assignPolicy + summary: Assign policy. + description: Assign policy. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/AssignPolicyDTO' + responses: + '200': + description: Assigned policy. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/delegate: + put: + operationId: PermissionsApi_delegateRole + summary: Delegate user permissions. + description: Delegate user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: User permissions. + content: + application/json: + schema: + type: array + items: + type: string + examples: + Roles: + value: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies/delegate: + post: + operationId: PermissionsApi_delegatePolicy + summary: Delegate policy. + description: Delegate policy. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/AssignPolicyDTO' + responses: + '200': + description: Assigned policy. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /worker-tasks: + get: + operationId: WorkerTasksController_getAllWorkerTasks + summary: Get all worker tasks + description: Returns all worker tasks. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. Returns notifications and count. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WorkersTasksDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_27 + - worker-tasks + security: + - bearer: [] + /worker-tasks/restart: + post: + operationId: WorkerTasksController_restartTask + summary: Restart task + description: Restart task + parameters: [] + responses: + '200': + description: Successful operation. Returns notifications. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /worker-tasks/delete/{taskId}: + delete: + operationId: WorkerTasksController_deleteTask + summary: Delete task + description: Delete task + parameters: + - name: taskId + required: true + in: path + description: Task Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Returns notifications. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] +info: + title: Guardian + description: >- + The Guardian is a modular open-source solution that includes best-in-class + identity management and decentralized ledger technology (DLT) libraries. At + the heart of the Guardian solution is a sophisticated Policy Workflow Engine (PWE) that enables applications to offer a requirements-based tokenization implementation. - version: 2.24.1 + version: 2.27.1 contact: name: API developer url: https://envisionblockchain.com @@ -10570,29 +12106,44 @@ components: scheme: bearer bearerFormat: JWT schemas: - AccountsResponseDTO: + AccountsSessionResponseDTO: type: object properties: username: type: string role: type: string - did: + accessToken: type: string required: - username - role - - did + - accessToken InternalServerErrorDTO: type: object properties: code: type: number + example: 500 message: type: string + example: Error message required: - code - message + AccountsResponseDTO: + type: object + properties: + username: + type: string + role: + type: string + did: + type: string + required: + - username + - role + - did RegisterUserDTO: type: object properties: @@ -10609,29 +12160,29 @@ components: - password - password_confirmation - role - AccountsSessionResponseDTO: + LoginUserDTO: type: object properties: username: type: string - role: - type: string - accessToken: + password: type: string required: - username - - role - - accessToken - LoginUserDTO: + - password + ChangePasswordDTO: type: object properties: username: type: string - password: + oldPassword: + type: string + newPassword: type: string required: - username - - password + - oldPassword + - newPassword CredentialSubjectDTO: type: object properties: @@ -10703,69 +12254,251 @@ components: $ref: '#/components/schemas/ProofDTO' required: - id - - type - - issuer - - issuanceDate - - '@context' - - credentialSubject - - proof + - type + - issuer + - issuanceDate + - '@context' + - credentialSubject + - proof + PolicyTestDTO: + type: object + properties: + id: + type: string + description: Test ID + example: '000000000000000000000001' + uuid: + type: string + description: Test UUID + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + description: Test Name + example: Test Name + policyId: + type: string + description: Policy ID + example: '000000000000000000000001' + owner: + type: string + description: Test owner + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + status: + type: string + description: Test status + enum: + - New + - Running + - Stopped + - Success + - Failure + example: New + date: + type: string + description: Last start date + example: '1900-01-01T00:00:00.000Z' + duration: + type: string + description: Test duration + example: 0 + progress: + type: string + description: Test progress + example: 0 + resultId: + type: string + description: Test result + example: 00000000-0000-0000-0000-000000000000 + result: + type: string + description: Test result + required: + - id + - uuid + - name + - policyId + - owner + - status + - date + - duration + - progress + - resultId + - result PolicyDTO: type: object properties: - _id: - type: string - createDate: - format: date-time + id: type: string + example: '000000000000000000000001' uuid: type: string + example: 00000000-0000-0000-0000-000000000000 name: type: string + example: Policy name description: type: string + example: Description + topicDescription: + type: string + example: Description + policyTag: + type: string + example: Tag status: type: string + enum: + - DRY-RUN + - DRAFT + - PUBLISH_ERROR + - PUBLISH + - DISCONTINUED + - DEMO + example: DRAFT creator: type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 owner: type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 topicId: type: string - policyTag: + example: 0.0.1 + messageId: type: string + example: '0000000000.000000001' codeVersion: type: string + example: 1.0.0 + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + version: + type: string + example: 1.0.0 + config: + type: object + userRole: + type: string + example: Installer userRoles: + example: + - Installer type: array items: type: string + userGroup: + type: object + example: + uuid: 00000000-0000-0000-0000-000000000000 + role: Installer + groupLabel: Label + groupName: Name + active: true userGroups: + example: + - uuid: 00000000-0000-0000-0000-000000000000 + role: Installer + groupLabel: Label + groupName: Name + active: true + type: array + items: + type: object + policyRoles: + example: + - Registrant type: array items: type: string - userRole: - type: string - userGroup: - type: string - id: + policyNavigation: + example: + - role: Registrant + steps: + - block: Block tag + level: 1 + name: Step name + type: array + items: + type: object + policyTopics: + example: + - name: Project + description: Project + memoObj: topic + static: false + type: any + type: array + items: + type: object + policyTokens: + example: + - tokenName: Token name + tokenSymbol: Token symbol + tokenType: non-fungible + decimals: '' + changeSupply: true + enableAdmin: true + enableFreeze: true + enableKYC: true + enableWipe: true + templateTokenTag: token_template_0 + type: array + items: + type: object + policyGroups: + example: + - name: Group name + creator: Registrant + groupAccessType: Private + groupRelationshipType: Multiple + members: + - Registrant + type: array + items: + type: object + categories: + type: array + items: + type: string + projectSchema: type: string + example: 00000000-0000-0000-0000-000000000000 + tests: + type: array + items: + $ref: '#/components/schemas/PolicyTestDTO' required: - - _id - - createDate + - id - uuid - name - description + - topicDescription + - policyTag - status - creator - owner - topicId - - policyTag + - messageId - codeVersion - - userRoles - - userGroups + - createDate + - version + - config - userRole + - userRoles - userGroup - - id + - userGroups + - policyRoles + - policyNavigation + - policyTopics + - policyTokens + - policyGroups + - categories + - projectSchema + - tests AggregatedDTOItem: type: object properties: @@ -10787,11 +12520,41 @@ components: properties: username: type: string + example: username + role: + type: string + enum: &ref_36 + - STANDARD_REGISTRY + - USER + - AUDITOR + example: USER + permissionsGroup: + example: &ref_37 + - {} + type: array + items: + type: string + permissions: + example: &ref_38 + - POLICIES_POLICY_READ + type: array + items: + type: string did: type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + parent: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + hederaAccountId: + type: string + example: 0.0.1 required: - username - - did + - role + - permissions BalanceResponseDTO: type: object properties: @@ -10810,43 +12573,213 @@ components: properties: policyId: type: string - required: - - policyId + example: '000000000000000000000001' + type: + type: string + enum: + - Owned + - Local + - Global + example: Local + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + minVcCount: + type: number + example: 0 + minVpCount: + type: number + example: 0 + minTokensCount: + type: number + example: 0 + text: + type: string + example: Policy name + threshold: + type: number + minimum: 0 + maximum: 100 + example: 0 + SearchPolicyDTO: + type: object + properties: + type: + type: string + enum: + - Local + - Global + example: Local + id: + type: string + example: '000000000000000000000001' + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Policy name + description: + type: string + example: Policy description + version: + type: string + example: 1.0.0 + status: + type: string + enum: + - DRY-RUN + - DRAFT + - PUBLISH_ERROR + - PUBLISH + - DISCONTINUED + - DEMO + example: DRAFT + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + tags: + example: Tag + type: array + items: + type: object + vcCount: + type: number + example: 0 + vpCount: + type: number + example: 0 + tokensCount: + type: number + example: 0 + rate: + type: number + example: 0 SearchPoliciesDTO: type: object properties: target: type: object result: - type: object + type: array + items: + $ref: '#/components/schemas/SearchPolicyDTO' required: - - target - result - FilterPoliciesDTO: + CompareFileDTO: type: object properties: - policyId1: + id: type: string - policyId2: + description: File ID + example: 00000000-0000-0000-0000-000000000000 + name: type: string - policyIds: + description: File Name + example: File Name + value: + type: string + description: Buffer + example: base64... + required: + - id + - name + - value + FilterPolicyDTO: + type: object + properties: + type: type: string + description: Identifier type + enum: + - id + - message + - file + example: id + value: + oneOf: + - type: string + description: Policy ID + - type: string + description: Policy Message ID + - $ref: '#/components/schemas/CompareFileDTO' + description: Policy File + example: '000000000000000000000001' + required: + - type + - value + FilterPoliciesDTO: + type: object + properties: + idLvl: + oneOf: &ref_28 + - type: string + - type: number + enum: &ref_29 + - 0 + - 1 + example: 0 eventsLvl: - type: number + oneOf: &ref_30 + - type: string + - type: number + enum: &ref_31 + - 0 + - 1 + example: 0 propLvl: - type: number + oneOf: &ref_32 + - type: string + - type: number + enum: &ref_33 + - 0 + - 1 + - 2 + example: 0 childrenLvl: - type: number - idLvl: - type: number - required: - - policyId1 - - policyId2 - - policyIds - - eventsLvl - - propLvl - - childrenLvl - - idLvl + oneOf: &ref_34 + - type: string + - type: number + enum: &ref_35 + - 0 + - 1 + - 2 + example: 0 + policyId1: + type: string + example: '000000000000000000000001' + policyId2: + type: string + example: '000000000000000000000001' + policyIds: + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string + policies: + example: + - type: id + value: '000000000000000000000001' + - type: message + value: '0000000000.000000001' + - type: file + value: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... + type: array + items: + $ref: '#/components/schemas/FilterPolicyDTO' ComparePoliciesDTO: type: object properties: @@ -10878,25 +12811,31 @@ components: FilterModulesDTO: type: object properties: + idLvl: + oneOf: *ref_28 + enum: *ref_29 + example: 0 + eventsLvl: + oneOf: *ref_30 + enum: *ref_31 + example: 0 + propLvl: + oneOf: *ref_32 + enum: *ref_33 + example: 0 + childrenLvl: + oneOf: *ref_34 + enum: *ref_35 + example: 0 moduleId1: type: string + example: '000000000000000000000001' moduleId2: type: string - eventsLvl: - type: number - propLvl: - type: number - childrenLvl: - type: number - idLvl: - type: number + example: '000000000000000000000001' required: - moduleId1 - moduleId2 - - eventsLvl - - propLvl - - childrenLvl - - idLvl CompareModulesDTO: type: object properties: @@ -10922,19 +12861,64 @@ components: - outputEvents - variables - total + FilterSchemaDTO: + type: object + properties: + type: + type: string + description: Identifier type + enum: + - id + - policy-message + - policy-file + example: id + value: + type: string + description: Schema ID + example: '000000000000000000000001' + policy: + oneOf: + - description: Policy Message ID + type: string + - $ref: '#/components/schemas/CompareFileDTO' + description: Policy File + example: '000000000000000000000001' + required: + - type + - value FilterSchemasDTO: type: object properties: schemaId1: type: string + example: '000000000000000000000001' schemaId2: type: string + example: '000000000000000000000001' + schemas: + example: + - type: id + value: '000000000000000000000001' + - type: policy-message + value: 00000000-0000-0000-0000-000000000000 + policy: '0000000000.000000001' + - type: policy-file + value: 00000000-0000-0000-0000-000000000000 + policy: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... + type: array + items: + $ref: '#/components/schemas/FilterSchemaDTO' idLvl: - type: number - required: - - schemaId1 - - schemaId2 - - idLvl + oneOf: + - type: string + - type: number + enum: + - 0 + - 1 + example: 0 CompareSchemasDTO: type: object properties: @@ -10954,16 +12938,35 @@ components: FilterDocumentsDTO: type: object properties: + idLvl: + oneOf: *ref_28 + enum: *ref_29 + example: 0 + eventsLvl: + oneOf: *ref_30 + enum: *ref_31 + example: 0 + propLvl: + oneOf: *ref_32 + enum: *ref_33 + example: 0 + childrenLvl: + oneOf: *ref_34 + enum: *ref_35 + example: 0 documentId1: type: string + example: '000000000000000000000001' documentId2: type: string + example: '000000000000000000000001' documentIds: - type: string - required: - - documentId1 - - documentId2 - - documentIds + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string CompareDocumentsDTO: type: object properties: @@ -10983,16 +12986,35 @@ components: FilterToolsDTO: type: object properties: + idLvl: + oneOf: *ref_28 + enum: *ref_29 + example: 0 + eventsLvl: + oneOf: *ref_30 + enum: *ref_31 + example: 0 + propLvl: + oneOf: *ref_32 + enum: *ref_33 + example: 0 + childrenLvl: + oneOf: *ref_34 + enum: *ref_35 + example: 0 toolId1: type: string + example: '000000000000000000000001' toolId2: type: string + example: '000000000000000000000001' toolIds: - type: string - required: - - toolId1 - - toolId2 - - toolIds + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string CompareToolsDTO: type: object properties: @@ -11018,6 +13040,45 @@ components: - outputEvents - variables - total + FilterSearchBlocksDTO: + type: object + properties: + id: + type: string + example: 00000000-0000-0000-0000-000000000000 + config: + type: object + required: + - id + - config + SearchBlocksDTO: + type: object + properties: + name: + type: string + description: + type: string + version: + type: string + owner: + type: string + topicId: + type: string + messageId: + type: string + hash: + type: string + chains: + type: object + required: + - name + - description + - version + - owner + - topicId + - messageId + - hash + - chains ArtifactDTOItem: type: object properties: @@ -11069,6 +13130,10 @@ components: type: array items: type: string + wipeTokenIds: + type: array + items: + type: string required: - id - contractId @@ -11081,6 +13146,17 @@ components: - syncPoolsDate - lastSyncEventTimeStamp - wipeContractIds + - wipeTokenIds + ContractConfigDTO: + type: object + properties: + type: + type: string + description: + type: string + required: + - type + - description WiperRequestDTO: type: object properties: @@ -11090,10 +13166,13 @@ components: type: string user: type: string + token: + type: string required: - id - contractId - user + - token RetireRequestDTO: type: object properties: @@ -11199,637 +13278,849 @@ components: - token - count - serials - ProfileDTO: + RegisteredUsersDTO: type: object properties: username: type: string - nullable: false - role: - type: string - nullable: false did: type: string - nullable: true parent: type: string - nullable: true - hederaAccountId: - type: string - nullable: true - confirmed: - type: boolean - nullable: true - failed: - type: boolean - nullable: true - topicId: - type: string - nullable: true - parentTopicId: + role: type: string - nullable: true - didDocument: - type: object - nullable: true - vcDocument: - type: object - nullable: true + policyRoles: + type: array + items: + type: string required: - username + - did + - parent - role - SubjectDTO: + - policyRoles + TaskDTO: type: object properties: - '@context': - nullable: true - type: array - items: - type: string - id: - type: string - nullable: true - type: + taskId: type: string - nullable: true + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + expectation: + type: number + description: Expected count of task phases + example: 0 required: - - '@context' - DidDocumentDTO: + - taskId + - expectation + VCDocumentDTO: type: object properties: id: type: string nullable: false - context: - nullable: true - type: array - items: - type: string - alsoKnownAs: - nullable: true + '@context': type: array items: type: string - controller: - nullable: true + type: type: array items: type: string - verificationMethod: - nullable: true - type: array - items: - type: object - authentication: - nullable: true - type: array - items: - type: object - assertionMethod: - nullable: true - type: array - items: - type: object - keyAgreement: - nullable: true - type: array - items: - type: object - capabilityInvocation: - nullable: true - type: array - items: - type: object - capabilityDelegation: - nullable: true + credentialSubject: type: array items: type: object - service: + issuer: + type: object + issuanceDate: + type: string + proof: + type: object nullable: true - type: array - items: - type: object required: - id - - context - - alsoKnownAs - - controller - - verificationMethod - - authentication - - assertionMethod - - keyAgreement - - capabilityInvocation - - capabilityDelegation - - service - DidKeyDTO: + - '@context' + - type + - credentialSubject + - issuer + - issuanceDate + - proof + ExternalDocumentDTO: type: object properties: - id: + owner: type: string - nullable: false - key: + policyTag: type: string + document: nullable: false + allOf: + - $ref: '#/components/schemas/VCDocumentDTO' required: - - id - - key - CredentialsDTO: + - owner + - policyTag + - document + LogFilterDTO: type: object properties: - entity: - type: string - nullable: false - hederaAccountId: - type: string - nullable: false - hederaAccountKey: - type: string - nullable: false - parent: + type: type: string nullable: true - vcDocument: + startDate: + type: string nullable: true - allOf: - - $ref: '#/components/schemas/SubjectDTO' - didDocument: + endDate: + type: string nullable: true - allOf: - - $ref: '#/components/schemas/DidDocumentDTO' - didKeys: + attributes: nullable: true type: array items: - $ref: '#/components/schemas/DidKeyDTO' - required: - - entity - - hederaAccountId - - hederaAccountKey - TaskDTO: - type: object - properties: - taskId: + type: string + message: type: string - expectation: + nullable: true + pageSize: type: number - required: - - taskId - - expectation - DidDocumentStatusDTO: - type: object - properties: - valid: - type: boolean - nullable: false - error: + nullable: true + pageIndex: + type: number + nullable: true + sortDirection: type: string nullable: true - didDocument: - type: object - nullable: false required: - - valid - - error - - didDocument - DidDocumentWithKeyDTO: + - type + - startDate + - endDate + - attributes + - message + - pageSize + - pageIndex + - sortDirection + LogResultDTO: type: object properties: - document: - nullable: false - allOf: - - $ref: '#/components/schemas/DidDocumentDTO' - keys: - nullable: false + totalCount: + type: number + logs: type: array items: - $ref: '#/components/schemas/DidKeyDTO' + type: object required: - - document - - keys - DidKeyStatusDTO: + - totalCount + - logs + ModuleDTO: type: object properties: id: type: string nullable: false - key: + uuid: type: string nullable: false - valid: - type: boolean + type: + type: string nullable: false - required: - - id - - key - - valid - MigrationConfigPoliciesDTO: - type: object - properties: - src: + name: type: string - dst: + nullable: false + description: type: string - required: - - src - - dst - MigrationConfigDTO: - type: object - properties: - policies: - $ref: '#/components/schemas/MigrationConfigPoliciesDTO' - vcs: - type: array - items: - type: string - vps: - type: array - items: - type: string - schemas: - type: object - groups: - type: object - roles: - type: object - blocks: - type: object - tokens: - type: object - migrateState: - type: boolean - migrateRetirePools: - type: boolean - editedVCs: - type: object - retireContractId: + nullable: false + status: type: string - required: - - policies - - vcs - - vps - - schemas - - groups - - roles - - blocks - - tokens - - migrateState - - migrateRetirePools - - editedVCs - - retireContractId - PolicyCategoryDTO: - type: object - properties: - id: + nullable: false + creator: type: string - name: + nullable: false + owner: type: string - type: + nullable: false + topicId: + type: string + nullable: false + messageId: + type: string + nullable: false + codeVersion: + type: string + nullable: false + createDate: type: string + nullable: false + config: + type: object + nullable: true required: - id - - name + - uuid - type + - name + - description + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + - config SchemaDTO: type: object properties: id: type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 name: type: string + example: Schema name description: type: string + example: Description entity: type: string - document: - type: string - uuid: - type: string + enum: + - NONE + - VC + - EVC + - STANDARD_REGISTRY + - USER + - POLICY + - MINT_TOKEN + - RETIRE + - WIPE_TOKEN + - MINT_NFTOKEN + - ISSUER + - USER_ROLE + - CHUNK + - ACTIVITY_IMPACT + - TOKEN_DATA_SOURCE + - ROLE + - USER_PERMISSIONS + example: POLICY iri: type: string - hash: - type: string + example: 00000000-0000-0000-0000-000000000000 status: type: string + enum: + - DRAFT + - PUBLISHED + - UNPUBLISHED + - ERROR + - DEMO + example: DRAFT topicId: type: string + example: 0.0.1 version: type: string + example: 1.0.0 owner: type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 messageId: type: string + example: '0000000000.000000001' + category: + type: string + enum: + - POLICY + - MODULE + - SYSTEM + - TAG + - TOOL + example: POLICY + documentURL: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + contextURL: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + document: + type: object + context: + type: object required: - id + - uuid - name - description - entity - - document - - uuid - iri - - hash - status - topicId - version - owner - messageId - VersionSchemaDTO: + - category + - documentURL + - contextURL + - document + - context + ExportMessageDTO: type: object properties: - version: + uuid: + type: string + name: + type: string + description: + type: string + messageId: + type: string + owner: type: string required: - - version - MessageSchemaDTO: + - uuid + - name + - description + - messageId + - owner + ImportMessageDTO: type: object properties: messageId: type: string + metadata: + type: object + nullable: true required: - messageId - ExportSchemaDTO: + - metadata + ModulePreviewDTO: + type: object + properties: + module: + nullable: false + allOf: + - $ref: '#/components/schemas/ModuleDTO' + messageId: + type: string + schemas: + nullable: true + type: array + items: + type: object + tags: + nullable: true + type: array + items: + type: object + moduleTopicId: + type: string + nullable: true + required: + - module + - messageId + - schemas + - tags + - moduleTopicId + BlockErrorsDTO: + type: object + properties: + id: + type: string + name: + type: string + errors: + type: array + items: + type: string + isValid: + type: boolean + required: + - id + - name + - errors + - isValid + ValidationErrorsDTO: + type: object + properties: + blocks: + nullable: true + type: array + items: + $ref: '#/components/schemas/BlockErrorsDTO' + errors: + nullable: true + type: array + items: + type: string + required: + - blocks + - errors + ModuleValidationDTO: + type: object + properties: + module: + nullable: false + allOf: + - $ref: '#/components/schemas/ModuleDTO' + results: + nullable: false + allOf: + - $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - module + - results + BlockDTO: + type: object + properties: + id: + type: string + blockType: + type: string + blocks: + type: array + items: + $ref: '#/components/schemas/BlockDTO' + required: + - id + - blockType + - blocks + ToolDTO: type: object properties: id: type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 name: type: string + example: Tool name description: type: string - version: + example: Description + status: + type: string + enum: + - DRAFT + - PUBLISHED + - PUBLISH_ERROR + example: NEW + creator: type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 owner: type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + topicId: + type: string + example: 0.0.1 messageId: type: string + example: '0000000000.000000001' + codeVersion: + type: string + example: 1.0.0 + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + config: + $ref: '#/components/schemas/BlockDTO' required: - id + - uuid - name - description - - version + - status + - creator - owner + - topicId - messageId - SystemSchemaDTO: + - codeVersion + - createDate + - config + ToolValidationDTO: type: object properties: - name: - type: string - entity: - type: string + tool: + $ref: '#/components/schemas/ToolDTO' + results: + $ref: '#/components/schemas/ValidationErrorsDTO' required: - - name - - entity - SettingsDTO: + - tool + - results + ToolPreviewDTO: type: object properties: - ipfsStorageApiKey: - type: string - operatorId: - type: string - operatorKey: - type: string + tool: + $ref: '#/components/schemas/ToolDTO' + schemas: + type: array + items: + type: object + tags: + type: array + items: + type: object + tools: + type: array + items: + $ref: '#/components/schemas/ToolDTO' required: - - ipfsStorageApiKey - - operatorId - - operatorKey - SuggestionsInputDTO: + - tool + - schemas + - tags + - tools + ProfileDTO: type: object properties: - blockType: + username: type: string - children: - nullable: true + example: username + role: + type: string + enum: *ref_36 + example: USER + permissionsGroup: + example: *ref_37 type: array items: - type: object + type: string + permissions: + example: *ref_38 + type: array + items: + type: string + did: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + parent: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + hederaAccountId: + type: string + example: 0.0.1 + confirmed: + type: boolean + example: true + failed: + type: boolean + example: true + topicId: + type: string + example: 0.0.1 + parentTopicId: + type: string + example: 0.0.1 + didDocument: + type: object + nullable: true + vcDocument: + type: object + nullable: true required: - - blockType - - children - SuggestionsOutputDTO: + - username + - role + - permissions + SubjectDTO: type: object properties: - next: + '@context': + nullable: true + type: array + items: + type: string + id: type: string - nested: + nullable: true + type: type: string + nullable: true required: - - next - - nested - SuggestionsConfigItemDTO: + - '@context' + DidDocumentDTO: type: object properties: id: type: string - type: - type: string - enum: - - Policy - - Module - index: - type: number + nullable: false + context: + nullable: true + type: array + items: + type: string + alsoKnownAs: + nullable: true + type: array + items: + type: string + controller: + nullable: true + type: array + items: + type: string + verificationMethod: + nullable: true + type: array + items: + type: object + authentication: + nullable: true + type: array + items: + type: object + assertionMethod: + nullable: true + type: array + items: + type: object + keyAgreement: + nullable: true + type: array + items: + type: object + capabilityInvocation: + nullable: true + type: array + items: + type: object + capabilityDelegation: + nullable: true + type: array + items: + type: object + service: + nullable: true + type: array + items: + type: object required: - id - - type - - index - SuggestionsConfigDTO: + - context + - alsoKnownAs + - controller + - verificationMethod + - authentication + - assertionMethod + - keyAgreement + - capabilityInvocation + - capabilityDelegation + - service + DidKeyDTO: type: object properties: - items: - $ref: '#/components/schemas/SuggestionsConfigItemDTO' + id: + type: string + nullable: false + key: + type: string + nullable: false required: - - items - NotificationDTO: + - id + - key + CredentialsDTO: type: object properties: - title: + entity: type: string - message: + nullable: false + hederaAccountId: type: string - type: + nullable: false + hederaAccountKey: type: string - enum: - - INFO - - ERROR - - WARN - - SUCCESS - action: + nullable: false + parent: type: string - enum: - - POLICY_CONFIGURATION - - POLICY_VIEW - - POLICIES_PAGE - - SCHEMAS_PAGE - - TOKENS_PAGE - - PROFILE_PAGE - result: - type: object - read: - type: boolean - old: - type: boolean - required: - - title - - message - - type - - action - - result - - read - - old - ProgressDTO: + nullable: true + vcDocument: + nullable: true + allOf: + - $ref: '#/components/schemas/SubjectDTO' + didDocument: + nullable: true + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + didKeys: + nullable: true + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' + required: + - entity + - hederaAccountId + - hederaAccountKey + DidDocumentStatusDTO: type: object properties: - action: - type: string - message: - type: string - progress: - type: number - type: - type: string - enum: - - INFO - - ERROR - - WARN - - SUCCESS - taskId: + valid: + type: boolean + nullable: false + error: type: string + nullable: true + didDocument: + type: object + nullable: false required: - - action - - message - - progress - - type - - taskId - ProjectDTO: + - valid + - error + - didDocument + DidKeyStatusDTO: type: object properties: id: type: string - policyId: - type: string - policyName: - type: string - registered: - type: string - title: - type: string - companyName: - type: string - sectoralScope: + nullable: false + key: type: string + nullable: false + valid: + type: boolean + nullable: false required: - id - - policyId - - policyName - - registered - - title - - companyName - - sectoralScope - CompareDocumentsDTOV2: + - key + - valid + DidDocumentWithKeyDTO: type: object properties: - projects: - $ref: '#/components/schemas/CompareDocumentsDTO' - presentations: - $ref: '#/components/schemas/CompareDocumentsDTO' + document: + nullable: false + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + keys: + nullable: false + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' required: - - projects - - presentations - PropertiesDTO: + - document + - keys + MigrationConfigPoliciesDTO: type: object properties: - id: - type: string - title: + src: type: string - value: + dst: type: string required: - - id - - title - - value - RecordStatusDTO: + - src + - dst + MigrationConfigDTO: type: object properties: - type: - type: string - policyId: - type: string - uuid: - type: string - status: + policies: + $ref: '#/components/schemas/MigrationConfigPoliciesDTO' + vcs: + type: array + items: + type: string + vps: + type: array + items: + type: string + schemas: + type: object + groups: + type: object + roles: + type: object + blocks: + type: object + tokens: + type: object + migrateState: + type: boolean + migrateRetirePools: + type: boolean + editedVCs: + type: object + retireContractId: type: string required: - - type - - policyId - - uuid - - status - Object: - type: object - properties: {} - RecordActionDTO: + - policies + - vcs + - vps + - schemas + - groups + - roles + - blocks + - tokens + - migrateState + - migrateRetirePools + - editedVCs + - retireContractId + PoliciesValidationDTO: type: object properties: - uuid: - type: string - policyId: - type: string - method: - type: string - action: - type: string - time: - type: string - user: - type: string - target: + policies: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + isValid: type: string + errors: + $ref: '#/components/schemas/ValidationErrorsDTO' required: - - uuid - - policyId - - method - - action - - time - - user - - target - ResultInfoDTO: + - policies + - isValid + - errors + PolicyValidationDTO: type: object properties: - tokens: - type: number - documents: - type: number + policy: + $ref: '#/components/schemas/PolicyDTO' + results: + $ref: '#/components/schemas/ValidationErrorsDTO' required: - - tokens - - documents - ResultDocumentDTO: + - policy + - results + Object: + type: object + properties: {} + ServiceUnavailableErrorDTO: type: object properties: - type: - type: string - schema: - type: string - rate: + code: + type: number + example: 503 + message: type: string - documents: - type: object + example: Error message required: - - type - - schema - - rate - - documents - RunningResultDTO: + - code + - message + PolicyPreviewDTO: type: object properties: - info: - $ref: '#/components/schemas/ResultInfoDTO' - total: - type: number - documents: - $ref: '#/components/schemas/ResultDocumentDTO' + module: + $ref: '#/components/schemas/PolicyDTO' + messageId: + type: string + example: '0000000000.000000001' + schemas: + type: array + items: + type: object + tags: + type: array + items: + type: object + moduleTopicId: + type: string + example: 0.0.1 required: - - info - - total - - documents + - module + - messageId + - schemas + - tags + - moduleTopicId RunningDetailsDTO: type: object properties: @@ -11846,1011 +14137,1180 @@ components: - right - total - documents - RegisteredUsersDTO: + PolicyCategoryDTO: type: object properties: - username: + id: type: string - did: + example: '000000000000000000000001' + name: type: string - parent: + example: Large-Scale + type: type: string - role: + example: PROJECT_SCALE + required: + - id + - name + - type + VersionSchemaDTO: + type: object + properties: + version: + type: string + example: 1.0.0 + required: + - version + MessageSchemaDTO: + type: object + properties: + messageId: type: string - policyRoles: - type: array - items: - type: string + example: '0000000000.000000001' required: - - username - - did - - parent - - role - - policyRoles - ToolDTO: + - messageId + ExportSchemaDTO: type: object properties: id: type: string - uuid: - type: string + example: '000000000000000000000001' name: type: string + example: Schema name description: type: string - config: - type: object - status: - type: string - creator: + example: Description + version: type: string + example: 1.0.0 owner: type: string - topicId: - type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 messageId: type: string - codeVersion: - type: string - createDate: - type: string + example: '0000000000.000000001' required: - id - - uuid - name - description - - config - - status - - creator + - version - owner - - topicId - messageId - - codeVersion - - createDate - Credentials: + SystemSchemaDTO: type: object - required: - - username - - password properties: - username: + name: type: string - password: + example: Schema name + entity: type: string - Account: - type: object + enum: + - STANDARD_REGISTRY + - USER + example: STANDARD_REGISTRY required: - - username - - role + - name + - entity + SettingsDTO: + type: object properties: - username: + ipfsStorageApiKey: type: string - role: + operatorId: type: string - did: + operatorKey: type: string - Session: - type: object required: - - username - - role - - accessToken + - ipfsStorageApiKey + - operatorId + - operatorKey + TagDTO: + type: object properties: - username: + uuid: type: string - role: + example: 00000000-0000-0000-0000-000000000000 + name: type: string - accessToken: + example: Tag label + description: type: string - User: - type: object - required: - - username - - role - properties: - confirmed: + example: Description + owner: type: string - failed: + example: DID + date: type: string - username: + example: '1900-01-01T00:00:00.000Z' + entity: type: string - role: + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + status: type: string - hederaAccountId: + enum: + - Draft + - Published + - History + example: Published + operation: type: string - hederaAccountKey: + enum: + - Create + - Delete + example: Create + topicId: type: string - did: + example: 0.0.1 + messageId: type: string - didDocument: - type: object - vcDocument: - type: object - parent: + example: '0000000000.000000001' + policyId: type: string - topicId: + example: '000000000000000000000001' + uri: type: string - Schema: - type: object + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + target: + type: string + example: '0000000000.000000001' + localTarget: + type: string + example: '000000000000000000000001' + document: + type: object required: - - id + - uuid - name - description + - owner + - date - entity + - status + - operation + - topicId + - messageId + - policyId + - uri + - target + - localTarget - document + TagFilterDTO: + type: object properties: - id: - type: string - iri: - type: string - uuid: - type: string - name: - type: string - description: - type: string entity: type: string - hash: - type: string - status: - type: string - document: - oneOf: - - type: string - - type: object - topicId: + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: type: string - version: + example: '0000000000.000000001' + targets: + example: '0000000000.000000001' + type: array + items: + type: string + required: + - entity + - target + - targets + TagMapDTO: + type: object + properties: + entity: type: string - owner: + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: type: string - messageId: + example: '0000000000.000000001' + refreshDate: type: string - ImportSchema: - type: object - required: - - schemes - properties: - schemes: + example: '1900-01-01T00:00:00.000Z' + tags: type: array items: - type: object - required: - - document - - entity - - name - - uuid - properties: - document: - type: string - entity: - type: string - hash: - type: string - name: - type: string - uuid: - type: string - ExportSchema: + $ref: '#/components/schemas/TagDTO' + required: + - entity + - target + - refreshDate + - tags + StatusDTO: type: object + properties: + message: + type: string + description: Text + type: + type: string + description: Type + enum: + - Processing + - Completed + - Info + example: Info required: - - ids + - message + - type + TaskStatusDTO: + type: object properties: - name: + action: type: string - version: + description: Task type + example: Create policy + userId: type: string - messageId: + description: User Id + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + expectation: + type: number + description: Expected count of task phases + example: 0 + taskId: type: string - Token: - type: object + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + date: + type: string + description: Date + example: '1900-01-01T00:00:00.000Z' + statuses: + type: array + items: + $ref: '#/components/schemas/StatusDTO' + result: + type: object + error: + type: object required: - - changeSupply - - decimals - - enableAdmin - - enableKYC - - enableFreeze - - enableWipe - - initialSupply - - tokenName - - tokenSymbol - - tokenType + - action + - userId + - expectation + - taskId + - date + - statuses + - result + - error + TokenDTO: + type: object properties: - changeSupply: - type: boolean + tokenId: + type: string + example: 0.0.1 + tokenName: + type: string + example: Token name + tokenSymbol: + type: string + example: Token symbol + tokenType: + type: string + enum: + - fungible + - non-fungible + example: non-fungible + initialSupply: + type: string + example: '0' decimals: type: string + example: '0' + changeSupply: + type: boolean + description: Add Supply key + example: true enableAdmin: type: boolean + description: Add Admin key + example: true enableFreeze: type: boolean + description: Add Freeze key + example: true enableKYC: type: boolean + description: Add KYC key + example: true enableWipe: type: boolean - initialSupply: - type: string - tokenName: - type: string - tokenSymbol: - type: string - tokenType: - type: string - TokenInfo: - type: object + description: Add Wipe key + example: true required: - - id - tokenId - tokenName - tokenSymbol - tokenType + - initialSupply - decimals - - associated - - balance - - frozen - - kyc + - changeSupply + - enableAdmin + - enableFreeze + - enableKYC + - enableWipe + TokenInfoDTO: + type: object properties: id: type: string + example: '000000000000000000000001' tokenId: type: string + example: 0.0.1 tokenName: type: string + example: Token name tokenSymbol: type: string + example: Token symbol tokenType: type: string + enum: + - fungible + - non-fungible + example: non-fungible decimals: type: string + example: '0' associated: type: boolean - balance: - type: string + description: '' + example: true frozen: type: boolean + description: '' + example: true kyc: type: boolean + description: '' + example: true + balance: + type: string + description: User balance + example: '0' enableAdmin: type: boolean - enableKYC: - type: boolean + description: There is an Admin key + example: true enableFreeze: type: boolean + description: There is an Freeze key + example: true + enableKYC: + type: boolean + description: There is an KYC key + example: true enableWipe: type: boolean - PolicyConfig: - type: object + description: There is an Wipe key + example: true required: - - name - - version - - description - - topicDescription - - config - - topicId - - policyTag + - id + - tokenId + - tokenName + - tokenSymbol + - tokenType + - decimals + - associated + - frozen + - kyc + - balance + - enableAdmin + - enableFreeze + - enableKYC + - enableWipe + ThemeRoleDTO: + type: object properties: - id: - type: string - uuid: - type: string - name: + description: type: string - version: + example: Description + text: type: string - description: + description: Text color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + background: type: string - topicDescription: + description: Background color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + border: type: string - config: - type: object - status: + description: Border color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + shape: type: string - owner: + description: Object shape + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - '5' + example: '0' + borderWidth: + type: string + description: Border width + enum: + - 0px + - 1px + - 2px + - 3px + - 4px + - 5px + - 6px + - 7px + example: 2px + filterType: + type: string + description: Filter by type + enum: + - type + - api + - role + example: type + filterValue: + oneOf: + - type: string + - type: array + items: + type: string + required: + - description + - text + - background + - border + - shape + - borderWidth + - filterType + - filterValue + ThemeDTO: + type: object + properties: + id: type: string - policyRoles: - type: array - items: - type: string - topicId: + example: '000000000000000000000001' + uuid: type: string - policyTag: + example: 00000000-0000-0000-0000-000000000000 + name: type: string - policyTopics: + example: Theme name + rules: type: array items: - type: object - properties: - name: - type: string - description: - type: string - type: - type: string - static: - type: boolean - TrustChains: - type: object + $ref: '#/components/schemas/ThemeRoleDTO' required: - - chain - - userMap + - id + - uuid + - name + - rules + VpDTO: + type: object properties: - chain: + '@context': type: array items: - type: object - required: - - id - - type - - tag - - label - - schema - - owner - - document - properties: - id: - type: string - type: - type: string - tag: - type: string - label: - type: string - schema: - type: string - owner: - type: string - document: - type: object - userMap: + type: string + id: + type: string + example: 00000000-0000-0000-0000-000000000000 + type: + type: array + items: + type: string + verifiableCredential: type: array items: type: object - required: - - did - - username - properties: - did: - type: string - username: - type: string - VerifiablePresentation: - type: object + proof: + type: object required: - - hash + - '@context' - id - - policyId - - signature - - status - - tag - type - - updateDate - - createDate - - owner - - document + - verifiableCredential + - proof + VpDocumentDTO: + type: object properties: - hash: - type: string id: type: string + example: '000000000000000000000001' policyId: type: string - signature: + example: '000000000000000000000001' + hash: type: string + example: hash + signature: + type: number + example: 0 status: type: string + enum: + - NEW + - ISSUE + - REVOKE + - SUSPEND + - RESUME + - FAILED + example: NEW tag: type: string + example: Block tag type: type: string - updateDate: - type: string + example: Document type createDate: type: string + example: '1900-01-01T00:00:00.000Z' + updateDate: + type: string + example: '1900-01-01T00:00:00.000Z' owner: type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 document: - type: object - PublishPolicy: - type: object - required: - - errors - - isValid - - policies - properties: - errors: - type: array - items: - type: object - isValid: - type: boolean - policies: - type: array - items: - type: object - ValidatePolicy: - type: object - required: - - config - - results - properties: - config: - type: object - results: - type: object - PolicyBlock: - type: object + $ref: '#/components/schemas/VpDTO' required: - id - - blockType - - isActive - - uiMetaData - properties: - id: - type: string - blockType: - type: string - isActive: - type: boolean - uiMetaData: - type: object - blocks: - type: array - items: - type: object - PolicyBlockData: + - policyId + - hash + - signature + - status + - tag + - type + - createDate + - updateDate + - owner + - document + WizardConfigDTO: type: object - required: - - id - - isActive - - uiMetaData - - data properties: - id: - type: string - blockType: - type: string - isActive: - type: boolean - uiMetaData: - type: object - data: - type: object - fields: + roles: type: array items: - type: object - index: - type: number - roles: + type: string + policy: + type: string + properties: + name: + type: string + description: + type: string + topicDescription: + type: string + policyTag: + type: string + schemas: + properties: + name: + type: string + iri: + type: string + isApproveEnable: + type: boolean + isMintSchema: + type: boolean + mintOptions: + type: object + properties: + tokenId: + type: string + rule: + type: string + dependencySchemaIri: + type: string + relationshipsSchemaIri: + type: string + initialRolesFor: + type: array + items: + type: string + rolesConfig: + type: array + items: + type: object + properties: + role: + type: string + isApprover: + type: boolean + isCreator: + type: boolean + gridColumns: + type: array + items: + type: object + properties: + field: + type: string + title: + type: string type: array items: type: string - blocks: + trustChain: + properties: + role: + type: string + mintSchemaIri: + type: string + viewOnlyOwnDocuments: + type: boolean type: array items: - $ref: '#/components/schemas/PolicyBlock' - ExportPolicy: - type: object - required: - - name - - version - - messageId - properties: - name: - type: string - version: - type: string - tokens: - type: string - PreviewPolicy: - type: object + type: string required: + - roles - policy - schemas - - tokens - properties: - policy: - type: object - schemas: - type: array - items: - type: object - tokens: - type: array - items: - type: object - Error: + - trustChain + WizardResultDTO: type: object - required: - - code - - message properties: - code: - type: number - message: + policyId: type: string - ExternalData: - type: object + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' required: - - owner - - policyTag - - document - properties: - owner: - type: string - policyTag: - type: string - document: - type: object - HederaAccount: + - policyId + - wizardConfig + WizardConfigAsyncDTO: type: object + properties: + saveState: + type: boolean + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' required: - - id - - key + - saveState + - wizardConfig + WizardPreviewDTO: + type: object properties: - id: - type: string - key: - type: string - CommonSettings: + policyConfig: + $ref: '#/components/schemas/PolicyDTO' + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' + required: + - policyConfig + - wizardConfig + BrandingDTO: type: object properties: - operatorId: + headerColor: type: string - operatorKey: - type: string - nftApiKey: - deprecated: true + primaryColor: type: string - ipfsStorageApiKey: + companyName: type: string - LogFilters: - type: object - properties: - type: + companyLogoUrl: type: string - startDate: + loginBannerUrl: type: string - endDate: + faviconUrl: type: string - attributes: - type: array - items: - type: string - message: + headerColor1: type: string - pageSize: - type: number - pageIndex: - type: number - sortDirection: + termsAndConditions: type: string - enum: - - ASC - - DESC - Log: + required: + - headerColor + - primaryColor + - companyName + - companyLogoUrl + - loginBannerUrl + - faviconUrl + - headerColor1 + - termsAndConditions + SuggestionsInputDTO: type: object properties: - type: - type: string - datetime: - type: string - message: + blockType: type: string - attributes: + children: + nullable: true type: array items: - type: string - Task: - type: object - properties: - taskId: - type: string - expectation: - type: number - TaskStatus: + type: object + required: + - blockType + - children + SuggestionsOutputDTO: type: object properties: - date: + next: type: string - name: + nested: type: string - statuses: - type: array - items: - type: object - properties: - type: - type: string - message: - type: string - result: - type: object - error: - type: object - Artifact: + required: + - next + - nested + SuggestionsConfigItemDTO: type: object properties: id: type: string - name: - type: string - uuid: - type: string - extention: - type: string type: type: string - MultiPolicyConfig: + enum: + - Policy + - Module + index: + type: number + required: + - id + - type + - index + SuggestionsConfigDTO: type: object properties: - id: - type: string - uuid: + items: + $ref: '#/components/schemas/SuggestionsConfigItemDTO' + required: + - items + NotificationDTO: + type: object + properties: + title: type: string - owner: + message: type: string type: type: string - instanceTopicId: + enum: + - INFO + - ERROR + - WARN + - SUCCESS + action: type: string - mainPolicyTopicId: + enum: + - POLICY_CONFIGURATION + - POLICY_VIEW + - POLICIES_PAGE + - SCHEMAS_PAGE + - TOKENS_PAGE + - PROFILE_PAGE + result: + type: object + read: + type: boolean + old: + type: boolean + required: + - title + - message + - type + - action + - result + - read + - old + ProgressDTO: + type: object + properties: + action: type: string - synchronizationTopicId: + message: type: string - policyOwner: + progress: + type: number + type: type: string - user: + enum: + - INFO + - ERROR + - WARN + - SUCCESS + taskId: type: string - Contract: + required: + - action + - message + - progress + - type + - taskId + ProjectDTO: type: object properties: id: type: string - contractId: + policyId: type: string - description: + policyName: type: string - owner: + registered: type: string - isOwnerCreator: + title: type: string - status: + companyName: type: string - RetireRequest: + sectoralScope: + type: string + required: + - id + - policyId + - policyName + - registered + - title + - companyName + - sectoralScope + CompareDocumentsV2DTO: + type: object + properties: + projects: + $ref: '#/components/schemas/CompareDocumentsDTO' + presentations: + $ref: '#/components/schemas/CompareDocumentsDTO' + required: + - projects + - presentations + PropertiesDTO: type: object properties: id: type: string - contractId: - type: string - baseTokenId: - type: string - owner: + title: type: string - oppositeTokenId: + value: type: string - baseTokenCount: - type: number - oppositeTokenCount: - type: number - Module: + required: + - id + - title + - value + RecordStatusDTO: type: object properties: - id: - type: string - uuid: + type: type: string - name: + policyId: type: string - description: + uuid: type: string - config: - type: object status: type: string - creator: + required: + - type + - policyId + - uuid + - status + RecordActionDTO: + type: object + properties: + uuid: type: string - owner: + policyId: type: string - topicId: + method: type: string - messageId: + action: type: string - codeVersion: + time: type: string - createDate: + user: type: string - type: + target: type: string - PreviewModule: + required: + - uuid + - policyId + - method + - action + - time + - user + - target + ResultInfoDTO: type: object properties: - module: - $ref: '#/components/schemas/Module' - ExportModule: + tokens: + type: number + documents: + type: number + required: + - tokens + - documents + ResultDocumentDTO: type: object properties: - uuid: - type: string - name: - type: string - description: + type: type: string - messageId: + schema: type: string - owner: + rate: type: string - PublishModule: - type: object - properties: - errors: + documents: type: object - isValid: - type: boolean - module: - $ref: '#/components/schemas/Module' - ValidateModule: + required: + - type + - schema + - rate + - documents + RunningResultDTO: type: object properties: - module: - $ref: '#/components/schemas/Module' - results: - type: object - Tag: - type: object + info: + $ref: '#/components/schemas/ResultInfoDTO' + total: + type: number + documents: + $ref: '#/components/schemas/ResultDocumentDTO' required: - - name - - entity - - localTarget + - info + - total + - documents + RoleDTO: + type: object properties: uuid: type: string example: 00000000-0000-0000-0000-000000000000 name: type: string - example: Tag label + example: Name description: type: string example: Description owner: type: string - example: did - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - target: + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + permissions: type: string - example: '0000000000.000000000' - localTarget: + enum: &ref_39 + - ANALYTIC_POLICY_READ + - ANALYTIC_MODULE_READ + - ANALYTIC_TOOL_READ + - ANALYTIC_SCHEMA_READ + - ANALYTIC_DOCUMENT_READ + - ARTIFACTS_FILE_READ + - ARTIFACTS_FILE_CREATE + - ARTIFACTS_FILE_DELETE + - CONTRACTS_CONTRACT_READ + - CONTRACTS_CONTRACT_EXECUTE + - CONTRACTS_CONTRACT_MANAGE + - MODULES_MODULE_READ + - MODULES_MODULE_CREATE + - MODULES_MODULE_UPDATE + - MODULES_MODULE_DELETE + - MODULES_MODULE_REVIEW + - POLICIES_POLICY_READ + - POLICIES_POLICY_CREATE + - POLICIES_POLICY_UPDATE + - POLICIES_POLICY_DELETE + - POLICIES_POLICY_REVIEW + - POLICIES_POLICY_EXECUTE + - POLICIES_POLICY_MANAGE + - SCHEMAS_SCHEMA_READ + - SCHEMAS_SCHEMA_CREATE + - SCHEMAS_SCHEMA_UPDATE + - SCHEMAS_SCHEMA_DELETE + - SCHEMAS_SCHEMA_REVIEW + - TOOLS_TOOL_READ + - TOOLS_TOOL_CREATE + - TOOLS_TOOL_UPDATE + - TOOLS_TOOL_DELETE + - TOOLS_TOOL_REVIEW + - TOKENS_TOKEN_READ + - TOKENS_TOKEN_CREATE + - TOKENS_TOKEN_UPDATE + - TOKENS_TOKEN_DELETE + - TOKENS_TOKEN_EXECUTE + - TOKENS_TOKEN_MANAGE + - TAGS_TAG_READ + - TAGS_TAG_CREATE + - SUGGESTIONS_SUGGESTIONS_READ + - SUGGESTIONS_SUGGESTIONS_UPDATE + - PERMISSIONS_ROLE_READ + - PERMISSIONS_ROLE_CREATE + - PERMISSIONS_ROLE_UPDATE + - PERMISSIONS_ROLE_DELETE + - PERMISSIONS_ROLE_MANAGE + - ACCESS_POLICY_ALL + - ACCESS_POLICY_ASSIGNED + - ACCESS_POLICY_PUBLISHED + - ACCESS_POLICY_ASSIGNED_AND_PUBLISHED + - DELEGATION_ROLE_MANAGE + example: + - POLICIES_POLICY_READ + required: + - uuid + - name + - description + - owner + - permissions + PermissionsDTO: + type: object + properties: + name: type: string - example: db id - status: + enum: *ref_39 + example: ANALYTIC_POLICY_READ + category: type: string enum: - - Draft - - Published - - History - example: Published - operation: + - ACCOUNTS + - SESSION + - PROFILES + - ANALYTIC + - ARTIFACTS + - POLICIES + - BRANDING + - CONTRACTS + - DEMO + - IPFS + - LOG + - MODULES + - SETTINGS + - SUGGESTIONS + - TAGS + - SCHEMAS + - TOKENS + - AUDIT + - TOOLS + - PERMISSIONS + - ACCESS + - DELEGATION + example: ANALYTIC + entity: type: string enum: - - Create - - Delete - example: Create - date: - type: string - example: '1900-01-01T00:00:00.000Z' - topicId: - type: string - example: 0.0.0000000 - messageId: - type: string - example: '0000000000.000000000' - policyId: - type: string - example: db id - uri: + - ACCOUNT + - STANDARD_REGISTRY + - USER + - BALANCE + - RESTORE + - RECORD + - POLICY + - TOOL + - DOCUMENT + - SCHEMA + - MODULE + - FILE + - CONFIG + - CONTRACT + - WIPE_REQUEST + - WIPE_ADMIN + - WIPE_MANAGER + - WIPER + - POOL + - RETIRE_REQUEST + - RETIRE_ADMIN + - PERMISSIONS + - KEY + - LOG + - MIGRATION + - SETTINGS + - SUGGESTIONS + - TAG + - SYSTEM_SCHEMA + - THEME + - TOKEN + - TRUST_CHAIN + - ROLE + example: POLICY + action: type: string - example: document uri - document: - type: object - TagMap: - type: object + enum: + - ALL + - READ + - CREATE + - UPDATE + - DELETE + - REVIEW + - AUDIT + - EXECUTE + - MANAGE + - ASSIGNED + - PUBLISHED + - ASSIGNED_AND_PUBLISHED + example: READ + disabled: + type: boolean + example: false + dependOn: + example: + - POLICIES_POLICY_READ + type: array + items: + type: string required: + - name + - category - entity - - target - - refreshDate - - tags + - action + - disabled + - dependOn + AssignPolicyDTO: + type: object properties: - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - target: - type: string - example: db id - refreshDate: - type: string - example: '1900-01-01T00:00:00.000Z' - tags: + policyIds: + example: + - '000000000000000000000001' type: array items: - $ref: '#/components/schemas/Tag' - Theme: - type: object + type: string + assign: + type: boolean + example: true required: - - uuid - - name - - rules + - policyIds + - assign + WorkersTasksDTO: + type: object properties: + createDate: + type: string + done: + type: boolean id: type: string - example: db id - uuid: + isRetryableTask: + type: boolean + processedTime: type: string - example: 00000000-0000-0000-0000-000000000000 - name: + sent: + type: boolean + taskId: + type: string + type: + type: string + updateDate: type: string - example: Theme name - rules: - type: array - items: - type: object - required: - - text - - background - - border - - shape - - borderWidth - - filterType - - filterValue - properties: - description: - type: string - example: description - text: - type: string - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - background: - type: string - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - border: - type: string - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - shape: - type: string - enum: - - '0' - - '1' - - '2' - - '3' - - '4' - - '5' - example: '0' - borderWidth: - type: string - enum: - - 0px - - 1px - - 2px - - 3px - - 4px - - 5px - - 6px - - 7px - example: 2px - filterType: - type: string - enum: - - type - - api - - role - example: type - filterValue: - oneOf: - - type: string - - type: array - items: - type: string - example: - - type - WizardConfig: - type: object required: - - policy - - roles - - schemas - - trustChain - properties: - roles: - type: array - items: - type: string - policy: - type: object - properties: - name: - type: string - description: - type: string - topicDescription: - type: string - policyTag: - type: string - schemas: - type: array - items: - type: object - properties: - name: - type: string - iri: - type: string - isApproveEnable: - type: boolean - isMintSchema: - type: boolean - mintOptions: - type: object - properties: - tokenId: - type: string - rule: - type: string - dependencySchemaIri: - type: string - relationshipsSchemaIri: - type: string - initialRolesFor: - type: array - items: - type: string - rolesConfig: - type: array - items: - type: object - properties: - role: - type: string - isApprover: - type: boolean - isCreator: - type: boolean - gridColumns: - type: array - items: - type: object - properties: - field: - type: string - title: - type: string - trustChain: - type: array - items: - type: object - properties: - role: - type: string - mintSchemaIri: - type: string - viewOnlyOwnDocuments: - type: boolean + - createDate + - done + - id + - isRetryableTask + - processedTime + - sent + - taskId + - type + - updateDate diff --git a/docs/.gitbook/assets/swagger (2).yaml b/docs/.gitbook/assets/swagger (2).yaml index 1d18f0fd00..dc6c65d387 100644 --- a/docs/.gitbook/assets/swagger (2).yaml +++ b/docs/.gitbook/assets/swagger (2).yaml @@ -1,15316 +1,18162 @@ -openapi: 3.0.0 -paths: - /accounts/session: - get: - operationId: AccountApi_getSession - summary: Returns current session of the user. - description: Returns current user session. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsSessionResponseDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_0 - - accounts - security: - - bearer: [] - /accounts/register: - post: - operationId: AccountApi_register - summary: Registers a new user account. - description: Object that contain username, password and role (optional) fields. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterUserDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsResponseDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - /accounts/login: - post: - operationId: AccountApi_login - summary: Logs user into the system. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LoginUserDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsSessionResponseDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - /accounts/change-password: - post: - operationId: AccountApi_changePassword - summary: Change user password. - parameters: [] - requestBody: - required: true - description: User credentials. - content: - application/json: - schema: - $ref: '#/components/schemas/ChangePasswordDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsSessionResponseDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - /accounts/access-token: - post: - operationId: AccountApi_getAccessToken - summary: Returns access token. - description: Returns access token. - parameters: [] - responses: - '200': - description: Successful operation. - tags: *ref_0 - /accounts: - get: - operationId: AccountApi_getAllAccounts - summary: Returns a list of users, excluding Standard Registry and Auditors. - description: >- - Returns all users except those with roles Standard Registry and Auditor. - Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsResponseDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - security: - - bearer: [] - /accounts/standard-registries: - get: - operationId: AccountApi_getStandardRegistries - summary: Returns all Standard Registries. - description: Returns all Standard Registries. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsResponseDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - security: - - bearer: [] - /accounts/standard-registries/aggregated: - get: - operationId: AccountApi_getAggregatedStandardRegistries - summary: Returns all Standard Registries aggregated with polices and vcDocuments. - description: Returns all Standard Registries aggregated with polices and vcDocuments - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/AggregatedDTOItem' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - security: - - bearer: [] - /accounts/balance: - get: - operationId: AccountApi_getBalance - summary: Returns user's Hedera account balance. - description: Requests current Hedera account balance. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BalanceResponseDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - security: - - bearer: [] - /analytics/search/policies: - post: - operationId: AnalyticsApi_searchPolicies - summary: Search policies. - description: >- - Search policies. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterSearchPoliciesDTO' - examples: - Filter: - value: - policyId: '000000000000000000000001' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SearchPoliciesDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_1 - - analytics - security: - - bearer: [] - /analytics/compare/policies: - post: - operationId: AnalyticsApi_comparePolicies - summary: Compare policies. - description: >- - Compare policies. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterPoliciesDTO' - examples: - Filter1: - value: - policyId1: '000000000000000000000001' - policyId2: '000000000000000000000001' - eventsLvl: '0' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - Filter2: - value: - policyIds: - - '000000000000000000000001' - - '000000000000000000000001' - eventsLvl: '0' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - Filter3: - value: - policies: - - type: id - value: '000000000000000000000001' - - type: message - value: '0000000000.000000001' - - type: file - value: - id: 00000000-0000-0000-0000-000000000000 - name: File Name - value: base64... - eventsLvl: '0' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ComparePoliciesDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /analytics/compare/modules: - post: - operationId: AnalyticsApi_compareModules - summary: Compare modules. - description: >- - Compare modules. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterModulesDTO' - examples: - Filter: - value: - moduleId1: '000000000000000000000001' - moduleId2: '000000000000000000000001' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CompareModulesDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /analytics/compare/schemas: - post: - operationId: AnalyticsApi_compareSchemas - summary: Compare schemas. - description: >- - Compare schemas. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterSchemasDTO' - examples: - Filter: - value: - schemaId1: '000000000000000000000001' - schemaId2: '000000000000000000000001' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CompareSchemasDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /analytics/compare/documents: - post: - operationId: AnalyticsApi_compareDocuments - summary: Compare documents. - description: >- - Compare documents. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterDocumentsDTO' - examples: - Filter1: - value: - documentId1: '000000000000000000000001' - documentId2: '000000000000000000000001' - Filter2: - value: - documentIds: - - '000000000000000000000001' - - '000000000000000000000001' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CompareDocumentsDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /analytics/compare/tools: - post: - operationId: AnalyticsApi_compareTools - summary: Compare tools. - description: >- - Compare tools. Only users with the Standard Registry role are allowed to - make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterToolsDTO' - examples: - Filter1: - value: - toolId1: '000000000000000000000001' - toolId2: '000000000000000000000001' - Filter2: - value: - toolIds: - - '000000000000000000000001' - - '000000000000000000000001' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CompareToolsDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /analytics/compare/policies/export: - post: - operationId: AnalyticsApi_comparePoliciesExport - summary: Compare policies. - description: >- - Compare policies. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: type - required: true - in: query - description: File type - example: csv - schema: - type: string - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterPoliciesDTO' - examples: - Filter1: - value: - policyId1: '000000000000000000000001' - policyId2: '000000000000000000000001' - eventsLvl: '0' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - Filter2: - value: - policyIds: - - '000000000000000000000001' - - '000000000000000000000001' - eventsLvl: '0' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - Filter3: - value: - policies: - - type: id - value: '000000000000000000000001' - - type: message - value: '0000000000.000000001' - - type: file - value: - id: 00000000-0000-0000-0000-000000000000 - name: File Name - value: base64... - eventsLvl: '0' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /analytics/compare/modules/export: - post: - operationId: AnalyticsApi_compareModulesExport - summary: Compare modules. - description: >- - Compare modules. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: type - required: true - in: query - description: File type - example: csv - schema: - type: string - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterModulesDTO' - examples: - Filter: - value: - moduleId1: '000000000000000000000001' - moduleId2: '000000000000000000000001' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /analytics/compare/schemas/export: - post: - operationId: AnalyticsApi_compareSchemasExport - summary: Compare schemas. - description: >- - Compare schemas. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: type - required: true - in: query - description: File type - example: csv - schema: - type: string - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterSchemasDTO' - examples: - Filter: - value: - schemaId1: '000000000000000000000001' - schemaId2: '000000000000000000000001' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /analytics/compare/documents/export: - post: - operationId: AnalyticsApi_compareDocumentsExport - summary: Compare documents. - description: >- - Compare documents. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: type - required: true - in: query - description: File type - example: csv - schema: - type: string - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterDocumentsDTO' - examples: - Filter1: - value: - documentId1: '000000000000000000000001' - documentId2: '000000000000000000000001' - Filter2: - value: - documentIds: - - '000000000000000000000001' - - '000000000000000000000001' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /analytics/compare/tools/export: - post: - operationId: AnalyticsApi_compareToolsExport - summary: Compare tools. - description: >- - Compare tools. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: type - required: true - in: query - description: File type - example: csv - schema: - type: string - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterToolsDTO' - examples: - Filter1: - value: - toolId1: '000000000000000000000001' - toolId2: '000000000000000000000001' - Filter2: - value: - toolIds: - - '000000000000000000000001' - - '000000000000000000000001' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /analytics/search/blocks: - post: - operationId: AnalyticsApi_searchBlocks - summary: Search same blocks. - description: >- - Search same blocks. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterSearchBlocksDTO' - examples: - Filter: - value: - uuid: '' - config: {} - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SearchBlocksDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearer: [] - /artifacts: - get: - operationId: ArtifactApi_getArtifactsV2 - summary: Returns all artifacts. - description: Returns all artifacts. - parameters: - - name: id - required: false - in: query - description: Artifact identifier - example: '000000000000000000000001' - schema: - type: string - - name: type - required: false - in: query - description: Tool|Policy - example: policy - schema: - enum: - - tool - - policy - type: string - - name: policyId - required: false - in: query - description: Policy identifier - example: '000000000000000000000001' - schema: - type: string - - name: toolId - required: false - in: query - description: Tool identifier - example: '000000000000000000000001' - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ArtifactDTOItem' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_2 - - artifacts - security: - - bearer: [] - /artifacts/{parentId}: - post: - operationId: ArtifactApi_uploadArtifacts - summary: Upload artifact. - description: Upload artifact. For users with the Standard Registry role only. - parameters: - - name: parentId - required: true - in: path - description: Parent ID - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Form data with artifacts. - content: - multipart/form-data: - schema: - type: array - items: - type: object - properties: - artifacts: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ArtifactDTOItem' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearer: [] - /artifacts/{artifactId}: - delete: - operationId: ArtifactApi_deleteArtifact - summary: Delete artifact. - description: Delete artifact. - parameters: - - name: artifactId - required: true - in: path - description: Artifact ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearer: [] - /contracts: - get: - operationId: ContractsApi_getContracts - summary: Return a list of all contracts. - description: Returns all contracts. - parameters: - - name: type - required: true - in: query - description: Contract type - example: RETIRE - schema: - enum: - - WIPE - - RETIRE - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: true - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Contracts. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ContractDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_3 - - contracts - security: - - bearer: [] - post: - operationId: ContractsApi_createContract - summary: Create contract. - description: >- - Create smart-contract. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ContractConfigDTO' - responses: - '201': - description: Created contract. - content: - application/json: - schema: - $ref: '#/components/schemas/ContractDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/import: - post: - operationId: ContractsApi_importContract - summary: Import contract. - description: >- - Import smart-contract. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - contractId: - type: string - description: Hedera Identifier - example: 0.0.1 - description: - type: string - required: - - contractId - responses: - '200': - description: Imported contract. - content: - application/json: - schema: - $ref: '#/components/schemas/ContractDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/{contractId}/permissions: - get: - operationId: ContractsApi_contractPermissions - summary: Get contract permissions. - description: >- - Get smart-contract permissions. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract Identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Contract permissions. - content: - application/json: - schema: - type: number - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/{contractId}: - delete: - operationId: ContractsApi_removeContract - summary: Remove contract. - description: >- - Remove smart-contract. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract Identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/requests: - get: - operationId: ContractsApi_getWipeRequests - summary: Return a list of all wipe requests. - description: >- - Returns all wipe requests. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: query - description: Contract identifier - example: 0.0.1 - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: true - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/WiperRequestDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/{contractId}/requests/enable: - post: - operationId: ContractsApi_enableWipeRequests - summary: Enable wipe requests. - description: >- - Enable wipe contract requests. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/{contractId}/requests/disable: - post: - operationId: ContractsApi_disableWipeRequests - summary: Disable wipe requests. - description: >- - Disable wipe contract requests. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/requests/{requestId}/approve: - post: - operationId: ContractsApi_approveWipeRequest - summary: Approve wipe request. - description: >- - Approve wipe contract request. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: requestId - required: true - in: path - description: Request identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/requests/{requestId}/reject: - delete: - operationId: ContractsApi_rejectWipeRequest - summary: Reject wipe request. - description: >- - Reject wipe contract request. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: requestId - required: true - in: path - description: Request identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: ban - required: false - in: query - description: Reject and ban - example: true - schema: - type: boolean - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/{contractId}/requests: - delete: - operationId: ContractsApi_clearWipeRequests - summary: Clear wipe requests. - description: >- - Clear wipe contract requests. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/{contractId}/requests/{hederaId}: - delete: - operationId: ContractsApi_clearWipeRequestsWithHederaId - summary: Clear wipe requests for hedera account. - description: >- - Clear wipe contract requests for specific hedera account. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/{contractId}/admin/{hederaId}: - post: - operationId: ContractsApi_wipeAddAdmin - summary: Add wipe admin. - description: >- - Add wipe contract admin. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - delete: - operationId: ContractsApi_wipeRemoveAdmin - summary: Remove wipe admin. - description: >- - Remove wipe contract admin. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/{contractId}/manager/{hederaId}: - post: - operationId: ContractsApi_wipeAddManager - summary: Add wipe manager. - description: >- - Add wipe contract manager. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - delete: - operationId: ContractsApi_wipeRemoveManager - summary: Remove wipe manager. - description: >- - Remove wipe contract admin. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/{contractId}/wiper/{hederaId}: - post: - operationId: ContractsApi_wipeAddWiper - summary: Add wipe wiper. - description: >- - Add wipe contract wiper. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - delete: - operationId: ContractsApi_wipeRemoveWiper - summary: Remove wipe wiper. - description: >- - Remove wipe contract admin. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/wipe/{contractId}/wiper/{hederaId}/{tokenId}: - post: - operationId: ContractsApi_wipeAddWiperWithToken - summary: Add wipe wiper for token. - description: >- - Add wipe contract wiper for specific token. Only users with the Standard - Registry role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - - name: tokenId - required: true - in: path - description: Token identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - delete: - operationId: ContractsApi_wipeRemoveWiperWithToken - summary: Remove wipe wiper for token. - description: >- - Remove wipe contract wiper for specific token. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - - name: tokenId - required: true - in: path - description: Token identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/{contractId}/pools/sync: - post: - operationId: ContractsApi_retireSyncPools - summary: Sync retire pools. - description: >- - Sync retire contract pools. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Sync date. - content: - application/json: - schema: - $ref: '#/components/schemas/Date' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/requests: - get: - operationId: ContractsApi_getRetireRequests - summary: Return a list of all retire requests. - description: Returns all retire requests. - parameters: - - name: contractId - required: true - in: query - description: Contract identifier - example: 0.0.1 - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: true - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RetireRequestDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/pools: - get: - operationId: ContractsApi_getRetirePools - summary: Return a list of all retire pools. - description: Returns all retire pools. - parameters: - - name: contractId - required: true - in: query - description: Contract identifier - example: 0.0.1 - schema: - type: string - - name: tokens - required: true - in: query - description: Tokens - example: 0.0.1,0.0.2,0.0.3 - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: true - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RetirePoolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/{contractId}/requests: - delete: - operationId: ContractsApi_clearRetireRequests - summary: Clear retire requests. - description: >- - Clear retire contract requests. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/{contractId}/pools: - delete: - operationId: ContractsApi_clearRetirePools - summary: Clear retire pools. - description: >- - Clear retire contract pools. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - post: - operationId: ContractsApi_setRetirePool - summary: Set retire pool. - description: >- - Set retire contract pool. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RetirePoolTokenDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RetirePoolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/pools/{poolId}: - delete: - operationId: ContractsApi_unsetRetirePool - summary: Unset retire pool. - description: >- - Unset retire contract pool. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: poolId - required: true - in: path - description: Pool Identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/requests/{requestId}: - delete: - operationId: ContractsApi_unsetRetireRequest - summary: Unset retire request. - description: >- - Unset retire contract request. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: requestId - required: true - in: path - description: Request Identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/pools/{poolId}/retire: - post: - operationId: ContractsApi_retire - summary: Retire tokens. - description: Retire tokens. - parameters: - - name: poolId - required: true - in: path - description: Pool Identifier - example: 652745597a7b53526de37c05 - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RetireRequestTokenDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/requests/{requestId}/approve: - post: - operationId: ContractsApi_approveRetire - summary: Approve retire request. - description: >- - Approve retire contract request. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: requestId - required: true - in: path - description: Request identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/requests/{requestId}/cancel: - delete: - operationId: ContractsApi_cancelRetireRequest - summary: Cancel retire request. - description: Cancel retire contract request. - parameters: - - name: requestId - required: true - in: path - description: Request identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire/{contractId}/admin/{hederaId}: - post: - operationId: ContractsApi_retireAddAdmin - summary: Add retire admin. - description: >- - Add retire contract admin. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - delete: - operationId: ContractsApi_retireRemoveAdmin - summary: Remove wipe admin. - description: >- - Remove wipe contract admin. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /contracts/retire: - get: - operationId: ContractsApi_getRetireVCs - summary: Return a list of all retire vcs. - description: Returns all retire vcs. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: true - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 - security: - - bearer: [] - /demo/registered-users: - get: - operationId: DemoApi_registeredUsers - summary: Returns list of registered users. - description: Returns list of registered users. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RegisteredUsersDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_4 - - demo - /demo/random-key: - get: - operationId: DemoApi_randomKey - summary: Generate demo key. - description: Generate demo key. - parameters: [] - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 - security: - - bearer: [] - /demo/push/random-key: - get: - operationId: DemoApi_pushRandomKey - summary: Generate demo key. - description: Generate demo key. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 - security: - - bearer: [] - /external: - post: - operationId: ExternalApi_receiveExternalData - summary: Sends data from an external source. - description: Sends data from an external source. - parameters: [] - requestBody: - required: true - description: Object that contains a VC Document. - content: - application/json: - schema: - $ref: '#/components/schemas/ExternalDocumentDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: - - external - /ipfs/file: - post: - operationId: IpfsApi_postFile - summary: Add file from ipfs. - description: Add file from ipfs. - parameters: [] - requestBody: - required: true - description: Binary data. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_5 - - ipfs - security: - - bearer: [] - /ipfs/file/dry-run/{policyId}: - post: - operationId: IpfsApi_postFileDryRun - summary: Add file from ipfs for dry run mode. - description: Add file from ipfs for dry run mode. - parameters: - - name: policyId - required: true - in: path - description: Policy id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Binary data. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearer: [] - /ipfs/file/{cid}: - get: - operationId: IpfsApi_getFile - summary: Get file from ipfs. - description: Get file from ipfs. - parameters: - - name: cid - required: true - in: path - description: File cid - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearer: [] - /ipfs/file/{cid}/dry-run: - get: - operationId: IpfsApi_getFileDryRun - summary: Get file from ipfs for dry run mode. - description: Get file from ipfs for dry run mode. - parameters: - - name: cid - required: true - in: path - description: File cid - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearer: [] - /logs: - post: - operationId: LoggerApi_getLogs - summary: Return a list of all logs. - description: >- - Return a list of all logs. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/LogFilterDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/LogResultDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_6 - - logs - security: - - bearer: [] - /logs/attributes: - get: - operationId: LoggerApi_getAttributes - summary: Return a list of attributes. - description: >- - Return a list of attributes. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: name - required: false - in: query - description: Name - example: Search - schema: - type: number - - name: existingAttributes - required: false - in: query - description: Existing attributes - example: - - WORKER - schema: - type: array - items: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 - security: - - bearer: [] - /logs/seq: - get: - operationId: LoggerApi_getSeqUrl - summary: Return url on seq store. - description: >- - Return url on seq store. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - properties: - seq_url: - type: string - example: http://localhost:5341 - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 - security: - - bearer: [] - /map/key: - get: - operationId: MapApi_getKey - summary: Get map API key. - description: Return map API key. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_7 - - map - security: - - bearer: [] - /map/sh: - get: - operationId: MapApi_getSentinelKey - summary: Get sentinel API key. - description: Return sentinel API key. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearer: [] - /metrics: - get: - operationId: MetricsApi_getMetrics - parameters: [] - responses: - '200': - description: '' - tags: - - metrics - /modules: - post: - operationId: ModulesApi_postModules - summary: Creates a new module. - description: >- - Creates a new module. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Module config. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - responses: - '200': - description: Created module. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_8 - - modules - security: - - bearer: [] - get: - operationId: ModulesApi_getModulesV2 - summary: Return a list of all modules. - description: >- - Returns all modules. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ModuleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/schemas: - get: - operationId: ModulesApi_getModuleSchemas - summary: Return a list of all module schemas. - description: >- - Returns all module schemas. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: topicId - required: false - in: query - description: Topic id - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - post: - operationId: ModulesApi_postSchemas - summary: Creates a new module schema. - description: >- - Creates a new module schema. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Schema config. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - responses: - '201': - description: Created schema. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/{uuid}: - delete: - operationId: ModulesApi_deleteModule - summary: Deletes the module. - description: >- - Deletes the module with the provided module ID. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - get: - operationId: ModulesApi_getModule - summary: Retrieves module configuration. - description: >- - Retrieves module configuration for the specified module ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - put: - operationId: ModulesApi_putModule - summary: Updates module configuration. - description: >- - Updates module configuration for the specified module ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - requestBody: - required: true - description: Module config. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/menu: - get: - operationId: ModulesApi_getMenu - summary: Return a list of modules. - description: >- - Returns modules menu. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - responses: - '200': - description: Modules. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ModuleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/{uuid}/export/file: - get: - operationId: ModulesApi_moduleExportFile - summary: >- - Return module and its artifacts in a zip file format for the specified - module. - description: >- - Returns a zip file containing the published module and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - responses: - '200': - description: File. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/{uuid}/export/message: - get: - operationId: ModulesApi_moduleExportMessage - summary: Return Heder message ID for the specified published module. - description: >- - Returns the Hedera message ID for the specified module published onto - IPFS. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - responses: - '200': - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ExportMessageDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/import/message: - post: - operationId: ModulesApi_moduleImportMessage - summary: Imports new module from IPFS. - description: >- - Imports new module and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' - responses: - '200': - description: Created module. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/import/file: - post: - operationId: ModulesApi_moduleImportFile - summary: Imports new module from a zip file. - description: >- - Imports new module and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: File. - content: - application/json: - schema: - type: string - responses: - '200': - description: Created module. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/import/message/preview: - post: - operationId: ModulesApi_moduleImportMessagePreview - summary: Imports new module from IPFS. - description: >- - Imports new module and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' - responses: - '200': - description: Module preview. - content: - application/json: - schema: - $ref: '#/components/schemas/ModulePreviewDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/import/file/preview: - post: - operationId: ModulesApi_moduleImportFilePreview - summary: Imports new module from a zip file. - description: >- - Imports new module and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: File. - content: - application/json: - schema: - type: string - responses: - '200': - description: Module preview. - content: - application/json: - schema: - $ref: '#/components/schemas/ModulePreviewDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/{uuid}/publish: - put: - operationId: ModulesApi_publishModule - summary: Publishes the module onto IPFS. - description: >- - Publishes the module with the specified (internal) module ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - requestBody: - required: true - description: Module. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/validate: - post: - operationId: ModulesApi_validateModule - summary: Validates selected module. - description: >- - Validates selected module. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Module config. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - responses: - '200': - description: Validation result. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleValidationDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /tools: - post: - operationId: ToolsApi_createNewTool - summary: Creates a new tool. - description: >- - Creates a new tool. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_9 - - tools - security: - - bearer: [] - get: - operationId: ToolsApi_getToolsV2 - summary: Return a list of all tools. - description: >- - Returns all tools. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/push: - post: - operationId: ToolsApi_createNewToolAsync - summary: Creates a new tool. - description: >- - Creates a new tool. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/{id}: - delete: - operationId: ToolsApi_deleteTool - summary: >- - Deletes the tool with the provided tool ID. Only users with the Standard - Registry role are allowed to make the request. - description: Deletes the tool. - parameters: - - name: id - required: true - in: path - description: Tool ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - get: - operationId: ToolsApi_getToolById - summary: Retrieves tool configuration. - description: >- - Retrieves tool configuration for the specified tool ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - put: - operationId: ToolsApi_updateTool - summary: Updates tool configuration. - description: >- - Updates tool configuration for the specified tool ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Tool configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/{id}/publish: - put: - operationId: ToolsApi_publishTool - summary: Publishes the tool onto IPFS. - description: >- - Publishes the tool with the specified (internal) tool ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Tool configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolValidationDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/{id}/push/publish: - put: - operationId: ToolsApi_publishToolAsync - summary: Publishes the tool onto IPFS. - description: >- - Publishes the tool with the specified (internal) tool ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Tool configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/validate: - post: - operationId: ToolsApi_validateTool - summary: Validates selected tool. - description: >- - Validates selected tool. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Tool configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - responses: - '200': - description: Validation result. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolValidationDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/{id}/export/file: - get: - operationId: ToolsApi_toolExportFile - summary: >- - Return tool and its artifacts in a zip file format for the specified - tool. - description: >- - Returns a zip file containing the published tool and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. Response zip file. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/{id}/export/message: - get: - operationId: ToolsApi_toolExportMessage - summary: Return Heder message ID for the specified published tool. - description: >- - Returns the Hedera message ID for the specified tool published onto - IPFS. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: id - required: true - in: path - description: Tool ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ExportMessageDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/import/message/preview: - post: - operationId: ToolsApi_toolImportMessagePreview - summary: Imports new tool from IPFS. - description: >- - Imports new tool and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' - responses: - '200': - description: Tool preview. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolPreviewDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/import/message: - post: - operationId: ToolsApi_toolImportMessage - summary: Imports new tool from IPFS. - description: >- - Imports new tool and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/import/file/preview: - post: - operationId: ToolsApi_toolImportFilePreview - summary: Imports new tool from a zip file. - description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: File. - content: - application/json: - schema: - type: string - responses: - '200': - description: Module preview. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolPreviewDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/import/file: - post: - operationId: ToolsApi_toolImportFile - summary: Imports new tool from a zip file. - description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: File. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/import/file-metadata: - post: - operationId: ToolsApi_toolImportFileWithMetadata - summary: Imports new tool from a zip file. - description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Form data with tool file and metadata. - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - metadata: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/push/import/file: - post: - operationId: ToolsApi_toolImportFileAsync - summary: Imports new tool from a zip file. - description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: A zip file containing tool config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/push/import/file-metadata: - post: - operationId: ToolsApi_toolImportFileWithMetadataAsync - summary: Imports new tool from a zip file. - description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Form data with tool file and metadata. - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - metadata: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/push/import/message: - post: - operationId: ToolsApi_toolImportMessageAsync - summary: Imports new tool from IPFS. - description: >- - Imports new tool and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /tools/menu/all: - get: - operationId: ToolsApi_getMenu - summary: Return a list of tools. - description: >- - Returns tools menu. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - responses: - '200': - description: Modules. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearer: [] - /profiles/{username}: - get: - operationId: ProfileApi_getProfile - summary: Returns user account info. - description: >- - Returns user account information. For users with the Standard Registry - role it also returns address book and VC document information. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to fetch the information - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ProfileDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_10 - - profiles - security: - - bearer: [] - put: - operationId: ProfileApi_setUserProfile - summary: Sets Hedera credentials for the user. - description: >- - Sets Hedera credentials for the user. For users with the Standard - Registry role it also creates an address book. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to update the information. - example: username - schema: - type: string - requestBody: - required: true - description: Object that contains the Hedera account data. - content: - application/json: - schema: - $ref: '#/components/schemas/CredentialsDTO' - responses: - '200': - description: Created. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 - security: - - bearer: [] - /profiles/push/{username}: - put: - operationId: ProfileApi_setUserProfileAsync - summary: Sets Hedera credentials for the user. - description: >- - Sets Hedera credentials for the user. For users with the Standard - Registry role it also creates an address book. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to update the information. - example: username - schema: - type: string - requestBody: - required: true - description: Object that contains the Hedera account data. - content: - application/json: - schema: - $ref: '#/components/schemas/CredentialsDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 - security: - - bearer: [] - /profiles/{username}/balance: - get: - operationId: ProfileApi_getUserBalance - summary: Returns user's Hedera account balance. - description: >- - Requests Hedera account balance. Only users with the Installer role are - allowed to make the request. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to fetch the balance. - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 - security: - - bearer: [] - /profiles/restore/{username}: - put: - operationId: ProfileApi_restoreUserProfile - summary: Restore user data (policy, DID documents, VC documents). - description: Restore user data (policy, DID documents, VC documents). - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to restore the information. - example: username - schema: - type: string - requestBody: - required: true - description: Object that contains the Hedera account data. - content: - application/json: - schema: - $ref: '#/components/schemas/CredentialsDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 - security: - - bearer: [] - /profiles/restore/topics/{username}: - put: - operationId: ProfileApi_restoreTopic - summary: List of available recovery topics. - description: List of available recovery topics. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to restore the information. - example: username - schema: - type: string - requestBody: - required: true - description: Object that contains the Hedera account data. - content: - application/json: - schema: - $ref: '#/components/schemas/CredentialsDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 - security: - - bearer: [] - /profiles/did-document/validate: - post: - operationId: ProfileApi_validateDidDocument - summary: Validate DID document format. - description: Validate DID document format. - parameters: [] - requestBody: - required: true - description: DID Document. - content: - application/json: - schema: - $ref: '#/components/schemas/DidDocumentDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/DidDocumentStatusDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 - security: - - bearer: [] - /profiles/did-keys/validate: - post: - operationId: ProfileApi_validateDidKeys - summary: Validate DID document keys. - description: Validate DID document keys. - parameters: [] - requestBody: - required: true - description: DID Document and keys. - content: - application/json: - schema: - $ref: '#/components/schemas/DidDocumentWithKeyDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/DidKeyStatusDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 - security: - - bearer: [] - /policies: - get: - operationId: PolicyApi_getPoliciesV2 - summary: Return a list of all policies. - description: Returns all policies. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_11 - - policies - security: - - bearer: [] - post: - operationId: PolicyApi_createPolicy - summary: Creates a new policy. - description: >- - Creates a new policy. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/migrate-data: - post: - operationId: PolicyApi_migrateData - summary: Migrate policy data. - description: >- - Migrate policy data. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Migration config. - content: - application/json: - schema: - $ref: '#/components/schemas/MigrationConfigDTO' - responses: - '200': - description: Errors while migration. - content: - application/json: - schema: - type: array - items: - type: object - properties: - error: - type: string - id: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/push/migrate-data: - post: - operationId: PolicyApi_migrateDataAsync - summary: Migrate policy data asynchronous. - description: >- - Migrate policy data asynchronous. Only users with the Standard Registry - role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Migration configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/MigrationConfigDTO' - responses: - '202': - description: Created task. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/push: - post: - operationId: PolicyApi_createPolicyAsync - summary: Creates a new policy. - description: >- - Creates a new policy. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/push/{policyId}: - post: - operationId: PolicyApi_updatePolicyAsync - summary: Clones policy. - description: >- - Clones policy. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - delete: - operationId: PolicyApi_deletePolicyAsync - summary: Remove policy. - description: >- - Remove policy. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}: - get: - operationId: PolicyApi_getPolicy - summary: Retrieves policy configuration. - description: >- - Retrieves policy configuration for the specified policy ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - put: - operationId: PolicyApi_updatePolicy - summary: Updates policy configuration. - description: >- - Updates policy configuration for the specified policy ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - responses: - '200': - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/publish: - put: - operationId: PolicyApi_publishPolicy - summary: Publishes the policy onto IPFS. - description: >- - Publishes the policy with the specified (internal) policy ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PoliciesValidationDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/push/{policyId}/publish: - put: - operationId: PolicyApi_publishPolicyAsync - summary: Publishes the policy onto IPFS. - description: >- - Publishes the policy with the specified (internal) policy ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/dry-run: - put: - operationId: PolicyApi_dryRunPolicy - summary: Dry Run policy. - description: >- - Run policy without making any persistent changes or executing - transaction. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PoliciesValidationDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/discontinue: - put: - operationId: PolicyApi_discontinuePolicy - summary: Discontinue policy. - description: >- - Discontinue policy. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Discontinue details. - content: - application/json: - schema: - type: object - properties: - date: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/draft: - put: - operationId: PolicyApi_draftPolicy - summary: Return policy to editing. - description: >- - Return policy to editing. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/validate: - post: - operationId: PolicyApi_validatePolicy - summary: Validates policy. - description: >- - Validates selected policy. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - responses: - '200': - description: Validation result. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyValidationDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/navigation: - get: - operationId: PolicyApi_getPolicyNavigation - summary: Returns a policy navigation. - description: Returns a policy navigation. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/groups: - get: - operationId: PolicyApi_getPolicyGroups - summary: Returns a list of groups the user is a member of. - description: Returns a list of groups the user is a member of. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - post: - operationId: PolicyApi_setPolicyGroups - summary: Makes the selected group active. - description: >- - Makes the selected group active. if UUID is not set then returns the - user to the default state. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Group - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/documents: - get: - operationId: PolicyApi_getPolicyDocuments - summary: Get policy documents. - description: >- - Get policy documents. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: type - required: false - in: query - description: Document type. - example: VC - schema: - enum: - - VC - - VP - type: string - - name: includeDocument - required: false - in: query - description: Include document field. - example: true - schema: - type: boolean - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Documents. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/data: - get: - operationId: PolicyApi_downloadPolicyData - summary: Get policy data. - description: >- - Get policy data. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Policy data. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/data: - post: - operationId: PolicyApi_uploadPolicyData - summary: Upload policy data. - description: >- - Upload policy data. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Policy data file - content: - application/json: - schema: - type: string - format: binary - responses: - '200': - description: Uploaded policy. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/virtual-keys: - get: - operationId: PolicyApi_downloadVirtualKeys - summary: Get policy virtual keys. - description: >- - Get policy virtual keys. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Policy virtual keys. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - post: - operationId: PolicyApi_uploadVirtualKeys - summary: Upload policy virtual keys. - description: >- - Upload policy virtual keys. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Virtual keys file - content: - application/json: - schema: - type: string - format: binary - responses: - '200': - description: Operation completed. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/tag-block-map: - get: - operationId: PolicyApi_getTagBlockMap - summary: Get policy tag block map. - description: >- - Get policy tag block map. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Policy tag block map. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/blocks: - get: - operationId: PolicyApi_getPolicyBlocks - summary: Retrieves data for the policy root block. - description: >- - Returns data from the root policy block. Only users with the Standard - Registry and Installer role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - '503': - description: Block Unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceUnavailableErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/blocks/{uuid}: - get: - operationId: PolicyApi_getBlockData - summary: Requests block data. - description: >- - Requests block data. Only users with a role that described in block are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: uuid - required: true - in: path - description: Block Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - '503': - description: Block Unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceUnavailableErrorDTO' - tags: *ref_11 - security: - - bearer: [] - post: - operationId: PolicyApi_setBlockData - summary: Sends data to the specified block. - description: Sends data to the specified block. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: uuid - required: true - in: path - description: Block Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - requestBody: - required: true - description: Data - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - '503': - description: Block Unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceUnavailableErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/tag/{tagName}/blocks: - post: - operationId: PolicyApi_setBlocksByTagName - summary: Sends data to the specified block. - description: Sends data to the specified block. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: tagName - required: true - in: path - description: Block name (Tag) - example: block-tag - schema: - type: string - requestBody: - required: true - description: Data - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - '503': - description: Block Unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceUnavailableErrorDTO' - tags: *ref_11 - security: - - bearer: [] - get: - operationId: PolicyApi_getBlocksByTagName - summary: Requests block data. - description: >- - Requests block data by tag. Only users with a role that described in - block are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: tagName - required: true - in: path - description: Block name (Tag) - example: block-tag - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - '503': - description: Block Unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceUnavailableErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/tag/{tagName}: - get: - operationId: PolicyApi_getBlockByTagName - summary: Requests block config. - description: >- - Requests block data by tag. Only users with a role that described in - block are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: tagName - required: true - in: path - description: Block name (Tag) - example: block-tag - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/blocks/{uuid}/parents: - get: - operationId: PolicyApi_getBlockParents - summary: Requests block's parents. - description: >- - Requests block's parents. Only users with a role that described in block - are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: uuid - required: true - in: path - description: Block Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/blocks/about: - get: - operationId: PolicyApi_getBlockAbout - summary: Returns block descriptions. - description: >- - Returns block descriptions. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - responses: - '200': - description: Block descriptions. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/export/file: - get: - operationId: PolicyApi_getPolicyExportFile - summary: >- - Return policy and its artifacts in a zip file format for the specified - policy. - description: >- - Returns a zip file containing the published policy and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/export/message: - get: - operationId: PolicyApi_getPolicyExportMessage - summary: Return Heder message ID for the specified published policy. - description: >- - Returns the Hedera message ID for the specified policy published onto - IPFS. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ExportMessageDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/export/xlsx: - get: - operationId: PolicyApi_getPolicyExportXlsx - summary: >- - Return policy and its artifacts in a xlsx file format for the specified - policy. - description: >- - Returns a xlsx file containing the published policy and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/import/message: - post: - operationId: PolicyApi_importPolicyFromMessage - summary: Imports new policy from IPFS. - description: >- - Imports new policy and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: versionOfTopicId - required: false - in: query - description: The topic ID of policy version. - example: 0.0.00000001 - schema: - type: string - - name: demo - required: false - in: query - description: Import policy in demo mode. - example: true - schema: - type: boolean - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' - responses: - '200': - description: Created policy. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/push/import/message: - post: - operationId: PolicyApi_importPolicyFromMessageAsync - summary: Imports new policy from IPFS. - description: >- - Imports new policy and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: versionOfTopicId - required: false - in: query - description: The topic ID of policy version. - example: 0.0.00000001 - schema: - type: string - - name: demo - required: false - in: query - description: Import policy in demo mode. - example: true - schema: - type: boolean - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/import/message/preview: - post: - operationId: PolicyApi_importMessage - summary: Policy preview from IPFS. - description: >- - Previews the policy from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' - responses: - '200': - description: Policy preview. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyPreviewDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/push/import/message/preview: - post: - operationId: PolicyApi_importFromMessagePreview - summary: Policy preview from IPFS. - description: >- - Previews the policy from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/import/file: - post: - operationId: PolicyApi_importPolicyFromFile - summary: Imports new policy from a zip file. - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: versionOfTopicId - required: false - in: query - description: The topic ID of policy version. - example: 0.0.00000001 - schema: - type: string - - name: demo - required: false - in: query - description: Import policy in demo mode. - example: true - schema: - type: boolean - requestBody: - required: true - description: A zip file containing policy config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Created policy. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/import/file-metadata: - post: - operationId: PolicyApi_importPolicyFromFileWithMetadata - summary: Imports new policy from a zip file with metadata. - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: versionOfTopicId - required: false - in: query - description: The topic ID of policy version. - example: 0.0.00000001 - schema: - type: string - - name: demo - required: false - in: query - description: Import policy in demo mode. - example: true - schema: - type: boolean - requestBody: - required: true - description: Form data with policy file and metadata. - content: - multipart/form-data: - schema: - type: object - properties: - policyFile: - type: string - format: binary - metadata: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/push/import/file: - post: - operationId: PolicyApi_importPolicyFromFileAsync - summary: Imports new policy from a zip file. - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: versionOfTopicId - required: false - in: query - description: The topic ID of policy version. - example: 0.0.00000001 - schema: - type: string - - name: demo - required: false - in: query - description: Import policy in demo mode. - example: true - schema: - type: boolean - requestBody: - required: true - description: A zip file containing policy config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/push/import/file-metadata: - post: - operationId: PolicyApi_importPolicyFromFileWithMetadataAsync - summary: Imports new policy from a zip file with metadata. - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: versionOfTopicId - required: false - in: query - description: The topic ID of policy version. - example: 0.0.00000001 - schema: - type: string - - name: demo - required: false - in: query - description: Import policy in demo mode. - example: true - schema: - type: boolean - requestBody: - required: true - description: Form data with policy file and metadata. - content: - multipart/form-data: - schema: - type: object - properties: - policyFile: - type: string - format: binary - metadata: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/import/file/preview: - post: - operationId: PolicyApi_importPolicyFromFilePreview - summary: Policy preview from a zip file. - description: >- - Previews the policy from a zip file without loading it into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - requestBody: - required: true - description: A zip file containing policy config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Policy preview. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyPreviewDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/import/xlsx: - post: - operationId: PolicyApi_importPolicyFromXlsx - summary: Imports new policy from a xlsx file. - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided xlsx file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: policyId - required: true - in: query - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: A xlsx file containing policy config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/push/import/xlsx: - post: - operationId: PolicyApi_importPolicyFromXlsxAsync - summary: Imports new policy from a xlsx file. - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided xlsx file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: policyId - required: true - in: query - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: A xlsx file containing policy config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/import/xlsx/preview: - post: - operationId: PolicyApi_importPolicyFromXlsxPreview - summary: Policy preview from a xlsx file. - description: >- - Previews the policy from a xlsx file without loading it into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - requestBody: - required: true - description: A xlsx file containing policy config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/dry-run/users: - get: - operationId: PolicyApi_getDryRunUsers - summary: Returns virtual users. - description: >- - Returns virtual users. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Virtual users. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/dry-run/user: - post: - operationId: PolicyApi_setDryRunUser - summary: Creates virtual users. - description: >- - Creates virtual users. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Virtual users. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/dry-run/login: - post: - operationId: PolicyApi_loginDryRunUser - summary: Change active virtual user. - description: >- - Change active virtual user. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Credentials. - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Virtual users. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/dry-run/restart: - post: - operationId: PolicyApi_restartDryRun - summary: Clear dry-run state. - description: >- - Clear dry-run state. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: . - content: - application/json: - schema: - type: string - responses: - '200': - description: . - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/dry-run/transactions: - get: - operationId: PolicyApi_getDryRunTransactions - summary: Get dry-run details (Transactions). - description: >- - Get dry-run details (Transactions). Only users with the Standard - Registry role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Transactions. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/dry-run/artifacts: - get: - operationId: PolicyApi_getDryRunArtifacts - summary: Get dry-run details (Artifacts). - description: >- - Get dry-run details (Artifacts). Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Artifacts. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/dry-run/ipfs: - get: - operationId: PolicyApi_getDryRunIpfs - summary: Get dry-run details (Files). - description: >- - Get dry-run details (Files). Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 20 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Files. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/multiple: - get: - operationId: PolicyApi_getMultiplePolicies - summary: Requests policy links. - description: >- - Requests policy links. Only users with a role that described in block - are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - post: - operationId: PolicyApi_setMultiplePolicies - summary: Creates policy link. - description: >- - Creates policy link. Only users with a role that described in block are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/test: - post: - operationId: PolicyApi_addPolicyTest - summary: Add policy test. - description: >- - Add policy test. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Form data with tests. - content: - multipart/form-data: - schema: - type: array - items: - type: object - properties: - tests: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyTestDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/test/{testId}: - get: - operationId: PolicyApi_getPolicyTest - summary: Get policy test. - description: >- - Get policy test. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: testId - required: true - in: path - description: Test Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyTestDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - delete: - operationId: PolicyApi_deletePolicyTest - summary: Delete policy test. - description: >- - Delete policy test. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: testId - required: true - in: path - description: Test Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/test/{testId}/start: - post: - operationId: PolicyApi_startPolicyTest - summary: Start policy test. - description: >- - Start policy test. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: testId - required: true - in: path - description: Test Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyTestDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/test/{testId}/stop: - post: - operationId: PolicyApi_stopPolicyTest - summary: Stop policy test. - description: >- - Stop policy test. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: testId - required: true - in: path - description: Test Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyTestDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/test/{testId}/details: - get: - operationId: PolicyApi_getTestDetails - summary: Get test details. - description: >- - Get test details. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: testId - required: true - in: path - description: Test Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RunningDetailsDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/methodologies/categories: - get: - operationId: PolicyApi_getPolicyCategoriesAsync - summary: Get all categories - description: Get all categories - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyCategoryDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - /policies/methodologies/search: - post: - operationId: PolicyApi_getPoliciesByCategory - summary: Get filtered policies - description: Get policies by categories and text - parameters: [] - requestBody: - required: true - description: Filters - content: - application/json: - schema: - type: string - examples: - Filter1: - value: - categoryIds: - - '000000000000000000000001' - - '000000000000000000000001' - text: abc - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - /schema/{schemaId}: - get: - operationId: SingleSchemaApi_getSchema - summary: Returns schema by schema ID. - description: >- - Returns schema by schema ID. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_12 - - schema - security: - - bearer: [] - /schema/{schemaId}/parents: - get: - operationId: SingleSchemaApi_getSchemaParents - summary: Returns all parent schemas. - description: Returns all parent schemas. - parameters: - - name: schemaId - required: true - in: path - description: Schema identifier - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 - security: - - bearer: [] - /schema/{schemaId}/tree: - get: - operationId: SingleSchemaApi_getSchemaTree - summary: Returns schema tree. - description: Returns schema tree. - parameters: - - name: schemaId - required: true - in: path - description: Schema identifier - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - properties: - name: - type: string - type: - type: string - children: - type: array - items: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 - security: - - bearer: [] - /schemas: - get: - operationId: SchemaApi_getSchemasPageV2 - summary: Return a list of all schemas. - description: Returns all schemas. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: category - required: false - in: query - description: Schema category - example: POLICY - schema: - type: string - - name: policyId - required: false - in: query - description: Policy id - example: '000000000000000000000001' - schema: - type: string - - name: moduleId - required: false - in: query - description: Module id - example: '000000000000000000000001' - schema: - type: string - - name: toolId - required: false - in: query - description: Tool id - example: '000000000000000000000001' - schema: - type: string - - name: topicId - required: false - in: query - description: Topic id - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_13 - - schemas - security: - - bearer: [] - put: - operationId: SchemaApi_setSchema - summary: Updates the schema. - description: >- - Updates the schema. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Object that contains a valid schema. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{topicId}: - get: - operationId: SchemaApi_getSchemasPageByTopicId - summary: Return a list of all schemas. - description: Returns all schemas. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: category - required: false - in: query - description: Schema category - example: POLICY - schema: - type: string - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - post: - operationId: SchemaApi_createNewSchema - summary: Creates a new schema. - description: >- - Creates a new schema. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string - requestBody: - required: true - description: Object that contains a valid schema. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/type/{schemaType}: - get: - operationId: SchemaApi_getSchemaByType - summary: Finds the schema using the json document type. - description: Finds the schema using the json document type. - parameters: - - name: schemaType - required: true - in: path - description: Type - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/list/all: - get: - operationId: SchemaApi_getAll - summary: Returns a list of schemas. - description: >- - Returns a list of schemas. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/list/sub: - get: - operationId: SchemaApi_getSub - summary: Returns a list of schemas. - description: >- - Returns a list of schemas. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: category - required: false - in: query - description: Schema category - example: POLICY - schema: - type: string - - name: topicId - required: false - in: query - description: Topic Id - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/schema-with-sub-schemas: - get: - operationId: SchemaApi_getSchemaWithSubSchemas - summary: Returns a list of schemas. - description: >- - Returns a list of schemas. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: category - required: false - in: query - description: Schema category - example: POLICY - schema: - type: string - - name: topicId - required: false - in: query - description: Topic Id - example: 0.0.1 - schema: - type: string - - name: schemaId - required: true - in: query - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/push/copy: - post: - operationId: SchemaApi_copySchemaAsync - summary: Copy schema. - description: >- - Copy schema. Only users with the Standard Registry role are allowed to - make the request. - parameters: [] - requestBody: - required: true - description: Object that contains a valid schema. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/push/{topicId}: - post: - operationId: SchemaApi_createNewSchemaAsync - summary: Creates a new schema. - description: >- - Creates a new schema. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string - requestBody: - required: true - description: Object that contains a valid schema. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{schemaId}: - delete: - operationId: SchemaApi_deleteSchema - summary: Deletes the schema with the provided schema ID. - description: >- - Deletes the schema with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{schemaId}/publish: - put: - operationId: SchemaApi_publishSchema - summary: Publishes the schema with the provided schema ID. - description: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Object that contains version. - content: - application/json: - schema: - $ref: '#/components/schemas/VersionSchemaDTO' - examples: - Version: - value: - version: 1.0.0 - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/push/{schemaId}/publish: - put: - operationId: SchemaApi_publishSchemaAsync - summary: Publishes the schema with the provided schema ID. - description: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Object that contains version. - content: - application/json: - schema: - $ref: '#/components/schemas/VersionSchemaDTO' - examples: - Version: - value: - version: 1.0.0 - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/import/message/preview: - post: - operationId: SchemaApi_importFromMessagePreview - summary: Previews the schema from IPFS without loading it into the local DB. - description: >- - Previews the schema from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Object that contains version. - content: - application/json: - schema: - $ref: '#/components/schemas/MessageSchemaDTO' - examples: - Message: - value: - messageId: '0000000000.000000001' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/push/import/message/preview: - post: - operationId: SchemaApi_importFromMessagePreviewAsync - summary: Previews the schema from IPFS without loading it into the local DB. - description: >- - Previews the schema from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Object that contains version. - content: - application/json: - schema: - $ref: '#/components/schemas/MessageSchemaDTO' - examples: - Message: - value: - messageId: '0000000000.000000001' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/import/file/preview: - post: - operationId: SchemaApi_importFromFilePreview - summary: Previews the schema from a zip file. - description: >- - Previews the schema from a zip file. Only users with the Standard - Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: A zip file containing schema to be imported. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{topicId}/import/message: - post: - operationId: SchemaApi_importFromMessage - summary: Imports new schema from IPFS into the local DB. - description: >- - Imports new schema from IPFS into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string - requestBody: - required: true - description: Object that contains version. - content: - application/json: - schema: - $ref: '#/components/schemas/MessageSchemaDTO' - examples: - Message: - value: - messageId: '0000000000.000000001' - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/push/{topicId}/import/message: - post: - operationId: SchemaApi_importFromMessageAsync - summary: Imports new schema from IPFS into the local DB. - description: >- - Imports new schema from IPFS into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string - requestBody: - required: true - description: Object that contains version. - content: - application/json: - schema: - $ref: '#/components/schemas/MessageSchemaDTO' - examples: - Message: - value: - messageId: '0000000000.000000001' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{topicId}/import/file: - post: - operationId: SchemaApi_importToTopicFromFile - summary: Imports new schema from a zip file into the local DB. - description: >- - Imports new schema from a zip file into the local DB. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string - requestBody: - required: true - description: A zip file containing schema to be imported. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/push/{topicId}/import/file: - post: - operationId: SchemaApi_importToTopicFromFileAsync - summary: Imports new schema from a zip file into the local DB. - description: >- - Imports new schema from a zip file into the local DB. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string - requestBody: - required: true - description: A zip file containing schema to be imported. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{schemaId}/export/message: - get: - operationId: SchemaApi_exportMessage - summary: Returns Hedera message IDs of the published schemas. - description: >- - Returns Hedera message IDs of the published schemas, these messages - contain IPFS CIDs of these schema files. Only users with the Standard - Registry role are allowed to make the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ExportSchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{schemaId}/export/file: - get: - operationId: SchemaApi_exportToFile - summary: Returns schema files for the schema. - description: >- - Returns schema files for the schema. Only users with the Standard - Registry role are allowed to make the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. Response zip file. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/system/{username}: - post: - operationId: SchemaApi_postSystemSchema - summary: Creates a new system schema. - description: >- - Creates a new system schema. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: username - required: true - in: path - description: username - example: username - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SystemSchemaDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - get: - operationId: SchemaApi_getSystemSchemaV2 - summary: Return a list of all system schemas. - description: >- - Returns all system schemas. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: username - required: true - in: path - description: username - example: username - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/system/{schemaId}: - delete: - operationId: SchemaApi_deleteSystemSchema - summary: Deletes the system schema with the provided schema ID. - description: >- - Deletes the system schema with the provided schema ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - put: - operationId: SchemaApi_setSystemSchema - summary: Updates the system schema. - description: >- - Updates the system schema. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: 0.0.1 - schema: - type: string - requestBody: - required: true - description: Object that contains a valid schema. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/system/{schemaId}/active: - put: - operationId: SchemaApi_activeSystemSchema - summary: >- - Makes the selected scheme active. Other schemes of the same type become - inactive - description: >- - Makes the selected scheme active. Other schemes of the same type become - inactive Only users with the Standard Registry role are allowed to make - the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/system/entity/{schemaEntity}: - get: - operationId: SchemaApi_getSchemaEntity - summary: Finds the schema using the schema type. - description: Finds the schema using the schema type. - parameters: - - name: schemaEntity - required: true - in: path - description: Entity name - example: STANDARD_REGISTRY - schema: - type: string - enum: - - STANDARD_REGISTRY - - USER - - POLICY - - MINT_TOKEN - - WIPE_TOKEN - - MINT_NFTOKEN - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{schemaId}/export/xlsx: - get: - operationId: SchemaApi_getPolicyExportXlsx - summary: Return schemas in a xlsx file format for the specified policy. - description: >- - Returns a xlsx file containing schemas. Only users with the Standard - Registry role are allowed to make the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{topicId}/import/xlsx: - post: - operationId: SchemaApi_importPolicyFromXlsx - summary: Imports new schema from a xlsx file into the local DB. - description: >- - Imports new schema from a xlsx file into the local DB. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string - requestBody: - required: true - description: A xlsx file containing schema config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/push/{topicId}/import/xlsx: - post: - operationId: SchemaApi_importPolicyFromXlsxAsync - summary: Imports new schema from a xlsx file into the local DB. - description: >- - Imports new schema from a xlsx file into the local DB. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string - requestBody: - required: true - description: A xlsx file containing schema config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/import/xlsx/preview: - post: - operationId: SchemaApi_importPolicyFromXlsxPreview - summary: Previews the schema from a xlsx file. - description: >- - Previews the schema from a xlsx file. Only users with the Standard - Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: A xlsx file containing schema config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/export/template: - get: - operationId: SchemaApi_exportTemplate - summary: Returns a list of schemas. - description: >- - Returns a list of schemas. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /settings: - post: - operationId: SettingsApi_updateSettings - summary: Set settings. - description: Set settings. For users with the Standard Registry role only. - parameters: [] - requestBody: - required: true - description: Settings. - content: - application/json: - schema: - $ref: '#/components/schemas/SettingsDTO' - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_14 - - settings - security: - - bearer: [] - get: - operationId: SettingsApi_getSettings - summary: Returns current settings. - description: >- - Returns current settings. For users with the Standard Registry role - only. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SettingsDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 - security: - - bearer: [] - /settings/environment: - get: - operationId: SettingsApi_getEnvironment - summary: Returns current environment name. - description: Returns current environment name. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 - security: - - bearer: [] - /settings/about: - get: - operationId: SettingsApi_getAbout - summary: Returns package version. - description: Returns package version. For users with the Standard Registry role only. - parameters: [] - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 - security: - - bearer: [] - /tags: - post: - operationId: TagsApi_setTags - summary: Creates new tag. - description: Creates new tag. - parameters: [] - requestBody: - required: true - description: Object that contains tag information. - content: - application/json: - schema: - $ref: '#/components/schemas/TagDTO' - responses: - '200': - description: Created tag. - content: - application/json: - schema: - $ref: '#/components/schemas/TagDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_15 - - tags - security: - - bearer: [] - /tags/search: - post: - operationId: TagsApi_searchTags - summary: Search tags. - description: Search tags. - parameters: [] - requestBody: - required: true - description: Object that contains filters - content: - application/json: - schema: - $ref: '#/components/schemas/TagFilterDTO' - examples: - Single: - value: - entity: PolicyDocument - target: '0000000000.000000001' - Multiple: - value: - entity: PolicyDocument - targets: - - '0000000000.000000001' - - '0000000000.000000001' - responses: - '200': - description: Created tag. - content: - application/json: - schema: - $ref: '#/components/schemas/TagMapDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] - /tags/{uuid}: - delete: - operationId: TagsApi_deleteTag - summary: Delete tag. - description: Delete tag. - parameters: - - name: uuid - required: true - in: path - description: Tag identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] - /tags/synchronization: - post: - operationId: TagsApi_synchronizationTags - summary: Synchronization of tags with an external network. - description: Synchronization of tags with an external network. - parameters: [] - requestBody: - required: true - description: Object that contains filters - content: - application/json: - schema: - $ref: '#/components/schemas/TagFilterDTO' - examples: - Single: - value: - entity: PolicyDocument - target: '0000000000.000000001' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TagMapDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] - /tags/schemas: - get: - operationId: TagsApi_getSchemasV2 - summary: Return a list of all tag schemas. - description: >- - Returns all tag schemas. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] - post: - operationId: TagsApi_postSchemas - summary: Creates a new tag schema. - description: >- - Creates a new tag schema. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Schema config. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - responses: - '201': - description: Created schema. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] - /tags/schemas/{schemaId}: - delete: - operationId: TagsApi_deleteSchema - summary: Deletes the schema. - description: >- - Deletes the schema with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema Identifier - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] - put: - operationId: TagsApi_updateSchema - summary: Updates schema configuration. - description: >- - Updates schema configuration for the specified schema ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema Identifier - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Schema config. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] - /tags/schemas/{schemaId}/publish: - put: - operationId: TagsApi_publishTag - summary: Publishes the schema. - description: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: schemaId - required: true - in: path - description: Schema Identifier - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] - /tags/schemas/published: - get: - operationId: TagsApi_getPublished - summary: Return a list of all published schemas. - description: >- - Return a list of all published schemas. Only users with the Standard - Registry role are allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] - /tasks/{taskId}: - get: - operationId: TaskApi_getTask - summary: Returns task statuses by Id. - description: Returns task statuses by Id. - parameters: - - name: taskId - required: true - in: path - description: Task Id - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskStatusDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: - - tasks - security: - - bearer: [] - /tokens: - get: - operationId: TokensApi_getTokensV2 - summary: Return a list of tokens. - description: >- - Returns all tokens. For the Standard Registry role it returns only the - list of tokens, for other users it also returns token balances as well - as the KYC, Freeze, and Association statuses. Not allowed for the - Auditor role. - parameters: - - name: policyId - required: false - in: query - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: status - required: false - in: query - description: Token status - example: All - schema: - enum: - - Associated - - All - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TokenDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_16 - - tokens - security: - - bearer: [] - post: - operationId: TokensApi_newToken - summary: Creates a new token. - description: >- - Creates a new token. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Object that contains token information. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TokenDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - put: - operationId: TokensApi_updateToken - summary: Update token. - description: >- - Update token. Only users with the Standard Registry role are allowed to - make the request. - parameters: [] - requestBody: - required: true - description: Object that contains token information. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - responses: - '200': - description: Updated token. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/{tokenId}: - get: - operationId: TokensApi_getTokenByIdWithPolicies - summary: Return a token by id. - description: Return the token. - parameters: - - name: tokenId - required: true - in: path - schema: - type: string - - name: policyId - required: true - in: query - schema: - type: string - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TokenDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/push: - post: - operationId: TokensApi_pushTokenAsync - summary: Creates a new token. - description: >- - Creates a new token. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Object that contains token information. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - put: - operationId: TokensApi_updateTokenAsync - summary: Update token. - description: >- - Update token. Only users with the Standard Registry role are allowed to - make the request. - parameters: [] - requestBody: - required: true - description: Object that contains token information. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/push/{tokenId}: - delete: - operationId: TokensApi_deleteTokenAsync - summary: Deletes the token with the provided schema ID. - description: >- - Deletes the token with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/{tokenId}/associate: - put: - operationId: TokensApi_associateToken - summary: Associates the user with the provided Hedera token. - description: >- - Associates the user with the provided Hedera token. Only users with the - Installer role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfoDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/push/{tokenId}/associate: - put: - operationId: TokensApi_associateTokenAsync - summary: Associates the user with the provided Hedera token. - description: >- - Associates the user with the provided Hedera token. Only users with the - Installer role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/{tokenId}/dissociate: - put: - operationId: TokensApi_dissociateToken - summary: Associate the user with the provided Hedera token. - description: >- - Disassociates the user with the provided Hedera token. Only users with - the Installer role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfoDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/push/{tokenId}/dissociate: - put: - operationId: TokensApi_dissociateTokenAsync - summary: Associate the user with the provided Hedera token. - description: >- - Disassociates the user with the provided Hedera token. Only users with - the Installer role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/{tokenId}/{username}/grant-kyc: - put: - operationId: TokensApi_grantKyc - summary: Sets the KYC flag for the user. - description: >- - Sets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - - name: username - required: true - in: path - description: Username - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfoDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/push/{tokenId}/{username}/grant-kyc: - put: - operationId: TokensApi_grantKycAsync - summary: Sets the KYC flag for the user. - description: >- - Sets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - - name: username - required: true - in: path - description: Username - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/{tokenId}/{username}/revoke-kyc: - put: - operationId: TokensApi_revokeKyc - summary: Unsets the KYC flag for the user. - description: >- - Unsets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - - name: username - required: true - in: path - description: Username - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfoDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/push/{tokenId}/{username}/revoke-kyc: - put: - operationId: TokensApi_revokeKycAsync - summary: Unsets the KYC flag for the user. - description: >- - Unsets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - - name: username - required: true - in: path - description: Username - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/{tokenId}/{username}/freeze: - put: - operationId: TokensApi_freezeToken - summary: Freeze transfers of the specified token for the user. - description: >- - Freezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - - name: username - required: true - in: path - description: Username - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfoDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/{tokenId}/{username}/unfreeze: - put: - operationId: TokensApi_unfreezeToken - summary: Unfreezes transfers of the specified token for the user. - description: >- - Unfreezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - - name: username - required: true - in: path - description: Username - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfoDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/push/{tokenId}/{username}/freeze: - put: - operationId: TokensApi_freezeTokenAsync - summary: Freeze transfers of the specified token for the user. - description: >- - Freezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - - name: username - required: true - in: path - description: Username - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/push/{tokenId}/{username}/unfreeze: - put: - operationId: TokensApi_unfreezeTokenAsync - summary: Unfreezes transfers of the specified token for the user. - description: >- - Unfreezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - - name: username - required: true - in: path - description: Username - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/{tokenId}/{username}/info: - get: - operationId: TokensApi_getTokenInfo - summary: Returns user information for the selected token. - description: >- - Returns user information for the selected token. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - - name: username - required: true - in: path - description: Username - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfoDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/{tokenId}/serials: - get: - operationId: TokensApi_getTokenSerials - summary: Return token serials. - description: Returns token serials of current user. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Token serials. - content: - application/json: - schema: - type: array - items: - type: number - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/menu/all: - get: - operationId: TokensApi_getMenu - summary: Return a list of tokens. - description: >- - Returns tokens menu. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - responses: - '200': - description: Modules. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TokenDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /themes: - post: - operationId: ThemesApi_setThemes - summary: Creates a new theme. - description: >- - Creates a new theme. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Object that contains a theme. - content: - application/json: - schema: - $ref: '#/components/schemas/ThemeDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ThemeDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_17 - - themes - security: - - bearer: [] - get: - operationId: ThemesApi_getThemes - summary: Returns a list of all themes. - description: >- - Returns a list of all themes. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ThemeDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_17 - security: - - bearer: [] - /themes/{themeId}: - put: - operationId: ThemesApi_updateTheme - summary: Updates theme configuration. - description: >- - Updates theme configuration for the specified theme ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: themeId - required: true - in: path - description: Theme Identifier - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Object that contains a theme. - content: - application/json: - schema: - $ref: '#/components/schemas/ThemeDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ThemeDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_17 - security: - - bearer: [] - delete: - operationId: ThemesApi_deleteTheme - summary: Deletes the theme. - description: >- - Deletes the theme with the provided theme ID. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: themeId - required: true - in: path - description: Theme Identifier - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_17 - security: - - bearer: [] - /themes/import/file: - post: - operationId: ThemesApi_importTheme - summary: Imports new theme from a zip file. - description: >- - Imports new theme from the provided zip file into the local DB. Only - users with the Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: A zip file containing theme to be imported. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ThemeDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_17 - security: - - bearer: [] - /themes/{themeId}/export/file: - get: - operationId: ThemesApi_exportTheme - summary: Returns a zip file containing the theme. - description: >- - Returns a zip file containing the theme. Only users with the Standard - Registry role are allowed to make the request. - parameters: - - name: themeId - required: true - in: path - description: Theme Identifier - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. Response zip file. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_17 - security: - - bearer: [] - /trust-chains: - get: - operationId: TrustChainsApi_getTrustChains - summary: Returns a list of all VP documents. - description: >- - Returns a list of all VP documents. Only users with the Standard - Registry role are allowed to make the request. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: policyId - required: false - in: query - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: policyOwner - required: false - in: query - description: Policy Owner - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - schema: - type: string - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/VpDocumentDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_18 - - trust-chains - security: - - bearer: [] - /trust-chains/{hash}: - get: - operationId: TrustChainsApi_getTrustChainByHash - summary: Builds and returns a trustchain, from the VP to the root VC document. - description: >- - Builds and returns a trustchain, from the VP to the root VC document. - Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: hash - required: true - in: path - description: Hash - example: hash - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - properties: - chain: - type: array - items: - type: object - properties: - id: - type: string - type: - type: string - tag: - type: string - label: - type: string - schema: - type: string - owner: - type: string - document: - type: object - required: - - id - - type - - tag - - label - - schema - - owner - - document - userMap: - type: array - items: - type: object - properties: - did: - type: string - username: - type: string - required: - - did - - username - required: - - chain - - userMap - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_18 - security: - - bearer: [] - /wizard/policy: - post: - operationId: WizardApi_setPolicy - summary: Creates a new policy. - description: >- - Creates a new policy by wizard. Only users with the Standard Registry - role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Object that contains wizard configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/WizardConfigDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/WizardResultDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_19 - - wizard - security: - - bearer: [] - /wizard/push/policy: - post: - operationId: WizardApi_setPolicyAsync - summary: Creates a new policy. - description: >- - Creates a new policy by wizard. Only users with the Standard Registry - role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Object that contains wizard configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/WizardConfigAsyncDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_19 - security: - - bearer: [] - /wizard/{policyId}/config: - post: - operationId: WizardApi_setPolicyConfig - summary: Get policy config. - description: >- - Get policy config by wizard. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Object that contains wizard configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/WizardConfigDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/WizardPreviewDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_19 - security: - - bearer: [] - /branding: - post: - operationId: BrandingApi_setBranding - summary: Update branding. - description: >- - Update branding. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Object that contains config. - content: - application/json: - schema: - $ref: '#/components/schemas/BrandingDTO' - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_20 - - branding - security: - - bearer: [] - get: - operationId: BrandingApi_getBranding - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BrandingDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_20 - /suggestions: - post: - operationId: SuggestionsApi_policySuggestions - summary: Get next and nested suggested block types - description: >- - Get next and nested suggested block types. Only users with the Standard - Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Data. - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsInputDTO' - responses: - '200': - description: >- - Successful operation. Suggested next and nested block types - respectively. - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsOutputDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_21 - - suggestions - security: - - bearer: [] - /suggestions/config: - post: - operationId: SuggestionsApi_setPolicySuggestionsConfig - summary: Set suggestions config - description: >- - Set suggestions config. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Suggestions config. - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsConfigDTO' - responses: - '201': - description: Successful operation. Response setted suggestions config. - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsConfigDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_21 - security: - - bearer: [] - get: - operationId: SuggestionsApi_getPolicySuggestionsConfig - summary: Get suggestions config - description: >- - Get suggestions config. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. Response suggestions config. - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsConfigDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_21 - security: - - bearer: [] - /notifications: - get: - operationId: NotificationsApi_getAllNotifications - summary: Get all notifications - description: Returns all notifications. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. Returns notifications and count. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/NotificationDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_22 - - notifications - security: - - bearer: [] - /notifications/new: - get: - operationId: NotificationsApi_getNewNotifications - summary: Get new notifications - description: Returns new notifications. - parameters: [] - responses: - '200': - description: Successful operation. Returns new notifications. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/NotificationDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_22 - security: - - bearer: [] - /notifications/progresses: - get: - operationId: NotificationsApi_getProgresses - summary: Get progresses - description: Returns progresses. - parameters: [] - responses: - '200': - description: Successful operation. Returns progresses. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ProgressDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_22 - security: - - bearer: [] - /notifications/read/all: - post: - operationId: NotificationsApi_readAll - summary: Read all notifications - description: Returns new notifications. - parameters: [] - responses: - '200': - description: Successful operation. Returns notifications. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/NotificationDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_22 - security: - - bearer: [] - /notifications/delete/{notificationId}: - delete: - operationId: NotificationsApi_delete - summary: Delete notifications up to this point - description: Returns deleted notifications count. - parameters: - - name: notificationId - required: true - in: path - description: Notification Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - responses: - '200': - description: Successful operation. Returns deleted notifications count. - content: - application/json: - schema: - type: number - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_22 - security: - - bearer: [] - /projects/search: - post: - operationId: ProjectsAPI_projectSearch - summary: Search projects - description: Search projects by filters - parameters: [] - requestBody: - required: true - description: The question of choosing a methodology - content: - application/json: - schema: - type: string - examples: - q: - value: >- - What methodology can I use for production of electricity using - renewable energy technologies? - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ProjectDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_23 - - projects - /projects/compare/documents: - post: - operationId: ProjectsAPI_compareDocumentsV2 - summary: Compare documents. - description: Compare documents. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterDocumentsDTO' - examples: - Filter1: - value: - documentId1: '000000000000000000000001' - documentId2: '000000000000000000000001' - Filter2: - value: - documentIds: - - '000000000000000000000001' - - '000000000000000000000001' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CompareDocumentsV2DTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_23 - /projects/properties: - get: - operationId: ProjectsAPI_getPolicyProperties - summary: Get all properties - description: Get all properties - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PropertiesDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_23 - /record/{policyId}/status: - get: - operationId: RecordApi_getRecordStatus - summary: Get recording or running status. - description: >- - Get recording or running status. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RecordStatusDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_24 - - record - security: - - bearer: [] - /record/{policyId}/recording/start: - post: - operationId: RecordApi_startRecord - summary: Start recording. - description: >- - Start recording. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 - security: - - bearer: [] - /record/{policyId}/recording/stop: - post: - operationId: RecordApi_stopRecord - summary: Stop recording. - description: >- - Stop recording. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 - security: - - bearer: [] - /record/{policyId}/recording/actions: - get: - operationId: RecordApi_getRecordActions - summary: Get recorded actions. - description: >- - Get recorded actions. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RecordActionDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 - security: - - bearer: [] - /record/{policyId}/running/start: - post: - operationId: RecordApi_runRecord - summary: Run record from a zip file. - description: >- - Run record from a zip file. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: A zip file containing record to be run. - content: - application/json: - schema: - type: string - responses: - '200': - description: Record UUID. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 - security: - - bearer: [] - /record/{policyId}/running/stop: - post: - operationId: RecordApi_stopRunning - summary: Stop running. - description: >- - Stop running. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 - security: - - bearer: [] - /record/{policyId}/running/results: - get: - operationId: RecordApi_getRecordResults - summary: Get running results. - description: >- - Get running results. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RunningResultDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 - security: - - bearer: [] - /record/{policyId}/running/details: - get: - operationId: RecordApi_getRecordDetails - summary: Get running details. - description: >- - Get running details. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RunningDetailsDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 - security: - - bearer: [] - /record/{policyId}/running/fast-forward: - post: - operationId: RecordApi_fastForward - summary: Fast Forward. - description: >- - Fast Forward. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 - security: - - bearer: [] - /record/{policyId}/running/retry: - post: - operationId: RecordApi_retryStep - summary: Retry step. - description: >- - Retry step. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 - security: - - bearer: [] - /record/{policyId}/running/skip: - post: - operationId: RecordApi_skipStep - summary: Skip step. - description: >- - Skip step. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 - security: - - bearer: [] - /ai-suggestions/ask: - get: - operationId: AISuggestionsAPI_getAIAnswer - summary: Get methodology suggestion - description: Returns AI response to the current question - parameters: - - name: q - required: true - in: query - description: The question of choosing a methodology - example: Find me large scale projects - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - example: ACM0001, ACM0002, ACM0006, ACM0007, ACM0018 - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_25 - - ai-suggestions - /ai-suggestions/rebuild-vector: - put: - operationId: AISuggestionsAPI_rebuildVector - summary: Rebuild AI vector - description: Rebuilds vector based on policy data in the DB - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_25 - /permissions: - get: - operationId: PermissionsApi_getPermissions - summary: Return a list of all permissions. - description: Returns all permissions. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PermissionsDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_26 - - permissions - security: - - bearer: [] - /permissions/roles: - get: - operationId: PermissionsApi_getRoles - summary: Return a list of all roles. - description: Returns all roles. - parameters: - - name: name - required: false - in: query - description: Filter by role name - example: name - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RoleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - post: - operationId: PermissionsApi_createRole - summary: Creates new role. - description: Creates new role. - parameters: [] - requestBody: - required: true - description: Object that contains role information. - content: - application/json: - schema: - $ref: '#/components/schemas/RoleDTO' - responses: - '200': - description: Created role. - content: - application/json: - schema: - $ref: '#/components/schemas/RoleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/roles/{id}: - put: - operationId: PermissionsApi_updateRole - summary: Updates role configuration. - description: Updates role configuration for the specified role ID. - parameters: - - name: id - required: true - in: path - description: Role Identifier - example: '000000000000000000000001' - schema: - type: string - requestBody: - required: true - description: Role configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/RoleDTO' - responses: - '200': - description: Role configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/RoleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - delete: - operationId: PermissionsApi_deleteModule - summary: Deletes the role. - description: Deletes the role with the provided role ID. - parameters: - - name: id - required: true - in: path - description: Role Identifier - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/roles/default: - post: - operationId: PermissionsApi_setDefaultRole - summary: Set default role. - description: Set the role as default for new users. - parameters: [] - requestBody: - required: true - description: Object that contains role information. - content: - application/json: - schema: - type: object - properties: - id: - type: string - description: Role Identifier - example: '000000000000000000000001' - required: - - id - examples: - Default: - value: - id: '000000000000000000000001' - responses: - '200': - description: Created role. - content: - application/json: - schema: - $ref: '#/components/schemas/RoleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/users: - get: - operationId: PermissionsApi_getUsers - summary: Return a list of all users. - description: Returns all users. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: role - required: false - in: query - description: Filter by role - example: '000000000000000000000001' - schema: - type: string - - name: status - required: false - in: query - description: Filter by status - example: Active - schema: - enum: - - Active - - Inactive - type: string - - name: username - required: false - in: query - description: Filter by username - example: username - schema: - type: string - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/UserDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/users/{username}: - get: - operationId: PermissionsApi_getUser - summary: Updates user permissions. - description: Updates user permissions for the specified username. - parameters: - - name: username - required: true - in: path - description: User Identifier - example: username - schema: - type: string - responses: - '200': - description: User permissions. - content: - application/json: - schema: - $ref: '#/components/schemas/UserDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - put: - operationId: PermissionsApi_updateUser - summary: Updates user permissions. - description: Updates user permissions for the specified username. - parameters: - - name: username - required: true - in: path - description: User Identifier - example: username - schema: - type: string - requestBody: - required: true - description: User permissions. - content: - application/json: - schema: - type: array - items: - type: string - examples: - Roles: - value: - - '000000000000000000000001' - - '000000000000000000000001' - responses: - '200': - description: User permissions. - content: - application/json: - schema: - $ref: '#/components/schemas/UserDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/users/{username}/policies: - get: - operationId: PermissionsApi_getAssignedPolicies - summary: Return a list of all roles. - description: Returns all roles. - parameters: - - name: username - required: true - in: path - description: User Identifier - example: username - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: status - required: false - in: query - description: Filter by status - example: Active - schema: - enum: - - DRY-RUN - - DRAFT - - PUBLISH_ERROR - - PUBLISH - - DISCONTINUED - - DEMO - type: string - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/users/{username}/policies/assign: - post: - operationId: PermissionsApi_assignPolicy - summary: Assign policy. - description: Assign policy. - parameters: - - name: username - required: true - in: path - description: User Identifier - example: username - schema: - type: string - requestBody: - required: true - description: Options. - content: - application/json: - schema: - $ref: '#/components/schemas/AssignPolicyDTO' - responses: - '200': - description: Assigned policy. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/users/{username}/delegate: - put: - operationId: PermissionsApi_delegateRole - summary: Delegate user permissions. - description: Delegate user permissions for the specified username. - parameters: - - name: username - required: true - in: path - description: User Identifier - example: username - schema: - type: string - requestBody: - required: true - description: User permissions. - content: - application/json: - schema: - type: array - items: - type: string - examples: - Roles: - value: - - '000000000000000000000001' - - '000000000000000000000001' - responses: - '200': - description: User permissions. - content: - application/json: - schema: - $ref: '#/components/schemas/UserDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/users/{username}/policies/delegate: - post: - operationId: PermissionsApi_delegatePolicy - summary: Delegate policy. - description: Delegate policy. - parameters: - - name: username - required: true - in: path - description: User Identifier - example: username - schema: - type: string - requestBody: - required: true - description: Options. - content: - application/json: - schema: - $ref: '#/components/schemas/AssignPolicyDTO' - responses: - '200': - description: Assigned policy. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /worker-tasks: - get: - operationId: WorkerTasksController_getAllWorkerTasks - summary: Get all worker tasks - description: Returns all worker tasks. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - responses: - '200': - description: Successful operation. Returns notifications and count. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/WorkersTasksDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_27 - - worker-tasks - security: - - bearer: [] - /worker-tasks/restart: - post: - operationId: WorkerTasksController_restartTask - summary: Restart task - description: Restart task - parameters: [] - responses: - '200': - description: Successful operation. Returns notifications. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_27 - security: - - bearer: [] - /worker-tasks/delete/{taskId}: - delete: - operationId: WorkerTasksController_deleteTask - summary: Delete task - description: Delete task - parameters: - - name: taskId - required: true - in: path - description: Task Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. Returns notifications. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_27 - security: - - bearer: [] -info: - title: Guardian - description: >- - The Guardian is a modular open-source solution that includes best-in-class - identity management and decentralized ledger technology (DLT) libraries. At - the heart of the Guardian solution is a sophisticated Policy Workflow Engine - (PWE) that enables applications to offer a requirements-based tokenization - implementation. - version: 2.27.1 - contact: - name: API developer - url: https://envisionblockchain.com - email: info@envisionblockchain.com - license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html -tags: [] -servers: - - url: /api/v1 - description: version 1.0 -components: - securitySchemes: - bearer: - type: http - scheme: bearer - bearerFormat: JWT - schemas: - AccountsSessionResponseDTO: - type: object - properties: - username: - type: string - role: - type: string - accessToken: - type: string - required: - - username - - role - - accessToken - InternalServerErrorDTO: - type: object - properties: - code: - type: number - example: 500 - message: - type: string - example: Error message - required: - - code - - message - AccountsResponseDTO: - type: object - properties: - username: - type: string - role: - type: string - did: - type: string - required: - - username - - role - - did - RegisterUserDTO: - type: object - properties: - username: - type: string - password: - type: string - password_confirmation: - type: string - role: - type: string - required: - - username - - password - - password_confirmation - - role - LoginUserDTO: - type: object - properties: - username: - type: string - password: - type: string - required: - - username - - password - ChangePasswordDTO: - type: object - properties: - username: - type: string - oldPassword: - type: string - newPassword: - type: string - required: - - username - - oldPassword - - newPassword - CredentialSubjectDTO: - type: object - properties: - geography: - type: string - law: - type: string - tags: - type: string - ISIC: - type: string - '@context': - type: array - items: - type: string - id: - type: string - type: - type: string - required: - - geography - - law - - tags - - ISIC - - '@context' - - id - - type - ProofDTO: - type: object - properties: - type: - type: string - created: - format: date-time - type: string - verificationMethod: - type: string - proofPurpose: - type: string - jws: - type: string - required: - - type - - created - - verificationMethod - - proofPurpose - - jws - VcDocumentDTO: - type: object - properties: - id: - type: string - type: - type: array - items: - type: string - issuer: - type: string - issuanceDate: - format: date-time - type: string - '@context': - type: array - items: - type: string - credentialSubject: - $ref: '#/components/schemas/CredentialSubjectDTO' - proof: - $ref: '#/components/schemas/ProofDTO' - required: - - id - - type - - issuer - - issuanceDate - - '@context' - - credentialSubject - - proof - PolicyTestDTO: - type: object - properties: - id: - type: string - description: Test ID - example: '000000000000000000000001' - uuid: - type: string - description: Test UUID - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - description: Test Name - example: Test Name - policyId: - type: string - description: Policy ID - example: '000000000000000000000001' - owner: - type: string - description: Test owner - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - status: - type: string - description: Test status - enum: - - New - - Running - - Stopped - - Success - - Failure - example: New - date: - type: string - description: Last start date - example: '1900-01-01T00:00:00.000Z' - duration: - type: string - description: Test duration - example: 0 - progress: - type: string - description: Test progress - example: 0 - resultId: - type: string - description: Test result - example: 00000000-0000-0000-0000-000000000000 - result: - type: string - description: Test result - required: - - id - - uuid - - name - - policyId - - owner - - status - - date - - duration - - progress - - resultId - - result - PolicyDTO: - type: object - properties: - id: - type: string - example: '000000000000000000000001' - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Policy name - description: - type: string - example: Description - topicDescription: - type: string - example: Description - policyTag: - type: string - example: Tag - status: - type: string - enum: - - DRY-RUN - - DRAFT - - PUBLISH_ERROR - - PUBLISH - - DISCONTINUED - - DEMO - example: DRAFT - creator: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - owner: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - topicId: - type: string - example: 0.0.1 - messageId: - type: string - example: '0000000000.000000001' - codeVersion: - type: string - example: 1.0.0 - createDate: - type: string - example: '1900-01-01T00:00:00.000Z' - version: - type: string - example: 1.0.0 - config: - type: object - userRole: - type: string - example: Installer - userRoles: - example: - - Installer - type: array - items: - type: string - userGroup: - type: object - example: - uuid: 00000000-0000-0000-0000-000000000000 - role: Installer - groupLabel: Label - groupName: Name - active: true - userGroups: - example: - - uuid: 00000000-0000-0000-0000-000000000000 - role: Installer - groupLabel: Label - groupName: Name - active: true - type: array - items: - type: object - policyRoles: - example: - - Registrant - type: array - items: - type: string - policyNavigation: - example: - - role: Registrant - steps: - - block: Block tag - level: 1 - name: Step name - type: array - items: - type: object - policyTopics: - example: - - name: Project - description: Project - memoObj: topic - static: false - type: any - type: array - items: - type: object - policyTokens: - example: - - tokenName: Token name - tokenSymbol: Token symbol - tokenType: non-fungible - decimals: '' - changeSupply: true - enableAdmin: true - enableFreeze: true - enableKYC: true - enableWipe: true - templateTokenTag: token_template_0 - type: array - items: - type: object - policyGroups: - example: - - name: Group name - creator: Registrant - groupAccessType: Private - groupRelationshipType: Multiple - members: - - Registrant - type: array - items: - type: object - categories: - type: array - items: - type: string - projectSchema: - type: string - example: 00000000-0000-0000-0000-000000000000 - tests: - type: array - items: - $ref: '#/components/schemas/PolicyTestDTO' - required: - - id - - uuid - - name - - description - - topicDescription - - policyTag - - status - - creator - - owner - - topicId - - messageId - - codeVersion - - createDate - - version - - config - - userRole - - userRoles - - userGroup - - userGroups - - policyRoles - - policyNavigation - - policyTopics - - policyTokens - - policyGroups - - categories - - projectSchema - - tests - AggregatedDTOItem: - type: object - properties: - did: - type: string - hederaAccountId: - type: string - vcDocument: - $ref: '#/components/schemas/VcDocumentDTO' - policies: - $ref: '#/components/schemas/PolicyDTO' - required: - - did - - hederaAccountId - - vcDocument - - policies - UserDTO: - type: object - properties: - username: - type: string - example: username - role: - type: string - enum: &ref_36 - - STANDARD_REGISTRY - - USER - - AUDITOR - example: USER - permissionsGroup: - example: &ref_37 - - {} - type: array - items: - type: string - permissions: - example: &ref_38 - - POLICIES_POLICY_READ - type: array - items: - type: string - did: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - parent: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - hederaAccountId: - type: string - example: 0.0.1 - required: - - username - - role - - permissions - BalanceResponseDTO: - type: object - properties: - balance: - type: number - unit: - type: string - user: - $ref: '#/components/schemas/UserDTO' - required: - - balance - - unit - - user - FilterSearchPoliciesDTO: - type: object - properties: - policyId: - type: string - example: '000000000000000000000001' - type: - type: string - enum: - - Owned - - Local - - Global - example: Local - owner: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - minVcCount: - type: number - example: 0 - minVpCount: - type: number - example: 0 - minTokensCount: - type: number - example: 0 - text: - type: string - example: Policy name - threshold: - type: number - minimum: 0 - maximum: 100 - example: 0 - SearchPolicyDTO: - type: object - properties: - type: - type: string - enum: - - Local - - Global - example: Local - id: - type: string - example: '000000000000000000000001' - topicId: - type: string - example: 0.0.1 - messageId: - type: string - example: '0000000000.000000001' - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Policy name - description: - type: string - example: Policy description - version: - type: string - example: 1.0.0 - status: - type: string - enum: - - DRY-RUN - - DRAFT - - PUBLISH_ERROR - - PUBLISH - - DISCONTINUED - - DEMO - example: DRAFT - owner: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - tags: - example: Tag - type: array - items: - type: object - vcCount: - type: number - example: 0 - vpCount: - type: number - example: 0 - tokensCount: - type: number - example: 0 - rate: - type: number - example: 0 - SearchPoliciesDTO: - type: object - properties: - target: - type: object - result: - type: array - items: - $ref: '#/components/schemas/SearchPolicyDTO' - required: - - result - CompareFileDTO: - type: object - properties: - id: - type: string - description: File ID - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - description: File Name - example: File Name - value: - type: string - description: Buffer - example: base64... - required: - - id - - name - - value - FilterPolicyDTO: - type: object - properties: - type: - type: string - description: Identifier type - enum: - - id - - message - - file - example: id - value: - oneOf: - - type: string - description: Policy ID - - type: string - description: Policy Message ID - - $ref: '#/components/schemas/CompareFileDTO' - description: Policy File - example: '000000000000000000000001' - required: - - type - - value - FilterPoliciesDTO: - type: object - properties: - idLvl: - oneOf: &ref_28 - - type: string - - type: number - enum: &ref_29 - - 0 - - 1 - example: 0 - eventsLvl: - oneOf: &ref_30 - - type: string - - type: number - enum: &ref_31 - - 0 - - 1 - example: 0 - propLvl: - oneOf: &ref_32 - - type: string - - type: number - enum: &ref_33 - - 0 - - 1 - - 2 - example: 0 - childrenLvl: - oneOf: &ref_34 - - type: string - - type: number - enum: &ref_35 - - 0 - - 1 - - 2 - example: 0 - policyId1: - type: string - example: '000000000000000000000001' - policyId2: - type: string - example: '000000000000000000000001' - policyIds: - example: - - '000000000000000000000001' - - '000000000000000000000001' - type: array - items: - type: string - policies: - example: - - type: id - value: '000000000000000000000001' - - type: message - value: '0000000000.000000001' - - type: file - value: - id: 00000000-0000-0000-0000-000000000000 - name: File Name - value: base64... - type: array - items: - $ref: '#/components/schemas/FilterPolicyDTO' - ComparePoliciesDTO: - type: object - properties: - blocks: - type: object - groups: - type: object - left: - type: object - right: - type: object - roles: - type: object - tokens: - type: object - topics: - type: object - total: - type: object - required: - - blocks - - groups - - left - - right - - roles - - tokens - - topics - - total - FilterModulesDTO: - type: object - properties: - idLvl: - oneOf: *ref_28 - enum: *ref_29 - example: 0 - eventsLvl: - oneOf: *ref_30 - enum: *ref_31 - example: 0 - propLvl: - oneOf: *ref_32 - enum: *ref_33 - example: 0 - childrenLvl: - oneOf: *ref_34 - enum: *ref_35 - example: 0 - moduleId1: - type: string - example: '000000000000000000000001' - moduleId2: - type: string - example: '000000000000000000000001' - required: - - moduleId1 - - moduleId2 - CompareModulesDTO: - type: object - properties: - blocks: - type: object - left: - type: object - right: - type: object - inputEvents: - type: object - outputEvents: - type: object - variables: - type: object - total: - type: object - required: - - blocks - - left - - right - - inputEvents - - outputEvents - - variables - - total - FilterSchemaDTO: - type: object - properties: - type: - type: string - description: Identifier type - enum: - - id - - policy-message - - policy-file - example: id - value: - type: string - description: Schema ID - example: '000000000000000000000001' - policy: - oneOf: - - description: Policy Message ID - type: string - - $ref: '#/components/schemas/CompareFileDTO' - description: Policy File - example: '000000000000000000000001' - required: - - type - - value - FilterSchemasDTO: - type: object - properties: - schemaId1: - type: string - example: '000000000000000000000001' - schemaId2: - type: string - example: '000000000000000000000001' - schemas: - example: - - type: id - value: '000000000000000000000001' - - type: policy-message - value: 00000000-0000-0000-0000-000000000000 - policy: '0000000000.000000001' - - type: policy-file - value: 00000000-0000-0000-0000-000000000000 - policy: - id: 00000000-0000-0000-0000-000000000000 - name: File Name - value: base64... - type: array - items: - $ref: '#/components/schemas/FilterSchemaDTO' - idLvl: - oneOf: - - type: string - - type: number - enum: - - 0 - - 1 - example: 0 - CompareSchemasDTO: - type: object - properties: - fields: - type: object - left: - type: object - right: - type: object - total: - type: object - required: - - fields - - left - - right - - total - FilterDocumentsDTO: - type: object - properties: - idLvl: - oneOf: *ref_28 - enum: *ref_29 - example: 0 - eventsLvl: - oneOf: *ref_30 - enum: *ref_31 - example: 0 - propLvl: - oneOf: *ref_32 - enum: *ref_33 - example: 0 - childrenLvl: - oneOf: *ref_34 - enum: *ref_35 - example: 0 - documentId1: - type: string - example: '000000000000000000000001' - documentId2: - type: string - example: '000000000000000000000001' - documentIds: - example: - - '000000000000000000000001' - - '000000000000000000000001' - type: array - items: - type: string - CompareDocumentsDTO: - type: object - properties: - documents: - type: object - left: - type: object - right: - type: object - total: - type: object - required: - - documents - - left - - right - - total - FilterToolsDTO: - type: object - properties: - idLvl: - oneOf: *ref_28 - enum: *ref_29 - example: 0 - eventsLvl: - oneOf: *ref_30 - enum: *ref_31 - example: 0 - propLvl: - oneOf: *ref_32 - enum: *ref_33 - example: 0 - childrenLvl: - oneOf: *ref_34 - enum: *ref_35 - example: 0 - toolId1: - type: string - example: '000000000000000000000001' - toolId2: - type: string - example: '000000000000000000000001' - toolIds: - example: - - '000000000000000000000001' - - '000000000000000000000001' - type: array - items: - type: string - CompareToolsDTO: - type: object - properties: - blocks: - type: object - left: - type: object - right: - type: object - inputEvents: - type: object - outputEvents: - type: object - variables: - type: object - total: - type: object - required: - - blocks - - left - - right - - inputEvents - - outputEvents - - variables - - total - FilterSearchBlocksDTO: - type: object - properties: - id: - type: string - example: 00000000-0000-0000-0000-000000000000 - config: - type: object - required: - - id - - config - SearchBlocksDTO: - type: object - properties: - name: - type: string - description: - type: string - version: - type: string - owner: - type: string - topicId: - type: string - messageId: - type: string - hash: - type: string - chains: - type: object - required: - - name - - description - - version - - owner - - topicId - - messageId - - hash - - chains - ArtifactDTOItem: - type: object - properties: - id: - type: string - name: - type: string - uuid: - type: string - extention: - type: string - type: - type: string - required: - - id - - name - - uuid - - extention - - type - ContractDTO: - type: object - properties: - id: - type: string - contractId: - type: string - description: - type: string - owner: - type: string - permissions: - type: number - topicId: - type: string - type: - type: string - enum: - - WIPE - - RETIRE - syncRequestsDate: - format: date-time - type: string - syncPoolsDate: - format: date-time - type: string - lastSyncEventTimeStamp: - type: string - wipeContractIds: - type: array - items: - type: string - wipeTokenIds: - type: array - items: - type: string - required: - - id - - contractId - - description - - owner - - permissions - - topicId - - type - - syncRequestsDate - - syncPoolsDate - - lastSyncEventTimeStamp - - wipeContractIds - - wipeTokenIds - ContractConfigDTO: - type: object - properties: - type: - type: string - description: - type: string - required: - - type - - description - WiperRequestDTO: - type: object - properties: - id: - type: string - contractId: - type: string - user: - type: string - token: - type: string - required: - - id - - contractId - - user - - token - RetireRequestDTO: - type: object - properties: - id: - type: string - contractId: - type: string - tokens: - type: object - properties: - token: - type: string - count: - type: number - serials: - type: array - items: - type: number - decimals: - type: number - type: - enum: - - non-fungible - - fungible - tokenSymbol: - type: string - tokenIds: - type: array - items: - type: string - user: - type: string - required: - - id - - contractId - - tokens - - tokenIds - - user - Date: - type: object - properties: {} - RetirePoolDTO: - type: object - properties: - id: - type: string - contractId: - type: string - tokens: - type: object - properties: - token: - type: string - contract: - type: string - count: - type: number - decimals: - type: number - type: - enum: - - non-fungible - - fungible - tokenSymbol: - type: string - tokenIds: - type: array - items: - type: string - immediately: - type: boolean - enabled: - type: boolean - required: - - id - - contractId - - tokens - - tokenIds - - immediately - - enabled - RetirePoolTokenDTO: - type: object - properties: - token: - type: string - count: - type: number - required: - - token - - count - RetireRequestTokenDTO: - type: object - properties: - token: - type: string - count: - type: number - serials: - type: array - items: - type: string - required: - - token - - count - - serials - RegisteredUsersDTO: - type: object - properties: - username: - type: string - did: - type: string - parent: - type: string - role: - type: string - policyRoles: - type: array - items: - type: string - required: - - username - - did - - parent - - role - - policyRoles - TaskDTO: - type: object - properties: - taskId: - type: string - description: Task Id - example: 00000000-0000-0000-0000-000000000000 - expectation: - type: number - description: Expected count of task phases - example: 0 - required: - - taskId - - expectation - VCDocumentDTO: - type: object - properties: - id: - type: string - nullable: false - '@context': - type: array - items: - type: string - type: - type: array - items: - type: string - credentialSubject: - type: array - items: - type: object - issuer: - type: object - issuanceDate: - type: string - proof: - type: object - nullable: true - required: - - id - - '@context' - - type - - credentialSubject - - issuer - - issuanceDate - - proof - ExternalDocumentDTO: - type: object - properties: - owner: - type: string - policyTag: - type: string - document: - nullable: false - allOf: - - $ref: '#/components/schemas/VCDocumentDTO' - required: - - owner - - policyTag - - document - LogFilterDTO: - type: object - properties: - type: - type: string - nullable: true - startDate: - type: string - nullable: true - endDate: - type: string - nullable: true - attributes: - nullable: true - type: array - items: - type: string - message: - type: string - nullable: true - pageSize: - type: number - nullable: true - pageIndex: - type: number - nullable: true - sortDirection: - type: string - nullable: true - required: - - type - - startDate - - endDate - - attributes - - message - - pageSize - - pageIndex - - sortDirection - LogResultDTO: - type: object - properties: - totalCount: - type: number - logs: - type: array - items: - type: object - required: - - totalCount - - logs - ModuleDTO: - type: object - properties: - id: - type: string - nullable: false - uuid: - type: string - nullable: false - type: - type: string - nullable: false - name: - type: string - nullable: false - description: - type: string - nullable: false - status: - type: string - nullable: false - creator: - type: string - nullable: false - owner: - type: string - nullable: false - topicId: - type: string - nullable: false - messageId: - type: string - nullable: false - codeVersion: - type: string - nullable: false - createDate: - type: string - nullable: false - config: - type: object - nullable: true - required: - - id - - uuid - - type - - name - - description - - status - - creator - - owner - - topicId - - messageId - - codeVersion - - createDate - - config - SchemaDTO: - type: object - properties: - id: - type: string - example: '000000000000000000000001' - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Schema name - description: - type: string - example: Description - entity: - type: string - enum: - - NONE - - VC - - EVC - - STANDARD_REGISTRY - - USER - - POLICY - - MINT_TOKEN - - RETIRE - - WIPE_TOKEN - - MINT_NFTOKEN - - ISSUER - - USER_ROLE - - CHUNK - - ACTIVITY_IMPACT - - TOKEN_DATA_SOURCE - - ROLE - - USER_PERMISSIONS - example: POLICY - iri: - type: string - example: 00000000-0000-0000-0000-000000000000 - status: - type: string - enum: - - DRAFT - - PUBLISHED - - UNPUBLISHED - - ERROR - - DEMO - example: DRAFT - topicId: - type: string - example: 0.0.1 - version: - type: string - example: 1.0.0 - owner: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - messageId: - type: string - example: '0000000000.000000001' - category: - type: string - enum: - - POLICY - - MODULE - - SYSTEM - - TAG - - TOOL - example: POLICY - documentURL: - type: string - example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - contextURL: - type: string - example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - document: - type: object - context: - type: object - required: - - id - - uuid - - name - - description - - entity - - iri - - status - - topicId - - version - - owner - - messageId - - category - - documentURL - - contextURL - - document - - context - ExportMessageDTO: - type: object - properties: - uuid: - type: string - name: - type: string - description: - type: string - messageId: - type: string - owner: - type: string - required: - - uuid - - name - - description - - messageId - - owner - ImportMessageDTO: - type: object - properties: - messageId: - type: string - metadata: - type: object - nullable: true - required: - - messageId - - metadata - ModulePreviewDTO: - type: object - properties: - module: - nullable: false - allOf: - - $ref: '#/components/schemas/ModuleDTO' - messageId: - type: string - schemas: - nullable: true - type: array - items: - type: object - tags: - nullable: true - type: array - items: - type: object - moduleTopicId: - type: string - nullable: true - required: - - module - - messageId - - schemas - - tags - - moduleTopicId - BlockErrorsDTO: - type: object - properties: - id: - type: string - name: - type: string - errors: - type: array - items: - type: string - isValid: - type: boolean - required: - - id - - name - - errors - - isValid - ValidationErrorsDTO: - type: object - properties: - blocks: - nullable: true - type: array - items: - $ref: '#/components/schemas/BlockErrorsDTO' - errors: - nullable: true - type: array - items: - type: string - required: - - blocks - - errors - ModuleValidationDTO: - type: object - properties: - module: - nullable: false - allOf: - - $ref: '#/components/schemas/ModuleDTO' - results: - nullable: false - allOf: - - $ref: '#/components/schemas/ValidationErrorsDTO' - required: - - module - - results - BlockDTO: - type: object - properties: - id: - type: string - blockType: - type: string - blocks: - type: array - items: - $ref: '#/components/schemas/BlockDTO' - required: - - id - - blockType - - blocks - ToolDTO: - type: object - properties: - id: - type: string - example: '000000000000000000000001' - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Tool name - description: - type: string - example: Description - status: - type: string - enum: - - DRAFT - - PUBLISHED - - PUBLISH_ERROR - example: NEW - creator: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - owner: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - topicId: - type: string - example: 0.0.1 - messageId: - type: string - example: '0000000000.000000001' - codeVersion: - type: string - example: 1.0.0 - createDate: - type: string - example: '1900-01-01T00:00:00.000Z' - config: - $ref: '#/components/schemas/BlockDTO' - required: - - id - - uuid - - name - - description - - status - - creator - - owner - - topicId - - messageId - - codeVersion - - createDate - - config - ToolValidationDTO: - type: object - properties: - tool: - $ref: '#/components/schemas/ToolDTO' - results: - $ref: '#/components/schemas/ValidationErrorsDTO' - required: - - tool - - results - ToolPreviewDTO: - type: object - properties: - tool: - $ref: '#/components/schemas/ToolDTO' - schemas: - type: array - items: - type: object - tags: - type: array - items: - type: object - tools: - type: array - items: - $ref: '#/components/schemas/ToolDTO' - required: - - tool - - schemas - - tags - - tools - ProfileDTO: - type: object - properties: - username: - type: string - example: username - role: - type: string - enum: *ref_36 - example: USER - permissionsGroup: - example: *ref_37 - type: array - items: - type: string - permissions: - example: *ref_38 - type: array - items: - type: string - did: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - parent: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - hederaAccountId: - type: string - example: 0.0.1 - confirmed: - type: boolean - example: true - failed: - type: boolean - example: true - topicId: - type: string - example: 0.0.1 - parentTopicId: - type: string - example: 0.0.1 - didDocument: - type: object - nullable: true - vcDocument: - type: object - nullable: true - required: - - username - - role - - permissions - SubjectDTO: - type: object - properties: - '@context': - nullable: true - type: array - items: - type: string - id: - type: string - nullable: true - type: - type: string - nullable: true - required: - - '@context' - DidDocumentDTO: - type: object - properties: - id: - type: string - nullable: false - context: - nullable: true - type: array - items: - type: string - alsoKnownAs: - nullable: true - type: array - items: - type: string - controller: - nullable: true - type: array - items: - type: string - verificationMethod: - nullable: true - type: array - items: - type: object - authentication: - nullable: true - type: array - items: - type: object - assertionMethod: - nullable: true - type: array - items: - type: object - keyAgreement: - nullable: true - type: array - items: - type: object - capabilityInvocation: - nullable: true - type: array - items: - type: object - capabilityDelegation: - nullable: true - type: array - items: - type: object - service: - nullable: true - type: array - items: - type: object - required: - - id - - context - - alsoKnownAs - - controller - - verificationMethod - - authentication - - assertionMethod - - keyAgreement - - capabilityInvocation - - capabilityDelegation - - service - DidKeyDTO: - type: object - properties: - id: - type: string - nullable: false - key: - type: string - nullable: false - required: - - id - - key - CredentialsDTO: - type: object - properties: - entity: - type: string - nullable: false - hederaAccountId: - type: string - nullable: false - hederaAccountKey: - type: string - nullable: false - parent: - type: string - nullable: true - vcDocument: - nullable: true - allOf: - - $ref: '#/components/schemas/SubjectDTO' - didDocument: - nullable: true - allOf: - - $ref: '#/components/schemas/DidDocumentDTO' - didKeys: - nullable: true - type: array - items: - $ref: '#/components/schemas/DidKeyDTO' - required: - - entity - - hederaAccountId - - hederaAccountKey - DidDocumentStatusDTO: - type: object - properties: - valid: - type: boolean - nullable: false - error: - type: string - nullable: true - didDocument: - type: object - nullable: false - required: - - valid - - error - - didDocument - DidKeyStatusDTO: - type: object - properties: - id: - type: string - nullable: false - key: - type: string - nullable: false - valid: - type: boolean - nullable: false - required: - - id - - key - - valid - DidDocumentWithKeyDTO: - type: object - properties: - document: - nullable: false - allOf: - - $ref: '#/components/schemas/DidDocumentDTO' - keys: - nullable: false - type: array - items: - $ref: '#/components/schemas/DidKeyDTO' - required: - - document - - keys - MigrationConfigPoliciesDTO: - type: object - properties: - src: - type: string - dst: - type: string - required: - - src - - dst - MigrationConfigDTO: - type: object - properties: - policies: - $ref: '#/components/schemas/MigrationConfigPoliciesDTO' - vcs: - type: array - items: - type: string - vps: - type: array - items: - type: string - schemas: - type: object - groups: - type: object - roles: - type: object - blocks: - type: object - tokens: - type: object - migrateState: - type: boolean - migrateRetirePools: - type: boolean - editedVCs: - type: object - retireContractId: - type: string - required: - - policies - - vcs - - vps - - schemas - - groups - - roles - - blocks - - tokens - - migrateState - - migrateRetirePools - - editedVCs - - retireContractId - PoliciesValidationDTO: - type: object - properties: - policies: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - isValid: - type: string - errors: - $ref: '#/components/schemas/ValidationErrorsDTO' - required: - - policies - - isValid - - errors - PolicyValidationDTO: - type: object - properties: - policy: - $ref: '#/components/schemas/PolicyDTO' - results: - $ref: '#/components/schemas/ValidationErrorsDTO' - required: - - policy - - results - Object: - type: object - properties: {} - ServiceUnavailableErrorDTO: - type: object - properties: - code: - type: number - example: 503 - message: - type: string - example: Error message - required: - - code - - message - PolicyPreviewDTO: - type: object - properties: - module: - $ref: '#/components/schemas/PolicyDTO' - messageId: - type: string - example: '0000000000.000000001' - schemas: - type: array - items: - type: object - tags: - type: array - items: - type: object - moduleTopicId: - type: string - example: 0.0.1 - required: - - module - - messageId - - schemas - - tags - - moduleTopicId - RunningDetailsDTO: - type: object - properties: - left: - type: object - right: - type: object - total: - type: number - documents: - type: object - required: - - left - - right - - total - - documents - PolicyCategoryDTO: - type: object - properties: - id: - type: string - example: '000000000000000000000001' - name: - type: string - example: Large-Scale - type: - type: string - example: PROJECT_SCALE - required: - - id - - name - - type - VersionSchemaDTO: - type: object - properties: - version: - type: string - example: 1.0.0 - required: - - version - MessageSchemaDTO: - type: object - properties: - messageId: - type: string - example: '0000000000.000000001' - required: - - messageId - ExportSchemaDTO: - type: object - properties: - id: - type: string - example: '000000000000000000000001' - name: - type: string - example: Schema name - description: - type: string - example: Description - version: - type: string - example: 1.0.0 - owner: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - messageId: - type: string - example: '0000000000.000000001' - required: - - id - - name - - description - - version - - owner - - messageId - SystemSchemaDTO: - type: object - properties: - name: - type: string - example: Schema name - entity: - type: string - enum: - - STANDARD_REGISTRY - - USER - example: STANDARD_REGISTRY - required: - - name - - entity - SettingsDTO: - type: object - properties: - ipfsStorageApiKey: - type: string - operatorId: - type: string - operatorKey: - type: string - required: - - ipfsStorageApiKey - - operatorId - - operatorKey - TagDTO: - type: object - properties: - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Tag label - description: - type: string - example: Description - owner: - type: string - example: DID - date: - type: string - example: '1900-01-01T00:00:00.000Z' - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - status: - type: string - enum: - - Draft - - Published - - History - example: Published - operation: - type: string - enum: - - Create - - Delete - example: Create - topicId: - type: string - example: 0.0.1 - messageId: - type: string - example: '0000000000.000000001' - policyId: - type: string - example: '000000000000000000000001' - uri: - type: string - example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - target: - type: string - example: '0000000000.000000001' - localTarget: - type: string - example: '000000000000000000000001' - document: - type: object - required: - - uuid - - name - - description - - owner - - date - - entity - - status - - operation - - topicId - - messageId - - policyId - - uri - - target - - localTarget - - document - TagFilterDTO: - type: object - properties: - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - target: - type: string - example: '0000000000.000000001' - targets: - example: '0000000000.000000001' - type: array - items: - type: string - required: - - entity - - target - - targets - TagMapDTO: - type: object - properties: - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - target: - type: string - example: '0000000000.000000001' - refreshDate: - type: string - example: '1900-01-01T00:00:00.000Z' - tags: - type: array - items: - $ref: '#/components/schemas/TagDTO' - required: - - entity - - target - - refreshDate - - tags - StatusDTO: - type: object - properties: - message: - type: string - description: Text - type: - type: string - description: Type - enum: - - Processing - - Completed - - Info - example: Info - required: - - message - - type - TaskStatusDTO: - type: object - properties: - action: - type: string - description: Task type - example: Create policy - userId: - type: string - description: User Id - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - expectation: - type: number - description: Expected count of task phases - example: 0 - taskId: - type: string - description: Task Id - example: 00000000-0000-0000-0000-000000000000 - date: - type: string - description: Date - example: '1900-01-01T00:00:00.000Z' - statuses: - type: array - items: - $ref: '#/components/schemas/StatusDTO' - result: - type: object - error: - type: object - required: - - action - - userId - - expectation - - taskId - - date - - statuses - - result - - error - TokenDTO: - type: object - properties: - tokenId: - type: string - example: 0.0.1 - tokenName: - type: string - example: Token name - tokenSymbol: - type: string - example: Token symbol - tokenType: - type: string - enum: - - fungible - - non-fungible - example: non-fungible - initialSupply: - type: string - example: '0' - decimals: - type: string - example: '0' - changeSupply: - type: boolean - description: Add Supply key - example: true - enableAdmin: - type: boolean - description: Add Admin key - example: true - enableFreeze: - type: boolean - description: Add Freeze key - example: true - enableKYC: - type: boolean - description: Add KYC key - example: true - enableWipe: - type: boolean - description: Add Wipe key - example: true - required: - - tokenId - - tokenName - - tokenSymbol - - tokenType - - initialSupply - - decimals - - changeSupply - - enableAdmin - - enableFreeze - - enableKYC - - enableWipe - TokenInfoDTO: - type: object - properties: - id: - type: string - example: '000000000000000000000001' - tokenId: - type: string - example: 0.0.1 - tokenName: - type: string - example: Token name - tokenSymbol: - type: string - example: Token symbol - tokenType: - type: string - enum: - - fungible - - non-fungible - example: non-fungible - decimals: - type: string - example: '0' - associated: - type: boolean - description: '' - example: true - frozen: - type: boolean - description: '' - example: true - kyc: - type: boolean - description: '' - example: true - balance: - type: string - description: User balance - example: '0' - enableAdmin: - type: boolean - description: There is an Admin key - example: true - enableFreeze: - type: boolean - description: There is an Freeze key - example: true - enableKYC: - type: boolean - description: There is an KYC key - example: true - enableWipe: - type: boolean - description: There is an Wipe key - example: true - required: - - id - - tokenId - - tokenName - - tokenSymbol - - tokenType - - decimals - - associated - - frozen - - kyc - - balance - - enableAdmin - - enableFreeze - - enableKYC - - enableWipe - ThemeRoleDTO: - type: object - properties: - description: - type: string - example: Description - text: - type: string - description: Text color - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - background: - type: string - description: Background color - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - border: - type: string - description: Border color - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - shape: - type: string - description: Object shape - enum: - - '0' - - '1' - - '2' - - '3' - - '4' - - '5' - example: '0' - borderWidth: - type: string - description: Border width - enum: - - 0px - - 1px - - 2px - - 3px - - 4px - - 5px - - 6px - - 7px - example: 2px - filterType: - type: string - description: Filter by type - enum: - - type - - api - - role - example: type - filterValue: - oneOf: - - type: string - - type: array - items: - type: string - required: - - description - - text - - background - - border - - shape - - borderWidth - - filterType - - filterValue - ThemeDTO: - type: object - properties: - id: - type: string - example: '000000000000000000000001' - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Theme name - rules: - type: array - items: - $ref: '#/components/schemas/ThemeRoleDTO' - required: - - id - - uuid - - name - - rules - VpDTO: - type: object - properties: - '@context': - type: array - items: - type: string - id: - type: string - example: 00000000-0000-0000-0000-000000000000 - type: - type: array - items: - type: string - verifiableCredential: - type: array - items: - type: object - proof: - type: object - required: - - '@context' - - id - - type - - verifiableCredential - - proof - VpDocumentDTO: - type: object - properties: - id: - type: string - example: '000000000000000000000001' - policyId: - type: string - example: '000000000000000000000001' - hash: - type: string - example: hash - signature: - type: number - example: 0 - status: - type: string - enum: - - NEW - - ISSUE - - REVOKE - - SUSPEND - - RESUME - - FAILED - example: NEW - tag: - type: string - example: Block tag - type: - type: string - example: Document type - createDate: - type: string - example: '1900-01-01T00:00:00.000Z' - updateDate: - type: string - example: '1900-01-01T00:00:00.000Z' - owner: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - document: - $ref: '#/components/schemas/VpDTO' - required: - - id - - policyId - - hash - - signature - - status - - tag - - type - - createDate - - updateDate - - owner - - document - WizardConfigDTO: - type: object - properties: - roles: - type: array - items: - type: string - policy: - type: string - properties: - name: - type: string - description: - type: string - topicDescription: - type: string - policyTag: - type: string - schemas: - properties: - name: - type: string - iri: - type: string - isApproveEnable: - type: boolean - isMintSchema: - type: boolean - mintOptions: - type: object - properties: - tokenId: - type: string - rule: - type: string - dependencySchemaIri: - type: string - relationshipsSchemaIri: - type: string - initialRolesFor: - type: array - items: - type: string - rolesConfig: - type: array - items: - type: object - properties: - role: - type: string - isApprover: - type: boolean - isCreator: - type: boolean - gridColumns: - type: array - items: - type: object - properties: - field: - type: string - title: - type: string - type: array - items: - type: string - trustChain: - properties: - role: - type: string - mintSchemaIri: - type: string - viewOnlyOwnDocuments: - type: boolean - type: array - items: - type: string - required: - - roles - - policy - - schemas - - trustChain - WizardResultDTO: - type: object - properties: - policyId: - type: string - wizardConfig: - $ref: '#/components/schemas/WizardConfigDTO' - required: - - policyId - - wizardConfig - WizardConfigAsyncDTO: - type: object - properties: - saveState: - type: boolean - wizardConfig: - $ref: '#/components/schemas/WizardConfigDTO' - required: - - saveState - - wizardConfig - WizardPreviewDTO: - type: object - properties: - policyConfig: - $ref: '#/components/schemas/PolicyDTO' - wizardConfig: - $ref: '#/components/schemas/WizardConfigDTO' - required: - - policyConfig - - wizardConfig - BrandingDTO: - type: object - properties: - headerColor: - type: string - primaryColor: - type: string - companyName: - type: string - companyLogoUrl: - type: string - loginBannerUrl: - type: string - faviconUrl: - type: string - headerColor1: - type: string - termsAndConditions: - type: string - required: - - headerColor - - primaryColor - - companyName - - companyLogoUrl - - loginBannerUrl - - faviconUrl - - headerColor1 - - termsAndConditions - SuggestionsInputDTO: - type: object - properties: - blockType: - type: string - children: - nullable: true - type: array - items: - type: object - required: - - blockType - - children - SuggestionsOutputDTO: - type: object - properties: - next: - type: string - nested: - type: string - required: - - next - - nested - SuggestionsConfigItemDTO: - type: object - properties: - id: - type: string - type: - type: string - enum: - - Policy - - Module - index: - type: number - required: - - id - - type - - index - SuggestionsConfigDTO: - type: object - properties: - items: - $ref: '#/components/schemas/SuggestionsConfigItemDTO' - required: - - items - NotificationDTO: - type: object - properties: - title: - type: string - message: - type: string - type: - type: string - enum: - - INFO - - ERROR - - WARN - - SUCCESS - action: - type: string - enum: - - POLICY_CONFIGURATION - - POLICY_VIEW - - POLICIES_PAGE - - SCHEMAS_PAGE - - TOKENS_PAGE - - PROFILE_PAGE - result: - type: object - read: - type: boolean - old: - type: boolean - required: - - title - - message - - type - - action - - result - - read - - old - ProgressDTO: - type: object - properties: - action: - type: string - message: - type: string - progress: - type: number - type: - type: string - enum: - - INFO - - ERROR - - WARN - - SUCCESS - taskId: - type: string - required: - - action - - message - - progress - - type - - taskId - ProjectDTO: - type: object - properties: - id: - type: string - policyId: - type: string - policyName: - type: string - registered: - type: string - title: - type: string - companyName: - type: string - sectoralScope: - type: string - required: - - id - - policyId - - policyName - - registered - - title - - companyName - - sectoralScope - CompareDocumentsV2DTO: - type: object - properties: - projects: - $ref: '#/components/schemas/CompareDocumentsDTO' - presentations: - $ref: '#/components/schemas/CompareDocumentsDTO' - required: - - projects - - presentations - PropertiesDTO: - type: object - properties: - id: - type: string - title: - type: string - value: - type: string - required: - - id - - title - - value - RecordStatusDTO: - type: object - properties: - type: - type: string - policyId: - type: string - uuid: - type: string - status: - type: string - required: - - type - - policyId - - uuid - - status - RecordActionDTO: - type: object - properties: - uuid: - type: string - policyId: - type: string - method: - type: string - action: - type: string - time: - type: string - user: - type: string - target: - type: string - required: - - uuid - - policyId - - method - - action - - time - - user - - target - ResultInfoDTO: - type: object - properties: - tokens: - type: number - documents: - type: number - required: - - tokens - - documents - ResultDocumentDTO: - type: object - properties: - type: - type: string - schema: - type: string - rate: - type: string - documents: - type: object - required: - - type - - schema - - rate - - documents - RunningResultDTO: - type: object - properties: - info: - $ref: '#/components/schemas/ResultInfoDTO' - total: - type: number - documents: - $ref: '#/components/schemas/ResultDocumentDTO' - required: - - info - - total - - documents - RoleDTO: - type: object - properties: - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Name - description: - type: string - example: Description - owner: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - permissions: - type: string - enum: &ref_39 - - ANALYTIC_POLICY_READ - - ANALYTIC_MODULE_READ - - ANALYTIC_TOOL_READ - - ANALYTIC_SCHEMA_READ - - ANALYTIC_DOCUMENT_READ - - ARTIFACTS_FILE_READ - - ARTIFACTS_FILE_CREATE - - ARTIFACTS_FILE_DELETE - - CONTRACTS_CONTRACT_READ - - CONTRACTS_CONTRACT_EXECUTE - - CONTRACTS_CONTRACT_MANAGE - - MODULES_MODULE_READ - - MODULES_MODULE_CREATE - - MODULES_MODULE_UPDATE - - MODULES_MODULE_DELETE - - MODULES_MODULE_REVIEW - - POLICIES_POLICY_READ - - POLICIES_POLICY_CREATE - - POLICIES_POLICY_UPDATE - - POLICIES_POLICY_DELETE - - POLICIES_POLICY_REVIEW - - POLICIES_POLICY_EXECUTE - - POLICIES_POLICY_MANAGE - - SCHEMAS_SCHEMA_READ - - SCHEMAS_SCHEMA_CREATE - - SCHEMAS_SCHEMA_UPDATE - - SCHEMAS_SCHEMA_DELETE - - SCHEMAS_SCHEMA_REVIEW - - TOOLS_TOOL_READ - - TOOLS_TOOL_CREATE - - TOOLS_TOOL_UPDATE - - TOOLS_TOOL_DELETE - - TOOLS_TOOL_REVIEW - - TOKENS_TOKEN_READ - - TOKENS_TOKEN_CREATE - - TOKENS_TOKEN_UPDATE - - TOKENS_TOKEN_DELETE - - TOKENS_TOKEN_EXECUTE - - TOKENS_TOKEN_MANAGE - - TAGS_TAG_READ - - TAGS_TAG_CREATE - - SUGGESTIONS_SUGGESTIONS_READ - - SUGGESTIONS_SUGGESTIONS_UPDATE - - PERMISSIONS_ROLE_READ - - PERMISSIONS_ROLE_CREATE - - PERMISSIONS_ROLE_UPDATE - - PERMISSIONS_ROLE_DELETE - - PERMISSIONS_ROLE_MANAGE - - ACCESS_POLICY_ALL - - ACCESS_POLICY_ASSIGNED - - ACCESS_POLICY_PUBLISHED - - ACCESS_POLICY_ASSIGNED_AND_PUBLISHED - - DELEGATION_ROLE_MANAGE - example: - - POLICIES_POLICY_READ - required: - - uuid - - name - - description - - owner - - permissions - PermissionsDTO: - type: object - properties: - name: - type: string - enum: *ref_39 - example: ANALYTIC_POLICY_READ - category: - type: string - enum: - - ACCOUNTS - - SESSION - - PROFILES - - ANALYTIC - - ARTIFACTS - - POLICIES - - BRANDING - - CONTRACTS - - DEMO - - IPFS - - LOG - - MODULES - - SETTINGS - - SUGGESTIONS - - TAGS - - SCHEMAS - - TOKENS - - AUDIT - - TOOLS - - PERMISSIONS - - ACCESS - - DELEGATION - example: ANALYTIC - entity: - type: string - enum: - - ACCOUNT - - STANDARD_REGISTRY - - USER - - BALANCE - - RESTORE - - RECORD - - POLICY - - TOOL - - DOCUMENT - - SCHEMA - - MODULE - - FILE - - CONFIG - - CONTRACT - - WIPE_REQUEST - - WIPE_ADMIN - - WIPE_MANAGER - - WIPER - - POOL - - RETIRE_REQUEST - - RETIRE_ADMIN - - PERMISSIONS - - KEY - - LOG - - MIGRATION - - SETTINGS - - SUGGESTIONS - - TAG - - SYSTEM_SCHEMA - - THEME - - TOKEN - - TRUST_CHAIN - - ROLE - example: POLICY - action: - type: string - enum: - - ALL - - READ - - CREATE - - UPDATE - - DELETE - - REVIEW - - AUDIT - - EXECUTE - - MANAGE - - ASSIGNED - - PUBLISHED - - ASSIGNED_AND_PUBLISHED - example: READ - disabled: - type: boolean - example: false - dependOn: - example: - - POLICIES_POLICY_READ - type: array - items: - type: string - required: - - name - - category - - entity - - action - - disabled - - dependOn - AssignPolicyDTO: - type: object - properties: - policyIds: - example: - - '000000000000000000000001' - type: array - items: - type: string - assign: - type: boolean - example: true - required: - - policyIds - - assign - WorkersTasksDTO: - type: object - properties: - createDate: - type: string - done: - type: boolean - id: - type: string - isRetryableTask: - type: boolean - processedTime: - type: string - sent: - type: boolean - taskId: - type: string - type: - type: string - updateDate: - type: string - required: - - createDate - - done - - id - - isRetryableTask - - processedTime - - sent - - taskId - - type - - updateDate +openapi: 3.0.0 +paths: + /accounts/session: + get: + operationId: AccountApi_getSession + summary: Returns current session of the user. + description: Returns current user session. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsSessionResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_0 + - accounts + security: + - bearer: [] + /accounts/register: + post: + operationId: AccountApi_register + summary: Registers a new user account. + description: Object that contain username, password and role (optional) fields. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterUserDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /accounts/login: + post: + operationId: AccountApi_login + summary: Logs user into the system. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LoginUserDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsSessionResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /accounts/change-password: + post: + operationId: AccountApi_changePassword + summary: Change user password. + parameters: [] + requestBody: + required: true + description: User credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/ChangePasswordDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsSessionResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /accounts/access-token: + post: + operationId: AccountApi_getAccessToken + summary: Returns access token. + description: Returns access token. + parameters: [] + responses: + '200': + description: Successful operation. + tags: *ref_0 + /accounts: + get: + operationId: AccountApi_getAllAccounts + summary: Returns a list of users, excluding Standard Registry and Auditors. + description: >- + Returns all users except those with roles Standard Registry and Auditor. + Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /accounts/standard-registries: + get: + operationId: AccountApi_getStandardRegistries + summary: Returns all Standard Registries. + description: Returns all Standard Registries. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /accounts/standard-registries/aggregated: + get: + operationId: AccountApi_getAggregatedStandardRegistries + summary: Returns all Standard Registries aggregated with polices and vcDocuments. + description: Returns all Standard Registries aggregated with polices and vcDocuments + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AggregatedDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /accounts/balance: + get: + operationId: AccountApi_getBalance + summary: Returns user's Hedera account balance. + description: Requests current Hedera account balance. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /analytics/search/policies: + post: + operationId: AnalyticsApi_searchPolicies + summary: Search policies. + description: >- + Search policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSearchPoliciesDTO' + examples: + Filter: + value: + policyId: '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SearchPoliciesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_1 + - analytics + security: + - bearer: [] + /analytics/compare/policies: + post: + operationId: AnalyticsApi_comparePolicies + summary: Compare policies. + description: >- + Compare policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterPoliciesDTO' + examples: + Filter1: + value: + policyId1: '000000000000000000000001' + policyId2: '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter2: + value: + policyIds: + - '000000000000000000000001' + - '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter3: + value: + policies: + - type: id + value: '000000000000000000000001' + - type: message + value: '0000000000.000000001' + - type: file + value: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ComparePoliciesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/modules: + post: + operationId: AnalyticsApi_compareModules + summary: Compare modules. + description: >- + Compare modules. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterModulesDTO' + examples: + Filter: + value: + moduleId1: '000000000000000000000001' + moduleId2: '000000000000000000000001' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareModulesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/schemas: + post: + operationId: AnalyticsApi_compareSchemas + summary: Compare schemas. + description: >- + Compare schemas. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSchemasDTO' + examples: + Filter: + value: + schemaId1: '000000000000000000000001' + schemaId2: '000000000000000000000001' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareSchemasDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/documents: + post: + operationId: AnalyticsApi_compareDocuments + summary: Compare documents. + description: >- + Compare documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000001' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDocumentsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/tools: + post: + operationId: AnalyticsApi_compareTools + summary: Compare tools. + description: >- + Compare tools. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterToolsDTO' + examples: + Filter1: + value: + toolId1: '000000000000000000000001' + toolId2: '000000000000000000000001' + Filter2: + value: + toolIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareToolsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/policies/export: + post: + operationId: AnalyticsApi_comparePoliciesExport + summary: Compare policies. + description: >- + Compare policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterPoliciesDTO' + examples: + Filter1: + value: + policyId1: '000000000000000000000001' + policyId2: '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter2: + value: + policyIds: + - '000000000000000000000001' + - '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter3: + value: + policies: + - type: id + value: '000000000000000000000001' + - type: message + value: '0000000000.000000001' + - type: file + value: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/modules/export: + post: + operationId: AnalyticsApi_compareModulesExport + summary: Compare modules. + description: >- + Compare modules. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterModulesDTO' + examples: + Filter: + value: + moduleId1: '000000000000000000000001' + moduleId2: '000000000000000000000001' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/schemas/export: + post: + operationId: AnalyticsApi_compareSchemasExport + summary: Compare schemas. + description: >- + Compare schemas. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSchemasDTO' + examples: + Filter: + value: + schemaId1: '000000000000000000000001' + schemaId2: '000000000000000000000001' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/documents/export: + post: + operationId: AnalyticsApi_compareDocumentsExport + summary: Compare documents. + description: >- + Compare documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000001' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/tools/export: + post: + operationId: AnalyticsApi_compareToolsExport + summary: Compare tools. + description: >- + Compare tools. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterToolsDTO' + examples: + Filter1: + value: + toolId1: '000000000000000000000001' + toolId2: '000000000000000000000001' + Filter2: + value: + toolIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/search/blocks: + post: + operationId: AnalyticsApi_searchBlocks + summary: Search same blocks. + description: >- + Search same blocks. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSearchBlocksDTO' + examples: + Filter: + value: + uuid: '' + config: {} + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SearchBlocksDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/checkIndexer: + get: + operationId: AnalyticsApi_checkIndexerAvailability + summary: Get Indexer Availability. + description: Returns Indexer Availability (true/false). + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /artifacts: + get: + operationId: ArtifactApi_getArtifactsV2 + summary: Returns all artifacts. + description: Returns all artifacts. + parameters: + - name: id + required: false + in: query + description: Artifact identifier + example: '000000000000000000000001' + schema: + type: string + - name: type + required: false + in: query + description: Tool|Policy + example: policy + schema: + enum: + - tool + - policy + type: string + - name: policyId + required: false + in: query + description: Policy identifier + example: '000000000000000000000001' + schema: + type: string + - name: toolId + required: false + in: query + description: Tool identifier + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ArtifactDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_2 + - artifacts + security: + - bearer: [] + /artifacts/{parentId}: + post: + operationId: ArtifactApi_uploadArtifacts + summary: Upload artifact. + description: Upload artifact. For users with the Standard Registry role only. + parameters: + - name: parentId + required: true + in: path + description: Parent ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Form data with artifacts. + content: + multipart/form-data: + schema: + type: array + items: + type: object + properties: + artifacts: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ArtifactDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /artifacts/{artifactId}: + delete: + operationId: ArtifactApi_deleteArtifact + summary: Delete artifact. + description: Delete artifact. + parameters: + - name: artifactId + required: true + in: path + description: Artifact ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts: + get: + operationId: ContractsApi_getContracts + summary: Return a list of all contracts. + description: Returns all contracts. + parameters: + - name: type + required: true + in: query + description: Contract type + example: RETIRE + schema: + enum: + - WIPE + - RETIRE + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Contracts. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_3 + - contracts + security: + - bearer: [] + post: + operationId: ContractsApi_createContract + summary: Create contract. + description: >- + Create smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ContractConfigDTO' + responses: + '201': + description: Created contract. + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/import: + post: + operationId: ContractsApi_importContract + summary: Import contract. + description: >- + Import smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + contractId: + type: string + description: Hedera Identifier + example: 0.0.1 + description: + type: string + required: + - contractId + responses: + '200': + description: Imported contract. + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/{contractId}/permissions: + get: + operationId: ContractsApi_contractPermissions + summary: Get contract permissions. + description: >- + Get smart-contract permissions. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Contract permissions. + content: + application/json: + schema: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/{contractId}: + delete: + operationId: ContractsApi_removeContract + summary: Remove contract. + description: >- + Remove smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/requests: + get: + operationId: ContractsApi_getWipeRequests + summary: Return a list of all wipe requests. + description: >- + Returns all wipe requests. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WiperRequestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests/enable: + post: + operationId: ContractsApi_enableWipeRequests + summary: Enable wipe requests. + description: >- + Enable wipe contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests/disable: + post: + operationId: ContractsApi_disableWipeRequests + summary: Disable wipe requests. + description: >- + Disable wipe contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/requests/{requestId}/approve: + post: + operationId: ContractsApi_approveWipeRequest + summary: Approve wipe request. + description: >- + Approve wipe contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/requests/{requestId}/reject: + delete: + operationId: ContractsApi_rejectWipeRequest + summary: Reject wipe request. + description: >- + Reject wipe contract request. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: ban + required: false + in: query + description: Reject and ban + example: true + schema: + type: boolean + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests: + delete: + operationId: ContractsApi_clearWipeRequests + summary: Clear wipe requests. + description: >- + Clear wipe contract requests. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests/{hederaId}: + delete: + operationId: ContractsApi_clearWipeRequestsWithHederaId + summary: Clear wipe requests for hedera account. + description: >- + Clear wipe contract requests for specific hedera account. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/admin/{hederaId}: + post: + operationId: ContractsApi_wipeAddAdmin + summary: Add wipe admin. + description: >- + Add wipe contract admin. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveAdmin + summary: Remove wipe admin. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/manager/{hederaId}: + post: + operationId: ContractsApi_wipeAddManager + summary: Add wipe manager. + description: >- + Add wipe contract manager. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveManager + summary: Remove wipe manager. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/wiper/{hederaId}: + post: + operationId: ContractsApi_wipeAddWiper + summary: Add wipe wiper. + description: >- + Add wipe contract wiper. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveWiper + summary: Remove wipe wiper. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/wiper/{hederaId}/{tokenId}: + post: + operationId: ContractsApi_wipeAddWiperWithToken + summary: Add wipe wiper for token. + description: >- + Add wipe contract wiper for specific token. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveWiperWithToken + summary: Remove wipe wiper for token. + description: >- + Remove wipe contract wiper for specific token. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/pools/sync: + post: + operationId: ContractsApi_retireSyncPools + summary: Sync retire pools. + description: >- + Sync retire contract pools. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Sync date. + content: + application/json: + schema: + $ref: '#/components/schemas/Date' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests: + get: + operationId: ContractsApi_getRetireRequests + summary: Return a list of all retire requests. + description: Returns all retire requests. + parameters: + - name: contractId + required: true + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RetireRequestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/pools: + get: + operationId: ContractsApi_getRetirePools + summary: Return a list of all retire pools. + description: Returns all retire pools. + parameters: + - name: contractId + required: true + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: tokens + required: true + in: query + description: Tokens + example: 0.0.1,0.0.2,0.0.3 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RetirePoolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/requests: + delete: + operationId: ContractsApi_clearRetireRequests + summary: Clear retire requests. + description: >- + Clear retire contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/pools: + delete: + operationId: ContractsApi_clearRetirePools + summary: Clear retire pools. + description: >- + Clear retire contract pools. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + post: + operationId: ContractsApi_setRetirePool + summary: Set retire pool. + description: >- + Set retire contract pool. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RetirePoolTokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RetirePoolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/pools/{poolId}: + delete: + operationId: ContractsApi_unsetRetirePool + summary: Unset retire pool. + description: >- + Unset retire contract pool. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: poolId + required: true + in: path + description: Pool Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests/{requestId}: + delete: + operationId: ContractsApi_unsetRetireRequest + summary: Unset retire request. + description: >- + Unset retire contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/pools/{poolId}/retire: + post: + operationId: ContractsApi_retire + summary: Retire tokens. + description: Retire tokens. + parameters: + - name: poolId + required: true + in: path + description: Pool Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RetireRequestTokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests/{requestId}/approve: + post: + operationId: ContractsApi_approveRetire + summary: Approve retire request. + description: >- + Approve retire contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests/{requestId}/cancel: + delete: + operationId: ContractsApi_cancelRetireRequest + summary: Cancel retire request. + description: Cancel retire contract request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/admin/{hederaId}: + post: + operationId: ContractsApi_retireAddAdmin + summary: Add retire admin. + description: >- + Add retire contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_retireRemoveAdmin + summary: Remove wipe admin. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire: + get: + operationId: ContractsApi_getRetireVCs + summary: Return a list of all retire vcs. + description: Returns all retire vcs. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retireIndexer: + get: + operationId: ContractsApi_getRetireVCsFromIndexer + summary: Return a list of all retire vcs from Indexer. + description: Returns all retire vcs from Indexer. + parameters: + - name: contractTopicId + required: true + in: query + description: The topic id of contract + example: 0.0.0000000 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /demo/registered-users: + get: + operationId: DemoApi_registeredUsers + summary: Returns list of registered users. + description: Returns list of registered users. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RegisteredUsersDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_4 + - demo + /demo/random-key: + get: + operationId: DemoApi_randomKey + summary: Generate demo key. + description: Generate demo key. + parameters: [] + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearer: [] + /demo/push/random-key: + get: + operationId: DemoApi_pushRandomKey + summary: Generate demo key. + description: Generate demo key. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearer: [] + /external: + post: + operationId: ExternalApi_receiveExternalData + summary: Sends data from an external source. + description: Sends data from an external source. + parameters: [] + requestBody: + required: true + description: Object that contains a VC Document. + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalDocumentDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - external + /ipfs/file: + post: + operationId: IpfsApi_postFile + summary: Add file from ipfs. + description: Add file from ipfs. + parameters: [] + requestBody: + required: true + description: Binary data. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_5 + - ipfs + security: + - bearer: [] + /ipfs/file/dry-run/{policyId}: + post: + operationId: IpfsApi_postFileDryRun + summary: Add file from ipfs for dry run mode. + description: Add file from ipfs for dry run mode. + parameters: + - name: policyId + required: true + in: path + description: Policy id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Binary data. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + /ipfs/file/{cid}: + get: + operationId: IpfsApi_getFile + summary: Get file from ipfs. + description: Get file from ipfs. + parameters: + - name: cid + required: true + in: path + description: File cid + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + /ipfs/file/{cid}/dry-run: + get: + operationId: IpfsApi_getFileDryRun + summary: Get file from ipfs for dry run mode. + description: Get file from ipfs for dry run mode. + parameters: + - name: cid + required: true + in: path + description: File cid + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + /logs: + post: + operationId: LoggerApi_getLogs + summary: Return a list of all logs. + description: >- + Return a list of all logs. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/LogFilterDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/LogResultDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_6 + - logs + security: + - bearer: [] + /logs/attributes: + get: + operationId: LoggerApi_getAttributes + summary: Return a list of attributes. + description: >- + Return a list of attributes. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: name + required: false + in: query + description: Name + example: Search + schema: + type: number + - name: existingAttributes + required: false + in: query + description: Existing attributes + example: + - WORKER + schema: + type: array + items: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearer: [] + /logs/seq: + get: + operationId: LoggerApi_getSeqUrl + summary: Return url on seq store. + description: >- + Return url on seq store. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + seq_url: + type: string + example: http://localhost:5341 + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearer: [] + /map/key: + get: + operationId: MapApi_getKey + summary: Get map API key. + description: Return map API key. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_7 + - map + security: + - bearer: [] + /map/sh: + get: + operationId: MapApi_getSentinelKey + summary: Get sentinel API key. + description: Return sentinel API key. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearer: [] + /metrics: + get: + operationId: MetricsApi_getMetrics + parameters: [] + responses: + '200': + description: '' + tags: + - metrics + /modules: + post: + operationId: ModulesApi_postModules + summary: Creates a new module. + description: >- + Creates a new module. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Module config. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Created module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_8 + - modules + security: + - bearer: [] + get: + operationId: ModulesApi_getModulesV2 + summary: Return a list of all modules. + description: >- + Returns all modules. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/schemas: + get: + operationId: ModulesApi_getModuleSchemas + summary: Return a list of all module schemas. + description: >- + Returns all module schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: topicId + required: false + in: query + description: Topic id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + post: + operationId: ModulesApi_postSchemas + summary: Creates a new module schema. + description: >- + Creates a new module schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '201': + description: Created schema. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}: + delete: + operationId: ModulesApi_deleteModule + summary: Deletes the module. + description: >- + Deletes the module with the provided module ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + get: + operationId: ModulesApi_getModule + summary: Retrieves module configuration. + description: >- + Retrieves module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + put: + operationId: ModulesApi_putModule + summary: Updates module configuration. + description: >- + Updates module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + requestBody: + required: true + description: Module config. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/menu: + get: + operationId: ModulesApi_getMenu + summary: Return a list of modules. + description: >- + Returns modules menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Modules. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}/export/file: + get: + operationId: ModulesApi_moduleExportFile + summary: >- + Return module and its artifacts in a zip file format for the specified + module. + description: >- + Returns a zip file containing the published module and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: File. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}/export/message: + get: + operationId: ModulesApi_moduleExportMessage + summary: Return Heder message ID for the specified published module. + description: >- + Returns the Hedera message ID for the specified module published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMessageDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/message: + post: + operationId: ModulesApi_moduleImportMessage + summary: Imports new module from IPFS. + description: >- + Imports new module and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Created module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/file: + post: + operationId: ModulesApi_moduleImportFile + summary: Imports new module from a zip file. + description: >- + Imports new module and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Created module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/message/preview: + post: + operationId: ModulesApi_moduleImportMessagePreview + summary: Imports new module from IPFS. + description: >- + Imports new module and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Module preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ModulePreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/file/preview: + post: + operationId: ModulesApi_moduleImportFilePreview + summary: Imports new module from a zip file. + description: >- + Imports new module and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Module preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ModulePreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}/publish: + put: + operationId: ModulesApi_publishModule + summary: Publishes the module onto IPFS. + description: >- + Publishes the module with the specified (internal) module ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + requestBody: + required: true + description: Module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/validate: + post: + operationId: ModulesApi_validateModule + summary: Validates selected module. + description: >- + Validates selected module. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Module config. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Validation result. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /tools: + post: + operationId: ToolsApi_createNewTool + summary: Creates a new tool. + description: >- + Creates a new tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_9 + - tools + security: + - bearer: [] + get: + operationId: ToolsApi_getToolsV2 + summary: Return a list of all tools. + description: >- + Returns all tools. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push: + post: + operationId: ToolsApi_createNewToolAsync + summary: Creates a new tool. + description: >- + Creates a new tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}: + delete: + operationId: ToolsApi_deleteTool + summary: >- + Deletes the tool with the provided tool ID. Only users with the Standard + Registry role are allowed to make the request. + description: Deletes the tool. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + get: + operationId: ToolsApi_getToolById + summary: Retrieves tool configuration. + description: >- + Retrieves tool configuration for the specified tool ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + put: + operationId: ToolsApi_updateTool + summary: Updates tool configuration. + description: >- + Updates tool configuration for the specified tool ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/publish: + put: + operationId: ToolsApi_publishTool + summary: Publishes the tool onto IPFS. + description: >- + Publishes the tool with the specified (internal) tool ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/push/publish: + put: + operationId: ToolsApi_publishToolAsync + summary: Publishes the tool onto IPFS. + description: >- + Publishes the tool with the specified (internal) tool ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/validate: + post: + operationId: ToolsApi_validateTool + summary: Validates selected tool. + description: >- + Validates selected tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Validation result. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/export/file: + get: + operationId: ToolsApi_toolExportFile + summary: >- + Return tool and its artifacts in a zip file format for the specified + tool. + description: >- + Returns a zip file containing the published tool and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/export/message: + get: + operationId: ToolsApi_toolExportMessage + summary: Return Heder message ID for the specified published tool. + description: >- + Returns the Hedera message ID for the specified tool published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMessageDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/message/preview: + post: + operationId: ToolsApi_toolImportMessagePreview + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Tool preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/message: + post: + operationId: ToolsApi_toolImportMessage + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/file/preview: + post: + operationId: ToolsApi_toolImportFilePreview + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Module preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/file: + post: + operationId: ToolsApi_toolImportFile + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/file-metadata: + post: + operationId: ToolsApi_toolImportFileWithMetadata + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Form data with tool file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push/import/file: + post: + operationId: ToolsApi_toolImportFileAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A zip file containing tool config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push/import/file-metadata: + post: + operationId: ToolsApi_toolImportFileWithMetadataAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Form data with tool file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push/import/message: + post: + operationId: ToolsApi_toolImportMessageAsync + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/menu/all: + get: + operationId: ToolsApi_getMenu + summary: Return a list of tools. + description: >- + Returns tools menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Modules. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /profiles/{username}: + get: + operationId: ProfileApi_getProfile + summary: Returns user account info. + description: >- + Returns user account information. For users with the Standard Registry + role it also returns address book and VC document information. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to fetch the information + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ProfileDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_10 + - profiles + security: + - bearer: [] + put: + operationId: ProfileApi_setUserProfile + summary: Sets Hedera credentials for the user. + description: >- + Sets Hedera credentials for the user. For users with the Standard + Registry role it also creates an address book. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to update the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Created. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/push/{username}: + put: + operationId: ProfileApi_setUserProfileAsync + summary: Sets Hedera credentials for the user. + description: >- + Sets Hedera credentials for the user. For users with the Standard + Registry role it also creates an address book. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to update the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/{username}/balance: + get: + operationId: ProfileApi_getUserBalance + summary: Returns user's Hedera account balance. + description: >- + Requests Hedera account balance. Only users with the Installer role are + allowed to make the request. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to fetch the balance. + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/restore/{username}: + put: + operationId: ProfileApi_restoreUserProfile + summary: Restore user data (policy, DID documents, VC documents). + description: Restore user data (policy, DID documents, VC documents). + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to restore the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/restore/topics/{username}: + put: + operationId: ProfileApi_restoreTopic + summary: List of available recovery topics. + description: List of available recovery topics. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to restore the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/did-document/validate: + post: + operationId: ProfileApi_validateDidDocument + summary: Validate DID document format. + description: Validate DID document format. + parameters: [] + requestBody: + required: true + description: DID Document. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/did-keys/validate: + post: + operationId: ProfileApi_validateDidKeys + summary: Validate DID document keys. + description: Validate DID document keys. + parameters: [] + requestBody: + required: true + description: DID Document and keys. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentWithKeyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/DidKeyStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /policies: + get: + operationId: PolicyApi_getPoliciesV2 + summary: Return a list of all policies. + description: Returns all policies. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_11 + - policies + security: + - bearer: [] + post: + operationId: PolicyApi_createPolicy + summary: Creates a new policy. + description: >- + Creates a new policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/migrate-data: + post: + operationId: PolicyApi_migrateData + summary: Migrate policy data. + description: >- + Migrate policy data. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Migration config. + content: + application/json: + schema: + $ref: '#/components/schemas/MigrationConfigDTO' + responses: + '200': + description: Errors while migration. + content: + application/json: + schema: + type: array + items: + type: object + properties: + error: + type: string + id: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/migrate-data: + post: + operationId: PolicyApi_migrateDataAsync + summary: Migrate policy data asynchronous. + description: >- + Migrate policy data asynchronous. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Migration configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/MigrationConfigDTO' + responses: + '202': + description: Created task. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push: + post: + operationId: PolicyApi_createPolicyAsync + summary: Creates a new policy. + description: >- + Creates a new policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/{policyId}: + post: + operationId: PolicyApi_updatePolicyAsync + summary: Clones policy. + description: >- + Clones policy. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + delete: + operationId: PolicyApi_deletePolicyAsync + summary: Remove policy. + description: >- + Remove policy. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}: + get: + operationId: PolicyApi_getPolicy + summary: Retrieves policy configuration. + description: >- + Retrieves policy configuration for the specified policy ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + put: + operationId: PolicyApi_updatePolicy + summary: Updates policy configuration. + description: >- + Updates policy configuration for the specified policy ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/publish: + put: + operationId: PolicyApi_publishPolicy + summary: Publishes the policy onto IPFS. + description: >- + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PoliciesValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/{policyId}/publish: + put: + operationId: PolicyApi_publishPolicyAsync + summary: Publishes the policy onto IPFS. + description: >- + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run: + put: + operationId: PolicyApi_dryRunPolicy + summary: Dry Run policy. + description: >- + Run policy without making any persistent changes or executing + transaction. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PoliciesValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/discontinue: + put: + operationId: PolicyApi_discontinuePolicy + summary: Discontinue policy. + description: >- + Discontinue policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Discontinue details. + content: + application/json: + schema: + type: object + properties: + date: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/draft: + put: + operationId: PolicyApi_draftPolicy + summary: Return policy to editing. + description: >- + Return policy to editing. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/validate: + post: + operationId: PolicyApi_validatePolicy + summary: Validates policy. + description: >- + Validates selected policy. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Validation result. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/navigation: + get: + operationId: PolicyApi_getPolicyNavigation + summary: Returns a policy navigation. + description: Returns a policy navigation. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/groups: + get: + operationId: PolicyApi_getPolicyGroups + summary: Returns a list of groups the user is a member of. + description: Returns a list of groups the user is a member of. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_setPolicyGroups + summary: Makes the selected group active. + description: >- + Makes the selected group active. if UUID is not set then returns the + user to the default state. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Group + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/documents: + get: + operationId: PolicyApi_getPolicyDocuments + summary: Get policy documents. + description: >- + Get policy documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: type + required: false + in: query + description: Document type. + example: VC + schema: + enum: + - VC + - VP + type: string + - name: includeDocument + required: false + in: query + description: Include document field. + example: true + schema: + type: boolean + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Documents. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/data: + get: + operationId: PolicyApi_downloadPolicyData + summary: Get policy data. + description: >- + Get policy data. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy data. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/data: + post: + operationId: PolicyApi_uploadPolicyData + summary: Upload policy data. + description: >- + Upload policy data. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy data file + content: + application/json: + schema: + type: string + format: binary + responses: + '200': + description: Uploaded policy. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/virtual-keys: + get: + operationId: PolicyApi_downloadVirtualKeys + summary: Get policy virtual keys. + description: >- + Get policy virtual keys. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy virtual keys. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_uploadVirtualKeys + summary: Upload policy virtual keys. + description: >- + Upload policy virtual keys. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Virtual keys file + content: + application/json: + schema: + type: string + format: binary + responses: + '200': + description: Operation completed. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag-block-map: + get: + operationId: PolicyApi_getTagBlockMap + summary: Get policy tag block map. + description: >- + Get policy tag block map. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy tag block map. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/blocks: + get: + operationId: PolicyApi_getPolicyBlocks + summary: Retrieves data for the policy root block. + description: >- + Returns data from the root policy block. Only users with the Standard + Registry and Installer role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + '503': + description: Block Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/blocks/{uuid}: + get: + operationId: PolicyApi_getBlockData + summary: Requests block data. + description: >- + Requests block data. Only users with a role that described in block are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + '503': + description: Block Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_setBlockData + summary: Sends data to the specified block. + description: Sends data to the specified block. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + requestBody: + required: true + description: Data + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + '503': + description: Block Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag/{tagName}/blocks: + post: + operationId: PolicyApi_setBlocksByTagName + summary: Sends data to the specified block. + description: Sends data to the specified block. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag + schema: + type: string + requestBody: + required: true + description: Data + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + '503': + description: Block Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableErrorDTO' + tags: *ref_11 + security: + - bearer: [] + get: + operationId: PolicyApi_getBlocksByTagName + summary: Requests block data. + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + '503': + description: Block Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceUnavailableErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag/{tagName}: + get: + operationId: PolicyApi_getBlockByTagName + summary: Requests block config. + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/blocks/{uuid}/parents: + get: + operationId: PolicyApi_getBlockParents + summary: Requests block's parents. + description: >- + Requests block's parents. Only users with a role that described in block + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/blocks/about: + get: + operationId: PolicyApi_getBlockAbout + summary: Returns block descriptions. + description: >- + Returns block descriptions. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Block descriptions. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/export/file: + get: + operationId: PolicyApi_getPolicyExportFile + summary: >- + Return policy and its artifacts in a zip file format for the specified + policy. + description: >- + Returns a zip file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/export/message: + get: + operationId: PolicyApi_getPolicyExportMessage + summary: Return Heder message ID for the specified published policy. + description: >- + Returns the Hedera message ID for the specified policy published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMessageDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/export/xlsx: + get: + operationId: PolicyApi_getPolicyExportXlsx + summary: >- + Return policy and its artifacts in a xlsx file format for the specified + policy. + description: >- + Returns a xlsx file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/message: + post: + operationId: PolicyApi_importPolicyFromMessage + summary: Imports new policy from IPFS. + description: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Created policy. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/message: + post: + operationId: PolicyApi_importPolicyFromMessageAsync + summary: Imports new policy from IPFS. + description: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/message/preview: + post: + operationId: PolicyApi_importMessage + summary: Policy preview from IPFS. + description: >- + Previews the policy from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Policy preview. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/message/preview: + post: + operationId: PolicyApi_importFromMessagePreview + summary: Policy preview from IPFS. + description: >- + Previews the policy from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/file: + post: + operationId: PolicyApi_importPolicyFromFile + summary: Imports new policy from a zip file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Created policy. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/file-metadata: + post: + operationId: PolicyApi_importPolicyFromFileWithMetadata + summary: Imports new policy from a zip file with metadata. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Form data with policy file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + policyFile: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/file: + post: + operationId: PolicyApi_importPolicyFromFileAsync + summary: Imports new policy from a zip file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/file-metadata: + post: + operationId: PolicyApi_importPolicyFromFileWithMetadataAsync + summary: Imports new policy from a zip file with metadata. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Form data with policy file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + policyFile: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/file/preview: + post: + operationId: PolicyApi_importPolicyFromFilePreview + summary: Policy preview from a zip file. + description: >- + Previews the policy from a zip file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Policy preview. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/xlsx: + post: + operationId: PolicyApi_importPolicyFromXlsx + summary: Imports new policy from a xlsx file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided xlsx file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/xlsx: + post: + operationId: PolicyApi_importPolicyFromXlsxAsync + summary: Imports new policy from a xlsx file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided xlsx file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/xlsx/preview: + post: + operationId: PolicyApi_importPolicyFromXlsxPreview + summary: Policy preview from a xlsx file. + description: >- + Previews the policy from a xlsx file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/users: + get: + operationId: PolicyApi_getDryRunUsers + summary: Returns virtual users. + description: >- + Returns virtual users. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Virtual users. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/user: + post: + operationId: PolicyApi_setDryRunUser + summary: Creates virtual users. + description: >- + Creates virtual users. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Virtual users. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/login: + post: + operationId: PolicyApi_loginDryRunUser + summary: Change active virtual user. + description: >- + Change active virtual user. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Virtual users. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/savepoint/create: + post: + operationId: PolicyApi_createSavepoint + summary: Create dry-run savepoint. + description: >- + Create dry-run savepoint. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: . + content: + application/json: + schema: + type: string + responses: + '200': + description: . + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/savepoint/delete: + post: + operationId: PolicyApi_deleteSavepoint + summary: Delete dry-run savepoint. + description: >- + Delete dry-run savepoint. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: . + content: + application/json: + schema: + type: string + responses: + '200': + description: . + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/savepoint/restore: + get: + operationId: PolicyApi_getSavepointState + summary: Get savepoint state. + description: >- + Get savepoint state. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: . + content: + application/json: + schema: + type: string + responses: + '200': + description: . + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_restoreSavepoint + summary: Restore dry-run savepoint. + description: >- + Restore dry-run savepoint. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: . + content: + application/json: + schema: + type: string + responses: + '200': + description: . + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/restart: + post: + operationId: PolicyApi_restartDryRun + summary: Clear dry-run state. + description: >- + Clear dry-run state. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: . + content: + application/json: + schema: + type: string + responses: + '200': + description: . + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/transactions: + get: + operationId: PolicyApi_getDryRunTransactions + summary: Get dry-run details (Transactions). + description: >- + Get dry-run details (Transactions). Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Transactions. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/artifacts: + get: + operationId: PolicyApi_getDryRunArtifacts + summary: Get dry-run details (Artifacts). + description: >- + Get dry-run details (Artifacts). Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Artifacts. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/ipfs: + get: + operationId: PolicyApi_getDryRunIpfs + summary: Get dry-run details (Files). + description: >- + Get dry-run details (Files). Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 20 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Files. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/multiple: + get: + operationId: PolicyApi_getMultiplePolicies + summary: Requests policy links. + description: >- + Requests policy links. Only users with a role that described in block + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_setMultiplePolicies + summary: Creates policy link. + description: >- + Creates policy link. Only users with a role that described in block are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test: + post: + operationId: PolicyApi_addPolicyTest + summary: Add policy test. + description: >- + Add policy test. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Form data with tests. + content: + multipart/form-data: + schema: + type: array + items: + type: object + properties: + tests: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}: + get: + operationId: PolicyApi_getPolicyTest + summary: Get policy test. + description: >- + Get policy test. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + delete: + operationId: PolicyApi_deletePolicyTest + summary: Delete policy test. + description: >- + Delete policy test. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}/start: + post: + operationId: PolicyApi_startPolicyTest + summary: Start policy test. + description: >- + Start policy test. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}/stop: + post: + operationId: PolicyApi_stopPolicyTest + summary: Stop policy test. + description: >- + Stop policy test. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}/details: + get: + operationId: PolicyApi_getTestDetails + summary: Get test details. + description: >- + Get test details. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningDetailsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/methodologies/categories: + get: + operationId: PolicyApi_getPolicyCategoriesAsync + summary: Get all categories + description: Get all categories + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyCategoryDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + /policies/methodologies/search: + post: + operationId: PolicyApi_getPoliciesByCategory + summary: Get filtered policies + description: Get policies by categories and text + parameters: [] + requestBody: + required: true + description: Filters + content: + application/json: + schema: + type: string + examples: + Filter1: + value: + categoryIds: + - '000000000000000000000001' + - '000000000000000000000001' + text: abc + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + /schema/{schemaId}: + get: + operationId: SingleSchemaApi_getSchema + summary: Returns schema by schema ID. + description: >- + Returns schema by schema ID. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_12 + - schema + security: + - bearer: [] + /schema/{schemaId}/parents: + get: + operationId: SingleSchemaApi_getSchemaParents + summary: Returns all parent schemas. + description: Returns all parent schemas. + parameters: + - name: schemaId + required: true + in: path + description: Schema identifier + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + /schema/{schemaId}/tree: + get: + operationId: SingleSchemaApi_getSchemaTree + summary: Returns schema tree. + description: Returns schema tree. + parameters: + - name: schemaId + required: true + in: path + description: Schema identifier + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + name: + type: string + type: + type: string + children: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + /schemas: + get: + operationId: SchemaApi_getSchemasPageV2 + summary: Return a list of all schemas. + description: Returns all schemas. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: policyId + required: false + in: query + description: Policy id + example: '000000000000000000000001' + schema: + type: string + - name: moduleId + required: false + in: query + description: Module id + example: '000000000000000000000001' + schema: + type: string + - name: toolId + required: false + in: query + description: Tool id + example: '000000000000000000000001' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_13 + - schemas + security: + - bearer: [] + put: + operationId: SchemaApi_setSchema + summary: Updates the schema. + description: >- + Updates the schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}: + get: + operationId: SchemaApi_getSchemasPageByTopicId + summary: Return a list of all schemas. + description: Returns all schemas. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + post: + operationId: SchemaApi_createNewSchema + summary: Creates a new schema. + description: >- + Creates a new schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/type/{schemaType}: + get: + operationId: SchemaApi_getSchemaByType + summary: Finds the schema using the json document type. + description: Finds the schema using the json document type. + parameters: + - name: schemaType + required: true + in: path + description: Type + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/type-by-user/{schemaType}: + get: + operationId: SchemaApi_getSchemaByTypeAndUser + summary: Finds the schema using the json document type. + description: Finds the schema using the json document type. + parameters: + - name: schemaType + required: true + in: path + description: Type + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/list/all: + get: + operationId: SchemaApi_getAll + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/list/sub: + get: + operationId: SchemaApi_getSub + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: topicId + required: false + in: query + description: Topic Id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/schema-with-sub-schemas: + get: + operationId: SchemaApi_getSchemaWithSubSchemas + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: topicId + required: false + in: query + description: Topic Id + example: 0.0.1 + schema: + type: string + - name: schemaId + required: true + in: query + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/copy: + post: + operationId: SchemaApi_copySchemaAsync + summary: Copy schema. + description: >- + Copy schema. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}: + post: + operationId: SchemaApi_createNewSchemaAsync + summary: Creates a new schema. + description: >- + Creates a new schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}: + delete: + operationId: SchemaApi_deleteSchema + summary: Deletes the schema with the provided schema ID. + description: >- + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/publish: + put: + operationId: SchemaApi_publishSchema + summary: Publishes the schema with the provided schema ID. + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/VersionSchemaDTO' + examples: + Version: + value: + version: 1.0.0 + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{schemaId}/publish: + put: + operationId: SchemaApi_publishSchemaAsync + summary: Publishes the schema with the provided schema ID. + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/VersionSchemaDTO' + examples: + Version: + value: + version: 1.0.0 + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/import/message/preview: + post: + operationId: SchemaApi_importFromMessagePreview + summary: Previews the schema from IPFS without loading it into the local DB. + description: >- + Previews the schema from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/import/message/preview: + post: + operationId: SchemaApi_importFromMessagePreviewAsync + summary: Previews the schema from IPFS without loading it into the local DB. + description: >- + Previews the schema from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/import/file/preview: + post: + operationId: SchemaApi_importFromFilePreview + summary: Previews the schema from a zip file. + description: >- + Previews the schema from a zip file. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A zip file containing schema to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}/import/message: + post: + operationId: SchemaApi_importFromMessage + summary: Imports new schema from IPFS into the local DB. + description: >- + Imports new schema from IPFS into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}/import/message: + post: + operationId: SchemaApi_importFromMessageAsync + summary: Imports new schema from IPFS into the local DB. + description: >- + Imports new schema from IPFS into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}/import/file: + post: + operationId: SchemaApi_importToTopicFromFile + summary: Imports new schema from a zip file into the local DB. + description: >- + Imports new schema from a zip file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A zip file containing schema to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}/import/file: + post: + operationId: SchemaApi_importToTopicFromFileAsync + summary: Imports new schema from a zip file into the local DB. + description: >- + Imports new schema from a zip file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A zip file containing schema to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/export/message: + get: + operationId: SchemaApi_exportMessage + summary: Returns Hedera message IDs of the published schemas. + description: >- + Returns Hedera message IDs of the published schemas, these messages + contain IPFS CIDs of these schema files. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportSchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/export/file: + get: + operationId: SchemaApi_exportToFile + summary: Returns schema files for the schema. + description: >- + Returns schema files for the schema. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/{username}: + post: + operationId: SchemaApi_postSystemSchema + summary: Creates a new system schema. + description: >- + Creates a new system schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: username + required: true + in: path + description: username + example: username + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SystemSchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + get: + operationId: SchemaApi_getSystemSchemaV2 + summary: Return a list of all system schemas. + description: >- + Returns all system schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: username + required: true + in: path + description: username + example: username + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/{schemaId}: + delete: + operationId: SchemaApi_deleteSystemSchema + summary: Deletes the system schema with the provided schema ID. + description: >- + Deletes the system schema with the provided schema ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + put: + operationId: SchemaApi_setSystemSchema + summary: Updates the system schema. + description: >- + Updates the system schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/{schemaId}/active: + put: + operationId: SchemaApi_activeSystemSchema + summary: >- + Makes the selected scheme active. Other schemes of the same type become + inactive + description: >- + Makes the selected scheme active. Other schemes of the same type become + inactive Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/entity/{schemaEntity}: + get: + operationId: SchemaApi_getSchemaEntity + summary: Finds the schema using the schema type. + description: Finds the schema using the schema type. + parameters: + - name: schemaEntity + required: true + in: path + description: Entity name + example: STANDARD_REGISTRY + schema: + type: string + enum: + - STANDARD_REGISTRY + - USER + - POLICY + - MINT_TOKEN + - WIPE_TOKEN + - MINT_NFTOKEN + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/export/xlsx: + get: + operationId: SchemaApi_getPolicyExportXlsx + summary: Return schemas in a xlsx file format for the specified policy. + description: >- + Returns a xlsx file containing schemas. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}/import/xlsx: + post: + operationId: SchemaApi_importPolicyFromXlsx + summary: Imports new schema from a xlsx file into the local DB. + description: >- + Imports new schema from a xlsx file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}/import/xlsx: + post: + operationId: SchemaApi_importPolicyFromXlsxAsync + summary: Imports new schema from a xlsx file into the local DB. + description: >- + Imports new schema from a xlsx file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/import/xlsx/preview: + post: + operationId: SchemaApi_importPolicyFromXlsxPreview + summary: Previews the schema from a xlsx file. + description: >- + Previews the schema from a xlsx file. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/export/template: + get: + operationId: SchemaApi_exportTemplate + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /settings: + post: + operationId: SettingsApi_updateSettings + summary: Set settings. + description: Set settings. For users with the Standard Registry role only. + parameters: [] + requestBody: + required: true + description: Settings. + content: + application/json: + schema: + $ref: '#/components/schemas/SettingsDTO' + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_14 + - settings + security: + - bearer: [] + get: + operationId: SettingsApi_getSettings + summary: Returns current settings. + description: >- + Returns current settings. For users with the Standard Registry role + only. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SettingsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearer: [] + /settings/environment: + get: + operationId: SettingsApi_getEnvironment + summary: Returns current environment name. + description: Returns current environment name. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearer: [] + /settings/about: + get: + operationId: SettingsApi_getAbout + summary: Returns package version. + description: Returns package version. For users with the Standard Registry role only. + parameters: [] + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearer: [] + /tags: + post: + operationId: TagsApi_setTags + summary: Creates new tag. + description: Creates new tag. + parameters: [] + requestBody: + required: true + description: Object that contains tag information. + content: + application/json: + schema: + $ref: '#/components/schemas/TagDTO' + responses: + '200': + description: Created tag. + content: + application/json: + schema: + $ref: '#/components/schemas/TagDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_15 + - tags + security: + - bearer: [] + /tags/search: + post: + operationId: TagsApi_searchTags + summary: Search tags. + description: Search tags. + parameters: [] + requestBody: + required: true + description: Object that contains filters + content: + application/json: + schema: + $ref: '#/components/schemas/TagFilterDTO' + examples: + Single: + value: + entity: PolicyDocument + target: '0000000000.000000001' + Multiple: + value: + entity: PolicyDocument + targets: + - '0000000000.000000001' + - '0000000000.000000001' + responses: + '200': + description: Created tag. + content: + application/json: + schema: + $ref: '#/components/schemas/TagMapDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/{uuid}: + delete: + operationId: TagsApi_deleteTag + summary: Delete tag. + description: Delete tag. + parameters: + - name: uuid + required: true + in: path + description: Tag identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/synchronization: + post: + operationId: TagsApi_synchronizationTags + summary: Synchronization of tags with an external network. + description: Synchronization of tags with an external network. + parameters: [] + requestBody: + required: true + description: Object that contains filters + content: + application/json: + schema: + $ref: '#/components/schemas/TagFilterDTO' + examples: + Single: + value: + entity: PolicyDocument + target: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TagMapDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas: + get: + operationId: TagsApi_getSchemasV2 + summary: Return a list of all tag schemas. + description: >- + Returns all tag schemas. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + post: + operationId: TagsApi_postSchemas + summary: Creates a new tag schema. + description: >- + Creates a new tag schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '201': + description: Created schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas/{schemaId}: + delete: + operationId: TagsApi_deleteSchema + summary: Deletes the schema. + description: >- + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + put: + operationId: TagsApi_updateSchema + summary: Updates schema configuration. + description: >- + Updates schema configuration for the specified schema ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas/{schemaId}/publish: + put: + operationId: TagsApi_publishTag + summary: Publishes the schema. + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas/published: + get: + operationId: TagsApi_getPublished + summary: Return a list of all published schemas. + description: >- + Return a list of all published schemas. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tasks/{taskId}: + get: + operationId: TaskApi_getTask + summary: Returns task statuses by Id. + description: Returns task statuses by Id. + parameters: + - name: taskId + required: true + in: path + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - tasks + security: + - bearer: [] + /tokens: + get: + operationId: TokensApi_getTokensV2 + summary: Return a list of tokens. + description: >- + Returns all tokens. For the Standard Registry role it returns only the + list of tokens, for other users it also returns token balances as well + as the KYC, Freeze, and Association statuses. Not allowed for the + Auditor role. + parameters: + - name: policyId + required: false + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: status + required: false + in: query + description: Token status + example: All + schema: + enum: + - Associated + - All + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_16 + - tokens + security: + - bearer: [] + post: + operationId: TokensApi_newToken + summary: Creates a new token. + description: >- + Creates a new token. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + put: + operationId: TokensApi_updateToken + summary: Update token. + description: >- + Update token. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Updated token. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}: + get: + operationId: TokensApi_getTokenByIdWithPolicies + summary: Return a token by id. + description: Return the token. + parameters: + - name: tokenId + required: true + in: path + schema: + type: string + - name: policyId + required: true + in: query + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push: + post: + operationId: TokensApi_pushTokenAsync + summary: Creates a new token. + description: >- + Creates a new token. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + put: + operationId: TokensApi_updateTokenAsync + summary: Update token. + description: >- + Update token. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}: + delete: + operationId: TokensApi_deleteTokenAsync + summary: Deletes the token with the provided schema ID. + description: >- + Deletes the token with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/associate: + put: + operationId: TokensApi_associateToken + summary: Associates the user with the provided Hedera token. + description: >- + Associates the user with the provided Hedera token. Only users with the + Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/associate: + put: + operationId: TokensApi_associateTokenAsync + summary: Associates the user with the provided Hedera token. + description: >- + Associates the user with the provided Hedera token. Only users with the + Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/dissociate: + put: + operationId: TokensApi_dissociateToken + summary: Associate the user with the provided Hedera token. + description: >- + Disassociates the user with the provided Hedera token. Only users with + the Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/dissociate: + put: + operationId: TokensApi_dissociateTokenAsync + summary: Associate the user with the provided Hedera token. + description: >- + Disassociates the user with the provided Hedera token. Only users with + the Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/grant-kyc: + put: + operationId: TokensApi_grantKyc + summary: Sets the KYC flag for the user. + description: >- + Sets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/grant-kyc: + put: + operationId: TokensApi_grantKycAsync + summary: Sets the KYC flag for the user. + description: >- + Sets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/revoke-kyc: + put: + operationId: TokensApi_revokeKyc + summary: Unsets the KYC flag for the user. + description: >- + Unsets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/revoke-kyc: + put: + operationId: TokensApi_revokeKycAsync + summary: Unsets the KYC flag for the user. + description: >- + Unsets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/freeze: + put: + operationId: TokensApi_freezeToken + summary: Freeze transfers of the specified token for the user. + description: >- + Freezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/unfreeze: + put: + operationId: TokensApi_unfreezeToken + summary: Unfreezes transfers of the specified token for the user. + description: >- + Unfreezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/freeze: + put: + operationId: TokensApi_freezeTokenAsync + summary: Freeze transfers of the specified token for the user. + description: >- + Freezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/unfreeze: + put: + operationId: TokensApi_unfreezeTokenAsync + summary: Unfreezes transfers of the specified token for the user. + description: >- + Unfreezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/info: + get: + operationId: TokensApi_getTokenInfo + summary: Returns user information for the selected token. + description: >- + Returns user information for the selected token. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/serials: + get: + operationId: TokensApi_getTokenSerials + summary: Return token serials. + description: Returns token serials of current user. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Token serials. + content: + application/json: + schema: + type: array + items: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/menu/all: + get: + operationId: TokensApi_getMenu + summary: Return a list of tokens. + description: >- + Returns tokens menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Modules. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /themes: + post: + operationId: ThemesApi_setThemes + summary: Creates a new theme. + description: >- + Creates a new theme. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a theme. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_17 + - themes + security: + - bearer: [] + get: + operationId: ThemesApi_getThemes + summary: Returns a list of all themes. + description: >- + Returns a list of all themes. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /themes/{themeId}: + put: + operationId: ThemesApi_updateTheme + summary: Updates theme configuration. + description: >- + Updates theme configuration for the specified theme ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: themeId + required: true + in: path + description: Theme Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains a theme. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + delete: + operationId: ThemesApi_deleteTheme + summary: Deletes the theme. + description: >- + Deletes the theme with the provided theme ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: themeId + required: true + in: path + description: Theme Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /themes/import/file: + post: + operationId: ThemesApi_importTheme + summary: Imports new theme from a zip file. + description: >- + Imports new theme from the provided zip file into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A zip file containing theme to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /themes/{themeId}/export/file: + get: + operationId: ThemesApi_exportTheme + summary: Returns a zip file containing the theme. + description: >- + Returns a zip file containing the theme. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: themeId + required: true + in: path + description: Theme Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /trust-chains: + get: + operationId: TrustChainsApi_getTrustChains + summary: Returns a list of all VP documents. + description: >- + Returns a list of all VP documents. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: policyId + required: false + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: policyOwner + required: false + in: query + description: Policy Owner + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VpDocumentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_18 + - trust-chains + security: + - bearer: [] + /trust-chains/{hash}: + get: + operationId: TrustChainsApi_getTrustChainByHash + summary: Builds and returns a trustchain, from the VP to the root VC document. + description: >- + Builds and returns a trustchain, from the VP to the root VC document. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: hash + required: true + in: path + description: Hash + example: hash + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + chain: + type: array + items: + type: object + properties: + id: + type: string + type: + type: string + tag: + type: string + label: + type: string + schema: + type: string + owner: + type: string + document: + type: object + required: + - id + - type + - tag + - label + - schema + - owner + - document + userMap: + type: array + items: + type: object + properties: + did: + type: string + username: + type: string + required: + - did + - username + required: + - chain + - userMap + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_18 + security: + - bearer: [] + /wizard/policy: + post: + operationId: WizardApi_setPolicy + summary: Creates a new policy. + description: >- + Creates a new policy by wizard. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains wizard configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfigDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardResultDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_19 + - wizard + security: + - bearer: [] + /wizard/push/policy: + post: + operationId: WizardApi_setPolicyAsync + summary: Creates a new policy. + description: >- + Creates a new policy by wizard. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains wizard configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfigAsyncDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_19 + security: + - bearer: [] + /wizard/{policyId}/config: + post: + operationId: WizardApi_setPolicyConfig + summary: Get policy config. + description: >- + Get policy config by wizard. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains wizard configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfigDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_19 + security: + - bearer: [] + /branding: + post: + operationId: BrandingApi_setBranding + summary: Update branding. + description: >- + Update branding. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains config. + content: + application/json: + schema: + $ref: '#/components/schemas/BrandingDTO' + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_20 + - branding + security: + - bearer: [] + get: + operationId: BrandingApi_getBranding + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BrandingDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_20 + /suggestions: + post: + operationId: SuggestionsApi_policySuggestions + summary: Get next and nested suggested block types + description: >- + Get next and nested suggested block types. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Data. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsInputDTO' + responses: + '200': + description: >- + Successful operation. Suggested next and nested block types + respectively. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsOutputDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_21 + - suggestions + security: + - bearer: [] + /suggestions/config: + post: + operationId: SuggestionsApi_setPolicySuggestionsConfig + summary: Set suggestions config + description: >- + Set suggestions config. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + responses: + '201': + description: Successful operation. Response setted suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_21 + security: + - bearer: [] + get: + operationId: SuggestionsApi_getPolicySuggestionsConfig + summary: Get suggestions config + description: >- + Get suggestions config. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. Response suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_21 + security: + - bearer: [] + /notifications: + get: + operationId: NotificationsApi_getAllNotifications + summary: Get all notifications + description: Returns all notifications. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. Returns notifications and count. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_22 + - notifications + security: + - bearer: [] + /notifications/new: + get: + operationId: NotificationsApi_getNewNotifications + summary: Get new notifications + description: Returns new notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns new notifications. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/progresses: + get: + operationId: NotificationsApi_getProgresses + summary: Get progresses + description: Returns progresses. + parameters: [] + responses: + '200': + description: Successful operation. Returns progresses. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProgressDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/read/all: + post: + operationId: NotificationsApi_readAll + summary: Read all notifications + description: Returns new notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns notifications. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/delete/{notificationId}: + delete: + operationId: NotificationsApi_delete + summary: Delete notifications up to this point + description: Returns deleted notifications count. + parameters: + - name: notificationId + required: true + in: path + description: Notification Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. Returns deleted notifications count. + content: + application/json: + schema: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /projects/search: + post: + operationId: ProjectsAPI_projectSearch + summary: Search projects + description: Search projects by filters + parameters: [] + requestBody: + required: true + description: The question of choosing a methodology + content: + application/json: + schema: + type: string + examples: + q: + value: >- + What methodology can I use for production of electricity using + renewable energy technologies? + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_23 + - projects + /projects/compare/documents: + post: + operationId: ProjectsAPI_compareDocumentsV2 + summary: Compare documents. + description: Compare documents. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000001' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDocumentsV2DTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_23 + /projects/properties: + get: + operationId: ProjectsAPI_getPolicyProperties + summary: Get all properties + description: Get all properties + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PropertiesDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_23 + /record/{policyId}/status: + get: + operationId: RecordApi_getRecordStatus + summary: Get recording or running status. + description: >- + Get recording or running status. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RecordStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_24 + - record + security: + - bearer: [] + /record/{policyId}/recording/start: + post: + operationId: RecordApi_startRecord + summary: Start recording. + description: >- + Start recording. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/recording/stop: + post: + operationId: RecordApi_stopRecord + summary: Stop recording. + description: >- + Stop recording. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/recording/actions: + get: + operationId: RecordApi_getRecordActions + summary: Get recorded actions. + description: >- + Get recorded actions. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RecordActionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/start: + post: + operationId: RecordApi_runRecord + summary: Run record from a zip file. + description: >- + Run record from a zip file. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A zip file containing record to be run. + content: + application/json: + schema: + type: string + responses: + '200': + description: Record UUID. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/stop: + post: + operationId: RecordApi_stopRunning + summary: Stop running. + description: >- + Stop running. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/results: + get: + operationId: RecordApi_getRecordResults + summary: Get running results. + description: >- + Get running results. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningResultDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/details: + get: + operationId: RecordApi_getRecordDetails + summary: Get running details. + description: >- + Get running details. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningDetailsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/fast-forward: + post: + operationId: RecordApi_fastForward + summary: Fast Forward. + description: >- + Fast Forward. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/retry: + post: + operationId: RecordApi_retryStep + summary: Retry step. + description: >- + Retry step. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/skip: + post: + operationId: RecordApi_skipStep + summary: Skip step. + description: >- + Skip step. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /ai-suggestions/ask: + get: + operationId: AISuggestionsAPI_getAIAnswer + summary: Get methodology suggestion + description: Returns AI response to the current question + parameters: + - name: q + required: true + in: query + description: The question of choosing a methodology + example: Find me large scale projects + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + example: ACM0001, ACM0002, ACM0006, ACM0007, ACM0018 + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_25 + - ai-suggestions + /ai-suggestions/rebuild-vector: + put: + operationId: AISuggestionsAPI_rebuildVector + summary: Rebuild AI vector + description: Rebuilds vector based on policy data in the DB + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_25 + /permissions: + get: + operationId: PermissionsApi_getPermissions + summary: Return a list of all permissions. + description: Returns all permissions. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PermissionsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_26 + - permissions + security: + - bearer: [] + /permissions/roles: + get: + operationId: PermissionsApi_getRoles + summary: Return a list of all roles. + description: Returns all roles. + parameters: + - name: name + required: false + in: query + description: Filter by role name + example: name + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + post: + operationId: PermissionsApi_createRole + summary: Creates new role. + description: Creates new role. + parameters: [] + requestBody: + required: true + description: Object that contains role information. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + responses: + '200': + description: Created role. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/roles/{id}: + put: + operationId: PermissionsApi_updateRole + summary: Updates role configuration. + description: Updates role configuration for the specified role ID. + parameters: + - name: id + required: true + in: path + description: Role Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Role configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + responses: + '200': + description: Role configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + delete: + operationId: PermissionsApi_deleteModule + summary: Deletes the role. + description: Deletes the role with the provided role ID. + parameters: + - name: id + required: true + in: path + description: Role Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/roles/default: + post: + operationId: PermissionsApi_setDefaultRole + summary: Set default role. + description: Set the role as default for new users. + parameters: [] + requestBody: + required: true + description: Object that contains role information. + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: Role Identifier + example: '000000000000000000000001' + required: + - id + examples: + Default: + value: + id: '000000000000000000000001' + responses: + '200': + description: Created role. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users: + get: + operationId: PermissionsApi_getUsers + summary: Return a list of all users. + description: Returns all users. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: role + required: false + in: query + description: Filter by role + example: '000000000000000000000001' + schema: + type: string + - name: status + required: false + in: query + description: Filter by status + example: Active + schema: + enum: + - Active + - Inactive + type: string + - name: username + required: false + in: query + description: Filter by username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}: + get: + operationId: PermissionsApi_getUser + summary: Updates user permissions. + description: Updates user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + put: + operationId: PermissionsApi_updateUser + summary: Updates user permissions. + description: Updates user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: User permissions. + content: + application/json: + schema: + type: array + items: + type: string + examples: + Roles: + value: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies: + get: + operationId: PermissionsApi_getAssignedPolicies + summary: Return a list of all roles. + description: Returns all roles. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: status + required: false + in: query + description: Filter by status + example: Active + schema: + enum: + - DRY-RUN + - DRAFT + - PUBLISH_ERROR + - PUBLISH + - DISCONTINUED + - DEMO + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies/assign: + post: + operationId: PermissionsApi_assignPolicy + summary: Assign policy. + description: Assign policy. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/AssignPolicyDTO' + responses: + '200': + description: Assigned policy. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/delegate: + put: + operationId: PermissionsApi_delegateRole + summary: Delegate user permissions. + description: Delegate user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: User permissions. + content: + application/json: + schema: + type: array + items: + type: string + examples: + Roles: + value: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies/delegate: + post: + operationId: PermissionsApi_delegatePolicy + summary: Delegate policy. + description: Delegate policy. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/AssignPolicyDTO' + responses: + '200': + description: Assigned policy. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /policy-statistics: + post: + operationId: PolicyStatisticsApi_createStatisticDefinition + summary: Creates a new statistic definition. + description: Creates a new statistic definition. + parameters: [] + requestBody: + required: true + description: Configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticDefinitionDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticDefinitionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_27 + - policy-statistics + security: + - bearer: [] + get: + operationId: PolicyStatisticsApi_getStatisticDefinitions + summary: Return a list of all statistic definitions. + description: Returns all statistic definitions. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: policyInstanceTopicId + required: false + in: query + description: Policy Instance Topic Id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StatisticDefinitionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /policy-statistics/{definitionId}: + get: + operationId: PolicyStatisticsApi_getStatisticDefinitionById + summary: Retrieves statistic definition. + description: Retrieves statistic definition for the specified ID. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticDefinitionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + put: + operationId: PolicyStatisticsApi_updateStatisticDefinition + summary: Updates statistic definition. + description: >- + Updates statistic definition configuration for the specified statistic + ID. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains a configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticDefinitionDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticDefinitionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + delete: + operationId: PolicyStatisticsApi_deleteStatisticDefinition + summary: Deletes the statistic definition. + description: Deletes the statistic definition with the provided ID. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /policy-statistics/{definitionId}/publish: + put: + operationId: PolicyStatisticsApi_publishStatisticDefinition + summary: Publishes statistic definition. + description: Publishes statistic definition for the specified statistic ID. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticDefinitionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /policy-statistics/{definitionId}/relationships: + get: + operationId: PolicyStatisticsApi_getStatisticRelationships + summary: Retrieves statistic relationships. + description: Retrieves statistic relationships for the specified ID. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticDefinitionRelationshipsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /policy-statistics/{definitionId}/documents: + get: + operationId: PolicyStatisticsApi_getStatisticDocuments + summary: Return a list of all documents. + description: Returns all documents. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VcDocumentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /policy-statistics/{definitionId}/assessment: + post: + operationId: PolicyStatisticsApi_createStatisticAssessment + summary: Creates a new statistic assessment. + description: Creates a new statistic assessment. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticAssessmentDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticAssessmentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + get: + operationId: PolicyStatisticsApi_getStatisticAssessments + summary: Return a list of all statistic assessment. + description: Returns all statistic assessment. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StatisticAssessmentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /policy-statistics/{definitionId}/assessment/{assessmentId}: + get: + operationId: PolicyStatisticsApi_getStatisticAssessment + summary: Retrieves statistic assessment. + description: Retrieves statistic assessment for the specified ID. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + - name: assessmentId + required: true + in: path + description: Statistic Assessment Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticAssessmentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /policy-statistics/{definitionId}/assessment/{assessmentId}/relationships: + get: + operationId: PolicyStatisticsApi_getStatisticAssessmentRelationships + summary: Retrieves assessment relationships. + description: Retrieves assessment relationships for the specified ID. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + - name: assessmentId + required: true + in: path + description: Statistic Assessment Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticAssessmentRelationshipsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /policy-statistics/{policyId}/import/file: + post: + operationId: PolicyStatisticsApi_importStatisticDefinition + summary: Imports new statistic definition from a zip file. + description: >- + Imports new statistic definition from the provided zip file into the + local DB. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A zip file containing statistic definition to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticDefinitionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /policy-statistics/{definitionId}/export/file: + get: + operationId: PolicyStatisticsApi_exportStatisticDefinition + summary: Returns a zip file containing statistic definition. + description: Returns a zip file containing statistic definition. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /policy-statistics/import/file/preview: + post: + operationId: PolicyStatisticsApi_previewStatisticDefinition + summary: Imports a zip file containing statistic definition. + description: Imports a zip file containing statistic definition. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Statistic definition preview. + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticDefinitionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /schema-rules: + post: + operationId: SchemaRulesApi_createSchemaRule + summary: Creates a new schema rule. + description: Creates a new schema rule. + parameters: [] + requestBody: + required: true + description: Configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_28 + - schema-rules + security: + - bearer: [] + get: + operationId: SchemaRulesApi_getSchemaRules + summary: Return a list of all schema rules. + description: Returns all schema rules. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: policyInstanceTopicId + required: false + in: query + description: Policy Instance Topic Id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaRuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + /schema-rules/{ruleId}: + get: + operationId: SchemaRulesApi_getSchemaRuleById + summary: Retrieves schema rule. + description: Retrieves schema rule for the specified ID. + parameters: + - name: ruleId + required: true + in: path + description: Schema rule Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + put: + operationId: SchemaRulesApi_updateSchemaRule + summary: Updates schema rule. + description: Updates schema rule configuration for the specified rule ID. + parameters: + - name: ruleId + required: true + in: path + description: Schema Rule Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains a configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + delete: + operationId: SchemaRulesApi_deleteSchemaRule + summary: Deletes the schema rule. + description: Deletes the schema rule with the provided ID. + parameters: + - name: ruleId + required: true + in: path + description: Schema Rule Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + /schema-rules/{ruleId}/activate: + put: + operationId: SchemaRulesApi_activateSchemaRule + summary: Activates schema rule. + description: Activates schema rule for the specified rule ID. + parameters: + - name: ruleId + required: true + in: path + description: Schema Rule Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + /schema-rules/{ruleId}/inactivate: + put: + operationId: SchemaRulesApi_inactivateSchemaRule + summary: Inactivates schema rule. + description: Inactivates schema rule for the specified rule ID. + parameters: + - name: ruleId + required: true + in: path + description: Schema Rule Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + /schema-rules/{ruleId}/relationships: + get: + operationId: SchemaRulesApi_getSchemaRuleRelationships + summary: Retrieves schema rule relationships. + description: Retrieves schema rule relationships for the specified ID. + parameters: + - name: ruleId + required: true + in: path + description: Schema Rule Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleRelationshipsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + /schema-rules/data: + post: + operationId: SchemaRulesApi_getSchemaRuleData + summary: '' + description: '' + parameters: [] + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleOptionsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaRuleDataDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + /schema-rules/{policyId}/import/file: + post: + operationId: SchemaRulesApi_importSchemaRule + summary: Imports new rules from a zip file. + description: Imports new rules from the provided zip file into the local DB. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A zip file containing rules to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + /schema-rules/{ruleId}/export/file: + get: + operationId: SchemaRulesApi_exportSchemaRule + summary: Returns a zip file containing rules. + description: Returns a zip file containing rules. + parameters: + - name: ruleId + required: true + in: path + description: Schema Rule Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + /schema-rules/import/file/preview: + post: + operationId: SchemaRulesApi_previewSchemaRule + summary: Imports a zip file containing rules. + description: Imports a zip file containing rules. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Schema rule preview. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaRuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_28 + security: + - bearer: [] + /formulas: + post: + operationId: FormulasApi_createFormula + summary: Creates a new formula. + description: Creates a new formula. + parameters: [] + requestBody: + required: true + description: Configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_29 + - formulas + security: + - bearer: [] + get: + operationId: FormulasApi_getFormulas + summary: Return a list of all formulas. + description: Returns all formulas. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: policyId + required: false + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/{formulaId}: + get: + operationId: FormulasApi_getFormulaById + summary: Retrieves formula. + description: Retrieves formula for the specified ID. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + put: + operationId: FormulasApi_updateFormula + summary: Updates formula. + description: Updates formula configuration for the specified formula ID. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains a configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + delete: + operationId: FormulasApi_deleteFormula + summary: Deletes the formula. + description: Deletes the formula with the provided ID. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/{formulaId}/relationships: + get: + operationId: FormulasApi_getSchemaRuleRelationships + summary: Retrieves Formula relationships. + description: Retrieves Formula relationships for the specified ID. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaRelationshipsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/{policyId}/import/file: + post: + operationId: FormulasApi_importFormula + summary: Imports new formula from a zip file. + description: Imports new formula from the provided zip file into the local DB. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A zip file containing formula to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/{formulaId}/export/file: + get: + operationId: FormulasApi_exportFormula + summary: Returns a zip file containing formula. + description: Returns a zip file containing formula. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/import/file/preview: + post: + operationId: FormulasApi_previewFormula + summary: Imports a zip file containing formula. + description: Imports a zip file containing formula. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Formula preview. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/{formulaId}/publish: + put: + operationId: FormulasApi_publishPolicyLabel + summary: Publishes formula. + description: Publishes formula for the specified formula ID. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/data: + post: + operationId: FormulasApi_getSchemaRuleData + summary: '' + description: '' + parameters: [] + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulasOptionsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulasDataDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /policy-labels: + post: + operationId: PolicyLabelsApi_createPolicyLabel + summary: Creates a new policy label. + description: Creates a new policy label. + parameters: [] + requestBody: + required: true + description: Configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_30 + - policy-labels + security: + - bearer: [] + get: + operationId: PolicyLabelsApi_getPolicyLabels + summary: Return a list of all policy labels. + description: Returns all policy labels. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: policyInstanceTopicId + required: false + in: query + description: Policy Instance Topic Id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyLabelDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/{definitionId}: + get: + operationId: PolicyLabelsApi_getPolicyLabelById + summary: Retrieves policy label. + description: Retrieves policy label for the specified ID. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + put: + operationId: PolicyLabelsApi_updatePolicyLabel + summary: Updates policy label. + description: Updates policy label configuration for the specified label ID. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains a configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + delete: + operationId: PolicyLabelsApi_deletePolicyLabel + summary: Deletes the policy label. + description: Deletes the policy label with the provided ID. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/{definitionId}/publish: + put: + operationId: PolicyLabelsApi_publishPolicyLabel + summary: Publishes policy label. + description: Publishes policy label for the specified label ID. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/push/{definitionId}/publish: + put: + operationId: PolicyLabelsApi_publishPolicyLabelAsync + summary: Publishes policy label. + description: Publishes policy label for the specified label ID. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/{definitionId}/relationships: + get: + operationId: PolicyLabelsApi_getPolicyLabelRelationships + summary: Retrieves policy label relationships. + description: Retrieves policy label relationships for the specified ID. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelRelationshipsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/{policyId}/import/file: + post: + operationId: PolicyLabelsApi_importPolicyLabel + summary: Imports new labels from a zip file. + description: Imports new labels from the provided zip file into the local DB. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A zip file containing labels to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/{definitionId}/export/file: + get: + operationId: PolicyLabelsApi_exportPolicyLabel + summary: Returns a zip file containing labels. + description: Returns a zip file containing labels. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/import/file/preview: + post: + operationId: PolicyLabelsApi_previewPolicyLabel + summary: Imports a zip file containing labels. + description: Imports a zip file containing labels. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: policy label preview. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/components: + post: + operationId: PolicyLabelsApi_searchComponents + summary: Search labels ans statistics. + description: Return a list of other labels ans statistics. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelFiltersDTO' + responses: + '200': + description: A list of labels ans statistics. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/{definitionId}/tokens: + get: + operationId: PolicyLabelsApi_getPolicyLabelTokens + summary: Return a list of all documents. + description: Returns all documents. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VcDocumentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/{definitionId}/tokens/{documentId}: + get: + operationId: PolicyLabelsApi_getPolicyLabelDocument + summary: Return a list of all documents. + description: Returns all documents. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + - name: documentId + required: true + in: path + description: Document Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VcDocumentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/{definitionId}/documents: + post: + operationId: PolicyLabelsApi_createStatisticDocument + summary: Creates a new label document. + description: Creates a new label document. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDocumentDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDocumentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + get: + operationId: PolicyLabelsApi_getLabelDocuments + summary: Return a list of all label documents. + description: Returns all label documents. + parameters: + - name: definitionId + required: true + in: path + description: policy label Identifier + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyLabelDocumentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/{definitionId}/documents/{documentId}: + get: + operationId: PolicyLabelsApi_getLabelDocument + summary: Retrieves label document. + description: Retrieves label document for the specified ID. + parameters: + - name: definitionId + required: true + in: path + description: Label Definition Identifier + example: '000000000000000000000001' + schema: + type: string + - name: documentId + required: true + in: path + description: Label Document Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDocumentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /policy-labels/{definitionId}/documents/{documentId}/relationships: + get: + operationId: PolicyLabelsApi_getStatisticAssessmentRelationships + summary: Retrieves documents relationships. + description: Retrieves documents relationships for the specified ID. + parameters: + - name: definitionId + required: true + in: path + description: Statistic Definition Identifier + example: '000000000000000000000001' + schema: + type: string + - name: documentId + required: true + in: path + description: Label Document Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyLabelDocumentRelationshipsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_30 + security: + - bearer: [] + /worker-tasks: + get: + operationId: WorkerTasksController_getAllWorkerTasks + summary: Get all worker tasks + description: Returns all worker tasks. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. Returns notifications and count. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WorkersTasksDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_31 + - worker-tasks + security: + - bearer: [] + /worker-tasks/restart: + post: + operationId: WorkerTasksController_restartTask + summary: Restart task + description: Restart task + parameters: [] + responses: + '200': + description: Successful operation. Returns notifications. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_31 + security: + - bearer: [] + /worker-tasks/delete/{taskId}: + delete: + operationId: WorkerTasksController_deleteTask + summary: Delete task + description: Delete task + parameters: + - name: taskId + required: true + in: path + description: Task Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Returns notifications. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_31 + security: + - bearer: [] +info: + title: Guardian + description: >- + The Guardian is a modular open-source solution that includes best-in-class + identity management and decentralized ledger technology (DLT) libraries. At + the heart of the Guardian solution is a sophisticated Policy Workflow Engine + (PWE) that enables applications to offer a requirements-based tokenization + implementation. + version: 3.0.0 + contact: + name: API developer + url: https://envisionblockchain.com + email: info@envisionblockchain.com + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html +tags: [] +servers: + - url: /api/v1 + description: version 1.0 +components: + securitySchemes: + bearer: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + AccountsSessionResponseDTO: + type: object + properties: + username: + type: string + role: + type: string + accessToken: + type: string + required: + - username + - role + - accessToken + InternalServerErrorDTO: + type: object + properties: + code: + type: number + example: 500 + message: + type: string + example: Error message + required: + - code + - message + AccountsResponseDTO: + type: object + properties: + username: + type: string + role: + type: string + did: + type: string + required: + - username + - role + - did + RegisterUserDTO: + type: object + properties: + username: + type: string + password: + type: string + password_confirmation: + type: string + role: + type: string + required: + - username + - password + - password_confirmation + - role + LoginUserDTO: + type: object + properties: + username: + type: string + password: + type: string + required: + - username + - password + ChangePasswordDTO: + type: object + properties: + username: + type: string + oldPassword: + type: string + newPassword: + type: string + required: + - username + - oldPassword + - newPassword + VcDTO: + type: object + properties: + id: + type: string + example: 00000000-0000-0000-0000-000000000000 + nullable: true + '@context': + type: array + items: + type: string + type: + type: array + items: + type: string + credentialSubject: + type: array + items: + type: object + issuer: + type: object + issuanceDate: + type: string + proof: + type: object + nullable: true + required: + - id + - '@context' + - type + - credentialSubject + - issuer + - issuanceDate + - proof + VpDTO: + type: object + properties: + '@context': + type: array + items: + type: string + id: + type: string + example: 00000000-0000-0000-0000-000000000000 + type: + type: array + items: + type: string + verifiableCredential: + type: array + items: + type: object + proof: + type: object + required: + - '@context' + - id + - type + - verifiableCredential + - proof + VcDocumentDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + policyId: + type: string + example: '000000000000000000000001' + hash: + type: string + example: hash + signature: + type: number + example: 0 + status: + type: string + enum: + - NEW + - ISSUE + - REVOKE + - SUSPEND + - RESUME + - FAILED + example: NEW + tag: + type: string + example: Block tag + type: + type: string + example: Document type + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + updateDate: + type: string + example: '1900-01-01T00:00:00.000Z' + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + document: + $ref: '#/components/schemas/VpDTO' + required: + - id + - policyId + - hash + - signature + - status + - tag + - type + - createDate + - updateDate + - owner + - document + PolicyTestDTO: + type: object + properties: + id: + type: string + description: Test ID + example: '000000000000000000000001' + uuid: + type: string + description: Test UUID + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + description: Test Name + example: Test Name + policyId: + type: string + description: Policy ID + example: '000000000000000000000001' + owner: + type: string + description: Test owner + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + status: + type: string + description: Test status + enum: + - New + - Running + - Stopped + - Success + - Failure + example: New + date: + type: string + description: Last start date + example: '1900-01-01T00:00:00.000Z' + duration: + type: string + description: Test duration + example: 0 + progress: + type: string + description: Test progress + example: 0 + resultId: + type: string + description: Test result + example: 00000000-0000-0000-0000-000000000000 + result: + type: string + description: Test result + required: + - id + - uuid + - name + - policyId + - owner + - status + - date + - duration + - progress + - resultId + - result + PolicyDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Policy name + description: + type: string + example: Description + topicDescription: + type: string + example: Description + policyTag: + type: string + example: Tag + status: + type: string + enum: + - DRY-RUN + - DRAFT + - PUBLISH_ERROR + - PUBLISH + - DISCONTINUED + - DEMO + example: DRAFT + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + codeVersion: + type: string + example: 1.0.0 + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + version: + type: string + example: 1.0.0 + config: + type: object + userRole: + type: string + example: Installer + userRoles: + example: + - Installer + type: array + items: + type: string + userGroup: + type: object + example: + uuid: 00000000-0000-0000-0000-000000000000 + role: Installer + groupLabel: Label + groupName: Name + active: true + userGroups: + example: + - uuid: 00000000-0000-0000-0000-000000000000 + role: Installer + groupLabel: Label + groupName: Name + active: true + type: array + items: + type: object + policyRoles: + example: + - Registrant + type: array + items: + type: string + policyNavigation: + example: + - role: Registrant + steps: + - block: Block tag + level: 1 + name: Step name + type: array + items: + type: object + policyTopics: + example: + - name: Project + description: Project + memoObj: topic + static: false + type: any + type: array + items: + type: object + policyTokens: + example: + - tokenName: Token name + tokenSymbol: Token symbol + tokenType: non-fungible + decimals: '' + changeSupply: true + enableAdmin: true + enableFreeze: true + enableKYC: true + enableWipe: true + templateTokenTag: token_template_0 + type: array + items: + type: object + policyGroups: + example: + - name: Group name + creator: Registrant + groupAccessType: Private + groupRelationshipType: Multiple + members: + - Registrant + type: array + items: + type: object + categories: + type: array + items: + type: string + projectSchema: + type: string + example: 00000000-0000-0000-0000-000000000000 + tests: + type: array + items: + $ref: '#/components/schemas/PolicyTestDTO' + required: + - id + - uuid + - name + - description + - topicDescription + - policyTag + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + - version + - config + - userRole + - userRoles + - userGroup + - userGroups + - policyRoles + - policyNavigation + - policyTopics + - policyTokens + - policyGroups + - categories + - projectSchema + - tests + AggregatedDTOItem: + type: object + properties: + did: + type: string + hederaAccountId: + type: string + vcDocument: + $ref: '#/components/schemas/VcDocumentDTO' + policies: + $ref: '#/components/schemas/PolicyDTO' + required: + - did + - hederaAccountId + - vcDocument + - policies + UserDTO: + type: object + properties: + username: + type: string + example: username + role: + type: string + enum: &ref_40 + - STANDARD_REGISTRY + - USER + - AUDITOR + example: USER + permissionsGroup: + example: &ref_41 + - {} + type: array + items: + type: string + permissions: + example: &ref_42 + - POLICIES_POLICY_READ + type: array + items: + type: string + did: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + parent: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + hederaAccountId: + type: string + example: 0.0.1 + required: + - username + - role + - permissions + BalanceResponseDTO: + type: object + properties: + balance: + type: number + unit: + type: string + user: + $ref: '#/components/schemas/UserDTO' + required: + - balance + - unit + - user + FilterSearchPoliciesDTO: + type: object + properties: + policyId: + type: string + example: '000000000000000000000001' + type: + type: string + enum: + - Owned + - Local + - Global + example: Local + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + minVcCount: + type: number + example: 0 + minVpCount: + type: number + example: 0 + minTokensCount: + type: number + example: 0 + text: + type: string + example: Policy name + threshold: + type: number + minimum: 0 + maximum: 100 + example: 0 + SearchPolicyDTO: + type: object + properties: + type: + type: string + enum: + - Local + - Global + example: Local + id: + type: string + example: '000000000000000000000001' + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Policy name + description: + type: string + example: Policy description + version: + type: string + example: 1.0.0 + status: + type: string + enum: + - DRY-RUN + - DRAFT + - PUBLISH_ERROR + - PUBLISH + - DISCONTINUED + - DEMO + example: DRAFT + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + tags: + example: Tag + type: array + items: + type: object + vcCount: + type: number + example: 0 + vpCount: + type: number + example: 0 + tokensCount: + type: number + example: 0 + rate: + type: number + example: 0 + SearchPoliciesDTO: + type: object + properties: + target: + type: object + result: + type: array + items: + $ref: '#/components/schemas/SearchPolicyDTO' + required: + - result + CompareFileDTO: + type: object + properties: + id: + type: string + description: File ID + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + description: File Name + example: File Name + value: + type: string + description: Buffer + example: base64... + required: + - id + - name + - value + FilterPolicyDTO: + type: object + properties: + type: + type: string + description: Identifier type + enum: + - id + - message + - file + example: id + value: + oneOf: + - type: string + description: Policy ID + - type: string + description: Policy Message ID + - $ref: '#/components/schemas/CompareFileDTO' + description: Policy File + example: '000000000000000000000001' + required: + - type + - value + FilterPoliciesDTO: + type: object + properties: + idLvl: + oneOf: &ref_32 + - type: string + - type: number + enum: &ref_33 + - 0 + - 1 + example: 0 + eventsLvl: + oneOf: &ref_34 + - type: string + - type: number + enum: &ref_35 + - 0 + - 1 + example: 0 + propLvl: + oneOf: &ref_36 + - type: string + - type: number + enum: &ref_37 + - 0 + - 1 + - 2 + example: 0 + childrenLvl: + oneOf: &ref_38 + - type: string + - type: number + enum: &ref_39 + - 0 + - 1 + - 2 + example: 0 + policyId1: + type: string + example: '000000000000000000000001' + policyId2: + type: string + example: '000000000000000000000001' + policyIds: + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string + policies: + example: + - type: id + value: '000000000000000000000001' + - type: message + value: '0000000000.000000001' + - type: file + value: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... + type: array + items: + $ref: '#/components/schemas/FilterPolicyDTO' + ComparePoliciesDTO: + type: object + properties: + blocks: + type: object + groups: + type: object + left: + type: object + right: + type: object + roles: + type: object + tokens: + type: object + topics: + type: object + total: + type: object + required: + - blocks + - groups + - left + - right + - roles + - tokens + - topics + - total + FilterModulesDTO: + type: object + properties: + idLvl: + oneOf: *ref_32 + enum: *ref_33 + example: 0 + eventsLvl: + oneOf: *ref_34 + enum: *ref_35 + example: 0 + propLvl: + oneOf: *ref_36 + enum: *ref_37 + example: 0 + childrenLvl: + oneOf: *ref_38 + enum: *ref_39 + example: 0 + moduleId1: + type: string + example: '000000000000000000000001' + moduleId2: + type: string + example: '000000000000000000000001' + required: + - moduleId1 + - moduleId2 + CompareModulesDTO: + type: object + properties: + blocks: + type: object + left: + type: object + right: + type: object + inputEvents: + type: object + outputEvents: + type: object + variables: + type: object + total: + type: object + required: + - blocks + - left + - right + - inputEvents + - outputEvents + - variables + - total + FilterSchemaDTO: + type: object + properties: + type: + type: string + description: Identifier type + enum: + - id + - policy-message + - policy-file + example: id + value: + type: string + description: Schema ID + example: '000000000000000000000001' + policy: + oneOf: + - description: Policy Message ID + type: string + - $ref: '#/components/schemas/CompareFileDTO' + description: Policy File + example: '000000000000000000000001' + required: + - type + - value + FilterSchemasDTO: + type: object + properties: + schemaId1: + type: string + example: '000000000000000000000001' + schemaId2: + type: string + example: '000000000000000000000001' + schemas: + example: + - type: id + value: '000000000000000000000001' + - type: policy-message + value: 00000000-0000-0000-0000-000000000000 + policy: '0000000000.000000001' + - type: policy-file + value: 00000000-0000-0000-0000-000000000000 + policy: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... + type: array + items: + $ref: '#/components/schemas/FilterSchemaDTO' + idLvl: + oneOf: + - type: string + - type: number + enum: + - 0 + - 1 + example: 0 + CompareSchemasDTO: + type: object + properties: + fields: + type: object + left: + type: object + right: + type: object + total: + type: object + required: + - fields + - left + - right + - total + FilterDocumentsDTO: + type: object + properties: + idLvl: + oneOf: *ref_32 + enum: *ref_33 + example: 0 + eventsLvl: + oneOf: *ref_34 + enum: *ref_35 + example: 0 + propLvl: + oneOf: *ref_36 + enum: *ref_37 + example: 0 + childrenLvl: + oneOf: *ref_38 + enum: *ref_39 + example: 0 + documentId1: + type: string + example: '000000000000000000000001' + documentId2: + type: string + example: '000000000000000000000001' + documentIds: + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string + CompareDocumentsDTO: + type: object + properties: + documents: + type: object + left: + type: object + right: + type: object + total: + type: object + required: + - documents + - left + - right + - total + FilterToolsDTO: + type: object + properties: + idLvl: + oneOf: *ref_32 + enum: *ref_33 + example: 0 + eventsLvl: + oneOf: *ref_34 + enum: *ref_35 + example: 0 + propLvl: + oneOf: *ref_36 + enum: *ref_37 + example: 0 + childrenLvl: + oneOf: *ref_38 + enum: *ref_39 + example: 0 + toolId1: + type: string + example: '000000000000000000000001' + toolId2: + type: string + example: '000000000000000000000001' + toolIds: + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string + CompareToolsDTO: + type: object + properties: + blocks: + type: object + left: + type: object + right: + type: object + inputEvents: + type: object + outputEvents: + type: object + variables: + type: object + total: + type: object + required: + - blocks + - left + - right + - inputEvents + - outputEvents + - variables + - total + FilterSearchBlocksDTO: + type: object + properties: + id: + type: string + example: 00000000-0000-0000-0000-000000000000 + config: + type: object + required: + - id + - config + SearchBlocksDTO: + type: object + properties: + name: + type: string + description: + type: string + version: + type: string + owner: + type: string + topicId: + type: string + messageId: + type: string + hash: + type: string + chains: + type: object + required: + - name + - description + - version + - owner + - topicId + - messageId + - hash + - chains + ArtifactDTOItem: + type: object + properties: + id: + type: string + name: + type: string + uuid: + type: string + extention: + type: string + type: + type: string + required: + - id + - name + - uuid + - extention + - type + ContractDTO: + type: object + properties: + id: + type: string + contractId: + type: string + description: + type: string + owner: + type: string + permissions: + type: number + topicId: + type: string + type: + type: string + enum: + - WIPE + - RETIRE + syncRequestsDate: + format: date-time + type: string + syncPoolsDate: + format: date-time + type: string + lastSyncEventTimeStamp: + type: string + wipeContractIds: + type: array + items: + type: string + wipeTokenIds: + type: array + items: + type: string + required: + - id + - contractId + - description + - owner + - permissions + - topicId + - type + - syncRequestsDate + - syncPoolsDate + - lastSyncEventTimeStamp + - wipeContractIds + - wipeTokenIds + ContractConfigDTO: + type: object + properties: + type: + type: string + description: + type: string + required: + - type + - description + WiperRequestDTO: + type: object + properties: + id: + type: string + contractId: + type: string + user: + type: string + token: + type: string + required: + - id + - contractId + - user + - token + RetireRequestDTO: + type: object + properties: + id: + type: string + contractId: + type: string + tokens: + type: object + properties: + token: + type: string + count: + type: number + serials: + type: array + items: + type: number + decimals: + type: number + type: + enum: + - non-fungible + - fungible + tokenSymbol: + type: string + tokenIds: + type: array + items: + type: string + user: + type: string + required: + - id + - contractId + - tokens + - tokenIds + - user + Date: + type: object + properties: {} + RetirePoolDTO: + type: object + properties: + id: + type: string + contractId: + type: string + tokens: + type: object + properties: + token: + type: string + contract: + type: string + count: + type: number + decimals: + type: number + type: + enum: + - non-fungible + - fungible + tokenSymbol: + type: string + tokenIds: + type: array + items: + type: string + immediately: + type: boolean + enabled: + type: boolean + required: + - id + - contractId + - tokens + - tokenIds + - immediately + - enabled + RetirePoolTokenDTO: + type: object + properties: + token: + type: string + count: + type: number + required: + - token + - count + RetireRequestTokenDTO: + type: object + properties: + token: + type: string + count: + type: number + serials: + type: array + items: + type: string + required: + - token + - count + - serials + RegisteredUsersDTO: + type: object + properties: + username: + type: string + did: + type: string + parent: + type: string + role: + type: string + policyRoles: + type: array + items: + type: string + required: + - username + - did + - parent + - role + - policyRoles + TaskDTO: + type: object + properties: + taskId: + type: string + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + expectation: + type: number + description: Expected count of task phases + example: 0 + required: + - taskId + - expectation + ExternalDocumentDTO: + type: object + properties: + owner: + type: string + policyTag: + type: string + document: + nullable: false + allOf: + - $ref: '#/components/schemas/VcDTO' + required: + - owner + - policyTag + - document + LogFilterDTO: + type: object + properties: + type: + type: string + nullable: true + startDate: + type: string + nullable: true + endDate: + type: string + nullable: true + attributes: + nullable: true + type: array + items: + type: string + message: + type: string + nullable: true + pageSize: + type: number + nullable: true + pageIndex: + type: number + nullable: true + sortDirection: + type: string + nullable: true + required: + - type + - startDate + - endDate + - attributes + - message + - pageSize + - pageIndex + - sortDirection + LogResultDTO: + type: object + properties: + totalCount: + type: number + logs: + type: array + items: + type: object + required: + - totalCount + - logs + ModuleDTO: + type: object + properties: + id: + type: string + nullable: false + uuid: + type: string + nullable: false + type: + type: string + nullable: false + name: + type: string + nullable: false + description: + type: string + nullable: false + status: + type: string + nullable: false + creator: + type: string + nullable: false + owner: + type: string + nullable: false + topicId: + type: string + nullable: false + messageId: + type: string + nullable: false + codeVersion: + type: string + nullable: false + createDate: + type: string + nullable: false + config: + type: object + nullable: true + required: + - id + - uuid + - type + - name + - description + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + - config + SchemaDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Schema name + description: + type: string + example: Description + entity: + type: string + enum: + - NONE + - VC + - EVC + - STANDARD_REGISTRY + - USER + - POLICY + - MINT_TOKEN + - RETIRE + - WIPE_TOKEN + - MINT_NFTOKEN + - ISSUER + - USER_ROLE + - CHUNK + - ACTIVITY_IMPACT + - TOKEN_DATA_SOURCE + - ROLE + - USER_PERMISSIONS + example: POLICY + iri: + type: string + example: 00000000-0000-0000-0000-000000000000 + status: + type: string + enum: + - DRAFT + - PUBLISHED + - UNPUBLISHED + - ERROR + - DEMO + example: DRAFT + topicId: + type: string + example: 0.0.1 + version: + type: string + example: 1.0.0 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + messageId: + type: string + example: '0000000000.000000001' + category: + type: string + enum: + - POLICY + - MODULE + - SYSTEM + - TAG + - TOOL + - STATISTIC + - LABEL + example: POLICY + documentURL: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + contextURL: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + document: + type: object + context: + type: object + required: + - id + - uuid + - name + - description + - entity + - iri + - status + - topicId + - version + - owner + - messageId + - category + - documentURL + - contextURL + - document + - context + ExportMessageDTO: + type: object + properties: + uuid: + type: string + name: + type: string + description: + type: string + messageId: + type: string + owner: + type: string + required: + - uuid + - name + - description + - messageId + - owner + ImportMessageDTO: + type: object + properties: + messageId: + type: string + metadata: + type: object + nullable: true + required: + - messageId + - metadata + ModulePreviewDTO: + type: object + properties: + module: + nullable: false + allOf: + - $ref: '#/components/schemas/ModuleDTO' + messageId: + type: string + schemas: + nullable: true + type: array + items: + type: object + tags: + nullable: true + type: array + items: + type: object + moduleTopicId: + type: string + nullable: true + required: + - module + - messageId + - schemas + - tags + - moduleTopicId + BlockErrorsDTO: + type: object + properties: + id: + type: string + name: + type: string + errors: + type: array + items: + type: string + isValid: + type: boolean + required: + - id + - name + - errors + - isValid + ValidationErrorsDTO: + type: object + properties: + blocks: + nullable: true + type: array + items: + $ref: '#/components/schemas/BlockErrorsDTO' + errors: + nullable: true + type: array + items: + type: string + required: + - blocks + - errors + ModuleValidationDTO: + type: object + properties: + module: + nullable: false + allOf: + - $ref: '#/components/schemas/ModuleDTO' + results: + nullable: false + allOf: + - $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - module + - results + BlockDTO: + type: object + properties: + id: + type: string + blockType: + type: string + blocks: + type: array + items: + $ref: '#/components/schemas/BlockDTO' + required: + - id + - blockType + - blocks + ToolDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tool name + description: + type: string + example: Description + status: + type: string + enum: + - DRAFT + - PUBLISHED + - PUBLISH_ERROR + example: NEW + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + codeVersion: + type: string + example: 1.0.0 + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + config: + $ref: '#/components/schemas/BlockDTO' + required: + - id + - uuid + - name + - description + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + - config + ToolValidationDTO: + type: object + properties: + tool: + $ref: '#/components/schemas/ToolDTO' + results: + $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - tool + - results + ToolPreviewDTO: + type: object + properties: + tool: + $ref: '#/components/schemas/ToolDTO' + schemas: + type: array + items: + type: object + tags: + type: array + items: + type: object + tools: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + required: + - tool + - schemas + - tags + - tools + ProfileDTO: + type: object + properties: + username: + type: string + example: username + role: + type: string + enum: *ref_40 + example: USER + permissionsGroup: + example: *ref_41 + type: array + items: + type: string + permissions: + example: *ref_42 + type: array + items: + type: string + did: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + parent: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + hederaAccountId: + type: string + example: 0.0.1 + confirmed: + type: boolean + example: true + failed: + type: boolean + example: true + topicId: + type: string + example: 0.0.1 + parentTopicId: + type: string + example: 0.0.1 + didDocument: + type: object + nullable: true + vcDocument: + type: object + nullable: true + required: + - username + - role + - permissions + SubjectDTO: + type: object + properties: + '@context': + nullable: true + type: array + items: + type: string + id: + type: string + nullable: true + type: + type: string + nullable: true + required: + - '@context' + DidDocumentDTO: + type: object + properties: + id: + type: string + nullable: false + context: + nullable: true + type: array + items: + type: string + alsoKnownAs: + nullable: true + type: array + items: + type: string + controller: + nullable: true + type: array + items: + type: string + verificationMethod: + nullable: true + type: array + items: + type: object + authentication: + nullable: true + type: array + items: + type: object + assertionMethod: + nullable: true + type: array + items: + type: object + keyAgreement: + nullable: true + type: array + items: + type: object + capabilityInvocation: + nullable: true + type: array + items: + type: object + capabilityDelegation: + nullable: true + type: array + items: + type: object + service: + nullable: true + type: array + items: + type: object + required: + - id + - context + - alsoKnownAs + - controller + - verificationMethod + - authentication + - assertionMethod + - keyAgreement + - capabilityInvocation + - capabilityDelegation + - service + DidKeyDTO: + type: object + properties: + id: + type: string + nullable: false + key: + type: string + nullable: false + required: + - id + - key + CredentialsDTO: + type: object + properties: + entity: + type: string + nullable: false + hederaAccountId: + type: string + nullable: false + hederaAccountKey: + type: string + nullable: false + parent: + type: string + nullable: true + vcDocument: + nullable: true + allOf: + - $ref: '#/components/schemas/SubjectDTO' + didDocument: + nullable: true + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + didKeys: + nullable: true + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' + required: + - entity + - hederaAccountId + - hederaAccountKey + DidDocumentStatusDTO: + type: object + properties: + valid: + type: boolean + nullable: false + error: + type: string + nullable: true + didDocument: + type: object + nullable: false + required: + - valid + - error + - didDocument + DidKeyStatusDTO: + type: object + properties: + id: + type: string + nullable: false + key: + type: string + nullable: false + valid: + type: boolean + nullable: false + required: + - id + - key + - valid + DidDocumentWithKeyDTO: + type: object + properties: + document: + nullable: false + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + keys: + nullable: false + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' + required: + - document + - keys + MigrationConfigPoliciesDTO: + type: object + properties: + src: + type: string + dst: + type: string + required: + - src + - dst + MigrationConfigDTO: + type: object + properties: + policies: + $ref: '#/components/schemas/MigrationConfigPoliciesDTO' + vcs: + type: array + items: + type: string + vps: + type: array + items: + type: string + schemas: + type: object + groups: + type: object + roles: + type: object + blocks: + type: object + tokens: + type: object + migrateState: + type: boolean + migrateRetirePools: + type: boolean + editedVCs: + type: object + retireContractId: + type: string + required: + - policies + - vcs + - vps + - schemas + - groups + - roles + - blocks + - tokens + - migrateState + - migrateRetirePools + - editedVCs + - retireContractId + PoliciesValidationDTO: + type: object + properties: + policies: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + isValid: + type: string + errors: + $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - policies + - isValid + - errors + PolicyValidationDTO: + type: object + properties: + policy: + $ref: '#/components/schemas/PolicyDTO' + results: + $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - policy + - results + Object: + type: object + properties: {} + ServiceUnavailableErrorDTO: + type: object + properties: + code: + type: number + example: 503 + message: + type: string + example: Error message + required: + - code + - message + PolicyPreviewDTO: + type: object + properties: + module: + $ref: '#/components/schemas/PolicyDTO' + messageId: + type: string + example: '0000000000.000000001' + schemas: + type: array + items: + type: object + tags: + type: array + items: + type: object + moduleTopicId: + type: string + example: 0.0.1 + required: + - module + - messageId + - schemas + - tags + - moduleTopicId + RunningDetailsDTO: + type: object + properties: + left: + type: object + right: + type: object + total: + type: number + documents: + type: object + required: + - left + - right + - total + - documents + PolicyCategoryDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + name: + type: string + example: Large-Scale + type: + type: string + example: PROJECT_SCALE + required: + - id + - name + - type + VersionSchemaDTO: + type: object + properties: + version: + type: string + example: 1.0.0 + required: + - version + MessageSchemaDTO: + type: object + properties: + messageId: + type: string + example: '0000000000.000000001' + required: + - messageId + ExportSchemaDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + name: + type: string + example: Schema name + description: + type: string + example: Description + version: + type: string + example: 1.0.0 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + messageId: + type: string + example: '0000000000.000000001' + required: + - id + - name + - description + - version + - owner + - messageId + SystemSchemaDTO: + type: object + properties: + name: + type: string + example: Schema name + entity: + type: string + enum: + - STANDARD_REGISTRY + - USER + example: STANDARD_REGISTRY + required: + - name + - entity + SettingsDTO: + type: object + properties: + ipfsStorageApiKey: + type: string + operatorId: + type: string + operatorKey: + type: string + required: + - ipfsStorageApiKey + - operatorId + - operatorKey + TagDTO: + type: object + properties: + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tag label + description: + type: string + example: Description + owner: + type: string + example: DID + date: + type: string + example: '1900-01-01T00:00:00.000Z' + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + status: + type: string + enum: + - Draft + - Published + - History + example: Published + operation: + type: string + enum: + - Create + - Delete + example: Create + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + policyId: + type: string + example: '000000000000000000000001' + uri: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + target: + type: string + example: '0000000000.000000001' + localTarget: + type: string + example: '000000000000000000000001' + document: + type: object + required: + - uuid + - name + - description + - owner + - date + - entity + - status + - operation + - topicId + - messageId + - policyId + - uri + - target + - localTarget + - document + TagFilterDTO: + type: object + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: '0000000000.000000001' + targets: + example: '0000000000.000000001' + type: array + items: + type: string + required: + - entity + - target + - targets + TagMapDTO: + type: object + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: '0000000000.000000001' + refreshDate: + type: string + example: '1900-01-01T00:00:00.000Z' + tags: + type: array + items: + $ref: '#/components/schemas/TagDTO' + required: + - entity + - target + - refreshDate + - tags + StatusDTO: + type: object + properties: + message: + type: string + description: Text + type: + type: string + description: Type + enum: + - Processing + - Completed + - Info + example: Info + required: + - message + - type + TaskStatusDTO: + type: object + properties: + action: + type: string + description: Task type + example: Create policy + userId: + type: string + description: User Id + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + expectation: + type: number + description: Expected count of task phases + example: 0 + taskId: + type: string + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + date: + type: string + description: Date + example: '1900-01-01T00:00:00.000Z' + statuses: + type: array + items: + $ref: '#/components/schemas/StatusDTO' + result: + type: object + error: + type: object + required: + - action + - userId + - expectation + - taskId + - date + - statuses + - result + - error + TokenDTO: + type: object + properties: + tokenId: + type: string + example: 0.0.1 + tokenName: + type: string + example: Token name + tokenSymbol: + type: string + example: Token symbol + tokenType: + type: string + enum: + - fungible + - non-fungible + example: non-fungible + initialSupply: + type: string + example: '0' + decimals: + type: string + example: '0' + changeSupply: + type: boolean + description: Add Supply key + example: true + enableAdmin: + type: boolean + description: Add Admin key + example: true + enableFreeze: + type: boolean + description: Add Freeze key + example: true + enableKYC: + type: boolean + description: Add KYC key + example: true + enableWipe: + type: boolean + description: Add Wipe key + example: true + required: + - tokenId + - tokenName + - tokenSymbol + - tokenType + - initialSupply + - decimals + - changeSupply + - enableAdmin + - enableFreeze + - enableKYC + - enableWipe + TokenInfoDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + tokenId: + type: string + example: 0.0.1 + tokenName: + type: string + example: Token name + tokenSymbol: + type: string + example: Token symbol + tokenType: + type: string + enum: + - fungible + - non-fungible + example: non-fungible + decimals: + type: string + example: '0' + associated: + type: boolean + description: '' + example: true + frozen: + type: boolean + description: '' + example: true + kyc: + type: boolean + description: '' + example: true + balance: + type: string + description: User balance + example: '0' + enableAdmin: + type: boolean + description: There is an Admin key + example: true + enableFreeze: + type: boolean + description: There is an Freeze key + example: true + enableKYC: + type: boolean + description: There is an KYC key + example: true + enableWipe: + type: boolean + description: There is an Wipe key + example: true + required: + - id + - tokenId + - tokenName + - tokenSymbol + - tokenType + - decimals + - associated + - frozen + - kyc + - balance + - enableAdmin + - enableFreeze + - enableKYC + - enableWipe + ThemeRoleDTO: + type: object + properties: + description: + type: string + example: Description + text: + type: string + description: Text color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + background: + type: string + description: Background color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + border: + type: string + description: Border color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + shape: + type: string + description: Object shape + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - '5' + example: '0' + borderWidth: + type: string + description: Border width + enum: + - 0px + - 1px + - 2px + - 3px + - 4px + - 5px + - 6px + - 7px + example: 2px + filterType: + type: string + description: Filter by type + enum: + - type + - api + - role + example: type + filterValue: + oneOf: + - type: string + - type: array + items: + type: string + required: + - description + - text + - background + - border + - shape + - borderWidth + - filterType + - filterValue + ThemeDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Theme name + rules: + type: array + items: + $ref: '#/components/schemas/ThemeRoleDTO' + required: + - id + - uuid + - name + - rules + VpDocumentDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + policyId: + type: string + example: '000000000000000000000001' + hash: + type: string + example: hash + signature: + type: number + example: 0 + status: + type: string + enum: + - NEW + - ISSUE + - REVOKE + - SUSPEND + - RESUME + - FAILED + example: NEW + tag: + type: string + example: Block tag + type: + type: string + example: Document type + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + updateDate: + type: string + example: '1900-01-01T00:00:00.000Z' + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + document: + $ref: '#/components/schemas/VpDTO' + required: + - id + - policyId + - hash + - signature + - status + - tag + - type + - createDate + - updateDate + - owner + - document + WizardConfigDTO: + type: object + properties: + roles: + type: array + items: + type: string + policy: + type: string + properties: + name: + type: string + description: + type: string + topicDescription: + type: string + policyTag: + type: string + schemas: + properties: + name: + type: string + iri: + type: string + isApproveEnable: + type: boolean + isMintSchema: + type: boolean + mintOptions: + type: object + properties: + tokenId: + type: string + rule: + type: string + dependencySchemaIri: + type: string + relationshipsSchemaIri: + type: string + initialRolesFor: + type: array + items: + type: string + rolesConfig: + type: array + items: + type: object + properties: + role: + type: string + isApprover: + type: boolean + isCreator: + type: boolean + gridColumns: + type: array + items: + type: object + properties: + field: + type: string + title: + type: string + type: array + items: + type: string + trustChain: + properties: + role: + type: string + mintSchemaIri: + type: string + viewOnlyOwnDocuments: + type: boolean + type: array + items: + type: string + required: + - roles + - policy + - schemas + - trustChain + WizardResultDTO: + type: object + properties: + policyId: + type: string + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' + required: + - policyId + - wizardConfig + WizardConfigAsyncDTO: + type: object + properties: + saveState: + type: boolean + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' + required: + - saveState + - wizardConfig + WizardPreviewDTO: + type: object + properties: + policyConfig: + $ref: '#/components/schemas/PolicyDTO' + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' + required: + - policyConfig + - wizardConfig + BrandingDTO: + type: object + properties: + headerColor: + type: string + primaryColor: + type: string + companyName: + type: string + companyLogoUrl: + type: string + loginBannerUrl: + type: string + faviconUrl: + type: string + headerColor1: + type: string + termsAndConditions: + type: string + required: + - headerColor + - primaryColor + - companyName + - companyLogoUrl + - loginBannerUrl + - faviconUrl + - headerColor1 + - termsAndConditions + SuggestionsInputDTO: + type: object + properties: + blockType: + type: string + children: + nullable: true + type: array + items: + type: object + required: + - blockType + - children + SuggestionsOutputDTO: + type: object + properties: + next: + type: string + nested: + type: string + required: + - next + - nested + SuggestionsConfigItemDTO: + type: object + properties: + id: + type: string + type: + type: string + enum: + - Policy + - Module + index: + type: number + required: + - id + - type + - index + SuggestionsConfigDTO: + type: object + properties: + items: + $ref: '#/components/schemas/SuggestionsConfigItemDTO' + required: + - items + NotificationDTO: + type: object + properties: + title: + type: string + message: + type: string + type: + type: string + enum: + - INFO + - ERROR + - WARN + - SUCCESS + action: + type: string + enum: + - POLICY_CONFIGURATION + - POLICY_VIEW + - POLICIES_PAGE + - SCHEMAS_PAGE + - TOKENS_PAGE + - PROFILE_PAGE + - POLICY_LABEL_PAGE + result: + type: object + read: + type: boolean + old: + type: boolean + required: + - title + - message + - type + - action + - result + - read + - old + ProgressDTO: + type: object + properties: + action: + type: string + message: + type: string + progress: + type: number + type: + type: string + enum: + - INFO + - ERROR + - WARN + - SUCCESS + taskId: + type: string + required: + - action + - message + - progress + - type + - taskId + ProjectDTO: + type: object + properties: + id: + type: string + policyId: + type: string + policyName: + type: string + registered: + type: string + title: + type: string + companyName: + type: string + sectoralScope: + type: string + required: + - id + - policyId + - policyName + - registered + - title + - companyName + - sectoralScope + CompareDocumentsV2DTO: + type: object + properties: + projects: + $ref: '#/components/schemas/CompareDocumentsDTO' + presentations: + $ref: '#/components/schemas/CompareDocumentsDTO' + required: + - projects + - presentations + PropertiesDTO: + type: object + properties: + id: + type: string + title: + type: string + value: + type: string + required: + - id + - title + - value + RecordStatusDTO: + type: object + properties: + type: + type: string + policyId: + type: string + uuid: + type: string + status: + type: string + required: + - type + - policyId + - uuid + - status + RecordActionDTO: + type: object + properties: + uuid: + type: string + policyId: + type: string + method: + type: string + action: + type: string + time: + type: string + user: + type: string + target: + type: string + required: + - uuid + - policyId + - method + - action + - time + - user + - target + ResultInfoDTO: + type: object + properties: + tokens: + type: number + documents: + type: number + required: + - tokens + - documents + ResultDocumentDTO: + type: object + properties: + type: + type: string + schema: + type: string + rate: + type: string + documents: + type: object + required: + - type + - schema + - rate + - documents + RunningResultDTO: + type: object + properties: + info: + $ref: '#/components/schemas/ResultInfoDTO' + total: + type: number + documents: + $ref: '#/components/schemas/ResultDocumentDTO' + required: + - info + - total + - documents + RoleDTO: + type: object + properties: + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Name + description: + type: string + example: Description + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + permissions: + type: string + enum: &ref_43 + - ANALYTIC_POLICY_READ + - ANALYTIC_MODULE_READ + - ANALYTIC_TOOL_READ + - ANALYTIC_SCHEMA_READ + - ANALYTIC_DOCUMENT_READ + - ARTIFACTS_FILE_READ + - ARTIFACTS_FILE_CREATE + - ARTIFACTS_FILE_DELETE + - CONTRACTS_CONTRACT_READ + - CONTRACTS_CONTRACT_EXECUTE + - MODULES_MODULE_READ + - MODULES_MODULE_CREATE + - MODULES_MODULE_UPDATE + - MODULES_MODULE_DELETE + - MODULES_MODULE_REVIEW + - POLICIES_POLICY_READ + - POLICIES_POLICY_CREATE + - POLICIES_POLICY_UPDATE + - POLICIES_POLICY_DELETE + - POLICIES_POLICY_REVIEW + - POLICIES_POLICY_EXECUTE + - POLICIES_POLICY_MANAGE + - SCHEMAS_SCHEMA_READ + - SCHEMAS_SCHEMA_CREATE + - SCHEMAS_SCHEMA_UPDATE + - SCHEMAS_SCHEMA_DELETE + - SCHEMAS_SCHEMA_REVIEW + - TOOLS_TOOL_READ + - TOOLS_TOOL_CREATE + - TOOLS_TOOL_UPDATE + - TOOLS_TOOL_DELETE + - TOOLS_TOOL_REVIEW + - TOKENS_TOKEN_READ + - TOKENS_TOKEN_CREATE + - TOKENS_TOKEN_UPDATE + - TOKENS_TOKEN_DELETE + - TOKENS_TOKEN_EXECUTE + - TOKENS_TOKEN_MANAGE + - TAGS_TAG_READ + - TAGS_TAG_CREATE + - SUGGESTIONS_SUGGESTIONS_READ + - SUGGESTIONS_SUGGESTIONS_UPDATE + - PERMISSIONS_ROLE_READ + - PERMISSIONS_ROLE_CREATE + - PERMISSIONS_ROLE_UPDATE + - PERMISSIONS_ROLE_DELETE + - PERMISSIONS_ROLE_MANAGE + - STATISTICS_STATISTIC_READ + - STATISTICS_STATISTIC_CREATE + - STATISTICS_LABEL_READ + - STATISTICS_LABEL_CREATE + - SCHEMAS_RULE_READ + - SCHEMAS_RULE_CREATE + - SCHEMAS_RULE_EXECUTE + - FORMULAS_FORMULA_READ + - FORMULAS_FORMULA_CREATE + - ACCESS_POLICY_ALL + - ACCESS_POLICY_ASSIGNED + - ACCESS_POLICY_PUBLISHED + - ACCESS_POLICY_ASSIGNED_AND_PUBLISHED + - DELEGATION_ROLE_MANAGE + example: + - POLICIES_POLICY_READ + required: + - uuid + - name + - description + - owner + - permissions + PermissionsDTO: + type: object + properties: + name: + type: string + enum: *ref_43 + example: ANALYTIC_POLICY_READ + category: + type: string + enum: + - ACCOUNTS + - SESSION + - PROFILES + - ANALYTIC + - ARTIFACTS + - POLICIES + - BRANDING + - CONTRACTS + - DEMO + - IPFS + - LOG + - MODULES + - SETTINGS + - SUGGESTIONS + - TAGS + - SCHEMAS + - TOKENS + - AUDIT + - TOOLS + - PERMISSIONS + - ACCESS + - DELEGATION + - STATISTICS + - FORMULAS + example: ANALYTIC + entity: + type: string + enum: + - ACCOUNT + - STANDARD_REGISTRY + - USER + - BALANCE + - RESTORE + - RECORD + - POLICY + - TOOL + - DOCUMENT + - SCHEMA + - MODULE + - FILE + - CONFIG + - CONTRACT + - WIPE_REQUEST + - WIPE_ADMIN + - WIPE_MANAGER + - WIPER + - POOL + - RETIRE_REQUEST + - RETIRE_ADMIN + - PERMISSIONS + - KEY + - LOG + - MIGRATION + - SETTINGS + - SUGGESTIONS + - TAG + - SYSTEM_SCHEMA + - THEME + - TOKEN + - TRUST_CHAIN + - ROLE + - STATISTIC + - RULE + - LABEL + - FORMULA + example: POLICY + action: + type: string + enum: + - ALL + - READ + - CREATE + - UPDATE + - DELETE + - REVIEW + - AUDIT + - EXECUTE + - MANAGE + - ASSIGNED + - PUBLISHED + - ASSIGNED_AND_PUBLISHED + example: READ + disabled: + type: boolean + example: false + dependOn: + example: + - POLICIES_POLICY_READ + type: array + items: + type: string + required: + - name + - category + - entity + - action + - disabled + - dependOn + AssignPolicyDTO: + type: object + properties: + policyIds: + example: + - '000000000000000000000001' + type: array + items: + type: string + assign: + type: boolean + example: true + required: + - policyIds + - assign + StatisticDefinitionDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tool name + description: + type: string + example: Description + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + policyId: + type: string + example: '000000000000000000000001' + policyTopicId: + type: string + example: 0.0.1 + policyInstanceTopicId: + type: string + example: 0.0.1 + status: + type: string + enum: + - DRAFT + - PUBLISHED + - ERROR + - ACTIVE + example: DRAFT + config: + type: object + nullable: true + required: + - name + StatisticDefinitionRelationshipsDTO: + type: object + properties: + policy: + $ref: '#/components/schemas/PolicyDTO' + schemas: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + schema: + $ref: '#/components/schemas/SchemaDTO' + StatisticAssessmentDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + definitionId: + type: string + example: '000000000000000000000001' + policyId: + type: string + example: '000000000000000000000001' + policyTopicId: + type: string + example: 0.0.1 + policyInstanceTopicId: + type: string + example: 0.0.1 + topicId: + type: string + example: 0.0.1 + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + messageId: + type: string + example: '0000000000.000000001' + target: + type: string + example: '0000000000.000000001' + relationships: + example: + - '0000000000.000000001' + type: array + items: + type: string + document: + type: object + nullable: true + StatisticAssessmentRelationshipsDTO: + type: object + properties: + target: + $ref: '#/components/schemas/VcDocumentDTO' + relationships: + type: array + items: + $ref: '#/components/schemas/VcDocumentDTO' + SchemaRuleDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tool name + description: + type: string + example: Description + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + policyId: + type: string + example: '000000000000000000000001' + policyTopicId: + type: string + example: 0.0.1 + policyInstanceTopicId: + type: string + example: 0.0.1 + status: + type: string + enum: + - DRAFT + - PUBLISHED + - ERROR + - ACTIVE + example: DRAFT + config: + type: object + nullable: true + required: + - name + SchemaRuleRelationshipsDTO: + type: object + properties: + policy: + $ref: '#/components/schemas/PolicyDTO' + schemas: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + SchemaRuleOptionsDTO: + type: object + properties: + policyId: + type: string + example: '000000000000000000000001' + schemaId: + type: string + example: '000000000000000000000001' + documentId: + type: string + example: '000000000000000000000001' + parentId: + type: string + example: '000000000000000000000001' + SchemaRuleDataDTO: + type: object + properties: + rules: + $ref: '#/components/schemas/SchemaRuleDTO' + document: + $ref: '#/components/schemas/VcDocumentDTO' + relationships: + type: array + items: + $ref: '#/components/schemas/VcDocumentDTO' + FormulaDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tool name + description: + type: string + example: Description + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + messageId: + type: string + example: '0000000000.000000001' + policyId: + type: string + example: '000000000000000000000001' + policyTopicId: + type: string + example: 0.0.1 + policyInstanceTopicId: + type: string + example: 0.0.1 + status: + type: string + enum: + - DRAFT + - PUBLISHED + - ERROR + - ACTIVE + example: DRAFT + config: + type: object + nullable: true + required: + - name + FormulaRelationshipsDTO: + type: object + properties: + policy: + $ref: '#/components/schemas/PolicyDTO' + schemas: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + formulas: + type: array + items: + $ref: '#/components/schemas/FormulaDTO' + FormulasDataDTO: + type: object + properties: + formulas: + type: array + items: + $ref: '#/components/schemas/FormulaDTO' + document: + $ref: '#/components/schemas/VcDocumentDTO' + relationships: + type: array + items: + $ref: '#/components/schemas/VcDocumentDTO' + schemas: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + FormulasOptionsDTO: + type: object + properties: + policyId: + type: string + example: '000000000000000000000001' + schemaId: + type: string + example: '000000000000000000000001' + documentId: + type: string + example: '000000000000000000000001' + parentId: + type: string + example: '000000000000000000000001' + PolicyLabelDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tool name + description: + type: string + example: Description + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + policyId: + type: string + example: '000000000000000000000001' + policyTopicId: + type: string + example: 0.0.1 + policyInstanceTopicId: + type: string + example: 0.0.1 + status: + type: string + enum: + - DRAFT + - PUBLISHED + - ERROR + - ACTIVE + example: DRAFT + config: + type: object + nullable: true + required: + - name + PolicyLabelRelationshipsDTO: + type: object + properties: + policy: + $ref: '#/components/schemas/PolicyDTO' + policySchemas: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + documentsSchemas: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + PolicyLabelFiltersDTO: + type: object + properties: + text: + type: string + example: Name + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + components: + type: string + description: Component type + enum: + - all + - label + - statistic + example: all + PolicyLabelComponentsDTO: + type: object + properties: + statistics: + type: array + items: + $ref: '#/components/schemas/StatisticDefinitionDTO' + labels: + type: array + items: + $ref: '#/components/schemas/PolicyLabelDTO' + PolicyLabelDocumentDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + definitionId: + type: string + example: '000000000000000000000001' + policyId: + type: string + example: '000000000000000000000001' + policyTopicId: + type: string + example: 0.0.1 + policyInstanceTopicId: + type: string + example: 0.0.1 + topicId: + type: string + example: 0.0.1 + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + messageId: + type: string + example: '0000000000.000000001' + target: + type: string + example: '0000000000.000000001' + relationships: + example: + - '0000000000.000000001' + type: array + items: + type: string + document: + type: object + nullable: true + PolicyLabelDocumentRelationshipsDTO: + type: object + properties: + target: + $ref: '#/components/schemas/VpDocumentDTO' + relationships: + type: array + items: + $ref: '#/components/schemas/VcDocumentDTO' + WorkersTasksDTO: + type: object + properties: + createDate: + type: string + done: + type: boolean + id: + type: string + isRetryableTask: + type: boolean + processedTime: + type: string + sent: + type: boolean + taskId: + type: string + type: + type: string + updateDate: + type: string + required: + - createDate + - done + - id + - isRetryableTask + - processedTime + - sent + - taskId + - type + - updateDate + CredentialSubjectDTO: + type: object + properties: + geography: + type: string + law: + type: string + tags: + type: string + ISIC: + type: string + '@context': + type: array + items: + type: string + id: + type: string + type: + type: string + required: + - geography + - law + - tags + - ISIC + - '@context' + - id + - type + ProofDTO: + type: object + properties: + type: + type: string + created: + format: date-time + type: string + verificationMethod: + type: string + proofPurpose: + type: string + jws: + type: string + required: + - type + - created + - verificationMethod + - proofPurpose + - jws diff --git a/docs/.gitbook/assets/swagger-indexer (1) (2).yaml b/docs/.gitbook/assets/swagger-indexer (1) (2).yaml new file mode 100644 index 0000000000..b89f383003 --- /dev/null +++ b/docs/.gitbook/assets/swagger-indexer (1) (2).yaml @@ -0,0 +1,7963 @@ +openapi: 3.0.0 +paths: + /search: + get: + operationId: SearchApi_search + summary: Search + description: Full-text indexer search + parameters: + - name: pageIndex + required: true + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: search + required: true + in: query + description: Search phrase + example: Project + schema: + type: string + responses: + '200': + description: Search results + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/SearchItemDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - search + /entities/registries: + get: + operationId: EntityApi_getRegistries + summary: Get standard registries + description: Returns standard registries + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: >- + Search registries, which are related to specific topic + identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Global topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.did + required: false + in: query + description: Registry did + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: options.registrantTopicId + required: false + in: query + description: Registry user topic identifier + example: 0.0.4481265 + schema: + type: string + responses: + '200': + description: Registries + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/RegistryDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_0 + - entities + /entities/registries/{messageId}: + get: + operationId: EntityApi_getRegistry + summary: Get registry + description: Returns registry + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Registry details + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/registry-users: + get: + operationId: EntityApi_getRegistryUsers + summary: Get registry users + description: Returns registry users + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: >- + Search registry users, which are related to specific topic + identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: User topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Registry users + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/RegistryUserGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/registry-users/{messageId}: + get: + operationId: EntityApi_getRegistryUser + summary: Get registry user + description: Returns registry user + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Registry user details + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryUserDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/policies: + get: + operationId: EntityApi_getPolicies + summary: Get policies + description: Returns policies + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search policies, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Policy topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.owner + required: false + in: query + description: Policy owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.tools + required: false + in: query + description: Tool + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Policies + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/policies/{messageId}: + get: + operationId: EntityApi_getPolicy + summary: Get policy + description: Returns policy + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Policy details + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tools: + get: + operationId: EntityApi_getTools + summary: Get tools + description: Returns tools + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search tools, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.owner + required: false + in: query + description: Tool owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Tools + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tools/{messageId}: + get: + operationId: EntityApi_getTool + summary: Get tool + description: Returns tool + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Tool details + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/modules: + get: + operationId: EntityApi_getModules + summary: Get modules + description: Returns modules + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search modules, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.owner + required: false + in: query + description: Module owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Modules + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ModuleDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/modules/{messageId}: + get: + operationId: EntityApi_getModule + summary: Get module + description: Returns module + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Module details + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/schemas: + get: + operationId: EntityApi_getSchemas + summary: Get schemas + description: Returns schemas + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search schemas, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Policy topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.owner + required: false + in: query + description: Schema owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + responses: + '200': + description: Schemas + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/SchemaGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/schemas/{messageId}: + get: + operationId: EntityApi_getSchema + summary: Get schema + description: Returns schema + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Schema details + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/schemas/{messageId}/tree: + get: + operationId: EntityApi_getSchemaTree + summary: Get schema tree + description: Returns schema tree + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Schema tree + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaTreeDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tokens: + get: + operationId: EntityApi_getTokens + summary: Get tokens + description: Returns tokens + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: tokenId + required: false + in: query + description: Token identifier + example: 0.0.1960 + schema: + type: string + - name: treasury + required: false + in: query + description: Treasury + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Tokens + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tokens/{tokenId}: + get: + operationId: EntityApi_getToken + summary: Get token + description: Returns token + parameters: + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Token details + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/roles: + get: + operationId: EntityApi_getRoles + summary: Get roles + description: Returns roles + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search roles, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Roles + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/RoleDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/roles/{messageId}: + get: + operationId: EntityApi_getRole + summary: Get role + description: Returns role + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Role details + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/statistics: + get: + operationId: EntityApi_getStatistics + summary: Get statistics + description: Returns statistics + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: >- + Search statistics, which are related to specific topic + identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Statistic topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.owner + required: false + in: query + description: Statistic owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: options.policy + required: false + in: query + description: Policy + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Statistics + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/StatisticDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/statistics/{messageId}: + get: + operationId: EntityApi_getStatistic + summary: Get statistic + description: Returns statistic + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Statistic details + content: + application/json: + schema: + $ref: '#/components/schemas/StatisticDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/statistic-documents: + get: + operationId: EntityApi_getStatisticDocuments + summary: Get VCs + description: Returns VCs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search VCs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + - name: analytics.schemaId + required: false + in: query + description: Schema identifier + example: '1706823227.586179534' + schema: + type: string + - name: options.relationships + required: false + in: query + description: Relationships + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VCs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/VCGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/labels: + get: + operationId: EntityApi_getLabels + summary: Get labels + description: Returns labels + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search labels, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Label topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.owner + required: false + in: query + description: Label owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: options.policy + required: false + in: query + description: Policy + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Labels + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/LabelDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/labels/{messageId}: + get: + operationId: EntityApi_getLabel + summary: Get label + description: Returns label + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Label details + content: + application/json: + schema: + $ref: '#/components/schemas/LabelDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/label-documents/{messageId}: + get: + operationId: EntityApi_getLabelDocument + summary: Get label document + description: Returns label document + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Label document details + content: + application/json: + schema: + $ref: '#/components/schemas/LabelDocumentDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/label-documents: + get: + operationId: EntityApi_getLabelDocuments + summary: Get Label Documents + description: Returns Label Documents + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search VPs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + - name: analytics.schemaIds + required: false + in: query + description: Schema identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Label Documents + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/VPGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/formulas: + get: + operationId: EntityApi_getFormulas + summary: Get formulas + description: Returns formulas + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search formulas, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Policy topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.owner + required: false + in: query + description: formula owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + responses: + '200': + description: formulas + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/FormulaDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/formulas/{messageId}: + get: + operationId: EntityApi_getFormula + summary: Get formula + description: Returns formula + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Formula details + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/formulas/{messageId}/relationships: + get: + operationId: EntityApi_getFormulaRelationships + summary: Get formula relationships + description: Returns formula relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Formula relationships + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaRelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/did-documents: + get: + operationId: EntityApi_getDidDocuments + summary: Get DIDs + description: Returns DIDs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search DIDs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.did + required: false + in: query + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + responses: + '200': + description: DIDs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/DIDGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/did-documents/{messageId}: + get: + operationId: EntityApi_getDidDocument + summary: Get DID + description: Returns DID + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: DID details + content: + application/json: + schema: + $ref: '#/components/schemas/DIDDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/did-documents/{messageId}/relationships: + get: + operationId: EntityApi_getDidRelationships + summary: Get DID relationships + description: Returns DID relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: DID relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vp-documents: + get: + operationId: EntityApi_getVpDocuments + summary: Get VPs + description: Returns VPs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search VPs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + - name: analytics.schemaIds + required: false + in: query + description: Schema identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VPs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/VPGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vp-documents/{messageId}: + get: + operationId: EntityApi_getVpDocument + summary: Get VP + description: Returns VP + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VP details + content: + application/json: + schema: + $ref: '#/components/schemas/VPDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vp-documents/{messageId}/relationships: + get: + operationId: EntityApi_getVpRelationships + summary: Get VP relationships + description: Returns VP relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VP relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vc-documents: + get: + operationId: EntityApi_getVcDocuments + summary: Get VCs + description: Returns VCs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search VCs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + - name: analytics.schemaId + required: false + in: query + description: Schema identifier + example: '1706823227.586179534' + schema: + type: string + - name: options.relationships + required: false + in: query + description: Relationships + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VCs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/VCGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vc-documents/{messageId}: + get: + operationId: EntityApi_getVcDocument + summary: Get VC + description: Returns VC + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VC details + content: + application/json: + schema: + $ref: '#/components/schemas/VCDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vc-documents/{messageId}/relationships: + get: + operationId: EntityApi_getVcRelationships + summary: Get VC relationships + description: Returns VC relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VC relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/nfts: + get: + operationId: EntityApi_getNFTs + summary: Get NFTs + description: Returns NFTs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: tokenId + required: false + in: query + description: Token identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: NFTs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/NFTDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/nfts/{tokenId}/{serialNumber}: + get: + operationId: EntityApi_getNFT + summary: Get NFT + description: Returns NFT + parameters: + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1960 + schema: + type: string + - name: serialNumber + required: true + in: path + description: Serial number + example: '1' + schema: + type: string + responses: + '200': + description: NFT details + content: + application/json: + schema: + $ref: '#/components/schemas/NFTDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/topics: + get: + operationId: EntityApi_getTopics + summary: Get topics + description: Returns topics + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search topics, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.parentId + required: false + in: query + description: Parent topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Topics + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/TopicDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/topics/{topicId}: + get: + operationId: EntityApi_getTopic + summary: Get topic + description: Returns topic + parameters: + - name: topicId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Topic details + content: + application/json: + schema: + $ref: '#/components/schemas/TopicDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/contracts: + get: + operationId: EntityApi_getContracts + summary: Get contracts + description: Returns contracts + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search contracts, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: owner + required: false + in: query + description: Owner + example: 0.0.2160 + schema: + type: string + responses: + '200': + description: Contracts + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ContractDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/contracts/{messageId}: + get: + operationId: EntityApi_getContract + summary: Get contract + description: Returns contract + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Contract details + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/update-files: + post: + operationId: EntityApi_search + summary: Try load ipfs files + description: Returns ipfs files + parameters: [] + requestBody: + required: true + description: Entity Timestamp + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateFileDTO' + responses: + '200': + description: ipfs files + content: + application/json: + schema: + $ref: '#/components/schemas/DetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /landing/analytics: + get: + operationId: LandingApi_getOnboardingStat + summary: Get landing page analytics + description: >- + Returns count of registries, methodologies, projects, totalIssuance, + date + parameters: [] + responses: + '200': + description: Landing page analytics result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LandingAnalyticsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_1 + - landing + /landing/projects-coordinates: + get: + operationId: LandingApi_getProjectCoordinates + summary: Get projects coordinates + description: Returns all project coordinates + parameters: [] + responses: + '200': + description: Projects coordinates result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectCoordinatesDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + /analytics/search/policy: + post: + operationId: AnalyticsApi_search + summary: Search policy + description: Returns search policy result + parameters: [] + requestBody: + required: true + description: Search policy parameters + content: + application/json: + schema: + $ref: '#/components/schemas/SearchPolicyParamsDTO' + responses: + '200': + description: Search policy result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SearchPolicyResultDTO' + '422': + description: Unprocessable entity + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_2 + - analytics + /analytics/search/retire: + post: + operationId: AnalyticsApi_getRetireDocuments + summary: Search contract retirements + description: Returns contract retirements result + parameters: [] + requestBody: + required: true + description: Search policy parameters + content: + application/json: + schema: + $ref: '#/components/schemas/RawMessageDTO' + responses: + '200': + description: Search policy result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MessageDTO' + '422': + description: Unprocessable entity + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + /analytics/checkAvailability: + get: + operationId: AnalyticsApi_getIndexerAvailability + summary: Get indexer availability + description: Returns indexer availability + parameters: [] + responses: + '200': + description: Indexer availability result + content: + application/json: + schema: + type: boolean + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 +info: + title: Guardian + description: >- + The Guardian is a modular open-source solution that includes best-in-class + identity management and decentralized ledger technology (DLT) libraries. At + the heart of the Guardian solution is a sophisticated Policy Workflow Engine + (PWE) that enables applications to offer a requirements-based tokenization + implementation. + version: 3.0.0 + contact: + name: API developer + url: https://envisionblockchain.com + email: info@envisionblockchain.com + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html +tags: [] +servers: + - url: /api/v1 + description: version 1.0 +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + PageDTO: + type: object + properties: + pageIndex: + type: number + description: Page index + example: '0' + pageSize: + type: number + description: Page size + example: '10' + total: + type: number + description: Total size + example: '100' + order: + type: object + description: Order + required: + - pageIndex + - pageSize + - total + - order + SearchItemDTO: + type: object + properties: + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + type: + type: string + description: Message type + example: VC-Document + required: + - consensusTimestamp + - type + InternalServerErrorDTO: + type: object + properties: + code: + type: number + example: 500 + message: + type: string + example: Error message + required: + - code + - message + RegistryOptionsDTO: + type: object + properties: + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + registrantTopicId: + type: string + description: Registrant topic id + lang: + type: string + description: Lang + attributes: + type: object + description: Attributes + required: + - did + - registrantTopicId + - lang + - attributes + RegistryAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + RegistryDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: &ref_3 + - QmYtKEVfpbDwn7XLHjnjap224ESi3vLiYpkbWoabnxs6cX + type: array + items: + type: string + topics: + description: Topics + example: &ref_4 + - 0.0.4481265 + type: array + items: + type: string + tokens: + description: Tokens + example: &ref_5 + - 0.0.4481265 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Standard Registry + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: Init + options: + $ref: '#/components/schemas/RegistryOptionsDTO' + analytics: + $ref: '#/components/schemas/RegistryAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + RawMessageDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + status: + type: string + description: Status + example: LOADED + lastUpdate: + type: number + description: Last update + example: 1716755852055 + message: + type: string + description: Message + example: >- + eyJpZCI6ImVhYTYyOWZmLWM4NmItNDEyZS1iYzYwLWM4NDk2OTJkMDBiYiIsInN0YXR1cyI6IklTU1VFIiwidHlwZSI6IlN0YW5kYXJkIFJlZ2lzdHJ5IiwiYWN0aW9uIjoiSW5pdCIsImxhbmciOiJlbi1VUyIsImRpZCI6ImRpZDpoZWRlcmE6dGVzdG5ldDpBYkd6Q3hpRzRlZ0xibldCUERpaHdMUVIza0tLcnNGNmJnSDdUdmVGYjI3bl8wLjAuMjE3NiIsInRvcGljSWQiOiIwLjAuMjE3NiIsImF0dHJpYnV0ZXMiOnsiZ2VvZ3JhcGh5IjoidGVzdCIsImxhdyI6InRlc3R0ZXMiLCJ0YWdzIjoidGVzdCJ9fQ + sequenceNumber: + type: number + description: Sequence number + example: 2 + owner: + type: string + description: Owner + example: 0.0.1914 + chunkId: + type: string + description: Chunk identifier + example: '1706817694.014944860' + chunkNumber: + type: number + description: Chunk number + example: 1 + chunkTotal: + type: number + description: Chunk total + example: 1 + type: + type: string + description: Type + example: Message + data: + type: string + description: Data + example: >- + `{"id":"eaa629ff-c86b-412e-bc60-c849692d00bb","status":"ISSUE","type":"Standard + Registry","action":"Init","lang":"en-US","did":"did:hedera:testnet:AbGzCxiG4egLbnWBPDihwLQR3kKKrsF6bgH7TveFb27n_0.0.2176","topicId":"0.0.2176","attributes":{"geography":"test","law":"testtes","tags":"test"}}` + required: + - id + - consensusTimestamp + - topicId + - status + - lastUpdate + - message + - sequenceNumber + - owner + - chunkId + - chunkNumber + - chunkTotal + - type + - data + RegistryActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + policies: + type: number + description: Policies + example: 10 + roles: + type: number + description: Roles + example: 10 + tools: + type: number + description: Tools + example: 10 + modules: + type: number + description: Modules + example: 10 + tokens: + type: number + description: Tokens + example: 10 + users: + type: number + description: Registry users + example: 10 + contracts: + type: number + description: Contracts + example: 10 + required: + - vcs + - vps + - policies + - roles + - tools + - modules + - tokens + - users + - contracts + RegistryDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/RegistryDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/RegistryActivityDTO' + required: + - id + - uuid + - item + - row + - activity + RegistryUserOptionsDTO: + type: object + properties: + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - did + RegistryUserAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + RegistryUserGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-did-document + options: + $ref: '#/components/schemas/RegistryUserOptionsDTO' + analytics: + $ref: '#/components/schemas/RegistryUserAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + RegistryUserDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-did-document + options: + $ref: '#/components/schemas/RegistryUserOptionsDTO' + analytics: + $ref: '#/components/schemas/RegistryUserAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"@context":"https://www.w3.org/ns/did/v1","id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","verificationMethod":[{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key","type":"Ed25519VerificationKey2018","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"8WkE4uKLN7i9RnzeoUJfxSH9Jw8M1yTzKk6rtwVa6uGP"},{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key-bbs","type":"Bls12381G2Key2020","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"237NDsUq7LAmSMzE6CEBFyuz9s2sscSz2M6cn4zUKPmJ5Q6rMh6SLRGC3EDdna7vSKwHMCGjhCiLKM6qYU7ZeYKRPNnRMcadoJbSQ44SGAAiyrpmhX8aaoTZpMdHmGFVXdqC"}],"authentication":["did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key"],"assertionMethod":["#did-root-key","#did-root-key-bbs"]}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + - documents + RegistryUserActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + roles: + type: number + description: Roles + example: 10 + required: + - vcs + - vps + - roles + RegistryUserDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/RegistryUserDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/RegistryUserActivityDTO' + required: + - id + - uuid + - item + - row + - activity + PolicyOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Verra REDD + description: + type: string + description: Description + example: Verra REDD Policy + topicDescription: + type: string + description: Topic description + example: Verra REDD Policy Topic + version: + type: string + description: Version + example: 1.0.0 + policyTag: + type: string + description: Policy tag + example: Verra_REDD + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + policyTopicId: + type: string + description: Policy topic identifier + example: 0.0.4481265 + instanceTopicId: + type: string + description: Policy instance topic identifier + example: 0.0.4481265 + synchronizationTopicId: + type: string + description: Synchronization topic identifier + example: 0.0.4481265 + discontinuedDate: + type: string + description: Discontinued date + example: '2024-02-27T16:32:08.513Z' + required: + - uuid + - name + - description + - topicDescription + - version + - policyTag + - owner + - policyTopicId + - instanceTopicId + - synchronizationTopicId + - discontinuedDate + PolicyAnalyticsDTO: + type: object + properties: + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + tokens: + description: Tokens + example: + - 0.0.4481265 + type: array + items: + type: string + vcCount: + type: number + description: VC count + example: 10 + vpCount: + type: number + description: VP count + example: 10 + tokensCount: + type: number + description: Tokens count + example: 10 + tags: + description: Tags + example: + - iRec + type: array + items: + type: string + hash: + type: string + description: Hash + example: DdQweGpEqbWgQUZcQjySQn2qYPd3yACGnSoRXiuLt5or + hashMap: + type: object + description: Hash map + tools: + description: Tools + example: + - '1706823227.586179534' + type: array + items: + type: string + registryId: + type: string + description: Registry identifier + example: '1706823227.586179534' + textSearch: + type: string + description: Text search + required: + - owner + - tokens + - vcCount + - vpCount + - tokensCount + - tags + - hash + - hashMap + - tools + - registryId + - textSearch + PolicyDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Policy + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: publish-policy + options: + $ref: '#/components/schemas/PolicyOptionsDTO' + analytics: + $ref: '#/components/schemas/PolicyAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + PolicyActivityDTO: + type: object + properties: + schemas: + type: number + description: Schemas + example: 10 + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + roles: + type: number + description: Roles + example: 10 + formulas: + type: number + description: Formulas + example: 10 + required: + - schemas + - vcs + - vps + - roles + - formulas + PolicyDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/PolicyDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/PolicyActivityDTO' + required: + - id + - uuid + - item + - row + - activity + ToolOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Tool 16 + description: + type: string + description: Description + example: Tool 16 + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + hash: + type: string + description: Hash + example: 71ZWDSX2cUPsye4AuMUqXUhgk1XBDnpi4Ky1mtjYqYom + toolTopicId: + type: string + description: Tool topic identifier + example: 0.0.4481265 + tagsTopicId: + type: string + description: Tags topic identifier + example: 0.0.4481265 + required: + - uuid + - name + - description + - owner + - hash + - toolTopicId + - tagsTopicId + ToolAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + ToolDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Tool + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: publish-tool + options: + $ref: '#/components/schemas/ToolOptionsDTO' + analytics: + $ref: '#/components/schemas/ToolAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + ToolActivityDTO: + type: object + properties: + schemas: + type: number + description: Schemas + example: 10 + policies: + type: number + description: Policies + example: 10 + required: + - schemas + - policies + ToolDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/ToolDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/ToolActivityDTO' + required: + - id + - uuid + - item + - row + - activity + ModuleOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Grid module + description: + type: string + description: Description + example: Grid module + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + moduleTopicId: + type: string + description: Module topic identifier + example: 0.0.4481265 + required: + - uuid + - name + - description + - owner + - moduleTopicId + ModuleAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + ModuleDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Module + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: publish-module + options: + $ref: '#/components/schemas/ModuleOptionsDTO' + analytics: + $ref: '#/components/schemas/ModuleAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + ModuleDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/ModuleDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + required: + - id + - uuid + - item + - row + SchemaOptionsDTO: + type: object + properties: + name: + type: string + description: Name + example: Monitoring report + description: + type: string + description: Description + example: Monitoring report schema + entity: + type: string + description: Entity + example: VC + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + version: + type: string + description: Version + example: 1.0.0 + codeVersion: + type: string + description: Code version + example: 1.0.0 + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + required: + - name + - description + - entity + - owner + - uuid + - version + - codeVersion + - relationships + SchemaGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Schema + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: publish-schema + options: + $ref: '#/components/schemas/SchemaOptionsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + ChildSchemaDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + name: + type: string + description: Name + example: Project Details + required: + - id + - name + SchemaAnalyticsDTO: + type: object + properties: + policyIds: + description: Policy message identifiers + example: + - '1706823227.586179534' + type: array + items: + type: string + childSchemas: + $ref: '#/components/schemas/ChildSchemaDTO' + properties: + description: Schema properties + example: + - ActivityImpactModule.projectScope + type: array + items: + type: string + textSearch: + type: string + description: Text search + required: + - policyIds + - childSchemas + - properties + - textSearch + SchemaDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Schema + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: publish-schema + options: + $ref: '#/components/schemas/SchemaOptionsDTO' + analytics: + $ref: '#/components/schemas/SchemaAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + {"$id":"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0","$comment":"{ + \"@id\": \"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\", + \"term\": \"d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\" + }","title":"tagSchemaAPI339404","description":"tagSchemaAPI339404","type":"object","properties":{"@context":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true},"type":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["@context","type"],"additionalProperties":false,"$defs":{}} + - >- + {"@context":{"@version":1.1,"@vocab":"https://w3id.org/traceability/#undefinedTerm","id":"@id","type":"@type","d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0":{"@id":"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0","@context":{}}}} + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + - documents + SchemaActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + required: + - vcs + - vps + SchemaDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/SchemaDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/SchemaActivityDTO' + required: + - id + - uuid + - item + - row + - activity + SchemaTreeNodeDataDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + color: + type: string + description: Color + example: '#FFFFFF' + required: + - id + - color + SchemaTreeNodeDTO: + type: object + properties: + label: + type: string + description: Label + example: Monitoring Report + expanded: + type: boolean + description: Expanded + example: true + data: + $ref: '#/components/schemas/SchemaTreeNodeDataDTO' + children: + type: object + description: Schema tree node children + required: + - label + - expanded + - data + - children + SchemaTreeDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + item: + $ref: '#/components/schemas/SchemaGridDTO' + root: + $ref: '#/components/schemas/SchemaTreeNodeDTO' + required: + - id + - item + - root + TokenDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + tokenId: + type: string + description: Token identifier + example: 0.0.4481265 + status: + type: string + description: Status + example: UPDATED + lastUpdate: + type: number + description: Last update + example: 1716755852055 + serialNumber: + type: number + description: Serial number + example: 1 + hasNext: + type: boolean + description: Has next + example: false + name: + type: string + description: Name + example: iRec Token + symbol: + type: string + description: Symbol + example: iRec + type: + type: string + description: Symbol + enum: + - NON_FUNGIBLE_UNIQUE + - FUNGIBLE_COMMON + treasury: + type: string + description: Treasury + example: 0.0.1 + memo: + type: string + description: Memo + example: 0.0.2952745 + totalSupply: + type: object + description: Total supply + example: '77' + decimals: + type: string + description: Decimals + example: '2' + required: + - id + - tokenId + - status + - lastUpdate + - serialNumber + - hasNext + - name + - symbol + - type + - treasury + - memo + - totalSupply + - decimals + VPOptionsDTO: + type: object + properties: + issuer: + type: string + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + required: + - issuer + - relationships + VPAnalyticsDTO: + type: object + properties: + schemaIds: + description: Schema message identifiers + example: + - '1706823227.586179534' + type: array + items: + type: string + schemaNames: + description: Schema names + example: + - Monitoring Report + type: array + items: + type: string + policyId: + type: string + description: Policy message identifier + example: '1706823227.586179534' + textSearch: + type: string + description: Text search + issuer: + type: string + description: Document issuer + tokenId: + type: string + description: Token ID + tokenAmount: + type: string + description: Token amount + labelName: + type: string + description: Label name + labels: + description: Label IDs + type: array + items: + type: string + required: + - schemaIds + - schemaNames + - policyId + - textSearch + - issuer + - tokenId + - tokenAmount + - labelName + - labels + VPDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: VP-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-vp-document + options: + $ref: '#/components/schemas/VPOptionsDTO' + analytics: + $ref: '#/components/schemas/VPAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"id":"urn:uuid:2c374b67-fda5-4023-97c2-c0782624573f","type":["VerifiablePresentation"],"@context":["https://www.w3.org/2018/credentials/v1"],"verifiableCredential":[{"id":"urn:uuid:ff0aecbd-d358-4e5b-b99b-7a87ba38a3b2","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438","issuanceDate":"2024-02-06T05:40:37.795Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreib6arvz7hltf2yqoyb7iqlkrojur7lqqcsuuhvcfvyrtkncm6pqhi"],"credentialSubject":[{"finalMintAmount":5,"policyId":"65bc691d2ae9d0f1ef2db3bc","ref":"urn:uuid:11b1ad6f-8b4f-4d61-a63a-cc9e6532625f","@context":["ipfs://bafkreib6arvz7hltf2yqoyb7iqlkrojur7lqqcsuuhvcfvyrtkncm6pqhi"],"id":"urn:uuid:5d253a1d-456a-4fb1-8b45-257e1db2e668","type":"601a68c4-66c3-407c-bc88-1b5841e6d1da&1.0.0"}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-06T05:40:37Z","verificationMethod":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..UvTeKVUVUxH1SFNNoyu_VXf4kFqDIFzFPJaaq5adiSHrBePLQMQv7dM_Fq23z7UGHSmXlodBen1Ujcdi-am5DQ"}},{"id":"urn:uuid:b76fbd72-48b7-45fb-b152-7ec13d11eafb","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438","issuanceDate":"2024-02-06T05:40:45.066Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreigd6nhj5auxobzu4qzlakzcaizh6wux2gq43qft4rwpri7msn2geu"],"credentialSubject":[{"date":"2024-02-06T05:40:45.021Z","tokenId":"0.0.1621155","amount":"5","@context":["ipfs://bafkreigd6nhj5auxobzu4qzlakzcaizh6wux2gq43qft4rwpri7msn2geu"],"type":"MintToken"}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-06T05:40:45Z","verificationMethod":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..5hWYO3NA0Q9zI0oS1lLOpofQI-DTQVM0sd4GUQV-UUSlBug3EgYYBm7247LCzlCRt9VpYsUh7SxIrsgHzsSRDA"}}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-06T05:40:45Z","verificationMethod":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key","proofPurpose":"authentication","challenge":"123","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Mu5BaQ34idnqG6d-aMqufQOXcuWHMkv6N9Z2zhBi9Yfd7jU9FFkwi-Xjyf-Kastr7vVWBNLwGxB-bPRf4UEHAg"}}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + - documents + TokenDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + row: + $ref: '#/components/schemas/TokenDTO' + labels: + type: array + items: + $ref: '#/components/schemas/VPDetailsItemDTO' + required: + - id + - row + - labels + RoleOptionsDTO: + type: object + properties: + role: + type: string + description: Role + example: Registrant + group: + type: string + description: Role + example: Registrants + issuer: + type: string + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - role + - group + - issuer + RoleAnalyticsDTO: + type: object + properties: + policyId: + type: string + description: Policy message identifier + example: '1706823227.586179534' + textSearch: + type: string + description: Text search + required: + - policyId + - textSearch + RoleDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Role-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-vc-document + options: + $ref: '#/components/schemas/RoleOptionsDTO' + analytics: + $ref: '#/components/schemas/RoleAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + RoleActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + required: + - vcs + RoleDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/RoleDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/RoleActivityDTO' + required: + - id + - uuid + - item + - row + - activity + StatisticOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Label Name + description: + type: string + description: Description + example: Label Description + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + policyTopicId: + type: string + description: Policy topic identifier + example: 0.0.4481265 + policyInstanceTopicId: + type: string + description: Policy instance topic identifier + example: 0.0.4481265 + required: + - uuid + - name + - description + - owner + - policyTopicId + - policyInstanceTopicId + StatisticAnalyticsDTO: + type: object + properties: {} + StatisticDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Policy-Label + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: publish-policy-label + options: + $ref: '#/components/schemas/StatisticOptionsDTO' + analytics: + $ref: '#/components/schemas/StatisticAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + StatisticActivityDTO: + type: object + properties: + schemas: + type: number + description: Schemas + example: 10 + vcs: + type: number + description: VCs + example: 10 + required: + - schemas + - vcs + StatisticDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/StatisticDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/StatisticActivityDTO' + required: + - id + - uuid + - item + - row + - activity + VCOptionsDTO: + type: object + properties: + issuer: + type: string + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + documentStatus: + type: string + description: Document status + example: Approved + encodedData: + type: boolean + description: Encoded EVC data + required: + - issuer + - relationships + - documentStatus + - encodedData + VCAnalyticsDTO: + type: object + properties: + policyId: + type: string + description: Policy message identifier + example: '1706823227.586179534' + schemaId: + type: string + description: Schema message identifier + example: '1706823227.586179534' + schemaName: + type: string + description: Schema name + example: Monitoring Report + textSearch: + type: string + description: Text search + required: + - policyId + - schemaId + - schemaName + - textSearch + VCGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: VC-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-vc-document + options: + $ref: '#/components/schemas/VCOptionsDTO' + analytics: + $ref: '#/components/schemas/VCAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + LabelOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Label Name + description: + type: string + description: Description + example: Label Description + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + policyTopicId: + type: string + description: Policy topic identifier + example: 0.0.4481265 + policyInstanceTopicId: + type: string + description: Policy instance topic identifier + example: 0.0.4481265 + required: + - uuid + - name + - description + - owner + - policyTopicId + - policyInstanceTopicId + LabelAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + config: + type: object + description: Label Config + required: + - textSearch + - owner + - config + LabelDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Policy-Label + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: publish-policy-label + options: + $ref: '#/components/schemas/LabelOptionsDTO' + analytics: + $ref: '#/components/schemas/LabelAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + LabelActivityDTO: + type: object + properties: + schemas: + type: number + description: Schemas + example: 10 + vps: + type: number + description: VPs + example: 10 + required: + - schemas + - vps + LabelDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/LabelDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/LabelActivityDTO' + required: + - id + - uuid + - item + - row + - activity + LabelDocumentDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/VPDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: + type: array + items: + $ref: '#/components/schemas/VPDetailsItemDTO' + label: + type: array + items: + $ref: '#/components/schemas/VPDetailsItemDTO' + required: + - id + - uuid + - item + - row + - history + - label + VPGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: VP-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-vp-document + options: + $ref: '#/components/schemas/VPOptionsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + FormulaOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Formula Name + description: + type: string + description: Description + example: Formula Description + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + policyTopicId: + type: string + description: Policy topic identifier + example: 0.0.4481265 + policyInstanceTopicId: + type: string + description: Policy instance topic identifier + example: 0.0.4481265 + required: + - uuid + - name + - description + - owner + - policyTopicId + - policyInstanceTopicId + FormulaAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + config: + type: object + description: Formula Config + required: + - textSearch + - owner + - config + FormulaDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Formula + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: publish-formula + options: + $ref: '#/components/schemas/FormulaOptionsDTO' + analytics: + $ref: '#/components/schemas/FormulaAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + FormulaActivityDTO: + type: object + properties: + schemas: + type: number + description: Schemas + example: 10 + vps: + type: number + description: VPs + example: 10 + required: + - schemas + - vps + FormulaDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/FormulaDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/FormulaActivityDTO' + required: + - id + - uuid + - item + - row + - activity + MessageDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + FormulaRelationshipsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + item: + $ref: '#/components/schemas/MessageDTO' + schemas: + type: array + items: + $ref: '#/components/schemas/MessageDTO' + formulas: + type: array + items: + $ref: '#/components/schemas/MessageDTO' + required: + - id + - item + - schemas + - formulas + DIDOptionsDTO: + type: object + properties: + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - relationships + - did + DIDAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + DIDGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-did-document + options: + $ref: '#/components/schemas/DIDOptionsDTO' + analytics: + $ref: '#/components/schemas/DIDAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + DIDDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-did-document + options: + $ref: '#/components/schemas/DIDOptionsDTO' + analytics: + $ref: '#/components/schemas/DIDAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"@context":"https://www.w3.org/ns/did/v1","id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","verificationMethod":[{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key","type":"Ed25519VerificationKey2018","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"8WkE4uKLN7i9RnzeoUJfxSH9Jw8M1yTzKk6rtwVa6uGP"},{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key-bbs","type":"Bls12381G2Key2020","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"237NDsUq7LAmSMzE6CEBFyuz9s2sscSz2M6cn4zUKPmJ5Q6rMh6SLRGC3EDdna7vSKwHMCGjhCiLKM6qYU7ZeYKRPNnRMcadoJbSQ44SGAAiyrpmhX8aaoTZpMdHmGFVXdqC"}],"authentication":["did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key"],"assertionMethod":["#did-root-key","#did-root-key-bbs"]}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + - documents + DIDDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/DIDDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: + type: array + items: + $ref: '#/components/schemas/DIDDetailsItemDTO' + required: + - id + - uuid + - item + - row + - history + RelationshipDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + category: + type: number + description: Category + example: 1 + name: + type: string + description: Name + example: Monitoring Report Document + required: + - id + - uuid + - type + - category + - name + RelationshipLinkDTO: + type: object + properties: + source: + type: string + description: Source message identifier + example: '1706823227.586179534' + target: + type: string + description: Target message identifier + example: '1706823227.586179534' + required: + - source + - target + RelationshipsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + item: + $ref: '#/components/schemas/MessageDTO' + target: + $ref: '#/components/schemas/RelationshipDTO' + relationships: + type: array + items: + $ref: '#/components/schemas/RelationshipDTO' + links: + type: array + items: + $ref: '#/components/schemas/RelationshipLinkDTO' + categories: + description: Categories + example: + - name: Registry + - name: Policy + - name: Schema + - name: Role + - name: VC + - name: VP + type: array + items: + type: string + required: + - id + - item + - target + - relationships + - links + - categories + VPDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/VPDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: + type: array + items: + $ref: '#/components/schemas/VPDetailsItemDTO' + labels: + type: array + items: + $ref: '#/components/schemas/VPDetailsItemDTO' + required: + - id + - uuid + - item + - row + - history + - labels + VCDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: VC-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-vc-document + options: + $ref: '#/components/schemas/VCOptionsDTO' + analytics: + $ref: '#/components/schemas/VCAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"id":"urn:uuid:229f8416-db6b-4d68-90da-38a5355126f5","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223","issuanceDate":"2024-02-02T10:06:53.300Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq"],"credentialSubject":[{"@context":["ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq"],"id":"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223","type":"StandardRegistry"}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-02T10:06:53Z","verificationMethod":"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YElNPdCNkj8wzABUNgWYo3Yge0qrGA2KbxBWDKBzACJJe70ItIZsgbIQUHMnFbcKpXB1cSnHQ-H5WH_7uZ_3CQ"}}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + - documents + VCDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/VCDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: + type: array + items: + $ref: '#/components/schemas/VCDetailsItemDTO' + schema: + type: object + description: VC Schema + example: + $id: '#StandardRegistry' + $comment: '{ "@id": "#StandardRegistry", "term": "StandardRegistry" }' + title: StandardRegistry + description: StandardRegistry + type: object + properties: + '@context': + oneOf: + - type: string + - type: array + items: + type: string + readOnly: true + type: + oneOf: + - type: string + - type: array + items: + type: string + readOnly: true + id: + type: string + readOnly: true + geography: + $comment: '{"term": "geography", "@id": "https://www.schema.org/text"}' + title: geography + description: geography + type: string + readOnly: false + law: + $comment: '{"term": "law", "@id": "https://www.schema.org/text"}' + title: law + description: law + type: string + readOnly: false + tags: + $comment: '{"term": "tags", "@id": "https://www.schema.org/text"}' + title: tags + description: tags + type: string + readOnly: false + ISIC: + $comment: '{"term": "ISIC", "@id": "https://www.schema.org/text"}' + title: ISIC + description: ISIC + type: string + readOnly: false + required: + - geography + - law + - tags + additionalProperties: false + formulasData: + type: object + description: Formulas data + required: + - id + - uuid + - item + - row + - history + - schema + - formulasData + NFTDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + tokenId: + type: string + description: Token identifier + example: 0.0.4481265 + lastUpdate: + type: number + description: Last update + example: 1716755852055 + serialNumber: + type: number + description: Serial number + example: 1 + metadata: + type: string + description: metadata + example: '1706823227.586179534' + required: + - id + - tokenId + - lastUpdate + - serialNumber + - metadata + NFTDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + row: + $ref: '#/components/schemas/NFTDTO' + history: + type: array + description: NFT transaction history + items: + type: object + example: + - consensus_timestamp: '1707292471.903596642' + nonce: 0 + transaction_id: 0.0.1533323-1707292459-175375906 + type: CRYPTOTRANSFER + is_approval: false + receiver_account_id: 0.0.1842221 + sender_account_id: 0.0.1533323 + - consensus_timestamp: '1707292470.199625477' + nonce: 0 + transaction_id: 0.0.1533323-1707292458-093221893 + type: TOKENMINT + is_approval: false + receiver_account_id: 0.0.1533323 + sender_account_id: null + labels: + type: array + items: + $ref: '#/components/schemas/VPDetailsItemDTO' + required: + - id + - row + - history + - labels + TopicOptionsDTO: + type: object + properties: + name: + type: string + description: Name + example: Policy topic + description: + type: string + description: Name + example: Verra REDD Policy topic + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + messageType: + type: string + description: Message type + enum: + - USER_TOPIC + - POLICY_TOPIC + - INSTANCE_POLICY_TOPIC + - DYNAMIC_TOPIC + - SCHEMA_TOPIC + - SYNCHRONIZATION_TOPIC + - RETIRE_TOPIC + - TOKEN_TOPIC + - MODULE_TOPIC + - CONTRACT_TOPIC + - TOOL_TOPIC + - TAGS_TOPIC + childId: + type: string + description: Child topic identifier + example: 0.0.4481265 + parentId: + type: string + description: Parent topic identifier + example: 0.0.4481265 + rationale: + type: string + description: Rationale + example: '1706895596.736882433' + required: + - name + - description + - owner + - messageType + - childId + - parentId + - rationale + TopicAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + TopicDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Topic + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-topic + options: + $ref: '#/components/schemas/TopicOptionsDTO' + analytics: + $ref: '#/components/schemas/TopicAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + RawTopicDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + lastUpdate: + type: number + description: Last update + example: 1716755852055 + messages: + type: number + description: Messages + example: 25 + hasNext: + type: boolean + description: Has next + example: false + required: + - id + - topicId + - lastUpdate + - messages + - hasNext + TopicActivityDTO: + type: object + properties: + registries: + type: number + description: Registries + example: 10 + topics: + type: number + description: Topics + example: 10 + policies: + type: number + description: Policies + example: 10 + tools: + type: number + description: Tools + example: 10 + modules: + type: number + description: Modules + example: 10 + tokens: + type: number + description: Tokens + example: 10 + dids: + type: number + description: DIDs + example: 10 + contracts: + type: number + description: Contracts + example: 10 + schemas: + type: number + description: Schemas + example: 10 + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + roles: + type: number + description: Roles + example: 10 + required: + - registries + - topics + - policies + - tools + - modules + - tokens + - dids + - contracts + - schemas + - vcs + - vps + - roles + TopicDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/TopicDTO' + row: + $ref: '#/components/schemas/RawTopicDTO' + activity: + $ref: '#/components/schemas/TopicActivityDTO' + required: + - id + - uuid + - item + - row + - activity + ContractOptionsDTO: + type: object + properties: + contractId: + type: string + description: Contract identifier + example: 0.0.4481265 + description: + type: string + description: Description + example: Wipe contract + contractType: + type: string + description: Contract type + enum: + - WIPE + - RETIRE + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - contractId + - description + - contractType + - owner + ContractAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + ContractDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_3 + type: array + items: + type: string + topics: + description: Topics + example: *ref_4 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_5 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + example: Contract + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-contract + options: + $ref: '#/components/schemas/ContractOptionsDTO' + analytics: + $ref: '#/components/schemas/ContractAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + - type + - action + - options + - analytics + ContractDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/ContractDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + required: + - id + - uuid + - item + - row + UpdateFileDTO: + type: object + properties: + messageId: + type: string + description: Entity Timestamp + example: '1706823227.586179534' + required: + - messageId + DetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + required: + - id + LandingAnalyticsDTO: + type: object + properties: + registries: + type: number + description: Registries count + example: '10' + methodologies: + type: number + description: Methodologies count + example: '10' + projects: + type: number + description: Projects count + example: '10' + totalIssuance: + type: number + description: Total issuance + example: '10' + date: + format: date-time + type: string + description: ISO Date + example: '2024-06-12T14:17:26.689Z' + required: + - registries + - methodologies + - projects + - totalIssuance + - date + ProjectCoordinatesDTO: + type: object + properties: + coordinates: + type: string + description: Coordinates of project + example: 33.33|77.77 + projectId: + type: string + description: Project message identifier + example: '1706823227.586179534' + required: + - coordinates + - projectId + SearchPolicyBlocksDTO: + type: object + properties: + hash: + type: string + description: Hash + example: DdQweGpEqbWgQUZcQjySQn2qYPd3yACGnSoRXiuLt5or + hashMap: + type: object + description: Hash map + threshold: + type: number + description: Threshold + example: 10 + required: + - hash + - hashMap + - threshold + SearchPolicyParamsDTO: + type: object + properties: + text: + type: string + description: Text + minVcCount: + type: number + description: Mint VC count + example: 10 + minVpCount: + type: number + description: Mint VP count + example: 10 + minTokensCount: + type: number + description: Mint tokens count + example: 10 + threshold: + type: number + description: Threshold + example: 10 + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + blocks: + $ref: '#/components/schemas/SearchPolicyBlocksDTO' + required: + - text + - minVcCount + - minVpCount + - minTokensCount + - threshold + - owner + - blocks + SearchPolicyResultDTO: + type: object + properties: + type: + type: string + description: Type + example: Global + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Verra REDD + description: + type: string + description: Description + example: Verra REDD Policy + version: + type: string + description: Version + example: 1.0.0 + status: + type: string + description: Status + example: PUBLISH + messageId: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + textSearch: + type: string + description: Text search + registryId: + type: string + description: Registry identifier + example: '1706823227.586179534' + vcCount: + type: number + description: VC count + example: 10 + vpCount: + type: number + description: VP count + example: 10 + tokensCount: + type: number + description: Token count + example: 10 + rate: + type: number + description: Rate + example: 50 + minimum: 0 + maximum: 100 + tags: + description: tags + example: + - iRec + type: array + items: + type: string + required: + - type + - topicId + - uuid + - name + - description + - version + - status + - messageId + - owner + - textSearch + - registryId + - vcCount + - vpCount + - tokensCount + - rate + - tags diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index a8e3237744..3afcb41139 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -96,6 +96,9 @@ * [Returns Data Loading Progress Result](guardian/global-indexer/indexer-apis/returns-data-loading-progress-result.md) * [Returns Registry Relationships](guardian/global-indexer/indexer-apis/returns-registry-relationships.md) * [Returns Policy Relationships](guardian/global-indexer/indexer-apis/returns-policy-relationships.md) + * [Retrieve the list of formulas](guardian/global-indexer/indexer-apis/retrieve-the-list-of-formulas.md) + * [Retrieve the formula by message ID](guardian/global-indexer/indexer-apis/retrieve-the-formula-by-message-id.md) + * [Retrieve linked documents which are related to formula](guardian/global-indexer/indexer-apis/retrieve-linked-documents-which-are-related-to-formula.md) * [🗺️ Map Related APIs](guardian/map-related-apis/README.md) * [Returning map API Key](guardian/map-related-apis/returning-map-api-key.md) * [Returning Sentinel API Key](guardian/map-related-apis/returning-sentinel-api-key.md) @@ -295,6 +298,10 @@ * [Returns List of Artifacts](guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/returns-list-of-artifacts.md) * [Returns List of IPFS Files](guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/returns-list-of-ipfs-files.md) * [Returning Policy to Editing](guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/returning-policy-to-editing.md) + * [Create Savepoint](guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/create-savepoint.md) + * [Returns Savepoint State](guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/returns-savepoint-state.md) + * [Restoring SavePoint](guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/restoring-savepoint.md) + * [Deletes SavePoint](guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/deletes-savepoint.md) * [🧑‍🤝‍🧑 Roles and Groups](guardian/standard-registry/policies/roles-and-groups/README.md) * [💻 Creating Roles and Groups using Policy Configurator UI](guardian/standard-registry/policies/roles-and-groups/roles-and-groups.md) * [📁 Record/Replay](guardian/standard-registry/policies/record-replay/README.md) @@ -755,6 +762,8 @@ * [🏭 Atma Scope 3 GHG Policy](guardian/demo-guide/carbon-emissions/atma-scope-3-ghg-policy.md) * [🏭 GHGP Corporate Standard](guardian/demo-guide/carbon-emissions/ghgp-corporate-standard.md) * [🏭 GHGP Corporate Standard V2](guardian/demo-guide/carbon-emissions/ghgp-corporate-standard-v2.md) + * [Climate Action Reserve’s U.S. Landfill Protocol Version 6.0](guardian/demo-guide/carbon-emissions/climate-action-reserves-u.s.-landfill-protocol-version-6.0.md) + * [Landfill Gas Destruction and Beneficial Use Projects, Version 2.0](guardian/demo-guide/carbon-emissions/landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md) * [❓ FAQs](guardian/faqs.md) * [👬 Community Standards](guardian/community-standards/README.md) * [Guardian Policy Standards (GPS)](guardian/community-standards/guardian-policy-standards-gps.md) diff --git a/docs/guardian/automation-testing/performing-ui-automation-testing.md b/docs/guardian/automation-testing/performing-ui-automation-testing.md index c7fe6a7a1c..e8d871dae8 100644 --- a/docs/guardian/automation-testing/performing-ui-automation-testing.md +++ b/docs/guardian/automation-testing/performing-ui-automation-testing.md @@ -28,7 +28,7 @@ and then select test under ui-tests/specs/policies Finally, all the selected test runs and you can see the key components of the Test Runner that you need to pay attention to when executing tests. -
+
**Test Status Menu:** The menu shows a summary of the number of tests passed, passed, failed, or incomplete, and the time spent on the test. diff --git a/docs/guardian/demo-guide/carbon-emissions/climate-action-reserves-u.s.-landfill-protocol-version-6.0.md b/docs/guardian/demo-guide/carbon-emissions/climate-action-reserves-u.s.-landfill-protocol-version-6.0.md new file mode 100644 index 0000000000..88906eab37 --- /dev/null +++ b/docs/guardian/demo-guide/carbon-emissions/climate-action-reserves-u.s.-landfill-protocol-version-6.0.md @@ -0,0 +1,204 @@ +--- +icon: mountain +--- + +# Climate Action Reserve’s U.S. Landfill Protocol Version 6.0 + +## Table of Contents + +[Introduction](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc1569113010) + +[Need and Use](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc182312046) + +[Monitoring and Quantification Approach](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc182312047) + +[Project Eligibility and Additionality](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc182312048) + +[Project Type](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc182312049) + +[Demo Video](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc80095333) + +[Policy Workflow](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc182312050) + +[Policy Import](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc182312051) + +[Available Roles](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc182312052) + +[Important Schemas](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc182312053) + +[Token (Climate Reserve Tonnes - CRTs)](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc182312054) + +[Step By Step](climate-action-reserves-u.s.-landfill-protocol-version-6.0.md#toc182312055) + +## **Introduction** + +The U.S. Landfill Protocol, developed by the Climate Action Reserve, is a standardized framework for quantifying, reporting, and verifying greenhouse gas (GHG) emission reductions from methane capture and destruction projects at U.S. landfills. Approved by the Integrity Council for the Voluntary Carbon Market (ICVCM), this protocol ensures that emission reductions meet high standards of environmental integrity, credibility, and transparency. This ICVCM approval reinforces the protocol’s alignment with global best practices and its credibility in voluntary carbon markets. + +## **Need and Use** + +The U.S. Landfill Protocol supports project developers in creating projects that effectively reduce emissions from landfill sites. It includes a framework for calculating and verifying emission reductions generated by capturing methane, a potent greenhouse gas, from landfills and using or destroying it. This protocol helps landfill operators and project developers earn credits that can be used to offset emissions in compliance and voluntary carbon markets. + +## **Monitoring and Quantification Approach** + +The U.S. Landfill Protocol specifies detailed requirements for calculating baseline and project emissions to assess net GHG emission reductions. Key components include: + +* **Methane Capture and Destruction**: Continuous monitoring of landfill gas (LFG) collection and destruction is required, using calibrated equipment to measure LFG flow and methane concentration, ensuring accurate quantification of emissions destroyed. +* **Baseline Emissions**: Baseline emissions are calculated based on the methane emissions that would have occurred without the project, minus any methane oxidized by soil bacteria or destroyed by any existing destruction devices. These calculations use specific discount factors for oxidation and other adjustments according to landfill characteristics and monitoring frequency. +* **Project Emissions**: Project emissions include any emissions from the energy used to operate the landfill gas collection and destruction systems, as well as emissions from fossil fuels or supplemental energy sources. +* **Emission Reductions**: Net emission reductions are calculated by subtracting project emissions from baseline emissions, providing a clear assessment of GHG reductions achieved through methane destruction. + +This structured approach allows for consistent, transparent, and conservative reporting of GHG emission reductions in line with the Climate Action Reserve's requirements. + +## **Project Eligibility and Additionality** + +Projects must meet specific eligibility requirements to qualify under this protocol: + +* **Location**: Projects must be located at landfills in the U.S., including tribal lands and territories. +* **Project Start Date**: The project start date should be defined by the first instance of landfill gas destruction, with project submission required within 12 months of this date. +* **Additionality** is demonstrated through the **performance standard test** (based on baseline conditions) and the **legal requirement test** (ensuring no regulatory mandates already require methane destruction). Only landfill projects that collect and destroy methane beyond regulatory requirements qualify for additionality, ensuring that GHG reductions are surplus to business-as-usual scenarios. + +## **Project Type** + +This protocol applies to projects that aim to reduce methane emissions from U.S. landfills by capturing and utilizing or destroying methane gas. Only projects that meet the Climate Action Reserve’s eligibility criteria and have not issued credits under other GHG programs are eligible. + +## **Demo Video** + +[**Youtube**](https://www.youtube.com/watch?v=fDTobFguBJE) + +## **Policy Workflow** + +The policy workflow replicates the procedural steps required for landfill gas projects, covering project registration, additionality demonstration, and the submission of monitoring reports to claim carbon credits. + +
+ +## **Policy Import** + +This policy is available for import via GitHub or IPFS timestamp. + +## **Available Roles** + +1. **Project Developer**: Responsible for overall project management, documentation submission, and coordination with verification bodies. +2. **Verifier(s)**: Independent third-party verifiers who assess project data and ensure compliance with protocol requirements. +3. **Standard Registry**: The governing body that maintains project records, manages reporting, and approves credit issuance. + +## **Important Schemas** + +* **Project Submission Form:** This form provides a comprehensive overview of the project, including landfill site details, baseline emissions, monitoring plans, and stakeholder consultations. It serves as the foundational document for project registration with the Climate Action Reserve. +* **Verification Report:** Submitted by an independent third-party verifier, this report evaluates the accuracy of the emissions reductions claimed by the project. It includes findings on project compliance, monitoring data, and any identified discrepancies or recommendations for improvement. +* **Emission Reductions Report:** This document provides a summary of the emission reductions accomplished by the project. It details the methodologies used, calculations used, and calculation results. +* **Attestation of Title Form:** Signed by the Project Developer, this form certifies ownership of the project’s GHG reductions. Clear ownership documentation ensures that CRTs are issued only to entities with verified rights to claim these reductions. +* **Attestation of Voluntary Implementation:** This attestation is signed by the Project Developer to confirm that the project’s landfill gas collection and destruction activities go beyond any regulatory requirements. It is submitted prior to verification, ensuring that GHG reductions are genuinely additional to what would have occurred under existing legal mandates. +* **Attestation of Regulatory Compliance:** This attestation confirms that the project complies with all applicable federal, state, and local laws and regulations (e.g., environmental, safety). The Project Developer must disclose any instances of non-compliance to the verifier, who assesses the impact on credit issuance. +* **Environmental Safeguards:** This schema ensures that project activities align with environmental best practices, minimizing unintended impacts on local ecosystems, air, water, and soil quality. The Project Developer must document steps taken to prevent adverse environmental effects, such as controlling potential pollutants, managing resource use, and protecting nearby habitats. This schema may also include periodic environmental impact assessments as part of ongoing compliance and verification. + +## **Token (**Climate Reserve Tonnes - CRTs**)** + +Each CRT represents one metric tonne of carbon dioxide equivalent (tCO₂e) reduced or avoided through the approved project activities. + +## **Step By Step** + +1. Import the policy using IPFS or Policy File. Once imported, you will be redirected to the policy configurator. + +
+ +
+ +
+ +2. Set the policy to Dry Run or Publish it using the dropdown. Then select “Go” or “Register”. + +
+ +
+ +3. Create a new user account and assign their role as the Project Developer. + +
+ +
+ +
+ +
+ +4. Log in to the administrator account to review and approve the Project Developer account. + +
+ +5. The Project Developer can click 'Create Project' to submit the Project Submission Form. + +
+ +
+ +6. The Project Developer can also submit a Project Diagram. + +
+ +
+ +7. Return to the administrator account to review the Project Submission Form and the Project Diagram for completeness and approve both submissions. + +
+ +
+ +8. Now, we will create a new user to add a verifier account. + +
+ +
+ +
+ +
+ +9. Log in to the Administrator account to review and approve the Verifier account. + +
+ +10. The Verifier must complete a NOVA/COI form and submit it to the Administrator. + +
+ +11. Log in to the Administrator account and approve the NOVA/COI form. This policy also allows the Administrator to identify a conflict of interest (COI) as outlined in the workflow above. + +
+ +12. Once the NOVA/COI form has been approved with no COIs identified you can log in to the Project Developer account and assign a Verifier to the project. This will allow the verifier to see the project submission form. + +
+ +
+ +
+ +13. The Project Developer can submit all the forms outlined in the project documents tab, assigning the third-party verifier to each form. + +
+ +
+ +14. Using the assigned Verifier account, they can now review and approve all the project documents. Once approved they can complete and submit the Verification Report. + +
+ +
+ +
+ +15. The Administrator must review the report for completeness and choose to approve or reject. + +
+ +16. The final step before issuing credits would be to approve the Emission Reductions from the Administrators account. + +
+ +17. The project owner and administrator will have access to the Verifiable Presentation (VP) and Trust Chain. + +
+ +
+ +
diff --git a/docs/guardian/demo-guide/carbon-emissions/landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md b/docs/guardian/demo-guide/carbon-emissions/landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md new file mode 100644 index 0000000000..e92880430e --- /dev/null +++ b/docs/guardian/demo-guide/carbon-emissions/landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md @@ -0,0 +1,380 @@ +--- +icon: monument +--- + +# Landfill Gas Destruction and Beneficial Use Projects, Version 2.0 + +## Table of Contents + +[Introduction](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184819174) + +[Need and Use](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812673) + +[U.S. Landfills and Methane Collection Benefits](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812674) + +[Monitoring and Quantification Approach](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812675) + +[Project Eligibility and Additionality](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812676) + +[Demo Video](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812677) + +[Policy Workflow](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812678) + +[Policy Import](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812679) + +[Available Roles](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812680) + + [1. Project Proponent](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812681) + + [2. Verifier(s)](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812682) + + [3. Standard Registry](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812683) + +[Important Schemas](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812684) + +[Token (Emission Reduction Ton)](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812685) + +[Step By Step](landfill-gas-destruction-and-beneficial-use-projects-version-2.0.md#toc184812686) + +## Introduction + +This document outlines the Guardian policy created I accordance to the ACR Landfill Gas Methodology v2.0, titled “Methodology for the Quantification, Monitoring, Reporting, and Verification of Greenhouse Gas Emissions Reductions and Removals from Landfill Gas Destruction and Beneficial Use Projects.” Developed by the American Carbon Registry (ACR), this methodology offers a comprehensive framework for quantifying emissions reductions through the destruction or utilization of landfill gas (LFG). By converting methane, a potent greenhouse gas, into energy or other beneficial uses, this methodology provides a robust pathway for generating high-quality carbon offset credits. + +## Need and Use + +This methodology supports project developers aiming to reduce methane emissions from municipal solid waste landfills by capturing and converting LFG. It establishes clear protocols for baseline emissions, additionality, monitoring, and verification, ensuring accurate accounting and credit generation. It also provides flexibility for the inclusion of innovative technologies, such as automated gas collection systems, to enhance collection efficiency. + +The framework enables projects to: + +a. Quantify methane destruction and beneficial uses. + +b. Generate credible and tradable carbon offset credits. + +c. Encourage environmentally sustainable and economically viable landfill management practices. + +## U.S. Landfills and Methane Collection Benefits + +Landfills in the United States are a significant source of methane emissions, a potent greenhouse gas with a global warming potential 28 to 36 times greater than carbon dioxide over 100 years. According to the U.S. Environmental Protection Agency (EPA), municipal solid waste landfills are the third-largest source of human-related methane emissions in the country. Capturing and utilizing landfill gas (LFG), which consists primarily of methane and carbon dioxide, offers substantial environmental and economic benefits. Methane collection systems reduce greenhouse gas emissions, improve local air quality, and mitigate odor issues. Additionally, captured methane can be converted into renewable energy or processed for injection into natural gas pipelines, providing a sustainable energy source while reducing reliance on fossil fuels. These practices not only contribute to climate change mitigation but also support a circular economy by turning waste into valuable resources. + +## Monitoring and Quantification Approach + +Key components of the monitoring and quantification process include: + +1. **LFG Collection and Destruction:** Continuous monitoring of gas flow and methane content using calibrated devices. +2. **Baseline Emissions:** Determined using modeled or measured methane generation and collection efficiency data. +3. **Emission Reductions:** Quantified by subtracting project emissions (e.g., from fossil fuel combustion or electricity use) from baseline emissions. +4. **Leakage:** Leakage emissions are deemed negligible under this methodology. + +The methodology provides default factors and customizable parameters, ensuring flexibility while maintaining data accuracy and transparency. + +## Project Eligibility and Additionality + +Eligible projects under this methodology include: + +* Destruction of LFG using open or enclosed flares. +* Conversion of LFG to energy in turbines, boilers, or engines. +* Injection of processed LFG into natural gas pipelines. +* Use of automated gas collection systems to enhance collection efficiency. + +Additionality must be demonstrated using one of the following approaches: + +* A performance-based standard combined with a regulatory surplus test. +* ACR’s three-prong additionality test, addressing regulatory surplus, common practice, and financial barriers. + +## Demo Video + +[Youtube](https://www.youtube.com/watch?v=fDTobFguBJE\&list=PLnld0e1pwLho3M7uAzcbyzyJobn-X9wG_\&index=2) + +## Policy Workflow + +![](../../../.gitbook/assets/0.png) + +## Policy Import + +This policy is published to Hedera network and can either be imported via Github (.policy file) or IPSF timestamp. + +Policy: + +## Available Roles + +#### **1. Project Proponent** + +The Project Proponent is responsible for the overall management and execution of the project. Key responsibilities include: + +* Submitting project submission reports and documentation to the Standard Registry and assigning Verifiers. +* Ensuring compliance with relevant methodologies and standards. +* Coordinating with stakeholders to facilitate project activities and reporting. + +#### **2. Verifier(s)** + +Verifiers are independent entities tasked with assessing the accuracy and validity of the project’s emissions reductions claims. Their key responsibilities include: + +* Conducting thorough reviews of project documentation and emissions data. +* Performing on-site inspections and audits as necessary. +* Providing verification reports to the Project Proponent and Standard Registry. +* Ensuring adherence to the agreed-upon methodologies and standards. + +#### **3. Standard Registry** + +The Standard Registry serves as the authoritative body for maintaining project records. Responsibilities include: + +* Managing the registration and tracking of approved projects. +* Overseeing compliance with established protocols and procedures. + +## Important Schemas + +**Project Proponent:** The Project Proponent is the individual or organization responsible for initiating and managing the emission reduction project. Their profile includes company information, such as legal name, registration details, and project-specific contacts, as well as personal information of key personnel involved in the project. + +**Verifier:** The Verifier is an independent third-party entity tasked with assessing the emission reduction project’s claims. Their form collects detailed information about the verifying organization, including its credentials, contact details, and the qualifications of the personnel conducting the verification. + +**Project Listing Form:** The Project Listing Form is a formal document that Project Proponents complete to outline the details of their emission reduction project. It typically includes project objectives, baseline emissions, methodologies to be used, and information on stakeholder consultations, serving as a foundational tool for project approval and registration. + +**Project Plan:** The Project Plan schema outlines the foundational details of a project, including its scope, objectives, implementation strategy, and monitoring framework. It serves as a comprehensive blueprint for the quantification, monitoring, and reporting of greenhouse gas (GHG) emissions reductions. Key components include: + +* Project location and boundary. +* Description of technology and methodology used. +* Baseline emissions determination. +* Data monitoring, collection, and reporting procedures. + +**Project Specific Conflict of Interest:** The Conflict of Interest (COI) Form schema ensures transparency and impartiality in the project validation and verification processes. It captures declarations from relevant stakeholders, particularly validators and verifiers, to identify and mitigate any potential conflicts of interest. Key fields include: + +* Declaration of relationships with the project developer or related entities. +* Financial or professional interests in the project’s outcomes. +* Past involvement in the project’s development or consultation. + +**Validation Report:** The Project Validation Report provides a comprehensive assessment of the emission reduction project after a validation process. It details the findings of the verifier, including compliance with methodologies, the accuracy of reported emission reductions, and any identified discrepancies or recommendations for improvement. + +**Validation Opinion:** The Validation Opinion schema documents the independent evaluation of a project’s design, ensuring it adheres to the applicable methodology, standards, and guidelines. + +**Monitoring Report:** The Monitoring Report is a periodic document prepared by the Project Proponent that tracks the project’s performance and emission reductions over time. It includes data on actual emissions, project activities, and compliance with monitoring requirements, ensuring that stakeholders are informed about ongoing progress and results. + +**Environmental and Social Impact Assessment:** The Environmental and Social Impact Assessment schema provides a structured framework to evaluate the potential environmental and social implications of a project. It ensures that project activities are sustainable and do not cause undue harm to local ecosystems or communities. Key sections include: + +* **Environmental Impacts:** Assessment of potential effects on air quality, water resources, soil, biodiversity, and climate, with proposed mitigation measures for negative impacts. +* **Social Impacts:** Evaluation of the project’s influence on local communities, including health, safety, livelihoods, cultural heritage, and public engagement. +* **Regulatory Compliance:** Confirmation of adherence to local and international environmental and social regulations and standards. +* **Monitoring and Mitigation Plan:** Detailed strategies to mitigate identified risks and monitor ongoing impacts throughout the project lifecycle. + +**Emission Reductions:** The Emission Reductions schema captures all data necessary for calculating greenhouse gas (GHG) emission reductions in line with the outlined policy and methodology. It integrates seamlessly with the Guardian platform, where all calculations are automated based on the defined policy workflow. This schema ensures accuracy and transparency while minimizing manual effort. Key components include: + +* **Baseline Emissions Data:** + * Baseline emission factors. + * Activity data, such as energy usage, waste quantities, or fuel consumption. + * Assumptions and default values used in baseline scenarios. +* **Project Emissions Data:** + * Monitoring inputs for project-related emissions, including energy use, fuel consumption, and electricity usage. + * Parameters like methane content, gas flow rates, and collection system efficiency. + * Calibration details for monitoring equipment. +* **Emission Reduction Calculations:** + * Quantification details based on policy-defined equations. + * Automated integration with Guardian to process and validate all inputs (ensures that all inputs adhere to the specified data type requirements, such as numerical values, string values, enumerated values, and others). + +**Verification Report:** The Verification Report is a formal document summarizing the verification of the emission reductions claimed by the Project Proponent. It outlines the verification process, findings, conclusions, and recommendations, providing stakeholders with confidence in the integrity and accuracy of the reported emission reductions. + +**Verification Opinion:** The Verification Opinion schema provides a detailed account of the project’s performance during a specific reporting period. It assesses whether the claimed GHG emissions reductions or removals align with the project’s design and monitoring plan. + +## Token (Emission Reduction Ton) + +Emission Reduction Ton (ERT), which represents a verified reduction of one metric ton of carbon dioxide equivalent. + +## Step By Step + +1. Import the policy using IPFS or Policy File. Once imported, you will be redirected to the policy configurator. + +![](../../../.gitbook/assets/1.png) + +![](../../../.gitbook/assets/2.png) + +![](../../../.gitbook/assets/3.png) + +![](../../../.gitbook/assets/4.png) + +2. Set the policy to Dry Run or Publish it using the dropdown. Then select “Go” or “Register”. + +![](../../../.gitbook/assets/5.png) + +![](../../../.gitbook/assets/6.png) + +3. Create a new user account and assign it to the Project Proponent. Ensure that the Project Proponent registration form is complete, then select ‘Submit’. + +
+ +![](../../../.gitbook/assets/8.png) + +![](../../../.gitbook/assets/9.png) + +![](../../../.gitbook/assets/10.png) + +4. Log in to the administrator account to review and approve the Project Proponent registration form. The administrator will have access to the submitted registration forms for each user and can choose to approve or reject them. + +![](../../../.gitbook/assets/11.png) + +5. The Project Proponent can click 'Create' to submit the Project Listing Form. + +![](../../../.gitbook/assets/12.png) + +![](../../../.gitbook/assets/13.png) + +![](../../../.gitbook/assets/14.png) + +6. Log in to the administrator account to review and approve the Project Listing Form. + +
+ +7. Create a new user account and assign it to the Verifier. Ensure that the Verifier registration form is complete, then select ‘Submit’. + +![](../../../.gitbook/assets/16.png) + +![](../../../.gitbook/assets/17.png) + +![](../../../.gitbook/assets/18.png) + +8. Log in to the administrator account to review and approve the Verifier registration form. The administrator will have access to the submitted registration forms for each user and can choose to approve or reject them. + +![](../../../.gitbook/assets/19.png) + +9. Navigate back to the Verifier account and submit a Project Specific Conflict of Interest (COI) form. + +![](../../../.gitbook/assets/20.png) + +10. Log in to the administrator account to review and approve the COI form. + +
+ +11. Log in to the Project Proponent account and assign the Project to the approved Verifier. Once assigned, submit a Project Plan and assign the Project Plan to the Verifier. + +
+ +
+ +
+ +
+ +
+ +12. Log in as the Verifier to review the Project documents and the Project Plan. You will see no ‘Approve’ or ‘Reject’ buttons for the Project form as it is view only. + +
+ +
+ +13. The Administrator will now be able to approve or reject the Project Plan. + +
+ +14. The Verifier can now submit a Validation Report and the Validation Opinion. Make sure to assign the Project Proponent once each form is submitted. + +
+ +
+ +
+ +
+ +
+ +
+ +15. Return to the Project Proponent’s account to review the Validation Report and Opinion before approving it for review from the Administrator. + +
+ +
+ +16. Once the Validation Report and Opinion are approved by the Project Proponent, the Administrator will gain access to review and either approve or reject them. + +
+ +
+ +17. The Project Proponent can now submit the Emission Reductions Form, Monitoring Report, and Environmental and Social Assessment. Ensure that a Verifier is assigned for the verification process. + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +18. Once submitted and assigned, the Verifier can review each document, provide a Verification Report and Opinion, and assign them to the Project Proponent as view-only documents. + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +19. The Project Proponent can view these documents; however, they will be sent to the Administrator for final approval. + +
+ +
+ +20. The Administrator can review the Verification Report and approve or reject it. + +
+ +21. The Administrator can review the Verification Opinion. The actions available for this document differ from the previous ones, as it is the document we will mint credits against. You’ll see three buttons: Mint, Close, and Reject. The Mint button allows you to select the Vintage for which you would like to mint credits. The Close button should be used once all applicable Vintages have been used for minting credits. The Reject button can be used if the Verification Opinion is not acceptable. Below, we will display an example to showcase what happens when we select ‘Mint’ and define a Vintage (e.g., 2021). + +
+ +
+ +In the image displayed below, you can see that the VC (document) for the Verification Opinion shows how many Emission Reductions or Removals (ERRs) have been approved and verified for that specific vintage. + +
+ +
+ +
+ +
+ +The VC file for the Verification Opinion in the Trust Chain will display the selected vintage and the number of credits associated with that vintage. + +
+ +
+ +22. In this next example, we will mint again, but the Vintage will be 2022. You’ll be able to see a new Verifiable Presentation (VP) for this issuance and a new Trust Chain. + +
+ +
+ +
+ +
+ +
+ +23. The final step is to select Close once all the vintages have been used to mint credits. + +
+ +
diff --git a/docs/guardian/demo-guide/carbon-offsets/ams-i.e-switch-from-non-renewable-biomass-for-thermal-applications-by-the-user.md b/docs/guardian/demo-guide/carbon-offsets/ams-i.e-switch-from-non-renewable-biomass-for-thermal-applications-by-the-user.md index bdee2cc580..befc40aee1 100644 --- a/docs/guardian/demo-guide/carbon-offsets/ams-i.e-switch-from-non-renewable-biomass-for-thermal-applications-by-the-user.md +++ b/docs/guardian/demo-guide/carbon-offsets/ams-i.e-switch-from-non-renewable-biomass-for-thermal-applications-by-the-user.md @@ -159,17 +159,17 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2. \ -
+
12. Log in as the VVB and click the “Monitoring Reports” tab to review the document submitted by the Project Participant. After reviewing the monitoring report by selecting “View Document”, the VVB can select “Verify”.\ \ -
+
13. Log in as the SR to review the monitoring report by selecting the “View Document” button in the “Monitoring Reports” tab. The SR can approve the monitoring report by selecting “Approve”. This will also trigger the minting process. You can see the minting status under “Status” change from “Minting” to “Minted”.\ \ -
+
14. Once the minting process is completed, you can view the token amount by navigating to the “VPs” tab.\ diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas.md b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas.md index 702fffafe4..fd60956cbb 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas.md @@ -92,9 +92,9 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2.
-
+
-
+
diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources.md b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources.md index 84b9217268..d041b59401 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources.md @@ -98,9 +98,9 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2.
-
+
-
+
2. To start using the policy you first have to change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” button. diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation.md b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation.md index 99c1753b74..1fcc8b5b1e 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation.md @@ -72,9 +72,9 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2.
-
+
-
+
2. To start using the policy you first have to change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” button. diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants.md b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants.md index 47bbcd2579..10f31675fd 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants.md @@ -93,9 +93,9 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2.
-
+
-
+
2. Once the policy has successfully imported, you will be redirected to the policy configurator. The policy configurator can be used to edit the policy using the workflow blocks. There will also be a tab for the “Tools” used within this policy as illustrated in the image below. To start using the policy you must first change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” or “Go” button. This can be done through the policy configurator page or though the “Policies” page. diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user.md b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user.md index 65f0732542..9ef720b8cb 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user.md @@ -84,9 +84,9 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2.
-
+
-
+
diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies.md b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies.md index 12745f7e4a..08e236ecd7 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies.md @@ -92,9 +92,9 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2. 2. To start using the policy you first have to change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” button. -
+
-
+
3. Create a new user by clicking the “Create User” button and assign their role as Project Participant. diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems.md b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems.md index a59a19b7bb..69b5897141 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems.md @@ -75,9 +75,9 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2. 1. Log in as the Standard Registry and import the policy either by file or through IPFS timestamp by selecting the third button at the top right. -
+
-
+
diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.d.md b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.d.md index 7361a778d3..a137410cf4 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.d.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.d.md @@ -83,9 +83,9 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2. 1. Log in as the Standard Registry and import the policy either by file or through IPFS timestamp by selecting the third button at the top right. As the policy is importing you can see the schemas, tools, and tokens importing. -
+
-
+
diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting.md b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting.md index 463c4f396f..34ea55dea0 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting.md @@ -95,9 +95,9 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2.
-
+
-
+
2. To start using the policy you first have to change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” button. diff --git a/docs/guardian/demo-guide/carbon-offsets/dovu-methodologies.md b/docs/guardian/demo-guide/carbon-offsets/dovu-methodologies.md index 1eabfa430b..83abcf6207 100644 --- a/docs/guardian/demo-guide/carbon-offsets/dovu-methodologies.md +++ b/docs/guardian/demo-guide/carbon-offsets/dovu-methodologies.md @@ -62,7 +62,7 @@ For testing purpose, we will approve the farm project. 10. Once SR approves, we login back as Registrant and submit AgreCalc Document by filling out the form: -
+
For Cool Farm Tool methodology, you will see the below request form: diff --git a/docs/guardian/demo-guide/carbon-offsets/gccm001-v.4-methodology-for-renewable-energy-generation-projects-supplying-electricity-to-grid.md b/docs/guardian/demo-guide/carbon-offsets/gccm001-v.4-methodology-for-renewable-energy-generation-projects-supplying-electricity-to-grid.md index f99daeb8a1..abe5f20083 100644 --- a/docs/guardian/demo-guide/carbon-offsets/gccm001-v.4-methodology-for-renewable-energy-generation-projects-supplying-electricity-to-grid.md +++ b/docs/guardian/demo-guide/carbon-offsets/gccm001-v.4-methodology-for-renewable-energy-generation-projects-supplying-electricity-to-grid.md @@ -212,9 +212,9 @@ Approved Carbon Credit (ACC), each equivalent to one tonne of CO2. 10. Using the assigned Verifier account, they can now complete and submit the Project Verification Report. -
+
-
+
11. The administrator must review the report for completeness and choose to approve, reject, or forward with comments. These comments will be visible to the Steering Committee to assist in their decision-making. diff --git a/docs/guardian/demo-guide/carbon-offsets/improved-cookstove.md b/docs/guardian/demo-guide/carbon-offsets/improved-cookstove.md index 5830fda7f4..e5c87542b5 100644 --- a/docs/guardian/demo-guide/carbon-offsets/improved-cookstove.md +++ b/docs/guardian/demo-guide/carbon-offsets/improved-cookstove.md @@ -74,7 +74,7 @@ Now, the Project Developer must go into their screen and "Submit a PDD" and fill
-
+
Now, the Project Developer must go into their screen and "Submit a PDD" and fill out the Project Design Document form. diff --git a/docs/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling.md b/docs/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling.md index b4d6cb69ab..1db4e1c8d3 100644 --- a/docs/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling.md +++ b/docs/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling.md @@ -61,9 +61,9 @@ Waste Recycling Credit (WRC), each equivalent to (1) tonne of plastic that has b
-
+
-
+
2. Set the policy to Dry Run or Publish it using the dropdown. Then select “Register”. diff --git a/docs/guardian/demo-guide/carbon-offsets/verra-redd+-demo-guide.md b/docs/guardian/demo-guide/carbon-offsets/verra-redd+-demo-guide.md index 1f825f2b10..a0b917e0c1 100644 --- a/docs/guardian/demo-guide/carbon-offsets/verra-redd+-demo-guide.md +++ b/docs/guardian/demo-guide/carbon-offsets/verra-redd+-demo-guide.md @@ -27,7 +27,7 @@ REDD 2.2.2 = 1707207149.487956003 Verra REDD Policy 3 groups = 1707207286.119377003 ``` -
+
Once Policy is imported successfully, you get two options : Publish and Dry Run mode. diff --git a/docs/guardian/demo-guide/carbon-offsets/verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md b/docs/guardian/demo-guide/carbon-offsets/verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md index 57ddefa00d..214dceb667 100644 --- a/docs/guardian/demo-guide/carbon-offsets/verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md +++ b/docs/guardian/demo-guide/carbon-offsets/verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md @@ -140,12 +140,12 @@ Verified Carbon Unit (VCU) credits, each equivalent to one tonne of CO2. ![](<../../../.gitbook/assets/20 (4).png>) -
+
13. Once the report is submitted, we now log in as the VVB and validate the monitoring report by clicking on the “Verify” button.\ -
+
14. Once the monitoring report is validated, we log in as the SR and click on “Mint” to mint the tokens.\ diff --git a/docs/guardian/global-indexer/indexer-apis/retrieve-linked-documents-which-are-related-to-formula.md b/docs/guardian/global-indexer/indexer-apis/retrieve-linked-documents-which-are-related-to-formula.md new file mode 100644 index 0000000000..e6ee5f0650 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/retrieve-linked-documents-which-are-related-to-formula.md @@ -0,0 +1,5 @@ +# Retrieve linked documents which are related to formula + +{% swagger src="../../../.gitbook/assets/swagger-indexer (1) (2).yaml" path="/entities/formulas/{messageId}/relationships" method="get" %} +[swagger-indexer (1) (2).yaml](<../../../.gitbook/assets/swagger-indexer (1) (2).yaml>) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/retrieve-the-formula-by-message-id.md b/docs/guardian/global-indexer/indexer-apis/retrieve-the-formula-by-message-id.md new file mode 100644 index 0000000000..09b11fae93 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/retrieve-the-formula-by-message-id.md @@ -0,0 +1,5 @@ +# Retrieve the formula by message ID + +{% swagger src="../../../.gitbook/assets/swagger-indexer (1) (2).yaml" path="/entities/formulas/{messageId}" method="get" %} +[swagger-indexer (1) (2).yaml](<../../../.gitbook/assets/swagger-indexer (1) (2).yaml>) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/retrieve-the-list-of-formulas.md b/docs/guardian/global-indexer/indexer-apis/retrieve-the-list-of-formulas.md new file mode 100644 index 0000000000..009038f528 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/retrieve-the-list-of-formulas.md @@ -0,0 +1,5 @@ +# Retrieve the list of formulas + +{% swagger src="../../../.gitbook/assets/swagger-indexer (1) (2).yaml" path="/entities/formulas" method="get" %} +[swagger-indexer (1) (2).yaml](<../../../.gitbook/assets/swagger-indexer (1) (2).yaml>) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-user-guide.md b/docs/guardian/global-indexer/indexer-user-guide.md index ce573de0ab..80f96be9bf 100644 --- a/docs/guardian/global-indexer/indexer-user-guide.md +++ b/docs/guardian/global-indexer/indexer-user-guide.md @@ -148,7 +148,7 @@ VC details has the following tabs: * History - document history since it was created. * Relationships - document relationships with links to policy, roles, schemas, standard registry, other documents. -
+
* Raw Data - raw message data. @@ -182,7 +182,7 @@ Synchronization of all entity data starts one time per hour, but it can be chang For documents (VC, VP, DID, Schema) with local CIDs (i.e. Such documents were uploaded onto local IPFS nodes) Guardian attempts to automatically download the file when user attempts to open in in the Indexer UI. This may not be possible if the local node is ‘closed’ for outside requests. For such cases there is also an option for the user to manually attempt to download from the local IPFS node. This can be retried unlimited number of times, for situations when local node administrators open access to the node\[s] at a later date. -
+
{% hint style="info" %} **Note:** This functionality requires the correct setting for the IPFS\_GATEWAY configuration option in the `indexer-service .env` file: diff --git a/docs/guardian/readme/roadmap.md b/docs/guardian/readme/roadmap.md index 8121dafcad..73a48ac72a 100644 --- a/docs/guardian/readme/roadmap.md +++ b/docs/guardian/readme/roadmap.md @@ -976,7 +976,7 @@ Documentation Link: [https://docs.hedera.com/guardian/guardian/standard-registry Referral Link: [https://github.com/hashgraph/guardian/issues/2838](https://github.com/hashgraph/guardian/issues/2838) -Documentation Link: +Documentation Link: [https://docs.hedera.com/guardian-dev-1/guardian/standard-registry/policies/dry-run/demo-guide-on-dry-run-operations](https://docs.hedera.com/guardian-dev-1/guardian/standard-registry/policies/dry-run/demo-guide-on-dry-run-operations) ### Standardize UI on Angular Material, remove/replace PrimeNG diff --git a/docs/guardian/standard-registry/asynchronous-tasks-status.md b/docs/guardian/standard-registry/asynchronous-tasks-status.md index 3b21528cf5..7d87e6777f 100644 --- a/docs/guardian/standard-registry/asynchronous-tasks-status.md +++ b/docs/guardian/standard-registry/asynchronous-tasks-status.md @@ -2,7 +2,7 @@ Worker Tasks tab displays active user's jobs performed asynchronously by the ‘worker’. -
+
* Tasks can have the following status: * IN QUEUE - for task which are queued pending activation diff --git a/docs/guardian/standard-registry/bring-your-own-dids/bring-your-own-byo-dids-ui.md b/docs/guardian/standard-registry/bring-your-own-dids/bring-your-own-byo-dids-ui.md index 05c3350556..7cc3b0a38c 100644 --- a/docs/guardian/standard-registry/bring-your-own-dids/bring-your-own-byo-dids-ui.md +++ b/docs/guardian/standard-registry/bring-your-own-dids/bring-your-own-byo-dids-ui.md @@ -17,7 +17,7 @@ Enter Hedera network account with non-0 hbar balance to be used by the system fo #### 1.2.1 Default DID -
+
When the ‘Generate new DID document’ option is selected, clicking on the Next button would result in Guardian generating a new dedicated DID to be used exclusively in Guardian based on the Hedera account ID entered at the previous step. Such DID would have the following format: diff --git a/docs/guardian/standard-registry/policies/block-policy-discoverability/search-block-using-ui.md b/docs/guardian/standard-registry/policies/block-policy-discoverability/search-block-using-ui.md index 18613b2e89..b52c50907e 100644 --- a/docs/guardian/standard-registry/policies/block-policy-discoverability/search-block-using-ui.md +++ b/docs/guardian/standard-registry/policies/block-policy-discoverability/search-block-using-ui.md @@ -15,13 +15,13 @@ Blocks of similar configuration can be searched by clicking on search icon with Search result displays all the policies and its blocks, which have same flow with respect to the base block search. -
+
### 2.1 Context The search finds and displays the ranked list (most similar on top) of longest continuous matching sequences of blocks surrounding the target block (highlighted). The search considers all dimensions - next/previous, parent/child - to be of equal weight and thus ranks results by the number of blocks in the found ‘similar’ sequence. -
+
Additionally, the system compares the configuration of the blocks individually, and displays the %% of similarity to the right of each block in comparison with the corresponding blocks in the base policy. diff --git a/docs/guardian/standard-registry/policies/block-policy-discoverability/search-policy-using-ui.md b/docs/guardian/standard-registry/policies/block-policy-discoverability/search-policy-using-ui.md index 7f60e6090d..b0e3d9444b 100644 --- a/docs/guardian/standard-registry/policies/block-policy-discoverability/search-policy-using-ui.md +++ b/docs/guardian/standard-registry/policies/block-policy-discoverability/search-policy-using-ui.md @@ -11,11 +11,11 @@ Policies can be searched by clicking on "Search policies" button. It can be sear The results are displayed in the descending order, the most similar policy is displayed at the top. It also displays similarity rate percentage. -
+
We can also have an option for full display mode of similarity result as shown: -
+
## 2. Demo Video diff --git a/docs/guardian/standard-registry/policies/dry-run/demo-guide-on-dry-run-operations.md b/docs/guardian/standard-registry/policies/dry-run/demo-guide-on-dry-run-operations.md index 675be7f4fb..a3fc38b3d9 100644 --- a/docs/guardian/standard-registry/policies/dry-run/demo-guide-on-dry-run-operations.md +++ b/docs/guardian/standard-registry/policies/dry-run/demo-guide-on-dry-run-operations.md @@ -219,6 +219,14 @@ GET: /api/v1/policies/{policyId}/dry-run/ipfs?pageIndex=0&pageSize=100 To get complete information on above API, please check : [#returns-lists-of-ipfs-files.](dry-run-mode-using-apis/returns-list-of-ipfs-files.md#returns-lists-of-ipfs-files. "mention") +#### 4.9 Savepoint + +Savepoint will allow to mark any of the action in the dry run as savepoint, which can restored from that point. This feature is similar to adding checkpoints in the execution workflow. + +
+ +
+ ## 2. Demo Video [Youtube](https://www.youtube.com/watch?v=fLoQcCOBgfU\&t=115s) diff --git a/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/create-savepoint.md b/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/create-savepoint.md new file mode 100644 index 0000000000..6bcb9c63c6 --- /dev/null +++ b/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/create-savepoint.md @@ -0,0 +1,7 @@ +# Create Savepoint + + + +{% swagger src="../../../../../.gitbook/assets/swagger (2).yaml" path="/policies/{policyId}/savepoint/create" method="post" %} +[swagger (2).yaml](<../../../../../.gitbook/assets/swagger (2).yaml>) +{% endswagger %} diff --git a/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/deletes-savepoint.md b/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/deletes-savepoint.md new file mode 100644 index 0000000000..5a88618825 --- /dev/null +++ b/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/deletes-savepoint.md @@ -0,0 +1,5 @@ +# Deletes SavePoint + +{% swagger src="../../../../../.gitbook/assets/swagger (2).yaml" path="/policies/{policyId}/savepoint/delete" method="post" %} +[swagger (2).yaml](<../../../../../.gitbook/assets/swagger (2).yaml>) +{% endswagger %} diff --git a/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/restoring-savepoint.md b/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/restoring-savepoint.md new file mode 100644 index 0000000000..546415d314 --- /dev/null +++ b/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/restoring-savepoint.md @@ -0,0 +1,7 @@ +# Restoring SavePoint + + + +{% swagger src="../../../../../.gitbook/assets/swagger (2).yaml" path="/policies/{policyId}/savepoint/restore" method="post" %} +[swagger (2).yaml](<../../../../../.gitbook/assets/swagger (2).yaml>) +{% endswagger %} diff --git a/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/returns-savepoint-state.md b/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/returns-savepoint-state.md new file mode 100644 index 0000000000..b32dab1e1c --- /dev/null +++ b/docs/guardian/standard-registry/policies/dry-run/dry-run-mode-using-apis/returns-savepoint-state.md @@ -0,0 +1,7 @@ +# Returns Savepoint State + + + +{% swagger src="../../../../../.gitbook/assets/swagger (2).yaml" path="/policies/{policyId}/savepoint/restore" method="get" %} +[swagger (2).yaml](<../../../../../.gitbook/assets/swagger (2).yaml>) +{% endswagger %} diff --git a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/request-block-data.md b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/request-block-data.md index db641a6188..c191e3c04c 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/request-block-data.md +++ b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/request-block-data.md @@ -1,5 +1,5 @@ # Request Block Data -{% swagger src="../../../../../.gitbook/assets/swagger (2).yaml" path="/policies/{policyId}/blocks/{uuid}" method="get" %} -[swagger (2).yaml](<../../../../../.gitbook/assets/swagger (2).yaml>) +{% swagger src="../../../../../.gitbook/assets/swagger (2) (1).yaml" path="/policies/{policyId}/blocks/{uuid}" method="get" %} +[swagger (2) (1).yaml](<../../../../../.gitbook/assets/swagger (2) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/retrieval-of-data-from-root-policy-block.md b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/retrieval-of-data-from-root-policy-block.md index 28c1177eef..792cbcdf0e 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/retrieval-of-data-from-root-policy-block.md +++ b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/retrieval-of-data-from-root-policy-block.md @@ -1,5 +1,5 @@ # Retrieval of Data for Root Policy Block -{% swagger src="../../../../../.gitbook/assets/swagger (2).yaml" path="/policies/{policyId}/blocks" method="get" %} -[swagger (2).yaml](<../../../../../.gitbook/assets/swagger (2).yaml>) +{% swagger src="../../../../../.gitbook/assets/swagger (2) (1).yaml" path="/policies/{policyId}/blocks" method="get" %} +[swagger (2) (1).yaml](<../../../../../.gitbook/assets/swagger (2) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/retrieves-block-data-by-tag.md b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/retrieves-block-data-by-tag.md index 63351ae711..a2910c5056 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/retrieves-block-data-by-tag.md +++ b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/retrieves-block-data-by-tag.md @@ -1,5 +1,5 @@ # Retrieves Block Data by Tag -{% swagger src="../../../../../.gitbook/assets/swagger (2).yaml" path="/policies/{policyId}/tag/{tagName}/blocks" method="get" %} -[swagger (2).yaml](<../../../../../.gitbook/assets/swagger (2).yaml>) +{% swagger src="../../../../../.gitbook/assets/swagger (2) (1).yaml" path="/policies/{policyId}/tag/{tagName}/blocks" method="get" %} +[swagger (2) (1).yaml](<../../../../../.gitbook/assets/swagger (2) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/sends-data-to-specified-block-by-tag.md b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/sends-data-to-specified-block-by-tag.md index aaf94b554c..9cab044acd 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/sends-data-to-specified-block-by-tag.md +++ b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/sends-data-to-specified-block-by-tag.md @@ -1,5 +1,5 @@ # Sends Data to specified Block by Tag -{% swagger src="../../../../../.gitbook/assets/swagger (2).yaml" path="/policies/{policyId}/tag/{tagName}/blocks" method="post" %} -[swagger (2).yaml](<../../../../../.gitbook/assets/swagger (2).yaml>) +{% swagger src="../../../../../.gitbook/assets/swagger (2) (1).yaml" path="/policies/{policyId}/tag/{tagName}/blocks" method="post" %} +[swagger (2) (1).yaml](<../../../../../.gitbook/assets/swagger (2) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/sends-data-to-specified-block.md b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/sends-data-to-specified-block.md index b55a0f4bca..924836a3f6 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/sends-data-to-specified-block.md +++ b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/sends-data-to-specified-block.md @@ -1,5 +1,5 @@ # Sends Data to Specified Block -{% swagger src="../../../../../.gitbook/assets/swagger (2).yaml" path="/policies/{policyId}/blocks/{uuid}" method="post" %} -[swagger (2).yaml](<../../../../../.gitbook/assets/swagger (2).yaml>) +{% swagger src="../../../../../.gitbook/assets/swagger (2) (1).yaml" path="/policies/{policyId}/blocks/{uuid}" method="post" %} +[swagger (2) (1).yaml](<../../../../../.gitbook/assets/swagger (2) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/policies/policy-creation/introduction/multisignblock.md b/docs/guardian/standard-registry/policies/policy-creation/introduction/multisignblock.md index 186ef4cda1..39f7a9aad8 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/introduction/multisignblock.md +++ b/docs/guardian/standard-registry/policies/policy-creation/introduction/multisignblock.md @@ -108,7 +108,7 @@ To get detailed information on Signature status, we have an info icon near the t To get the final Signature Result with detailed information such as which users have Signed / Declined, we need to hover on the Status as shown below: -
+
### API Parameters diff --git a/docs/guardian/standard-registry/policies/policy-creation/introduction/reportblock-and-reportitemblock.md b/docs/guardian/standard-registry/policies/policy-creation/introduction/reportblock-and-reportitemblock.md index 28281c5b94..cfb4fd9faa 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/introduction/reportblock-and-reportitemblock.md +++ b/docs/guardian/standard-registry/policies/policy-creation/introduction/reportblock-and-reportitemblock.md @@ -19,7 +19,7 @@ We have added new Impacts Section to display Primary/Secondary Impacts token det In the case when multiple linked mint blocks are used then the system displays all linked VPs as shown below: -
+
#### 2.1 Data Format: diff --git a/docs/guardian/standard-registry/policies/policy-labels/policy-labels-ui.md b/docs/guardian/standard-registry/policies/policy-labels/policy-labels-ui.md index 5b70cfd9fc..1759452256 100644 --- a/docs/guardian/standard-registry/policies/policy-labels/policy-labels-ui.md +++ b/docs/guardian/standard-registry/policies/policy-labels/policy-labels-ui.md @@ -138,7 +138,7 @@ Existing labels can be used as components of other (higher order) labels. The in It is recommended to frequently use ‘Save’ button to preserve the current state of the Label being edited. -
+
**2.3.5 Preview** diff --git a/docs/guardian/standard-registry/project-comparison/project-comparison-apis/comparing-vp-documents-v1.md b/docs/guardian/standard-registry/project-comparison/project-comparison-apis/comparing-vp-documents-v1.md index 1c1ca8f752..5917bcf731 100644 --- a/docs/guardian/standard-registry/project-comparison/project-comparison-apis/comparing-vp-documents-v1.md +++ b/docs/guardian/standard-registry/project-comparison/project-comparison-apis/comparing-vp-documents-v1.md @@ -1,5 +1,5 @@ # Comparing VP Documents - V1 -{% swagger src="../../../../.gitbook/assets/swagger (2) (1).yaml" path="/projects/compare/documents" method="post" %} -[swagger (2) (1).yaml](<../../../../.gitbook/assets/swagger (2) (1).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (2) (1) (1).yaml" path="/projects/compare/documents" method="post" %} +[swagger (2) (1) (1).yaml](<../../../../.gitbook/assets/swagger (2) (1) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/project-comparison/project-comparison-apis/retrieves-all-properties.md b/docs/guardian/standard-registry/project-comparison/project-comparison-apis/retrieves-all-properties.md index 16c2be1a7b..bde205327c 100644 --- a/docs/guardian/standard-registry/project-comparison/project-comparison-apis/retrieves-all-properties.md +++ b/docs/guardian/standard-registry/project-comparison/project-comparison-apis/retrieves-all-properties.md @@ -2,6 +2,6 @@ ## Get all properties -{% swagger src="../../../../.gitbook/assets/swagger (2) (1).yaml" path="/projects/properties" method="get" %} -[swagger (2) (1).yaml](<../../../../.gitbook/assets/swagger (2) (1).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (2) (1) (1).yaml" path="/projects/properties" method="get" %} +[swagger (2) (1) (1).yaml](<../../../../.gitbook/assets/swagger (2) (1) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/project-comparison/project-comparison-using-ui.md b/docs/guardian/standard-registry/project-comparison/project-comparison-using-ui.md index 29568ffed9..fa9b30692b 100644 --- a/docs/guardian/standard-registry/project-comparison/project-comparison-using-ui.md +++ b/docs/guardian/standard-registry/project-comparison/project-comparison-using-ui.md @@ -9,7 +9,7 @@ Project Schemas are predefined templates used to create VC documents. These schemas are selected for a specific policy and serve as the structural basis for generating project data. -
+
In the current schema setup, specific ‘property fields’ are explicitly designated for the comparison process. These fields play a crucial role in evaluating and contrasting different projects. diff --git a/docs/guardian/standard-registry/schemas/creating-system-schema-using-ui.md b/docs/guardian/standard-registry/schemas/creating-system-schema-using-ui.md index f5312bcbce..a95ed939c6 100644 --- a/docs/guardian/standard-registry/schemas/creating-system-schema-using-ui.md +++ b/docs/guardian/standard-registry/schemas/creating-system-schema-using-ui.md @@ -6,7 +6,7 @@ To create a new Schemas, click on the **New** button at the top right corner. After clicking on the New button, you will be asked to enter Schema details such as Schema Name, Policy Dropdown, Entity : VC/MRV/NONE, Schema Description and any other required fields. -![](<../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>) +![](<../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>) In addition to the basic Schema details we also have an option to add Field and Condition to each field. diff --git a/docs/guardian/standard-registry/schemas/example-data/adding-example-data-using-ui.md b/docs/guardian/standard-registry/schemas/example-data/adding-example-data-using-ui.md index 632f18167d..69ed2b11ef 100644 --- a/docs/guardian/standard-registry/schemas/example-data/adding-example-data-using-ui.md +++ b/docs/guardian/standard-registry/schemas/example-data/adding-example-data-using-ui.md @@ -12,8 +12,8 @@ Once you click on the above button, you will be able to fill all schema fields w
-
+
In Dry Run mode it is possible to quickly fill in the fields using the provided example values from the schema. This feature is most useful for testing/demonstrations or for experimenting and learning Guardian capabilities. -
+
diff --git a/docs/guardian/standard-registry/schemas/schema-tree/schema-tree-ui.md b/docs/guardian/standard-registry/schemas/schema-tree/schema-tree-ui.md index d480462008..7601635129 100644 --- a/docs/guardian/standard-registry/schemas/schema-tree/schema-tree-ui.md +++ b/docs/guardian/standard-registry/schemas/schema-tree/schema-tree-ui.md @@ -12,7 +12,7 @@ We can move the image by holding and moving the mouse. Each schema and its child schemas are represented by same color in parent to child fashion. -
+
## 2. Downloading Tree diff --git a/docs/guardian/tokens/retirement-contract/creating-contract-using-ui.md b/docs/guardian/tokens/retirement-contract/creating-contract-using-ui.md index 647da16e0f..b89d3e3937 100644 --- a/docs/guardian/tokens/retirement-contract/creating-contract-using-ui.md +++ b/docs/guardian/tokens/retirement-contract/creating-contract-using-ui.md @@ -2,11 +2,11 @@ 1. Guardian instance out of the box contains implementations for ‘Wiping’ and ‘Retirement’ contracts which can be deployed/enabled from the UI. -
+
2. Each SR has its own contract permissions. Since contracts are deployed on Hedera and their methods can be called independently via 3rd party systems but the status of these contracts can change without Guardian’s knowledge. SRs can action a ‘refresh’ of their permissions by clicking on the refresh sign (chargeable Hedera operation, costs < 1 hbar) -
+
### **Contract Roles:** @@ -35,11 +35,11 @@ Also you can check “without approval” to set retirement tokens as immediate operation (without approval).\ -
+
6\) _SRs_ can check/delete/refresh pools (Pools operation in retirement contract). Not enabled means that the retirement contract has no wiper permissions in the appropriate wipe contract. It will be changed to enabled automatically when _the SR_ approves a request for a wiper role from this retirement contract. If the wipe contract is not in Guardian a manual refresh is required to update the instance permissions status. -
+
7\) _SRs_ can check/approve/reject/ban requests for the wiper role in the wipe contract (Requests operation in wipe contract). @@ -47,7 +47,7 @@ Also you can check “without approval” to set retirement tokens as immediate Now, we should be able to configure Hedera and Token Identifier during creation oof Wipe requests. -
+
8\) To execute the retirement Guardian users which hold USER role navigate to the ‘Retire’ tab and click on ‘Retire’ button, choose appropriate pool and set token count/serials diff --git a/docs/guardian/tokens/retirement-contract/trustchain-representation-of-token-retirement.md b/docs/guardian/tokens/retirement-contract/trustchain-representation-of-token-retirement.md index debd3b70ad..c938b21ca7 100644 --- a/docs/guardian/tokens/retirement-contract/trustchain-representation-of-token-retirement.md +++ b/docs/guardian/tokens/retirement-contract/trustchain-representation-of-token-retirement.md @@ -2,14 +2,14 @@ Guardian TrustChain represents token retirement operations as special card groups which are positioned following the ‘Token Minted’ card in the trust chain sequence. Each such group consists of a main card and several instance cards connected to it. Main card displays information about the token, the retirement contract used in the retirement operation, and the number of instances retired. Instance cards contain information about the “Instance ID” of the retired instances, retirement transaction IDs, user IDs which retired the tokens, and provide access to the retirement confirmation VC files. -
+
The alternative trustchain view presents the retirement operation as an ordered (by time) sequence of cards featuring the corresponding Contract and User details. -
+
Guardian needs access to an Indexer instance for information to put on the cards. When Indexer is not available the information scope is reduced. In such cases Guardian trustchain may also lack information about retirements performed by 3rd party applications directly (without Guardian involvement). -
+
Guardian displays “No data from the indexer. Connect it and click Refresh for full details.” warning when Indexer access is not configured. diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 0f248e55a6..ebb29ac8dd 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -34,6 +34,7 @@ "js-yaml": "^4.1.0", "leader-line": "^1.0.7", "mathjs": "^13.1.1", + "mathlive": "^0.103.0", "moment": "^2.29.2", "moment-timezone": "^0.5.43", "ngx-colors": "3.1.4", @@ -83,7 +84,7 @@ "devDependencies": { "@types/gulp": "^4", "@types/gulp-rename": "^2", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "mocha-junit-reporter": "^2.0.2", "tslint": "^6.1.3", "typescript": "^4.5.5" @@ -3456,6 +3457,20 @@ "node": ">=0.1.90" } }, + "node_modules/@cortex-js/compute-engine": { + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@cortex-js/compute-engine/-/compute-engine-0.24.1.tgz", + "integrity": "sha512-B9pLaZFC1vBrL64yR2LQWy2sj1E/+wtwIVokPuPqX8YWXwj9W2AMVyS9pSMN8gEdjpAC50nSmtL6110Rgi7dKA==", + "license": "MIT", + "dependencies": { + "complex.js": "^2.1.1", + "decimal.js": "^10.4.3" + }, + "engines": { + "node": ">=16.14.2", + "npm": ">=8.5.0" + } + }, "node_modules/@ctrl/ngx-codemirror": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/@ctrl/ngx-codemirror/-/ngx-codemirror-5.1.1.tgz", @@ -10228,6 +10243,23 @@ "node": ">=6.9.0" } }, + "node_modules/mathlive": { + "version": "0.103.0", + "resolved": "https://registry.npmjs.org/mathlive/-/mathlive-0.103.0.tgz", + "integrity": "sha512-gNJDMUOz0WePyDpLO/w1sGkrz0JrMwrT1QoFdGloVjjerWlUeKWn1JGM6XlO5SQ1AqXWemRKvlyVXft+QsxX8w==", + "license": "MIT", + "dependencies": { + "@cortex-js/compute-engine": "0.24.1" + }, + "engines": { + "node": ">=16.14.2", + "npm": ">=8.5.0" + }, + "funding": { + "type": "individual", + "url": "https://paypal.me/arnogourdol" + } + }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", diff --git a/frontend/package.json b/frontend/package.json index 8afa39f1fe..d50585fbeb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,6 +26,7 @@ "js-yaml": "^4.1.0", "leader-line": "^1.0.7", "mathjs": "^13.1.1", + "mathlive": "^0.103.0", "moment": "^2.29.2", "moment-timezone": "^0.5.43", "ngx-colors": "3.1.4", @@ -74,5 +75,5 @@ "test": "ng test", "watch": "ng build --watch --configuration development --output-path ../www-data" }, - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index 8ec1f0ac2f..a451508075 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -57,6 +57,9 @@ import { SchemaRulesComponent } from './modules/statistics/schema-rules/schema-r import { PolicyLabelDocumentConfigurationComponent } from './modules/statistics/policy-labels/policy-label-document-configuration/policy-label-document-configuration.component'; import { PolicyLabelDocumentsComponent } from './modules/statistics/policy-labels/policy-label-documents/policy-label-documents.component'; import { PolicyLabelDocumentViewComponent } from './modules/statistics/policy-labels/policy-label-document-view/policy-label-document-view.component'; +import { FormulasComponent } from './modules/formulas/formulas/formulas.component'; +import { FormulaConfigurationComponent } from './modules/formulas/formula-configuration/formula-configuration.component'; + @Injectable({ providedIn: 'root' @@ -573,7 +576,6 @@ const routes: Routes = [ ] } }, - { path: 'schema-rules', component: SchemaRulesComponent, @@ -602,9 +604,6 @@ const routes: Routes = [ ] } }, - - - { path: 'policy-labels', component: PolicyLabelsComponent, @@ -675,9 +674,34 @@ const routes: Routes = [ ] } }, - - - + { + path: 'formulas', + component: FormulasComponent, + canActivate: [PermissionsGuard], + data: { + roles: [ + UserRole.STANDARD_REGISTRY, + UserRole.USER + ], + permissions: [ + Permissions.FORMULAS_FORMULA_READ + ] + } + }, + { + path: 'formulas/:formulaId', + component: FormulaConfigurationComponent, + canActivate: [PermissionsGuard], + data: { + roles: [ + UserRole.STANDARD_REGISTRY, + UserRole.USER + ], + permissions: [ + Permissions.FORMULAS_FORMULA_READ + ] + } + }, { path: '', component: HomeComponent }, { path: 'info', component: InfoComponent }, diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index 1a0797c106..14f205dea9 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -58,6 +58,7 @@ export class AppComponent implements OnInit { const progressFooter = document.getElementById('block-progress-footer'); switch (type) { case 'COLLAPSE': { + document.body.style.setProperty('--header-width', 'var(--header-width-collapse)'); document.getElementById('main-content')!.style.left = 'var(--header-width-collapse)'; document.getElementById('main-content')!.setAttribute('main-collapse-menu', 'true'); if (progressFooter) { @@ -72,6 +73,7 @@ export class AppComponent implements OnInit { break; } case 'EXPAND': { + document.body.style.setProperty('--header-width', 'var(--header-width-expand)'); document.getElementById('main-content')!.style.left = 'var(--header-width-expand)'; document.getElementById('main-content')!.setAttribute('main-collapse-menu', 'false'); if (progressFooter) { diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index b842a86463..831a0a91a7 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -38,6 +38,7 @@ import { PermissionsService } from './services/permissions.service'; import { WorkerTasksService } from './services/worker-tasks.service'; import { SchemaRulesService } from './services/schema-rules.service'; import { PolicyLabelsService } from './services/policy-labels.service'; +import { FormulasService } from './services/formulas.service'; //Views import { UserProfileComponent } from './views/user-profile/user-profile.component'; import { LoginComponent } from './views/login/login.component'; @@ -76,6 +77,7 @@ import { SchemaEngineModule } from './modules/schema-engine/schema-engine.module import { ThemeService } from './services/theme.service'; import { RecordService } from './services/record.service'; import { StatisticsModule } from './modules/statistics/statistics.module'; +import { FormulasModule } from './modules/formulas/formulas.module'; // Injectors import { GET_SCHEMA_NAME } from './injectors/get-schema-name.injector'; import { BLOCK_TYPE_TIPS, BLOCK_TYPE_TIPS_VALUE, } from './injectors/block-type-tips.injector'; @@ -187,6 +189,7 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen SchemaEngineModule, PolicyEngineModule, StatisticsModule, + FormulasModule, TagEngineModule, CompareModule, ToastrModule.forRoot(), @@ -250,6 +253,7 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen RecordService, CompareStorage, ProjectComparisonService, + FormulasService, PermissionsService, PermissionsGuard, { diff --git a/frontend/src/app/modules/common/checkbox-button/checkbox-button.component.html b/frontend/src/app/modules/common/checkbox-button/checkbox-button.component.html new file mode 100644 index 0000000000..6c9c7ce6ab --- /dev/null +++ b/frontend/src/app/modules/common/checkbox-button/checkbox-button.component.html @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/frontend/src/app/modules/common/checkbox-button/checkbox-button.component.scss b/frontend/src/app/modules/common/checkbox-button/checkbox-button.component.scss new file mode 100644 index 0000000000..a1ba4914f7 --- /dev/null +++ b/frontend/src/app/modules/common/checkbox-button/checkbox-button.component.scss @@ -0,0 +1,53 @@ +:host { + --checkbox-button-on-first-color: #4169E2; + --checkbox-button-on-second-color: #e1e7fa; + --checkbox-button-off-first-color: #848FA9; + --checkbox-button-off-second-color: #ffffff; + display: inline-flex; +} + +.guardian-button { + width: 100%; + min-height: 28px; + padding: 1px 12px 1px 8px; + + &[select="false"] { + color: var(--checkbox-button-off-first-color); + background-color: var(--checkbox-button-off-second-color); + border: 1px solid var(--checkbox-button-off-first-color); + + .guardian-button-icon { + width: 0px !important; + height: auto !important; + position: relative; + + svg { + display: none; + } + } + } + + &[select="true"] { + color: var(--checkbox-button-on-first-color); + background-color: var(--checkbox-button-on-second-color); + border: 1px solid var(--checkbox-button-on-first-color); + + .guardian-button-icon { + width: 24px !important; + height: auto !important; + position: relative; + + svg { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + fill: var(--checkbox-button-on-first-color); + } + } + } + + .guardian-button-label { + padding-left: 4px; + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/common/checkbox-button/checkbox-button.component.ts b/frontend/src/app/modules/common/checkbox-button/checkbox-button.component.ts new file mode 100644 index 0000000000..963b140f9d --- /dev/null +++ b/frontend/src/app/modules/common/checkbox-button/checkbox-button.component.ts @@ -0,0 +1,28 @@ +import { Component, EventEmitter, Input, Output } from '@angular/core'; + +/** + * Checkbox button. + */ +@Component({ + selector: 'checkbox-button', + templateUrl: './checkbox-button.component.html', + styleUrls: ['./checkbox-button.component.scss'] +}) +export class CheckboxButton { + @Input('value') value!: boolean; + @Output('valueChange') valueChange = new EventEmitter(); + @Output('change') change = new EventEmitter(); + + constructor() { + } + + ngOnInit(): void { + this.value = !!this.value; + } + + public onChange() { + this.value = !this.value; + this.valueChange.emit(this.value); + this.change.emit(this.value); + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/common/common-components.module.ts b/frontend/src/app/modules/common/common-components.module.ts index 87af9348d8..bf104c67bb 100644 --- a/frontend/src/app/modules/common/common-components.module.ts +++ b/frontend/src/app/modules/common/common-components.module.ts @@ -1,44 +1,48 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; -import {MaterialModule} from './material.module'; -import {DatetimePicker} from './datetime-picker/datetime-picker.component'; -import {HederaExplorer} from './hedera-explorer/hedera-explorer.component'; -import {SelectMenuButton} from './select-menu/select-menu.component'; -import {AsyncProgressComponent} from './async-progress/async-progress.component'; -import {SwitchButton} from './switch-button/switch-button.component'; -import {ConfirmationDialogComponent} from './confirmation-dialog/confirmation-dialog.component'; -import {FileDragNDropComponent} from './file-drag-n-drop/file-drag-n-drop.component'; -import {IconPreviewDialog} from './icon-preview-dialog/icon-preview-dialog.component'; -import {TokenConfigurationComponent} from './token-configuration/token-configuration.component'; -import {NgxFileDropModule} from 'ngx-file-drop'; -import {FileExplorer} from './file-explorer/file-explorer.component'; -import {NgxColorsModule} from 'ngx-colors'; -import {ConfirmDialog} from './confirm-dialog/confirm-dialog.component'; -import {SelectorDialogComponent} from './selector-dialog/selector-dialog.component'; -import {StepTreeComponent} from './step-tree/step-tree.component'; -import {SeparateStepperComponent} from './separate-stepper/separate-stepper.component'; -import {NgxMaskDirective, provideNgxMask} from 'ngx-mask'; -import {NewVersionsComponent} from './new-versions/new-versions.component'; -import {DataInputDialogComponent} from './data-input-dialog/data-input-dialog.component'; -import {CompareBtnComponent} from './compare-btn/compare-btn.component'; -import {CompareViewerComponent} from './compare-viewer/compare-viewer.component'; -import {AlertComponent} from './alert/alert.component'; -import {DialogModule} from 'primeng/dialog'; -import {InputTextModule} from 'primeng/inputtext'; -import {DropdownModule} from 'primeng/dropdown'; -import {ProgressBarModule} from 'primeng/progressbar'; -import {ButtonModule} from 'primeng/button'; -import {PaginatorComponent} from './paginator/paginator.component'; -import {AngularSvgIconModule} from 'angular-svg-icon'; -import {StatusDropdown} from './status-dropdown/status-dropdown.component'; -import {CustomCustomDialogComponent} from './custom-confirm-dialog/custom-confirm-dialog.component'; -import {TreeGraphComponent} from './tree-graph/tree-graph.component'; -import {GuardianSwitchButton} from './guardian-switch-button/guardian-switch-button.component'; -import {ImportEntityDialog} from './import-entity-dialog/import-entity-dialog.component'; -import {DialogService, DynamicDialogModule} from 'primeng/dynamicdialog'; -import {TabViewModule} from 'primeng/tabview'; -import {TooltipModule} from 'primeng/tooltip'; +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { MaterialModule } from './material.module'; +import { DatetimePicker } from './datetime-picker/datetime-picker.component'; +import { HederaExplorer } from './hedera-explorer/hedera-explorer.component'; +import { SelectMenuButton } from './select-menu/select-menu.component'; +import { AsyncProgressComponent } from './async-progress/async-progress.component'; +import { SwitchButton } from './switch-button/switch-button.component'; +import { ConfirmationDialogComponent } from './confirmation-dialog/confirmation-dialog.component'; +import { FileDragNDropComponent } from './file-drag-n-drop/file-drag-n-drop.component'; +import { IconPreviewDialog } from './icon-preview-dialog/icon-preview-dialog.component'; +import { TokenConfigurationComponent } from './token-configuration/token-configuration.component'; +import { NgxFileDropModule } from 'ngx-file-drop'; +import { FileExplorer } from './file-explorer/file-explorer.component'; +import { NgxColorsModule } from 'ngx-colors'; +import { ConfirmDialog } from './confirm-dialog/confirm-dialog.component'; +import { SelectorDialogComponent } from './selector-dialog/selector-dialog.component'; +import { StepTreeComponent } from './step-tree/step-tree.component'; +import { SeparateStepperComponent } from './separate-stepper/separate-stepper.component'; +import { NgxMaskDirective, provideNgxMask } from 'ngx-mask'; +import { NewVersionsComponent } from './new-versions/new-versions.component'; +import { DataInputDialogComponent } from './data-input-dialog/data-input-dialog.component'; +import { CompareBtnComponent } from './compare-btn/compare-btn.component'; +import { CompareViewerComponent } from './compare-viewer/compare-viewer.component'; +import { AlertComponent } from './alert/alert.component'; +import { DialogModule } from 'primeng/dialog'; +import { InputTextModule } from 'primeng/inputtext'; +import { DropdownModule } from 'primeng/dropdown'; +import { ProgressBarModule } from 'primeng/progressbar'; +import { ButtonModule } from 'primeng/button'; +import { PaginatorComponent } from './paginator/paginator.component'; +import { AngularSvgIconModule } from 'angular-svg-icon'; +import { StatusDropdown } from './status-dropdown/status-dropdown.component'; +import { CustomConfirmDialogComponent } from './custom-confirm-dialog/custom-confirm-dialog.component'; +import { TreeGraphComponent } from './tree-graph/tree-graph.component'; +import { GuardianSwitchButton } from './guardian-switch-button/guardian-switch-button.component'; +import { ImportEntityDialog } from './import-entity-dialog/import-entity-dialog.component'; +import { DialogService, DynamicDialogModule } from 'primeng/dynamicdialog'; +import { TabViewModule } from 'primeng/tabview'; +import { TooltipModule } from 'primeng/tooltip'; +import { MathLiveComponent } from './mathlive/mathlive.component'; +import { MenuButton } from './menu-button/menu-button.component'; +import { CheckboxButton } from './checkbox-button/checkbox-button.component'; +import { IPFSLinkComponent } from './ipfs-link/ipfs-link.component'; @NgModule({ declarations: [ @@ -63,10 +67,14 @@ import {TooltipModule} from 'primeng/tooltip'; AlertComponent, PaginatorComponent, StatusDropdown, - CustomCustomDialogComponent, + CustomConfirmDialogComponent, TreeGraphComponent, GuardianSwitchButton, - ImportEntityDialog + ImportEntityDialog, + MathLiveComponent, + MenuButton, + CheckboxButton, + IPFSLinkComponent ], imports: [ CommonModule, @@ -111,10 +119,14 @@ import {TooltipModule} from 'primeng/tooltip'; PaginatorComponent, DataInputDialogComponent, StatusDropdown, - CustomCustomDialogComponent, + CustomConfirmDialogComponent, TreeGraphComponent, GuardianSwitchButton, - ImportEntityDialog + ImportEntityDialog, + MathLiveComponent, + MenuButton, + CheckboxButton, + IPFSLinkComponent ] }) export class CommonComponentsModule { diff --git a/frontend/src/app/modules/common/custom-confirm-dialog/custom-confirm-dialog.component.ts b/frontend/src/app/modules/common/custom-confirm-dialog/custom-confirm-dialog.component.ts index 47bbb34204..403897e4e1 100644 --- a/frontend/src/app/modules/common/custom-confirm-dialog/custom-confirm-dialog.component.ts +++ b/frontend/src/app/modules/common/custom-confirm-dialog/custom-confirm-dialog.component.ts @@ -6,7 +6,7 @@ import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; templateUrl: './custom-confirm-dialog.component.html', styleUrls: ['./custom-confirm-dialog.component.scss'], }) -export class CustomCustomDialogComponent implements OnInit { +export class CustomConfirmDialogComponent implements OnInit { public loading = true; public header: string; public text: string; diff --git a/frontend/src/app/modules/common/import-entity-dialog/import-entity-dialog.component.ts b/frontend/src/app/modules/common/import-entity-dialog/import-entity-dialog.component.ts index e0626b4440..e5565cf947 100644 --- a/frontend/src/app/modules/common/import-entity-dialog/import-entity-dialog.component.ts +++ b/frontend/src/app/modules/common/import-entity-dialog/import-entity-dialog.component.ts @@ -11,6 +11,7 @@ import { ToolsService } from 'src/app/services/tools.service'; import { SchemaRulesService } from 'src/app/services/schema-rules.service'; import { PolicyStatisticsService } from 'src/app/services/policy-statistics.service'; import { PolicyLabelsService } from 'src/app/services/policy-labels.service'; +import { FormulasService } from 'src/app/services/formulas.service'; export enum ImportEntityType { Policy = 'policy', @@ -21,7 +22,8 @@ export enum ImportEntityType { SchemaRule = 'schema-rule', Theme = 'theme', Statistic = 'statistic', - PolicyLabel = 'policy-label' + PolicyLabel = 'policy-label', + Formula = 'formula', } export interface IImportEntityArray { @@ -34,6 +36,7 @@ export interface IImportEntityArray { rule?: any, statistic?: any, label?: any, + formula?: any, } export interface IImportEntityMessage { @@ -46,6 +49,7 @@ export interface IImportEntityMessage { rule?: any, statistic?: any, label?: any, + formula?: any, } export type IImportEntityResult = IImportEntityArray | IImportEntityMessage; @@ -98,7 +102,8 @@ export class ImportEntityDialog { private taskService: TasksService, private schemaRulesService: SchemaRulesService, private policyStatisticsService: PolicyStatisticsService, - private policyLabelsService: PolicyLabelsService + private policyLabelsService: PolicyLabelsService, + private formulasService: FormulasService, ) { const _config = this.config.data || {}; @@ -175,6 +180,14 @@ export class ImportEntityDialog { this.fileExtension = 'label'; this.placeholder = 'Import Label .label file'; break; + case 'formula': + this.type = ImportEntityType.Formula; + this.canImportFile = true; + this.canImportMessage = false; + this.title = 'Import Formula'; + this.fileExtension = 'formula'; + this.placeholder = 'Import Formula .formula file'; + break; default: this.type = ImportEntityType.Policy; this.canImportFile = true; @@ -283,6 +296,10 @@ export class ImportEntityDialog { this.labelFromFile(arrayBuffer); break; } + case ImportEntityType.Formula: { + this.formulaFromFile(arrayBuffer); + break; + } default: { break; } @@ -327,6 +344,9 @@ export class ImportEntityDialog { case ImportEntityType.PolicyLabel: { return; } + case ImportEntityType.Formula: { + return; + } default: { return; } @@ -499,7 +519,6 @@ export class ImportEntityDialog { }); } - //Label private labelFromFile(arrayBuffer: any) { this.loading = true; @@ -516,4 +535,21 @@ export class ImportEntityDialog { this.loading = false; }); } + + //Label + private formulaFromFile(arrayBuffer: any) { + this.loading = true; + this.formulasService + .previewByFile(arrayBuffer) + .subscribe((result) => { + this.loading = false; + this.setResult({ + type: 'file', + data: arrayBuffer, + formula: result + }); + }, (e) => { + this.loading = false; + }); + } } \ No newline at end of file diff --git a/frontend/src/app/modules/common/ipfs-link/ipfs-link.component.html b/frontend/src/app/modules/common/ipfs-link/ipfs-link.component.html new file mode 100644 index 0000000000..4bd79b8753 --- /dev/null +++ b/frontend/src/app/modules/common/ipfs-link/ipfs-link.component.html @@ -0,0 +1 @@ +{{url}} \ No newline at end of file diff --git a/frontend/src/app/modules/common/ipfs-link/ipfs-link.component.scss b/frontend/src/app/modules/common/ipfs-link/ipfs-link.component.scss new file mode 100644 index 0000000000..e55039f711 --- /dev/null +++ b/frontend/src/app/modules/common/ipfs-link/ipfs-link.component.scss @@ -0,0 +1,10 @@ +.link { + font-family: Inter, sans-serif; + font-size: 14px !important; + font-style: normal; + font-weight: 500 !important; + color: var(--color-primary); + text-decoration: none; + border-bottom: 1px solid var(--color-primary); + text-transform: capitalize; +} \ No newline at end of file diff --git a/frontend/src/app/modules/common/ipfs-link/ipfs-link.component.ts b/frontend/src/app/modules/common/ipfs-link/ipfs-link.component.ts new file mode 100644 index 0000000000..c6247ea689 --- /dev/null +++ b/frontend/src/app/modules/common/ipfs-link/ipfs-link.component.ts @@ -0,0 +1,27 @@ +import { Component, Input, SimpleChanges } from '@angular/core'; +import { API_IPFS_GATEWAY_URL, IPFS_SCHEMA } from 'src/app/services/api'; + +@Component({ + selector: 'ipfs-link', + templateUrl: './ipfs-link.component.html', + styleUrls: ['./ipfs-link.component.scss'] +}) +export class IPFSLinkComponent { + @Input('url') url: string | undefined; + + public link:string; + + constructor() { + } + + ngOnChanges(changes: SimpleChanges): void { + this.link = ''; + if(this.url) { + if(this.url.startsWith(IPFS_SCHEMA)) { + this.link = API_IPFS_GATEWAY_URL + this.url.replace(IPFS_SCHEMA, ''); + } else { + this.link = this.url; + } + } + } +} diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index 75c34de15b..1e976ff457 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -1,27 +1,27 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {ReactiveFormsModule} from '@angular/forms'; -import {DragDropModule} from '@angular/cdk/drag-drop'; -import {CdkTableModule} from '@angular/cdk/table'; -import {TabViewModule} from 'primeng/tabview'; -import {AccordionModule} from 'primeng/accordion'; -import {TableModule} from 'primeng/table'; -import {ButtonModule} from 'primeng/button'; -import {SelectButtonModule} from 'primeng/selectbutton'; -import {CalendarModule} from 'primeng/calendar'; -import {RadioButtonModule} from 'primeng/radiobutton'; -import {ProgressSpinnerModule} from 'primeng/progressspinner'; -import {ToolbarModule} from 'primeng/toolbar'; -import {OverlayPanelModule} from 'primeng/overlaypanel'; -import {ProgressBarModule} from 'primeng/progressbar'; -import {CheckboxModule} from 'primeng/checkbox'; -import {ChipsModule} from 'primeng/chips'; -import {StepsModule} from 'primeng/steps'; -import {DropdownModule} from 'primeng/dropdown'; -import {MultiSelectModule} from 'primeng/multiselect'; -import {InputNumberModule} from 'primeng/inputnumber'; -import {TooltipModule} from 'primeng/tooltip'; -import {TreeModule} from 'primeng/tree'; +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ReactiveFormsModule } from '@angular/forms'; +import { DragDropModule } from '@angular/cdk/drag-drop'; +import { CdkTableModule } from '@angular/cdk/table'; +import { TabViewModule } from 'primeng/tabview'; +import { AccordionModule } from 'primeng/accordion'; +import { TableModule } from 'primeng/table'; +import { ButtonModule } from 'primeng/button'; +import { SelectButtonModule } from 'primeng/selectbutton'; +import { CalendarModule } from 'primeng/calendar'; +import { RadioButtonModule } from 'primeng/radiobutton'; +import { ProgressSpinnerModule } from 'primeng/progressspinner'; +import { ToolbarModule } from 'primeng/toolbar'; +import { OverlayPanelModule } from 'primeng/overlaypanel'; +import { ProgressBarModule } from 'primeng/progressbar'; +import { CheckboxModule } from 'primeng/checkbox'; +import { ChipsModule } from 'primeng/chips'; +import { StepsModule } from 'primeng/steps'; +import { DropdownModule } from 'primeng/dropdown'; +import { MultiSelectModule } from 'primeng/multiselect'; +import { InputNumberModule } from 'primeng/inputnumber'; +import { TooltipModule } from 'primeng/tooltip'; +import { TreeModule } from 'primeng/tree'; @NgModule({ declarations: [], diff --git a/frontend/src/app/modules/common/mathlive/keyboards/math-keyboard.ts b/frontend/src/app/modules/common/mathlive/keyboards/math-keyboard.ts new file mode 100644 index 0000000000..d3df58d23d --- /dev/null +++ b/frontend/src/app/modules/common/mathlive/keyboards/math-keyboard.ts @@ -0,0 +1,469 @@ +export const mathKeyboard = { + label: "math", + tooltip: "Math", + rows: [ + [ + { + latex: "+", + shift: "\\oplus", + variants: [ + { latex: "+" }, + { latex: "\\oplus" }, + ] + }, + { + latex: "-", + shift: "\\pm", + variants: [ + { latex: "-", }, + { latex: "\\pm" }, + { latex: "\\ominus" }, + ] + }, + { + latex: "\\times", + shift: "\\otimes", + variants: [ + { latex: "\\times" }, + { latex: "\\otimes" }, + { latex: "\\cdot" }, + ] + }, + { + latex: "\\frac{#@}{#?}", + shift: "\\%", + variants: [ + { latex: "\\frac{#@}{#?}" }, + { latex: "/" }, + { latex: "\\div" }, + { latex: "\\%" }, + { latex: "\\oslash" }, + ] + }, + { + latex: "=", + shift: "\\neq", + variants: [ + { latex: "=" }, + { latex: "\\neq" }, + { latex: "\\equiv" }, + { latex: "\\varpropto" }, + { latex: "\\thickapprox" }, + { latex: "\\lt" }, + { latex: "\\gt" }, + { latex: "\\le" }, + { latex: "\\ge" }, + ] + }, + { + latex: ".", + shift: ",", + variants: [ + { latex: "." }, + { latex: "," }, + { latex: ";" }, + { latex: "\\colon" }, + { latex: "\\Colon" }, + { latex: "?" }, + { latex: "\\cdotp" }, + { latex: "\\ldots" }, + { latex: "\\cdots" }, + { latex: "\\therefore" }, + { latex: "\\because" }, + { latex: "\\Colon:" }, + { latex: "\\vdots" }, + { latex: "\\ddots" }, + { latex: "\\ldotp" }, + ] + }, + { + latex: "(", + shift: "\\lbrack", + variants: [ + { latex: "(" }, + { latex: "\\lbrack" }, + { latex: "\\langle" }, + { latex: "\\lfloor" }, + { latex: "\\lceil" }, + { latex: "\\lbrace" }, + ] + }, + { + latex: ")", + shift: "\\rbrack", + variants: [ + { latex: ")" }, + { latex: "\\rbrack" }, + { latex: "\\rangle" }, + { latex: "\\rfloor" }, + { latex: "\\rceil" }, + { latex: "\\rbrace" }, + ] + }, + "\\sqrt{#0}", + "#0^2", + ], + [ + "#@^{#?}", + "#@_{#?}", + "|#0|", + "\\sqrt[#0]{#0}", + { + class: "small", + latex: "\\log_{#0}#0", + shift: "\\ln", + variants: [ + { class: "small", latex: "\\log_{#0}#0" }, + { class: "small", latex: "\\ln#0" }, + { class: "small", latex: "\\log_{10}#0" }, + ] + }, + { + latex: "\\exponentialE", + shift: "\\exp", + variants: [ + { class: "small", latex: "\\exponentialE" }, + { class: "small", latex: "\\exp\\left(#0\\right)" }, + { class: "small", latex: "\\times10^{#0}" }, + ] + }, + "\\lim_{#0}", + { + class: "small", + latex: "\\sum_{#0}^{#0}#0", + shift: "\\Sigma", + variants: [ + { class: "small", latex: "\\sum_{#0}^{#0}#0" }, + { class: "small", latex: "\\sum #0" }, + ] + }, + { + class: "small", + latex: "\\prod_{#0}^{#0}#0", + shift: "\\Pi", + variants: [ + { class: "small", latex: "\\prod_{#0}^{#0}#0", }, + { class: "small", latex: "\\prod#0", }, + ] + }, + { + class: "small", + latex: "\\int_{#0}^{#0}#0", + shift: "\\smallint", + variants: [ + { class: "small", latex: "\\int_{#0}^{#0}#0" }, + { class: "small", latex: "\\int#0" }, + { class: "small", latex: "\\iint #0" }, + { class: "small", latex: "\\iiint#0" }, + { class: "small", latex: "\\oint#0" }, + { class: "small", latex: "\\intclockwise#0" }, + { class: "small", latex: "\\varointclockwise#0" }, + { class: "small", latex: "\\ointctrclockwise#0" }, + { class: "small", latex: "\\intctrclockwise#0" }, + { class: "small", latex: "\\oiint#0" }, + { class: "small", latex: "\\oiiint#0" }, + ] + }, + ], + [ + { + latex: "\\overrightarrow{#@}", + shift: "\\overleftarrow{#@}", + variants: [ + { latex: "\\overrightarrow{#@}" }, + { latex: "\\overleftarrow{#@}" }, + { latex: "\\underleftarrow{#@}" }, + { latex: "\\underrightarrow{#@}" }, + { latex: "\\overleftrightarrow{#@}" }, + { latex: "\\underleftrightarrow{#@}" }, + ] + }, + { + latex: "\\overline{#@}", + shift: "\\underline{#@}", + variants: [ + { latex: "\\overline{#@}" }, + { latex: "\\underline{#@}" }, + { latex: "\\tilde{#@}" }, + { latex: "\\grave{#@}" }, + { latex: "\\dot{#@}" }, + { latex: "\\ddot{#@}" }, + { latex: "\\mathring{#@}" }, + { latex: "\\breve{#@}" }, + { latex: "\\acute{#@}" }, + { latex: "\\bar{#@}" }, + { latex: "\\vec{#@}" }, + { latex: "\\hat{#@}" }, + { latex: "\\check{#@}" }, + { latex: "\\undergroup{#@}" }, + { latex: "\\overgroup{#@}" }, + { latex: "\\underbrace{#@}" }, + { latex: "\\overbrace{#@}" }, + { latex: "\\overlinesegment{#@}" }, + { latex: "\\underlinesegment{#@}" }, + ] + }, + { + latex: "#@^{\\prime}", + shift: "#@^{\\doubleprime}", + variants: [ + { latex: "#@^{\\prime}" }, + { latex: "#@^{\\doubleprime}" }, + { latex: "#@\\degree" }, + ] + }, + { + class: "small", + latex: "\\mathrm{abs}\\left(#0\\right)", + }, + { + latex: "\\cup", + shift: "\\cap", + variants: [ + { latex: "\\cup" }, + { latex: "\\cap" }, + { latex: "\\subset" }, + { latex: "\\subseteq" }, + { latex: "\\subsetneq" }, + { latex: "\\varsubsetneq" }, + { latex: "\\subsetneqq" }, + { latex: "\\nsubset" }, + { latex: "\\nsubseteq" }, + { latex: "\\supset" }, + { latex: "\\supseteq" }, + { latex: "\\supsetneq" }, + { latex: "\\supsetneqq" }, + { latex: "\\nsupset" }, + { latex: "\\nsupseteq" }, + ] + }, + + { + latex: "\\exists", + shift: "\\forall", + variants: [ + { latex: "\\exists" }, + { latex: "\\nexists" }, + { latex: "\\forall" }, + { latex: "\\lnot" }, + { latex: "\\land" }, + { latex: "\\lor" }, + { latex: "\\oplus" }, + { latex: "\\downarrow" }, + { latex: "\\uparrow" }, + { latex: "\\curlywedge" }, + { latex: "\\bar{\\curlywedge}" }, + { latex: "\\in" }, + { latex: "\\owns" }, + { latex: "\\notin" }, + { latex: "\\ni" }, + { latex: "\\not\\owns" }, + ] + }, + { + latex: "\\rightarrow", + shift: "\\larr", + variants: [ + { latex: "\\rightarrow" }, + { latex: "\\implies" }, + { latex: "\\to" }, + { latex: "\\dashv" }, + { latex: "\\roundimplies" }, + { latex: "\\larr" }, + { latex: "\\impliedby" }, + { latex: "\\gets" }, + { latex: "\\lArr" }, + { latex: "\\vdash" }, + { latex: "\\models" }, + { latex: "\\in" }, + { latex: "\\lrArr" }, + { latex: "\\iff" }, + { latex: "\\leftrightarrow" }, + { latex: "\\leftrightarrows" }, + { latex: "\\Leftrightarrow" }, + { latex: "^{\\biconditional}" }, + ] + }, + { + latex: "\\infty", + shift: "\\omega", + variants: [ + { latex: "\\infty" }, + { latex: "\\aleph_0" }, + { latex: "\\aleph_1" }, + { latex: "\\omega" }, + { latex: "\\mathfrak{m}" }, + ] + }, + { + latex: "\\imaginaryI", + shift: "\\Re", + variants: [ + { latex: "\\Re" }, + { latex: "\\Im" }, + { latex: "\\imaginaryJ" }, + { latex: "\\imaginaryI" }, + { latex: "\\Vert#0\\Vert" }, + ] + }, + { + latex: "\\mathrm{d}#0", + shift: "\\partial", + variants: [ + { latex: "\\mathrm{d}#0" }, + { latex: "\\dfrac{\\mathrm{d}}{\\mathrm{d}#0}" }, + { latex: "\\frac{\\partial}{\\partial #0}" }, + { latex: "\\mathrm{d}" }, + { latex: "\\partial" }, + ] + }, + ], + [ + { + latex: "\\sin", + shift: "\\sin^{-1}", + variants: [ + { class: "small", latex: "\\sin" }, + { class: "small", latex: "\\sinh" }, + { class: "small", latex: "\\sin^{-1}" }, + { class: "small", latex: "\\arsinh" }, + ] + }, + { + latex: "\\cos", + shift: "\\cos^{-1}", + variants: [ + { class: "small", latex: "\\cos" }, + { class: "small", latex: "\\cosh" }, + { class: "small", latex: "\\cos^{-1}" }, + { class: "small", latex: "\\arcosh" }, + ] + }, + { + latex: "\\tan", + shift: "\\tan^{-1}", + variants: [ + { class: "small", latex: "\\tan" }, + { class: "small", latex: "\\tg" }, + { class: "small", latex: "\\tan^{-1}" }, + { class: "small", latex: "\\tanh" }, + { class: "small", latex: "\\artanh" }, + { class: "small", latex: "\\arctan" }, + { class: "small", latex: "\\arctg" }, + { class: "small", latex: "\\cot" }, + ] + }, + "\\Delta", + { + latex: "\\pi", + shift: "\\tau", + variants: [ + { latex: "\\pi" }, + { latex: "\\tau" }, + { latex: "\\rho" }, + { latex: "\\theta" }, + ] + }, + { + latex: "f(#0)", + shift: "x_{i}", + variants: [ + { class: "small", latex: "f(#0)" }, + { class: "small", latex: "g(#0)" }, + { latex: "x^{n}" }, + { latex: "x^{#0}" }, + { latex: "x_{n}" }, + { latex: "x_{i}" }, + { latex: "x_{#0}" }, + ] + }, + + { + latex: "#@_{i}", + shift: "#@^{n}", + variants: [ + { latex: "#@_{i}" }, + { latex: "#@_{n}" }, + { latex: "#@^{n}" }, + { latex: "#@_{ij}" }, + { latex: "#@_{t}" }, + ] + }, + { + latex: "\\text{\\_}", + shift: "\\circ", + variants: [ + { latex: "\\ast" }, + { latex: "\\circ" }, + { latex: "\\bigcirc" }, + { latex: "\\bullet" }, + { latex: "\\odot" }, + { latex: "\\oslash" }, + { latex: "\\circledcirc" }, + { latex: "\\star" }, + { latex: "\\times" }, + { latex: "\\doteq" }, + { latex: "\\doteqdot" }, + ] + }, + { + latex: "+", + aside: "New Line", + class: "action", + command: ["performWithFeedback", "addRowAfter"], + shift: { + latex: "-", + class: "action", + aside: "Delete Line", + command: ["performWithFeedback", "removeRow"], + }, + variants: [ + { + latex: "+", + aside: "New Line", + class: "small", + command: ["performWithFeedback", "addRowAfter"], + }, + { + latex: "-", + aside: "Delete Line", + class: "small", + command: ["performWithFeedback", "removeRow"], + }, + ] + }, + { + label: "T", + aside: "Text Mode", + class: "action", + command: ["switchMode", "text"], + shift: { + label: "M", + aside: "Math Mode", + class: "small action", + command: ["switchMode", "math"], + }, + variants: [ + { + label: "T", + class: "small", + aside: "Math Mode", + command: ["switchMode", "text"], + }, + { + label: "M", + class: "small", + aside: "Math Mode", + command: ["switchMode", "math"], + }, + { + label: "L", + class: "small", + aside: "LaTeX Mode", + command: ["switchMode", "latex"], + }, + ] + }, + ] + ] +}; \ No newline at end of file diff --git a/frontend/src/app/modules/common/mathlive/keyboards/matrix-keyboard.ts b/frontend/src/app/modules/common/mathlive/keyboards/matrix-keyboard.ts new file mode 100644 index 0000000000..8f1f5ea783 --- /dev/null +++ b/frontend/src/app/modules/common/mathlive/keyboards/matrix-keyboard.ts @@ -0,0 +1,252 @@ +export const matrixKeyboard = { + label: "matrix", + tooltip: "Matrix", + rows: [ + [ + { + label: "1x1", + latex: "\\begin{pmatrix}#0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0\\end{Bmatrix}" }, + ] + }, + { + label: "1x2", + latex: "\\begin{pmatrix}#0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "1x3", + latex: "\\begin{pmatrix}#0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "1x4", + latex: "\\begin{pmatrix}#0 & #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + latex: "\\cdots", + command: ["performWithFeedback", "addRowAfter"], + aside: "Add Row After", + shift: "\\cdots", + variants: [ + { + latex: "\\cdots", + command: ["performWithFeedback", "addRowAfter"], + aside: "Add Row After", + }, + { + latex: "\\cdots", + command: ["performWithFeedback", "addRowBefore"], + aside: "Add Row Before", + } + ] + } + ], + [ + { + label: "2x1", + latex: "\\begin{pmatrix}#0\\\\ #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0\\\\ #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0\\\\ #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0\\\\ #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0\\\\ #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0\\\\ #0\\end{Bmatrix}" }, + ] + }, + { + label: "2x2", + latex: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0\\\\ #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0\\\\ #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0\\\\ #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0\\\\ #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "2x3", + latex: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "2x4", + latex: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + latex: "\\vdots", + command: ["performWithFeedback", "addColumnAfter"], + aside: "Add Column After", + shift: "\\vdots", + variants: [ + { + latex: "\\vdots", + command: ["performWithFeedback", "addColumnAfter"], + aside: "Add Column After", + }, + { + latex: "\\vdots", + command: ["performWithFeedback", "addColumnBefore"], + aside: "Add Column Before", + } + ] + } + ], + [ + { + label: "3x1", + latex: "\\begin{pmatrix}#0\\\\ #0\\\\ #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0\\\\ #0\\\\ #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0\\\\ #0\\\\ #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0\\\\ #0\\\\ #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0\\\\ #0\\\\ #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0\\\\ #0\\\\ #0\\end{Bmatrix}" }, + ] + }, + { + label: "3x2", + latex: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "3x3", + latex: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "3x4", + latex: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + latex: "\\cdots", + aside: "Delelte Row", + command: ["performWithFeedback", "removeRow"], + } + ], + [ + { + label: "4x1", + latex: "\\begin{pmatrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{Bmatrix}" }, + ] + }, + { + label: "4x2", + latex: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "4x3", + latex: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "4x4", + latex: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + latex: "\\vdots", + aside: "Delete Column", + command: ["performWithFeedback", "removeColumn"], + } + ] + ] +}; \ No newline at end of file diff --git a/frontend/src/app/modules/common/mathlive/mathlive.component.html b/frontend/src/app/modules/common/mathlive/mathlive.component.html new file mode 100644 index 0000000000..ece16ca201 --- /dev/null +++ b/frontend/src/app/modules/common/mathlive/mathlive.component.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/frontend/src/app/modules/common/mathlive/mathlive.component.scss b/frontend/src/app/modules/common/mathlive/mathlive.component.scss new file mode 100644 index 0000000000..a98b7c0535 --- /dev/null +++ b/frontend/src/app/modules/common/mathlive/mathlive.component.scss @@ -0,0 +1,20 @@ +.mathlive-content { + display: flex; + flex-flow: column; +} + +.mathlive-content::ng-deep { + math-field::part(virtual-keyboard-toggle) { + display: none; + } + + math-field { + min-height: 40px; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + padding-left: 12px; + font-size: 24px; + user-select: all; + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/common/mathlive/mathlive.component.ts b/frontend/src/app/modules/common/mathlive/mathlive.component.ts new file mode 100644 index 0000000000..c49313ea63 --- /dev/null +++ b/frontend/src/app/modules/common/mathlive/mathlive.component.ts @@ -0,0 +1,67 @@ +import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core'; +import { MathfieldElement } from 'mathlive'; +import { matrixKeyboard } from './keyboards/matrix-keyboard'; +import { mathKeyboard } from './keyboards/math-keyboard'; + +@Component({ + selector: 'math-live', + templateUrl: './mathlive.component.html', + styleUrls: ['./mathlive.component.scss'] +}) +export class MathLiveComponent implements OnInit, OnDestroy { + @ViewChild('mathLiveContent', { static: true }) mathLiveContent: ElementRef; + @Input('readonly') readonly: boolean = false; + @Input('value') value!: string; + @Output('valueChange') valueChange = new EventEmitter(); + @Output('keyboard') keyboard = new EventEmitter(); + @Output('focus') focus = new EventEmitter(); + + private readonly mfe: MathfieldElement; + + constructor() { + MathfieldElement.keypressSound = null; + MathfieldElement.plonkSound = null; + this.mfe = new MathfieldElement(); + } + + ngOnInit(): void { + const mathVirtualKeyboard: any = window.mathVirtualKeyboard; + mathVirtualKeyboard.layouts = [ + mathKeyboard, + matrixKeyboard, + "numeric", + "symbols", + "greek" + ]; + this.mfe.mathVirtualKeyboardPolicy = "manual"; + this.mfe.addEventListener("focusin", () => { + this.keyboard.emit(true); + this.focus.emit(this); + return mathVirtualKeyboard.show(); + }); + this.mfe.addEventListener("focusout", () => { + this.keyboard.emit(false); + this.focus.emit(this); + return mathVirtualKeyboard.hide(); + }); + this.mfe.addEventListener('input', (ev: any) => { + this.value = ev?.target?.value; + this.valueChange.emit(this.value); + }); + this.mfe.value = this.value || ''; + this.mfe.readonly = this.readonly; + } + + ngAfterViewInit() { + const container = this.mathLiveContent.nativeElement; + container.appendChild(this.mfe) + } + + ngOnDestroy() { + this.mfe.remove(); + } + + public getElement(): ElementRef { + return this.mathLiveContent; + } +} diff --git a/frontend/src/app/modules/common/menu-button/menu-button.component.html b/frontend/src/app/modules/common/menu-button/menu-button.component.html new file mode 100644 index 0000000000..29eb68cb9f --- /dev/null +++ b/frontend/src/app/modules/common/menu-button/menu-button.component.html @@ -0,0 +1,40 @@ + + + + + + + + \ No newline at end of file diff --git a/frontend/src/app/modules/common/menu-button/menu-button.component.scss b/frontend/src/app/modules/common/menu-button/menu-button.component.scss new file mode 100644 index 0000000000..ea7b2890e1 --- /dev/null +++ b/frontend/src/app/modules/common/menu-button/menu-button.component.scss @@ -0,0 +1,90 @@ +:host { + display: flex; + flex-direction: row; + position: relative; +} + +.menu-left-button { + width: 100%; + height: 100%; + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; + justify-content: flex-start; + padding-left: 10px; +} + +.menu-right-button { + width: 40px; + min-width: 40px; + color: var(--guardian-secondary-color); + background-color: var(--guardian-primary-color); + border: 1px solid var(--guardian-primary-color); + border-radius: 6px; + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + position: relative; + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; + + &::before { + content: ""; + display: block; + position: absolute; + left: 0px; + top: 6px; + bottom: 6px; + width: 3px; + border-left: 1px solid #fff; + pointer-events: none; + } + + &:hover { + filter: brightness(0.95); + } +} + +.menu-dropdown { + height: 40px; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + pointer-events: none; + opacity: 0; + z-index: -1; +} + +.menu-option { + display: flex; + flex-direction: row; + align-items: center; + padding: 8px 10px; + + .menu-option-icon { + width: 24px; + height: 24px; + overflow: hidden; + margin-right: 12px; + } + + .menu-option-label { + font-family: var(--guardian-font-family); + user-select: none; + justify-content: center; + align-items: center; + margin: 0; + display: inline-flex; + font-size: 14px; + line-height: 16px; + text-align: left; + } +} + +::ng-deep .menu-dropdown-panel { + .p-dropdown-item { + padding: 0; + } +} diff --git a/frontend/src/app/modules/common/menu-button/menu-button.component.ts b/frontend/src/app/modules/common/menu-button/menu-button.component.ts new file mode 100644 index 0000000000..1f4f68ce0f --- /dev/null +++ b/frontend/src/app/modules/common/menu-button/menu-button.component.ts @@ -0,0 +1,61 @@ +import { Component, ElementRef, EventEmitter, Inject, Input, Output, SimpleChanges, ViewChild } from '@angular/core'; + +interface IOption { + id: string; + text: string; + icon: string; + color: string; +} + +/** + * menu button. + */ +@Component({ + selector: 'menu-button', + templateUrl: './menu-button.component.html', + styleUrls: ['./menu-button.component.scss'] +}) +export class MenuButton { + @Input('immediately') immediately: boolean = false; + @Input('options') options!: IOption[]; + @Output('action') action = new EventEmitter(); + + @ViewChild('dropdownMenu', { static: true }) dropdownMenu: any; + + public current: IOption; + public size: string = 'auto'; + + constructor() { + } + + ngOnChanges(changes: SimpleChanges): void { + this.current = this.options?.[0]; + } + + ngAfterViewInit(): void { + this.size = this.getSize(); + } + + onAction() { + this.action.emit(this.current); + } + + onChange($event: any) { + this.current = $event.value; + if(this.immediately) { + this.onAction(); + } + } + + private getSize(): string { + try { + const width = this.dropdownMenu.el.nativeElement.getBoundingClientRect().width; + if (width) { + return width + 'px'; + } + } catch (error) { + return 'auto'; + } + return 'auto'; + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/common/status-dropdown/status-dropdown.component.html b/frontend/src/app/modules/common/status-dropdown/status-dropdown.component.html index b6600385bd..25200d30bd 100644 --- a/frontend/src/app/modules/common/status-dropdown/status-dropdown.component.html +++ b/frontend/src/app/modules/common/status-dropdown/status-dropdown.component.html @@ -1,6 +1,6 @@ + {{label}}
diff --git a/frontend/src/app/modules/common/status-dropdown/status-dropdown.component.ts b/frontend/src/app/modules/common/status-dropdown/status-dropdown.component.ts index a8b6676523..b208f1e8e4 100644 --- a/frontend/src/app/modules/common/status-dropdown/status-dropdown.component.ts +++ b/frontend/src/app/modules/common/status-dropdown/status-dropdown.component.ts @@ -1,10 +1,10 @@ -import { Component, EventEmitter, Input, Output, SimpleChanges } from '@angular/core'; +import { ChangeDetectorRef, Component, EventEmitter, Input, Output, SimpleChanges } from '@angular/core'; interface IOptions { label: string; value: string; description: string; - disable?: ((value: string) => boolean) | boolean; + disable?: ((value: string, item?: any) => boolean) | boolean; } /** @@ -16,38 +16,41 @@ interface IOptions { styleUrls: ['./status-dropdown.component.scss'] }) export class StatusDropdown { + @Input('item') item!: any; @Input('options') options!: IOptions[]; - @Input('value') value!: string; @Input('status') status!: string; - @Output('valueChange') valueChange = new EventEmitter(); @Output('onChange') change = new EventEmitter(); public list: IOptions[] = []; public disabled: boolean = true; public label: string = ''; - constructor() { } + constructor( + private cdRef: ChangeDetectorRef, + ) { } ngOnChanges(changes: SimpleChanges): void { this.options = this.options || []; this.list = this.options.filter((item) => { if (typeof item.disable === 'function') { - return !item.disable(this.value); + return !item.disable(this.status, this.item); } else { return !item.disable; } }) this.disabled = this.list.length === 0; - const item = this.options.find((item) => item.value === this.value); + const item = this.options.find((item) => item.value === this.status); if (item) { this.label = item.label; } else { - this.label = this.value; + this.label = this.status; } } - onChange() { - this.valueChange.emit(this.value); - this.change.emit(this.value) + onChange($event: any, dropdown: any) { + if($event.value) { + this.change.emit($event.value); + dropdown.clear(); + } } } diff --git a/frontend/src/app/modules/formulas/dialogs/formulas-view-dialog/formulas-view-dialog.component.html b/frontend/src/app/modules/formulas/dialogs/formulas-view-dialog/formulas-view-dialog.component.html new file mode 100644 index 0000000000..248c3d5c1b --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/formulas-view-dialog/formulas-view-dialog.component.html @@ -0,0 +1,232 @@ +
+
+
View Formula
+
+
+ +
+
+
+ +
+ + + +
+ {{ tab.label }} +
+
+
+
+
+
+ + +
+ + +
Constant
+
+ +
+ + +
+
+ + +
+
+ + +
+
+
+ + + + +
Variable
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + + + +
Formula
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ {{relationship.name}} +
+
+
+
+ + +
+
+
+ + + + +
Text
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ {{relationship.name}} +
+
+
+
+ + +
+
+
+ + +
Schema
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+
+
+
+
+ + +
+
+ + +
+
+
+
There were no files attached.
+
+
+
+
+ \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/dialogs/formulas-view-dialog/formulas-view-dialog.component.scss b/frontend/src/app/modules/formulas/dialogs/formulas-view-dialog/formulas-view-dialog.component.scss new file mode 100644 index 0000000000..ac5ce7714f --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/formulas-view-dialog/formulas-view-dialog.component.scss @@ -0,0 +1,301 @@ +.dialog-header { + .header-item { + padding: 6px 12px; + margin: 0px 16px; + border-radius: 6px; + font-size: var(--guardian-primary-font-size); + color: var(--guardian-dry-run-color); + background: var(--guardian-dry-run-background); + user-select: none; + cursor: default; + } +} + +.guardian-input-container { + margin-bottom: 24px; +} + +.guardian-textarea-container { + margin-bottom: 24px; +} + +.dialog-body { + display: flex; + flex-direction: column; + min-height: 600px; + padding-bottom: 24px; +} + +.view-bar { + margin-bottom: 24px; +} + +.view-body { + display: flex; + flex-direction: row; + min-height: 600px; + height: 600px; +} + +.action-buttons { + display: flex; + justify-content: flex-end; + user-select: none; + position: relative; + + &>div { + margin-left: 15px; + margin-right: 0px; + } +} + +.close-icon-color { + fill: #848FA9; + color: #848FA9; +} + +.context { + position: relative; + height: 100%; + display: flex; + flex-direction: column; + width: 100%; + overflow: hidden; + + .current-item-name { + font-family: Poppins; + font-size: 24px; + font-weight: 600; + line-height: 32px; + color: #181818; + margin-bottom: 24px; + } + + .current-item { + border: 1px solid #E1E7EF; + border-radius: 8px; + height: 100%; + overflow: auto; + padding: 24px; + } +} + +.formula-relationships { + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: #000; + padding: 8px 16px 0px 16px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + min-height: 40px; + + .formula-relationship { + width: auto; + height: 30px; + padding: 7px 12px 7px 12px; + border-radius: 6px; + background: var(--guardian-grey-color, #EFF3F7); + color: var(--guardian-disabled-color, #848FA9); + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 16px; + text-align: left; + margin-right: 8px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + display: inline-flex; + margin-bottom: 8px; + cursor: pointer; + + &:hover { + filter: brightness(0.95); + } + } +} + +.formula-link { + height: 40px; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: #000; + padding: 12px 16px; + cursor: pointer; + + &:hover { + background: var(--guardian-hover, #F0F3FC); + } + + .formula-link-value { + display: flex; + flex-direction: row; + pointer-events: none; + + &__entity { + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 16px; + color: var(--guardian-entity-color, #DA9B22); + margin-right: 8px; + } + + &__item { + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 16px; + } + } +} + +.nav-container { + display: flex; + width: 260px; + min-width: 260px; + height: 100%; + padding: 16px 0px 16px 0px; + border: 1px solid #E1E7EF; + border-radius: 8px; + margin-right: 24px; + position: relative; + overflow: auto; +} + +.field-tree { + width: auto; + min-width: 100%; + display: table; + + .field-item { + width: 100%; + padding: 8px 24px 8px 16px; + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 18px; + text-align: left; + display: flex; + justify-content: flex-start; + align-items: center; + + .field-offset { + width: 0px; + height: 24px; + overflow: hidden; + } + + .field-collapse { + width: 24px; + min-width: 24px; + height: 24px; + overflow: hidden; + } + + .field-select { + width: 24px; + min-width: 24px; + height: 24px; + overflow: hidden; + cursor: pointer; + + * { + pointer-events: none; + } + } + + .field-container { + padding-left: 8px; + cursor: pointer; + + * { + pointer-events: none; + } + + &[readonly="true"] { + cursor: default; + } + + &__view { + text-transform: capitalize; + font-size: 12px; + font-weight: bold; + margin-bottom: 4px; + } + + &__entity { + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 16px; + color: var(--guardian-entity-color, #DA9B22); + margin-bottom: 4px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 150px; + } + + &__header { + display: flex; + height: 18px; + + &-type { + font-family: Inter; + font-size: 12px; + font-weight: 400; + line-height: 16px; + color: #848FA9; + margin-right: 4px; + padding: 2px 0px; + text-transform: capitalize; + } + + &-name { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 150px; + } + } + } + + &[selected="true"] { + background: var(--guardian-primary-background, #e1e7fa); + } + } +} + +.files-container { + width: 100%; + + .file-item { + width: 100%; + border: 1px solid #E1E7EF; + border-radius: 8px; + padding: 24px; + margin-bottom: 24px; + } + + .no-files { + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: var(--guardian-disabled-color, #848FA9); + height: 87px; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/dialogs/formulas-view-dialog/formulas-view-dialog.component.ts b/frontend/src/app/modules/formulas/dialogs/formulas-view-dialog/formulas-view-dialog.component.ts new file mode 100644 index 0000000000..2f0f372d05 --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/formulas-view-dialog/formulas-view-dialog.component.ts @@ -0,0 +1,85 @@ +import { Component } from '@angular/core'; +import { DialogService, DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; +import { FormulaFiles, FormulaItem, FormulasTree, SchemaItem } from '../../models/formula-tree'; +import { TreeListData, TreeListItem, TreeListView } from 'src/app/modules/common/tree-graph/tree-list'; + +@Component({ + selector: 'formulas-view-dialog', + templateUrl: './formulas-view-dialog.component.html', + styleUrls: ['./formulas-view-dialog.component.scss'], +}) +export class FormulasViewDialog { + public loading = true; + public tree: FormulasTree; + public schema: string; + public path: string; + public items: FormulaItem[]; + public current: FormulaItem | SchemaItem | null; + public nav: TreeListView; + public files: FormulaFiles[]; + + public viewDocumentOptions = [ + { label: 'Formulas', value: true, icon: 'function' }, + { label: 'Files', value: false, icon: 'file' } + ]; + public viewFormulas: boolean = true; + + constructor( + public ref: DynamicDialogRef, + public config: DynamicDialogConfig, + private dialogService: DialogService, + ) { + this.tree = this.config.data?.tree; + this.schema = this.config.data?.schema; + this.path = this.config.data?.path; + } + + ngOnInit() { + this.loading = false; + this.items = this.tree?.get(this.schema, this.path) || []; + this.files = this.tree?.getFiles(this.items) || []; + const navTree = FormulasTree.createNav(this.items) + const fields = TreeListData.fromObject(navTree, 'children'); + this.nav = TreeListView.createView(fields, (s) => { return !s.parent }); + this.nav.collapseAll(false); + this.nav.updateHidden(); + this.selectItem(this.items[0]); + } + + ngOnDestroy() { + } + + public onClose(): void { + this.ref.close(null); + } + + public onLink(current: FormulaItem) { + this.selectItem(current.linkItem); + } + + public onRelationship(relationship: FormulaItem) { + this.selectItem(relationship); + } + + public onCollapseNav(item: TreeListItem) { + if (this.nav) { + this.nav.collapse(item, !item.collapsed); + this.nav.updateHidden(); + } + } + + public onSelectNav(item: TreeListItem) { + this.selectItem(item.data.data); + } + + private selectItem(current: FormulaItem | SchemaItem | null) { + this.current = current; + this.nav.data.items.forEach((e) => e.selected = e.data.data === this.current); + this.nav.updateHidden(); + this.nav.updateSelected(); + } + + public setTab(event: any): void { + this.viewFormulas = event.index === 0; + } +} diff --git a/frontend/src/app/modules/formulas/dialogs/link-dialog/link-dialog.component.html b/frontend/src/app/modules/formulas/dialogs/link-dialog/link-dialog.component.html new file mode 100644 index 0000000000..339d4ae6bc --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/link-dialog/link-dialog.component.html @@ -0,0 +1,159 @@ +
+
+
Set Link
+
+
+ +
+
+
+ +
+
Select Schema \ Formula
+
+
+
Schemas
+
Formulas
+
+
+
+
+ +
+
+ {{item.name}} +
+
+
+
+
+
+ +
+
+ {{item.name}} +
+
+
+
+
+
+
Select Field
+
Select Variable
+
+
+
+
+
+
+
+
+
+ +
+
+ {{item.data.description}} +
+
+
+
+
+
+
+
+
+
+
+ +
+
+ {{item.data.name}} +
+
+
+
+
+
+ \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/dialogs/link-dialog/link-dialog.component.scss b/frontend/src/app/modules/formulas/dialogs/link-dialog/link-dialog.component.scss new file mode 100644 index 0000000000..bfca17a282 --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/link-dialog/link-dialog.component.scss @@ -0,0 +1,254 @@ +.context { + position: relative; + height: 100%; + display: flex; + flex-direction: column; + width: 100%; + overflow: hidden; + + .context-header { + font-family: Poppins; + font-size: 24px; + font-weight: 600; + line-height: 32px; + color: #181818; + margin-bottom: 24px; + } + + .context-body { + border: 1px solid #E1E7EF; + padding: 24px; + border-radius: 8px; + overflow: hidden; + height: 100%; + display: flex; + flex-direction: column; + position: relative; + } +} + +.dialog-header { + .header-item { + padding: 6px 12px; + margin: 0px 16px; + border-radius: 6px; + font-size: var(--guardian-primary-font-size); + color: var(--guardian-dry-run-color); + background: var(--guardian-dry-run-background); + user-select: none; + cursor: default; + } +} + +.guardian-input-container { + margin-bottom: 24px; +} + +.dialog-body { + display: flex; + flex-direction: row; + min-height: 500px; + height: 500px; + padding-bottom: 24px; +} + +.action-buttons { + display: flex; + justify-content: flex-end; + user-select: none; + position: relative; + + .close-btn { + position: absolute; + top: 0px; + left: 0px; + margin-left: 0px; + } + + &>div { + margin-left: 15px; + margin-right: 0px; + } +} + +.close-icon-color { + fill: #848FA9; + color: #848FA9; +} + +.type-selector { + border-radius: 6px; + display: flex; + flex-direction: row; + margin-bottom: 20px; + border: 1px solid #C4D0E1; + background: #F9FAFC; + width: 250px; + height: 42px; + min-height: 42px; + + .selector-item { + padding: 5px; + border-radius: 6px; + margin: 3px; + cursor: pointer; + user-select: none; + flex: 1; + text-align: center; + color: #AAB7C4; + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 24px; + + &[selected="true"] { + background: var(--color-primary) !important; + color: var(--color-grey-white) !important; + } + + &:hover { + background: #E1E7EF; + } + } +} + +.entities { + overflow: auto; + height: 100%; + + .entity { + display: flex; + flex-direction: row; + min-height: 40px; + align-items: center; + width: 100%; + cursor: pointer; + padding: 0px 6px; + + .entity-select { + pointer-events: none; + } + + .entity-name { + padding-left: 16px; + width: 510px; + pointer-events: none; + } + + &:hover { + background: #e1e7fa; + } + } +} + +.field-tree { + position: absolute; + overflow: auto; + top: 16px; + bottom: 24px; + left: 24px; + right: 24px; + transform: translateZ(0); + transform-origin: 0% 0%; + + .field-item { + width: 100%; + padding: 8px 0px; + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 18px; + text-align: left; + display: flex; + justify-content: flex-start; + align-items: center; + + .field-offset { + width: 0px; + height: 24px; + overflow: hidden; + } + + .field-collapse { + width: 24px; + min-width: 24px; + height: 24px; + overflow: hidden; + } + + .field-select { + width: 24px; + min-width: 24px; + height: 24px; + overflow: hidden; + cursor: pointer; + + * { + pointer-events: none; + } + } + + .field-name { + padding-left: 8px; + min-width: 125px; + cursor: pointer; + + &[readonly="true"] { + cursor: default; + } + } + + &[property="false"] { + opacity: 0.4; + } + + &[highlighted="true"] .field-name { + color: var(--guardian-primary-color, #4169E2); + font-weight: 600; + } + + &[search-highlighted="hidden"] { + display: none; + } + + &[search-highlighted="sub"] .field-name { + opacity: 0.5; + } + + &[search-highlighted="highlighted"] .field-name { + color: var(--guardian-success-color, #19BE47); + font-weight: 600; + } + + &[search-highlighted="highlighted"][highlighted="true"] .field-name { + color: var(--guardian-primary-color, #4169E2); + font-weight: 600; + } + } +} + +.nav-container { + display: flex; + width: 260px; + height: 100%; + pointer-events: none; + padding: 0px 24px 0px 2px; + + .guardian-step-container { + width: 264px; + height: fit-content; + padding: 8px 0px 8px 0px; + border-radius: 8px; + box-shadow: none; + background: var(--guardian-background, #FFFFFF); + border: 1px solid #E1E7EF; + + .guardian-step { + padding-left: 24px; + } + + .guardian-step-separator { + margin-left: 16px; + } + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/dialogs/link-dialog/link-dialog.component.ts b/frontend/src/app/modules/formulas/dialogs/link-dialog/link-dialog.component.ts new file mode 100644 index 0000000000..7c0594fd47 --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/link-dialog/link-dialog.component.ts @@ -0,0 +1,120 @@ +import { Component } from '@angular/core'; +import { DialogService, DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; +import { TreeListData, TreeListItem, TreeListView } from 'src/app/modules/common/tree-graph/tree-list'; +import { FieldData } from 'src/app/modules/common/models/schema-node'; +import { IFormulaLink } from '@guardian/interfaces'; + +@Component({ + selector: 'link-dialog', + templateUrl: './link-dialog.component.html', + styleUrls: ['./link-dialog.component.scss'], +}) +export class LinkDialog { + public loading = true; + public schemas: any[]; + public formulas: any[]; + public type: 'schema' | 'formula'; + public step: number = 1; + public entityId: string; + public itemId: string | null; + public items: TreeListView | null; + + constructor( + public ref: DynamicDialogRef, + public config: DynamicDialogConfig, + private dialogService: DialogService, + ) { + this.schemas = this.config.data?.schemas || []; + this.formulas = this.config.data?.formulas || []; + if (this.schemas.length) { + this.type = 'schema'; + } else if (this.formulas.length) { + this.type = 'formula'; + } else { + this.type = 'schema'; + } + const link: IFormulaLink = this.config.data?.link; + if (link) { + this.type = link.type; + this.entityId = link.entityId; + this.itemId = link.item; + } + } + + ngOnInit() { + this.loading = false; + } + + ngOnDestroy(): void { + } + + public onChangeType(type: 'schema' | 'formula') { + this.type = type; + } + + public onSelectEntity(item: any) { + if (this.type === 'schema') { + this.entityId = item.iri; + } + if (this.type === 'formula') { + this.entityId = item.uuid; + } + } + + public onClose(): void { + this.ref.close(null); + } + + public onNext() { + this.step = 2; + this.items = null; + if (this.type === 'schema') { + const schema = this.schemas.find((s) => s.iri === this.entityId); + const fields = TreeListData.fromObject(schema, 'fields'); + this.items = TreeListView.createView(fields, (s) => { return !s.parent }); + } + if (this.type === 'formula') { + const formula = this.formulas.find((s) => s.uuid === this.entityId); + const fields = TreeListData.fromObject(formula.config || {}, 'formulas'); + this.items = TreeListView.createView(fields, (s) => { return !s.parent }); + } + } + + public onPrev() { + this.step = 1; + } + + public onCollapseField(item: TreeListItem) { + if (this.items) { + this.items.collapse(item, !item.collapsed); + this.items.updateHidden(); + } + } + + public onSelectField(item: TreeListItem) { + if (item.expandable) { + this.onCollapseField(item); + return; + } + this.itemId = item.data.path; + } + + public onSelectVariable(item: TreeListItem) { + if (item.expandable) { + this.onCollapseField(item); + return; + } + this.itemId = item.data.uuid; + } + + public onSubmit(): void { + if (this.itemId) { + const result: IFormulaLink = { + type: this.type, + entityId: this.entityId, + item: this.itemId + } + this.ref.close(result); + } + } +} diff --git a/frontend/src/app/modules/formulas/dialogs/new-formula-dialog/new-formula-dialog.component.html b/frontend/src/app/modules/formulas/dialogs/new-formula-dialog/new-formula-dialog.component.html new file mode 100644 index 0000000000..08a6e5bf22 --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/new-formula-dialog/new-formula-dialog.component.html @@ -0,0 +1,67 @@ +
+
+
{{title}}
+
+
+ +
+
+
+
+
+
+
+ +
+
+ + +
+
+ + +
+ +
+ + + +
+ Policy + {{ currentPolicy.name }} +
+
+ +
+ {{policy.name}} + ({{policy.version}}) +
+
+
+
+
+ +
+
+ \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/dialogs/new-formula-dialog/new-formula-dialog.component.scss b/frontend/src/app/modules/formulas/dialogs/new-formula-dialog/new-formula-dialog.component.scss new file mode 100644 index 0000000000..2da16109a5 --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/new-formula-dialog/new-formula-dialog.component.scss @@ -0,0 +1,58 @@ +.context { + position: relative; + overflow-y: auto; + padding: 14px 0 20px 0; + display: flex; + flex-direction: row; + height: 100%; + font-family: Inter, serif; + font-style: normal; +} + +.dialog-header { + .header-item { + padding: 6px 12px; + margin: 0px 16px; + border-radius: 6px; + font-size: var(--guardian-primary-font-size); + color: var(--guardian-dry-run-color); + background: var(--guardian-dry-run-background); + user-select: none; + cursor: default; + } +} + +form { + width: 100%; + + .guardian-input-container { + input[readonly] { + border: none; + padding-left: 0; + } + } +} + +.guardian-input-container { + margin-bottom: 24px; +} + +.dialog-body { + height: 300px; +} + +.action-buttons { + display: flex; + justify-content: flex-end; + user-select: none; + + &>div { + margin-left: 15px; + margin-right: 0px; + } +} + +.close-icon-color { + fill: #848FA9; + color: #848FA9; +} \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/dialogs/new-formula-dialog/new-formula-dialog.component.ts b/frontend/src/app/modules/formulas/dialogs/new-formula-dialog/new-formula-dialog.component.ts new file mode 100644 index 0000000000..d6e7bab060 --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/new-formula-dialog/new-formula-dialog.component.ts @@ -0,0 +1,80 @@ +import { Component } from '@angular/core'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; +import { DialogService, DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; + +@Component({ + selector: 'new-formula-dialog', + templateUrl: './new-formula-dialog.component.html', + styleUrls: ['./new-formula-dialog.component.scss'], +}) +export class NewFormulaDialog { + public loading = true; + public policy: any; + public policies: any[]; + public dataForm = new FormGroup({ + name: new FormControl('', Validators.required), + description: new FormControl(''), + policy: new FormControl(null, Validators.required) + }); + public title: string; + public action: string; + public readonly: boolean; + + constructor( + public ref: DynamicDialogRef, + public config: DynamicDialogConfig, + private dialogService: DialogService, + ) { + this.title = this.config.data?.title || ''; + this.action = this.config.data?.action || ''; + this.policies = this.config.data?.policies || []; + this.policies = this.policies.filter((p) => p.topicId); + + const formula = this.config.data?.formula; + const id = this.config.data?.policy?.id; + this.policy = this.policies.find((p) => p.id === id) || null; + if (formula) { + this.readonly = true; + this.dataForm.setValue({ + name: formula.name || 'N\\A', + description: formula.description || 'N\\A', + policy: this.policy + }) + } else { + this.readonly = false; + this.dataForm.setValue({ + name: '', + description: '', + policy: this.policy + }) + } + } + + public get currentPolicy(): any { + return this.dataForm.value.policy; + } + + ngOnInit() { + this.loading = false; + } + + ngOnDestroy(): void { + } + + public onClose(): void { + this.ref.close(null); + } + + public onSubmit(): void { + if (this.dataForm.valid) { + const { name, description, policy } = this.dataForm.value; + this.ref.close({ + name, + description, + policyId: policy?.id, + policyTopicId: policy?.topicId, + policyInstanceTopicId: policy?.instanceTopicId, + }); + } + } +} diff --git a/frontend/src/app/modules/formulas/dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component.html b/frontend/src/app/modules/formulas/dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component.html new file mode 100644 index 0000000000..d8732bbcc7 --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component.html @@ -0,0 +1,98 @@ +
+
+
Upload file
+
+
+ +
+
+
+
+ +
+
+
+ + + + +
+ {{ tab.label }} +
+
+
+
+ +
+ + + + + +
+
+ + +
+
+ + +
+
+
+ +
+
+ + +
+
+ + +
+
+
+ +
+ +
+
+ \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component.scss b/frontend/src/app/modules/formulas/dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component.scss new file mode 100644 index 0000000000..fd493f67b8 --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component.scss @@ -0,0 +1,38 @@ +.close-icon-color { + fill: #848FA9; + color: #848FA9; +} + +.context { + position: relative; + overflow-y: auto; + padding: 0px 0 20px 0; + display: flex; + flex-direction: column; + height: 100%; + font-family: Inter, serif; + font-style: normal; +} + +.dialog-body { + height: 320px; +} + +.action-buttons { + display: flex; + justify-content: flex-end; + user-select: none; + + &>div { + margin-left: 15px; + margin-right: 0px; + } +} + +.form-container { + padding-top: 24px; +} + +.guardian-input-container { + margin-bottom: 24px; +} \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component.ts b/frontend/src/app/modules/formulas/dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component.ts new file mode 100644 index 0000000000..62b20bd6cc --- /dev/null +++ b/frontend/src/app/modules/formulas/dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component.ts @@ -0,0 +1,89 @@ +import { ChangeDetectorRef, Component } from '@angular/core'; +import { UntypedFormBuilder, Validators } from '@angular/forms'; +import { DialogService, DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; +import { IPFS_SCHEMA } from 'src/app/services/api'; +import { IPFSService } from 'src/app/services/ipfs.service'; + +@Component({ + selector: 'upload-formula-file-dialog', + templateUrl: './upload-formula-file-dialog.component.html', + styleUrls: ['./upload-formula-file-dialog.component.scss'], +}) +export class UploadFormulaFileDialog { + public loading = true; + public importType: string = 'file'; + public dataForm = this.fb.group({ + name: ['', Validators.required], + url: ['', Validators.required], + }); + public items = [ + { label: 'Import from file' }, + { label: 'Import from IPFS' }, + ]; + public fileExtension = ''; + public placeholder = 'Upload file'; + public step: number = 0; + + constructor( + public ref: DynamicDialogRef, + public config: DynamicDialogConfig, + private dialogService: DialogService, + private fb: UntypedFormBuilder, + private ipfs: IPFSService, + private changeDetectorRef: ChangeDetectorRef, + ) { + + } + + ngOnInit() { + this.loading = false; + this.importType = 'file'; + this.step = 0; + } + + ngOnDestroy(): void { + } + + public setImportType(event: any): void { + this.importType = event.index === 0 ? 'file' : 'url'; + this.step = 0; + this.dataForm.setValue({ + name: '', + url: '' + }) + this.changeDetectorRef.detectChanges(); + } + + public onClose(): void { + this.ref.close(null); + } + + public onSubmit(): void { + if (this.dataForm.valid) { + const { name, url } = this.dataForm.value; + this.ref.close({ + name, + url, + type: this.importType + }); + } + } + + public importFromFile(file: any) { + const name = file.name; + this.upload(name, file); + } + + private upload(name: string, file: any) { + this.loading = true; + this.ipfs.addFile(file) + .subscribe((res) => { + const url = IPFS_SCHEMA + res; + this.dataForm.setValue({ name, url }); + this.step = 1; + this.loading = false; + }, (error) => { + this.loading = false; + }); + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/formula-configuration/formula-configuration.component.html b/frontend/src/app/modules/formulas/formula-configuration/formula-configuration.component.html new file mode 100644 index 0000000000..7c0d1acbcd --- /dev/null +++ b/frontend/src/app/modules/formulas/formula-configuration/formula-configuration.component.html @@ -0,0 +1,361 @@ +
+
+
+
+ +
+ Before starting work you need to get DID + here +
+ +
+
+ +
+ +
+ {{item?.name}} +
+ Policy Name: {{policy.name}} + Version: {{policy.version}} +
+
+
+ +
+
+
+
+
+ + +
+
Overview
+
+
+
+
+ + +
+
Edit Formula
+
+
+
+
+ + +
+
Attach Files
+
+
+
+
+ +
+ +
+
+
+ + +
+
+ + +
+ +
+ + +
+
+
+
+ +
+
Select Type
+ Constant + Variable + Formula + Text +
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+ +
Constant
+
Variable
+
Formula
+
Text
+
+ +
+
+
+
+ + +
+ + +
+ + +
+
+ + +
+ + +
+
+ + +
+ + +
+
+ + +
+
+ + + +
+ {{ option.name || 'N/A' }} +
+
+ +
+ {{ option.name || 'N/A' }} + - {{ option.description }} +
+
+
+
+
+ +
+ + +
+
+ + +
+
+ + + +
+ {{ option.name || 'N/A' }} +
+
+ +
+ {{ option.name || 'N/A' }} + - {{ option.description }} +
+
+
+
+
+ +
+ + +
+
+
+
+
+ + There are no components added yet + Please add a new component to see the data +
+
+
+ + +
+ +
+
+
+
+
+
NAME
+
URL
+
+
+
+
+
+ {{file.name}} +
+
+ +
+
+ +
+
+
+
+
+
+ + +
+
There were no files attached yet.
+
+
+
+ +
+
+
+ + + + + + + + + + +
+
\ No newline at end of file diff --git a/frontend/src/app/modules/formulas/formula-configuration/formula-configuration.component.scss b/frontend/src/app/modules/formulas/formula-configuration/formula-configuration.component.scss new file mode 100644 index 0000000000..2afb2c8923 --- /dev/null +++ b/frontend/src/app/modules/formulas/formula-configuration/formula-configuration.component.scss @@ -0,0 +1,684 @@ +.guardian-page { + position: relative; + padding: 0px; + user-select: none; + + .header-container { + padding: 56px 48px 10px 48px; + background: var(--guardian-primary-color, #4169E2); + min-height: 178px; + height: 178px; + position: relative; + z-index: 2; + + .guardian-user-back-button { + button { + border-color: var(--guardian-background, #FFFFFF); + } + } + + .guardian-user-page-header { + color: var(--guardian-background, #FFFFFF); + } + + + .policy-name { + color: var(--guardian-background, #FFFFFF); + font-size: 14px; + font-weight: 500; + line-height: 16px; + position: absolute; + top: 34px; + right: 0; + + .policy-version { + padding-left: 16px; + } + } + } + + .step-container { + min-height: 40px; + height: 40px; + width: 100%; + display: flex; + justify-content: center; + padding: 0px; + background: var(--guardian-background, #FFFFFF); + border-bottom: 1px solid var(--guardian-border-color, #E1E7EF); + position: relative; + box-shadow: 0px 4px 8px 0px var(--guardian-shadow, #00000014); + position: relative; + z-index: 2; + } + + .overview-viewer { + position: relative; + z-index: 0; + + form { + box-shadow: 0px 4px 8px 0px var(--guardian-shadow, #00000014); + background: var(--guardian-background, #FFFFFF); + padding: 24px 24px 2px 24px; + border-radius: 8px; + + .guardian-input-container { + margin-bottom: 24px; + } + } + } + + .body-container { + position: relative; + z-index: 0; + width: 100%; + height: 100%; + user-select: none; + position: relative; + padding: 32px 48px 16px 48px; + overflow: auto; + + .item-filters { + display: flex; + flex-direction: row; + margin-bottom: 24px; + + .item-filters-header { + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 16px; + color: #848FA9; + margin-right: 24px; + height: 24px; + padding: 6px 0px; + } + + .item-filter { + margin-right: 8px; + height: 28px; + min-width: 108px; + } + + .constant-filter { + --checkbox-button-on-first-color: var(--formula-constant-color, #4169E2); + --checkbox-button-on-second-color: var(--formula-constant-background, #e1e7fa); + } + + .variable-filter { + --checkbox-button-on-first-color: var(--formula-variable-color, #DA9B22); + --checkbox-button-on-second-color: var(--formula-variable-background, #FFF6E3); + } + + .formula-filter { + --checkbox-button-on-first-color: var(--formula-function-color, #E50299); + --checkbox-button-on-second-color: var(--formula-function-background, #fbd9ef); + } + + .text-filter { + --checkbox-button-on-first-color: var(--formula-text-color, #19BE47); + --checkbox-button-on-second-color: var(--formula-text-background, #d7f5e2); + } + } + } + + &[keyboard="true"] { + .body-container { + // top: -270px; + margin-bottom: 265px; + } + } + + .action-container { + position: relative; + z-index: 1; + height: 64px; + min-height: 64px; + display: flex; + flex-direction: row; + border-top: 1px solid var(--guardian-grey-color-2, #E1E7EF); + background: #fff; + padding: 12px 48px; + position: relative; + + button { + height: 40px; + margin-right: 18px; + min-width: 140px; + } + + menu-button { + height: 40px; + width: 210px; + } + + .save-button { + position: absolute; + top: 12px; + right: 48px; + margin-right: 0px; + } + } +} + +.file-menu { + display: flex; + justify-content: flex-end; + height: 40px; + width: 100%; + + button { + min-width: 125px; + } +} + +.files-viewer { + padding: 16px 48px 32px 48px; + position: absolute; + left: 0; + right: 0; + top: 80px; + bottom: 0; + overflow: auto; + + .variables-container { + box-shadow: 0px 4px 8px 0px var(--guardian-shadow, #00000014); + background: var(--guardian-background, #FFFFFF); + padding: 24px; + border-radius: 8px; + margin-bottom: 16px; + min-width: 1300px; + + .variables-header { + color: var(--guardian-font-color, #23252E); + font-size: 16px; + font-weight: 600; + line-height: 20px; + text-align: left; + padding-bottom: 16px; + } + + .variables-empty-grid { + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: var(--guardian-disabled-color, #848FA9); + height: 87px; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + } + + .variables-grid { + overflow: auto; + display: grid; + + .cell-48 { + min-width: 48px; + width: 48px; + max-width: 48px; + } + + .cell-56 { + min-width: 56px; + width: 56px; + max-width: 56px; + } + + .cell-64 { + min-width: 64px; + width: 64px; + max-width: 64px; + } + + .cell-84 { + min-width: 84px; + width: 84px; + max-width: 84px; + } + + .cell-125 { + min-width: 115px; + width: 115px; + max-width: 115px; + } + + .cell-150 { + min-width: 150px; + width: 150px; + max-width: 150px; + } + + .cell-200 { + min-width: 200px; + width: 200px; + max-width: 200px; + } + + .cell-250 { + min-width: 250px; + width: 250px; + max-width: 250px; + } + + .cell-300 { + min-width: 300px; + width: 300px; + max-width: 300px; + } + + .cell-max { + min-width: 250px; + width: auto; + } + + .cell-btn { + button { + width: 24px; + height: 24px; + margin-left: 7px; + } + } + + .cell-multiselect { + padding: 1px 10px !important; + } + + .cell-select { + padding: 1px 1px !important; + + &::ng-deep { + .p-dropdown-label { + padding-left: 16px; + } + } + } + + .variables-grid-cell { + min-height: 40px; + padding: 6px 16px; + display: flex; + align-items: center; + width: 100%; + position: relative; + font-family: Inter; + font-size: 14px; + font-weight: 400; + text-align: left; + user-select: text; + + .cell-focus { + display: none; + position: absolute; + top: -1px; + left: -1px; + right: -1px; + bottom: -1px; + border: 1px solid var(--guardian-primary-color, #4169E2); + } + + &:first-child { + .cell-focus { + left: -9px; + } + } + + .p-inputwrapper-focus+.cell-focus, + .guardian-input:focus+.cell-focus { + display: block; + } + } + + .variables-grid-cell-transparent { + border-right: 1px solid transparent !important; + } + + .variables-grid-row { + &:first-child .variables-grid-cell:first-child .cell-focus { + border-top-left-radius: 8px; + } + + &:last-child .variables-grid-cell:first-child .cell-focus { + border-bottom-left-radius: 8px; + } + } + + .variables-grid-header { + display: flex; + flex-direction: row; + padding: 0px 8px; + width: 100%; + min-width: 100%; + + &>div { + color: var(--guardian-disabled-color, #848FA9); + font-family: Inter; + font-size: 12px; + font-weight: 400; + text-align: left; + } + } + + .variables-grid-body { + width: 100%; + min-width: 100%; + border: 1px solid var(--guardian-border-color, #E1E7EF); + border-radius: 8px; + + .variables-grid-row { + min-height: 40px; + display: flex; + flex-direction: row; + border-bottom: 1px solid var(--guardian-border-color, #E1E7EF); + padding: 0px 8px; + + &>div { + border-right: 1px solid var(--guardian-border-color, #E1E7EF); + + &:last-child { + border-right: none; + } + } + + &:last-child { + border-bottom: none; + } + } + + .rule-type-name { + background: #E1E7EF; + height: 28px; + padding: 4px 10px 4px 10px; + border-radius: 6px; + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 16px; + text-align: left; + color: #848FA9; + text-transform: capitalize; + display: flex; + justify-content: center; + align-items: center; + } + } + } + + .variables-actions { + padding-top: 24px; + + button { + height: 28px; + width: 120px; + } + } + } + + .cell-option-values { + .cell-option-value { + width: 270px; + height: 30px; + padding: 7px 8px 7px 8px; + border-radius: 6px; + background: var(--guardian-grey-color, #EFF3F7); + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 16px; + text-align: left; + color: var(--guardian-disabled-color, #848FA9); + margin-bottom: 8px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } +} + +.formula-link { + height: 40px; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: #000; + padding: 10px 16px; + position: relative; + cursor: pointer; + + &:hover { + border: 1px solid var(--guardian-primary-color, #4169E2); + } + + .formula-link-remove { + position: absolute; + top: 4px; + right: 4px; + height: 30px; + width: 30px; + + button { + height: 30px; + width: 30px; + } + } + + .formula-link-value { + display: flex; + flex-direction: row; + + &__entity { + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 16px; + color: var(--guardian-entity-color, #DA9B22); + margin-right: 8px; + } + + &__item { + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 16px; + } + } +} + +.guardian-input-container { + margin-bottom: 16px; +} + +.guardian-textarea-container { + margin-bottom: 16px; +} + +.multiselect-selected-value { + width: auto; + height: 30px; + padding: 7px 12px 7px 12px; + border-radius: 6px; + background: var(--guardian-grey-color, #EFF3F7); + color: var(--guardian-disabled-color, #848FA9); + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 16px; + text-align: left; + margin-right: 8px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + display: inline-flex; +} + +.multiselect-selected-value:last-child { + margin-right: 0px; +} + +.relationships-multiselect::ng-deep .p-multiselect-label { + padding: 4px 8px !important; +} + +.not-exist { + position: absolute; + left: 48px; + right: 48px; + bottom: 56px; + top: 50%; + transform: translate(0px, -50%); + color: var(--color-grey-black-2); + font-family: Inter, serif; + font-size: 20px; + font-style: normal; + font-weight: 400; + line-height: 16px; + display: flex; + flex-direction: column; + align-items: center; + row-gap: 8px; + justify-content: center; + + .info-text { + color: var(--color-grey-5, #848fa9); + text-align: center; + font-family: Inter, sans-serif; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; + } + + .info-text-strong { + color: var(--color-grey-5, #848fa9); + text-align: center; + font-family: Inter, sans-serif; + font-size: 16px; + font-style: normal; + font-weight: 600; + line-height: normal; + } +} + +@media (max-height: 767px) { + .guardian-page[keyboard="true"] { + .body-container { + // top: -270px; + margin-bottom: 190px; + } + } +} + +.formula-item { + box-shadow: 0px 4px 8px 0px var(--guardian-shadow, #00000014); + background: var(--guardian-background, #FFFFFF); + border-radius: 8px; + margin-bottom: 16px; + display: flex; + flex-direction: row; + overflow: hidden; + + .formula-item-icon { + width: 32px; + min-width: 32px; + width: 32px; + min-width: 32px; + display: flex; + justify-content: center; + align-items: center; + cursor: move; + + * { + pointer-events: none; + } + + &[readonly="true"] { + cursor: default; + } + } + + .formula-item-container { + width: 100%; + padding: 16px; + + .formula-item-header { + height: 24px; + width: 100%; + margin-bottom: 16px; + position: relative; + display: flex; + + &__icon { + margin-right: 8px; + } + + &__name { + font-family: Poppins; + font-size: 16px; + font-weight: 600; + height: 24px; + line-height: 24px; + } + + &__delete { + position: absolute; + top: 0px; + right: 0px; + width: 24px; + height: 24px; + + .guardian-icon-button { + width: 24px; + height: 24px; + } + } + } + + .formula-item-body {} + } + + &[type="constant"] { + border: 1px solid var(--formula-constant-color, #4169E2); + + .formula-item-icon { + background: var(--formula-constant-background, #e1e7fa); + border-right: 1px solid #E1E7EF; + } + } + + &[type="variable"] { + border: 1px solid var(--formula-variable-color, #DA9B22); + + .formula-item-icon { + background: var(--formula-variable-background, #FFF6E3); + border-right: 1px solid #E1E7EF; + } + } + + &[type="formula"] { + border: 1px solid var(--formula-function-color, #E50299); + + .formula-item-icon { + background: var(--formula-function-background, #fbd9ef); + border-right: 1px solid #E1E7EF; + } + } + + &[type="text"] { + border: 1px solid var(--formula-text-color, #19BE47); + + .formula-item-icon { + background: var(--formula-text-background, #d7f5e2); + border-right: 1px solid #E1E7EF; + } + } +} + +.cdk-drag.formula-item.cdk-drag-preview {} + +.formula-item.cdk-drag-placeholder { + opacity: 0.5; +} \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/formula-configuration/formula-configuration.component.ts b/frontend/src/app/modules/formulas/formula-configuration/formula-configuration.component.ts new file mode 100644 index 0000000000..c2fe069366 --- /dev/null +++ b/frontend/src/app/modules/formulas/formula-configuration/formula-configuration.component.ts @@ -0,0 +1,393 @@ +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { IFormulaItem, FormulaItemType, IFormulaLink, Schema, UserPermissions, EntityStatus } from '@guardian/interfaces'; +import { forkJoin, Subscription } from 'rxjs'; +import { ProfileService } from 'src/app/services/profile.service'; +import { FormulasService } from 'src/app/services/formulas.service'; +import { CustomConfirmDialogComponent } from '../../common/custom-confirm-dialog/custom-confirm-dialog.component'; +import { DialogService } from 'primeng/dynamicdialog'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; +import { MathLiveComponent } from '../../common/mathlive/mathlive.component'; +import { LinkDialog } from '../dialogs/link-dialog/link-dialog.component'; +import { Formulas } from '../models/formulas'; +import { CdkDragDrop } from '@angular/cdk/drag-drop'; +import { UploadFormulaFileDialog } from '../dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component'; + +@Component({ + selector: 'app-formula-configuration', + templateUrl: './formula-configuration.component.html', + styleUrls: ['./formula-configuration.component.scss'], +}) +export class FormulaConfigurationComponent implements OnInit { + public readonly title: string = 'Configuration'; + + @ViewChild('body', { static: true }) body: ElementRef; + + public loading: boolean = true; + public isConfirmed: boolean = false; + public user: UserPermissions = new UserPermissions(); + public owner: string; + + private subscription = new Subscription(); + private formulaId: string; + + public item: any; + public policy: any; + public schemas: Schema[]; + public formulas: any[]; + public readonly: boolean = false; + public keyboard: boolean = false; + + public config: Formulas = new Formulas(); + public readonly options = [ + { + id: 'constant', + text: 'Add New Constant', + icon: 'const', + color: 'icon-color-primary' + }, + { + id: 'variable', + text: 'Add New Variable', + icon: 'variable', + color: 'icon-color-primary' + }, + { + id: 'formula', + text: 'Add New Formula', + icon: 'function', + color: 'icon-color-primary' + }, + { + id: 'text', + text: 'Add New Text', + icon: 'text', + color: 'icon-color-primary' + } + ]; + + public readonly filters = { + constant: true, + variable: true, + formula: true, + text: true + } + + public stepper = [true, false]; + + public overviewForm = new FormGroup({ + name: new FormControl('', Validators.required), + description: new FormControl(''), + policy: new FormControl('', Validators.required), + }); + + private schemasMap: Map = new Map(); + private schemasFieldMap: Map = new Map(); + private formulasMap: Map = new Map(); + private formulasFieldMap: Map = new Map(); + + constructor( + private profileService: ProfileService, + private formulasService: FormulasService, + private dialogService: DialogService, + private router: Router, + private route: ActivatedRoute + ) { + } + + ngOnInit() { + this.subscription.add( + this.route.queryParams.subscribe((queryParams) => { + this.loadProfile(); + }) + ); + } + + ngOnDestroy(): void { + this.subscription.unsubscribe(); + } + + private loadProfile() { + this.isConfirmed = false; + this.loading = true; + this.profileService + .getProfile() + .subscribe((profile) => { + this.isConfirmed = !!(profile && profile.confirmed); + this.user = new UserPermissions(profile); + this.owner = this.user.did; + + if (this.isConfirmed) { + this.loadData(); + } else { + setTimeout(() => { + this.loading = false; + }, 500); + } + }, (e) => { + this.loading = false; + }); + } + + private loadData() { + this.formulaId = this.route.snapshot.params['formulaId']; + this.loading = true; + forkJoin([ + this.formulasService.getFormula(this.formulaId), + this.formulasService.getRelationships(this.formulaId), + ]).subscribe(([item, relationships]) => { + this.item = item; + this.readonly = this.item?.status === EntityStatus.PUBLISHED; + this.updateRelationships(relationships); + + this.overviewForm.setValue({ + name: item.name || '', + description: item.description || '', + policy: this.policy?.name || '', + }); + this.config.fromData(item?.config); + + setTimeout(() => { + this.loading = false; + }, 1000); + }, (e) => { + this.loading = false; + }); + } + + private updateRelationships(relationships: any) { + this.policy = relationships?.policy || {}; + const schemas = relationships?.schemas || []; + const formulas = relationships?.formulas || []; + + this.schemas = []; + for (const schema of schemas) { + try { + const item = new Schema(schema); + this.schemas.push(item); + } catch (error) { + console.log(error); + } + } + + this.schemasMap.clear(); + this.schemasFieldMap.clear(); + for (const schema of this.schemas) { + this.schemasMap.set(String(schema.iri), String(schema.name)); + const fields = schema.getFields(); + for (const field of fields) { + this.schemasFieldMap.set(`${schema.iri}.${field.path}`, String(field.description)); + } + } + + this.formulas = []; + for (const formula of formulas) { + this.formulas.push(formula); + } + + this.formulasMap.clear(); + this.formulasFieldMap.clear(); + this.formulasMap.set(String(this.item.uuid), String(this.item.name)); + for (const formula of this.formulas) { + this.formulasMap.set(String(formula.uuid), String(formula.name)); + const fields = formula?.config?.formulas || []; + for (const field of fields) { + this.formulasFieldMap.set(`${formula.uuid}.${field.uuid}`, String(field.name)); + } + } + } + + public onBack() { + this.router.navigate(['/formulas']); + } + + public onSave() { + this.loading = true; + const config = this.config.getJson(); + const value = this.overviewForm.value; + const item = { + ...this.item, + name: value.name, + description: value.description, + config + }; + this.formulasService + .updateFormula(item) + .subscribe((data) => { + this.item = data; + this.formulasMap.set(String(this.item.uuid), String(this.item.name)); + setTimeout(() => { + this.loading = false; + }, 1000); + }, (e) => { + this.loading = false; + }); + } + + public addItem(option: any) { + const type: FormulaItemType = option.id; + this.config.add(type); + } + + public deleteItem(item: any) { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { + showHeader: false, + width: '640px', + styleClass: 'guardian-dialog', + data: { + header: 'Delete item', + text: 'Are you sure want to delete item?', + buttons: [{ + name: 'Close', + class: 'secondary' + }, { + name: 'Delete', + class: 'delete' + }] + }, + }); + dialogRef.onClose.subscribe((result: string) => { + if (result === 'Delete') { + this.config.delete(item); + } + }); + } + + public deleteFile(file: any) { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { + showHeader: false, + width: '640px', + styleClass: 'guardian-dialog', + data: { + header: 'Delete file', + text: 'Are you sure want to delete file?', + buttons: [{ + name: 'Close', + class: 'secondary' + }, { + name: 'Delete', + class: 'delete' + }] + }, + }); + dialogRef.onClose.subscribe((result: string) => { + if (result === 'Delete') { + this.config.deleteFile(file); + } + }); + } + + public onFilter() { + this.config.setFilters(this.filters); + } + + public onStep(index: number) { + this.loading = true; + for (let i = 0; i < this.stepper.length; i++) { + this.stepper[i] = false; + } + this.stepper[index] = true; + this.loading = false; + this.keyboard = false; + } + + public isActionStep(index: number): boolean { + return this.stepper[index]; + } + + public onKeyboard($event: boolean) { + this.keyboard = $event; + } + + public onKeyboardFocus($event: MathLiveComponent) { + setTimeout(() => { + if (this.keyboard) { + const focus = $event.getElement(); + const scroll = this.body; + const targetRect = focus.nativeElement.getBoundingClientRect(); + const scrollRect = scroll.nativeElement.getBoundingClientRect(); + const y = targetRect.y - scrollRect.y; + const height = scrollRect.height; + const d = y - height + 60; + if (d > 0) { + scroll.nativeElement.scrollTop += d; + } + } + }); + } + + public onLink(item: IFormulaItem) { + if (this.readonly) { + return; + } + const dialogRef = this.dialogService.open(LinkDialog, { + showHeader: false, + width: '800px', + styleClass: 'guardian-dialog', + data: { + link: item.link, + schemas: this.schemas, + formulas: [ + this.item, + ...this.formulas + ] + }, + }); + dialogRef.onClose.subscribe((result: IFormulaLink | null) => { + if (result) { + item.link = result + } + }); + } + + public getEntityName(link: IFormulaLink): string { + if (link.type === 'schema') { + return this.schemasMap.get(link.entityId) || ''; + } + if (link.type === 'formula') { + return this.formulasMap.get(link.entityId) || ''; + } + return ''; + } + + public getFieldName(link: IFormulaLink): string { + if (link.type === 'schema') { + return this.schemasFieldMap.get(`${link.entityId}.${link.item}`) || ''; + } + if (link.type === 'formula') { + if (link.entityId === this.item?.uuid) { + return this.config.getItem(link.item)?.name || ''; + } else { + return this.formulasFieldMap.get(`${link.entityId}.${link.item}`) || ''; + } + } + return ''; + } + + public deleteLink(item: IFormulaItem, $event: any) { + if (this.readonly) { + return; + } + $event.preventDefault(); + $event.stopPropagation(); + item.link = null; + } + + public drop(event: CdkDragDrop) { + this.config.reorder(event.previousIndex, event.currentIndex); + } + + public uploadFile() { + const dialogRef = this.dialogService.open(UploadFormulaFileDialog, { + showHeader: false, + width: '640px', + styleClass: 'guardian-dialog', + data: {}, + }); + dialogRef.onClose.subscribe((result: any) => { + if(result) { + this.config.addFile(result); + } + }); + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/formulas.module.ts b/frontend/src/app/modules/formulas/formulas.module.ts new file mode 100644 index 0000000000..a8bcc64637 --- /dev/null +++ b/frontend/src/app/modules/formulas/formulas.module.ts @@ -0,0 +1,67 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { AngularSvgIconModule } from 'angular-svg-icon'; +import { InputTextModule } from 'primeng/inputtext'; +import { DialogService, DynamicDialogModule } from 'primeng/dynamicdialog'; +import { TableModule } from 'primeng/table'; +import { TooltipModule } from 'primeng/tooltip'; +import { DropdownModule } from 'primeng/dropdown'; +import { TabViewModule } from 'primeng/tabview'; +import { CheckboxModule } from 'primeng/checkbox'; +import { RadioButtonModule } from 'primeng/radiobutton'; +import { MultiSelectModule } from 'primeng/multiselect'; +import { OverlayPanelModule } from 'primeng/overlaypanel'; +import { DragDropModule } from 'primeng/dragdrop'; +import { TreeModule } from 'primeng/tree'; +import { TreeDragDropService } from 'primeng/api'; +import { TieredMenuModule } from 'primeng/tieredmenu'; +import { AppRoutingModule } from 'src/app/app-routing.module'; +import { MaterialModule } from 'src/app/modules/common/material.module'; +import { CommonComponentsModule } from '../common/common-components.module'; +import { LinkDialog } from './dialogs/link-dialog/link-dialog.component'; +import { FormulasComponent } from './formulas/formulas.component'; +import { FormulaConfigurationComponent } from './formula-configuration/formula-configuration.component'; +import { NewFormulaDialog } from './dialogs/new-formula-dialog/new-formula-dialog.component'; +import { FormulasViewDialog } from './dialogs/formulas-view-dialog/formulas-view-dialog.component'; +import { UploadFormulaFileDialog } from './dialogs/upload-formula-file-dialog/upload-formula-file-dialog.component'; + +@NgModule({ + declarations: [ + FormulasComponent, + FormulaConfigurationComponent, + NewFormulaDialog, + LinkDialog, + FormulasViewDialog, + UploadFormulaFileDialog + ], + imports: [ + CommonModule, + FormsModule, + MaterialModule, + CommonComponentsModule, + AppRoutingModule, + DynamicDialogModule, + TableModule, + TooltipModule, + InputTextModule, + DropdownModule, + TabViewModule, + CheckboxModule, + RadioButtonModule, + MultiSelectModule, + OverlayPanelModule, + DragDropModule, + TreeModule, + TieredMenuModule, + AngularSvgIconModule.forRoot(), + ], + exports: [ + FormulasViewDialog + ], + providers: [ + DialogService, + TreeDragDropService + ], +}) +export class FormulasModule { } diff --git a/frontend/src/app/modules/formulas/formulas/formulas.component.html b/frontend/src/app/modules/formulas/formulas/formulas.component.html new file mode 100644 index 0000000000..874f221ddb --- /dev/null +++ b/frontend/src/app/modules/formulas/formulas/formulas.component.html @@ -0,0 +1,189 @@ +
+
+
+
+ +
+ Before starting work you need to get DID + here +
+ + + +
+
+ + +
+ Policy + {{ currentPolicy.name }} +
+
+ Policy + All +
+
+ +
+ {{policy.name}} + ({{policy.version}}) +
+
+ All +
+
+
+
+
+ + + +
+
+ +
+ +
+ + + + + {{column.title}} + + + + + + + + + + {{ row.policyTopicId }} + + + + + {{ row.policy }} + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ + {{row[column.id]}} + + +
+ +
+
+
+ +
+
+
+ +
+ + There were no formula created yet + Please create new formula to see the data +
+
+
+
\ No newline at end of file diff --git a/frontend/src/app/modules/formulas/formulas/formulas.component.scss b/frontend/src/app/modules/formulas/formulas/formulas.component.scss new file mode 100644 index 0000000000..1f69ba9431 --- /dev/null +++ b/frontend/src/app/modules/formulas/formulas/formulas.component.scss @@ -0,0 +1,43 @@ +.page-header { + font-size: 32px; + font-weight: 600; + color: var(--guardian-header-color, #000); + height: 72px; + padding: 8px 0px 26px 0px; + position: relative; +} + +.policy-name { + color: var(--guardian-disabled-color, #848FA9); + font-size: 14px; + font-weight: 500; + line-height: 16px; + position: absolute; + top: 34px; + right: 0; + + .policy-version { + padding-left: 16px; + } +} +.guardian-dropdown { + &::ng-deep .p-dropdown { + width: 250px; + } +} + +.grid-btn { + width: 80px; + height: 30px; + margin-right: 16px; + + &:last-child { + margin-right: 0px; + } +} + +a { + color: var(--color-primary); + cursor: pointer; + text-decoration: underline; +} \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/formulas/formulas.component.ts b/frontend/src/app/modules/formulas/formulas/formulas.component.ts new file mode 100644 index 0000000000..c5ff707d54 --- /dev/null +++ b/frontend/src/app/modules/formulas/formulas/formulas.component.ts @@ -0,0 +1,393 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { EntityStatus, PolicyType, UserPermissions } from '@guardian/interfaces'; +import { forkJoin, Subscription } from 'rxjs'; +import { PolicyEngineService } from 'src/app/services/policy-engine.service'; +import { ProfileService } from 'src/app/services/profile.service'; +import { DialogService } from 'primeng/dynamicdialog'; +import { FormulasService } from 'src/app/services/formulas.service'; +import { CustomConfirmDialogComponent } from '../../common/custom-confirm-dialog/custom-confirm-dialog.component'; +import { IImportEntityResult, ImportEntityDialog, ImportEntityType } from '../../common/import-entity-dialog/import-entity-dialog.component'; +import { NewFormulaDialog } from '../dialogs/new-formula-dialog/new-formula-dialog.component'; + +interface IColumn { + id: string; + title: string; + type: string; + size: string; + tooltip: boolean; + permissions?: (user: UserPermissions) => boolean; + canDisplay?: () => boolean; +} + +@Component({ + selector: 'app-formulas', + templateUrl: './formulas.component.html', + styleUrls: ['./formulas.component.scss'], +}) +export class FormulasComponent implements OnInit { + public readonly title: string = 'Formulas'; + + public loading: boolean = true; + public isConfirmed: boolean = false; + public user: UserPermissions = new UserPermissions(); + public owner: string; + public page: any[]; + public pageIndex: number; + public pageSize: number; + public pageCount: number; + public columns: IColumn[]; + public allPolicies: any[] = []; + public currentPolicy: any = null; + + private subscription = new Subscription(); + + constructor( + private profileService: ProfileService, + private formulasService: FormulasService, + private policyEngineService: PolicyEngineService, + private dialogService: DialogService, + private router: Router, + private route: ActivatedRoute + ) { + this.columns = [{ + id: 'name', + title: 'Name', + type: 'text', + size: 'auto', + tooltip: true + }, { + id: 'policy', + title: 'Policy', + type: 'text', + size: 'auto', + tooltip: false + }, { + id: 'topic', + title: 'Topic', + type: 'text', + size: '180', + tooltip: false + }, { + id: 'status', + title: 'Status', + type: 'text', + size: '180', + tooltip: false + }, { + id: 'edit', + title: '', + type: 'text', + size: '56', + tooltip: false + }, { + id: 'export', + title: '', + type: 'text', + size: '56', + tooltip: false + }, { + id: 'delete', + title: '', + type: 'text', + size: '64', + tooltip: false + }] + } + + public statuses = [{ + label: 'Draft', + value: EntityStatus.DRAFT, + description: 'Return to editing.', + disable: true + }, { + label: 'Published', + value: EntityStatus.PUBLISHED, + description: 'Release version into public domain.', + disable: (value: string, item?: any): boolean => { + return ( + (value !== EntityStatus.DRAFT && value !== EntityStatus.ERROR) || + (item?.policyStatus !== PolicyType.PUBLISH) + ); + } + }, { + label: 'Error', + value: EntityStatus.ERROR, + description: '', + disable: true + }] + + ngOnInit() { + this.page = []; + this.pageIndex = 0; + this.pageSize = 10; + this.pageCount = 0; + this.subscription.add( + this.route.queryParams.subscribe((queryParams) => { + this.loadProfile(); + }) + ); + } + + ngOnDestroy(): void { + this.subscription.unsubscribe(); + } + + private loadProfile() { + this.isConfirmed = false; + this.loading = true; + forkJoin([ + this.profileService.getProfile(), + this.policyEngineService.all(), + ]).subscribe(([profile, policies]) => { + this.isConfirmed = !!(profile && profile.confirmed); + this.user = new UserPermissions(profile); + this.owner = this.user.did; + this.allPolicies = policies || []; + this.allPolicies.unshift({ + name: 'All', + id: null + }); + this.allPolicies.forEach((p: any) => p.label = p.name); + + const policy = this.route.snapshot.queryParams['policy']; + if(policy) { + this.currentPolicy = this.allPolicies.find((p) => p.id === policy); + } + + if(!this.currentPolicy) { + this.currentPolicy = this.allPolicies[0]; + } + + if (this.isConfirmed) { + this.loadData(); + } else { + setTimeout(() => { + this.loading = false; + }, 500); + } + }, (e) => { + this.loading = false; + }); + } + + private loadData() { + const filters: any = {}; + if (this.currentPolicy?.id) { + filters.policyId = this.currentPolicy?.id; + } + this.loading = true; + this.formulasService + .getFormulas( + this.pageIndex, + this.pageSize, + filters + ) + .subscribe((response) => { + const { page, count } = this.formulasService.parsePage(response); + this.page = page; + this.pageCount = count; + for (const item of this.page) { + const policy = this.allPolicies.find((p) => p.id && p.id === item.policyId); + item.policy = policy?.name; + item.policyStatus = policy?.status; + } + setTimeout(() => { + this.loading = false; + }, 500); + }, (e) => { + this.loading = false; + }); + } + + public onBack() { + this.router.navigate(['/policy-viewer']); + } + + public onPage(event: any): void { + if (this.pageSize != event.pageSize) { + this.pageIndex = 0; + this.pageSize = event.pageSize; + } else { + this.pageIndex = event.pageIndex; + this.pageSize = event.pageSize; + } + this.loadData(); + } + + public onFilter(event: any) { + if (event.value === null) { + this.currentPolicy = this.allPolicies[0]; + } + this.pageIndex = 0; + const policy = this.currentPolicy?.id || 'all' + this.router.navigate(['/formulas'], { queryParams: { policy } }); + this.loadData(); + } + + public onCreate() { + const dialogRef = this.dialogService.open(NewFormulaDialog, { + showHeader: false, + width: '720px', + styleClass: 'guardian-dialog', + data: { + title: 'Create New', + policies: this.allPolicies, + policy: this.currentPolicy, + action: 'Create' + } + }); + dialogRef.onClose.subscribe(async (result) => { + if (result) { + this.loading = true; + this.formulasService + .createFormula(result) + .subscribe((newItem) => { + this.loadData(); + }, (e) => { + this.loading = false; + }); + } + }); + } + + public onEdit(item: any) { + this.router.navigate(['/formulas', item.id]); + } + + public onImport() { + const dialogRef = this.dialogService.open(ImportEntityDialog, { + showHeader: false, + width: '720px', + styleClass: 'guardian-dialog', + data: { + type: ImportEntityType.Formula, + } + }); + dialogRef.onClose.subscribe(async (result: IImportEntityResult | null) => { + if (result) { + this.importDetails(result); + } + }); + } + + private importDetails(result: IImportEntityResult) { + const { type, data, formula } = result; + const dialogRef = this.dialogService.open(NewFormulaDialog, { + showHeader: false, + width: '720px', + styleClass: 'guardian-dialog', + data: { + title: 'Preview', + action: 'Import', + policies: this.allPolicies, + policy: this.currentPolicy, + formula + } + }); + dialogRef.onClose.subscribe(async (result) => { + if (result && result.policyId) { + this.loading = true; + this.formulasService + .import(result.policyId, data) + .subscribe((newItem) => { + this.loadData(); + }, (e) => { + this.loading = false; + }); + } + }); + } + + public onExport(item: any) { + this.loading = true; + this.formulasService.export(item.id) + .subscribe((fileBuffer) => { + const downloadLink = document.createElement('a'); + downloadLink.href = window.URL.createObjectURL( + new Blob([new Uint8Array(fileBuffer)], { + type: 'application/guardian-formula' + }) + ); + downloadLink.setAttribute('download', `${item.name}_${Date.now()}.formula`); + document.body.appendChild(downloadLink); + downloadLink.click(); + downloadLink.remove(); + setTimeout(() => { + this.loading = false; + }, 500); + }, (error) => { + this.loading = false; + }); + } + + public onDelete(item: any) { + if (item.status === EntityStatus.PUBLISHED) { + return; + } + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { + showHeader: false, + width: '640px', + styleClass: 'guardian-dialog', + data: { + header: 'Delete formula', + text: `Are you sure want to delete formula (${item.name})?`, + buttons: [{ + name: 'Close', + class: 'secondary' + }, { + name: 'Delete', + class: 'delete' + }] + }, + }); + dialogRef.onClose.subscribe((result: string) => { + if (result === 'Delete') { + this.loading = true; + this.formulasService + .deleteFormula(item.id) + .subscribe((result) => { + this.loadData(); + }, (e) => { + this.loading = false; + }); + } + }); + } + + public onChangeStatus($event: string, row: any): void { + this.publish(row) + } + + private publish(row: any) { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { + showHeader: false, + width: '640px', + styleClass: 'guardian-dialog', + data: { + header: 'Publish Formula', + text: `Are you sure want to publish formula (${row.name})?`, + buttons: [{ + name: 'Close', + class: 'secondary' + }, { + name: 'Publish', + class: 'primary' + }] + }, + }); + dialogRef.onClose.subscribe((result: string) => { + if (result === 'Publish') { + this.loading = true; + this.formulasService + .publish(row) + .subscribe((response) => { + this.loadData(); + }, (e) => { + this.loading = false; + }); + } + }); + + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/models/formula-tree.ts b/frontend/src/app/modules/formulas/models/formula-tree.ts new file mode 100644 index 0000000000..afb181a1f3 --- /dev/null +++ b/frontend/src/app/modules/formulas/models/formula-tree.ts @@ -0,0 +1,636 @@ +import { IFormulaItem, IFormula, IFormulaLink, FormulaItemType, Schema, SchemaField, IVCDocument, ISchema, IVPDocument, IVC, IVP, ICredentialSubject, IFormulaFile } from "@guardian/interfaces"; + +export interface Link { + schema: string; + path: string; + item: FormulaItem; +} + +export class FormulaFiles { + public readonly name: string; + public readonly type: string; + public readonly url: string; + + constructor(config: IFormulaFile) { + this.name = config.name || ''; + this.type = config.type || ''; + this.url = config.url || ''; + } +} + +export class DocumentItem { + private _type: Set; + private _map: Map; + + constructor(document: IVCDocument | IVPDocument) { + this._type = new Set(); + this._map = new Map(); + this.parsDoc(document); + } + + private parsDoc(document: IVCDocument | IVPDocument) { + try { + if (!document || !document.document) { + return; + } + const json = document.document; + if ((json as IVC).credentialSubject) { + this.parsVC(json as IVC); + } else if ((json as IVP).verifiableCredential) { + this.parsVP(json as IVP); + } else { + return; + } + } catch (error) { + console.error(error); + } + } + + private addValue(key: string, value: any, prev?: string) { + if (value) { + let path: string; + if (prev) { + if (key) { + path = `${prev}.${key}`; + } else { + path = `${prev}`; + } + } else { + if (key) { + path = `${key}`; + } else { + path = ''; + } + } + switch (typeof value) { + case 'boolean': + case 'number': + case 'string': { + const old = this._map.get(path); + if (old) { + if (Array.isArray(old)) { + old.push(value); + this._map.set(path, old); + } else { + this._map.set(path, [old, value]); + } + } else { + this._map.set(path, value); + } + break; + } + case 'object': { + if (Array.isArray(value)) { + for (const e of value) { + this.addValue('', e, path); + } + } else { + this.parsFields(value, path); + } + break; + } + default: { + return; + } + } + } + } + + private parsFields(json: any, prev?: string) { + if (json) { + for (const [key, value] of Object.entries(json)) { + this.addValue(key, value, prev); + } + } + } + + private parsCredentialSubject(cs: any) { + if (cs) { + this._type.add(cs.type); + this.parsFields(cs); + } + } + + private parsVC(vc: IVC) { + if (vc && vc.credentialSubject) { + if (Array.isArray(vc.credentialSubject)) { + for (const cs of vc.credentialSubject) { + this.parsCredentialSubject(cs); + } + } else { + this.parsCredentialSubject(vc.credentialSubject); + } + } + } + + private parsVP(vp: IVP) { + if (vp && vp.verifiableCredential) { + if (Array.isArray(vp.verifiableCredential)) { + for (const vc of vp.verifiableCredential) { + this.parsVC(vc); + } + } else { + this.parsVC(vp.verifiableCredential); + } + } + } + + public has(type?: string): boolean { + if (type) { + return this._type.has(type); + } + return false; + } + + public get(path?: string): any { + if (path) { + return this._map.get(path); + } + return null; + } +} + +export class SchemaItem { + public readonly type = 'schema'; + + private _value: any; + private _schema: Schema; + private _field: SchemaField; + private _type: string | undefined; + private _path: string | undefined; + + constructor(schema: Schema, field: SchemaField) { + this._schema = schema; + this._field = field; + this._type = schema.type; + this._path = field.path; + } + + public get name() { + return this._schema?.name; + } + + public get description() { + return this._schema?.description; + } + + public get field() { + return this._field?.description; + } + + public get value() { + return this._value; + } + + public setDocuments(documents: DocumentItem[]) { + for (const doc of documents) { + if (doc.has(this._type)) { + this._value = doc.get(this._path); + if (Array.isArray(this._value)) { + this._value = `[${this._value.join(',')}]`; + } + } + } + } +} + +export class FormulaItem { + public readonly uuid: string; + public readonly name: string; + public readonly description: string; + public readonly type: FormulaItemType; + + private _value: any; + private _link: IFormulaLink | null; + private _relationships: string[] | null; + + private _schemaLink: { schema: string, path: string } | null; + private _formulaLink: { formula: string, variable: string } | null; + private _parent: FormulaTree; + + private _relationshipItems: FormulaItem[]; + private _parentItems: FormulaItem[]; + private _linkEntity: FormulaTree | Schema | null; + private _linkItem: FormulaItem | SchemaItem | null; + + constructor(config: IFormulaItem) { + this.uuid = config.uuid || ''; + this.name = config.name || ''; + this.description = config.description || ''; + this.type = config.type || ''; + + this._value = config.value || ''; + this._link = config.link || null; + this._relationships = config.relationships || null; + + this._schemaLink = null; + this._formulaLink = null; + if (this._link) { + if (this._link.type === 'schema') { + this._schemaLink = { + schema: this._link.entityId, + path: this._link.item + } + } + if (this._link.type === 'formula') { + this._formulaLink = { + formula: this._link.entityId, + variable: this._link.item + } + } + } + + this._relationshipItems = []; + this._parentItems = []; + this._linkItem = null; + } + + public get value() { + return this._value; + } + + public get hasLink() { + return !!this._link; + } + + public get schemaLink() { + return this._schemaLink; + } + + public get formulaLink() { + return this._formulaLink; + } + + public get linkEntity() { + return this._linkEntity; + } + + public get linkItem() { + return this._linkItem; + } + + public get linkEntityName() { + if (this._formulaLink && this._linkEntity) { + return this._linkEntity.name; + } + if (this._schemaLink && this._linkEntity) { + return this._linkEntity.name; + } + return null; + } + + public get linkItemName() { + if (this._formulaLink && this._linkItem) { + return (this._linkItem as FormulaItem).name; + } + if (this._schemaLink && this._linkItem) { + return (this._linkItem as SchemaItem).field; + } + return null; + } + + public get relationshipItems() { + return this._relationshipItems; + } + + public setParent(parent: FormulaTree) { + this._parent = parent; + } + + public setRelationship(items: FormulaItem[]) { + if (Array.isArray(this._relationships)) { + this._relationshipItems = items.filter((e) => this._relationships?.includes(e.uuid)); + } else { + this._relationshipItems = []; + } + + this._parentItems = []; + for (const item of items) { + if (Array.isArray(item._relationships) && item._relationships.includes(this.uuid)) { + this._parentItems.push(item); + } + } + } + + public setFormulas(formulas: FormulaTree[]) { + if (this._formulaLink) { + this._linkEntity = formulas.find((e) => e.uuid === this._formulaLink?.formula) || null; + if (this._linkEntity) { + this._linkItem = this._linkEntity.get(this._formulaLink.variable); + } + } + } + + public setSchemas(schemas: Schema[]) { + if (this._schemaLink) { + const schema = schemas.find((e) => e.iri === this._schemaLink?.schema) || null; + this._linkEntity = schema; + if (schema) { + const field = schema.getField(this._schemaLink.path); + if (field) { + this._linkItem = new SchemaItem(schema, field); + } + } + } + } + + public setDocuments(documents: DocumentItem[]) { + if (this._schemaLink && this._linkItem) { + (this._linkItem as SchemaItem).setDocuments(documents); + } + } + + public createNav(list: Set): any { + const item: any = { + view: 'component', + type: this.type, + name: this.name, + data: this, + children: [] + } + if (this._formulaLink) { + item.children.push({ + view: 'link', + type: this._linkItem?.type, + entity: this._linkEntity?.name, + name: this._linkItem?.name, + data: this._linkItem, + children: [] + }); + } + if (this._schemaLink) { + item.children.push({ + view: 'link', + type: 'field', + entity: this._linkEntity?.name, + name: (this._linkItem as SchemaItem)?.field, + data: this._linkItem, + children: [] + }); + } + + for (const ref of this._relationshipItems) { + if (!list.has(ref)) { + const newList = new Set(list); + newList.add(ref); + const nav = ref.createNav(newList); + item.children.push(nav); + } + } + return item; + } + + public getFiles(): FormulaFiles[] { + return this._parent?.getFiles() || []; + } +} + +export class FormulaTree { + public readonly uuid: string; + public readonly name: string; + public readonly description: string; + + private _links: Map>; + private _items: FormulaItem[]; + private _files: FormulaFiles[]; + + constructor(formula: IFormula) { + this.uuid = formula.uuid || ''; + this.name = formula.name || ''; + this.description = formula.description || ''; + + this._links = new Map>(); + this.parse(formula?.config?.formulas); + this.parseFiles(formula?.config?.files); + } + + private parse(items?: IFormulaItem[]) { + if (!items) { + return; + } + + this._items = []; + for (const config of items) { + const item = new FormulaItem(config); + item.setParent(this); + const link = item.schemaLink; + if (link) { + const map = this._links.get(link.schema) || new Map(); + const array = map.get(link.path) || []; + array.push(item); + map.set(link.path, array); + this._links.set(link.schema, map); + } + this._items.push(item); + } + + for (const item of this._items) { + item.setRelationship(this._items); + } + } + + private parseFiles(files?: IFormulaFile[]) { + if (!files) { + return; + } + + this._files = []; + for (const config of files) { + const file = new FormulaFiles(config); + this._files.push(file); + } + } + + public setFormulas(formulas: FormulaTree[]) { + for (const item of this._items) { + item.setFormulas(formulas); + } + } + + public setSchemas(schemas: Schema[]) { + for (const item of this._items) { + item.setSchemas(schemas); + } + } + + public setDocuments(documents: DocumentItem[]) { + for (const item of this._items) { + item.setDocuments(documents); + } + } + + public hasLink(schema: string, path: string): boolean { + return this._links.get(schema)?.has(path) || false; + } + + public getLink(schema: string, path: string): FormulaItem[] { + return this._links.get(schema)?.get(path) || []; + } + + public get(variable: string): FormulaItem | null { + for (const item of this._items) { + if (item.name === variable) { + return item; + } + } + return null; + } + + public merge(links: Map>) { + for (const [schema, map] of this._links.entries()) { + const fullMap = links.get(schema) || new Map(); + for (const [path, array] of map.entries()) { + const fullArray = fullMap.get(path) || []; + for (const item of array) { + fullArray.push(item); + } + fullMap.set(path, fullArray); + } + links.set(schema, fullMap); + } + } + + public getFiles(): FormulaFiles[] { + return this._files; + } +} + +export class FormulasTree { + public items: FormulaTree[]; + + private _links: Map>; + + constructor() { + this._links = new Map>(); + } + + public setFormulas(formulas: IFormula[]) { + if (Array.isArray(formulas)) { + this.items = formulas.map((f) => new FormulaTree(f)); + } else { + this.items = []; + } + for (const item of this.items) { + item.setFormulas(this.items); + } + } + + public setSchemas(schemas: Schema[]) { + for (const item of this.items) { + item.setSchemas(schemas); + } + } + + public setDocuments(documents: (IVCDocument | IVPDocument) | (IVCDocument | IVPDocument)[]) { + const _documents: DocumentItem[] = []; + if (Array.isArray(documents)) { + for (const doc of documents) { + const _doc = new DocumentItem(doc); + _documents.push(_doc); + } + } else if (documents) { + const _doc = new DocumentItem(documents); + _documents.push(_doc); + } + + for (const item of this.items) { + item.setDocuments(_documents); + } + } + + public update() { + this._links.clear(); + for (const item of this.items) { + item.merge(this._links); + } + } + + public has(schema: string, path: string): boolean { + return this._links.get(schema)?.has(path) || false; + } + + public get(schema: string, path: string): FormulaItem[] { + return this._links.get(schema)?.get(path) || []; + } + + public getFiles(items: FormulaItem[]): FormulaFiles[] { + const result = new Set(); + for (const item of items) { + for (const files of item.getFiles()) { + result.add(files); + } + } + return Array.from(result); + } + + public getFields(schema?: string) { + const result: any = {}; + if (schema) { + const map = this._links.get(schema); + if (map) { + for (const path of map.keys()) { + result[`${schema}/${path}`] = { + tree: this, + schema, + path + }; + } + } + } + return result; + } + + public static from(response?: { + formulas: IFormula[], + schemas: ISchema[], + document: IVCDocument, + relationships: IVCDocument[] + }) { + if (!response) { + return null; + } + + const documents = []; + if (response.document) { + documents.push(response.document); + } + if (response.relationships) { + for (const document of response.relationships) { + documents.push(document); + } + } + + const schemas = []; + if (response.schemas) { + for (const s of response.schemas) { + const schema = Schema.from(s); + if (schema) { + schemas.push(schema); + } + } + } + + const tree = new FormulasTree(); + tree.setFormulas(response.formulas); + tree.setSchemas(schemas); + tree.setDocuments(documents); + tree.update(); + + return tree; + } + + public static createNav(items: FormulaItem[]): any { + const root: any = { + view: 'root', + type: 'root', + children: [] + } + for (const item of items) { + const list = new Set(); + list.add(item); + const nav = item.createNav(list); + root.children.push(nav); + } + return root; + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/formulas/models/formulas.ts b/frontend/src/app/modules/formulas/models/formulas.ts new file mode 100644 index 0000000000..2b7ea24605 --- /dev/null +++ b/frontend/src/app/modules/formulas/models/formulas.ts @@ -0,0 +1,137 @@ +import { moveItemInArray } from '@angular/cdk/drag-drop'; +import { IFormulaItem, FormulaItemType, GenerateUUIDv4, IFormulaConfig, IFormulaFile } from '@guardian/interfaces'; + +export class Formulas { + private items: IFormulaItem[]; + private filterMap: Map; + public files: IFormulaFile[]; + public data: IFormulaItem[]; + + constructor() { + this.items = []; + this.files = []; + this.data = []; + this.filterMap = new Map(); + this.filterMap.set(FormulaItemType.Constant, true); + this.filterMap.set(FormulaItemType.Variable, true); + this.filterMap.set(FormulaItemType.Formula, true); + this.filterMap.set(FormulaItemType.Text, true); + } + + public get all() { + return this.items; + } + + private create(type: FormulaItemType): IFormulaItem { + const item: IFormulaItem = { + uuid: GenerateUUIDv4(), + name: '', + description: '', + type: type, + }; + if (type === FormulaItemType.Constant) { + item.value = ''; + return item; + } else if (type === FormulaItemType.Variable) { + item.value = ''; + item.link = null; + return item; + } else if (type === FormulaItemType.Formula) { + item.value = ''; + item.link = null; + item.relationships = []; + return item; + } else if (type === FormulaItemType.Text) { + item.value = ''; + item.link = null; + item.relationships = []; + return item; + } else { + return item; + } + } + + public add(type: FormulaItemType): void { + const item = this.create(type); + this.items.push(item); + this.update(); + } + + public delete(item: IFormulaItem): void { + this.items = this.items.filter((e) => e.uuid !== item?.uuid); + this.update(); + } + + public addFile(file: IFormulaFile): void { + if (file) { + this.files.push(file); + } + } + + public deleteFile(file: IFormulaFile): void { + this.files = this.files.filter((e) => e !== file); + } + + public setFilters(filter: any): void { + this.filterMap.set(FormulaItemType.Constant, filter.constant); + this.filterMap.set(FormulaItemType.Variable, filter.variable); + this.filterMap.set(FormulaItemType.Formula, filter.formula); + this.filterMap.set(FormulaItemType.Text, filter.text); + this.update(); + } + + private update(): void { + this.data = this.items.filter((e) => this.filterMap.get(e.type)); + } + + public fromData(config: IFormulaConfig) { + const items: IFormulaItem[] = config?.formulas || []; + const files: IFormulaFile[] = config?.files || []; + this.items = items.map((e) => this._fromItemJson(e)); + this.files = files.map((e) => this._fromFileJson(e)); + this.update(); + } + + public getJson(): IFormulaConfig { + return { + formulas: this.items.map((e) => this._toItemJson(e)), + files: this.files.map((e) => this._toFileJson(e)), + }; + } + + private _fromItemJson(item: IFormulaItem): IFormulaItem { + return item; + } + + private _toItemJson(item: IFormulaItem): IFormulaItem { + return item; + } + + private _fromFileJson(item: IFormulaFile): IFormulaFile { + return item; + } + + private _toFileJson(item: IFormulaFile): IFormulaFile { + return item; + } + + public getItem(uuid: string): IFormulaItem | null { + for (const item of this.items) { + if (item.uuid === uuid) { + return item; + } + } + return null; + } + + public reorder(previousIndex: number, currentIndex: number) { + if (previousIndex !== currentIndex) { + const prevItem = this.data[previousIndex]; + const currentItem = this.data[currentIndex]; + const originalPreviousIndex = this.items.findIndex((e) => e === prevItem); + const originalCurrentIndex = this.items.findIndex((e) => e === currentItem); + moveItemInArray(this.items, originalPreviousIndex, originalCurrentIndex); + this.update(); + } + } +} diff --git a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.html index 531b6744b8..b27f6a4560 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.html +++ b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.html @@ -1,141 +1,137 @@ -
-
-
- Multi Policy -
+
+
+
Multi Policy
-
-
-
-
-
+
+ +
+
+ +
+
+
+
+
-
+
-
-
-
-
- - - +
+
+
+
+ + + +
+
+
+ Type: + Main Policy
-
-
- Type: - Main Policy -
-
- Main Policy: - {{ mainPolicyTopicId1 }} -
-
- Topic for synchronization: - {{ synchronizationTopicId1 }} -
-
- +
+ Main Policy: + {{ mainPolicyTopicId1 }} +
+
+ Topic for synchronization: + {{ synchronizationTopicId1 }} +
+
+
+
+
-
-
- - - +
+
+ + + +
+
+
+ Type: + Sub Policy
-
-
- Type: - Sub Policy -
-
- Main Policy: - {{ mainPolicyTopicId2 }} -
-
- Topic for synchronization: - {{ synchronizationTopicId2 }} -
-
- +
+ Main Policy: + {{ mainPolicyTopicId2 }} +
+
+ Topic for synchronization: + {{ synchronizationTopicId2 }} +
+
+
+
-
-
-
- Policy is already bound +
+ +
+
+ Policy is already bound +
+
+
+ Type: + {{ policyType }} Policy
-
-
- Type: - {{ policyType }} Policy -
-
- Main Policy: - {{ mainPolicyTopicId1 }} -
-
- Topic for synchronization: - {{ synchronizationTopicId1 }} -
-
- Current Policy: - {{ instanceTopicId }} -
-
- - -
+
+ Main Policy: + {{ mainPolicyTopicId1 }} +
+
+ Topic for synchronization: + {{ synchronizationTopicId1 }} +
+
+ Current Policy: + {{ instanceTopicId }} +
+
+ +
+ + +
-
-
- +
+ + \ No newline at end of file diff --git a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.scss b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.scss index fe10a7929d..e00d31d9f1 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.scss +++ b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.scss @@ -1,56 +1,70 @@ -.container { +.context { + position: relative; + overflow-y: auto; + padding: 14px 0 20px 0; display: flex; - justify-content: space-between; - padding-right: 14px; + flex-direction: row; + height: 100%; + font-family: Inter, serif; + font-style: normal; } -.container button { - margin-top: 5px; - margin-left: 10px; - min-width: 280px; +.dialog-header { + .header-item { + padding: 6px 12px; + margin: 0px 16px; + border-radius: 6px; + font-size: var(--guardian-primary-font-size); + color: var(--guardian-dry-run-color); + background: var(--guardian-dry-run-background); + user-select: none; + cursor: default; + } } -.schema-field { - flex: 1; +form { + width: 100%; + + .guardian-input-container { + input[readonly] { + border: none; + padding-left: 0; + } + } } -:host .content { - max-height: 400px; +.guardian-input-container { + margin-bottom: 24px; } -.loading { - background: #fff; - position: absolute; - z-index: 99; - left: 0; - bottom: 0; - right: 0; - top: 0; - display: flex; - align-items: center; - justify-items: center; - justify-content: center; - align-content: center; +.dialog-body { + height: 500px; } -.g-dialog-title-btn i, -.g-dialog-title-btn svg,{ - position: absolute; - font-size: 32px; - top: 7px; - left: 7px; - color: #646464; +.action-buttons { + display: flex; + justify-content: flex-end; + user-select: none; + + &>div { + margin-left: 15px; + margin-right: 0px; + } } -.context { - position: relative; - min-height: 275px; +.close-icon-color { + fill: #848FA9; + color: #848FA9; } .group-name { padding: 0px 0px 15px 0px; font-weight: 500; font-size: 16px; + + label { + margin-left: 8px; + } } .group-value { @@ -63,84 +77,12 @@ display: none; } -@media (max-width: 810px) { - .g-dialog-cancel{order: 1;} - .g-dialog-title{order: 2;} - .g-dialog-body{order: 3;} - .g-dialog-actions{order: 4;} - .g-dialog-header { - box-shadow: none; - } - - .mat-radio-container { - background-color: #2C78F6 !important; - border-color: #2C78F6 !important; - } - .context { - width: 90%; - margin: 0 auto; - } - - .group-value { - padding-left: 0; - width: 90%; - margin: 0 auto; - } - - #title { - width: 192px; - height: 56px; - - /* 24 px semibold */ - font-family: 'Roboto'; - font-style: normal; - font-weight: 600; - font-size: 24px; - line-height: 28px; - - /* Grey black */ - color: #222222; - - /* Inside auto layout */ - flex: none; - order: 0; - flex-grow: 1; - } - - .g-dialog-body { - /* Auto layout */ - display: flex; - flex-direction: column; - align-items: flex-start; - padding: 0px; - gap: 24px; - margin: 0 auto; - - position: relative; - - width: 100%; - - /* Inside auto layout */ - flex: none; - order: 1; - flex-grow: 0; - } +@media (max-width: 810px) { - .g-dialog-actions { - display: flex; - justify-content: center; - } - .g-dialog-actions-btn { - position: absolute; - bottom: 0; - right: 0; - width: 90%; - margin: 20px 5% !important; - } .table-container { display: grid; @@ -151,150 +93,16 @@ .table-container span:nth-child(odd) { /* targets the first in each
*/ - grid-column: 1; /* places the element in the first column */ + grid-column: 1; + /* places the element in the first column */ color: #BABABA; } .table-container span:nth-child(even) { /* targets the second in each
*/ - grid-column: 2; /* places the element in the second column */ + grid-column: 2; + /* places the element in the second column */ color: #222222; margin: auto 0; } -} - -form { - display: flex; - flex-direction: column; - width: 452px; - overflow: visible; - padding-bottom: 25px; -} - -.context { - position: relative; - overflow-y: auto; -} - -.loading { - background: #fff; - position: absolute; - z-index: 99; - left: 0; - bottom: 0; - right: 0; - top: 0; - display: flex; - align-items: center; - justify-items: center; - justify-content: center; - align-content: center; -} - -.schema-header { - height: 44px; - font-size: 34px; - display: block; - padding: 12px; - box-sizing: border-box; - text-align: center; - color: #000; -} - -.delimiter { - padding: 50px 50px; - width: 100%; - height: 100px; - box-sizing: border-box; - position: relative; -} - -.delimiter::after { - content: ''; - position: absolute; - height: 2px; - top: 50px; - left: 0px; - right: 0px; - border-top: 1px solid #c8c8c8; -} - -.field-value { - color: #000; - font-size: 20px; -} - -.field-name { - margin-bottom: 12px; -} - -.field { - margin-top: 5px; - margin-bottom: 28px; -} - -.field-last { - margin-bottom: 0px; -} - -.version-container { - display: flex; - gap: 15px; -} - -.version-container__new-versions { - margin-top: 3px; -} - -.g-dialog-header { - padding: 0; -} - -.g-dialog-title { - height: auto !important; - padding: 0 !important; - margin-bottom: 24px !important; - color: #495057 !important; - font-weight: 600 !important; - font-size: 1.25rem !important; - font-family: Poppins, sans-serif !important; - font-style: normal !important; -} - -.form-input-container { - display: flex; - flex-direction: column; - margin-bottom: 24px; -} - -.form-label { - margin-bottom: 6px; - color: var(--color-grey-black-1, #181818); - font-family: Inter; - font-size: 12px; - font-style: normal; - font-weight: 500; - line-height: 14px; -} - -:host ::ng-deep { - .mat-dialog-title { - margin-bottom: 32px; - color: #000; - font-family: Poppins; - font-size: 24px; - font-style: normal; - font-weight: 600; - line-height: normal; - } - - .mat-form-field { - width: 100%; - } - - .mat-dialog-actions { - display: flex; - justify-content: flex-end; - gap: 16px; - } -} +} \ No newline at end of file diff --git a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.ts index 45da20faf3..d490b18ab1 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.ts @@ -1,6 +1,6 @@ -import {AfterContentInit, Component, Inject, OnInit} from '@angular/core'; -import {PolicyEngineService} from 'src/app/services/policy-engine.service'; -import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; +import { AfterContentInit, Component, Inject, OnInit } from '@angular/core'; +import { PolicyEngineService } from 'src/app/services/policy-engine.service'; +import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; /** * Export schema dialog. @@ -80,7 +80,7 @@ export class MultiPolicyDialogComponent implements OnInit, AfterContentInit { }, 100); } - onOk(): void { + onClose(): void { this.dialogRef.close(); } diff --git a/frontend/src/app/modules/policy-engine/dialogs/new-policy-dialog/new-policy-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/new-policy-dialog/new-policy-dialog.component.html index c108e3365a..1e1afd5627 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/new-policy-dialog/new-policy-dialog.component.html +++ b/frontend/src/app/modules/policy-engine/dialogs/new-policy-dialog/new-policy-dialog.component.html @@ -62,7 +62,7 @@
-
+
-
-
- - -
- - +
+
+
{{(isActionSelected$ | async) ? getTitle() : 'Select action'}}
- +
+ +
+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+ +
- - - Create new policy - - - Create new version - + +
- - +
+
\ No newline at end of file diff --git a/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.scss b/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.scss index f64ac3d1a0..6b77536e4e 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.scss +++ b/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.scss @@ -1,156 +1,52 @@ -.content { +.context { position: relative; -} - -form { - display: flex; - flex-direction: column; - width: 452px; - overflow: visible; - padding-bottom: 25px; -} - -.action-select-step { + overflow-y: auto; + padding: 14px 0 20px 0; display: flex; - flex-direction: column; - align-items: center; -} - -.login-header { - font-size: 20px; - color: #838383; - padding-bottom: 20px; - display: flex; - cursor: pointer; -} - -.action-name { - display: block; - font-size: 20px; - font-weight: bold; - line-height: 23px; - color: #2F2F2F; -} - -.action-select-step button { - height: 106px; - width: 90%; - border-radius: 53px; - margin: 12px 0; -} - -.close-button { - position: absolute; - right: 16px; - top: -10px; - opacity: 0.44; -} - -.close-button:hover { - opacity: 1; -} - -.modal-header { - color: #000; - font-family: Poppins, sans-serif; - font-size: 24px; + flex-direction: row; + height: 100%; + font-family: Inter, serif; font-style: normal; - font-weight: 600; - line-height: 32px; -} - -:host ::ng-deep .p-dialog { - width: 720px; - border-radius: 16px !important; - display: grid; - transform: none; - max-height: none; - padding: 32px; - background: var(--color-grey-white, #FFF); } -:host ::ng-deep .p-dialog .p-dialog-header { - padding: 0; - font: 400 24px / 32px Roboto, "Helvetica Neue", sans-serif; -} - -:host ::ng-deep .p-dialog .p-dialog-content { - padding: 18px 0 0 0; -} - -.form-field { - margin-bottom: 1em; - width: 100% !important -} - -.custom-form-field { - position: relative; - border: 2px solid var(--color-grey-2); - border-radius: 4px; - transition: border-color 0.3s; - margin-bottom: 10px; -} - -.custom-form-field input { - width: 100%; - height: 50px !important; - border: none; - &:focus { - box-shadow: none; - } -} - -.custom-form-field textarea { - resize: vertical; - min-height: 70px; -} - -.custom-form-field input, -.custom-form-field textarea{ +form { width: 100%; - border: none; - &:focus { - box-shadow: none; - } -} -.custom-form-field:focus-within { - border: 2px solid var(--primary-color); -} + .guardian-input-container { + margin-bottom: 24px; + } -.form-field.ng-invalid .ng-invalid { - border: 2px solid var(--color-accent-red-1); - &:focus { - border: none; + .guardian-textarea-container { + margin-bottom: 24px; } } -.dialog-actions { +.action-buttons { display: flex; - justify-content: flex-start; - gap: 10px; - margin-top: 20px; -} - -:host ::ng-deep .p-dialog .p-button { - background-color: var(--color-grey-white, #FFF); - color: var(--primary-color); - border-radius: 20px; - padding: 8px 24px; - font-weight: bold; -} - -:host ::ng-deep .p-dialog .p-button-ok { - background-color: var(--primary-color); - color: var(--color-grey-white, #FFF); -} + justify-content: flex-end; + user-select: none; -:host ::ng-deep .p-dialog .p-button:hover { - background-color: var(--blue-100); + &>div { + margin-left: 15px; + margin-right: 0px; + } } -:host ::ng-deep .p-dialog .p-button-ok:hover { - background-color: var(--blue-700); +.close-icon-color { + fill: #848FA9; + color: #848FA9; } +.action-select-step { + display: flex; + flex-direction: column; + align-items: center; + button { + height: 106px; + width: 90%; + border-radius: 53px; + margin: 12px 0; + font-size: 20px; + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.ts index d1766b3abe..a92790e459 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.ts @@ -21,8 +21,6 @@ export class SavePolicyDialog { action?: PolicyAction; dataForm = this.fb.group({}); isNewVersionDisabled: boolean = false; - - isVisible: boolean = true; data: any; private _isActionSelected$ = new ReplaySubject(1); diff --git a/frontend/src/app/modules/policy-engine/policies/policies.component.scss b/frontend/src/app/modules/policy-engine/policies/policies.component.scss index 6ae2e1488f..a75e4afee4 100644 --- a/frontend/src/app/modules/policy-engine/policies/policies.component.scss +++ b/frontend/src/app/modules/policy-engine/policies/policies.component.scss @@ -221,7 +221,7 @@ min-width: 25px; margin-left: 6px; border-radius: 6px; - padding: 1px; + padding: 2px; } .btn-icon-import, @@ -259,8 +259,7 @@ cursor: not-allowed; } -.btn-icon-edit i, -.btn-icon-edit svg { +.btn-icon-edit i { font-size: 30px; position: absolute; left: 0; diff --git a/frontend/src/app/modules/policy-engine/policies/policies.component.ts b/frontend/src/app/modules/policy-engine/policies/policies.component.ts index 54a222fd80..c5ae8ce847 100644 --- a/frontend/src/app/modules/policy-engine/policies/policies.component.ts +++ b/frontend/src/app/modules/policy-engine/policies/policies.component.ts @@ -1,5 +1,5 @@ -import {ChangeDetectorRef, Component, Inject, OnInit} from '@angular/core'; -import {Router} from '@angular/router'; +import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; import { ContractType, IUser, @@ -11,37 +11,37 @@ import { Token, UserPermissions } from '@guardian/interfaces'; -import {PolicyEngineService} from 'src/app/services/policy-engine.service'; -import {ProfileService} from 'src/app/services/profile.service'; -import {TokenService} from 'src/app/services/token.service'; -import {ExportPolicyDialog} from '../dialogs/export-policy-dialog/export-policy-dialog.component'; -import {NewPolicyDialog} from '../dialogs/new-policy-dialog/new-policy-dialog.component'; -import {PreviewPolicyDialog} from '../dialogs/preview-policy-dialog/preview-policy-dialog.component'; -import {TasksService} from 'src/app/services/tasks.service'; -import {InformService} from 'src/app/services/inform.service'; -import {MultiPolicyDialogComponent} from '../dialogs/multi-policy-dialog/multi-policy-dialog.component'; -import {ComparePolicyDialog} from '../dialogs/compare-policy-dialog/compare-policy-dialog.component'; -import {TagsService} from 'src/app/services/tag.service'; -import {forkJoin, Subscription} from 'rxjs'; -import {SchemaService} from 'src/app/services/schema.service'; -import {WizardMode, WizardService} from 'src/app/modules/policy-engine/services/wizard.service'; -import {UntypedFormControl, UntypedFormGroup} from '@angular/forms'; -import {AnalyticsService} from 'src/app/services/analytics.service'; -import {SearchPolicyDialog} from '../../analytics/search-policy-dialog/search-policy-dialog.component'; -import {mobileDialog} from 'src/app/utils/mobile-utils'; -import {DialogService} from 'primeng/dynamicdialog'; +import { PolicyEngineService } from 'src/app/services/policy-engine.service'; +import { ProfileService } from 'src/app/services/profile.service'; +import { TokenService } from 'src/app/services/token.service'; +import { ExportPolicyDialog } from '../dialogs/export-policy-dialog/export-policy-dialog.component'; +import { NewPolicyDialog } from '../dialogs/new-policy-dialog/new-policy-dialog.component'; +import { PreviewPolicyDialog } from '../dialogs/preview-policy-dialog/preview-policy-dialog.component'; +import { TasksService } from 'src/app/services/tasks.service'; +import { InformService } from 'src/app/services/inform.service'; +import { MultiPolicyDialogComponent } from '../dialogs/multi-policy-dialog/multi-policy-dialog.component'; +import { ComparePolicyDialog } from '../dialogs/compare-policy-dialog/compare-policy-dialog.component'; +import { TagsService } from 'src/app/services/tag.service'; +import { forkJoin, Subscription } from 'rxjs'; +import { SchemaService } from 'src/app/services/schema.service'; +import { WizardMode, WizardService } from 'src/app/modules/policy-engine/services/wizard.service'; +import { UntypedFormControl, UntypedFormGroup } from '@angular/forms'; +import { AnalyticsService } from 'src/app/services/analytics.service'; +import { SearchPolicyDialog } from '../../analytics/search-policy-dialog/search-policy-dialog.component'; +import { mobileDialog } from 'src/app/utils/mobile-utils'; +import { DialogService } from 'primeng/dynamicdialog'; import { SuggestionsConfigurationComponent } from '../../../views/suggestions-configuration/suggestions-configuration.component'; -import {DeletePolicyDialogComponent} from '../dialogs/delete-policy-dialog/delete-policy-dialog.component'; -import {CONFIGURATION_ERRORS} from '../injectors/configuration.errors.injector'; -import {DiscontinuePolicy} from '../dialogs/discontinue-policy/discontinue-policy.component'; -import {MigrateData} from '../dialogs/migrate-data/migrate-data.component'; -import {ContractService} from 'src/app/services/contract.service'; -import {PolicyTestDialog} from '../dialogs/policy-test-dialog/policy-test-dialog.component'; -import {NewImportFileDialog} from '../dialogs/new-import-file-dialog/new-import-file-dialog.component'; -import {PublishPolicyDialog} from '../dialogs/publish-policy-dialog/publish-policy-dialog.component'; -import {WebSocketService} from 'src/app/services/web-socket.service'; +import { DeletePolicyDialogComponent } from '../dialogs/delete-policy-dialog/delete-policy-dialog.component'; +import { CONFIGURATION_ERRORS } from '../injectors/configuration.errors.injector'; +import { DiscontinuePolicy } from '../dialogs/discontinue-policy/discontinue-policy.component'; +import { MigrateData } from '../dialogs/migrate-data/migrate-data.component'; +import { ContractService } from 'src/app/services/contract.service'; +import { PolicyTestDialog } from '../dialogs/policy-test-dialog/policy-test-dialog.component'; +import { NewImportFileDialog } from '../dialogs/new-import-file-dialog/new-import-file-dialog.component'; +import { PublishPolicyDialog } from '../dialogs/publish-policy-dialog/publish-policy-dialog.component'; +import { WebSocketService } from 'src/app/services/web-socket.service'; import { IImportEntityResult, ImportEntityDialog, @@ -597,25 +597,25 @@ export class PoliciesComponent implements OnInit { this.profileService.getProfile(), this.tagsService.getPublishedSchemas(), ]).subscribe((value) => { - const profile: IUser | null = value[0]; - const tagSchemas: any[] = value[1] || []; - this.isConfirmed = !!(profile && profile.confirmed); - this.user = new UserPermissions(profile); - this.owner = this.user.did; - this.tagSchemas = SchemaHelper.map(tagSchemas); - - this.columns = columns - .filter((c) => c.permissions(this.user)) - .map((c) => c.id); - - if (this.isConfirmed) { - this.loadAllPolicy(); - } else { - setTimeout(() => { - this.loading = false; - }, 500); - } - }, + const profile: IUser | null = value[0]; + const tagSchemas: any[] = value[1] || []; + this.isConfirmed = !!(profile && profile.confirmed); + this.user = new UserPermissions(profile); + this.owner = this.user.did; + this.tagSchemas = SchemaHelper.map(tagSchemas); + + this.columns = columns + .filter((c) => c.permissions(this.user)) + .map((c) => c.id); + + if (this.isConfirmed) { + this.loadAllPolicy(); + } else { + setTimeout(() => { + this.loading = false; + }, 500); + } + }, (e) => { this.loading = false; } @@ -688,7 +688,7 @@ export class PoliciesComponent implements OnInit { this.loading = true; this.policyEngineService.dryRun(element.id).subscribe( (data: any) => { - const {policies, isValid, errors} = data; + const { policies, isValid, errors } = data; if (!isValid) { let text = []; const blocks = errors.blocks; @@ -730,7 +730,7 @@ export class PoliciesComponent implements OnInit { this.loading = true; this.policyEngineService.draft(element.id).subscribe( (data: any) => { - const {policies, isValid, errors} = data; + const { policies, isValid, errors } = data; this.loadAllPolicy(); }, (e) => { @@ -761,7 +761,7 @@ export class PoliciesComponent implements OnInit { this.loading = true; this.policyEngineService.pushPublish(element.id, version).subscribe( (result) => { - const {taskId, expectation} = result; + const { taskId, expectation } = result; this.router.navigate(['task', taskId], { queryParams: { last: btoa(location.href), @@ -793,7 +793,7 @@ export class PoliciesComponent implements OnInit { this.loading = true; this.policyEngineService.pushDelete(policy?.id).subscribe( (result) => { - const {taskId, expectation} = result; + const { taskId, expectation } = result; this.router.navigate(['task', taskId], { queryParams: { last: btoa(location.href), @@ -902,7 +902,7 @@ export class PoliciesComponent implements OnInit { } private importPolicyDetails(result: IImportEntityResult) { - const {type, data, policy} = result; + const { type, data, policy } = result; const distinctPolicies = this.getDistinctPolicy(); let dialogRef; if (window.innerWidth <= 810) { @@ -940,9 +940,9 @@ export class PoliciesComponent implements OnInit { this.loading = true; if (type == 'message') { this.policyEngineService - .pushImportByMessage(data, versionOfTopicId, {tools}, demo) + .pushImportByMessage(data, versionOfTopicId, { tools }, demo) .subscribe((result) => { - const {taskId, expectation} = result; + const { taskId, expectation } = result; this.router.navigate(['task', taskId], { queryParams: { last: btoa(location.href), @@ -954,9 +954,9 @@ export class PoliciesComponent implements OnInit { }); } else if (type == 'file') { this.policyEngineService - .pushImportByFile(data, versionOfTopicId, {tools}, demo) + .pushImportByFile(data, versionOfTopicId, { tools }, demo) .subscribe((result) => { - const {taskId, expectation} = result; + const { taskId, expectation } = result; this.router.navigate(['task', taskId], { queryParams: { last: btoa(location.href), @@ -972,7 +972,7 @@ export class PoliciesComponent implements OnInit { } private importExcelDetails(result: IImportEntityResult, policyId: string) { - const {type, data, xlsx} = result; + const { type, data, xlsx } = result; let dialogRef; if (window.innerWidth <= 810) { const bodyStyles = window.getComputedStyle(document.body); @@ -1003,7 +1003,7 @@ export class PoliciesComponent implements OnInit { .pushImportByXlsx(data, policyId) .subscribe( (result) => { - const {taskId, expectation} = result; + const { taskId, expectation } = result; this.router.navigate(['task', taskId], { queryParams: { last: btoa(location.href), @@ -1022,22 +1022,22 @@ export class PoliciesComponent implements OnInit { this.policyEngineService .exportToExcel(policy?.id) .subscribe((fileBuffer) => { - let downloadLink = document.createElement('a'); - downloadLink.href = window.URL.createObjectURL( - new Blob([new Uint8Array(fileBuffer)], { - type: 'application/guardian-policy', - }) - ); - downloadLink.setAttribute( - 'download', - `policy_${Date.now()}.xlsx` - ); - document.body.appendChild(downloadLink); - downloadLink.click(); - setTimeout(() => { - this.loading = false; - }, 500); - }, + let downloadLink = document.createElement('a'); + downloadLink.href = window.URL.createObjectURL( + new Blob([new Uint8Array(fileBuffer)], { + type: 'application/guardian-policy', + }) + ); + downloadLink.setAttribute( + 'download', + `policy_${Date.now()}.xlsx` + ); + document.body.appendChild(downloadLink); + downloadLink.click(); + setTimeout(() => { + this.loading = false; + }, 500); + }, (error) => { this.loading = false; } @@ -1138,10 +1138,9 @@ export class PoliciesComponent implements OnInit { public createMultiPolicy(element: any) { const dialogRef = this.dialogService.open(MultiPolicyDialogComponent, { + showHeader: false, width: '650px', - styleClass: 'g-dialog', - closable: false, - autoZIndex: true, + styleClass: 'guardian-dialog', data: { policyId: element.id } @@ -1185,7 +1184,7 @@ export class PoliciesComponent implements OnInit { public migrateData(policy?: any) { const item = this.policies?.find((e) => e.id === policy?.id); this.loading = true; - this.contractSerivce.getContracts({type: ContractType.RETIRE}).subscribe({ + this.contractSerivce.getContracts({ type: ContractType.RETIRE }).subscribe({ next: (res) => { const dialogRef = this.dialogService.open(MigrateData, { header: 'Migrate Data', @@ -1203,7 +1202,7 @@ export class PoliciesComponent implements OnInit { } this.policyEngineService.migrateDataAsync(result).subscribe( (result) => { - const {taskId} = result; + const { taskId } = result; this.router.navigate(['task', taskId], { queryParams: { last: btoa(location.href), @@ -1233,7 +1232,7 @@ export class PoliciesComponent implements OnInit { this.loading = true; this.policyEngineService.pushCreate(result).subscribe( (result) => { - const {taskId, expectation} = result; + const { taskId, expectation } = result; this.router.navigate(['/task', taskId]); }, (e) => { @@ -1268,7 +1267,7 @@ export class PoliciesComponent implements OnInit { }) .subscribe( (result) => { - const {taskId, expectation} = result; + const { taskId, expectation } = result; this.router.navigate(['task', taskId], { queryParams: { last: btoa(location.href), @@ -1291,20 +1290,25 @@ export class PoliciesComponent implements OnInit { } public applyFilters(): void { - if (this.filters.policyName && this.filters.tag) { - this.filterByNameAndTag(); + if (this.filters.policyName) { + if (this.filters.tag) { + this.filterByNameAndTag(); + this.noFilterResults = this.filteredPolicies.length === 0; + } else { + this.filterByPolicyName(); + this.noFilterResults = this.filteredPolicies.length === 0; + } + } else if (this.filters.tag) { + this.filterByTag(); this.noFilterResults = this.filteredPolicies.length === 0; - return; + } else { + this.filteredPolicies = []; + this.noFilterResults = false; } - - this.filters.policyName - ? this.filterByPolicyName() - : this.filterByTag(); - this.noFilterResults = this.filteredPolicies.length === 0; } public clearFilters(): void { - this.filtersForm.reset({policyName: '', tag: ''}); + this.filtersForm.reset({ policyName: '', tag: '' }); this.filteredPolicies = []; this.noFilterResults = false; } @@ -1448,7 +1452,7 @@ export class PoliciesComponent implements OnInit { } public onRunTest($event: any) { - const {policy, test} = $event; + const { policy, test } = $event; this.loading = true; this.policyEngineService .runTest(policy.id, test.id) @@ -1460,7 +1464,7 @@ export class PoliciesComponent implements OnInit { } public onAddTest($event: any) { - const {policy} = $event; + const { policy } = $event; this.addTest(policy); } diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html index 6c3bd14c9d..54a6451b81 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html @@ -10,10 +10,10 @@
- - - - +
+ + Back +
diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts index d6689bfb3b..ba2a6c2b6a 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts @@ -1368,15 +1368,15 @@ export class PolicyConfigurationComponent implements OnInit { public saveAsPolicy() { const dialogRef = this.dialog.open(SavePolicyDialog, { - width: '500px', + showHeader: false, + width: '550px', + styleClass: 'guardian-dialog', data: { policy: this.policyTemplate, action: this.policyTemplate.status === 'DRAFT' ? PolicyAction.CREATE_NEW_POLICY : null - }, - modal: true, - closable: false, + } }); dialogRef.onClose.subscribe(async (result) => { if (result && this.policyTemplate) { diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.html index f6d0a60f4b..54e7ff2eaa 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.html @@ -39,6 +39,8 @@ (onChange)="onSelectTheme()" id="themeDropdown" [style]="{ 'outline': 'none', 'box-shadow': 'none' }" + class="guardian-dropdown" + appendTo="body" > {{ option.name }} @@ -108,7 +110,9 @@ placeholder="Type" [(ngModel)]="rule.type" [options]="dropdownTypesOptions" - optionLabel="label"> + optionLabel="label" + class="guardian-dropdown guardian-dropdown-cell" + appendTo="body">
@@ -123,7 +127,9 @@ [(ngModel)]="rule.multipleValue" [options]="allBlocks" optionLabel="name" - optionValue="type"> + optionValue="type" + class="guardian-multiselect guardian-multiselect-cell" + appendTo="body">
@@ -133,7 +139,9 @@ [(ngModel)]="rule.singleValue" [options]="dropdownAccessesOptions" optionLabel="label" - optionValue="value"> + optionValue="value" + class="guardian-dropdown guardian-dropdown-cell" + appendTo="body">
@@ -143,7 +151,9 @@ [(ngModel)]="rule.singleValue" [options]="dropdownRolesOptions" optionLabel="label" - optionValue="value"> + optionValue="value" + class="guardian-dropdown guardian-dropdown-cell" + appendTo="body">
@@ -187,7 +197,9 @@ placeholder="Type" [(ngModel)]="rule.shape" [options]="dropdownShapeOptions" - optionValue="value"> + optionValue="value" + class="guardian-dropdown guardian-dropdown-cell" + appendTo="body">
@@ -206,7 +218,8 @@ [options]="dropdownBorderWidthOptions" optionLabel="label" optionValue="value" - [appendTo]="'body'" + class="guardian-dropdown guardian-dropdown-cell" + appendTo="body" >
@@ -251,21 +264,6 @@ [palette]="colorPalette" [(ngModel)]="theme.default.text"> - - - - -
-
- - -
-
-
Text
@@ -288,7 +286,22 @@
+ + +
+
+ + +
+
+
Shape
@@ -299,7 +312,9 @@ [(ngModel)]="theme.default.borderWidth" [options]="dropdownBorderWidthOptions" optionLabel="label" - optionValue="value"> + optionValue="value" + class="guardian-dropdown guardian-dropdown-cell" + appendTo="body">
Border Width
diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.scss b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.scss index 2d3502cfaf..6c68734d5e 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.scss @@ -143,7 +143,8 @@ padding-left: 44px; padding-right: 16px; - i, svg { + i, + svg { position: absolute; left: 11px; top: 9px; @@ -171,7 +172,8 @@ color: var(--pc-active-icon-color); border-radius: 6px; - i, svg { + i, + svg { position: absolute; left: 12px; top: 4px; @@ -338,8 +340,7 @@ .rule-condition-select { border: 1px solid #e0e0e0; border-radius: 6px; - padding: 8px 10px; - height: 38px; + height: 42px; box-sizing: border-box; margin-right: 10px; max-width: 420px; @@ -347,7 +348,7 @@ .rule-condition-label { padding: 8px 10px; - height: 38px; + height: 42px; box-sizing: border-box; margin-right: 10px; } @@ -376,7 +377,7 @@ } .block-color-prev { - height: 34px; + height: 42px; position: relative; width: 150px; background: #fff; @@ -392,7 +393,7 @@ .rule-color-prop { display: flex; - height: 34px; + height: 42px; box-sizing: border-box; margin: 4px 38px 4px 0px; min-width: 60px; @@ -401,18 +402,19 @@ .rule-color-prop-value { width: 30px; - height: 34px; + height: 42px; margin-right: 12px; + padding-top: 4px; } .rule-color-prop-select { border: 1px solid #e0e0e0; border-radius: 6px; padding: 7px 10px; - height: 34px; + height: 42px; box-sizing: border-box; margin-right: 10px; - width: 90px; + width: 125px; } .rule-color-delete { @@ -421,7 +423,7 @@ .new-rule { position: relative; - height: 34px; + height: 42px; box-sizing: border-box; overflow: hidden; padding: 7px 12px 7px 40px; @@ -492,7 +494,7 @@ .theme-container { margin: 20px 10px 20px 10px; border-bottom: 1px solid #000; - height: 80px; + height: 80px; overflow: hidden; align-items: flex-end; display: flex; @@ -676,11 +678,11 @@ } .settings-select, -.settings-select ::ng-deep p-dropdown .p-dropdown{ +.settings-select ::ng-deep p-dropdown .p-dropdown { height: 38px !important; } -.settings-select .p-fluid{ +.settings-select .p-fluid { position: relative; line-height: 0.2; } @@ -723,10 +725,10 @@ position: relative; p-dropdown { - width: 92px; - left: -3px; - top: -3px; + width: 123px; + left: 0px; + top: 0px; position: absolute; z-index: 2000; } -} +} \ No newline at end of file diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts index ad6fd91666..9852c9c950 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts @@ -215,15 +215,13 @@ export class PolicySettingsComponent implements OnInit { newTheme.name = 'New Theme'; } const dialogRef = this.dialog.open(NewThemeDialog, { + showHeader: false, width: '650px', - // panelClass: 'g-dialog', + styleClass: 'guardian-dialog', data: { type, theme: newTheme - }, - styleClass: 'g-dialog', - modal: true, - closable: false, + } }); dialogRef.onClose.subscribe(async (r) => { if (r) { @@ -329,14 +327,13 @@ export class PolicySettingsComponent implements OnInit { public editTheme(theme: Theme) { const dialogRef = this.dialog.open(NewThemeDialog, { + showHeader: false, width: '650px', + styleClass: 'guardian-dialog', data: { type: 'edit', theme: theme }, - styleClass: 'g-dialog', - modal: true, - closable: false, }); dialogRef.onClose.subscribe(async (result) => { if (result) { diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts index e8d5cc4b77..503dad0ac1 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts @@ -20,10 +20,10 @@ interface IAdditionalDocument { * Component for display block of 'ReportBlock' types. */ @Component({ - selector: 'app-report-block', - templateUrl: './report-block.component.html', - styleUrls: ['./report-block.component.scss'] - }) + selector: 'app-report-block', + templateUrl: './report-block.component.html', + styleUrls: ['./report-block.component.scss'] +}) export class ReportBlockComponent implements OnInit { @Input('id') id!: string; @Input('policyId') policyId!: string; @@ -39,8 +39,8 @@ export class ReportBlockComponent implements OnInit { documents: any; policyCreatorDocument: IReportItem | undefined; searchForm = this.fb.group({ - value: ['', Validators.required] - }); + value: ['', Validators.required] + }); constructor( private policyEngineService: PolicyEngineService, @@ -121,8 +121,8 @@ export class ReportBlockComponent implements OnInit { const report = data.data as IReport; this.hash = data.hash; this.searchForm.patchValue({ - value: this.hash - }); + value: this.hash + }); this.policyDocument = report.policyDocument; this.policyCreatorDocument = report.policyCreatorDocument; this.documents = report.documents || []; @@ -146,15 +146,15 @@ export class ReportBlockComponent implements OnInit { if (this.policyDocument) { this.documents.push({ - type: this.policyDocument.type, - title: 'Policy', - description: this.policyDocument.tag, - tag: this.policyDocument.tag, - visible: true, - issuer: this.policyDocument.issuer, - username: this.policyDocument.username, - document: this.policyDocument.document - }); + type: this.policyDocument.type, + title: 'Policy', + description: this.policyDocument.tag, + tag: this.policyDocument.tag, + visible: true, + issuer: this.policyDocument.issuer, + username: this.policyDocument.username, + document: this.policyDocument.document + }); } if (this.policyCreatorDocument) { this.documents.push(this.policyCreatorDocument); @@ -212,16 +212,17 @@ export class ReportBlockComponent implements OnInit { document?: any ) { const title = `${item.type?.toUpperCase()} Document`; + const row = Array.isArray(item.document) ? item.document[0].document : item.document.document; const dialogRef = this.dialogService.open(VCViewerDialog, { showHeader: false, width: '1000px', styleClass: 'guardian-dialog', data: { - id: item.document.id, - row: item, - dryRun: !!item.document.dryRunId, + id: row.id, + row: row, + dryRun: !!row.dryRunId, viewDocument: true, - document: document || item.document.document, + document: document || row, title: title, type: 'VC', } @@ -232,16 +233,17 @@ export class ReportBlockComponent implements OnInit { openVPDocument(item: any) { const title = `${item.type?.toUpperCase()} Document`; + const row = Array.isArray(item.document) ? item.document[0] : item.document; const dialogRef = this.dialogService.open(VCViewerDialog, { showHeader: false, width: '1000px', styleClass: 'guardian-dialog', data: { - id: item.document.id, - row: item, - dryRun: !!item.document.dryRunId, + id: row.id, + row: row, + dryRun: !!row.dryRunId, viewDocument: true, - document: item.document.document, + document: row.document, title: title, type: 'VP', } @@ -279,9 +281,9 @@ export class ReportBlockComponent implements OnInit { onScrollButtonPress(target: HTMLDivElement, amount: number = 0) { target.scrollBy({ - behavior: 'smooth', - left: amount - }); + behavior: 'smooth', + left: amount + }); } updateFilter() { @@ -304,7 +306,7 @@ export class ReportBlockComponent implements OnInit { onBackClick() { this.loading = true; this.policyEngineService - .setBlockData(this.id, this.policyId, {filterValue: null}) + .setBlockData(this.id, this.policyId, { filterValue: null }) .subscribe( () => { this.loadData(); @@ -437,8 +439,8 @@ export class ReportBlockComponent implements OnInit { const indexDocument = itemDocuments.indexOf(document); const secondDocumentIndex = indexDocument - 1 < 0 - ? itemDocuments.length + (indexDocument - 1) - : indexDocument - 1; + ? itemDocuments.length + (indexDocument - 1) + : indexDocument - 1; this.onMultipleDocumentClick(itemDocuments[secondDocumentIndex], item); } } diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html index e5da0f8b75..dcef32bc58 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html @@ -46,7 +46,7 @@ -
+
Restore
@@ -143,6 +143,7 @@ {{ policyInfo.name }}
+
{ + this.savePointState = value.state; + console.log(value); + }, (e) => { + this.savePointState = false; + }); + } + ngOnInit() { this.loading = true; this.subscription.add( @@ -207,6 +220,7 @@ export class PolicyViewerComponent implements OnInit, OnDestroy { } }) }) + this.getSavepointState(); }, (e) => { this.loading = false; }); @@ -289,7 +303,8 @@ export class PolicyViewerComponent implements OnInit, OnDestroy { public createSavepoint() { this.loading = true; this.policyEngineService.createSavepoint(this.policyInfo.id).subscribe(() => { - this.loadPolicyById(this.policyId); + this.loadPolicyById(this.policyId); + this.getSavepointState(); }, (e) => { this.loading = false; } diff --git a/frontend/src/app/modules/project-comparison/project-comparison.module.ts b/frontend/src/app/modules/project-comparison/project-comparison.module.ts index c206024542..ecd052f0fc 100644 --- a/frontend/src/app/modules/project-comparison/project-comparison.module.ts +++ b/frontend/src/app/modules/project-comparison/project-comparison.module.ts @@ -15,7 +15,8 @@ import { CommonModule } from '@angular/common'; import { AngularSvgIconModule } from 'angular-svg-icon'; import { CompareModule } from '../analytics/analytics.module'; -@NgModule({ declarations: [ +@NgModule({ + declarations: [ AnnotationBlockComponent, ProjectsOverviewComponent, ProjectsComparisonTableComponent @@ -24,7 +25,9 @@ import { CompareModule } from '../analytics/analytics.module'; AnnotationBlockComponent, ProjectsOverviewComponent, ProjectsComparisonTableComponent - ], imports: [CommonModule, + ], + imports: [ + CommonModule, FormsModule, BrowserModule, InputTextModule, @@ -35,6 +38,10 @@ import { CompareModule } from '../analytics/analytics.module'; MultiSelectModule, ReactiveFormsModule, AngularSvgIconModule.forRoot(), - CompareModule], providers: [provideHttpClient(withInterceptorsFromDi())] }) + CompareModule + ], providers: [ + provideHttpClient(withInterceptorsFromDi()) + ] +}) export class ProjectComparisonModule { } diff --git a/frontend/src/app/modules/schema-engine/document-view/document-view.component.html b/frontend/src/app/modules/schema-engine/document-view/document-view.component.html index 43339bb042..f4246f7aed 100644 --- a/frontend/src/app/modules/schema-engine/document-view/document-view.component.html +++ b/frontend/src/app/modules/schema-engine/document-view/document-view.component.html @@ -107,7 +107,8 @@ [delimiter-hide]="true" [dryRun]="dryRun" [values]="item" - [rules]="rulesResults"> + [rules]="rulesResults" + [formulas]="formulasResults"> @@ -127,7 +128,8 @@
- = new Subject(); constructor( private schemaService: SchemaService, private schemaRulesService: SchemaRulesService, + private formulasService: FormulasService, private ref: ChangeDetectorRef ) { @@ -96,6 +102,9 @@ export class DocumentViewComponent implements OnInit { if (!this.schemaMap[type]) { this.schemaMap[type] = null; } + if(!this.schemaId) { + this.schemaId = `#${type}`; + } } const requests: any[] = []; for (const [type, schema] of Object.entries(this.schemaMap)) { @@ -125,11 +134,21 @@ export class DocumentViewComponent implements OnInit { }) .pipe(takeUntil(this.destroy$)) ) + requests.push( + this.formulasService + .getFormulasData({ + policyId: this.policyId, + schemaId: this.schemaId, + documentId: this.documentId + }) + .pipe(takeUntil(this.destroy$)) + ) this.loading = true; forkJoin(requests).subscribe((results: any[]) => { + const formulas = results.pop(); const rules = results.pop(); - this.rules = new DocumentValidators(rules); + for (const result of results) { if (result) { try { @@ -143,7 +162,13 @@ export class DocumentViewComponent implements OnInit { } } } + + this.rules = new DocumentValidators(rules); this.rulesResults = this.rules.validateVC(this.schemaId, this.document); + this.formulas = FormulasTree.from(formulas); + this.formulas?.setDocuments(this.document); + this.formulasResults = this.formulas?.getFields(this.schemaId); + setTimeout(() => { this.loading = false; this.ref.detectChanges(); diff --git a/frontend/src/app/modules/schema-engine/schema-engine.module.ts b/frontend/src/app/modules/schema-engine/schema-engine.module.ts index fe2aa2ee4c..8ec71e75ea 100644 --- a/frontend/src/app/modules/schema-engine/schema-engine.module.ts +++ b/frontend/src/app/modules/schema-engine/schema-engine.module.ts @@ -1,14 +1,14 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; -import {ClipboardModule} from '@angular/cdk/clipboard'; -import {CodemirrorModule} from '@ctrl/ngx-codemirror'; -import {GoogleMapsModule} from '@angular/google-maps'; -import {GeojsonTypeComponent} from './geojson-type/geojson-type.component'; +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { ClipboardModule } from '@angular/cdk/clipboard'; +import { CodemirrorModule } from '@ctrl/ngx-codemirror'; +import { GoogleMapsModule } from '@angular/google-maps'; +import { GeojsonTypeComponent } from './geojson-type/geojson-type.component'; //Modules -import {MaterialModule} from '../common/material.module'; -import {CommonComponentsModule} from '../common/common-components.module'; -import {ArtifactEngineModule} from '../artifact-engine/artifact-engine.module'; +import { MaterialModule } from '../common/material.module'; +import { CommonComponentsModule } from '../common/common-components.module'; +import { ArtifactEngineModule } from '../artifact-engine/artifact-engine.module'; //Components import { SchemaDialog } from './schema-dialog/schema-dialog.component'; import { SchemaFormComponent } from './schema-form/schema-form.component'; @@ -44,6 +44,8 @@ import { AccordionModule } from 'primeng/accordion'; import { DateTimeComponent } from './schema-form/controls/date-time/date-time.component'; import { EnumComponent } from './schema-form/controls/enum/enum'; import { InputComponent } from './schema-form/controls/input/input'; +import { FormulasModule } from '../formulas/formulas.module'; +import { DialogService } from 'primeng/dynamicdialog'; @NgModule({ declarations: [ @@ -91,6 +93,7 @@ import { InputComponent } from './schema-form/controls/input/input'; RadioButtonModule, SelectButtonModule, AccordionModule, + FormulasModule, AngularSvgIconModule.forRoot() ], exports: [ @@ -106,6 +109,9 @@ import { InputComponent } from './schema-form/controls/input/input'; SchemaFieldConfigurationComponent, SchemaFormDialog ], + providers: [ + DialogService + ], }) export class SchemaEngineModule { } diff --git a/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html b/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html index 2051654c78..249db96976 100644 --- a/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html +++ b/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html @@ -7,7 +7,10 @@ [attr.error]="!!error" >
- + +
diff --git a/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.html b/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.html index ea66b5e14f..bf946b3dda 100644 --- a/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.html +++ b/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.html @@ -66,6 +66,18 @@
{{item.unit}}
+
+ +
+
+ svgClass="icon-color-warning"> + svgClass="icon-color-success">
@@ -93,7 +105,7 @@
@@ -184,11 +196,12 @@ + [values]="this.values && this.values[item.name]" + [rules]="rules" + [formulas]="formulas">
@@ -211,11 +224,12 @@ + [values]="listItem" + [rules]="rules" + [formulas]="formulas">
diff --git a/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.scss b/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.scss index 71c71ae886..3584b37e6e 100644 --- a/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.scss +++ b/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.scss @@ -172,6 +172,21 @@ form { font-size: 20px; } + .form-field-formula { + padding: 0px 2px 0px 4px; + margin-left: 10px; + display: flex; + justify-content: flex-start; + align-items: center; + font-size: 20px; + + .guardian-icon-button { + width: 38px; + height: 38px; + border-radius: 8px; + } + } + .file-upload { position: absolute; right: 0; diff --git a/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.ts b/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.ts index a49b4a3213..ab2dd335d2 100644 --- a/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.ts +++ b/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.ts @@ -1,6 +1,8 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, SimpleChanges } from '@angular/core'; import { Schema, SchemaField, SchemaRuleValidateResult, UnitSystem } from '@guardian/interfaces'; import { IPFSService } from 'src/app/services/ipfs.service'; +import { FormulasViewDialog } from '../../formulas/dialogs/formulas-view-dialog/formulas-view-dialog.component'; +import { DialogService } from 'primeng/dynamicdialog'; interface IFieldControl extends SchemaField { fullPath: string; @@ -39,11 +41,16 @@ export class SchemaFormViewComponent implements OnInit { @Input('values') values: any; @Input() dryRun?: boolean = false; @Input() rules?: SchemaRuleValidateResult; + @Input() formulas?: any; public fields: IFieldControl[] | undefined = []; private pageSize: number = 25; - constructor(private ipfs: IPFSService, private changeDetector: ChangeDetectorRef) { } + constructor( + private ipfs: IPFSService, + private dialogService: DialogService, + private changeDetector: ChangeDetectorRef + ) { } ngOnInit(): void { this.init(); @@ -340,4 +347,18 @@ export class SchemaFormViewComponent implements OnInit { public isRulesStatus(item: IFieldControl) { return this.rules?.[item.fullPath]?.status; } -} + + public isFormulas(item: IFieldControl) { + return this.formulas ? this.formulas[item.fullPath] : undefined; + } + + public showFormulas(formulas: any) { + const dialogRef = this.dialogService.open(FormulasViewDialog, { + showHeader: false, + width: '950px', + styleClass: 'guardian-dialog', + data: formulas, + }); + dialogRef.onClose.subscribe((result: any) => { }); + } +} \ No newline at end of file diff --git a/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/components/label-config.ts b/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/components/label-config.ts index a8f9037a29..0e4df88eef 100644 --- a/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/components/label-config.ts +++ b/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/components/label-config.ts @@ -3,7 +3,7 @@ import { IPolicyLabel, GenerateUUIDv4, IPolicyLabelConfig, IGroupItemConfig, Nav import { TreeDragDropService } from "primeng/api"; import { DialogService } from "primeng/dynamicdialog"; import { Subject } from "rxjs"; -import { CustomCustomDialogComponent } from "src/app/modules/common/custom-confirm-dialog/custom-confirm-dialog.component"; +import { CustomConfirmDialogComponent } from "src/app/modules/common/custom-confirm-dialog/custom-confirm-dialog.component"; import { NavMenu, NavItem, NavTree } from "./nav-item"; export class LabelConfig { @@ -137,7 +137,7 @@ export class LabelConfig { } public onDeleteNavItem(node: NavItem) { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', diff --git a/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/components/rules-config.ts b/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/components/rules-config.ts index 8830f52ae9..4cbd3470e6 100644 --- a/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/components/rules-config.ts +++ b/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/components/rules-config.ts @@ -1,7 +1,7 @@ import { Schema, SchemaField, IRulesItemConfig, IStatisticItemConfig, LabelValidators } from "@guardian/interfaces"; import { DialogService } from "primeng/dynamicdialog"; import { Subject } from "rxjs"; -import { CustomCustomDialogComponent } from "src/app/modules/common/custom-confirm-dialog/custom-confirm-dialog.component"; +import { CustomConfirmDialogComponent } from "src/app/modules/common/custom-confirm-dialog/custom-confirm-dialog.component"; import { FormulaRule, ConditionRule, RangeRule } from "src/app/modules/common/models/conditions"; import { createAutocomplete } from "src/app/modules/common/models/lang-modes/autocomplete"; import { SchemaFormulas, SchemaFormula } from "src/app/modules/common/models/schema-formulas"; @@ -531,7 +531,7 @@ export class RulesConfig { } public onDeleteScore(score: SchemaScore) { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', @@ -561,7 +561,7 @@ export class RulesConfig { } public onDeleteFormula(formula: SchemaFormula) { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', diff --git a/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/policy-label-configuration.component.ts b/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/policy-label-configuration.component.ts index 7f02f5f185..7650e2779a 100644 --- a/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/policy-label-configuration.component.ts +++ b/frontend/src/app/modules/statistics/policy-labels/policy-label-configuration/policy-label-configuration.component.ts @@ -13,7 +13,7 @@ import { SearchLabelDialog } from '../dialogs/search-label-dialog/search-label-d import { PolicyLabelPreviewDialog } from '../dialogs/policy-label-preview-dialog/policy-label-preview-dialog.component'; import { LabelConfig } from './components/label-config'; import { RulesConfig } from './components/rules-config'; -import { CustomCustomDialogComponent } from 'src/app/modules/common/custom-confirm-dialog/custom-confirm-dialog.component'; +import { CustomConfirmDialogComponent } from 'src/app/modules/common/custom-confirm-dialog/custom-confirm-dialog.component'; @Component({ selector: 'app-policy-label-configuration', @@ -280,7 +280,7 @@ export class PolicyLabelConfigurationComponent implements OnInit { } private publish() { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', diff --git a/frontend/src/app/modules/statistics/policy-labels/policy-labels/policy-labels.component.html b/frontend/src/app/modules/statistics/policy-labels/policy-labels/policy-labels.component.html index 099b209050..4863d7a83a 100644 --- a/frontend/src/app/modules/statistics/policy-labels/policy-labels/policy-labels.component.html +++ b/frontend/src/app/modules/statistics/policy-labels/policy-labels/policy-labels.component.html @@ -119,7 +119,6 @@ diff --git a/frontend/src/app/modules/statistics/policy-labels/policy-labels/policy-labels.component.ts b/frontend/src/app/modules/statistics/policy-labels/policy-labels/policy-labels.component.ts index 7341016f21..d6ca18f6da 100644 --- a/frontend/src/app/modules/statistics/policy-labels/policy-labels/policy-labels.component.ts +++ b/frontend/src/app/modules/statistics/policy-labels/policy-labels/policy-labels.component.ts @@ -5,7 +5,7 @@ import { forkJoin, Subscription } from 'rxjs'; import { PolicyEngineService } from 'src/app/services/policy-engine.service'; import { ProfileService } from 'src/app/services/profile.service'; import { DialogService } from 'primeng/dynamicdialog'; -import { CustomCustomDialogComponent } from '../../../common/custom-confirm-dialog/custom-confirm-dialog.component'; +import { CustomConfirmDialogComponent } from '../../../common/custom-confirm-dialog/custom-confirm-dialog.component'; import { IImportEntityResult, ImportEntityDialog, ImportEntityType } from '../../../common/import-entity-dialog/import-entity-dialog.component'; import { NewPolicyLabelDialog } from '../dialogs/new-policy-label-dialog/new-policy-label-dialog.component'; import { PolicyLabelsService } from 'src/app/services/policy-labels.service'; @@ -323,7 +323,7 @@ export class PolicyLabelsComponent implements OnInit { if (item.status === EntityStatus.ACTIVE) { return; } - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', @@ -358,7 +358,7 @@ export class PolicyLabelsComponent implements OnInit { } private publish(row: any) { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', diff --git a/frontend/src/app/modules/statistics/policy-statistics/statistic-definition-configuration/statistic-definition-configuration.component.ts b/frontend/src/app/modules/statistics/policy-statistics/statistic-definition-configuration/statistic-definition-configuration.component.ts index ebac3bd688..48b4cd2a60 100644 --- a/frontend/src/app/modules/statistics/policy-statistics/statistic-definition-configuration/statistic-definition-configuration.component.ts +++ b/frontend/src/app/modules/statistics/policy-statistics/statistic-definition-configuration/statistic-definition-configuration.component.ts @@ -19,7 +19,7 @@ import { TreeSource } from '../../../common/tree-graph/tree-source'; import { createAutocomplete } from '../../../common/models/lang-modes/autocomplete'; import { SchemaScore, SchemaScores } from '../../../common/models/schema-scores'; import { SchemaRule, SchemaRules } from '../../../common/models/schema-rules'; -import { CustomCustomDialogComponent } from '../../../common/custom-confirm-dialog/custom-confirm-dialog.component'; +import { CustomConfirmDialogComponent } from '../../../common/custom-confirm-dialog/custom-confirm-dialog.component'; @Component({ selector: 'app-statistic-definition-configuration', @@ -349,8 +349,6 @@ export class StatisticDefinitionConfigurationComponent implements OnInit { }, 200) } - - public onCollapseField(field: TreeListItem) { if (this.rootNode) { const rootView = this.rootNode.fields; @@ -512,7 +510,7 @@ export class StatisticDefinitionConfigurationComponent implements OnInit { } public onDeleteVariable(formula: any) { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', @@ -541,7 +539,7 @@ export class StatisticDefinitionConfigurationComponent implements OnInit { } public onDeleteScore(score: SchemaScore) { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', @@ -656,7 +654,7 @@ export class StatisticDefinitionConfigurationComponent implements OnInit { const rules = this.item?.config?.rules || []; const main = rules.find((r) => r.type === 'main'); if (!main) { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', @@ -671,7 +669,7 @@ export class StatisticDefinitionConfigurationComponent implements OnInit { }); dialogRef.onClose.subscribe((result) => { }); } else { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', diff --git a/frontend/src/app/modules/statistics/policy-statistics/statistic-definitions/statistic-definitions.component.html b/frontend/src/app/modules/statistics/policy-statistics/statistic-definitions/statistic-definitions.component.html index 5a6b031a5e..826976a392 100644 --- a/frontend/src/app/modules/statistics/policy-statistics/statistic-definitions/statistic-definitions.component.html +++ b/frontend/src/app/modules/statistics/policy-statistics/statistic-definitions/statistic-definitions.component.html @@ -159,7 +159,6 @@ diff --git a/frontend/src/app/modules/statistics/policy-statistics/statistic-definitions/statistic-definitions.component.ts b/frontend/src/app/modules/statistics/policy-statistics/statistic-definitions/statistic-definitions.component.ts index a9445860cb..2bd91dd8fd 100644 --- a/frontend/src/app/modules/statistics/policy-statistics/statistic-definitions/statistic-definitions.component.ts +++ b/frontend/src/app/modules/statistics/policy-statistics/statistic-definitions/statistic-definitions.component.ts @@ -7,7 +7,7 @@ import { PolicyStatisticsService } from 'src/app/services/policy-statistics.serv import { ProfileService } from 'src/app/services/profile.service'; import { DialogService } from 'primeng/dynamicdialog'; import { NewPolicyStatisticsDialog } from '../dialogs/new-policy-statistics-dialog/new-policy-statistics-dialog.component'; -import { CustomCustomDialogComponent } from '../../../common/custom-confirm-dialog/custom-confirm-dialog.component'; +import { CustomConfirmDialogComponent } from '../../../common/custom-confirm-dialog/custom-confirm-dialog.component'; import { IImportEntityResult, ImportEntityDialog, ImportEntityType } from '../../../common/import-entity-dialog/import-entity-dialog.component'; @@ -353,7 +353,7 @@ export class StatisticDefinitionsComponent implements OnInit { if (item.status === 'PUBLISHED') { return; } - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', @@ -387,7 +387,7 @@ export class StatisticDefinitionsComponent implements OnInit { const rules = row?.config?.rules || []; const main = rules.find((r) => r.type === 'main'); if (!main) { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', @@ -402,7 +402,7 @@ export class StatisticDefinitionsComponent implements OnInit { }); dialogRef.onClose.subscribe((result) => { }); } else { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', diff --git a/frontend/src/app/modules/statistics/schema-rules/schema-rule-configuration/schema-rule-configuration.component.ts b/frontend/src/app/modules/statistics/schema-rules/schema-rule-configuration/schema-rule-configuration.component.ts index c46e252ca2..52515ba559 100644 --- a/frontend/src/app/modules/statistics/schema-rules/schema-rule-configuration/schema-rule-configuration.component.ts +++ b/frontend/src/app/modules/statistics/schema-rules/schema-rule-configuration/schema-rule-configuration.component.ts @@ -17,7 +17,7 @@ import { SchemaRulesPreviewDialog } from '../dialogs/schema-rules-preview-dialog import { ConditionRule, FormulaRule, RangeRule } from '../../../common/models/conditions'; import { FieldRule, FieldRules } from "src/app/modules/common/models/field-rule"; import { EnumValue, SchemaRuleConfigDialog } from '../dialogs/schema-rule-config-dialog/schema-rule-config-dialog.component'; -import { CustomCustomDialogComponent } from '../../../common/custom-confirm-dialog/custom-confirm-dialog.component'; +import { CustomConfirmDialogComponent } from '../../../common/custom-confirm-dialog/custom-confirm-dialog.component'; import { IPFSService } from 'src/app/services/ipfs.service'; @Component({ @@ -571,7 +571,7 @@ export class SchemaRuleConfigurationComponent implements OnInit { } public onDeleteVariable(variable: FieldRule) { - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', diff --git a/frontend/src/app/modules/statistics/schema-rules/schema-rules/schema-rules.component.ts b/frontend/src/app/modules/statistics/schema-rules/schema-rules/schema-rules.component.ts index ad9e09899f..e72e1b56c9 100644 --- a/frontend/src/app/modules/statistics/schema-rules/schema-rules/schema-rules.component.ts +++ b/frontend/src/app/modules/statistics/schema-rules/schema-rules/schema-rules.component.ts @@ -6,7 +6,7 @@ import { PolicyEngineService } from 'src/app/services/policy-engine.service'; import { ProfileService } from 'src/app/services/profile.service'; import { DialogService } from 'primeng/dynamicdialog'; import { SchemaRulesService } from 'src/app/services/schema-rules.service'; -import { CustomCustomDialogComponent } from '../../../common/custom-confirm-dialog/custom-confirm-dialog.component'; +import { CustomConfirmDialogComponent } from '../../../common/custom-confirm-dialog/custom-confirm-dialog.component'; import { NewSchemaRuleDialog } from '../dialogs/new-schema-rule-dialog/new-schema-rule-dialog.component'; import { IImportEntityResult, ImportEntityDialog, ImportEntityType } from '../../../common/import-entity-dialog/import-entity-dialog.component'; @@ -292,7 +292,7 @@ export class SchemaRulesComponent implements OnInit { if (item.status === EntityStatus.ACTIVE) { return; } - const dialogRef = this.dialogService.open(CustomCustomDialogComponent, { + const dialogRef = this.dialogService.open(CustomConfirmDialogComponent, { showHeader: false, width: '640px', styleClass: 'guardian-dialog', diff --git a/frontend/src/app/services/formulas.service.ts b/frontend/src/app/services/formulas.service.ts new file mode 100644 index 0000000000..23a83ee638 --- /dev/null +++ b/frontend/src/app/services/formulas.service.ts @@ -0,0 +1,107 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { API_BASE_URL } from './api'; + +/** + * Services for working from statistics and separate blocks. + */ +@Injectable() +export class FormulasService { + private readonly url: string = `${API_BASE_URL}/formulas`; + + constructor(private http: HttpClient) { + } + + public static getOptions( + filters: any, + pageIndex?: number, + pageSize?: number + ): HttpParams { + let params = new HttpParams(); + if (filters && typeof filters === 'object') { + for (const key of Object.keys(filters)) { + if (filters[key]) { + params = params.set(key, filters[key]); + } + } + } + if (Number.isInteger(pageIndex) && Number.isInteger(pageSize)) { + params = params.set('pageIndex', String(pageIndex)); + params = params.set('pageSize', String(pageSize)); + } + return params; + } + + + public parsePage(response: HttpResponse) { + const page = response.body || []; + const count = Number(response.headers.get('X-Total-Count')) || page.length; + return { page, count }; + } + + public getFormulas( + pageIndex?: number, + pageSize?: number, + filters?: any + ): Observable> { + const params = FormulasService.getOptions(filters, pageIndex, pageSize); + return this.http.get(`${this.url}`, { observe: 'response', params }); + } + + public createFormula(item: any): Observable { + return this.http.post(`${this.url}/`, item); + } + + public getFormula(id: string): Observable { + return this.http.get(`${this.url}/${id}`); + } + + public getRelationships(id: string): Observable { + return this.http.get(`${this.url}/${id}/relationships`); + } + + public deleteFormula(id: any): Observable { + return this.http.delete(`${this.url}/${id}`); + } + + public updateFormula(item: any): Observable { + return this.http.put(`${this.url}/${item.id}`, item); + } + + public export(id: string): Observable { + return this.http.get(`${this.url}/${id}/export/file`, { + responseType: 'arraybuffer' + }); + } + + public import(policyId: string, file: any): Observable { + return this.http.post(`${this.url}/${policyId}/import/file`, file, { + headers: { + 'Content-Type': 'binary/octet-stream' + } + }); + } + + public previewByFile(policyFile: any): Observable { + return this.http.post(`${this.url}/import/file/preview`, policyFile, { + headers: { + 'Content-Type': 'binary/octet-stream' + } + }); + } + + public getFormulasData(options: { + policyId?: string, + schemaId?: string, + documentId?: string, + parentId?: string, + fullData?: boolean, + }): Observable { + return this.http.post(`${this.url}/data`, options); + } + + public publish(item: any): Observable { + return this.http.put(`${this.url}/${item.id}/publish`, item); + } +} diff --git a/frontend/src/app/services/policy-engine.service.ts b/frontend/src/app/services/policy-engine.service.ts index 0635089997..afb57bc72f 100644 --- a/frontend/src/app/services/policy-engine.service.ts +++ b/frontend/src/app/services/policy-engine.service.ts @@ -237,6 +237,10 @@ export class PolicyEngineService { return this.http.post(`${this.url}/${policyId}/savepoint/restore`, null); } + public getSavepointState(policyId: string): Observable { + return this.http.get(`${this.url}/${policyId}/savepoint/restore`); + } + public loadDocuments( policyId: string, documentType: string, diff --git a/frontend/src/app/themes/guardian/button.scss b/frontend/src/app/themes/guardian/button.scss index 92bec09ff5..43f90903ab 100644 --- a/frontend/src/app/themes/guardian/button.scss +++ b/frontend/src/app/themes/guardian/button.scss @@ -99,6 +99,11 @@ div.guardian-button[disabled="true"] { &.big:hover { box-shadow: 0px 0px 0px 6px var(--guardian-primary-background); } + + &-secondary { + background-color: var(--guardian-secondary-color); + border: 1px solid var(--guardian-primary-color); + } } button.guardian-icon-button[disabled], diff --git a/frontend/src/app/themes/guardian/icon.scss b/frontend/src/app/themes/guardian/icon.scss index 56c28863f3..e1155e7491 100644 --- a/frontend/src/app/themes/guardian/icon.scss +++ b/frontend/src/app/themes/guardian/icon.scss @@ -43,4 +43,24 @@ fill: var(--guardian-font-color); color: var(--guardian-font-color); } + + &-constant { + fill: var(--formula-constant-color); + color: var(--formula-constant-color); + } + + &-variable { + fill: var(--formula-variable-color); + color: var(--formula-variable-color); + } + + &-function { + fill: var(--formula-function-color); + color: var(--formula-function-color); + } + + &-text { + fill: var(--formula-text-color); + color: var(--formula-text-color); + } } \ No newline at end of file diff --git a/frontend/src/app/themes/guardian/input.scss b/frontend/src/app/themes/guardian/input.scss index 0bf47d8030..0de66a5a39 100644 --- a/frontend/src/app/themes/guardian/input.scss +++ b/frontend/src/app/themes/guardian/input.scss @@ -37,6 +37,27 @@ .p-dropdown { width: 100%; } + + .guardian-input { + height: 40px; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: #000; + padding: 8px 16px; + + &:hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + &:focus { + border-color: var(--guardian-primary-color, #4169E2); + box-shadow: none; + } + } } .guardian-input { diff --git a/frontend/src/app/themes/guardian/variables.scss b/frontend/src/app/themes/guardian/variables.scss index 6d4f7176a7..884bacfa67 100644 --- a/frontend/src/app/themes/guardian/variables.scss +++ b/frontend/src/app/themes/guardian/variables.scss @@ -49,4 +49,15 @@ --guardian-header-3-font-size: 20px; --guardian-header-4-font-size: 22px; --guardian-header-5-font-size: 24px; + + --guardian-entity-color: #DA9B22; + + --formula-constant-color: #4169E2; + --formula-constant-background: #e1e7fa; + --formula-variable-color: #DA9B22; + --formula-variable-background: #FFF6E3; + --formula-function-color: #E50299; + --formula-function-background: #fbd9ef; + --formula-text-color: #19BE47; + --formula-text-background: #d7f5e2 } \ No newline at end of file diff --git a/frontend/src/app/utils/permissions-category.ts b/frontend/src/app/utils/permissions-category.ts index ec08f1de10..a4bbd2318a 100644 --- a/frontend/src/app/utils/permissions-category.ts +++ b/frontend/src/app/utils/permissions-category.ts @@ -170,7 +170,7 @@ export class CategoryGroup implements ICategory { constructor(permission: IPermission) { this.id = permission.category; - this.name = categoryNames.get(permission.category) || ''; + this.name = categoryNames.get(permission.category) || permission.category || ''; this.actions = actionName; } diff --git a/frontend/src/app/utils/permissions-entity.ts b/frontend/src/app/utils/permissions-entity.ts index 73942ffa6f..e95f2ebb6e 100644 --- a/frontend/src/app/utils/permissions-entity.ts +++ b/frontend/src/app/utils/permissions-entity.ts @@ -17,7 +17,7 @@ export class EntityDelegate implements IEntity { constructor(permission: IPermission, parent: ICategory) { this.parent = parent; this.id = permission.entity; - this.name = entityNames.get(permission.entity) || ''; + this.name = entityNames.get(permission.entity) || permission.entity || ''; this.type = 'checkbox'; this.actions = new Array(1); } @@ -88,7 +88,7 @@ export class EntityGroup implements IEntity { constructor(permission: IPermission, parent: ICategory) { this.parent = parent; this.id = permission.entity; - this.name = entityNames.get(permission.entity) || ''; + this.name = entityNames.get(permission.entity) || permission.entity || ''; if (permission.action === PermissionActions.ALL) { this.type = 'all'; this.actions = new Array(1); @@ -193,7 +193,7 @@ export class EntityAccess implements IEntity { constructor(permission: IPermission, parent: ICategory) { this.parent = parent; this.id = permission.entity; - this.name = entityNames.get(permission.entity) || ''; + this.name = entityNames.get(permission.entity) || permission.entity || ''; this.type = 'radio'; this.actions = new Array(4); this.control = new UntypedFormControl('Assigned & Published'); diff --git a/frontend/src/app/utils/permissions-interface.ts b/frontend/src/app/utils/permissions-interface.ts index 7ec5cf6a05..a19408355f 100644 --- a/frontend/src/app/utils/permissions-interface.ts +++ b/frontend/src/app/utils/permissions-interface.ts @@ -123,7 +123,8 @@ export const entityNames = new Map([ [PermissionEntities.TRUST_CHAIN, 'Trust Chain'], [PermissionEntities.ROLE, 'Role'], [PermissionEntities.STATISTIC, 'Statistic'], - [PermissionEntities.LABEL, 'Label'] + [PermissionEntities.LABEL, 'Label'], + [PermissionEntities.FORMULA, 'Formula'] ]) export const actionIndexes = new Map([ @@ -168,6 +169,7 @@ export const categoryNames = new Map([ [PermissionCategories.TOOLS, 'Tools'], [PermissionCategories.PERMISSIONS, 'Permissions'], [PermissionCategories.STATISTICS, 'Policy Statistics'], + [PermissionCategories.FORMULAS, 'Formulas'], [PermissionCategories.ACCESS, 'Access'] ]) diff --git a/frontend/src/app/views/new-header/menu.model.ts b/frontend/src/app/views/new-header/menu.model.ts index 90ecc11531..f206b1807d 100644 --- a/frontend/src/app/views/new-header/menu.model.ts +++ b/frontend/src/app/views/new-header/menu.model.ts @@ -36,6 +36,10 @@ const NAVBAR_MENU_STANDARD_REGISTRY: NavbarMenuItem[] = [ title: 'Manage Tools', routerLink: '/tools' }, + { + title: 'Manage Formulas', + routerLink: '/formulas' + }, { title: 'Manage Schema Rules', routerLink: '/schema-rules' @@ -165,6 +169,12 @@ function customMenu(user: UserPermissions): NavbarMenuItem[] { routerLink: '/policy-labels' }); } + if (user.FORMULAS_FORMULA_READ) { + childItems.push({ + title: 'Formulas', + routerLink: '/formulas' + }); + } } if ( user.SCHEMAS_SCHEMA_READ || diff --git a/frontend/src/app/views/roles/roles-view.component.scss b/frontend/src/app/views/roles/roles-view.component.scss index 981a6c91bd..b0daa85292 100644 --- a/frontend/src/app/views/roles/roles-view.component.scss +++ b/frontend/src/app/views/roles/roles-view.component.scss @@ -175,7 +175,8 @@ padding: 10px 76px 10px 16px; } - i, svg { + i, + svg { padding-right: 16px; color: #B0B5BA; } @@ -227,7 +228,7 @@ } .new-role-container { - padding: 56px 48px 48px 48px; + padding: 56px 16px 48px 48px; .page-title { margin-top: 24px; @@ -246,8 +247,10 @@ .role-content { display: grid; grid-template-columns: 300px auto; - width: 100%; + height: calc(100vh - 270px); margin-top: 24px; + overflow: auto; + padding-right: 32px; .role-nav { width: 270px; @@ -568,4 +571,4 @@ .p-field-input:focus { border: 1px solid var(--color-primary); } -} +} \ No newline at end of file diff --git a/frontend/src/assets/images/icons/16/const.svg b/frontend/src/assets/images/icons/16/const.svg new file mode 100644 index 0000000000..fbfe23a15c --- /dev/null +++ b/frontend/src/assets/images/icons/16/const.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/16/function.svg b/frontend/src/assets/images/icons/16/function.svg new file mode 100644 index 0000000000..0537b3bf64 --- /dev/null +++ b/frontend/src/assets/images/icons/16/function.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/16/text.svg b/frontend/src/assets/images/icons/16/text.svg new file mode 100644 index 0000000000..843b2e679b --- /dev/null +++ b/frontend/src/assets/images/icons/16/text.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/16/variable.svg b/frontend/src/assets/images/icons/16/variable.svg new file mode 100644 index 0000000000..98c121a88e --- /dev/null +++ b/frontend/src/assets/images/icons/16/variable.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/cloud-upload.svg b/frontend/src/assets/images/icons/cloud-upload.svg new file mode 100644 index 0000000000..621d1ee217 --- /dev/null +++ b/frontend/src/assets/images/icons/cloud-upload.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/const.svg b/frontend/src/assets/images/icons/const.svg new file mode 100644 index 0000000000..744b398350 --- /dev/null +++ b/frontend/src/assets/images/icons/const.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/edit.svg b/frontend/src/assets/images/icons/edit.svg index ac1c6476f5..69768a34e8 100644 --- a/frontend/src/assets/images/icons/edit.svg +++ b/frontend/src/assets/images/icons/edit.svg @@ -1,5 +1,3 @@ - + diff --git a/frontend/src/assets/images/icons/equal.svg b/frontend/src/assets/images/icons/equal.svg index d38c7e1682..9cf1bae65b 100644 --- a/frontend/src/assets/images/icons/equal.svg +++ b/frontend/src/assets/images/icons/equal.svg @@ -1,5 +1,3 @@ - - + + diff --git a/frontend/src/assets/images/icons/function.svg b/frontend/src/assets/images/icons/function.svg new file mode 100644 index 0000000000..d41a2cd266 --- /dev/null +++ b/frontend/src/assets/images/icons/function.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/text.svg b/frontend/src/assets/images/icons/text.svg new file mode 100644 index 0000000000..a582150481 --- /dev/null +++ b/frontend/src/assets/images/icons/text.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/variable.svg b/frontend/src/assets/images/icons/variable.svg new file mode 100644 index 0000000000..eeb35c839e --- /dev/null +++ b/frontend/src/assets/images/icons/variable.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 4002e9c116..c663514be2 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -7,6 +7,7 @@ @import "codemirror/addon/hint/show-hint.css"; @import "primeicons/primeicons.css"; @import url("https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"); +@import "mathlive/fonts.css"; html, body { @@ -678,3 +679,31 @@ svg-icon.svg-icon-32 { border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; } + +.ML__keyboard { + // --_keycap-background: #E1E7EF !important; + // --_keycap-background-hover: #d6dbe3 !important; + // --_background: #f4f8fc !important; + + &::before { + position: absolute; + content: ""; + left: 0px; + top: 0px; + bottom: 0px; + width: var(--header-width); + z-index: 99; + pointer-events: all; + } + + .MLK__backdrop { + width: calc(100% - var(--header-width)); + margin-left: var(--header-width); + + // background: #EFF3F7; + } + + .MLK__keycap { + border: 1px solid #cbcbcb; + } +} \ No newline at end of file diff --git a/guardian-cli/package.json b/guardian-cli/package.json index cc43a47e93..4a754622b6 100644 --- a/guardian-cli/package.json +++ b/guardian-cli/package.json @@ -17,11 +17,11 @@ "author": "IntellectEU ", "license": "Apache-2.0", "devDependencies": { - "@types/node": "^18.15.3", + "@types/node": "^22.10.10", "typescript": "^5.0.2" }, "dependencies": { - "@hashgraph/sdk": "^2.46.0", + "@hashgraph/sdk": "^2.52.0", "axios": "^1.6.7", "commander": "^10.0.0", "solc": "0.8.11", diff --git a/guardian-service/package.json b/guardian-service/package.json index 1301db527a..680429170a 100644 --- a/guardian-service/package.json +++ b/guardian-service/package.json @@ -16,8 +16,8 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "^3.0.0", - "@guardian/interfaces": "^3.0.0", + "@guardian/common": "^3.1.0-rc", + "@guardian/interfaces": "^3.1.0-rc", "@hashgraph/sdk": "2.52.0", "@mattrglobal/jsonld-signatures-bbs": "^1.1.2", "@meeco/cryppo": "^2.0.2", @@ -65,7 +65,7 @@ "@types/gulp": "^4", "@types/gulp-rename": "^2", "@types/jszip": "^3.4.1", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "chai": "4.3.4", "gulp": "^4.0.2", "gulp-copy": "^4.0.1", @@ -99,5 +99,5 @@ "test:stability": "mocha tests/stability.test.mjs" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/guardian-service/src/api/formulas.service.ts b/guardian-service/src/api/formulas.service.ts new file mode 100644 index 0000000000..00007e9e4f --- /dev/null +++ b/guardian-service/src/api/formulas.service.ts @@ -0,0 +1,440 @@ +import { ApiResponse } from './helpers/api-response.js'; +import { + BinaryMessageResponse, + DatabaseServer, + MessageError, + MessageResponse, + PinoLogger, + Formula, + FormulaImportExport, + PolicyImportExport, + Users +} from '@guardian/common'; +import { EntityStatus, IOwner, MessageAPI, PolicyType, SchemaStatus } from '@guardian/interfaces'; +import { getFormulasData, publishFormula } from './helpers/formulas-helpers.js'; +import { emptyNotifier } from '../helpers/notifier.js'; + +/** + * Connect to the message broker methods of working with formula. + */ +export async function formulasAPI(logger: PinoLogger): Promise { + /** + * Create new formula + * + * @param payload - formula + * + * @returns {any} new formula + */ + ApiResponse(MessageAPI.CREATE_FORMULA, + async (msg: { formula: Formula, owner: IOwner }) => { + try { + if (!msg) { + return new MessageError('Invalid parameters.'); + } + const { formula, owner } = msg; + + if (!formula) { + return new MessageError('Invalid object.'); + } + + const policyId = formula.policyId; + const policy = await DatabaseServer.getPolicyById(policyId); + if (!policy) { + return new MessageError('Item does not exist.'); + } + + delete formula._id; + delete formula.id; + delete formula.status; + delete formula.owner; + formula.creator = owner.creator; + formula.owner = owner.owner; + formula.policyId = policy.id; + formula.policyTopicId = policy.topicId; + formula.policyInstanceTopicId = policy.instanceTopicId; + formula.status = EntityStatus.DRAFT; + formula.config = FormulaImportExport.validateConfig(formula.config); + const row = await DatabaseServer.createFormula(formula); + return new MessageResponse(row); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + /** + * Get formulas + * + * @param {any} msg - filters + * + * @returns {any} - formulas + */ + ApiResponse(MessageAPI.GET_FORMULAS, + async (msg: { filters: any, owner: IOwner }) => { + try { + if (!msg) { + return new MessageError('Invalid parameters.'); + } + const { filters, owner } = msg; + const { policyId, pageIndex, pageSize } = filters; + + const otherOptions: any = {}; + const _pageSize = parseInt(pageSize, 10); + const _pageIndex = parseInt(pageIndex, 10); + if (Number.isInteger(_pageSize) && Number.isInteger(_pageIndex)) { + otherOptions.orderBy = { createDate: 'DESC' }; + otherOptions.limit = _pageSize; + otherOptions.offset = _pageIndex * _pageSize; + } else { + otherOptions.orderBy = { createDate: 'DESC' }; + otherOptions.limit = 100; + } + otherOptions.fields = [ + 'id', + 'creator', + 'owner', + 'name', + 'description', + 'status', + 'policyId', + 'policyTopicId', + 'policyInstanceTopicId', + 'config' + ]; + const query: any = { + owner: owner.owner + }; + if (policyId) { + query.policyId = policyId; + } + const [items, count] = await DatabaseServer.getFormulasAndCount(query, otherOptions); + return new MessageResponse({ items, count }); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + /** + * Get formula + * + * @param {any} msg - formula id + * + * @returns {any} - formula + */ + ApiResponse(MessageAPI.GET_FORMULA, + async (msg: { formulaId: string, owner: IOwner }) => { + try { + if (!msg) { + return new MessageError('Invalid parameters.'); + } + const { formulaId, owner } = msg; + const item = await DatabaseServer.getFormulaById(formulaId); + if (!(item && item.owner === owner.owner)) { + return new MessageError('Item does not exist.'); + } + return new MessageResponse(item); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + /** + * Update formula + * + * @param payload - formula + * + * @returns formula + */ + ApiResponse(MessageAPI.UPDATE_FORMULA, + async (msg: { + formulaId: string, + formula: Formula, + owner: IOwner + }) => { + try { + if (!msg) { + return new MessageError('Invalid parameters.'); + } + const { formulaId, formula, owner } = msg; + + const item = await DatabaseServer.getFormulaById(formulaId); + if (!item || item.owner !== owner.owner) { + return new MessageError('Item does not exist.'); + } + if (item.status === EntityStatus.PUBLISHED) { + return new MessageError('Item is published.'); + } + + item.name = formula.name; + item.description = formula.description; + item.config = FormulaImportExport.validateConfig(formula.config); + const result = await DatabaseServer.updateFormula(item); + return new MessageResponse(result); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + /** + * Delete formula + * + * @param {any} msg - formula id + * + * @returns {boolean} - Operation success + */ + ApiResponse(MessageAPI.DELETE_FORMULA, + async (msg: { formulaId: string, owner: IOwner }) => { + try { + if (!msg) { + return new MessageError('Invalid parameters.'); + } + const { formulaId, owner } = msg; + const item = await DatabaseServer.getFormulaById(formulaId); + if (!item || item.owner !== owner.owner) { + return new MessageError('Item does not exist.'); + } + if (item.status === EntityStatus.PUBLISHED) { + return new MessageError('Item is published.'); + } + await DatabaseServer.removeFormula(item); + return new MessageResponse(true); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + /** + * Export formula + * + * @param {any} msg - Export formula parameters + * + * @returns {any} - zip file + */ + ApiResponse(MessageAPI.EXPORT_FORMULA_FILE, + async (msg: { formulaId: string, owner: IOwner }) => { + try { + if (!msg) { + return new MessageError('Invalid export theme parameters'); + } + const { formulaId, owner } = msg; + + const item = await DatabaseServer.getFormulaById(formulaId); + if (!(item && item.owner === owner.owner)) { + return new MessageError('Item does not exist.'); + } + + const zip = await FormulaImportExport.generate(item); + const file = await zip.generateAsync({ + type: 'arraybuffer', + compression: 'DEFLATE', + compressionOptions: { + level: 3, + }, + }); + + return new BinaryMessageResponse(file); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + /** + * Import formula + * + * @param {any} msg - Import formula parameters + * + * @returns {any} - new formula + */ + ApiResponse(MessageAPI.IMPORT_FORMULA_FILE, + async (msg: { zip: any, policyId: string, owner: IOwner }) => { + try { + const { zip, policyId, owner } = msg; + if (!zip) { + throw new Error('file in body is empty'); + } + + const policy = await DatabaseServer.getPolicyById(policyId); + if (!policy) { + return new MessageError('Item does not exist.'); + } + + const preview = await FormulaImportExport.parseZipFile(Buffer.from(zip.data)); + const { formula } = preview; + + delete formula._id; + delete formula.id; + delete formula.status; + delete formula.owner; + formula.creator = owner.creator; + formula.owner = owner.owner; + formula.policyId = policyId; + formula.policyTopicId = policy.topicId; + formula.policyInstanceTopicId = policy.instanceTopicId; + formula.status = EntityStatus.DRAFT; + formula.config = FormulaImportExport.validateConfig(formula.config); + const row = await DatabaseServer.createFormula(formula); + + return new MessageResponse(row); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + /** + * Preview formula + * + * @param {any} msg - zip file + * + * @returns {any} Preview + */ + ApiResponse(MessageAPI.PREVIEW_FORMULA_FILE, + async (msg: { zip: any, owner: IOwner }) => { + try { + const { zip } = msg; + if (!zip) { + throw new Error('file in body is empty'); + } + const preview = await FormulaImportExport.parseZipFile(Buffer.from(zip.data)); + const { formula } = preview; + return new MessageResponse(formula); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + /** + * Get formula relationships + * + * @param {any} msg - formula id + * + * @returns {any} relationships + */ + ApiResponse(MessageAPI.GET_FORMULA_RELATIONSHIPS, + async (msg: { formulaId: any, owner: IOwner }) => { + try { + const { formulaId, owner } = msg; + const item = await DatabaseServer.getFormulaById(formulaId); + if (!(item && item.owner === owner.owner)) { + return new MessageError('Item does not exist.'); + } + + const policyId = item.policyId; + const policy = await DatabaseServer.getPolicyById(policyId); + if (!policy) { + return new MessageError('Item does not exist.'); + } + + const { schemas, toolSchemas } = await PolicyImportExport.fastLoadSchemas(policy); + const all = [].concat(schemas, toolSchemas); + + const formulas = await DatabaseServer.getFormulas({ + id: { $ne: formulaId }, + policyId: policy.id + }); + + return new MessageResponse({ + policy, + schemas: all, + formulas + }); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + /** + * Get Formulas data + * + * @param {any} msg - options + * + * @returns {any} - Formulas data + */ + ApiResponse(MessageAPI.GET_FORMULAS_DATA, + async (msg: { + options: { + policyId: string, + schemaId: string, + documentId: string, + parentId: string + } + owner: IOwner + }) => { + try { + if (!msg) { + return new MessageError('Invalid parameters.'); + } + const { options, owner } = msg; + const { policyId } = options; + + const policy = await DatabaseServer.getPolicyById(policyId); + if (!policy || policy.status !== PolicyType.PUBLISH) { + return new MessageResponse(null); + } + + const formulas = await DatabaseServer.getFormulas({ policyTopicId: policy.topicId }); + + if (!formulas.length) { + return new MessageResponse(null); + } + + const { document, relationships } = await getFormulasData(options, owner); + const { schemas, toolSchemas } = await PolicyImportExport.fastLoadSchemas(policy); + const all = [].concat(schemas, toolSchemas).filter((s) => s.status === SchemaStatus.PUBLISHED); + return new MessageResponse({ + formulas, + document, + relationships, + schemas: all + }); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + /** + * Publish Formula + * + * @param {any} msg - Formula id + * + * @returns {any} - Formula + */ + ApiResponse(MessageAPI.PUBLISH_FORMULA, + async (msg: { formulaId: string, owner: IOwner }) => { + try { + if (!msg) { + return new MessageError('Invalid parameters.'); + } + const { formulaId, owner } = msg; + + const item = await DatabaseServer.getFormulaById(formulaId); + if (!item || item.owner !== owner.owner) { + return new MessageError('Item does not exist.'); + } + if (item.status === EntityStatus.PUBLISHED) { + return new MessageError(`Item is already published.`); + } + + const policyId = item.policyId; + const policy = await DatabaseServer.getPolicyById(policyId); + if (!policy || policy.status !== PolicyType.PUBLISH) { + return new MessageError('The policy has not published yet.'); + } + + const root = await (new Users()).getHederaAccount(owner.creator); + const result = await publishFormula(item, owner, root, emptyNotifier()); + return new MessageResponse(result); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); +} \ No newline at end of file diff --git a/guardian-service/src/api/helpers/formulas-helpers.ts b/guardian-service/src/api/helpers/formulas-helpers.ts new file mode 100644 index 0000000000..b9f561a7f7 --- /dev/null +++ b/guardian-service/src/api/helpers/formulas-helpers.ts @@ -0,0 +1,118 @@ +import { DatabaseServer, Formula, FormulaImportExport, FormulaMessage, MessageAction, MessageServer, TopicConfig, VcDocument } from '@guardian/common'; +import { EntityStatus, IOwner, IRootConfig } from '@guardian/interfaces'; +import { INotifier } from '../../helpers/notifier.js'; + +async function findRelationships(target: VcDocument): Promise { + if (!target) { + return []; + } + + const prevRelationships = new Map(); + prevRelationships.set(target.messageId, target); + + await addRelationships(target, prevRelationships); + + return Array.from(prevRelationships.values()); +} + +async function addRelationships(doc: VcDocument, relationships: Map) { + if (doc && doc.relationships) { + for (const id of doc.relationships) { + await addRelationship(id, relationships); + } + } +} + +async function addRelationship(messageId: string, relationships: Map) { + if (!messageId || relationships.has(messageId)) { + return; + } + const doc = await DatabaseServer.getVC({ messageId }); + relationships.set(messageId, doc); + await addRelationships(doc, relationships); +} + +function checkDocument(document: any, policyId: string, owner: IOwner): boolean { + return (document.policyId === policyId); +} + +export async function getFormulasData( + option: { + policyId: string, + schemaId: string, + documentId: string, + parentId: string + }, + owner: IOwner +) { + const { policyId, documentId, parentId } = option; + + const result: { + document: VcDocument | null, + relationships: VcDocument[] + } = { + document: null, + relationships: [] + } + + if (documentId) { + const doc = await DatabaseServer.getVCById(documentId); + if (doc) { + result.document = doc; + result.relationships = await findRelationships(doc); + } + } + + if (parentId) { + const doc = await DatabaseServer.getVCById(parentId); + if (doc) { + result.relationships = await findRelationships(doc); + } + } + + if (result.document) { + if (!checkDocument(result.document, policyId, owner)) { + result.document = null; + } + } + + if (result.relationships) { + result.relationships = result.relationships.filter((doc) => checkDocument(doc, policyId, owner)); + } + + return result; +} + +export async function publishFormula( + item: Formula, + owner: IOwner, + root: IRootConfig, + notifier: INotifier +): Promise { + item.status = EntityStatus.PUBLISHED; + + notifier.completedAndStart('Resolve topic'); + const topic = await TopicConfig.fromObject(await DatabaseServer.getTopicById(item.policyTopicId), true); + const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions) + .setTopicObject(topic); + + notifier.completedAndStart('Publish formula'); + const zip = await FormulaImportExport.generate(item); + const buffer = await zip.generateAsync({ + type: 'arraybuffer', + compression: 'DEFLATE', + compressionOptions: { + level: 3 + } + }); + + const publishMessage = new FormulaMessage(MessageAction.PublishFormula); + publishMessage.setDocument(item, buffer); + const statMessageResult = await messageServer + .sendMessage(publishMessage); + + item.messageId = statMessageResult.getId(); + + const result = await DatabaseServer.updateFormula(item); + return result; +} diff --git a/guardian-service/src/api/helpers/index.ts b/guardian-service/src/api/helpers/index.ts index 65621be313..bc962fa464 100644 --- a/guardian-service/src/api/helpers/index.ts +++ b/guardian-service/src/api/helpers/index.ts @@ -1,11 +1,16 @@ export * from './api-helper.js'; export * from './api-response.js'; +export * from './artifact-import-export-helper.js'; +export * from './contract-api.js'; +export * from './default-schemas.js'; +export * from './formulas-helpers.js'; +export * from './policy-labels-helpers.js'; +// export * from './policy-statistics-helpers.js'; export * from './policy-wizard-helper.js'; export * from './schema-helper.js'; export * from './schema-import-export-helper.js'; export * from './schema-publish-helper.js'; -export * from './tool-import-export-helper.js'; -export * from './token-import-export-helper.js'; -export * from './artifact-import-export-helper.js'; +export * from './schema-rules-helpers.js'; export * from './tag-import-export-helper.js'; -export * from './contract-api.js'; +export * from './token-import-export-helper.js'; +export * from './tool-import-export-helper.js'; \ No newline at end of file diff --git a/guardian-service/src/api/schema-rules.service.ts b/guardian-service/src/api/schema-rules.service.ts index e3511be09e..03c9a8f2af 100644 --- a/guardian-service/src/api/schema-rules.service.ts +++ b/guardian-service/src/api/schema-rules.service.ts @@ -302,11 +302,11 @@ export async function schemaRulesAPI(logger: PinoLogger): Promise { }); /** - * Inactivate schema rule + * Get schema rule data * - * @param {any} msg - schema rule id + * @param {any} msg - options * - * @returns {any} - schema rule + * @returns {any} - schema rule data */ ApiResponse(MessageAPI.GET_SCHEMA_RULE_DATA, async (msg: { diff --git a/guardian-service/src/app.ts b/guardian-service/src/app.ts index c9cdd6dc30..c2b013dad2 100644 --- a/guardian-service/src/app.ts +++ b/guardian-service/src/app.ts @@ -78,7 +78,8 @@ import { Wallet, WiperRequest, Workers, - PolicyLabelDocument + PolicyLabelDocument, + Formula } from '@guardian/common'; import { ApplicationStates, PolicyEvents, PolicyType, WorkerTaskType } from '@guardian/interfaces'; import { AccountId, PrivateKey, TopicId } from '@hashgraph/sdk'; @@ -115,6 +116,7 @@ import { permissionAPI } from './api/permission.service.js'; import { setDefaultSchema } from './api/helpers/default-schemas.js'; import { policyLabelsAPI } from './api/policy-labels.service.js'; import { initMathjs } from './utils/formula.js'; +import { formulasAPI } from './api/formulas.service.js'; export const obj = {}; @@ -167,7 +169,8 @@ const necessaryEntity = [ PolicyStatisticDocument, SchemaRule, PolicyLabel, - PolicyLabelDocument + PolicyLabelDocument, + Formula ] Promise.all([ @@ -273,6 +276,7 @@ Promise.all([ await statisticsAPI(logger); await schemaRulesAPI(logger); await policyLabelsAPI(logger); + await formulasAPI(logger); } catch (error) { console.error(error.message); process.exit(0); diff --git a/guardian-service/src/policy-engine/helpers/policy-import-export-helper.ts b/guardian-service/src/policy-engine/helpers/policy-import-export-helper.ts index 4f51561ed8..d0bcb7421b 100644 --- a/guardian-service/src/policy-engine/helpers/policy-import-export-helper.ts +++ b/guardian-service/src/policy-engine/helpers/policy-import-export-helper.ts @@ -1,5 +1,5 @@ -import { BlockType, ConfigType, GenerateUUIDv4, IOwner, IRootConfig, ModuleStatus, PolicyTestStatus, PolicyToolMetadata, PolicyType, SchemaCategory, SchemaEntity, TagType, TopicType } from '@guardian/interfaces'; -import { DatabaseServer, IPolicyComponents, PinoLogger, MessageAction, MessageServer, MessageType, Policy, PolicyMessage, PolicyTool, RecordImportExport, regenerateIds, replaceAllEntities, replaceAllVariables, replaceArtifactProperties, Schema, SchemaFields, Tag, Token, Topic, TopicConfig, TopicHelper, Users } from '@guardian/common'; +import { BlockType, ConfigType, EntityStatus, GenerateUUIDv4, IFormula, IOwner, IRootConfig, ModuleStatus, PolicyTestStatus, PolicyToolMetadata, PolicyType, SchemaCategory, SchemaEntity, TagType, TopicType } from '@guardian/interfaces'; +import { DatabaseServer, IPolicyComponents, PinoLogger, MessageAction, MessageServer, MessageType, Policy, PolicyMessage, PolicyTool, RecordImportExport, regenerateIds, replaceAllEntities, replaceAllVariables, replaceArtifactProperties, Schema, SchemaFields, Tag, Token, Topic, TopicConfig, TopicHelper, Users, Formula, FormulaImportExport } from '@guardian/common'; import { ImportArtifactResult, ImportTokenMap, ImportTokenResult, ImportToolMap, ImportToolResults, ImportSchemaMap, ImportSchemaResult, importArtifactsByFiles, importSubTools, importTokensByFiles, publishSystemSchemas, importTag, SchemaImportExportHelper } from '../../api/helpers/index.js'; import { PolicyConverterUtils } from '../policy-converter-utils.js'; import { INotifier, emptyNotifier } from '../../helpers/notifier.js'; @@ -50,6 +50,21 @@ export interface ImportTestResult { files: [any, Buffer][]; } +export interface ImportFormulaResult { + /** + * New schema uuid + */ + formulasMap: Map; + /** + * Errors + */ + errors: any[]; + /** + * Errors + */ + files: IFormula[]; +} + export class PolicyImport { private readonly demo: boolean; private readonly notifier: INotifier; @@ -73,6 +88,8 @@ export class PolicyImport { private testsMapping: Map; // tslint:disable-next-line:no-unused-variable private topicId: string; + private formulasResult: ImportFormulaResult; + private formulasMapping: Map; constructor(demo: boolean, notifier: INotifier) { this.demo = demo; @@ -135,7 +152,7 @@ export class PolicyImport { owner: user.owner, policyId: null, policyUUID: null, - topicId: `0.0.${Date.now()}${(Math.random()*1000).toFixed(0)}` + topicId: `0.0.${Date.now()}${(Math.random() * 1000).toFixed(0)}` }, null, null); await DatabaseServer.saveTopic(this.topicRow.toObject()); } else if (versionOfTopicId) { @@ -309,14 +326,55 @@ export class PolicyImport { this.testsMapping = testsMap; } + private async importFormulas(formulas: Formula[], user: IOwner) { + this.notifier.completedAndStart('Import formulas'); + + const formulasMap = new Map(); + const errors: any[] = []; + const files: IFormula[] = []; + for (const formula of formulas) { + const oldUUID = formula.uuid; + const newUUID = GenerateUUIDv4(); + try { + files.push({ + uuid: newUUID, + name: formula.name, + description: formula.description, + owner: user.creator, + creator: user.creator, + status: EntityStatus.DRAFT, + config: formula.config + }) + formulasMap.set(oldUUID, newUUID); + } catch (error) { + errors.push({ + type: 'test', + uuid: oldUUID, + name: oldUUID, + error: error.toString(), + }) + } + } + + this.formulasResult = { formulasMap, errors, files }; + this.formulasMapping = formulasMap; + } + private async updateUUIDs(policy: Policy): Promise { await PolicyImportExportHelper.replaceConfig( policy, this.schemasMapping, this.artifactsMapping, this.tokenMapping, - this.toolsMapping + this.toolsMapping, ); + for (const formula of this.formulasResult.files) { + PolicyImportExportHelper.replaceFormulaConfig( + formula, + this.schemasMapping, + this.formulasMapping, + ); + } return policy; } @@ -362,6 +420,17 @@ export class PolicyImport { } } + private async saveFormulas(policy: Policy) { + this.notifier.completedAndStart('Saving formulas in DB'); + for (const formula of this.formulasResult.files) { + formula.policyId = policy.id; + formula.policyTopicId = policy.topicId; + formula.policyInstanceTopicId = policy.instanceTopicId; + formula.config = FormulaImportExport.validateConfig(formula.config); + await DatabaseServer.createFormula(formula); + } + } + private async saveHash(policy: Policy, logger: PinoLogger) { this.notifier.completedAndStart('Updating hash'); await PolicyImportExportHelper.updatePolicyComponents(policy, logger); @@ -425,6 +494,11 @@ export class PolicyImport { errors.push(error); } } + if (this.formulasResult.errors) { + for (const error of this.formulasResult.errors) { + errors.push(error); + } + } return errors; } @@ -436,7 +510,7 @@ export class PolicyImport { metadata: PolicyToolMetadata | null, logger: PinoLogger, ): Promise { - const { policy, tokens, schemas, artifacts, tags, tools, tests } = policyComponents; + const { policy, tokens, schemas, artifacts, tags, tools, tests, formulas } = policyComponents; await this.resolveAccount(user); await this.dataPreparation(policy, user, additionalPolicyConfig); await this.createPolicyTopic(policy, versionOfTopicId, user); @@ -446,12 +520,15 @@ export class PolicyImport { await this.importSchemas(schemas, user); await this.importArtifacts(artifacts, user); await this.importTests(tests, user); + await this.importFormulas(formulas, user); + await this.updateUUIDs(policy); const row = await this.savePolicy(policy); await this.saveTopic(row); await this.saveArtifacts(row); await this.saveTests(row); + await this.saveFormulas(row); await this.saveHash(row, logger); await this.setSuggestionsConfig(row, user); await this.importTags(row, tags); @@ -571,6 +648,24 @@ export class PolicyImportExportHelper { replaceArtifactProperties(policy.config, 'uuid', artifactsMap); } + /** + * Replace config + * @param policy + * @param schemasMap + */ + public static async replaceFormulaConfig( + formula: IFormula, + schemasMapping: ImportSchemaMap[], + toolsMapping: Map, + ) { + for (const item of schemasMapping) { + FormulaImportExport.replaceIds(formula.config, item.oldIRI, item.newIRI); + } + for (const [oldId, newId] of toolsMapping.entries()) { + FormulaImportExport.replaceIds(formula.config, oldId, newId); + } + } + /** * Convert errors to string * @param errors diff --git a/guardian-service/src/policy-engine/policy-engine.service.ts b/guardian-service/src/policy-engine/policy-engine.service.ts index c17a3bfa89..a17a82b9ed 100644 --- a/guardian-service/src/policy-engine/policy-engine.service.ts +++ b/guardian-service/src/policy-engine/policy-engine.service.ts @@ -1644,59 +1644,86 @@ export class PolicyEngineService { }); this.channel.getMessages(PolicyEngineEvents.CREATE_SAVEPOINT, - async (msg: {policyId: string, owner: IOwner}) => { - try { - const {policyId, owner} = msg; - const policy = await DatabaseServer.getPolicyById(policyId); - await this.policyEngine.accessPolicy(policy, owner, 'read'); - if (!policy.config) { - throw new Error('The policy is empty'); - } - if (!PolicyHelper.isDryRunMode(policy)) { - throw new Error(`Policy is not in Dry Run`); - } + async (msg: { policyId: string, owner: IOwner }) => { + try { + const { policyId, owner } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + if (!policy.config) { + throw new Error('The policy is empty'); + } + if (!PolicyHelper.isDryRunMode(policy)) { + throw new Error(`Policy is not in Dry Run`); + } - await DatabaseServer.createSavepoint(policyId); - await DatabaseServer.copyStates(policyId); - // const users = await DatabaseServer.getVirtualUsers(policyId); - // await DatabaseServer.setVirtualUser(policyId, users[0]?.did); - // const filters = await this.policyEngine.addAccessFilters({}, owner); - // const policies = (await DatabaseServer.getListOfPolicies(filters)); - console.log('Create savepoint'); - return new MessageResponse({}); - } catch (error) { - await logger.error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); + await DatabaseServer.createSavepoint(policyId); + await DatabaseServer.copyStates(policyId); + // const users = await DatabaseServer.getVirtualUsers(policyId); + // await DatabaseServer.setVirtualUser(policyId, users[0]?.did); + // const filters = await this.policyEngine.addAccessFilters({}, owner); + // const policies = (await DatabaseServer.getListOfPolicies(filters)); + console.log('Create savepoint'); + return new MessageResponse({}); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); this.channel.getMessages(PolicyEngineEvents.DELETE_SAVEPOINT, - async (msg: {policyId: string, owner: IOwner}) => { - try { - const {policyId, owner} = msg; - const policy = await DatabaseServer.getPolicyById(policyId); - await this.policyEngine.accessPolicy(policy, owner, 'read'); - if (!policy.config) { - throw new Error('The policy is empty'); - } - if (!PolicyHelper.isDryRunMode(policy)) { - throw new Error(`Policy is not in Dry Run`); - } + async (msg: { policyId: string, owner: IOwner }) => { + try { + const { policyId, owner } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + if (!policy.config) { + throw new Error('The policy is empty'); + } + if (!PolicyHelper.isDryRunMode(policy)) { + throw new Error(`Policy is not in Dry Run`); + } - await DatabaseServer.restoreSavepoint(policyId); - // const users = await DatabaseServer.getVirtualUsers(policyId); - // await DatabaseServer.setVirtualUser(policyId, users[0]?.did); - // const filters = await this.policyEngine.addAccessFilters({}, owner); - // const policies = (await DatabaseServer.getListOfPolicies(filters)); - console.log('Delete savepoint'); - return new MessageResponse({}); - } catch (error) { - await logger.error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); + await DatabaseServer.restoreSavepoint(policyId); + // const users = await DatabaseServer.getVirtualUsers(policyId); + // await DatabaseServer.setVirtualUser(policyId, users[0]?.did); + // const filters = await this.policyEngine.addAccessFilters({}, owner); + // const policies = (await DatabaseServer.getListOfPolicies(filters)); + console.log('Delete savepoint'); + return new MessageResponse({}); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); this.channel.getMessages(PolicyEngineEvents.RESTORE_SAVEPOINT, + async (msg: { policyId: string, owner: IOwner }) => { + try { + const { policyId, owner } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + if (!policy.config) { + throw new Error('The policy is empty'); + } + if (!PolicyHelper.isDryRunMode(policy)) { + throw new Error(`Policy is not in Dry Run`); + } + + await DatabaseServer.restoreSavepoint(policyId); + await DatabaseServer.restoreStates(policyId); + // const users = await DatabaseServer.getVirtualUsers(policyId); + // await DatabaseServer.setVirtualUser(policyId, users[0]?.did); + // const filters = await this.policyEngine.addAccessFilters({}, owner); + // const policies = (await DatabaseServer.getListOfPolicies(filters)); + console.log('Restore savepoint'); + return new MessageResponse({}); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.GET_SAVEPOINT, async (msg: {policyId: string, owner: IOwner}) => { try { const {policyId, owner} = msg; @@ -1709,14 +1736,13 @@ export class PolicyEngineService { throw new Error(`Policy is not in Dry Run`); } - await DatabaseServer.restoreSavepoint(policyId); - await DatabaseServer.restoreStates(policyId); + const state = await DatabaseServer.getSavepointSate(policyId); // const users = await DatabaseServer.getVirtualUsers(policyId); // await DatabaseServer.setVirtualUser(policyId, users[0]?.did); // const filters = await this.policyEngine.addAccessFilters({}, owner); // const policies = (await DatabaseServer.getListOfPolicies(filters)); console.log('Restore savepoint'); - return new MessageResponse({}); + return new MessageResponse({state}); } catch (error) { await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); diff --git a/guardian-service/src/policy-engine/policy-engine.ts b/guardian-service/src/policy-engine/policy-engine.ts index c781ff9c88..1a7b5be614 100644 --- a/guardian-service/src/policy-engine/policy-engine.ts +++ b/guardian-service/src/policy-engine/policy-engine.ts @@ -1,9 +1,11 @@ -import { AccessType, AssignedEntityType, GenerateUUIDv4, IOwner, IRootConfig, ModelHelper, NotificationAction, PolicyEvents, PolicyToolMetadata, PolicyType, Schema, SchemaEntity, SchemaHelper, SchemaStatus, TagType, TopicType } from '@guardian/interfaces'; +import { AccessType, AssignedEntityType, EntityStatus, GenerateUUIDv4, IOwner, IRootConfig, ModelHelper, NotificationAction, PolicyEvents, PolicyToolMetadata, PolicyType, Schema, SchemaEntity, SchemaHelper, SchemaStatus, TagType, TopicType } from '@guardian/interfaces'; import { Artifact, DatabaseServer, findAllEntities, + FormulaImportExport, getArtifactType, + IPolicyComponents, MessageAction, MessageServer, MessageType, @@ -42,6 +44,7 @@ import { findAndDryRunSchema, findAndPublishSchema, publishSystemSchemas } from import { deleteDemoSchema, deleteSchema, incrementSchemaVersion, sendSchemaMessage } from '../api/helpers/schema-helper.js'; import { AISuggestionsService } from '../helpers/ai-suggestions.js'; import { FilterObject } from '@mikro-orm/core'; +import { publishFormula } from '../api/helpers/formulas-helpers.js'; /** * Result of publishing @@ -512,14 +515,15 @@ export class PolicyEngine extends NatsService { const tools = []; - const dataToCreate = { + const dataToCreate: IPolicyComponents = { policy, schemas, tokens, artifacts, tools, tags, - tests: [] + tests: [], + formulas: [] }; return await PolicyImportExportHelper.importPolicy( dataToCreate, @@ -654,7 +658,8 @@ export class PolicyEngine extends NatsService { model: Policy, user: IOwner, root: IRootConfig, - notifier: INotifier + notifier: INotifier, + schemaMap: Map ): Promise { const schemas = await DatabaseServer.getSchemas({ topicId: model.topicId }); notifier.info(`Found ${schemas.length} schemas`); @@ -674,12 +679,8 @@ export class PolicyEngine extends NatsService { root, emptyNotifier() ); - replaceAllEntities(model.config, SchemaFields, schemaIRI, newSchema.iri); - replaceAllVariables(model.config, 'Schema', schemaIRI, newSchema.iri); - if (model.projectSchema === schemaIRI) { - model.projectSchema = newSchema.iri; - } + schemaMap.set(schemaIRI, newSchema.iri); const name = newSchema.name; num++; @@ -692,6 +693,75 @@ export class PolicyEngine extends NatsService { return model; } + /** + * Policy Formulas + * @param model + * @param user + * @param root + * @param notifier + */ + public async publishFormulas( + model: Policy, + user: IOwner, + root: IRootConfig, + notifier: INotifier, + schemaMap: Map + ): Promise { + const formulas = await DatabaseServer.getFormulas({ policyTopicId: model.topicId }); + notifier.info(`Found ${formulas.length} formulas`); + + let num: number = 0; + let skipped: number = 0; + for (const formula of formulas) { + if (formula.status === EntityStatus.PUBLISHED) { + skipped++; + continue; + } + + for (const [oldId, newId] of schemaMap.entries()) { + FormulaImportExport.replaceIds(formula.config, oldId, newId); + } + + const newFormula = await publishFormula( + formula, + user, + root, + emptyNotifier() + ); + + const name = newFormula.name; + num++; + notifier.info(`Formula ${num} (${name || '-'}) published`); + } + + if (skipped) { + notifier.info(`Skip published ${skipped}`); + } + return model; + } + + /** + * Policy Formulas + * @param model + * @param user + * @param root + * @param notifier + */ + public async updateSchemaId( + model: Policy, + schemaMap: Map + ): Promise { + for (const [oldId, newId] of schemaMap.entries()) { + replaceAllEntities(model.config, SchemaFields, oldId, newId); + replaceAllVariables(model.config, 'Schema', oldId, newId); + + if (model.projectSchema === oldId) { + model.projectSchema = newId; + } + } + return model; + } + /** * Dry run Policy schemas * @param model @@ -738,9 +808,32 @@ export class PolicyEngine extends NatsService { const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions) .setTopicObject(topic); + const schemaMap = new Map(); notifier.completedAndStart('Publish schemas'); try { - model = await this.publishSchemas(model, user, root, notifier); + model = await this.publishSchemas(model, user, root, notifier, schemaMap); + } catch (error) { + model.status = PolicyType.PUBLISH_ERROR; + model.version = ''; + model.hash = ''; + model = await DatabaseServer.updatePolicy(model); + throw error; + } + + notifier.completedAndStart('Update UUID'); + try { + model = await this.updateSchemaId(model, schemaMap); + } catch (error) { + model.status = PolicyType.PUBLISH_ERROR; + model.version = ''; + model.hash = ''; + model = await DatabaseServer.updatePolicy(model); + throw error; + } + + notifier.completedAndStart('Publish formulas'); + try { + model = await this.publishFormulas(model, user, root, notifier, schemaMap); } catch (error) { model.status = PolicyType.PUBLISH_ERROR; model.version = ''; diff --git a/indexer-api-gateway/package.json b/indexer-api-gateway/package.json index a86eb173c0..83befa92c1 100644 --- a/indexer-api-gateway/package.json +++ b/indexer-api-gateway/package.json @@ -14,8 +14,8 @@ }, "author": "Envision Blockchain Solutions ", "dependencies": { - "@indexer/interfaces": "^3.0.0", - "@indexer/common": "^3.0.0", + "@indexer/interfaces": "^3.1.0-rc", + "@indexer/common": "^3.1.0-rc", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", "@nestjs/microservices": "^9.4.1", @@ -54,7 +54,7 @@ "@types/gulp": "^4", "@types/gulp-rename": "^2", "@types/jszip": "^3.4.1", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "@types/ws": "^8.2.2", "chai": "^4.3.4", "cross-env": "^7.0.3", @@ -85,5 +85,5 @@ "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/indexer-api-gateway/src/api/index.ts b/indexer-api-gateway/src/api/index.ts index 9236403696..6c77e18acf 100644 --- a/indexer-api-gateway/src/api/index.ts +++ b/indexer-api-gateway/src/api/index.ts @@ -5,4 +5,5 @@ export * from './services/filters.js'; export * from './services/entities.js'; export * from './api-client.js'; export * from './services/landing.js'; -export * from './services/analytics.js'; \ No newline at end of file +export * from './services/analytics.js'; +export * from './services/settings.js'; \ No newline at end of file diff --git a/indexer-api-gateway/src/api/services/analytics.ts b/indexer-api-gateway/src/api/services/analytics.ts index 8416fa79df..aad743c51f 100644 --- a/indexer-api-gateway/src/api/services/analytics.ts +++ b/indexer-api-gateway/src/api/services/analytics.ts @@ -7,7 +7,7 @@ import { ApiTags, ApiUnprocessableEntityResponse, } from '@nestjs/swagger'; -import { IndexerMessageAPI, Message } from '@indexer/common'; +import { IndexerMessageAPI } from '@indexer/common'; import { ApiClient } from '../api-client.js'; import { InternalServerErrorDTO, @@ -47,7 +47,7 @@ export class AnalyticsApi extends ApiClient { body ); } - + @ApiOperation({ summary: 'Search contract retirements', description: 'Returns contract retirements result', @@ -75,7 +75,7 @@ export class AnalyticsApi extends ApiClient { body ); } - + @Get('/checkAvailability') @ApiOperation({ summary: 'Get indexer availability', diff --git a/indexer-api-gateway/src/api/services/entities.ts b/indexer-api-gateway/src/api/services/entities.ts index 27e3855444..ef0343cde6 100644 --- a/indexer-api-gateway/src/api/services/entities.ts +++ b/indexer-api-gateway/src/api/services/entities.ts @@ -58,7 +58,10 @@ import { StatisticDetailsDTO, LabelDTO, LabelDetailsDTO, - LabelDocumentDetailsDTO + LabelDocumentDetailsDTO, + FormulaDetailsDTO, + FormulaDTO, + FormulaRelationshipsDTO } from '#dto'; @Controller('entities') @@ -108,6 +111,12 @@ export class EntityApi extends ApiClient { example: '0.0.4481265', required: false, }) + @ApiQuery({ + name: 'options.attributes.OrganizationName', + description: 'Registry organization name', + example: 'Example', + required: false, + }) @HttpCode(HttpStatus.OK) async getRegistries( @Query('pageIndex') pageIndex?: number, @@ -117,7 +126,8 @@ export class EntityApi extends ApiClient { @Query('keywords') keywords?: string, @Query('topicId') topicId?: string, @Query('options.did') did?: string, - @Query('options.registrantTopicId') registrantTopicId?: string + @Query('options.registrantTopicId') registrantTopicId?: string, + @Query('options.attributes.OrganizationName') organizationName?: string ) { return await this.send(IndexerMessageAPI.GET_REGISTRIES, { pageIndex, @@ -128,6 +138,7 @@ export class EntityApi extends ApiClient { topicId, 'options.did': did, 'options.registrantTopicId': registrantTopicId, + 'options.attributes.OrganizationName': organizationName, }); } @@ -157,6 +168,31 @@ export class EntityApi extends ApiClient { messageId, }); } + + @ApiOperation({ + summary: 'Get registry relationships', + description: 'Returns registry relationships', + }) + @ApiOkResponse({ + description: 'Registry relationships', + type: RelationshipsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) + @Get('/registries/:messageId/relationships') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) + @HttpCode(HttpStatus.OK) + async getRegistriesRelationships(@Param('messageId') messageId: string) { + return await this.send(IndexerMessageAPI.GET_REGISTRY_RELATIONSHIPS, { + messageId, + }); + } //#endregion //#region REGISTRY USERS @ApiOperation({ @@ -325,6 +361,31 @@ export class EntityApi extends ApiClient { messageId, }); } + + @ApiOperation({ + summary: 'Get policy relationships', + description: 'Returns policy relationships', + }) + @ApiOkResponse({ + description: 'Policy relationships', + type: RelationshipsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) + @Get('/policies/:messageId/relationships') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) + @HttpCode(HttpStatus.OK) + async getPolicyRelationships(@Param('messageId') messageId: string) { + return await this.send(IndexerMessageAPI.GET_POLICY_RELATIONSHIPS, { + messageId, + }); + } //#endregion //#region TOOLS @ApiOperation({ @@ -631,7 +692,7 @@ export class EntityApi extends ApiClient { @Query('orderField') orderField?: string, @Query('orderDir') orderDir?: string, @Query('tokenId') tokenId?: string, - @Query('treasury') treasury?: string + @Query('treasury') treasury?: string, ) { return await this.send(IndexerMessageAPI.GET_TOKENS, { pageIndex, @@ -719,6 +780,8 @@ export class EntityApi extends ApiClient { @Query('orderDir') orderDir?: string, @Query('keywords') keywords?: string, @Query('options.issuer') issuer?: string, + @Query('options.role') role?: string, + @Query('analytics.sr') sr?: string, @Query('topicId') topicId?: string, @Query('analytics.policyId') policyId?: string ) { @@ -730,6 +793,8 @@ export class EntityApi extends ApiClient { keywords, topicId, 'options.issuer': issuer, + 'options.role': role, + 'analytics.sr': sr, 'analytics.policyId': policyId, }); } @@ -1120,6 +1185,115 @@ export class EntityApi extends ApiClient { }); } //#endregion + + //#region FORMULAS + @Get('/formulas') + @ApiOperation({ + summary: 'Get formulas', + description: 'Returns formulas', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('formulas', FormulaDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search formulas, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Policy topic identifier', + example: '0.0.1960', + required: false, + }) + @ApiQuery({ + name: 'options.owner', + description: 'formula owner', + example: 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + required: false, + }) + @HttpCode(HttpStatus.OK) + async getFormulas( + @Query('pageIndex') pageIndex?: string, + @Query('pageSize') pageSize?: string, + @Query('orderField') orderField?: string, + @Query('orderDir') orderDir?: string, + @Query('keywords') keywords?: string, + @Query('topicId') topicId?: string, + @Query('options.owner') owner?: string + ) { + return await this.send(IndexerMessageAPI.GET_FORMULAS, { + pageIndex, + pageSize, + orderField, + orderDir, + keywords, + topicId, + 'options.owner': owner, + }); + } + + @Get('/formulas/:messageId') + @ApiOperation({ + summary: 'Get formula', + description: 'Returns formula', + }) + @ApiOkResponse({ + description: 'Formula details', + type: FormulaDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) + @HttpCode(HttpStatus.OK) + async getFormula(@Param('messageId') messageId: string) { + return await this.send(IndexerMessageAPI.GET_FORMULA, { + messageId, + }); + } + + @Get('/formulas/:messageId/relationships') + @ApiOperation({ + summary: 'Get formula relationships', + description: 'Returns formula relationships', + }) + @ApiOkResponse({ + description: 'Formula relationships', + type: FormulaRelationshipsDTO + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) + @HttpCode(HttpStatus.OK) + async getFormulaRelationships(@Param('messageId') messageId: string) { + return await this.send(IndexerMessageAPI.GET_FORMULA_RELATIONSHIPS, { + messageId, + }); + } + //#endregion + //#endregion //#region DOCUMENTS diff --git a/indexer-api-gateway/src/api/services/landing.ts b/indexer-api-gateway/src/api/services/landing.ts index 0e138ebda1..c69395afc3 100644 --- a/indexer-api-gateway/src/api/services/landing.ts +++ b/indexer-api-gateway/src/api/services/landing.ts @@ -3,6 +3,7 @@ import { ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags } import { IndexerMessageAPI } from '@indexer/common'; import { ApiClient } from '../api-client.js'; import { ProjectCoordinatesDTO, LandingAnalyticsDTO, InternalServerErrorDTO } from '#dto'; +import { DataLoadingProgress } from '@indexer/interfaces'; @Controller('landing') @ApiTags('landing') @@ -10,7 +11,7 @@ export class LandingApi extends ApiClient { @ApiOperation({ summary: 'Get landing page analytics', description: - 'Returns count of registries, methodologies, projects, totalIssuance, date', + 'Returns count of registries, methodologies, projects, totalIssuance, totalSerialized, totalFungible, date', }) @ApiInternalServerErrorResponse({ description: 'Internal server error', @@ -49,4 +50,25 @@ export class LandingApi extends ApiClient { {} ); } + + @ApiOperation({ + summary: 'Get data loading progress', + description: 'Returns the number of messages loaded and the total number of messages', + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) + @Get('/data-loading-progress') + @ApiOkResponse({ + description: 'Data loading progress result', + type: [DataLoadingProgress], + }) + @HttpCode(HttpStatus.OK) + async getDataLoadingProgress(): Promise { + return await this.send( + IndexerMessageAPI.GET_DATA_LOADING_PROGRESS, + {} + ); + } } diff --git a/indexer-api-gateway/src/api/services/settings.ts b/indexer-api-gateway/src/api/services/settings.ts new file mode 100644 index 0000000000..a4db56b8ff --- /dev/null +++ b/indexer-api-gateway/src/api/services/settings.ts @@ -0,0 +1,55 @@ +import { Controller, HttpCode, HttpStatus, Body, Post, Get } from '@nestjs/common'; +import { + ApiBody, + ApiInternalServerErrorResponse, + ApiOkResponse, + ApiOperation, + ApiTags, + ApiUnprocessableEntityResponse, +} from '@nestjs/swagger'; +import { IndexerMessageAPI, Message } from '@indexer/common'; +import { ApiClient } from '../api-client.js'; +import { + InternalServerErrorDTO, +} from '#dto'; +import { NetworkExplorerSettings } from '@indexer/interfaces'; + +@Controller('settings') +@ApiTags('settings') +export class SettingsApi extends ApiClient { + @Get('/network') + @ApiOperation({ + summary: 'Get Hedera network', + description: 'Returns Hedera network', + }) + @ApiOkResponse({ + description: 'Hedera network result', + type: String, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO, + }) + @HttpCode(HttpStatus.OK) + async getNetworkEnvironment(): Promise { + return await this.send(IndexerMessageAPI.GET_NETWORK, {}); + } + + @Get('/networkExplorer') + @ApiOperation({ + summary: 'Get Hedera network explorer settings', + description: 'Returns Hedera network explorer settings', + }) + @ApiOkResponse({ + description: 'Hedera network explorer settings result', + type: String, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO, + }) + @HttpCode(HttpStatus.OK) + async getNetworkExplorer(): Promise { + return await this.send(IndexerMessageAPI.GET_NETWORK_EXPLORER, {}); + } +} diff --git a/indexer-api-gateway/src/app.module.ts b/indexer-api-gateway/src/app.module.ts index 515c02f132..95da9baaaa 100644 --- a/indexer-api-gateway/src/app.module.ts +++ b/indexer-api-gateway/src/app.module.ts @@ -11,7 +11,8 @@ import { FiltersApi, EntityApi, LandingApi, - AnalyticsApi + AnalyticsApi, + SettingsApi, } from './api/index.js'; const JSON_REQUEST_LIMIT = process.env.JSON_REQUEST_LIMIT || '1mb'; @@ -36,7 +37,8 @@ const JSON_REQUEST_LIMIT = process.env.JSON_REQUEST_LIMIT || '1mb'; FiltersApi, EntityApi, LandingApi, - AnalyticsApi + AnalyticsApi, + SettingsApi, ], providers: [ // LoggerService, diff --git a/indexer-api-gateway/src/dto/details/formula.details.ts b/indexer-api-gateway/src/dto/details/formula.details.ts new file mode 100644 index 0000000000..d56ac44b81 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/formula.details.ts @@ -0,0 +1,163 @@ +import { + MessageAction, + MessageType, + Formula, + FormulaActivity, + FormulaAnalytics, + FormulaDetails, + FormulaOptions, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsActivityDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class FormulaOptionsDTO implements FormulaOptions { + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + uuid: string; + + @ApiProperty({ + description: 'Name', + example: 'Formula Name', + }) + name: string; + + @ApiProperty({ + description: 'Description', + example: 'Formula Description', + }) + description: string; + + @ApiProperty({ + description: 'Owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + owner: string; + + @ApiProperty({ + description: 'Policy topic identifier', + example: '0.0.4481265', + }) + policyTopicId: string; + + @ApiProperty({ + description: 'Policy instance topic identifier', + example: '0.0.4481265', + }) + policyInstanceTopicId: string; +} + +export class FormulaAnalyticsDTO implements FormulaAnalytics { + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; + + @ApiProperty({ + description: 'Owner', + example: 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + owner?: string; + + @ApiProperty({ + description: 'Formula Config', + type: 'object', + }) + config?: any; +} + +export class FormulaActivityDTO implements FormulaActivity { + @ApiProperty({ + description: 'Schemas', + example: 10, + }) + schemas: number; + + @ApiProperty({ + description: 'VPs', + example: 10, + }) + vps: number; +} + +export class FormulaDTO + extends MessageDTO + implements Formula { + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.FORMULA + }) + declare type: MessageType; + + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.PublishFormula + }) + declare action: MessageAction; + + @ApiProperty({ + type: FormulaOptionsDTO, + }) + declare options: FormulaOptionsDTO; + + @ApiProperty({ + type: FormulaAnalyticsDTO, + }) + declare analytics?: FormulaAnalyticsDTO; +} + +export class FormulaDetailsDTO + extends DetailsActivityDTO + implements FormulaDetails { + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + + @ApiProperty({ + type: FormulaDTO, + }) + declare item?: FormulaDTO; + + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; + + @ApiProperty({ + type: FormulaActivityDTO, + }) + declare activity?: FormulaActivityDTO; +} + +export class FormulaRelationshipsDTO { + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + id: string; + + @ApiProperty({ + type: MessageDTO, + }) + item?: MessageDTO; + + @ApiProperty({ + type: MessageDTO, + isArray: true + }) + schemas?: MessageDTO[]; + + @ApiProperty({ + type: MessageDTO, + isArray: true + }) + formulas?: MessageDTO[]; +} \ No newline at end of file diff --git a/indexer-api-gateway/src/dto/details/index.ts b/indexer-api-gateway/src/dto/details/index.ts index 2c13f1cca8..7b09e261fa 100644 --- a/indexer-api-gateway/src/dto/details/index.ts +++ b/indexer-api-gateway/src/dto/details/index.ts @@ -15,4 +15,5 @@ export * from './nft.details.js'; export * from './token.details.js'; export * from './update-file.js'; export * from './label.details.js'; -export * from './statistic.details.js'; \ No newline at end of file +export * from './statistic.details.js'; +export * from './formula.details.js'; \ No newline at end of file diff --git a/indexer-api-gateway/src/dto/details/policy.details.ts b/indexer-api-gateway/src/dto/details/policy.details.ts index 003741a3d2..043898aa54 100644 --- a/indexer-api-gateway/src/dto/details/policy.details.ts +++ b/indexer-api-gateway/src/dto/details/policy.details.ts @@ -150,6 +150,11 @@ export class PolicyActivityDTO implements PolicyActivity { example: 10, }) roles: number; + @ApiProperty({ + description: 'Formulas', + example: 10, + }) + formulas: number; } export class PolicyDTO diff --git a/indexer-api-gateway/src/dto/details/vc.details.ts b/indexer-api-gateway/src/dto/details/vc.details.ts index 01108a5dd3..c55b3b6e08 100644 --- a/indexer-api-gateway/src/dto/details/vc.details.ts +++ b/indexer-api-gateway/src/dto/details/vc.details.ts @@ -217,4 +217,9 @@ export class VCDetailsDTO }, }) schema?: any; + + @ApiProperty({ + description: 'Formulas data', + }) + formulasData?: any; } diff --git a/indexer-api-gateway/src/dto/langing-analytics.dto.ts b/indexer-api-gateway/src/dto/langing-analytics.dto.ts index ea8d7df027..8023e89705 100644 --- a/indexer-api-gateway/src/dto/langing-analytics.dto.ts +++ b/indexer-api-gateway/src/dto/langing-analytics.dto.ts @@ -29,6 +29,18 @@ export class LandingAnalyticsDTO implements LandingAnalytics { }) totalIssuance: number; + @ApiProperty({ + description: 'Total serialized', + example: '10', + }) + totalSerialized: number; + + @ApiProperty({ + description: 'Total fungible', + example: '10', + }) + totalFungible: number; + @ApiProperty({ description: 'ISO Date', example: '2024-06-12T14:17:26.689Z' diff --git a/indexer-common/package.json b/indexer-common/package.json index 4f792956e8..df0b40476c 100644 --- a/indexer-common/package.json +++ b/indexer-common/package.json @@ -20,7 +20,7 @@ "@types/gulp": "^4", "@types/gulp-rename": "^2", "@types/jszip": "^3.4.1", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "mocha-junit-reporter": "^2.0.2", "tslint": "^6.1.3", "typescript": "^4.5.5" @@ -43,5 +43,5 @@ "test:stability": "mocha tests/stability.test.js" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/indexer-common/src/db-helper/db-helper.ts b/indexer-common/src/db-helper/db-helper.ts index 28ec9847ce..895de201fe 100644 --- a/indexer-common/src/db-helper/db-helper.ts +++ b/indexer-common/src/db-helper/db-helper.ts @@ -74,7 +74,7 @@ export class DataBaseHelper { public static async loadFile(filename: string, raw: false): Promise public static async loadFile(filename: string, raw: true): Promise public static async loadFile(filename: string, raw = false): Promise { - const files = await DataBaseHelper.gridFS.find({ filename }).toArray(); + const files = await DataBaseHelper.gridFS.find({ filename }, { limit: 1 }).toArray(); if (files.length === 0) { return null; } diff --git a/indexer-common/src/entity/analytics.ts b/indexer-common/src/entity/analytics.ts index c58da94bf8..bdd36adb3f 100644 --- a/indexer-common/src/entity/analytics.ts +++ b/indexer-common/src/entity/analytics.ts @@ -20,4 +20,10 @@ export class Analytics { @Property() totalIssuance: number; + + @Property() + totalSerialized: number; + + @Property() + totalFungible: number; } diff --git a/indexer-common/src/entity/message.ts b/indexer-common/src/entity/message.ts index 7c00bc2d7e..1d2cc3b758 100644 --- a/indexer-common/src/entity/message.ts +++ b/indexer-common/src/entity/message.ts @@ -66,6 +66,7 @@ export class Message implements IMessage { textSearch?: string; childSchemas?: any[]; owner?: string; + issuer?: string; tools?: any[]; tokens?: string[]; vcCount?: number; diff --git a/indexer-common/src/entity/token-cache.ts b/indexer-common/src/entity/token-cache.ts index 75b97e1e6f..96ebb406cf 100644 --- a/indexer-common/src/entity/token-cache.ts +++ b/indexer-common/src/entity/token-cache.ts @@ -20,6 +20,12 @@ export class TokenCache implements RawToken { @Property() status: string; + @Property() + createdTimestamp: string; + + @Property() + modifiedTimestamp: string; + @Property() lastUpdate: number; diff --git a/indexer-common/src/messages/message-api.ts b/indexer-common/src/messages/message-api.ts index 5ea6e26803..1184ea0cab 100644 --- a/indexer-common/src/messages/message-api.ts +++ b/indexer-common/src/messages/message-api.ts @@ -17,11 +17,13 @@ export enum IndexerMessageAPI { // #region LANDING GET_LANDING_ANALYTICS = 'INDEXER_API_GET_LANDING_ANALYTICS', GET_PROJECTS_COORDINATES = 'INDEXER_API_GET_PROJECTS_COORDINATES', + GET_DATA_LOADING_PROGRESS = 'INDEXER_API_GET_DATA_LOADING_PROGRESS', // #endregion // #region ACCOUNTS GET_REGISTRIES = 'INDEXER_API_GET_REGISTRIES', GET_REGISTRY = 'INDEXER_API_GET_REGISTRY', + GET_REGISTRY_RELATIONSHIPS = 'INDEXER_API_GET_REGISTRY_RELATIONSHIPS', GET_REGISTRY_USERS = 'INDEXER_API_GET_REGISTRY_USERS', GET_REGISTRY_USER = 'INDEXER_API_GET_REGISTRY_USER', // #endregion @@ -29,6 +31,7 @@ export enum IndexerMessageAPI { // #region METHODOLOGIES GET_POLICIES = 'INDEXER_API_GET_POLICIES', GET_POLICY = 'INDEXER_API_GET_POLICY', + GET_POLICY_RELATIONSHIPS = 'INDEXER_API_GET_POLICY_RELATIONSHIPS', GET_MODULES = 'INDEXER_API_GET_MODULES', GET_MODULE = 'INDEXER_API_GET_MODULE', GET_TOOLS = 'INDEXER_API_GET_TOOLS', @@ -44,6 +47,9 @@ export enum IndexerMessageAPI { GET_STATISTIC = 'INDEXER_API_GET_STATISTIC', GET_LABELS = 'INDEXER_API_GET_LABELS', GET_LABEL = 'INDEXER_API_GET_LABEL', + GET_FORMULAS = 'INDEXER_API_GET_FORMULAS', + GET_FORMULA = 'INDEXER_API_GET_FORMULA', + GET_FORMULA_RELATIONSHIPS = 'INDEXER_API_GET_FORMULA_RELATIONSHIPS', // #endregion // #region DOCUMENTS @@ -82,6 +88,8 @@ export enum IndexerMessageAPI { UPDATE_FILES = 'INDEXER_API_UPDATE_FILES', - GET_INDEXER_AVAILABILITY = "INDEXER_API_GET_INDEXER_AVAILABILITY", - GET_RETIRE_DOCUMENTS = "INDEXER_API_GET_RETIRE_DOCUMENTS" -} + GET_INDEXER_AVAILABILITY = 'INDEXER_API_GET_INDEXER_AVAILABILITY', + GET_RETIRE_DOCUMENTS = 'INDEXER_API_GET_RETIRE_DOCUMENTS', + GET_NETWORK = "INDEXER_API_GET_NETWORK", + GET_NETWORK_EXPLORER = "INDEXER_API_GET_NETWORK_EXPLORER", +} \ No newline at end of file diff --git a/indexer-frontend/package-lock.json b/indexer-frontend/package-lock.json index 7592cad3c8..28f66fa043 100644 --- a/indexer-frontend/package-lock.json +++ b/indexer-frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "indexer-frontend", - "version": "2.27.0", + "version": "3.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "indexer-frontend", - "version": "2.27.0", + "version": "3.0.0", "dependencies": { "@angular/animations": "^17.3.0", "@angular/cdk": "^17.3.2", @@ -23,6 +23,7 @@ "chart.js": "^4.4.3", "cids": "^1.1.9", "echarts": "^5.5.0", + "mathlive": "^0.103.0", "ngx-echarts": "^17.1.0", "ol": "^9.2.2", "primeicons": "^7.0.0", @@ -47,7 +48,8 @@ } }, "../indexer-interfaces": { - "version": "2.27.0", + "name": "@indexer/interfaces", + "version": "3.0.0", "license": "Apache-2.0", "devDependencies": { "@types/node": "^18.16.0", @@ -2353,6 +2355,20 @@ "node": ">=0.1.90" } }, + "node_modules/@cortex-js/compute-engine": { + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/@cortex-js/compute-engine/-/compute-engine-0.24.1.tgz", + "integrity": "sha512-B9pLaZFC1vBrL64yR2LQWy2sj1E/+wtwIVokPuPqX8YWXwj9W2AMVyS9pSMN8gEdjpAC50nSmtL6110Rgi7dKA==", + "license": "MIT", + "dependencies": { + "complex.js": "^2.1.1", + "decimal.js": "^10.4.3" + }, + "engines": { + "node": ">=16.14.2", + "npm": ">=8.5.0" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -5389,6 +5405,19 @@ "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", "dev": true }, + "node_modules/complex.js": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.4.2.tgz", + "integrity": "sha512-qtx7HRhPGSCBtGiST4/WGHuW+zeaND/6Ld+db6PbrulIB1i2Ev/2UPiqcmpQNPSyfBKraC0EOvOKCB5dGZKt3g==", + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" + } + }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -5879,6 +5908,12 @@ } } }, + "node_modules/decimal.js": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz", + "integrity": "sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==", + "license": "MIT" + }, "node_modules/default-gateway": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", @@ -8539,6 +8574,23 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/mathlive": { + "version": "0.103.0", + "resolved": "https://registry.npmjs.org/mathlive/-/mathlive-0.103.0.tgz", + "integrity": "sha512-gNJDMUOz0WePyDpLO/w1sGkrz0JrMwrT1QoFdGloVjjerWlUeKWn1JGM6XlO5SQ1AqXWemRKvlyVXft+QsxX8w==", + "license": "MIT", + "dependencies": { + "@cortex-js/compute-engine": "0.24.1" + }, + "engines": { + "node": ">=16.14.2", + "npm": ">=8.5.0" + }, + "funding": { + "type": "individual", + "url": "https://paypal.me/arnogourdol" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", diff --git a/indexer-frontend/package.json b/indexer-frontend/package.json index bfae640f7a..642b91d55b 100644 --- a/indexer-frontend/package.json +++ b/indexer-frontend/package.json @@ -1,7 +1,7 @@ { "author": "Envision Blockchain Solutions ", "name": "indexer-frontend", - "version": "3.0.0", + "version": "3.1.0-rc", "scripts": { "ng": "ng", "start": "ng serve --proxy-config ./proxy.conf.json", @@ -32,7 +32,8 @@ "primeng": "17.16.1", "rxjs": "~7.8.0", "tslib": "^2.3.0", - "zone.js": "~0.14.3" + "zone.js": "~0.14.3", + "mathlive": "^0.103.0" }, "devDependencies": { "@angular-devkit/build-angular": "^17.3.2", diff --git a/indexer-frontend/src/app/app.component.scss b/indexer-frontend/src/app/app.component.scss index e69de29bb2..a3e18e16c1 100644 --- a/indexer-frontend/src/app/app.component.scss +++ b/indexer-frontend/src/app/app.component.scss @@ -0,0 +1 @@ +@import './themes/guardian/index.scss'; \ No newline at end of file diff --git a/indexer-frontend/src/app/app.config.ts b/indexer-frontend/src/app/app.config.ts index 5182d8a8b8..8826d165c2 100644 --- a/indexer-frontend/src/app/app.config.ts +++ b/indexer-frontend/src/app/app.config.ts @@ -15,6 +15,7 @@ import { SearchService } from '@services/search.service'; import { EntitiesService } from '@services/entities.service'; import { FiltersService } from '@services/filters.service'; import { LandingService } from '@services/landing.service'; +import { SettingsService } from '@services/settings.service'; export const appConfig: ApplicationConfig = { providers: [ @@ -24,6 +25,7 @@ export const appConfig: ApplicationConfig = { EntitiesService, FiltersService, LandingService, + SettingsService, provideHttpClient(), provideRouter(routes), provideAnimationsAsync(), diff --git a/indexer-frontend/src/app/app.routes.ts b/indexer-frontend/src/app/app.routes.ts index 1a957837b2..71a2b66fec 100644 --- a/indexer-frontend/src/app/app.routes.ts +++ b/indexer-frontend/src/app/app.routes.ts @@ -47,6 +47,8 @@ import { LabelDetailsComponent } from '@views/details/label-details/label-detail import { LabelDocumentsComponent } from '@views/collections/label-documents/label-documents.component'; import { StatisticDocumentsComponent } from '@views/collections/statistic-documents/statistic-documents.component'; import { LabelDocumentDetailsComponent } from '@views/details/label-document-details/label-document-details.component'; +import { FormulasComponent } from '@views/collections/formulas/formulas.component'; +import { FormulaDetailsComponent } from '@views/details/formula-details/formula-details.component'; export const routes: Routes = [ // _DEV @@ -79,6 +81,7 @@ export const routes: Routes = [ { path: 'labels', component: LabelsComponent }, { path: 'label-documents', component: LabelDocumentsComponent }, { path: 'statistic-documents', component: StatisticDocumentsComponent }, + { path: 'formulas', component: FormulasComponent }, //Details { path: 'registries/:id', component: RegistryDetailsComponent }, @@ -99,4 +102,5 @@ export const routes: Routes = [ { path: 'labels/:id', component: LabelDetailsComponent }, { path: 'label-documents/:id', component: LabelDocumentDetailsComponent }, { path: 'statistic-documents/:id', component: VcDocumentDetailsComponent }, + { path: 'formulas/:id', component: FormulaDetailsComponent }, ]; diff --git a/indexer-frontend/src/app/components/activity/activity.component.ts b/indexer-frontend/src/app/components/activity/activity.component.ts index 7e279877c0..1975083599 100644 --- a/indexer-frontend/src/app/components/activity/activity.component.ts +++ b/indexer-frontend/src/app/components/activity/activity.component.ts @@ -17,6 +17,7 @@ export enum Activity { VPs = 'vps', Contracts = 'contracts', Users = 'users', + Formulas = 'formulas', } @Component({ @@ -41,6 +42,7 @@ export class ActivityComponent { [Activity.VCs, '#17becf'], [Activity.VPs, '#ffbb78'], [Activity.Contracts, '#98df8a'], + [Activity.Formulas, '#98df8a'], ]); activityIcons: Map = new Map([ [Activity.Registries, 'pi pi-database'], @@ -56,6 +58,7 @@ export class ActivityComponent { [Activity.VCs, 'pi pi-file'], [Activity.VPs, 'pi pi-file'], [Activity.Contracts, 'pi pi-pencil'], + [Activity.Formulas, 'pi pi-file'], ]); @Input() activity!: MeterItem[]; diff --git a/indexer-frontend/src/app/components/checkbox-button/checkbox-button.component.html b/indexer-frontend/src/app/components/checkbox-button/checkbox-button.component.html new file mode 100644 index 0000000000..6c9c7ce6ab --- /dev/null +++ b/indexer-frontend/src/app/components/checkbox-button/checkbox-button.component.html @@ -0,0 +1,13 @@ +
+ +
+
+ +
+ \ No newline at end of file diff --git a/indexer-frontend/src/app/components/checkbox-button/checkbox-button.component.scss b/indexer-frontend/src/app/components/checkbox-button/checkbox-button.component.scss new file mode 100644 index 0000000000..a1ba4914f7 --- /dev/null +++ b/indexer-frontend/src/app/components/checkbox-button/checkbox-button.component.scss @@ -0,0 +1,53 @@ +:host { + --checkbox-button-on-first-color: #4169E2; + --checkbox-button-on-second-color: #e1e7fa; + --checkbox-button-off-first-color: #848FA9; + --checkbox-button-off-second-color: #ffffff; + display: inline-flex; +} + +.guardian-button { + width: 100%; + min-height: 28px; + padding: 1px 12px 1px 8px; + + &[select="false"] { + color: var(--checkbox-button-off-first-color); + background-color: var(--checkbox-button-off-second-color); + border: 1px solid var(--checkbox-button-off-first-color); + + .guardian-button-icon { + width: 0px !important; + height: auto !important; + position: relative; + + svg { + display: none; + } + } + } + + &[select="true"] { + color: var(--checkbox-button-on-first-color); + background-color: var(--checkbox-button-on-second-color); + border: 1px solid var(--checkbox-button-on-first-color); + + .guardian-button-icon { + width: 24px !important; + height: auto !important; + position: relative; + + svg { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + fill: var(--checkbox-button-on-first-color); + } + } + } + + .guardian-button-label { + padding-left: 4px; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/components/checkbox-button/checkbox-button.component.ts b/indexer-frontend/src/app/components/checkbox-button/checkbox-button.component.ts new file mode 100644 index 0000000000..2409775c72 --- /dev/null +++ b/indexer-frontend/src/app/components/checkbox-button/checkbox-button.component.ts @@ -0,0 +1,30 @@ +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +@Component({ + selector: 'checkbox-button', + templateUrl: './checkbox-button.component.html', + styleUrl: './checkbox-button.component.scss', + standalone: true, + imports: [ + CommonModule + ] +}) +export class CheckboxButton { + @Input('value') value!: boolean; + @Output('valueChange') valueChange = new EventEmitter(); + @Output('change') change = new EventEmitter(); + + constructor() { + } + + ngOnInit(): void { + this.value = !!this.value; + } + + public onChange() { + this.value = !this.value; + this.valueChange.emit(this.value); + this.change.emit(this.value); + } +} diff --git a/indexer-frontend/src/app/components/formula-view/formula-view.component.html b/indexer-frontend/src/app/components/formula-view/formula-view.component.html new file mode 100644 index 0000000000..0f9d92e33b --- /dev/null +++ b/indexer-frontend/src/app/components/formula-view/formula-view.component.html @@ -0,0 +1,160 @@ +@if (isDocument) { +
+ + + + +
+
Select Type
+ Constant + Variable + Formula + Text +
+
+ @for (item of config.data; track item.uuid) { +
+
+
+
+ @if (item.type === 'constant') { +
+ + + +
+
Constant
+ } + @if (item.type === 'variable') { +
+ + + +
+
Variable
+ } + @if (item.type === 'formula') { +
+ + + +
+
Formula
+ } + @if (item.type === 'text') { +
+ + + +
+
Text
+ } +
+
+
+ + +
+ + @if (item.type === 'constant') { +
+ + +
+ } + + @if (item.type === 'variable') { +
+ + +
+ } + + @if (item.type === 'formula') { +
+ + +
+
+ + +
+
+ +
+ @for (relationship of item.relationships; track relationship) { +
{{getRelationshipName(relationship)}}
+ } +
+
+ } + @if (item.type === 'text') { +
+ + +
+
+ + +
+
+ +
+ @for (relationship of item.relationships; track relationship) { +
{{getRelationshipName(relationship)}}
+ } +
+
+ } + +
+ + +
+
+
+
+ } +
+
+ + +
+ @for (file of config.files; track file) { +
+
+ + +
+
+ + +
+
+ } +
+
+
+
+} \ No newline at end of file diff --git a/indexer-frontend/src/app/components/formula-view/formula-view.component.scss b/indexer-frontend/src/app/components/formula-view/formula-view.component.scss new file mode 100644 index 0000000000..6048dede42 --- /dev/null +++ b/indexer-frontend/src/app/components/formula-view/formula-view.component.scss @@ -0,0 +1,272 @@ +.formula-container { + position: relative; + z-index: 0; + width: 100%; + height: 100%; + user-select: none; + position: relative; + padding: 24px; + overflow: auto; + background: #fff; + border-radius: 6px; + + .item-filters { + display: flex; + flex-direction: row; + margin-bottom: 24px; + + .item-filters-header { + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 400; + line-height: 16px; + color: #848FA9; + margin-right: 24px; + height: 24px; + padding: 6px 0px; + } + + .item-filter { + margin-right: 8px; + height: 28px; + min-width: 108px; + } + + .constant-filter { + --checkbox-button-on-first-color: var(--formula-constant-color, #4169E2); + --checkbox-button-on-second-color: var(--formula-constant-background, #e1e7fa); + } + + .variable-filter { + --checkbox-button-on-first-color: var(--formula-variable-color, #DA9B22); + --checkbox-button-on-second-color: var(--formula-variable-background, #FFF6E3); + } + + .formula-filter { + --checkbox-button-on-first-color: var(--formula-function-color, #E50299); + --checkbox-button-on-second-color: var(--formula-function-background, #fbd9ef); + } + + .text-filter { + --checkbox-button-on-first-color: var(--formula-text-color, #19BE47); + --checkbox-button-on-second-color: var(--formula-text-background, #d7f5e2); + } + } + + .formula-item { + box-shadow: 0px 4px 8px 0px var(--guardian-shadow, #00000014); + background: var(--guardian-background, #FFFFFF); + border-radius: 8px; + margin-bottom: 16px; + display: flex; + flex-direction: row; + overflow: hidden; + + .formula-item-icon { + width: 32px; + min-width: 32px; + width: 32px; + min-width: 32px; + display: flex; + justify-content: center; + align-items: center; + cursor: move; + + * { + pointer-events: none; + } + } + + .formula-item-container { + width: 100%; + padding: 16px; + + .formula-item-header { + height: 24px; + width: 100%; + margin-bottom: 16px; + position: relative; + display: flex; + + &__icon { + margin-right: 8px; + + svg { + fill: #000; + } + } + + &__name { + font-family: var(--font-family-inter); + font-size: 16px; + font-weight: 600; + height: 24px; + line-height: 24px; + } + + &__delete { + position: absolute; + top: 0px; + right: 0px; + width: 24px; + height: 24px; + + .guardian-icon-button { + width: 24px; + height: 24px; + } + } + } + + .formula-item-body {} + } + + &[type="constant"] { + border: 1px solid var(--formula-constant-color, #4169E2); + + .formula-item-icon { + background: var(--formula-constant-background, #e1e7fa); + border-right: 1px solid #E1E7EF; + } + } + + &[type="variable"] { + border: 1px solid var(--formula-variable-color, #DA9B22); + + .formula-item-icon { + background: var(--formula-variable-background, #FFF6E3); + border-right: 1px solid #E1E7EF; + } + } + + &[type="formula"] { + border: 1px solid var(--formula-function-color, #E50299); + + .formula-item-icon { + background: var(--formula-function-background, #fbd9ef); + border-right: 1px solid #E1E7EF; + } + } + + &[type="text"] { + border: 1px solid var(--formula-text-color, #19BE47); + + .formula-item-icon { + background: var(--formula-text-background, #d7f5e2); + border-right: 1px solid #E1E7EF; + } + } + } + + .formula-link { + height: 40px; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: #000; + padding: 10px 16px; + position: relative; + cursor: pointer; + + &:hover { + border: 1px solid var(--guardian-primary-color, #4169E2); + } + + .formula-link-remove { + position: absolute; + top: 4px; + right: 4px; + height: 30px; + width: 30px; + + button { + height: 30px; + width: 30px; + } + } + + .formula-link-value { + display: flex; + flex-direction: row; + + &__entity { + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 16px; + color: var(--guardian-entity-color, #DA9B22); + margin-right: 8px; + } + + &__item { + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 16px; + } + } + } + + .guardian-input-container { + margin-bottom: 16px; + } + + .guardian-textarea-container { + margin-bottom: 16px; + } + + .formula-relationships { + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: #000; + padding: 8px 16px 0px 16px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + min-height: 40px; + + .formula-relationship { + width: auto; + height: 30px; + padding: 7px 12px 7px 12px; + border-radius: 6px; + background: var(--guardian-grey-color, #EFF3F7); + color: var(--guardian-disabled-color, #848FA9); + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 16px; + text-align: left; + margin-right: 8px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + display: inline-flex; + margin-bottom: 8px; + cursor: pointer; + + &:hover { + filter: brightness(0.95); + } + } + } +} + +.files-container { + width: 100%; + + .file-item { + width: 100%; + border: 1px solid #E1E7EF; + border-radius: 8px; + padding: 24px; + margin-bottom: 24px; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/components/formula-view/formula-view.component.ts b/indexer-frontend/src/app/components/formula-view/formula-view.component.ts new file mode 100644 index 0000000000..cf0ccd4d3e --- /dev/null +++ b/indexer-frontend/src/app/components/formula-view/formula-view.component.ts @@ -0,0 +1,137 @@ +import { Component, Input } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { CheckboxButton } from '@components/checkbox-button/checkbox-button.component'; +import { MathLiveComponent } from '@components/math-live/math-live.component'; +import { TranslocoModule } from '@jsverse/transloco'; +import { Formulas } from '../../models/formulas'; +import { Schema } from '@indexer/interfaces'; +import { TabViewModule } from 'primeng/tabview'; + +@Component({ + selector: 'app-formula-view', + standalone: true, + imports: [ + TranslocoModule, + RouterModule, + CheckboxButton, + MathLiveComponent, + TabViewModule + ], + templateUrl: './formula-view.component.html', + styleUrl: './formula-view.component.scss' +}) +export class FormulaViewComponent { + @Input() data: any; + + public readonly filters = { + constant: true, + variable: true, + formula: true, + text: true + } + + public config: Formulas = new Formulas(); + + private schemasMap: Map = new Map(); + private schemasFieldMap: Map = new Map(); + private formulasMap: Map = new Map(); + private formulasFieldMap: Map = new Map(); + private variableMap: Map = new Map(); + + public isDocument: boolean = false; + + ngOnChanges() { + const item = this.data.item; + const schemas = this.data.schemas; + const formulas = this.data.formulas; + + this.isDocument = false; + if (!(item && item.analytics && item.analytics.config)) { + return; + } + this.isDocument = true; + + if (item?.analytics?.config) { + this.config.fromData(item.analytics.config.config); + } + if (schemas) { + this.schemasMap.clear(); + this.schemasFieldMap.clear(); + for (const message of schemas) { + const schema = this.getSchemaDocument(message); + if (schema) { + this.schemasMap.set(String(schema.iri), String(schema.name)); + const fields = schema.getFields(); + for (const field of fields) { + this.schemasFieldMap.set(`${schema.iri}.${field.path}`, String(field.description)); + } + } + } + } + if (formulas) { + for (const message of formulas) { + const formula = this.getFormulaDocument(message); + if (formula) { + this.formulasMap.set(String(formula.uuid), String(formula.name)); + const fields = formula?.config?.formulas || []; + for (const field of fields) { + this.formulasFieldMap.set(`${formula.uuid}.${field.uuid}`, String(field.name)); + } + } + } + } + this.variableMap.clear(); + for (const v of this.config.all) { + this.variableMap.set(v.uuid, v.name); + } + } + + public getSchemaDocument(message: any) { + try { + const schema = new Schema(message.documents[0], ''); + return schema; + } catch (error) { + return null; + } + } + + public getFormulaDocument(message: any) { + try { + return message?.analytics?.config; + } catch (error) { + return null; + } + } + + public onFilter() { + this.config.setFilters(this.filters); + } + + public getEntityName(link: any): string { + if (link.type === 'schema') { + return this.schemasMap.get(link.entityId) || ''; + } + if (link.type === 'formula') { + return this.formulasMap.get(link.entityId) || ''; + } + return ''; + } + + public getFieldName(link: any): string { + if (link.type === 'schema') { + return this.schemasFieldMap.get(`${link.entityId}.${link.item}`) || ''; + } + if (link.type === 'formula') { + if (link.entityId === this.data?.uuid) { + return this.config.getItem(link.item)?.name || ''; + } else { + return this.formulasFieldMap.get(`${link.entityId}.${link.item}`) || ''; + } + } + return ''; + } + + public getRelationshipName(relationship: any) { + return this.variableMap.get(relationship); + } +} diff --git a/indexer-frontend/src/app/components/header/header.component.html b/indexer-frontend/src/app/components/header/header.component.html index f1fa988e90..4564db25ce 100644 --- a/indexer-frontend/src/app/components/header/header.component.html +++ b/indexer-frontend/src/app/components/header/header.component.html @@ -1,116 +1,122 @@ -
- - -
- - -
-
- {{ 'header.accounts' | transloco }} -
-
- - - - +
+
+ - -
-
- {{ 'header.methodologies' | transloco }} -
-
- - - - - +
+
+ {{ 'header.name' | transloco }}
-
-
- {{ 'header.documents' | transloco }} +
+ -
- - - - - + +
+
+ {{ 'header.accounts' | transloco }} +
+
+ + + + + +
-
- -
-
- {{ 'header.others' | transloco }} + +
+
+ {{ 'header.methodologies' | transloco }} +
+
+ + + + + +
-
- - - - - + +
+
+ {{ 'header.documents' | transloco }} +
+
+ + + + + +
+ +
+
+ {{ 'header.others' | transloco }} +
+
+ + + + + +
+
+ + + + + {{ item.label | transloco }} + + + + + + + + {{ item.label | transloco }} + + + + + + + + {{ item.label | transloco }} + + + + + + + + {{ item.label | transloco }} + + +
+
- - - - {{ item.label | transloco }} - - - - - - - - {{ item.label | transloco }} - - - - - - - - {{ item.label | transloco }} - - - - - - - - {{ item.label | transloco }} - - - +
+
diff --git a/indexer-frontend/src/app/components/header/header.component.scss b/indexer-frontend/src/app/components/header/header.component.scss index d0e75d8883..3d70499c3c 100644 --- a/indexer-frontend/src/app/components/header/header.component.scss +++ b/indexer-frontend/src/app/components/header/header.component.scss @@ -127,3 +127,16 @@ width: 100%; text-align: right; } + +.header-progress-bar { + position: absolute; + display: flex; + justify-content: center; + width: 100%; + height: 24px; + align-items: center; + margin: auto; + background-color: var(--color-primary, #4169E2); + border-radius: 0; + z-index: 999; +} \ No newline at end of file diff --git a/indexer-frontend/src/app/components/header/header.component.ts b/indexer-frontend/src/app/components/header/header.component.ts index 1a7d8de291..f0b85f6e8e 100644 --- a/indexer-frontend/src/app/components/header/header.component.ts +++ b/indexer-frontend/src/app/components/header/header.component.ts @@ -20,6 +20,8 @@ import { RippleModule } from 'primeng/ripple'; import { IconFieldModule } from 'primeng/iconfield'; import { InputIconModule } from 'primeng/inputicon'; import { InputTextModule } from 'primeng/inputtext'; +import { ProgressBarComponent } from '@components/progress-bar/progress-bar.component'; +import { LandingService } from '@services/landing.service'; @Component({ selector: 'app-header', @@ -38,6 +40,7 @@ import { InputTextModule } from 'primeng/inputtext'; IconFieldModule, InputIconModule, InputTextModule, + ProgressBarComponent, ], }) export class HeaderComponent { @@ -90,6 +93,10 @@ export class HeaderComponent { label: 'header.labels', routerLink: '/labels', }, + { + label: 'header.formulas', + routerLink: '/formulas', + }, ]; public documentsMenu: MenuItem[] = [ @@ -130,10 +137,13 @@ export class HeaderComponent { }, ]; + public loadedMessagesCount: number = 0; + public messagesTotal: number = 0; + constructor( - private route: ActivatedRoute, private router: Router, - private translocoService: TranslocoService + private translocoService: TranslocoService, + private landingService: LandingService ) {} ngOnInit() { @@ -152,6 +162,17 @@ export class HeaderComponent { this.home = event.url === '/'; } }); + + this.landingService.startPollingDataLoadingProgress(); + + this.landingService.dataLoadingProgress$.subscribe((progress) => { + this.loadedMessagesCount = progress.loadedCount; + this.messagesTotal = progress.total; + }); + } + + ngOnDestroy(): void { + this.landingService.stopPollingDataLoadingProgress(); } public onSearch(): void { diff --git a/indexer-frontend/src/app/components/hedera-explorer/hedera-explorer.component.html b/indexer-frontend/src/app/components/hedera-explorer/hedera-explorer.component.html new file mode 100644 index 0000000000..12796b4c69 --- /dev/null +++ b/indexer-frontend/src/app/components/hedera-explorer/hedera-explorer.component.html @@ -0,0 +1,3 @@ + + + diff --git a/indexer-frontend/src/app/components/hedera-explorer/hedera-explorer.component.scss b/indexer-frontend/src/app/components/hedera-explorer/hedera-explorer.component.scss new file mode 100644 index 0000000000..6c755ed533 --- /dev/null +++ b/indexer-frontend/src/app/components/hedera-explorer/hedera-explorer.component.scss @@ -0,0 +1,10 @@ +.hedera-link { + font-family: Inter, sans-serif; + font-size: 14px !important; + font-style: normal; + font-weight: 500 !important; + color: var(--color-primary); + text-decoration: none; + border-bottom: 1px solid var(--color-primary); + text-transform: capitalize; +} diff --git a/indexer-frontend/src/app/components/hedera-explorer/hedera-explorer.component.ts b/indexer-frontend/src/app/components/hedera-explorer/hedera-explorer.component.ts new file mode 100644 index 0000000000..eea313b6b6 --- /dev/null +++ b/indexer-frontend/src/app/components/hedera-explorer/hedera-explorer.component.ts @@ -0,0 +1,50 @@ +import { Component, Input, SimpleChanges } from '@angular/core'; +import { SettingsService } from '@services/settings.service'; +import { environment } from '../../../environments/environment'; +import { NetworkExplorerSettings } from '@indexer/interfaces'; + +export enum HederaType { + TRANSACTION = 'transaction', + ACCOUNT = 'account', + TOPIC = 'topic', + TOKEN = 'token', +} + +/** + * Hedera explorer. + */ +@Component({ + selector: 'hedera-explorer', + standalone: true, + templateUrl: './hedera-explorer.component.html', + styleUrls: ['./hedera-explorer.component.scss'] +}) +export class HederaExplorer { + url: string; + + @Input('type') type!: string; + @Input('params') params!: string | null; + @Input('subType') subType!: string; + @Input('subParams') subParams!: string | null; + + constructor(private settingsService: SettingsService) { + this.url = ''; + } + + ngOnChanges(changes: SimpleChanges): void { + this.settingsService.getHederaNetExplorer().subscribe((res: NetworkExplorerSettings | null) => { + if (res) { + const type = this.type ? ('/' + this.type) : ''; + const params = this.params ? ('/' + this.params) : ''; + const subType = this.subType ? ('/' + this.subType) : ''; + const subParams = this.subParams ? ('/' + this.subParams) : ''; + + this.url = res.networkExplorerLink + .replace('/${type}', type) + .replace('/${value}', params) + .replace('/${subType}', subType) + .replace('/${subValue}', subParams); + } + }); + } +} diff --git a/indexer-frontend/src/app/components/math-live/keyboards/math-keyboard.ts b/indexer-frontend/src/app/components/math-live/keyboards/math-keyboard.ts new file mode 100644 index 0000000000..d3df58d23d --- /dev/null +++ b/indexer-frontend/src/app/components/math-live/keyboards/math-keyboard.ts @@ -0,0 +1,469 @@ +export const mathKeyboard = { + label: "math", + tooltip: "Math", + rows: [ + [ + { + latex: "+", + shift: "\\oplus", + variants: [ + { latex: "+" }, + { latex: "\\oplus" }, + ] + }, + { + latex: "-", + shift: "\\pm", + variants: [ + { latex: "-", }, + { latex: "\\pm" }, + { latex: "\\ominus" }, + ] + }, + { + latex: "\\times", + shift: "\\otimes", + variants: [ + { latex: "\\times" }, + { latex: "\\otimes" }, + { latex: "\\cdot" }, + ] + }, + { + latex: "\\frac{#@}{#?}", + shift: "\\%", + variants: [ + { latex: "\\frac{#@}{#?}" }, + { latex: "/" }, + { latex: "\\div" }, + { latex: "\\%" }, + { latex: "\\oslash" }, + ] + }, + { + latex: "=", + shift: "\\neq", + variants: [ + { latex: "=" }, + { latex: "\\neq" }, + { latex: "\\equiv" }, + { latex: "\\varpropto" }, + { latex: "\\thickapprox" }, + { latex: "\\lt" }, + { latex: "\\gt" }, + { latex: "\\le" }, + { latex: "\\ge" }, + ] + }, + { + latex: ".", + shift: ",", + variants: [ + { latex: "." }, + { latex: "," }, + { latex: ";" }, + { latex: "\\colon" }, + { latex: "\\Colon" }, + { latex: "?" }, + { latex: "\\cdotp" }, + { latex: "\\ldots" }, + { latex: "\\cdots" }, + { latex: "\\therefore" }, + { latex: "\\because" }, + { latex: "\\Colon:" }, + { latex: "\\vdots" }, + { latex: "\\ddots" }, + { latex: "\\ldotp" }, + ] + }, + { + latex: "(", + shift: "\\lbrack", + variants: [ + { latex: "(" }, + { latex: "\\lbrack" }, + { latex: "\\langle" }, + { latex: "\\lfloor" }, + { latex: "\\lceil" }, + { latex: "\\lbrace" }, + ] + }, + { + latex: ")", + shift: "\\rbrack", + variants: [ + { latex: ")" }, + { latex: "\\rbrack" }, + { latex: "\\rangle" }, + { latex: "\\rfloor" }, + { latex: "\\rceil" }, + { latex: "\\rbrace" }, + ] + }, + "\\sqrt{#0}", + "#0^2", + ], + [ + "#@^{#?}", + "#@_{#?}", + "|#0|", + "\\sqrt[#0]{#0}", + { + class: "small", + latex: "\\log_{#0}#0", + shift: "\\ln", + variants: [ + { class: "small", latex: "\\log_{#0}#0" }, + { class: "small", latex: "\\ln#0" }, + { class: "small", latex: "\\log_{10}#0" }, + ] + }, + { + latex: "\\exponentialE", + shift: "\\exp", + variants: [ + { class: "small", latex: "\\exponentialE" }, + { class: "small", latex: "\\exp\\left(#0\\right)" }, + { class: "small", latex: "\\times10^{#0}" }, + ] + }, + "\\lim_{#0}", + { + class: "small", + latex: "\\sum_{#0}^{#0}#0", + shift: "\\Sigma", + variants: [ + { class: "small", latex: "\\sum_{#0}^{#0}#0" }, + { class: "small", latex: "\\sum #0" }, + ] + }, + { + class: "small", + latex: "\\prod_{#0}^{#0}#0", + shift: "\\Pi", + variants: [ + { class: "small", latex: "\\prod_{#0}^{#0}#0", }, + { class: "small", latex: "\\prod#0", }, + ] + }, + { + class: "small", + latex: "\\int_{#0}^{#0}#0", + shift: "\\smallint", + variants: [ + { class: "small", latex: "\\int_{#0}^{#0}#0" }, + { class: "small", latex: "\\int#0" }, + { class: "small", latex: "\\iint #0" }, + { class: "small", latex: "\\iiint#0" }, + { class: "small", latex: "\\oint#0" }, + { class: "small", latex: "\\intclockwise#0" }, + { class: "small", latex: "\\varointclockwise#0" }, + { class: "small", latex: "\\ointctrclockwise#0" }, + { class: "small", latex: "\\intctrclockwise#0" }, + { class: "small", latex: "\\oiint#0" }, + { class: "small", latex: "\\oiiint#0" }, + ] + }, + ], + [ + { + latex: "\\overrightarrow{#@}", + shift: "\\overleftarrow{#@}", + variants: [ + { latex: "\\overrightarrow{#@}" }, + { latex: "\\overleftarrow{#@}" }, + { latex: "\\underleftarrow{#@}" }, + { latex: "\\underrightarrow{#@}" }, + { latex: "\\overleftrightarrow{#@}" }, + { latex: "\\underleftrightarrow{#@}" }, + ] + }, + { + latex: "\\overline{#@}", + shift: "\\underline{#@}", + variants: [ + { latex: "\\overline{#@}" }, + { latex: "\\underline{#@}" }, + { latex: "\\tilde{#@}" }, + { latex: "\\grave{#@}" }, + { latex: "\\dot{#@}" }, + { latex: "\\ddot{#@}" }, + { latex: "\\mathring{#@}" }, + { latex: "\\breve{#@}" }, + { latex: "\\acute{#@}" }, + { latex: "\\bar{#@}" }, + { latex: "\\vec{#@}" }, + { latex: "\\hat{#@}" }, + { latex: "\\check{#@}" }, + { latex: "\\undergroup{#@}" }, + { latex: "\\overgroup{#@}" }, + { latex: "\\underbrace{#@}" }, + { latex: "\\overbrace{#@}" }, + { latex: "\\overlinesegment{#@}" }, + { latex: "\\underlinesegment{#@}" }, + ] + }, + { + latex: "#@^{\\prime}", + shift: "#@^{\\doubleprime}", + variants: [ + { latex: "#@^{\\prime}" }, + { latex: "#@^{\\doubleprime}" }, + { latex: "#@\\degree" }, + ] + }, + { + class: "small", + latex: "\\mathrm{abs}\\left(#0\\right)", + }, + { + latex: "\\cup", + shift: "\\cap", + variants: [ + { latex: "\\cup" }, + { latex: "\\cap" }, + { latex: "\\subset" }, + { latex: "\\subseteq" }, + { latex: "\\subsetneq" }, + { latex: "\\varsubsetneq" }, + { latex: "\\subsetneqq" }, + { latex: "\\nsubset" }, + { latex: "\\nsubseteq" }, + { latex: "\\supset" }, + { latex: "\\supseteq" }, + { latex: "\\supsetneq" }, + { latex: "\\supsetneqq" }, + { latex: "\\nsupset" }, + { latex: "\\nsupseteq" }, + ] + }, + + { + latex: "\\exists", + shift: "\\forall", + variants: [ + { latex: "\\exists" }, + { latex: "\\nexists" }, + { latex: "\\forall" }, + { latex: "\\lnot" }, + { latex: "\\land" }, + { latex: "\\lor" }, + { latex: "\\oplus" }, + { latex: "\\downarrow" }, + { latex: "\\uparrow" }, + { latex: "\\curlywedge" }, + { latex: "\\bar{\\curlywedge}" }, + { latex: "\\in" }, + { latex: "\\owns" }, + { latex: "\\notin" }, + { latex: "\\ni" }, + { latex: "\\not\\owns" }, + ] + }, + { + latex: "\\rightarrow", + shift: "\\larr", + variants: [ + { latex: "\\rightarrow" }, + { latex: "\\implies" }, + { latex: "\\to" }, + { latex: "\\dashv" }, + { latex: "\\roundimplies" }, + { latex: "\\larr" }, + { latex: "\\impliedby" }, + { latex: "\\gets" }, + { latex: "\\lArr" }, + { latex: "\\vdash" }, + { latex: "\\models" }, + { latex: "\\in" }, + { latex: "\\lrArr" }, + { latex: "\\iff" }, + { latex: "\\leftrightarrow" }, + { latex: "\\leftrightarrows" }, + { latex: "\\Leftrightarrow" }, + { latex: "^{\\biconditional}" }, + ] + }, + { + latex: "\\infty", + shift: "\\omega", + variants: [ + { latex: "\\infty" }, + { latex: "\\aleph_0" }, + { latex: "\\aleph_1" }, + { latex: "\\omega" }, + { latex: "\\mathfrak{m}" }, + ] + }, + { + latex: "\\imaginaryI", + shift: "\\Re", + variants: [ + { latex: "\\Re" }, + { latex: "\\Im" }, + { latex: "\\imaginaryJ" }, + { latex: "\\imaginaryI" }, + { latex: "\\Vert#0\\Vert" }, + ] + }, + { + latex: "\\mathrm{d}#0", + shift: "\\partial", + variants: [ + { latex: "\\mathrm{d}#0" }, + { latex: "\\dfrac{\\mathrm{d}}{\\mathrm{d}#0}" }, + { latex: "\\frac{\\partial}{\\partial #0}" }, + { latex: "\\mathrm{d}" }, + { latex: "\\partial" }, + ] + }, + ], + [ + { + latex: "\\sin", + shift: "\\sin^{-1}", + variants: [ + { class: "small", latex: "\\sin" }, + { class: "small", latex: "\\sinh" }, + { class: "small", latex: "\\sin^{-1}" }, + { class: "small", latex: "\\arsinh" }, + ] + }, + { + latex: "\\cos", + shift: "\\cos^{-1}", + variants: [ + { class: "small", latex: "\\cos" }, + { class: "small", latex: "\\cosh" }, + { class: "small", latex: "\\cos^{-1}" }, + { class: "small", latex: "\\arcosh" }, + ] + }, + { + latex: "\\tan", + shift: "\\tan^{-1}", + variants: [ + { class: "small", latex: "\\tan" }, + { class: "small", latex: "\\tg" }, + { class: "small", latex: "\\tan^{-1}" }, + { class: "small", latex: "\\tanh" }, + { class: "small", latex: "\\artanh" }, + { class: "small", latex: "\\arctan" }, + { class: "small", latex: "\\arctg" }, + { class: "small", latex: "\\cot" }, + ] + }, + "\\Delta", + { + latex: "\\pi", + shift: "\\tau", + variants: [ + { latex: "\\pi" }, + { latex: "\\tau" }, + { latex: "\\rho" }, + { latex: "\\theta" }, + ] + }, + { + latex: "f(#0)", + shift: "x_{i}", + variants: [ + { class: "small", latex: "f(#0)" }, + { class: "small", latex: "g(#0)" }, + { latex: "x^{n}" }, + { latex: "x^{#0}" }, + { latex: "x_{n}" }, + { latex: "x_{i}" }, + { latex: "x_{#0}" }, + ] + }, + + { + latex: "#@_{i}", + shift: "#@^{n}", + variants: [ + { latex: "#@_{i}" }, + { latex: "#@_{n}" }, + { latex: "#@^{n}" }, + { latex: "#@_{ij}" }, + { latex: "#@_{t}" }, + ] + }, + { + latex: "\\text{\\_}", + shift: "\\circ", + variants: [ + { latex: "\\ast" }, + { latex: "\\circ" }, + { latex: "\\bigcirc" }, + { latex: "\\bullet" }, + { latex: "\\odot" }, + { latex: "\\oslash" }, + { latex: "\\circledcirc" }, + { latex: "\\star" }, + { latex: "\\times" }, + { latex: "\\doteq" }, + { latex: "\\doteqdot" }, + ] + }, + { + latex: "+", + aside: "New Line", + class: "action", + command: ["performWithFeedback", "addRowAfter"], + shift: { + latex: "-", + class: "action", + aside: "Delete Line", + command: ["performWithFeedback", "removeRow"], + }, + variants: [ + { + latex: "+", + aside: "New Line", + class: "small", + command: ["performWithFeedback", "addRowAfter"], + }, + { + latex: "-", + aside: "Delete Line", + class: "small", + command: ["performWithFeedback", "removeRow"], + }, + ] + }, + { + label: "T", + aside: "Text Mode", + class: "action", + command: ["switchMode", "text"], + shift: { + label: "M", + aside: "Math Mode", + class: "small action", + command: ["switchMode", "math"], + }, + variants: [ + { + label: "T", + class: "small", + aside: "Math Mode", + command: ["switchMode", "text"], + }, + { + label: "M", + class: "small", + aside: "Math Mode", + command: ["switchMode", "math"], + }, + { + label: "L", + class: "small", + aside: "LaTeX Mode", + command: ["switchMode", "latex"], + }, + ] + }, + ] + ] +}; \ No newline at end of file diff --git a/indexer-frontend/src/app/components/math-live/keyboards/matrix-keyboard.ts b/indexer-frontend/src/app/components/math-live/keyboards/matrix-keyboard.ts new file mode 100644 index 0000000000..8f1f5ea783 --- /dev/null +++ b/indexer-frontend/src/app/components/math-live/keyboards/matrix-keyboard.ts @@ -0,0 +1,252 @@ +export const matrixKeyboard = { + label: "matrix", + tooltip: "Matrix", + rows: [ + [ + { + label: "1x1", + latex: "\\begin{pmatrix}#0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0\\end{Bmatrix}" }, + ] + }, + { + label: "1x2", + latex: "\\begin{pmatrix}#0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "1x3", + latex: "\\begin{pmatrix}#0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "1x4", + latex: "\\begin{pmatrix}#0 & #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + latex: "\\cdots", + command: ["performWithFeedback", "addRowAfter"], + aside: "Add Row After", + shift: "\\cdots", + variants: [ + { + latex: "\\cdots", + command: ["performWithFeedback", "addRowAfter"], + aside: "Add Row After", + }, + { + latex: "\\cdots", + command: ["performWithFeedback", "addRowBefore"], + aside: "Add Row Before", + } + ] + } + ], + [ + { + label: "2x1", + latex: "\\begin{pmatrix}#0\\\\ #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0\\\\ #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0\\\\ #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0\\\\ #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0\\\\ #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0\\\\ #0\\end{Bmatrix}" }, + ] + }, + { + label: "2x2", + latex: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0\\\\ #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0\\\\ #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0\\\\ #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0\\\\ #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "2x3", + latex: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "2x4", + latex: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + latex: "\\vdots", + command: ["performWithFeedback", "addColumnAfter"], + aside: "Add Column After", + shift: "\\vdots", + variants: [ + { + latex: "\\vdots", + command: ["performWithFeedback", "addColumnAfter"], + aside: "Add Column After", + }, + { + latex: "\\vdots", + command: ["performWithFeedback", "addColumnBefore"], + aside: "Add Column Before", + } + ] + } + ], + [ + { + label: "3x1", + latex: "\\begin{pmatrix}#0\\\\ #0\\\\ #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0\\\\ #0\\\\ #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0\\\\ #0\\\\ #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0\\\\ #0\\\\ #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0\\\\ #0\\\\ #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0\\\\ #0\\\\ #0\\end{Bmatrix}" }, + ] + }, + { + label: "3x2", + latex: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "3x3", + latex: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "3x4", + latex: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + latex: "\\cdots", + aside: "Delelte Row", + command: ["performWithFeedback", "removeRow"], + } + ], + [ + { + label: "4x1", + latex: "\\begin{pmatrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0\\\\ #0\\\\ #0\\\\ #0\\end{Bmatrix}" }, + ] + }, + { + label: "4x2", + latex: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0\\\\ #0 & #0\\\\ #0 & #0\\\\ #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "4x3", + latex: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\\\ #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + label: "4x4", + latex: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}", + shift: "[#0]", + variants: [ + { latex: "\\ddots", insert: "\\begin{matrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{matrix}" }, + { latex: "(\\ddots)", insert: "\\begin{pmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{pmatrix}" }, + { latex: "\\lbrack\\ddots\\rbrack", insert: "\\begin{bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{bmatrix}" }, + { latex: "\\vert\\ddots\\vert", insert: "\\begin{vmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{vmatrix}" }, + { latex: "\\lbrace\\ddots\\rbrace", insert: "\\begin{Bmatrix}#0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\\\ #0 & #0 & #0 & #0\\end{Bmatrix}" }, + ] + }, + { + latex: "\\vdots", + aside: "Delete Column", + command: ["performWithFeedback", "removeColumn"], + } + ] + ] +}; \ No newline at end of file diff --git a/indexer-frontend/src/app/components/math-live/math-live.component.html b/indexer-frontend/src/app/components/math-live/math-live.component.html new file mode 100644 index 0000000000..ece16ca201 --- /dev/null +++ b/indexer-frontend/src/app/components/math-live/math-live.component.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/indexer-frontend/src/app/components/math-live/math-live.component.scss b/indexer-frontend/src/app/components/math-live/math-live.component.scss new file mode 100644 index 0000000000..a98b7c0535 --- /dev/null +++ b/indexer-frontend/src/app/components/math-live/math-live.component.scss @@ -0,0 +1,20 @@ +.mathlive-content { + display: flex; + flex-flow: column; +} + +.mathlive-content::ng-deep { + math-field::part(virtual-keyboard-toggle) { + display: none; + } + + math-field { + min-height: 40px; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + padding-left: 12px; + font-size: 24px; + user-select: all; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/components/math-live/math-live.component.ts b/indexer-frontend/src/app/components/math-live/math-live.component.ts new file mode 100644 index 0000000000..854ff53dc8 --- /dev/null +++ b/indexer-frontend/src/app/components/math-live/math-live.component.ts @@ -0,0 +1,73 @@ +import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { MathfieldElement } from 'mathlive'; +import { matrixKeyboard } from './keyboards/matrix-keyboard'; +import { mathKeyboard } from './keyboards/math-keyboard'; + +@Component({ + selector: 'math-live', + templateUrl: './math-live.component.html', + styleUrl: './math-live.component.scss', + standalone: true, + imports: [ + CommonModule + ] +}) +export class MathLiveComponent { + @ViewChild('mathLiveContent', { static: true }) mathLiveContent!: ElementRef; + @Input('readonly') readonly: boolean = false; + @Input('value') value!: string; + @Output('valueChange') valueChange = new EventEmitter(); + @Output('keyboard') keyboard = new EventEmitter(); + @Output('focus') focus = new EventEmitter(); + + private readonly mfe: MathfieldElement; + + + constructor() { + MathfieldElement.keypressSound = null; + MathfieldElement.plonkSound = null; + this.mfe = new MathfieldElement(); + } + + ngOnInit(): void { + const mathVirtualKeyboard: any = window.mathVirtualKeyboard; + mathVirtualKeyboard.layouts = [ + mathKeyboard, + matrixKeyboard, + "numeric", + "symbols", + "greek" + ]; + this.mfe.mathVirtualKeyboardPolicy = "manual"; + this.mfe.addEventListener("focusin", () => { + this.keyboard.emit(true); + this.focus.emit(this); + // return mathVirtualKeyboard.show(); + }); + this.mfe.addEventListener("focusout", () => { + this.keyboard.emit(false); + this.focus.emit(this); + // return mathVirtualKeyboard.hide(); + }); + this.mfe.addEventListener('input', (ev: any) => { + this.value = ev?.target?.value; + this.valueChange.emit(this.value); + }); + this.mfe.value = this.value || ''; + this.mfe.readonly = this.readonly; + } + + ngAfterViewInit() { + const container = this.mathLiveContent.nativeElement; + container.appendChild(this.mfe) + } + + ngOnDestroy() { + this.mfe.remove(); + } + + public getElement(): ElementRef { + return this.mathLiveContent; + } +} diff --git a/indexer-frontend/src/app/components/overview-form/overview-form.component.html b/indexer-frontend/src/app/components/overview-form/overview-form.component.html index 15d9e54c17..c81e79c609 100644 --- a/indexer-frontend/src/app/components/overview-form/overview-form.component.html +++ b/indexer-frontend/src/app/components/overview-form/overview-form.component.html @@ -8,6 +8,10 @@ {{field.value}} + } @else if (field.hederaExplorerType) { + + {{ field.value }} + } @else { {{field.value}} } diff --git a/indexer-frontend/src/app/components/overview-form/overview-form.component.ts b/indexer-frontend/src/app/components/overview-form/overview-form.component.ts index 35a11843bf..8bf5d5f93e 100644 --- a/indexer-frontend/src/app/components/overview-form/overview-form.component.ts +++ b/indexer-frontend/src/app/components/overview-form/overview-form.component.ts @@ -1,5 +1,6 @@ import { Component, Input } from '@angular/core'; import { RouterModule } from '@angular/router'; +import { HederaExplorer, HederaType } from '@components/hedera-explorer/hedera-explorer.component'; import { TranslocoModule } from '@jsverse/transloco'; export interface OverviewFormField { @@ -10,13 +11,15 @@ export interface OverviewFormField { queryParams?: any, value?: any, pattern?: any, - _link?: any + filters?: Record, + hederaExplorerType?: HederaType, + _link?: any, } @Component({ selector: 'app-overview-form', standalone: true, - imports: [TranslocoModule, RouterModule], + imports: [TranslocoModule, RouterModule, HederaExplorer], templateUrl: './overview-form.component.html', styleUrl: './overview-form.component.scss' }) @@ -28,6 +31,7 @@ export class OverviewFormComponent { if (Array.isArray(this.fields)) { for (const field of this.fields) { field.value = this.getFieldValue(this.target, field.path); + field.queryParams = this.getQueryParamsFromFilters(field); field._link = this.getLink(field); } } @@ -47,7 +51,7 @@ export class OverviewFormComponent { private getLink(field: OverviewFormField) { if (field.link) { - if (field.direct) { + if (field.direct || field.filters) { return [field.link]; } else { if (field.pattern) { @@ -64,4 +68,23 @@ export class OverviewFormComponent { } return undefined; } + + private getQueryParamsFromFilters(field: OverviewFormField) { + if (field.queryParams) { + return field.queryParams; + } + + if (field.filters) { + const queryParams: any = {}; + for (const [key, path] of Object.entries(field.filters)) { + const value = this.getFieldValue(this.target, path); + if (value !== null && value !== undefined) { + queryParams[key] = value; + } + } + return queryParams; + } + + return undefined; + } } diff --git a/indexer-frontend/src/app/components/progress-bar/progress-bar.component.html b/indexer-frontend/src/app/components/progress-bar/progress-bar.component.html new file mode 100644 index 0000000000..733b87a569 --- /dev/null +++ b/indexer-frontend/src/app/components/progress-bar/progress-bar.component.html @@ -0,0 +1,13 @@ +
+
+ + + +
+
+
+ {{ title }} + {{ progressText }} +
+
+
\ No newline at end of file diff --git a/indexer-frontend/src/app/components/progress-bar/progress-bar.component.scss b/indexer-frontend/src/app/components/progress-bar/progress-bar.component.scss new file mode 100644 index 0000000000..42d700f4b0 --- /dev/null +++ b/indexer-frontend/src/app/components/progress-bar/progress-bar.component.scss @@ -0,0 +1,34 @@ + +.progress-container { + display: flex; + gap: 12px; + align-items: center; + + .progress-icon { + &.loading { + animation: loading 5s linear infinite; + } + } + + .progress-text { + font-size: 12px; + font-weight: 400; + color: var(--color-grey-white, #FFFFFF); + } + + .progress-title { + font-size: 12px; + font-weight: 700; + color: var(--color-grey-white, #FFFFFF); + } +} + +@keyframes loading { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/components/progress-bar/progress-bar.component.ts b/indexer-frontend/src/app/components/progress-bar/progress-bar.component.ts new file mode 100644 index 0000000000..d5b3a908a9 --- /dev/null +++ b/indexer-frontend/src/app/components/progress-bar/progress-bar.component.ts @@ -0,0 +1,30 @@ +import { CommonModule } from '@angular/common'; +import { + Component, + ElementRef, + Input, + TemplateRef, + ViewChild, +} from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { Router } from '@angular/router'; +import { TranslocoModule, TranslocoService } from '@jsverse/transloco'; + +@Component({ + selector: 'app-progress-bar', + standalone: true, + imports: [CommonModule, FormsModule, TranslocoModule], + templateUrl: './progress-bar.component.html', + styleUrl: './progress-bar.component.scss', +}) +export class ProgressBarComponent { + @ViewChild('counter') counter!: ElementRef; + @Input() title!: string; + @Input() progressText!: string; + @Input() loading!: boolean; + + constructor(private router: Router, public translocoService: TranslocoService) {} + + ngOnChanges() { + } +} diff --git a/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.html b/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.html index 558dbc1eaf..a215b1ce6e 100644 --- a/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.html +++ b/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.html @@ -30,6 +30,18 @@
{{item.unit}}
+ +
+ +
diff --git a/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.css b/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.scss similarity index 82% rename from indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.css rename to indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.scss index 30a1358c85..61e06b195a 100644 --- a/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.css +++ b/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.scss @@ -4,7 +4,7 @@ form { } .group-label { - color: rgba(0,0,0,.6); + color: rgba(0, 0, 0, .6); } .group-form { @@ -33,7 +33,7 @@ form { .group-label, .array-label { - color: rgba(0,0,0,.6); + color: rgba(0, 0, 0, .6); background: #fff; top: -10px; left: 5px; @@ -100,20 +100,20 @@ form { margin-right: 20px; } -.form-field-array-item > .form-field-group { +.form-field-array-item>.form-field-group { padding-left: 40px; } -.schema-form-field-array-group > .form-field-array-item > .form-field-group, -.form-field-array-item > .form-field-group { +.schema-form-field-array-group>.form-field-array-item>.form-field-group, +.form-field-array-item>.form-field-group { border-left: 1px solid var(--color-grey-3) !important; } .form-field-group { - margin-bottom: 15px; + margin-bottom: 15px; } -.form-field-group > .form-field-array-item { +.form-field-group>.form-field-array-item { padding-right: 0; } @@ -161,6 +161,27 @@ form { font-size: 20px; } + +.form-field-formula { + padding: 0px 2px 0px 4px; + margin-left: 10px; + display: flex; + justify-content: flex-start; + align-items: center; + font-size: 20px; + + .guardian-icon-button { + width: 38px; + height: 38px; + border-radius: 8px; + border: 1px solid var(--color-grey-3, #E1E7EF); + + svg { + fill: #878787; + } + } +} + .loading { margin: 10px auto; } @@ -202,4 +223,4 @@ form { top: 22px; display: block; position: absolute; -} +} \ No newline at end of file diff --git a/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.ts b/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.ts index 7ade7bad5d..48dbf1f6b6 100644 --- a/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.ts +++ b/indexer-frontend/src/app/components/schema-form-view/schema-form-view.component.ts @@ -16,6 +16,8 @@ import { CheckboxModule } from 'primeng/checkbox'; import { FormsModule } from '@angular/forms'; import { SchemaField, Schema } from '@indexer/interfaces'; import { InputTextareaModule } from 'primeng/inputtextarea'; +import { DialogService } from 'primeng/dynamicdialog'; +import { FormulasViewDialog } from '../../dialogs/formulas-view-dialog/formulas-view-dialog.component'; /** * Form view by schema @@ -23,7 +25,7 @@ import { InputTextareaModule } from 'primeng/inputtextarea'; @Component({ selector: 'app-schema-form-view', templateUrl: './schema-form-view.component.html', - styleUrls: ['./schema-form-view.component.css'], + styleUrls: ['./schema-form-view.component.scss'], standalone: true, imports: [ InputTextModule, @@ -36,7 +38,9 @@ import { InputTextareaModule } from 'primeng/inputtextarea'; CheckboxModule, FormsModule, InputTextareaModule, + FormulasViewDialog ], + providers: [DialogService], changeDetection: ChangeDetectionStrategy.OnPush, }) export class SchemaFormViewComponent { @@ -45,10 +49,15 @@ export class SchemaFormViewComponent { @Input('fields') schemaFields!: SchemaField[]; @Input('delimiter-hide') delimiterHide: boolean = false; @Input('values') values: any; + @Input() formulas?: any; fields: any[] | undefined = []; pageSize: number = 20; + constructor( + private dialogService: DialogService + ) { } + isBooleanView(item: boolean | any): string { return typeof item === 'boolean' ? String(item) : 'Unset'; } @@ -77,14 +86,15 @@ export class SchemaFormViewComponent { } const item: any = { ...field, + fullPath: field.fullPath || '', hide: false, isInvalidType: false, }; if (!field.isArray && !field.isRef) { item.value = !this.values || - this.values[item.name] === null || - this.values[item.name] === undefined + this.values[item.name] === null || + this.values[item.name] === undefined ? '' : this.values[item.name]; } @@ -174,4 +184,18 @@ export class SchemaFormViewComponent { isPostfix(item: SchemaField): boolean { return item.unitSystem === 'postfix'; } + + public isFormulas(item: any) { + return this.formulas ? this.formulas[item.fullPath] : undefined; + } + + public showFormulas(formulas: any) { + const dialogRef = this.dialogService.open(FormulasViewDialog, { + showHeader: false, + width: '950px', + styleClass: 'guardian-dialog', + data: formulas, + }); + dialogRef.onClose.subscribe((result: any) => { }); + } } diff --git a/indexer-frontend/src/app/components/stat-card/stat-card.component.html b/indexer-frontend/src/app/components/stat-card/stat-card.component.html index 0e1802152f..d453896cef 100644 --- a/indexer-frontend/src/app/components/stat-card/stat-card.component.html +++ b/indexer-frontend/src/app/components/stat-card/stat-card.component.html @@ -1,6 +1,6 @@
-
{{cardLabel | transloco}}
+
{{selectedStatData.label | transloco}}
@@ -10,14 +10,23 @@
@switch (type) { @case ('count') { -
{{numberWithCommas(count)}}
- @if (upcount && upcount > 0) { -
+{{upcount}}
+
{{numberWithCommas(selectedStatData.count)}}
+ @if (selectedStatData.upcount && selectedStatData.upcount > 0) { +
+{{selectedStatData.upcount}}
} } @case ('graph') { - + } }
+ + @if (tabOptions.length > 1) { +
+
+ +
+
+ }
diff --git a/indexer-frontend/src/app/components/stat-card/stat-card.component.scss b/indexer-frontend/src/app/components/stat-card/stat-card.component.scss index 1cc1835d11..b3c73b8bd0 100644 --- a/indexer-frontend/src/app/components/stat-card/stat-card.component.scss +++ b/indexer-frontend/src/app/components/stat-card/stat-card.component.scss @@ -3,8 +3,8 @@ flex-direction: column; padding: 15px; background-color: white; - height: 240px; - width: 410px; + height: 380px; + width: 628px; border: 1px solid var(--color-gray-2); border-radius: 10px; gap: 5px; @@ -42,3 +42,24 @@ max-height: 100%; max-width: 100%; } + +.sub-tabs { + position: relative; + display: flex; + justify-content: center; + + div { + position: absolute; + bottom: 9px; + } +} + +::ng-deep .sub-tabs { + .p-selectbutton .p-button { + height: 38px; + } + + .p-button .p-button-label { + color: #687786; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/components/stat-card/stat-card.component.ts b/indexer-frontend/src/app/components/stat-card/stat-card.component.ts index b72c3c7d93..f14058a224 100644 --- a/indexer-frontend/src/app/components/stat-card/stat-card.component.ts +++ b/indexer-frontend/src/app/components/stat-card/stat-card.component.ts @@ -1,4 +1,6 @@ +import { CommonModule } from '@angular/common'; import { + ChangeDetectorRef, Component, ElementRef, Input, @@ -14,70 +16,88 @@ import { SelectButtonModule } from 'primeng/selectbutton'; @Component({ selector: 'app-stat-card', standalone: true, - imports: [ChartModule, SelectButtonModule, FormsModule, TranslocoModule], + imports: [CommonModule, ChartModule, SelectButtonModule, FormsModule, TranslocoModule], templateUrl: './stat-card.component.html', styleUrl: './stat-card.component.scss', }) export class StatCardComponent { @ViewChild('counter') counter!: ElementRef; - @Input() count!: number; - @Input() upcount?: number; - @Input() cardLabel!: string; - @Input() chartData?: { labels: string[]; data: number[] }; - @Input() link?: string; + @Input() statData!: { + label?: string, + count: number, + upcount?: number, + chartLabel?: string, + chartData?: + { + labels: string[], + data: number[], + datasets: any, + }, + link?: string, + tabLabel?: string, + }[]; + stateOptions: any[] = [ { value: 'count', icon: 'pi pi-sort-numeric-up-alt' }, { value: 'graph', icon: 'pi pi-chart-line' }, ]; - + tabOptions: any[] = []; type = 'count'; - data: any; options: any; + selectedStatIndex: number = 0; - constructor(private router: Router, public translocoService: TranslocoService) {} + constructor(private router: Router, public translocoService: TranslocoService, public cdr: ChangeDetectorRef) { } ngOnChanges() { - if (this.chartData) { - this.initChartConfig(this.chartData?.labels, this.chartData.data); - } + this.initChartConfig(); } + get selectedStatData() { return this.statData?.[this.selectedStatIndex] }; + numberWithCommas(x: number) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); } ngAfterViewInit() { + this.initCounter(); + } + + initCounter() { setTimeout(() => { - const counter: any = this.counter.nativeElement; - counter.innerText = '0'; - const updateCounter = () => { - const target = +counter.getAttribute('data-target'); - const count = parseFloat(counter.innerText.replace(/,/g, '')); - const increment = target / 100; - if (count < target) { - counter.innerText = this.numberWithCommas( - Math.ceil(count + increment) - ); - setTimeout(updateCounter, 5); - } else { - counter.innerText = this.numberWithCommas(target); - } - }; - updateCounter(); + if (this.counter) { + const counter: any = this.counter.nativeElement; + counter.innerText = '0'; + const updateCounter = () => { + const target = +counter.getAttribute('data-target'); + const count = parseFloat(counter.innerText.replace(/,/g, '')); + const increment = target / 100; + if (count < target) { + counter.innerText = this.numberWithCommas( + Math.ceil(count + increment) + ); + setTimeout(updateCounter, 5); + } else { + counter.innerText = this.numberWithCommas(target); + } + }; + updateCounter(); + } }); } - initChartConfig(labels: any, data: any) { - this.data = { - labels, - datasets: [ - { - data, - fill: true, - borderColor: '#4169E2', - }, - ], - }; + initChartConfig() { + this.statData?.forEach((data, i) => { + if (data.chartData) { + data.chartData.datasets = [ + { + data: data.chartData.data, + fill: true, + borderColor: '#4169E2', + } + ] + } + this.tabOptions.push({ value: i, label: this.translocoService.translate(data?.tabLabel || '') }); + }); this.options = { maintainAspectRatio: true, @@ -89,7 +109,12 @@ export class StatCardComponent { scales: { x: { ticks: { - display: false, + display: true, + minRotation: 0, + maxRotation: 0, + font: { + size: 10 + } }, grid: { color: '#e3e3e3', @@ -97,12 +122,15 @@ export class StatCardComponent { }, title: { display: true, - text: this.translocoService.translate('stat.x') - } + text: this.translocoService.translate('stat.x'), + }, }, y: { ticks: { - display: false, + display: true, + font: { + size: 10 + } }, grid: { color: '#e3e3e3', @@ -110,16 +138,28 @@ export class StatCardComponent { }, title: { display: true, - text: this.translocoService.translate('stat.y') + text: this.translocoService.translate('stat.y'), } }, }, }; } + onSubTabClick(event: any) { + event.stopPropagation(); + } + + onSubTabSelect(event: any) { + this.selectedStatIndex = event.index; + + this.initCounter(); + + this.cdr.detectChanges(); + } + onOpen() { - if (this.link) { - this.router.navigate([this.link]); + if (this.statData?.[this.selectedStatIndex]?.link) { + this.router.navigate([this.statData?.[this.selectedStatIndex]?.link]); } } } diff --git a/indexer-frontend/src/app/components/table/table.component.html b/indexer-frontend/src/app/components/table/table.component.html index ed0402257a..84f1043c23 100644 --- a/indexer-frontend/src/app/components/table/table.component.html +++ b/indexer-frontend/src/app/components/table/table.component.html @@ -45,6 +45,10 @@
{{column.title | transloco}}
} + @case ('hedera') { +
+ {{column.title | transloco}}
+ } } }
@@ -62,9 +66,12 @@ @switch (column.type) { @case ('text') { @if (column.link) { - {{getFieldValue(column.field, + {{getFieldValue(column.field, item)}} - } @else { + } @else if (!!column.formatValue) { + {{column.formatValue(getFieldValue(column.field, + item))}} + }@else { {{getFieldValue(column.field, item)}} } @@ -75,6 +82,11 @@ @case ('button') { } + @case ('hedera') { + + {{ getFieldValue(column.field, item) }} + + } }
} @@ -97,4 +109,4 @@ {{ 'grid.empty.title' | transloco }} {{ 'grid.empty.description' | transloco }}
- + \ No newline at end of file diff --git a/indexer-frontend/src/app/components/table/table.component.ts b/indexer-frontend/src/app/components/table/table.component.ts index d2a458de72..61bdfab654 100644 --- a/indexer-frontend/src/app/components/table/table.component.ts +++ b/indexer-frontend/src/app/components/table/table.component.ts @@ -4,15 +4,17 @@ import { PaginatorModule } from 'primeng/paginator'; import { TranslocoModule } from '@jsverse/transloco'; import { ProgressSpinnerModule } from 'primeng/progressspinner'; import { ButtonModule } from 'primeng/button'; -import { NgStyle, NgTemplateOutlet } from '@angular/common'; +import { DatePipe, NgStyle, NgTemplateOutlet } from '@angular/common'; import { PaginatorComponent } from '@components/paginator/paginator.component'; import { TagModule } from 'primeng/tag'; import { RouterModule } from '@angular/router'; +import { HederaExplorer, HederaType } from '@components/hedera-explorer/hedera-explorer.component'; export enum ColumnType { TEXT = 'text', BUTTON = 'button', CHIP = 'chip', + HEDERA = 'hedera', } export interface BaseColumn { @@ -28,6 +30,7 @@ export interface TextColumn extends BaseColumn { field: string; url: string; }; + formatValue: (value: any) => string; } export interface ChipColumn extends BaseColumn { @@ -43,6 +46,12 @@ export interface ButtonColumn extends BaseColumn { btn_label: string; } +export interface HederaTimestampColumn extends BaseColumn { + type: ColumnType.HEDERA; + field: string; + hederaType: HederaType; +} + @Component({ selector: 'app-table', standalone: true, @@ -55,6 +64,8 @@ export interface ButtonColumn extends BaseColumn { NgStyle, NgTemplateOutlet, PaginatorComponent, + HederaExplorer, + DatePipe, TagModule, RouterModule, ], @@ -62,7 +73,7 @@ export interface ButtonColumn extends BaseColumn { styleUrl: './table.component.scss', }) export class TableComponent { - @Input() columns!: TextColumn[] | ButtonColumn[] | ChipColumn[]; + @Input() columns!: TextColumn[] | ButtonColumn[] | ChipColumn[] | HederaTimestampColumn[]; @Input() data!: any[]; @Input() pageIndex: number = 0; @Input() pageSize: number = 5; @@ -129,4 +140,26 @@ export class TableComponent { } return result; } + + getLink(column: any, obj: any): string[] { + if (column.link?.filters) { + return [column.link.url]; + } else if (column.link?.url) { + return [column.link.url, this.getFieldValue(column.link.field, obj)]; + } + return []; + } + + getFilterParams(column: any, obj: any) { + if (column.link?.filters) { + const queryParams: any = {}; + for (const [key, path] of Object.entries(column.link.filters)) { + const value = this.getFieldValue(path as string, obj); + if (value !== null && value !== undefined) { + queryParams[key] = value; + } + } + return queryParams; + } + } } diff --git a/indexer-frontend/src/app/dialogs/formulas-view-dialog/formulas-view-dialog.component.html b/indexer-frontend/src/app/dialogs/formulas-view-dialog/formulas-view-dialog.component.html new file mode 100644 index 0000000000..a95aaa2152 --- /dev/null +++ b/indexer-frontend/src/app/dialogs/formulas-view-dialog/formulas-view-dialog.component.html @@ -0,0 +1,240 @@ +
+
+
View Formula
+
+
+ + + +
+
+
+ + + +
+ + +
+ + @if (current && current.type === 'constant') { +
Constant
+
+ +
+ + +
+
+ + +
+
+ + +
+
+ } + + @if (current && current.type === 'variable') { +
Variable
+
+
+ + +
+ @if (current.hasLink) { +
+ + +
+ } +
+ + +
+
+ } + + @if (current && current.type === 'formula') { +
Formula
+
+
+ + +
+
+ + +
+ @if (current.hasLink) { +
+ + +
+ } +
+ +
+ @for (relationship of current.relationshipItems; track $index) { +
+ {{relationship.name}} +
+ } +
+
+
+ + +
+
+ } + @if (current && current.type === 'text') { +
Text
+
+
+ + +
+
+ + +
+ @if (current.hasLink) { +
+ + +
+ } +
+ +
+ @for (relationship of current.relationshipItems; track $index) { +
+ {{relationship.name}} +
+ } +
+
+
+ + +
+
+ } + + @if (current && current.type === 'schema') { +
Schema
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ } + +
+
+
+ +
+
+ @for (file of files; track file) { +
+
+ + +
+
+ + +
+
+ } + @if (!files.length) { +
+
There were no files attached.
+
+ } +
+
+
+
+
+ \ No newline at end of file diff --git a/indexer-frontend/src/app/dialogs/formulas-view-dialog/formulas-view-dialog.component.scss b/indexer-frontend/src/app/dialogs/formulas-view-dialog/formulas-view-dialog.component.scss new file mode 100644 index 0000000000..de57e4f2fe --- /dev/null +++ b/indexer-frontend/src/app/dialogs/formulas-view-dialog/formulas-view-dialog.component.scss @@ -0,0 +1,301 @@ +.dialog-header { + .header-item { + padding: 6px 12px; + margin: 0px 16px; + border-radius: 6px; + font-size: var(--guardian-primary-font-size); + color: var(--guardian-dry-run-color); + background: var(--guardian-dry-run-background); + user-select: none; + cursor: default; + } +} + +.guardian-input-container { + margin-bottom: 24px; +} + +.guardian-textarea-container { + margin-bottom: 24px; +} + +.dialog-body { + display: flex; + flex-direction: column; + min-height: 600px; + padding-bottom: 24px; +} + +.view-body { + display: flex; + flex-direction: row; + min-height: 600px; + height: 600px; +} + +.action-buttons { + display: flex; + justify-content: flex-end; + user-select: none; + position: relative; + + &>div { + margin-left: 15px; + margin-right: 0px; + } +} + +.close-icon-color { + fill: #848FA9; + color: #848FA9; +} + +.context { + position: relative; + height: 100%; + display: flex; + flex-direction: column; + width: 100%; + overflow: hidden; + + .current-item-name { + font-family: Poppins; + font-size: 24px; + font-weight: 600; + line-height: 32px; + color: #181818; + margin-bottom: 24px; + } + + .current-item { + border: 1px solid #E1E7EF; + border-radius: 8px; + height: 100%; + overflow: auto; + padding: 24px; + } +} + +.formula-relationships { + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: #000; + padding: 8px 16px 0px 16px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + min-height: 40px; + + .formula-relationship { + width: auto; + height: 30px; + padding: 7px 12px 7px 12px; + border-radius: 6px; + background: var(--guardian-grey-color, #EFF3F7); + color: var(--guardian-disabled-color, #848FA9); + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 16px; + text-align: left; + margin-right: 8px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + display: inline-flex; + margin-bottom: 8px; + cursor: pointer; + + &:hover { + filter: brightness(0.95); + } + } +} + +.formula-link { + height: 40px; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: #000; + padding: 12px 16px; + cursor: pointer; + + &:hover { + background: var(--guardian-hover, #F0F3FC); + } + + .formula-link-value { + display: flex; + flex-direction: row; + pointer-events: none; + + &__entity { + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 16px; + color: var(--guardian-entity-color, #DA9B22); + margin-right: 8px; + } + + &__item { + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 16px; + } + } +} + +.nav-container { + display: flex; + width: 260px; + min-width: 260px; + height: 100%; + padding: 16px 0px 16px 0px; + border: 1px solid #E1E7EF; + border-radius: 8px; + margin-right: 24px; + position: relative; + overflow: auto; +} + +.field-tree { + width: auto; + min-width: 100%; + + .field-item { + width: auto; + padding: 8px 24px 8px 16px; + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 18px; + text-align: left; + display: flex; + justify-content: flex-start; + align-items: center; + + .field-offset { + width: 0px; + height: 24px; + overflow: hidden; + } + + .field-collapse { + width: 24px; + min-width: 24px; + height: 24px; + overflow: hidden; + } + + .field-select { + width: 24px; + min-width: 24px; + height: 24px; + overflow: hidden; + cursor: pointer; + + * { + pointer-events: none; + } + } + + .field-container { + padding-left: 8px; + cursor: pointer; + + * { + pointer-events: none; + } + + &[readonly="true"] { + cursor: default; + } + + &__view { + text-transform: capitalize; + font-size: 12px; + font-weight: bold; + margin-bottom: 4px; + } + + &__entity { + font-family: Inter; + font-size: 14px; + font-weight: 500; + line-height: 16px; + color: var(--guardian-entity-color, #DA9B22); + margin-bottom: 4px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 150px; + } + + &__header { + display: flex; + height: 18px; + + &-type { + font-family: Inter; + font-size: 12px; + font-weight: 400; + line-height: 16px; + color: #848FA9; + margin-right: 4px; + padding: 2px 0px; + text-transform: capitalize; + } + + &-name { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 150px; + } + } + } + + &[selected="true"] { + background: var(--guardian-primary-background, #e1e7fa); + } + } +} + +p-tabpanel::ng-deep .p-tabview-panels { + margin-top: 24px; +} + + +.files-container { + width: 100%; + + .file-item { + width: 100%; + border: 1px solid #E1E7EF; + border-radius: 8px; + padding: 24px; + margin-bottom: 24px; + } + + .no-files { + font-family: Inter; + font-size: 14px; + font-weight: 400; + color: var(--guardian-disabled-color, #848FA9); + height: 87px; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/dialogs/formulas-view-dialog/formulas-view-dialog.component.ts b/indexer-frontend/src/app/dialogs/formulas-view-dialog/formulas-view-dialog.component.ts new file mode 100644 index 0000000000..0bdc28fd8f --- /dev/null +++ b/indexer-frontend/src/app/dialogs/formulas-view-dialog/formulas-view-dialog.component.ts @@ -0,0 +1,90 @@ +import { Component } from '@angular/core'; +import { DialogService, DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; +import { FormulaFiles, FormulaItem, FormulasTree, SchemaItem } from '../../models/formula-tree'; +import { TreeListData, TreeListItem, TreeListView } from '../../models/tree-list'; +import { MathLiveComponent } from '@components/math-live/math-live.component'; +import { TabViewModule } from 'primeng/tabview'; +import { TranslocoModule } from '@jsverse/transloco'; + +@Component({ + standalone: true, + selector: 'formulas-view-dialog', + templateUrl: './formulas-view-dialog.component.html', + styleUrls: ['./formulas-view-dialog.component.scss'], + imports: [ + TranslocoModule, + MathLiveComponent, + TabViewModule + ] +}) +export class FormulasViewDialog { + public loading = true; + public tree: FormulasTree; + public schema: string; + public path: string; + public items: FormulaItem[]; + public current: FormulaItem | SchemaItem | null; + public nav: TreeListView | null; + public files: FormulaFiles[]; + + constructor( + public ref: DynamicDialogRef, + public config: DynamicDialogConfig, + private dialogService: DialogService, + ) { + this.tree = this.config.data?.tree; + this.schema = this.config.data?.schema; + this.path = this.config.data?.path; + this.items = []; + this.files = []; + this.current = null; + this.nav = null; + } + + ngOnInit() { + this.loading = false; + this.items = this.tree?.get(this.schema, this.path) || []; + this.files = this.tree?.getFiles(this.items) || []; + const navTree = FormulasTree.createNav(this.items) + const fields = TreeListData.fromObject(navTree, 'children'); + this.nav = TreeListView.createView(fields, (s) => { return !s.parent }); + this.nav.collapseAll(false); + this.nav.updateHidden(); + this.selectItem(this.items[0]); + } + + ngOnDestroy() { + } + + public onClose(): void { + this.ref.close(null); + } + + public onLink(current: FormulaItem) { + this.selectItem(current.linkItem); + } + + public onRelationship(relationship: FormulaItem) { + this.selectItem(relationship); + } + + public onCollapseNav(item: TreeListItem) { + if (this.nav) { + this.nav.collapse(item, !item.collapsed); + this.nav.updateHidden(); + } + } + + public onSelectNav(item: TreeListItem) { + this.selectItem(item.data.data); + } + + private selectItem(current: FormulaItem | SchemaItem | null) { + this.current = current; + if (this.nav) { + this.nav.data.items.forEach((e) => e.selected = e.data.data === this.current); + this.nav.updateHidden(); + this.nav.updateSelected(); + } + } +} diff --git a/indexer-frontend/src/app/models/formula-tree.ts b/indexer-frontend/src/app/models/formula-tree.ts new file mode 100644 index 0000000000..35f8f56d24 --- /dev/null +++ b/indexer-frontend/src/app/models/formula-tree.ts @@ -0,0 +1,684 @@ +import { FormulaItemType, IFormula, IFormulaItem, IFormulaFile, IFormulaLink, Message, Schema, SchemaField } from "@indexer/interfaces"; + +export interface Link { + schema: string; + path: string; + item: FormulaItem; +} + +export class FormulaFiles { + public readonly name: string; + public readonly type: string; + public readonly url: string; + + constructor(config: IFormulaFile) { + this.name = config.name || ''; + this.type = config.type || ''; + this.url = config.url || ''; + } +} + +export class DocumentItem { + private _type: Set; + private _map: Map; + + constructor(document: any) { + this._type = new Set(); + this._map = new Map(); + this.parsDoc(document); + } + + private parsDoc(document: any) { + try { + if (!document || !document.document) { + return; + } + const json = document.document; + if ((json).credentialSubject) { + this.parsVC(json); + } else if ((json).verifiableCredential) { + this.parsVP(json); + } else { + return; + } + } catch (error) { + console.error(error); + } + } + + private addValue(key: string, value: any, prev?: string) { + if (value) { + let path: string; + if (prev) { + if (key) { + path = `${prev}.${key}`; + } else { + path = `${prev}`; + } + } else { + if (key) { + path = `${key}`; + } else { + path = ''; + } + } + switch (typeof value) { + case 'boolean': + case 'number': + case 'string': { + const old = this._map.get(path); + if (old) { + if (Array.isArray(old)) { + old.push(value); + this._map.set(path, old); + } else { + this._map.set(path, [old, value]); + } + } else { + this._map.set(path, value); + } + break; + } + case 'object': { + if (Array.isArray(value)) { + for (const e of value) { + this.addValue('', e, path); + } + } else { + this.parsFields(value, path); + } + break; + } + default: { + return; + } + } + } + } + + private parsFields(json: any, prev?: string) { + if (json) { + for (const [key, value] of Object.entries(json)) { + this.addValue(key, value, prev); + } + } + } + + private parsCredentialSubject(cs: any) { + if (cs) { + this._type.add(cs.type); + this.parsFields(cs); + } + } + + private parsVC(vc: any) { + if (vc && vc.credentialSubject) { + if (Array.isArray(vc.credentialSubject)) { + for (const cs of vc.credentialSubject) { + this.parsCredentialSubject(cs); + } + } else { + this.parsCredentialSubject(vc.credentialSubject); + } + } + } + + private parsVP(vp: any) { + if (vp && vp.verifiableCredential) { + if (Array.isArray(vp.verifiableCredential)) { + for (const vc of vp.verifiableCredential) { + this.parsVC(vc); + } + } else { + this.parsVC(vp.verifiableCredential); + } + } + } + + public has(type?: string): boolean { + if (type) { + return this._type.has(type); + } + return false; + } + + public get(path?: string): any { + if (path) { + return this._map.get(path); + } + return null; + } +} + +export class SchemaItem { + public readonly type = 'schema'; + + private _value: any; + private _schema: Schema | null; + private _field: SchemaField | null; + private _type: string | undefined; + private _path: string | undefined; + + constructor(schema: Schema | null, field: SchemaField | null) { + this._schema = schema; + this._field = field; + this._type = schema?.type; + this._path = field?.path; + } + + public get name() { + return this._schema?.name || ''; + } + + public get description() { + return this._schema?.description || ''; + } + + public get field() { + return this._field?.description || ''; + } + + public get value() { + return this._value || ''; + } + + public setDocuments(documents: DocumentItem[]) { + for (const doc of documents) { + if (doc.has(this._type)) { + this._value = doc.get(this._path); + if (Array.isArray(this._value)) { + this._value = `[${this._value.join(',')}]`; + } + } + } + } + + public static empty() { + return new SchemaItem(null, null); + } +} + +export class FormulaItem { + public readonly uuid: string; + public readonly name: string; + public readonly description: string; + public readonly type: FormulaItemType; + + private _value: any; + private _link: IFormulaLink | null; + private _relationships: string[] | null; + + private _schemaLink: { schema: string, path: string } | null; + private _formulaLink: { formula: string, variable: string } | null; + private _parent: FormulaTree | null; + + private _relationshipItems: FormulaItem[]; + private _parentItems: FormulaItem[]; + private _linkEntity: FormulaTree | Schema | null; + private _linkItem: FormulaItem | SchemaItem | null; + + constructor(config: IFormulaItem) { + this.uuid = config.uuid || ''; + this.name = config.name || ''; + this.description = config.description || ''; + this.type = config.type || ''; + + this._value = config.value || ''; + this._link = config.link || null; + this._relationships = config.relationships || null; + + this._schemaLink = null; + this._formulaLink = null; + if (this._link) { + if (this._link.type === 'schema') { + this._schemaLink = { + schema: this._link.entityId, + path: this._link.item + } + } + if (this._link.type === 'formula') { + this._formulaLink = { + formula: this._link.entityId, + variable: this._link.item + } + } + } + + this._parent = null; + this._relationshipItems = []; + this._parentItems = []; + this._linkItem = null; + this._linkEntity = null; + } + + public get value() { + return this._value; + } + + public get hasLink() { + return !!this._link; + } + + public get schemaLink() { + return this._schemaLink; + } + + public get formulaLink() { + return this._formulaLink; + } + + public get linkEntity() { + return this._linkEntity; + } + + public get linkItem() { + return this._linkItem; + } + + public get linkEntityName() { + if (this._formulaLink && this._linkEntity) { + return this._linkEntity.name; + } + if (this._schemaLink && this._linkEntity) { + return this._linkEntity.name; + } + return null; + } + + public get linkItemName() { + if (this._formulaLink && this._linkItem) { + return (this._linkItem as FormulaItem).name; + } + if (this._schemaLink && this._linkItem) { + return (this._linkItem as SchemaItem).field; + } + return null; + } + + public get relationshipItems() { + return this._relationshipItems; + } + + public setParent(parent: FormulaTree) { + this._parent = parent; + } + + public setRelationship(items: FormulaItem[]) { + if (Array.isArray(this._relationships)) { + this._relationshipItems = items.filter((e) => this._relationships?.includes(e.uuid)); + } else { + this._relationshipItems = []; + } + + this._parentItems = []; + for (const item of items) { + if (Array.isArray(item._relationships) && item._relationships.includes(this.uuid)) { + this._parentItems.push(item); + } + } + } + + public setFormulas(formulas: FormulaTree[]) { + if (this._formulaLink) { + this._linkEntity = formulas.find((e) => e.uuid === this._formulaLink?.formula) || null; + if (this._linkEntity) { + this._linkItem = this._linkEntity.get(this._formulaLink.variable); + } + } + } + + public setSchemas(schemas: Schema[]) { + if (this._schemaLink) { + const schema = schemas.find((e) => e.iri === this._schemaLink?.schema) || null; + this._linkEntity = schema; + if (schema) { + const field = schema.getField(this._schemaLink.path); + if (field) { + this._linkItem = new SchemaItem(schema, field); + } + } else { + this._linkItem = SchemaItem.empty(); + } + } + } + + public setDocuments(documents: DocumentItem[]) { + if (this._schemaLink && this._linkItem) { + (this._linkItem as SchemaItem).setDocuments(documents); + } + } + + public createNav(list: Set): any { + const item: any = { + view: 'component', + type: this.type, + name: this.name, + data: this, + children: [] + } + if (this._formulaLink) { + item.children.push({ + view: 'link', + type: this._linkItem?.type, + entity: this._linkEntity?.name, + name: this._linkItem?.name, + data: this._linkItem, + children: [] + }); + } + if (this._schemaLink) { + item.children.push({ + view: 'link', + type: 'field', + entity: this._linkEntity?.name, + name: (this._linkItem as SchemaItem)?.field, + data: this._linkItem, + children: [] + }); + } + + for (const ref of this._relationshipItems) { + if (!list.has(ref)) { + const newList = new Set(list); + newList.add(ref); + const nav = ref.createNav(newList); + item.children.push(nav); + } + } + return item; + } + + public getFiles(): FormulaFiles[] { + return this._parent?.getFiles() || []; + } +} + +export class FormulaTree { + public readonly uuid: string; + public readonly name: string; + public readonly description: string; + + private _links: Map>; + private _items: FormulaItem[]; + private _files: FormulaFiles[]; + + constructor(formula: IFormula) { + this.uuid = formula.uuid || ''; + this.name = formula.name || ''; + this.description = formula.description || ''; + + this._links = new Map>(); + this._items = []; + this._files = []; + this.parse(formula?.config?.formulas); + this.parseFiles(formula?.config?.files); + } + + private parse(items?: IFormulaItem[]) { + if (!items) { + return; + } + + this._items = []; + for (const config of items) { + const item = new FormulaItem(config); + item.setParent(this); + const link = item.schemaLink; + if (link) { + const map = this._links.get(link.schema) || new Map(); + const array = map.get(link.path) || []; + array.push(item); + map.set(link.path, array); + this._links.set(link.schema, map); + } + this._items.push(item); + } + + for (const item of this._items) { + item.setRelationship(this._items); + } + } + + private parseFiles(files?: IFormulaFile[]) { + if (!files) { + return; + } + + this._files = []; + for (const config of files) { + const file = new FormulaFiles(config); + this._files.push(file); + } + } + + public setFormulas(formulas: FormulaTree[]) { + for (const item of this._items) { + item.setFormulas(formulas); + } + } + + public setSchemas(schemas: Schema[]) { + for (const item of this._items) { + item.setSchemas(schemas); + } + } + + public setDocuments(documents: DocumentItem[]) { + for (const item of this._items) { + item.setDocuments(documents); + } + } + + public hasLink(schema: string, path: string): boolean { + return this._links.get(schema)?.has(path) || false; + } + + public getLink(schema: string, path: string): FormulaItem[] { + return this._links.get(schema)?.get(path) || []; + } + + public get(variable: string): FormulaItem | null { + for (const item of this._items) { + if (item.name === variable) { + return item; + } + } + return null; + } + + public merge(links: Map>) { + for (const [schema, map] of this._links.entries()) { + const fullMap = links.get(schema) || new Map(); + for (const [path, array] of map.entries()) { + const fullArray = fullMap.get(path) || []; + for (const item of array) { + fullArray.push(item); + } + fullMap.set(path, fullArray); + } + links.set(schema, fullMap); + } + } + + public getFiles(): FormulaFiles[] { + return this._files; + } +} + +export class FormulasTree { + public items: FormulaTree[]; + + private _links: Map>; + + constructor() { + this._links = new Map>(); + this.items = []; + } + + public setFormulas(formulas: IFormula[]) { + if (Array.isArray(formulas)) { + this.items = formulas.map((f) => new FormulaTree(f)); + } else { + this.items = []; + } + for (const item of this.items) { + item.setFormulas(this.items); + } + } + + public setSchemas(schemas: Schema[]) { + for (const item of this.items) { + item.setSchemas(schemas); + } + } + + public setDocuments(documents: (any) | (any)[]) { + const _documents: DocumentItem[] = []; + if (Array.isArray(documents)) { + for (const doc of documents) { + const _doc = new DocumentItem(doc); + _documents.push(_doc); + } + } else if (documents) { + const _doc = new DocumentItem(documents); + _documents.push(_doc); + } + + for (const item of this.items) { + item.setDocuments(_documents); + } + } + + public update() { + this._links.clear(); + for (const item of this.items) { + item.merge(this._links); + } + } + + public has(schema: string, path: string): boolean { + return this._links.get(schema)?.has(path) || false; + } + + public get(schema: string, path: string): FormulaItem[] { + return this._links.get(schema)?.get(path) || []; + } + + public getFiles(items: FormulaItem[]): FormulaFiles[] { + const result = new Set(); + for (const item of items) { + for (const files of item.getFiles()) { + result.add(files); + } + } + return Array.from(result); + } + + public getFields(schema?: string) { + const result: any = {}; + if (schema) { + const map = this._links.get(schema); + if (map) { + for (const path of map.keys()) { + result[`${schema}/${path}`] = { + tree: this, + schema, + path + }; + } + } + } + return result; + } + + private static getSchema(message: Message) { + try { + const schema = new Schema(message.documents[0], ''); + return schema; + } catch (error) { + return null; + } + } + + private static getDocument(message: Message) { + try { + return { + document: JSON.parse(message.documents[0]) + } + } catch (error) { + return null; + } + } + + private static getFormula(message: Message): IFormula | null { + try { + return message.analytics.config; + } catch (error) { + return null; + } + } + + public static from(response?: { + formulas: Message[], + schemas: Message[], + document: Message, + relationships: Message[] + }) { + if (!response) { + return null; + } + + const documents = []; + if (response.document) { + documents.push(FormulasTree.getDocument(response.document)); + } + if (response.relationships) { + for (const document of response.relationships) { + documents.push(FormulasTree.getDocument(document)); + } + } + + const schemas = []; + if (response.schemas) { + for (const s of response.schemas) { + const schema = FormulasTree.getSchema(s); + if (schema) { + schemas.push(schema); + } + } + } + + const formulas = []; + if (response.formulas) { + for (const f of response.formulas) { + const formula = FormulasTree.getFormula(f); + if (formula) { + formulas.push(formula); + } + } + } + + const tree = new FormulasTree(); + tree.setFormulas(formulas); + tree.setSchemas(schemas); + tree.setDocuments(documents); + tree.update(); + + return tree; + } + + public static createNav(items: FormulaItem[]): any { + const root: any = { + view: 'root', + type: 'root', + children: [] + } + for (const item of items) { + const list = new Set(); + list.add(item); + const nav = item.createNav(list); + root.children.push(nav); + } + return root; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/models/formulas.ts b/indexer-frontend/src/app/models/formulas.ts new file mode 100644 index 0000000000..fd9f75722d --- /dev/null +++ b/indexer-frontend/src/app/models/formulas.ts @@ -0,0 +1,75 @@ +import { FormulaItemType, IFormulaConfig, IFormulaFile, IFormulaItem } from "@indexer/interfaces"; + +export class Formulas { + private items: IFormulaItem[]; + private filterMap: Map; + public files: IFormulaFile[]; + public data: IFormulaItem[]; + + constructor() { + this.items = []; + this.files = []; + this.data = []; + this.filterMap = new Map(); + this.filterMap.set(FormulaItemType.Constant, true); + this.filterMap.set(FormulaItemType.Variable, true); + this.filterMap.set(FormulaItemType.Formula, true); + this.filterMap.set(FormulaItemType.Text, true); + } + + public get all() { + return this.items; + } + + public setFilters(filter: any): void { + this.filterMap.set(FormulaItemType.Constant, filter.constant); + this.filterMap.set(FormulaItemType.Variable, filter.variable); + this.filterMap.set(FormulaItemType.Formula, filter.formula); + this.filterMap.set(FormulaItemType.Text, filter.text); + this.update(); + } + + private update(): void { + this.data = this.items.filter((e) => this.filterMap.get(e.type)); + } + + public fromData(config: IFormulaConfig) { + const items: IFormulaItem[] = config?.formulas || []; + const files: IFormulaFile[] = config?.files || []; + this.items = items.map((e) => this._fromItemJson(e)); + this.files = files.map((e) => this._fromFileJson(e)); + this.update(); + } + + public getJson(): IFormulaConfig { + return { + formulas: this.items.map((e) => this._toItemJson(e)), + files: this.files.map((e) => this._toFileJson(e)), + }; + } + + private _fromItemJson(item: IFormulaItem): IFormulaItem { + return item; + } + + private _toItemJson(item: IFormulaItem): IFormulaItem { + return item; + } + + private _fromFileJson(item: IFormulaFile): IFormulaFile { + return item; + } + + private _toFileJson(item: IFormulaFile): IFormulaFile { + return item; + } + + public getItem(uuid: string): IFormulaItem | null { + for (const item of this.items) { + if (item.uuid === uuid) { + return item; + } + } + return null; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/models/tree-list.ts b/indexer-frontend/src/app/models/tree-list.ts new file mode 100644 index 0000000000..ba3b413dd1 --- /dev/null +++ b/indexer-frontend/src/app/models/tree-list.ts @@ -0,0 +1,401 @@ +export class TreeListItem { + public readonly data: T; + public readonly parent: TreeListItem | null; + public readonly lvl: number; + public readonly children: TreeListItem[]; + public readonly path: TreeListItem[]; + + public collapsed: boolean; + public expandable: boolean; + public selected: boolean; + public hidden: boolean; + public highlighted: boolean; + public searchHighlighted: '' | 'highlighted' | 'sub' | 'hidden'; + public search: string[]; + public searchChildren: string[]; + + constructor(data: T, parent: TreeListItem | null, lvl: number) { + this.data = data; + this.parent = parent; + this.lvl = lvl; + this.children = []; + + this.collapsed = true; + this.expandable = false; + this.selected = false; + this.highlighted = false; + this.search = []; + this.searchChildren = []; + this.searchHighlighted = ''; + this.hidden = false; + + if (this.parent) { + this.path = [...this.parent.path, this]; + } else { + this.path = [this]; + } + + } + + public setChildren(children: TreeListItem[]) { + this.children.length = 0; + for (const child of children) { + this.children.push(child); + } + this.expandable = this.children.length !== 0; + } + + public select(selected: boolean) { + this.selected = selected; + } + + public collapse(collapsed: boolean) { + this.collapsed = collapsed; + } + + public collapsePath(collapsed: boolean) { + this.collapsed = collapsed; + if (this.parent) { + this.parent.collapsePath(collapsed); + } + } + + public highlight(highlighted: boolean) { + this.highlighted = highlighted; + } + + private ifHidden(): boolean { + if (this.collapsed) { + return true; + } + if (this.parent) { + return this.parent.ifHidden(); + } else { + return false; + } + } + + public updateHidden() { + if (this.parent) { + this.hidden = this.parent.ifHidden(); + } else { + this.hidden = false; + } + } + + public setSearchRules(f: (item: T) => string[]) { + this.searchHighlighted = ''; + this.search = f(this.data); + this.searchChildren = this.search.map((s) => s + '|'); + for (const child of this.children) { + for (let i = 0; i < this.searchChildren.length; i++) { + this.searchChildren[i] = this.searchChildren[i] + child.searchChildren[i] + '|'; + } + } + } +} + +export class TreeListData { + public readonly list: TreeListItem[]; + + private _items: TreeListItem[]; + + public get items(): TreeListItem[] { + return this._items; + } + + constructor(list: TreeListItem[]) { + this._items = []; + this.list = list; + this.updateHidden(); + } + + public select(item: TreeListItem, selected: boolean) { + item.select(selected) + } + + public collapse(item: TreeListItem | null, collapsed: boolean) { + if (item) { + item.collapse(collapsed) + } + } + + public collapseAll(collapsed: boolean) { + for (const e of this.list) { + e.collapse(collapsed); + } + } + + public collapsePath(item: TreeListItem | null, collapsed: boolean) { + if (item) { + item.collapsePath(collapsed); + } + } + + public highlight(item: TreeListItem | null, highlighted: boolean) { + if (item) { + item.highlight(highlighted) + } + } + + public highlightAll(highlighted: boolean) { + for (const e of this.list) { + e.highlight(highlighted); + } + } + + public findOne(f: (item: T) => boolean): TreeListItem | null { + for (const item of this.list) { + if (f(item.data)) { + return item; + } + } + return null; + } + + public find(f: (item: T) => boolean): TreeListItem[] { + const result: TreeListItem[] = []; + for (const item of this.list) { + if (f(item.data)) { + result.push(item); + } + } + return result; + } + + public updateHidden() { + const list = this.list; + for (const item of list) { + item.updateHidden(); + } + this._items = list.filter((i) => !i.hidden); + } + + public setSearchRules(f: (item: T) => string[]) { + for (let index = this.list.length - 1; index > -1; index--) { + const item = this.list[index]; + item.setSearchRules(f); + } + } + + public searchItems(text: string, ruleIndex: number): void { + if (text) { + for (const item of this.list) { + if (item.search[ruleIndex].includes(text)) { + item.searchHighlighted = 'highlighted'; + } else { + if (item.searchChildren[ruleIndex].includes(text)) { + item.searchHighlighted = 'sub'; + item.collapsed = false; + } else { + item.searchHighlighted = 'hidden'; + } + } + } + } else { + for (const item of this.list) { + item.searchHighlighted = ''; + } + } + } + + public static fromObject( + root: any, + field: string, + f?: (item: TreeListItem) => TreeListItem + ): TreeListData { + const list: TreeListItem[] = []; + const getItem = ( + data: any, + key: string, + parent: TreeListItem | null, + lvl: number + ): TreeListItem[] => { + const children: TreeListItem[] = [] + const arrayObjects: any[] = data[key]; + if (Array.isArray(arrayObjects)) { + for (const data of arrayObjects) { + let newItem = new TreeListItem(data, parent, lvl); + if (f) { + newItem = f(newItem); + } + list.push(newItem); + children.push(newItem); + const child = getItem(data, field, newItem, lvl + 1); + newItem.setChildren(child); + } + } + return children; + } + getItem(root, field, null, 0) + return new TreeListData(list); + } +} + +export class TreeListView { + private readonly _data: TreeListData; + private readonly _indexes: Set; + + private _selectedFields: TreeListItem[] = []; + private _selectedCount = 0; + private _selectedAllCount = 0; + private _selectedLimit = 0; + private _views: TreeListView[]; + private _search: string; + private _searchHighlighted: boolean; + + public get data(): TreeListData { + return this._data; + } + + public get selectedFields(): TreeListItem[] { + return this._selectedFields; + } + + public get selectedCount(): number { + return this._selectedCount; + } + + public get selectedAllCount(): number { + return this._selectedAllCount; + } + + public get items(): TreeListItem[] { + return this._data.items; + } + + public get search(): string { + return this._search; + } + + public get searchHighlighted(): boolean { + return this._searchHighlighted; + } + + constructor(data: TreeListData, indexes?: number[]) { + this._data = data; + this._views = []; + this._search = ''; + this._searchHighlighted = false; + if (indexes) { + this._indexes = new Set(indexes); + } else { + this._indexes = new Set(); + for (let index = 0; index < data.list.length; index++) { + this._indexes.add(index); + } + } + this.updateHidden(); + this.updateSelected(); + } + + public setSelectedLimit(limit: number) { + this._selectedLimit = limit + } + + public select(item: TreeListItem, selected: boolean) { + this._data.select(item, selected); + } + + public collapse(item: TreeListItem | null, collapsed: boolean) { + this._data.collapse(item, collapsed); + } + + public collapseAll(collapsed: boolean) { + this._data.collapseAll(collapsed); + } + + public collapsePath(item: TreeListItem | null, collapsed: boolean) { + this._data.collapsePath(item, collapsed); + } + + public highlight(item: TreeListItem | null, highlighted: boolean) { + this._data.highlight(item, highlighted); + } + + public highlightAll(highlighted: boolean) { + this._data.highlightAll(highlighted); + } + + public findOne(f: (item: T) => boolean): TreeListItem | null { + return this._data.findOne(f); + } + + public find(f: (item: T) => boolean): TreeListItem[] { + return this._data.find(f); + } + + public setSearchRules(f: (item: T) => string[]) { + this._data.setSearchRules(f); + } + + public updateSearch() { + this._search = ''; + for (const index of this._indexes) { + const item = this._data.list[index]; + if (item) { + this._search = this._search + item.search[0] + '|'; + } + } + } + + public searchItems(text: string, ruleIndex: number): void { + const value = (text || '').trim().toLocaleLowerCase(); + this._data.searchItems(value, ruleIndex); + } + + public searchView(text: string): void { + const value = (text || '').trim().toLocaleLowerCase(); + this._searchHighlighted = false; + if (value && this._search.includes(value)) { + this._searchHighlighted = true; + } + } + + public updateHidden() { + this._data.updateHidden(); + } + + public updateSelected() { + const list = this._data.list; + this._selectedAllCount = list.filter((item) => item.selected).length; + this._selectedFields = list.filter((item, index) => item.selected && this._indexes.has(index)); + this._selectedCount = this._selectedFields.length; + if (this._selectedLimit) { + this._selectedFields = this._selectedFields.slice(0, this._selectedLimit); + } + for (const view of this._views) { + view.updateSelected(); + } + } + + public getSelected(): TreeListItem[] { + return this._data.list.filter((item) => item.selected); + } + + public createView(f: (item: TreeListItem) => boolean): TreeListView { + const indexes: number[] = []; + + for (let i = 0; i < this._data.list.length; i++) { + const item = this._data.list[i]; + if (f(item)) { + indexes.push(i); + } + } + const view = new TreeListView(this._data, indexes); + this._views.push(view); + return view; + } + + public static createView(data: TreeListData, f: (item: TreeListItem) => boolean): TreeListView { + const indexes: number[] = []; + + for (let i = 0; i < data.list.length; i++) { + const item = data.list[i]; + if (f(item)) { + indexes.push(i); + } + } + return new TreeListView(data, indexes); + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/services/entities.service.ts b/indexer-frontend/src/app/services/entities.service.ts index 06b1b9c72c..7aca1e42d8 100644 --- a/indexer-frontend/src/app/services/entities.service.ts +++ b/indexer-frontend/src/app/services/entities.service.ts @@ -40,6 +40,9 @@ import { StatisticDetails, Label, LabelDetails, + Formula, + FormulaDetails, + FormulaRelationships, } from '@indexer/interfaces'; /** @@ -68,6 +71,13 @@ export class EntitiesService { `${this.url}/${entity}/${messageId}` ) as any; } + + public getRegistryRelationships(messageId: string): Observable { + const entity = 'registries'; + return this.http.get( + `${this.url}/${entity}/${messageId}/relationships` + ) as any; + } //#endregion //#region REGISTRY USERS public getRegistryUsers( @@ -107,6 +117,13 @@ export class EntitiesService { `${this.url}/${entity}/${messageId}` ) as any; } + + public getPolicyRelationships(messageId: string): Observable { + const entity = 'policies'; + return this.http.get( + `${this.url}/${entity}/${messageId}/relationships` + ) as any; + } //#endregion //#region MODULES public getModules(filters: PageFilters): Observable> { @@ -379,6 +396,31 @@ export class EntitiesService { //#endregion //#endregion + //#region FORMULAS + public getFormulas(filters: PageFilters): Observable> { + const entity = 'formulas'; + const options = ApiUtils.getOptions(filters); + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; + } + + public getFormula(messageId: string): Observable { + const entity = 'formulas'; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; + } + + public getFormulaRelationships(messageId: string): Observable { + const entity = 'formulas'; + return this.http.get( + `${this.url}/${entity}/${messageId}/relationships` + ) as any; + } + //#endregion + public updateFiles(messageId: string): Observable { return this.http.post(`${this.url}/update-files`, { messageId diff --git a/indexer-frontend/src/app/services/landing.service.ts b/indexer-frontend/src/app/services/landing.service.ts index edb8b51687..444c254c4d 100644 --- a/indexer-frontend/src/app/services/landing.service.ts +++ b/indexer-frontend/src/app/services/landing.service.ts @@ -1,14 +1,22 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { API_BASE_URL } from './api'; -import { LandingAnalytics, ProjectCoordinates } from '@indexer/interfaces'; -import { Observable } from 'rxjs'; +import { DataLoadingProgress, LandingAnalytics, ProjectCoordinates } from '@indexer/interfaces'; +import { interval, Observable, startWith, Subject, Subscription, switchMap } from 'rxjs'; @Injectable() export class LandingService { private readonly url: string = `${API_BASE_URL}/landing`; - constructor(private http: HttpClient) {} + private dataLoadingProgressSubscription: Subscription | null = null; + private dataLoadingProgressSubject = new Subject(); + public dataLoadingProgress$ = this.dataLoadingProgressSubject.asObservable(); + + constructor(private http: HttpClient) { } + + public ngOnDestroy(): void { + this.stopPollingDataLoadingProgress(); + } public getAnalytics(): Observable { return this.http.get(`${this.url}/analytics`); @@ -19,4 +27,23 @@ export class LandingService { `${this.url}/projects-coordinates` ); } + + public startPollingDataLoadingProgress() { + this.dataLoadingProgressSubscription = interval(30000).pipe(startWith(0), switchMap(() => this.getDataLoadingProgress())).subscribe(data => { + this.dataLoadingProgressSubject.next(data); + }) + } + + public stopPollingDataLoadingProgress() { + if (this.dataLoadingProgressSubscription) { + this.dataLoadingProgressSubscription.unsubscribe(); + this.dataLoadingProgressSubscription = null; + } + } + + public getDataLoadingProgress(): Observable { + return this.http.get( + `${this.url}/data-loading-progress` + ); + } } diff --git a/indexer-frontend/src/app/services/settings.service.ts b/indexer-frontend/src/app/services/settings.service.ts new file mode 100644 index 0000000000..939f56cda9 --- /dev/null +++ b/indexer-frontend/src/app/services/settings.service.ts @@ -0,0 +1,67 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { BehaviorSubject, Observable } from 'rxjs'; +import { filter, shareReplay } from 'rxjs/operators'; +import { API_BASE_URL } from './api'; +import { NetworkExplorerSettings } from '@indexer/interfaces'; + +/** + * Services for working from user profile. + */ +@Injectable() +export class SettingsService { + private readonly url: string = `${API_BASE_URL}/settings`; + + private hederaNetSubject = new BehaviorSubject(''); + private hederaNet = this.hederaNetSubject + .asObservable() + .pipe(filter((res) => !!res)); + + private hederaNetExplorerSettingsSubject = new BehaviorSubject(null); + private hederaNetExplorerSettings = this.hederaNetExplorerSettingsSubject + .asObservable() + .pipe(filter((res) => !!res)); + + constructor(private http: HttpClient) { + this.getRemoteHederaNet().subscribe((res) => { + this.hederaNetSubject.next(res); + }); + this.getRemoteHederaNetExplorer().subscribe((res) => { + this.hederaNetExplorerSettingsSubject.next(res); + }); + } + + public updateSettings(settings: any): Observable { + return this.http.post(`${this.url}`, settings); + } + + public getSettings(): Observable { + return this.http.get(`${this.url}`); + } + + public getHederaNet(): Observable { + return this.hederaNet; + } + + public getHederaNetExplorer(): Observable { + return this.hederaNetExplorerSettings; + } + + private getRemoteHederaNet(): Observable { + return this.http.get(`${this.url}/network`, { + responseType: 'text', + }); + } + + private getRemoteHederaNetExplorer(): Observable { + return this.http.get(`${this.url}/networkExplorer`, { + responseType: 'json', + }); + } + + public getAbout(): Observable { + return this.http.get(`${this.url}/about`).pipe( + shareReplay(1) + ); + } +} diff --git a/indexer-frontend/src/app/themes/guardian/accordion.scss b/indexer-frontend/src/app/themes/guardian/accordion.scss new file mode 100644 index 0000000000..cd6c68cee8 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/accordion.scss @@ -0,0 +1,46 @@ +.guardian-accordion { + .p-accordion-header-link { + background: transparent; + position: relative; + font-family: var(--font-family-inter); + font-size: 16px; + font-weight: 600; + line-height: 20px; + text-align: left; + color: var(--guardian-font-color, #23252E); + outline: none; + box-shadow: none; + + &[aria-expanded="false"] { + .p-accordion-toggle-icon { + transform: rotate(90deg); + } + } + + &[aria-expanded="true"] { + .p-accordion-toggle-icon { + transform: rotate(180deg); + } + } + + .p-accordion-toggle-icon { + position: absolute; + right: 10px; + } + } + + .p-accordion p-accordiontab:first-child .p-accordion-header .p-accordion-header-link { + border-top-right-radius: 8px; + border-top-left-radius: 8px; + } + + .p-accordion p-accordiontab:last-child .p-accordion-header:not(.p-highlight) .p-accordion-header-link { + border-bottom-right-radius: 8px; + border-bottom-left-radius: 8px; + } + + .p-accordion p-accordiontab:last-child .p-accordion-content { + border-bottom-right-radius: 8px; + border-bottom-left-radius: 8px; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/button.scss b/indexer-frontend/src/app/themes/guardian/button.scss new file mode 100644 index 0000000000..43f90903ab --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/button.scss @@ -0,0 +1,116 @@ +.guardian-button { + display: flex; + border-radius: 6px; + font-family: var(--guardian-font-family); + transition: all 0.25s ease-in-out; + white-space: nowrap; + user-select: none; + justify-content: center; + align-items: center; + margin: 0; + display: inline-flex; + overflow: hidden; + position: relative; + box-sizing: border-box; + cursor: pointer; + border: 1px solid transparent; + text-overflow: ellipsis; + outline: none !important; + + &:hover { + filter: brightness(0.95); + } + + &-primary { + color: var(--guardian-secondary-color); + background-color: var(--guardian-primary-color); + border: 1px solid var(--guardian-primary-color); + } + + &-secondary { + color: var(--guardian-primary-color); + background-color: var(--guardian-secondary-color); + border: 1px solid var(--guardian-primary-color); + } + + &-delete { + color: var(--guardian-delete-color); + background-color: var(--guardian-secondary-color); + border: 1px solid var(--guardian-delete-color); + } + + &-success { + color: var(--guardian-success-color); + background-color: var(--guardian-success-background); + border: 1px solid var(--guardian-success-color); + } + + .guardian-button-icon { + width: auto; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + pointer-events: none; + } + + .guardian-button-icon+.guardian-button-label { + padding-left: 8px; + pointer-events: none; + } + + .guardian-button-label+.guardian-button-icon { + margin-right: 8px; + pointer-events: none; + } +} + +button.guardian-button[disabled], +div.guardian-button[disabled="true"] { + cursor: default !important; + + color: var(--guardian-disabled-color) !important; + background-color: var(--guardian-disabled-background) !important; + border: 1px solid var(--guardian-disabled-color) !important; + filter: none !important; +} + +.guardian-icon-button { + display: flex; + border-radius: 4px; + transition: all 0.25s ease-in-out; + white-space: nowrap; + user-select: none; + justify-content: center; + align-items: center; + margin: 0; + display: inline-flex; + overflow: hidden; + position: relative; + box-sizing: border-box; + cursor: pointer; + border: none; + background-color: transparent; + + &:hover { + background-color: var(--guardian-primary-background); + } + + &.big:hover { + box-shadow: 0px 0px 0px 6px var(--guardian-primary-background); + } + + &-secondary { + background-color: var(--guardian-secondary-color); + border: 1px solid var(--guardian-primary-color); + } +} + +button.guardian-icon-button[disabled], +div.guardian-icon-button[disabled="true"] { + cursor: default !important; + background-color: transparent !important; + box-shadow: none !important; + filter: none !important; + pointer-events: none; +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/checkbox.scss b/indexer-frontend/src/app/themes/guardian/checkbox.scss new file mode 100644 index 0000000000..4362f27d6e --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/checkbox.scss @@ -0,0 +1,114 @@ +.guardian-checkbox { + .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box.p-focus { + outline: 0 none; + outline-offset: 0; + box-shadow: none; + border-color: var(--guardian-primary-color, #4169E2); + } + + .p-checkbox { + .p-checkbox-box { + border: 2px solid var(--guardian-primary-color, #4169E2); + border-radius: 2px; + + &.p-highlight { + border-color: var(--guardian-primary-color, #4169E2); + background: var(--guardian-primary-color, #4169E2); + } + } + } + + .p-checkbox .p-checkbox-box:not(.p-disabled):not(.p-highlight):hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + &.checkbox-24 { + .p-checkbox { + width: 24px; + height: 24px; + line-height: 24px; + padding: 4px; + + .p-checkbox-box { + width: 16px; + height: 16px; + + .p-checkbox-icon { + font-size: 10px; + } + } + } + } +} + +.guardian-radio-button { + .p-disabled, .p-component:disabled { + opacity: 1; + filter: grayscale(1); + } + + .p-radiobutton:not(.p-radiobutton-disabled) .p-radiobutton-box.p-focus { + outline: 0 none; + outline-offset: 0; + box-shadow: none; + border-color: var(--guardian-primary-color, #4169E2); + } + + .p-radiobutton .p-radiobutton-box:not(.p-disabled):not(.p-highlight):hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + .p-radiobutton { + .p-radiobutton-box { + border-color: var(--guardian-primary-color, #4169E2); + background: #ffffff; + + .p-radiobutton-icon { + background: var(--guardian-primary-color, #4169E2); + box-shadow: 0px 0px 0px 2px #ffffff; + } + + &.p-highlight { + background: var(--guardian-primary-color, #4169E2); + } + } + } + + &.radio-button-24 { + .p-radiobutton { + width: 24px; + height: 24px; + line-height: 24px; + padding: 4px; + + .p-radiobutton-box { + width: 16px; + height: 16px; + + .p-radiobutton-icon { + width: 8px; + height: 8px; + } + } + } + } + + &.radio-button-32 { + .p-radiobutton { + width: 32px; + height: 32px; + line-height: 32px; + padding: 4px; + + .p-radiobutton-box { + width: 16px; + height: 16px; + + .p-radiobutton-icon { + width: 8px; + height: 8px; + } + } + } + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/collapse.scss b/indexer-frontend/src/app/themes/guardian/collapse.scss new file mode 100644 index 0000000000..8308c77f7f --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/collapse.scss @@ -0,0 +1,44 @@ +.guardian-collapse { + position: relative; + cursor: pointer; + + &::before { + content: ""; + display: block; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + border: 6px solid var(--guardian-primary-color, #4169E2); + width: 0px; + height: 0px; + pointer-events: none; + } + + &[collapsed="true"] { + &::before { + border-top-color: transparent; + border-right-color: transparent; + border-bottom-color: transparent; + border-right-width: 0; + } + } + + &[collapsed="false"] { + &::before { + border-left-color: transparent; + border-right-color: transparent; + border-bottom-color: transparent; + border-bottom-width: 0; + } + } + + &.collapse-24 { + width: 24px; + height: 24px; + + &::before { + border-width: 6; + } + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/datepicker.scss b/indexer-frontend/src/app/themes/guardian/datepicker.scss new file mode 100644 index 0000000000..75d66da50d --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/datepicker.scss @@ -0,0 +1,41 @@ +.guardian-datepicker { + + .p-calendar { + width: 100%; + + .p-datepicker { + width: auto; + min-width: auto; + } + + .p-inputtext { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + } + + .p-datepicker-trigger { + background: #fff; + color: #727374; + border-color: var(--guardian-grey-color-2, #E1E7EF); + border-left: none; + border-radius: 6px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + + &:hover { + background: #fff; + color: #727374; + border-color: var(--guardian-primary-color, #4169E2); + box-shadow: -1px 0px 0px 0px var(--guardian-primary-color, #4169E2); + } + } + + .p-inputtext:enabled:focus+.p-datepicker-trigger { + border-color: var(--guardian-primary-color, #4169E2); + } +} + +.p-datepicker:not(.p-datepicker-inline) { + min-width: 200px !important; +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/dialog.scss b/indexer-frontend/src/app/themes/guardian/dialog.scss new file mode 100644 index 0000000000..d4fb19334a --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/dialog.scss @@ -0,0 +1,127 @@ +.guardian-dialog { + border-radius: 16px; + + .p-dialog-content { + border-top-left-radius: 16px !important; + border-top-right-radius: 16px !important; + border-bottom-left-radius: 16px !important; + border-bottom-right-radius: 16px !important; + padding: 0 32px 32px 32px !important; + } + + .p-dialog-title { + font-family: var(--guardian-font-family); + font-size: 24px; + font-style: normal; + font-weight: 600; + } + + .p-dialog { + box-shadow: none; + } + + .p-dialog-header { + border-top-left-radius: 16px !important; + border-top-right-radius: 16px !important; + } + + .dialog-header { + height: 88px; + display: flex; + width: 100%; + position: relative; + padding: 32px 0 24px 0; + color: var(--guardian-header-color); + + .header-container { + width: 100%; + position: relative; + flex: 1; + display: flex; + flex-direction: row; + + .header-text { + font-family: var(--guardian-font-family); + font-size: var(--guardian-header-5-font-size); + font-style: var(--guardian-font-style); + font-weight: 600; + line-height: 32px; + height: 32px; + } + } + + .header-icon { + width: 32px; + min-width: 32px; + max-width: 32px; + position: relative; + flex: 32px; + padding: 4px; + border-radius: 100%; + cursor: pointer; + color: var(--guardian-close-color); + background-color: var(--guardian-secondary-color); + + &:hover { + filter: brightness(0.95); + } + } + } + + .dialog-body { + overflow-y: auto; + } + + .dialog-footer { + border-top: 1px solid var(--guardian-border-color); + padding-top: 20px; + + .action-buttons { + display: flex; + justify-content: flex-end; + } + + .dialog-button { + margin-left: 15px; + margin-right: 0px; + + button { + min-width: 100px; + height: 40px; + font-size: var(--guardian-primary-font-size); + font-weight: 500; + } + } + } +} + +@media (max-width: 810px) { + .guardian-dialog { + width: 100vw !important; + height: 100vh !important; + min-width: 100vw !important; + min-height: 100vh !important; + max-width: 100vw !important; + max-height: 100vh !important; + border-top-left-radius: 0px !important; + border-top-right-radius: 0px !important; + border-bottom-left-radius: 0px !important; + border-bottom-right-radius: 0px !important; + overflow: hidden; + + .p-dialog-content { + border-top-left-radius: 0px !important; + border-top-right-radius: 0px !important; + border-bottom-left-radius: 0px !important; + border-bottom-right-radius: 0px !important; + padding: 0 24px 24px 24px !important; + overflow: hidden; + } + + .dialog-body { + min-height: calc(100vh - 175px) !important; + height: calc(100vh - 175px) !important; + max-height: calc(100vh - 175px) !important; + } + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/dropdown.scss b/indexer-frontend/src/app/themes/guardian/dropdown.scss new file mode 100644 index 0000000000..0a0a9ecd6a --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/dropdown.scss @@ -0,0 +1,163 @@ +.guardian-dropdown { + height: 40px; + + .p-dropdown { + background: #ffffff; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + border-radius: 8px; + outline: 0 none; + height: 40px; + width: 100%; + + &:not(.p-disabled):hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + &:not(.p-disabled).p-focus { + box-shadow: none; + border-color: var(--guardian-primary-color, #4169E2); + } + + .p-dropdown-label { + padding: 8px 16px; + } + + .p-dropdown-trigger { + .p-dropdown-trigger-icon { + font-size: 12px; + color: var(--guardian-font-color, #23252E); + } + } + + .p-inputtext { + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 400; + padding: 0px 16px; + color: #000; + // display: flex; + // justify-content: center; + margin: auto 0; + } + } + + &.full-size { + width: 100%; + height: 100%; + + .p-dropdown { + width: 100%; + height: 100%; + } + } + + &.vertical-align { + display: block; + position: relative; + top: 1px; + line-height: normal; + @include vertical-align(middle); + } + + .guardian-dropdown-selected { + text-overflow: ellipsis; + display: block; + white-space: nowrap; + overflow: hidden; + + .guardian-dropdown-label { + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 400; + line-height: 16px; + text-align: left; + color: #848FA9; + padding-right: 8px; + } + + .guardian-dropdown-item { + font-family: var(--font-family-inter); + font-size: 14px; + line-height: 16px; + text-align: left; + } + } + + .guardian-dropdown-item {} + + &.guardian-dropdown-cell { + width: 100%; + + .p-dropdown { + border: none !important; + } + } +} + +.guardian-dropdown-panel { + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + border-radius: 8px; + + .p-dropdown-item { + height: 40px; + padding: 12px 16px !important; + font-family: var(--font-family-inter); + font-size: 14px; + line-height: 16px; + text-align: left; + } + + .p-dropdown-item.p-highlight { + position: relative; + background: none !important; + + &::before { + content: ""; + display: block; + position: absolute; + background: var(--guardian-primary-color, #4169E2); + opacity: 0.16; + left: 0; + top: 0; + right: 0; + bottom: 0; + pointer-events: none; + } + } + + .p-dropdown-item:not(.p-highlight):not(.p-disabled):hover { + position: relative; + background: none !important; + + &::before { + content: ""; + display: block; + position: absolute; + background: var(--guardian-primary-color, #4169E2); + opacity: 0.08; + left: 0; + top: 0; + right: 0; + bottom: 0; + pointer-events: none; + } + } + + .p-dropdown-item:not(.p-highlight):not(.p-disabled).p-focus { + position: relative; + background: none !important; + + &::before { + content: ""; + display: block; + position: absolute; + background: var(--guardian-primary-color, #4169E2); + opacity: 0.08; + left: 0; + top: 0; + right: 0; + bottom: 0; + pointer-events: none; + } + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/formula.scss b/indexer-frontend/src/app/themes/guardian/formula.scss new file mode 100644 index 0000000000..5718f6d6b5 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/formula.scss @@ -0,0 +1,80 @@ +.guardian-formula-codemirror { + background: #ffffff; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + border-radius: 8px; + outline: 0 none; + height: 40px; + overflow: hidden; + cursor: text; + padding: 0px 12px; + width: 100%; + + ngx-codemirror { + width: 100%; + + &::ng-deep { + .CodeMirror { + width: 100%; + height: 38px !important; + } + + .CodeMirror-sizer { + height: 38px; + } + + .CodeMirror-lines { + height: 38px; + padding: 8px 0px; + } + + .CodeMirror-cursor { + height: 20px !important; + } + + .CodeMirror-gutters { + display: none; + } + + .cm-number { + color: #15ab3f; + font-weight: 600; + } + + .cm-formula-variable { + color: #4267df; + font-weight: 600; + } + + .cm-formula-operation { + color: #8100b3; + font-weight: 600; + } + + .cm-formula-function { + color: #FF9800; + font-weight: 600; + } + + .CodeMirror pre.CodeMirror-placeholder { + color: #848FA9; + } + + .cm-string { + color: #a11; + } + } + } +} + +.guardian-formula-text { + color: #a11 !important; +} + +.guardian-formula-number { + color: #00A12D !important; + font-weight: 600; +} + +.CodeMirror-hints { + z-index: 1200; +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/grid.scss b/indexer-frontend/src/app/themes/guardian/grid.scss new file mode 100644 index 0000000000..019578961e --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/grid.scss @@ -0,0 +1,397 @@ +$sizes: ( + 44: 44px, + 56: 56px, + 64: 64px, + 80: 80px, + 90: 90px, + 100: 100px, + 110: 110px, + 120: 120px, + 125: 125px, + 130: 130px, + 135: 135px, + 140: 140px, + 150: 150px, + 160: 160px, + 170: 170px, + 180: 180px, + 190: 190px, + 200: 200px, + 210: 210px, + 220: 220px, + 250: 250px +); + +.dialog-grid-container { + display: flex; + flex-direction: column; + width: 100%; + overflow: auto; + + .col-text { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .col-button { + padding: 0px 6px !important; + } + + .col-auto { + width: 100%; + } + + @each $name, $size in $sizes { + .col-#{$name} { + width: $size; + min-width: $size; + max-width: $size; + } + } + + .dialog-grid-header { + display: flex; + flex-direction: row; + width: 100%; + height: 46px; + min-height: 46px; + max-height: 46px; + padding: 0px 12px; + color: var(--guardian-grid-color); + + &>div { + font-size: var(--guardian-small-font-size); + text-transform: uppercase; + padding: 12px 8px; + } + } + + .dialog-grid-body { + display: flex; + flex-direction: column; + width: 100%; + border: 1px solid var(--guardian-border-color); + border-radius: 6px; + + &.vertical-border { + .dialog-grid-row { + &>div { + border-right: 1px solid var(--guardian-border-color); + + &:last-child { + border-right: none; + } + } + } + } + + .dialog-grid-row { + display: flex; + flex-direction: row; + width: 100%; + border-bottom: 1px solid var(--guardian-border-color); + cursor: default; + padding: 0px 12px; + font-size: var(--guardian-primary-font-size); + color: var(--guardian-font-color); + + &.row-52 { + height: 52px; + min-height: 52px; + max-height: 52px; + } + + + &.row-64 { + height: 64px; + min-height: 64px; + max-height: 64px; + } + + &>div { + padding: 0px 10px; + display: flex; + align-items: center; + position: relative; + + .cell-focus { + display: none; + position: absolute; + top: 0px; + left: 0px; + right: 0px; + bottom: 0px; + border: 1px solid var(--guardian-primary-color, #4169E2); + } + + .p-inputwrapper-focus+.cell-focus, + .guardian-input:focus+.cell-focus { + display: block; + } + + &:first-child { + .cell-focus { + left: -12px; + } + } + } + + &:first-child>div:first-child .cell-focus { + border-top-left-radius: 6px; + } + + &:last-child>div:first-child .cell-focus { + border-bottom-left-radius: 6px; + } + + &[expand="true"] { + border-bottom-color: transparent; + + .expand-icon { + transform: rotate(90deg); + } + } + + &:last-child { + border-bottom: none; + } + } + + .dialog-grid-expand-row { + width: 100%; + border-bottom: 1px solid var(--guardian-border-color); + padding: 0px 12px; + display: none; + + &[expand="true"] { + display: flex; + } + } + } + + .dialog-grid-empty { + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 400; + color: #848FA9; + height: 100px; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + } +} + +.guardian-grid-paginator { + .table-paginator { + display: flex; + align-items: center; + justify-content: flex-end; + column-gap: 24px; + padding: 0 16px 0 0; + color: var(--color-grey-black-2, #23252e); + font-family: var(--font-family-inter); + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 16px; + height: 64px !important; + border-radius: 0px !important; + border-bottom-left-radius: 8px !important; + border-bottom-right-radius: 8px !important; + background: #fff; + box-shadow: none !important; + position: relative; + + .p-dropdown { + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + border-radius: 8px; + outline: 0 none; + } + + .p-dropdown:not(.p-disabled):hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + .p-dropdown:not(.p-disabled).p-focus { + box-shadow: none; + border-color: var(--guardian-primary-color, #4169E2); + } + + .svg-btn:hover { + box-shadow: 0px 0px 0px 1px var(--guardian-primary-color, #4169E2); + } + } +} + +.guardian-grid-container { + position: relative; + + &::before { + content: ""; + display: block; + position: absolute; + left: -1px; + right: -1px; + top: 47px; + bottom: -1px; + pointer-events: none; + border: 1px solid var(--guardian-shadow, #00000014); + border-radius: 8px; + box-shadow: 0px 4px 8px 0px var(--guardian-shadow, #00000014); + z-index: 2; + } + + .p-datatable-thead { + background: transparent !important; + background-color: transparent !important; + } + + .guardian-grid-header { + height: 46px; + + th { + font-family: var(--font-family-inter); + font-size: 12px; + font-weight: 400; + line-height: 15px; + text-align: left; + color: var(--guardian-grid-color, #848FA9); + text-transform: uppercase; + padding: 16px; + border: none; + background: transparent; + background-color: transparent; + position: relative; + + &:first-child { + padding-left: 24px; + + .text-truncate { + left: 24px; + } + } + + &:last-child { + padding-left: 24px; + } + } + + .text-truncate { + position: absolute; + left: 16px; + top: 50%; + right: 16px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + transform: translate(0px, -50%); + } + } + + .guardian-grid-row { + height: 64px; + + td { + padding: 16px; + border-bottom: 1px solid #e9ecef; + position: relative; + + &:first-child { + padding-left: 24px; + + .text-truncate { + left: 24px; + } + } + + &:last-child { + padding-right: 24px; + } + } + + &:first-child { + border-top-left-radius: 8px; + border-top-right-radius: 8px; + } + + .text-truncate { + position: absolute; + left: 16px; + top: 50%; + right: 16px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + transform: translate(0px, -50%); + } + } + + // .p-datatable-tbody { + // border: 1px solid #e9ecef; + // border-radius: 6px; + // } + + @each $name, $size in $sizes { + .col-#{$name} { + width: $size; + min-width: $size; + max-width: $size; + } + } + + @each $name, $size in $sizes { + .col-min-#{$name} { + min-width: $size; + } + } + + .col-auto { + width: auto; + } + + &.grid-scroll { + &::before { + z-index: 1; + border-top: none; + border-top-right-radius: 0px; + } + + &::after { + content: ""; + display: block; + position: absolute; + left: -1px; + right: 9px; + top: 45px; + bottom: 0px; + pointer-events: none; + border-top: 1px solid #ebebeb; + border-radius: 8px; + z-index: 1; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; + border-top-right-radius: 0px; + } + + .p-datatable-tbody { + border-radius: 8px; + } + + .p-datatable-wrapper { + padding-right: 2px; + } + + .p-datatable-thead { + background: #fff !important; + background-color: #fff !important; + } + } + + .p-frozen-column { + position: sticky !important; + background: #fff !important; + background-color: #fff !important; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/helpers.scss b/indexer-frontend/src/app/themes/guardian/helpers.scss new file mode 100644 index 0000000000..96404a52be --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/helpers.scss @@ -0,0 +1,17 @@ +@mixin vertical-align($align: middle) { + &:before { + content: ""; + display: inline-block; + height: 100%; + vertical-align: $align; + // you can add font-size 0 here and restore in the children to prevent + // the inline-block white-space to mess the width of your elements + font-size: 0; + } + + &>* { + vertical-align: $align; + // although you need to know the font-size, because "inherit" is 0 + font-size: 14px; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/icon.scss b/indexer-frontend/src/app/themes/guardian/icon.scss new file mode 100644 index 0000000000..e1155e7491 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/icon.scss @@ -0,0 +1,66 @@ +.icon-color { + &-primary { + fill: var(--guardian-primary-color); + color: var(--guardian-primary-color); + } + + &-secondary { + fill: var(--guardian-secondary-color); + color: var(--guardian-secondary-color); + } + + &-disabled { + fill: var(--guardian-disabled-icon); + color: var(--guardian-disabled-icon); + } + + &-delete { + fill: var(--guardian-delete-color); + color: var(--guardian-delete-color); + } + + &-success { + fill: var(--guardian-success-color); + color: var(--guardian-success-color); + } + + &-failure { + fill: var(--guardian-failure-color); + color: var(--guardian-failure-color); + } + + &-warning { + fill: var(--guardian-warning-color); + color: var(--guardian-warning-color); + } + + &-close { + fill: var(--guardian-close-color); + color: var(--guardian-close-color); + } + + &-font { + fill: var(--guardian-font-color); + color: var(--guardian-font-color); + } + + &-constant { + fill: var(--formula-constant-color); + color: var(--formula-constant-color); + } + + &-variable { + fill: var(--formula-variable-color); + color: var(--formula-variable-color); + } + + &-function { + fill: var(--formula-function-color); + color: var(--formula-function-color); + } + + &-text { + fill: var(--formula-text-color); + color: var(--formula-text-color); + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/index.scss b/indexer-frontend/src/app/themes/guardian/index.scss new file mode 100644 index 0000000000..45987dd44f --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/index.scss @@ -0,0 +1,27 @@ +::ng-deep body { + @import 'variables.scss'; + @import 'helpers.scss'; + @import 'icon.scss'; + @import 'button.scss'; + @import 'grid.scss'; + @import 'dialog.scss'; + @import 'progress.scss'; + @import 'label.scss'; + @import 'page.scss'; + @import 'input.scss'; + @import 'dropdown.scss'; + @import 'tabs.scss'; + @import 'checkbox.scss'; + @import 'collapse.scss'; + @import 'separator.scss'; + @import 'multi-select.scss'; + @import 'scroll.scss'; + @import 'menu.scss'; + @import 'formula.scss'; + @import 'datepicker.scss'; + @import 'textarea.scss'; + @import 'select-button.scss'; + @import 'accordion.scss'; + @import 'tree.scss'; + @import 'menu-button.scss'; +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/input.scss b/indexer-frontend/src/app/themes/guardian/input.scss new file mode 100644 index 0000000000..d3f60f2c28 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/input.scss @@ -0,0 +1,93 @@ +.guardian-input-container { + display: flex; + flex-direction: column; + height: 60px; + width: 100%; + + label { + font-family: var(--font-family-inter); + font-size: 12px; + font-weight: 500; + line-height: 14px; + text-align: left; + margin-bottom: 6px; + } + + input { + height: 40px; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 400; + color: #000; + padding: 8px 16px; + + &:enabled:hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + &:enabled:focus { + border-color: var(--guardian-primary-color, #4169E2); + box-shadow: none; + } + } + + .p-dropdown { + width: 100%; + } +} + +.guardian-input { + width: 100%; + height: 40px; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + padding: 8px 8px; + box-shadow: none; + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 400; + color: #000; + + &:enabled:hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + &:enabled:focus { + border-color: var(--guardian-primary-color, #4169E2); + box-shadow: none; + } + + &.guardian-input-cell { + width: 100%; + border: none !important; + padding: 8px 0px; + height: 100%; + } +} + +.guardian-search { + display: flex; + flex-direction: column; + height: 40px; + width: 100%; + + input { + height: 40px; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + + &:enabled:hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + &:enabled:focus { + border-color: var(--guardian-primary-color, #4169E2); + box-shadow: none; + } + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/label.scss b/indexer-frontend/src/app/themes/guardian/label.scss new file mode 100644 index 0000000000..19ee41dce7 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/label.scss @@ -0,0 +1,36 @@ +.guardian-label { + display: flex; + border-radius: 6px; + font-family: var(--guardian-font-family); + transition: all 0.25s ease-in-out; + white-space: nowrap; + user-select: none; + justify-content: center; + align-items: center; + margin: 0; + display: inline-flex; + overflow: hidden; + position: relative; + box-sizing: border-box; + text-overflow: ellipsis; + + &-primary { + color: var(--guardian-secondary-color); + background-color: var(--guardian-primary-color); + } + + &-secondary { + color: var(--guardian-primary-color); + background-color: var(--guardian-primary-background); + } + + &-delete { + color: var(--guardian-delete-color); + background-color: var(--guardian-delete-background); + } + + &-disabled { + color: var(--guardian-disabled-color); + background-color: var(--guardian-disabled-color); + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/menu-button.scss b/indexer-frontend/src/app/themes/guardian/menu-button.scss new file mode 100644 index 0000000000..a4bbfe9a0b --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/menu-button.scss @@ -0,0 +1,148 @@ +.guardian-menu-container { + width: 100%; + height: 70px; + min-height: 70px; + overflow: hidden; + background: #fff; + border-bottom: 1px solid #E1E7EF; + display: flex; + flex-direction: row; + padding-left: 12px; +} + +.guardian-menu-label, +.guardian-menu-button { + width: 70px; + height: 70px; + min-width: 70px; + min-height: 70px; + overflow: hidden; + display: flex; + flex-direction: column; + cursor: pointer; + justify-content: center; + align-items: center; + position: relative; + + &>* { + pointer-events: none; + } + + &.guardian-menu-select { + width: 86px; + min-width: 86px; + padding-right: 16px; + + .guardian-menu-select-icon { + position: absolute; + top: 0; + bottom: 0; + right: 0; + width: 16px; + background: #e1e6fa; + + &::before { + content: ""; + display: block; + position: absolute; + width: 5px; + height: 5px; + left: 4px; + top: 28px; + border-left: 2px solid var(--primary-primary, #4169E2); + border-bottom: 2px solid var(--primary-primary, #4169E2); + pointer-events: none; + transform: rotate(-45deg); + } + } + } + + &:hover { + background: #f0f3fc; + + .guardian-menu-select-icon { + background: #dde3f6; + } + } + + &[open="true"] { + background: #e1e7fa !important; + + .guardian-menu-select-icon { + background: #c4d0f3 !important; + } + } + + div { + font-family: var(--font-family-inter); + font-size: 12px; + font-weight: 500; + line-height: 24px; + color: var(--guardian-primary-color); + } + + svg-icon svg { + fill: var(--guardian-primary-color); + color: var(--guardian-primary-color); + } + + &[disabled="true"] { + pointer-events: none; + + div { + color: var(--guardian-disabled-icon); + } + + svg-icon svg { + fill: var(--guardian-disabled-icon); + color: var(--guardian-disabled-icon); + } + } + + &.success-color { + div { + color: var(--guardian-success-color); + } + + svg-icon svg { + fill: var(--guardian-success-color); + color: var(--guardian-success-color); + } + } +} + +.guardian-menu-label { + pointer-events: none; +} + +.guardian-menu-separator { + width: 5px; + height: 70px; + position: relative; + + &::before { + content: ""; + display: block; + position: absolute; + left: 2px; + top: 0; + bottom: 0; + width: 3px; + border-left: 1px solid #E1E7EF; + pointer-events: none; + } + + &.guardian-menu-separator-last { + &::before { + left: 0px; + } + } +} + +.guardian-menu-popup { + width: 70px; + + .p-menuitem-content { + background: #fff !important; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/menu.scss b/indexer-frontend/src/app/themes/guardian/menu.scss new file mode 100644 index 0000000000..a6db5b3405 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/menu.scss @@ -0,0 +1,15 @@ +.guardian-menu { + margin-top: 6px; + + &.p-overlaypanel:after { + display: none; + } + + &.p-overlaypanel::before { + display: none; + } + + .p-overlaypanel-content { + padding: 0px; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/multi-select.scss b/indexer-frontend/src/app/themes/guardian/multi-select.scss new file mode 100644 index 0000000000..50feb61800 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/multi-select.scss @@ -0,0 +1,162 @@ +.guardian-multiselect { + height: 40px; + + .p-multiselect { + background: #ffffff; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + border-radius: 8px; + outline: 0 none; + height: 40px; + width: 100%; + + &:not(.p-disabled):hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + &:not(.p-disabled).p-focus { + box-shadow: none; + border-color: var(--guardian-primary-color, #4169E2); + } + + .p-multiselect-label { + padding: 8px 16px; + } + + .p-multiselect-trigger { + .p-multiselect-trigger-icon { + font-size: 12px; + color: var(--guardian-font-color, #23252E); + } + } + + .p-inputtext { + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 400; + padding: 0px 16px; + display: flex; + color: #000; + align-items: center; + } + } + + &.full-size { + width: 100%; + height: 100%; + + .p-multiselect { + width: 100%; + height: 100%; + } + } + + .guardian-multiselect-selected { + text-overflow: ellipsis; + display: block; + white-space: nowrap; + overflow: hidden; + + .guardian-multiselect-label { + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 400; + line-height: 16px; + text-align: left; + color: #848FA9; + padding-right: 8px; + } + + .guardian-multiselect-item { + font-family: var(--font-family-inter); + font-size: 14px; + line-height: 16px; + text-align: left; + } + } + + .guardian-multiselect-item {} + + &.guardian-multiselect-cell { + width: 100%; + + .p-multiselect { + border: none !important; + } + } +} + +.guardian-multiselect-panel { + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + border-radius: 8px; + + .p-inputtext:enabled:focus { + outline: 0 none; + outline-offset: 0; + box-shadow: none; + border-color: var(--guardian-primary-color, #4169E2); + } + + .p-multiselect-item { + padding: 12px 16px !important; + font-family: var(--font-family-inter); + font-size: 14px; + line-height: 16px; + text-align: left; + } + + .p-multiselect-items .p-multiselect-item:focus { + outline: 0 none; + outline-offset: 0; + box-shadow: none; + } + + .p-multiselect-item.p-highlight { + position: relative; + background: none !important; + + &::before { + content: ""; + display: block; + position: absolute; + background: var(--guardian-primary-color, #4169E2); + opacity: 0.16; + left: 0; + top: 0; + right: 0; + bottom: 0; + pointer-events: none; + } + } + + .p-multiselect-item:not(.p-highlight):not(.p-disabled):hover { + position: relative; + background: none !important; + + &::before { + content: ""; + display: block; + position: absolute; + background: var(--guardian-primary-color, #4169E2); + opacity: 0.08; + left: 0; + top: 0; + right: 0; + bottom: 0; + pointer-events: none; + } + } + + .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box.p-highlight:hover { + border-color: var(--guardian-primary-color, #4169E2); + background: var(--guardian-primary-color, #4169E2); + color: #ffffff; + } + .p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box:hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + .p-checkbox .p-checkbox-box.p-highlight { + border-color: var(--guardian-primary-color, #4169E2); + background: var(--guardian-primary-color, #4169E2); + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/page.scss b/indexer-frontend/src/app/themes/guardian/page.scss new file mode 100644 index 0000000000..a29fd48d19 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/page.scss @@ -0,0 +1,130 @@ +.guardian-page { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + position: relative; + padding: 56px 48px 48px 48px; + + .guardian-user-not-registered { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + font-size: 20px; + color: darkgrey; + z-index: 2; + } + + .guardian-user-not-data { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + color: var(--color-grey-black-2); + font-family: var(--font-family-inter); + font-size: 20px; + font-style: normal; + font-weight: 400; + line-height: 16px; + display: flex; + flex-direction: column; + align-items: center; + row-gap: 8px; + justify-content: center; + + &__text { + color: var(--color-grey-5, #848fa9); + text-align: center; + font-family: var(--font-family-inter); + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; + } + + &__text-strong { + color: var(--color-grey-5, #848fa9); + text-align: center; + font-family: var(--font-family-inter); + font-size: 16px; + font-style: normal; + font-weight: 600; + line-height: normal; + } + } + + .guardian-user-back-button { + height: 40px; + width: 170px; + + button { + height: 40px; + width: 100%; + padding-right: 16px; + font-size: 14px; + font-weight: 500; + } + } + + .guardian-user-page-header { + font-size: 32px; + font-weight: 600; + color: var(--guardian-header-color, #000); + height: 72px; + padding: 32px 0px 18px 0px; + position: relative; + } + + .guardian-user-page-toolbar { + height: 56px; + width: 100%; + display: flex; + flex-direction: row; + padding: 0px 0px 16px 0px; + justify-content: flex-end; + + button { + height: 40px; + padding: 0px 16px; + } + + .guardian-user-page-filters { + width: 100%; + display: flex; + flex-direction: row; + justify-content: flex-start; + } + + .guardian-user-page-buttons { + width: 100%; + display: flex; + flex-direction: row; + justify-content: flex-end; + + button { + margin-left: 12px; + } + } + } + + .guardian-user-page-grid { + height: 100%; + width: 100%; + position: relative; + } +} + +.guardian-user-back-button { + height: 40px; + min-width: 170px; + width: min-content; + + button { + height: 40px; + width: 100%; + padding-right: 18px; + font-size: 14px; + font-weight: 500; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/progress.scss b/indexer-frontend/src/app/themes/guardian/progress.scss new file mode 100644 index 0000000000..f8f410da7e --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/progress.scss @@ -0,0 +1,128 @@ +.guardian-loading { + background: var(--guardian-secondary-background); + position: absolute; + z-index: 99; + top: 0; + left: 0; + bottom: 0; + right: 0; + display: flex; + align-items: center; + justify-items: center; + justify-content: center; + align-content: center; + + .guardian-loading-image { + width: 56px; + height: 56px; + border-top: 3px solid var(--guardian-primary-color); + border-left: 3px solid transparent; + border-right: 3px solid transparent; + border-bottom: 3px solid transparent; + border-radius: 100%; + filter: brightness(100%); + animation-name: guardian-loading-animation; + animation-duration: 7.5s; + animation-iteration-count: infinite; + animation-timing-function: ease-in-out; + } + + @keyframes guardian-loading-animation { + 0% { + transform: rotate(0deg); + opacity: 1; + } + + 25% { + transform: rotate(360deg); + border-top: 3px solid transparent; + border-right: 3px solid var(--guardian-primary-color); + border-left: 3px solid transparent; + border-bottom: 3px solid transparent; + } + + 50% { + transform: rotate(720deg); + border-top: 3px solid transparent; + border-left: 3px solid transparent; + border-bottom: 3px solid var(--guardian-primary-color); + border-right: 3px solid transparent; + } + + 75% { + transform: rotate(1080deg); + border-top: 3px solid transparent; + border-bottom: 3px solid transparent; + border-right: 3px solid transparent; + border-left: 3px solid var(--guardian-primary-color); + } + + 100% { + transform: rotate(1440deg); + border-top: 3px solid var(--guardian-primary-color); + border-left: 3px solid transparent; + border-right: 3px solid transparent; + border-bottom: 3px solid transparent; + } + } +} + +.progress-bar { + background-color: var(--guardian-disabled-background); + border-radius: 8px; + margin: 1px; + overflow: hidden; + position: relative; + + .progress-bar-value { + background-color: var(--guardian-primary-color); + font-size: 12px; + font-style: normal; + display: flex; + justify-content: center; + height: inherit; + overflow: hidden; + width: 0%; + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; + transition: width 1s ease-in-out; + + &::before { + content: ""; + background: linear-gradient(135deg, + transparent 25%, + rgba(255, 255, 255, 0.5) 50%, + rgba(255, 255, 255, 0.5) 50%, + transparent 75%); + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + transform: translate(-100%, 0px); + animation-duration: 1.5s; + animation-fill-mode: forwards; + animation-iteration-count: infinite; + animation-name: progress-bar-animation; + animation-timing-function: linear; + } + } + + &.static-bar { + .progress-bar-value { + &::before { + display: none; + } + } + } + + @keyframes progress-bar-animation { + 0% { + transform: translate(-100%, 0px); + } + + 100% { + transform: translate(100%, 0px); + } + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/scroll.scss b/indexer-frontend/src/app/themes/guardian/scroll.scss new file mode 100644 index 0000000000..928b5e4f26 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/scroll.scss @@ -0,0 +1,48 @@ +* { + -webkit-overflow-scrolling: auto; +} + +*::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +*::-webkit-scrollbar-track { + /*margin: 54px 0 53px;*/ +} + +*::-webkit-scrollbar-thumb { + background: rgba(0, 0, 0, 0.3); + border-radius: 10px; + box-shadow: rgba(255, 255, 255, 0.3) 0 0 0 1px; +} + +*:hover::-webkit-scrollbar-thumb { + background: rgba(0, 0, 0, 0.45); +} + +*::-webkit-scrollbar-thumb:hover { + background: rgba(0, 0, 0, 0.55); +} + +@-moz-document url-prefix() { + * { + /* Firefox 63 compatibility */ + scrollbar-face-color: rgba(0, 0, 0, 0.3); + /* Firefox 63 compatibility */ + scrollbar-track-color: transparent; + scrollbar-color: rgba(0, 0, 0, 0.3) transparent !important; + scrollbar-width: thin !important; + } +} + +@supports (-moz-appearance:none) { + * { + /* Firefox 63 compatibility */ + scrollbar-face-color: rgba(0, 0, 0, 0.3); + /* Firefox 63 compatibility */ + scrollbar-track-color: transparent; + scrollbar-color: rgba(0, 0, 0, 0.3) transparent !important; + scrollbar-width: thin !important; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/select-button.scss b/indexer-frontend/src/app/themes/guardian/select-button.scss new file mode 100644 index 0000000000..fb5f9a2559 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/select-button.scss @@ -0,0 +1,75 @@ +.guardian-select-button { + height: 40px; + width: auto; + + .p-selectbutton { + height: 40px; + width: auto; + + .p-button:first-child { + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; + } + + .p-button:last-child { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; + } + + .p-button { + outline: none; + box-shadow: none; + border-radius: 0px; + color: var(--guardian-primary-color); + background: var(--guardian-secondary-color); + border-color: var(--guardian-primary-color); + + &:hover { + color: var(--guardian-primary-color); + background: var(--guardian-secondary-color); + border-color: var(--guardian-primary-color); + filter: brightness(0.95); + } + + svg-icon svg { + fill: var(--guardian-primary-color); + color: var(--guardian-primary-color); + } + } + + .p-button.p-highlight { + color: var(--guardian-secondary-color); + background: var(--guardian-primary-color); + border-color: var(--guardian-primary-color); + + &:hover { + color: var(--guardian-secondary-color); + background: var(--guardian-primary-color); + border-color: var(--guardian-primary-color); + filter: brightness(0.95); + } + + svg-icon svg { + fill: var(--guardian-secondary-color); + color: var(--guardian-secondary-color); + } + } + } + + .guardian-select-button-item { + display: flex; + height: 22px; + align-items: center; + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 400; + line-height: 30px; + text-align: left; + pointer-events: none; + + svg-icon { + height: 18px; + width: 26px; + } + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/separator.scss b/indexer-frontend/src/app/themes/guardian/separator.scss new file mode 100644 index 0000000000..0741a38e56 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/separator.scss @@ -0,0 +1,159 @@ +.guardian-stepper { + width: 100%; + height: 100%; + display: flex; + user-select: none; + + &.horizontal-stepper { + flex-direction: row; + + .guardian-step-separator { + width: 90px; + height: 100%; + position: relative; + + &::before { + content: ""; + display: block; + position: absolute; + border-top: 2px solid var(--guardian-grey-color-3, #AAB7C4); + left: 24px; + right: 24px; + top: calc(50% - 1px); + height: 3px; + } + } + + .guardian-step { + height: 34px; + min-height: 34px; + } + } + + &.vertical-stepper { + flex-direction: column; + + .guardian-step-separator { + width: 100%; + height: 24px; + min-height: 24px; + position: relative; + + &::before { + content: ""; + display: block; + position: absolute; + border-left: 2px solid var(--guardian-grey-color-3, #AAB7C4); + left: 19px; + top: 0px; + bottom: 0px; + width: 2px; + } + } + + .guardian-step { + height: 56px; + min-height: 56px; + } + } + + .guardian-step { + position: relative; + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: center; + cursor: pointer; + margin: 3px 0px; + border-radius: 8px; + padding: 8px; + white-space: nowrap; + cursor: pointer; + + .guardian-step-icon { + width: 24px; + height: 24px; + display: flex; + justify-content: center; + align-items: center; + + svg-icon svg { + fill: var(--guardian-grey-color-3, #AAB7C4); + color: var(--guardian-grey-color-3, #AAB7C4); + } + } + + .guardian-step-marker { + width: 24px; + height: 24px; + border: 1px solid var(--guardian-grey-color-3, #AAB7C4); + background: var(--guardian-grey-color, #EFF3F7); + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + + svg-icon svg { + fill: var(--guardian-grey-color-3, #AAB7C4); + color: var(--guardian-grey-color-3, #AAB7C4); + } + } + + .guardian-step-template { + width: 24px; + height: 24px; + border: 1px solid var(--guardian-grey-color-3, #AAB7C4); + background: var(--guardian-grey-color, #EFF3F7); + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + } + + .guardian-step-name { + height: 24px; + padding: 2px 8px; + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 500; + text-align: left; + color: var(--guardian-grey-color-3, #AAB7C4); + } + + &:hover { + background: #f0f3fc; + } + + &[highlighted="true"] { + background: #f0f3fc; + } + + &[action="true"] { + .guardian-step-icon { + svg-icon svg { + fill: var(--guardian-primary-color); + color: var(--guardian-primary-color); + } + } + + .guardian-step-marker { + background: var(--guardian-primary-color, #4169E2); + border: 1px solid var(--guardian-primary-color, #4169E2); + + svg-icon svg { + fill: var(--guardian-secondary-color, #FFFFFF); + color: var(--guardian-secondary-color, #FFFFFF); + } + } + + .guardian-step-template { + background: var(--guardian-primary-color, #4169E2); + border: 1px solid var(--guardian-primary-color, #4169E2); + } + + .guardian-step-name { + color: var(--guardian-primary-color, #4169E2); + } + } + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/tabs.scss b/indexer-frontend/src/app/themes/guardian/tabs.scss new file mode 100644 index 0000000000..e5146b36cd --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/tabs.scss @@ -0,0 +1,47 @@ +.guardian-tabs { + .p-tabview { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + position: relative; + } + + .p-tabview-panels { + width: 100%; + height: 100%; + position: relative; + } + + .p-tabview-panel { + width: 100%; + height: 100%; + position: relative; + } + + .p-tabview-nav-content { + font-size: 14px; + } + + .p-tabview .p-tabview-nav li .p-tabview-nav-link { + padding: 12px 16px; + } + + .p-tabview .p-tabview-nav li .p-tabview-nav-link:not(.p-disabled):focus { + box-shadow: none; + } + + .p-tabview .p-tabview-nav li.p-highlight .p-tabview-nav-link { + background: #ffffff; + border-color: var(--guardian-primary-color, #4169E2); + color: var(--guardian-primary-color, #4169E2); + } + + .p-tabview .p-tabview-panels { + padding: 0px; + } + + .p-tabview .p-tabview-nav { + border-color: #E1E7EF; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/textarea.scss b/indexer-frontend/src/app/themes/guardian/textarea.scss new file mode 100644 index 0000000000..d69c9d53b0 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/textarea.scss @@ -0,0 +1,35 @@ +.guardian-textarea-container { + display: flex; + flex-direction: column; + width: 100%; + + label { + font-family: var(--font-family-inter); + font-size: 12px; + font-weight: 500; + line-height: 14px; + text-align: left; + margin-bottom: 6px; + } + + textarea { + width: 100%; + border-radius: 8px; + outline: none; + border: 1px solid var(--guardian-grey-color-2, #E1E7EF); + font-family: var(--font-family-inter); + font-size: 14px; + font-weight: 400; + color: #000; + padding: 8px 16px; + + &:enabled:hover { + border-color: var(--guardian-primary-color, #4169E2); + } + + &:enabled:focus { + border-color: var(--guardian-primary-color, #4169E2); + box-shadow: none; + } + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/tree.scss b/indexer-frontend/src/app/themes/guardian/tree.scss new file mode 100644 index 0000000000..ecf337272a --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/tree.scss @@ -0,0 +1,11 @@ +.guardian-tree { + .p-tree { + border: none; + background: none; + padding: 0; + } + + .p-tree-container { + width: fit-content; + } +} \ No newline at end of file diff --git a/indexer-frontend/src/app/themes/guardian/variables.scss b/indexer-frontend/src/app/themes/guardian/variables.scss new file mode 100644 index 0000000000..e51b16dae2 --- /dev/null +++ b/indexer-frontend/src/app/themes/guardian/variables.scss @@ -0,0 +1,63 @@ +& { + --guardian-font-family: var(--font-family-inter); + --guardian-font-style: normal; + --guardian-header-color: #000; + --guardian-font-color: #23252E; + + --guardian-background: #FFFFFF; + --guardian-hover: #F0F3FC; + + --guardian-primary-color: var(--color-primary, #4169E2); + --guardian-primary-background: #e1e7fa; + + --guardian-secondary-color: #FFFFFF; + --guardian-secondary-background: #FFFFFF; + + --guardian-success-color: #19BE47; + --guardian-success-background: #CAFDD9; + + --guardian-failure-color: #FF432A; + --guardian-failure-background: #FFEAEA; + + --guardian-warning-color: #DA9B22; + + --guardian-disabled-color: #848FA9; + --guardian-disabled-background: #EFF3F7; + --guardian-disabled-icon: #C4D0E1; + + --guardian-dry-run-color: #4169E2; + --guardian-dry-run-background: #f5f7fd; + + --guardian-grey-color: #EFF3F7; + --guardian-grey-background: #F9FAFC; + --guardian-grey-color-2: #E1E7EF; + --guardian-grey-color-3: #AAB7C4; + + --guardian-delete-color: #FF432A; + --guardian-delete-background: #FFEAEA; + + --guardian-grid-color: #848FA9; + --guardian-border-color: #E1E7EF; + + --guardian-close-color: #848FA9; + --guardian-shadow: #00000014; + + --guardian-small-font-size: 12px; + --guardian-primary-font-size: 14px; + --guardian-header-1-font-size: 16px; + --guardian-header-2-font-size: 18px; + --guardian-header-3-font-size: 20px; + --guardian-header-4-font-size: 22px; + --guardian-header-5-font-size: 24px; + + --guardian-entity-color: #DA9B22; + + --formula-constant-color: #4169E2; + --formula-constant-background: #e1e7fa; + --formula-variable-color: #DA9B22; + --formula-variable-background: #FFF6E3; + --formula-function-color: #E50299; + --formula-function-background: #fbd9ef; + --formula-text-color: #19BE47; + --formula-text-background: #d7f5e2 +} \ No newline at end of file diff --git a/indexer-frontend/src/app/views/collections/base-grid/base-grid.component.ts b/indexer-frontend/src/app/views/collections/base-grid/base-grid.component.ts index 4db73fa9c2..fa51e7d079 100644 --- a/indexer-frontend/src/app/views/collections/base-grid/base-grid.component.ts +++ b/indexer-frontend/src/app/views/collections/base-grid/base-grid.component.ts @@ -149,7 +149,6 @@ export abstract class BaseGridComponent { public updateRequest(): void { const filters = this.getFilters(); - console.log(filters); this.router.navigate([], { relativeTo: this.route, queryParams: filters, diff --git a/indexer-frontend/src/app/views/collections/contracts/contracts.component.ts b/indexer-frontend/src/app/views/collections/contracts/contracts.component.ts index 3ed585491d..0b66364e65 100644 --- a/indexer-frontend/src/app/views/collections/contracts/contracts.component.ts +++ b/indexer-frontend/src/app/views/collections/contracts/contracts.component.ts @@ -20,6 +20,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'contracts', @@ -53,11 +54,25 @@ import { InputTextModule } from 'primeng/inputtext'; export class ContractsComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/did-documents/did-documents.component.ts b/indexer-frontend/src/app/views/collections/did-documents/did-documents.component.ts index 6766a07a3e..26f06e9565 100644 --- a/indexer-frontend/src/app/views/collections/did-documents/did-documents.component.ts +++ b/indexer-frontend/src/app/views/collections/did-documents/did-documents.component.ts @@ -20,6 +20,7 @@ import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; import { ChipsModule } from 'primeng/chips'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'did-documents', @@ -53,11 +54,25 @@ import { ChipsModule } from 'primeng/chips'; export class DidDocumentsComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/formulas/formulas.component.html b/indexer-frontend/src/app/views/collections/formulas/formulas.component.html new file mode 100644 index 0000000000..4bbf0316d2 --- /dev/null +++ b/indexer-frontend/src/app/views/collections/formulas/formulas.component.html @@ -0,0 +1,26 @@ +
+
+

{{ 'header.formulas' | transloco }}

+
+ +
+ +
+ @for (filter of filters; track $index) { + @if (filter.type === 'input') { + + {{ filter.label | transloco }} + + + } + } +
+
+
+
+
+ +
diff --git a/indexer-frontend/src/app/views/collections/formulas/formulas.component.scss b/indexer-frontend/src/app/views/collections/formulas/formulas.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/indexer-frontend/src/app/views/collections/formulas/formulas.component.ts b/indexer-frontend/src/app/views/collections/formulas/formulas.component.ts new file mode 100644 index 0000000000..adc54abf02 --- /dev/null +++ b/indexer-frontend/src/app/views/collections/formulas/formulas.component.ts @@ -0,0 +1,147 @@ +import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ActivatedRoute, Router } from '@angular/router'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatSortModule } from '@angular/material/sort'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatTableModule } from '@angular/material/table'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatSelectModule } from '@angular/material/select'; +import { MatInputModule } from '@angular/material/input'; +import { MatButtonModule } from '@angular/material/button'; +import { LoadingComponent } from '@components/loading/loading.component'; +import { BaseGridComponent, Filter } from '../base-grid/base-grid.component'; +import { TranslocoModule } from '@jsverse/transloco'; +import { EntitiesService } from '@services/entities.service'; +import { FiltersService } from '@services/filters.service'; +import { PaginatorModule } from 'primeng/paginator'; +import { ChipsModule } from 'primeng/chips'; +import { ColumnType, TableComponent } from '@components/table/table.component'; +import { InputGroupModule } from 'primeng/inputgroup'; +import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; +import { InputTextModule } from 'primeng/inputtext'; + +@Component({ + selector: 'formulas', + templateUrl: './formulas.component.html', + styleUrls: [ + '../base-grid/base-grid.component.scss', + './formulas.component.scss', + ], + standalone: true, + imports: [ + CommonModule, + MatPaginatorModule, + MatTableModule, + MatSortModule, + MatFormFieldModule, + MatSelectModule, + MatInputModule, + FormsModule, + MatButtonModule, + LoadingComponent, + TranslocoModule, + TableComponent, + PaginatorModule, + ChipsModule, + ReactiveFormsModule, + InputTextModule, + InputGroupModule, + InputGroupAddonModule, + ], +}) +export class FormulasComponent extends BaseGridComponent { + columns: any[] = [ + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.consensus_timestamp', + width: '250px', + sort: true, + }, + { + type: ColumnType.TEXT, + field: 'topicId', + title: 'grid.topic_id', + width: '150px', + link: { + field: 'topicId', + url: '/topics', + }, + }, + { + type: ColumnType.TEXT, + field: 'options.owner', + title: 'grid.owner', + width: '650px', + }, + { + type: ColumnType.TEXT, + field: 'options.name', + title: 'grid.name', + width: '200px', + }, + { + type: ColumnType.BUTTON, + title: 'grid.open', + btn_label: 'grid.open', + width: '100px', + callback: this.onOpen.bind(this), + }, + ]; + + constructor( + private entitiesService: EntitiesService, + private filtersService: FiltersService, + route: ActivatedRoute, + router: Router + ) { + super(route, router); + this.filters.push( + new Filter({ + type: 'input', + field: 'topicId', + label: 'grid.topic_id', + }) + ); + this.filters.push( + new Filter({ + type: 'input', + field: 'options.owner', + label: 'grid.owner', + }) + ); + } + + protected loadData(): void { + const filters = this.getFilters(); + this.loadingData = true; + this.entitiesService.getFormulas(filters).subscribe({ + next: (result) => { + this.setResult(result); + setTimeout(() => { + this.loadingData = false; + }, 500); + }, + error: ({ message }) => { + this.loadingData = false; + console.error(message); + }, + }); + } + + protected loadFilters(): void { + this.loadingFilters = true; + this.filtersService.getVcFilters().subscribe({ + next: (result) => { + setTimeout(() => { + this.loadingFilters = false; + }, 500); + }, + error: ({ message }) => { + this.loadingFilters = false; + console.error(message); + }, + }); + } +} diff --git a/indexer-frontend/src/app/views/collections/label-documents/label-documents.component.ts b/indexer-frontend/src/app/views/collections/label-documents/label-documents.component.ts index 387d0ac52a..a99e70780d 100644 --- a/indexer-frontend/src/app/views/collections/label-documents/label-documents.component.ts +++ b/indexer-frontend/src/app/views/collections/label-documents/label-documents.component.ts @@ -19,6 +19,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { ChipsModule } from 'primeng/chips'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'label-documents', @@ -51,11 +52,25 @@ import { ChipsModule } from 'primeng/chips'; export class LabelDocumentsComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', - sort: true + sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/labels/labels.component.ts b/indexer-frontend/src/app/views/collections/labels/labels.component.ts index 8a2029b9df..7177761722 100644 --- a/indexer-frontend/src/app/views/collections/labels/labels.component.ts +++ b/indexer-frontend/src/app/views/collections/labels/labels.component.ts @@ -20,6 +20,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'labels', @@ -53,11 +54,25 @@ import { InputTextModule } from 'primeng/inputtext'; export class LabelsComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/modules/modules.component.ts b/indexer-frontend/src/app/views/collections/modules/modules.component.ts index 2adb3751e8..9af4ead45c 100644 --- a/indexer-frontend/src/app/views/collections/modules/modules.component.ts +++ b/indexer-frontend/src/app/views/collections/modules/modules.component.ts @@ -20,6 +20,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'modules', @@ -53,11 +54,25 @@ import { InputTextModule } from 'primeng/inputtext'; export class ModulesComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/nfts/nfts.component.ts b/indexer-frontend/src/app/views/collections/nfts/nfts.component.ts index 427a8a2d56..8084dfb3ed 100644 --- a/indexer-frontend/src/app/views/collections/nfts/nfts.component.ts +++ b/indexer-frontend/src/app/views/collections/nfts/nfts.component.ts @@ -68,6 +68,29 @@ export class NFTsComponent extends BaseGridComponent { title: 'grid.serial_number', width: '250px', }, + { + type: ColumnType.TEXT, + field: 'analytics.policyId', + title: 'grid.policy', + width: '250px', + link: { + field: 'analytics.policyId', + url: '/policies' + } + }, + { + type: ColumnType.TEXT, + field: 'analytics.sr', + title: 'grid.sr', + width: '250px', + link: { + field: 'analytics.sr', + url: '/registries', + filters: { + 'options.did': 'analytics.sr' + } + } + }, { type: ColumnType.TEXT, field: 'metadata', diff --git a/indexer-frontend/src/app/views/collections/policies/policies.component.ts b/indexer-frontend/src/app/views/collections/policies/policies.component.ts index 9408f3d3d5..4b1352c2dc 100644 --- a/indexer-frontend/src/app/views/collections/policies/policies.component.ts +++ b/indexer-frontend/src/app/views/collections/policies/policies.component.ts @@ -20,6 +20,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'policies', @@ -53,11 +54,25 @@ import { InputTextModule } from 'primeng/inputtext'; export class PoliciesComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/registries/registries.component.ts b/indexer-frontend/src/app/views/collections/registries/registries.component.ts index ef33386c4d..6687ec3602 100644 --- a/indexer-frontend/src/app/views/collections/registries/registries.component.ts +++ b/indexer-frontend/src/app/views/collections/registries/registries.component.ts @@ -20,6 +20,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'registries', @@ -53,11 +54,25 @@ import { InputTextModule } from 'primeng/inputtext'; export class RegistriesComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', - width: '225px', + width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, @@ -70,10 +85,17 @@ export class RegistriesComponent extends BaseGridComponent { }, }, { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'owner', title: 'grid.account_id', width: '150px', + hederaType: HederaType.ACCOUNT, + }, + { + type: ColumnType.TEXT, + field: 'options.attributes.OrganizationName', + title: 'grid.name', + width: '150px', }, { type: ColumnType.TEXT, @@ -123,6 +145,11 @@ export class RegistriesComponent extends BaseGridComponent { label: 'grid.did', type: 'input', field: 'options.did', + }), + new Filter({ + label: 'grid.name', + type: 'input', + field: 'options.attributes.OrganizationName', }) ); } diff --git a/indexer-frontend/src/app/views/collections/registry-users/registry-users.component.ts b/indexer-frontend/src/app/views/collections/registry-users/registry-users.component.ts index 0cf8bbfa44..fe978d1700 100644 --- a/indexer-frontend/src/app/views/collections/registry-users/registry-users.component.ts +++ b/indexer-frontend/src/app/views/collections/registry-users/registry-users.component.ts @@ -20,6 +20,7 @@ import { InputTextModule } from 'primeng/inputtext'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { ColumnType, TableComponent } from '@components/table/table.component'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'registry-users', @@ -53,11 +54,25 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; export class RegistryUsersComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', - width: '225px', + width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, @@ -70,10 +85,11 @@ export class RegistryUsersComponent extends BaseGridComponent { }, }, { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'owner', title: 'grid.account_id', width: '150px', + hederaType: HederaType.ACCOUNT, }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/roles/roles.component.ts b/indexer-frontend/src/app/views/collections/roles/roles.component.ts index 36eca188e7..37ff2ce110 100644 --- a/indexer-frontend/src/app/views/collections/roles/roles.component.ts +++ b/indexer-frontend/src/app/views/collections/roles/roles.component.ts @@ -20,6 +20,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'roles', @@ -53,11 +54,25 @@ import { InputTextModule } from 'primeng/inputtext'; export class RolesComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, @@ -87,6 +102,12 @@ export class RolesComponent extends BaseGridComponent { title: 'grid.issuer', width: '650px', }, + { + type: ColumnType.TEXT, + field: 'analytics.sr', + title: 'grid.sr', + width: '250px', + }, { type: ColumnType.BUTTON, title: 'grid.open', @@ -109,6 +130,16 @@ export class RolesComponent extends BaseGridComponent { type: 'input', field: 'topicId', }), + new Filter({ + type: 'input', + field: 'options.role', + label: 'grid.role', + }), + new Filter({ + type: 'input', + field: 'analytics.sr', + label: 'grid.sr', + }), new Filter({ type: 'input', field: 'options.issuer', @@ -118,7 +149,7 @@ export class RolesComponent extends BaseGridComponent { type: 'input', field: 'analytics.policyId', label: 'grid.filter.policy_id', - }) + }), ); } diff --git a/indexer-frontend/src/app/views/collections/schemas/schemas.component.ts b/indexer-frontend/src/app/views/collections/schemas/schemas.component.ts index 1dd76b2951..5b443c4b1b 100644 --- a/indexer-frontend/src/app/views/collections/schemas/schemas.component.ts +++ b/indexer-frontend/src/app/views/collections/schemas/schemas.component.ts @@ -20,6 +20,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'schemas', @@ -53,11 +54,25 @@ import { InputTextModule } from 'primeng/inputtext'; export class SchemasComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/statistic-documents/statistic-documents.component.ts b/indexer-frontend/src/app/views/collections/statistic-documents/statistic-documents.component.ts index 589dcfeefa..e87a3c5b27 100644 --- a/indexer-frontend/src/app/views/collections/statistic-documents/statistic-documents.component.ts +++ b/indexer-frontend/src/app/views/collections/statistic-documents/statistic-documents.component.ts @@ -20,6 +20,7 @@ import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; import { ChipsModule } from 'primeng/chips'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'statistic-documents', @@ -53,11 +54,25 @@ import { ChipsModule } from 'primeng/chips'; export class StatisticDocumentsComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/statistics/statistics.component.html b/indexer-frontend/src/app/views/collections/statistics/statistics.component.html index 2b233ad0b9..8ea54e78e1 100644 --- a/indexer-frontend/src/app/views/collections/statistics/statistics.component.html +++ b/indexer-frontend/src/app/views/collections/statistics/statistics.component.html @@ -1,6 +1,6 @@
-

{{ 'header.statistic' | transloco }}

+

{{ 'header.statistics' | transloco }}

{ + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/tokens/tokens.component.ts b/indexer-frontend/src/app/views/collections/tokens/tokens.component.ts index d12c7510aa..49c7dc48db 100644 --- a/indexer-frontend/src/app/views/collections/tokens/tokens.component.ts +++ b/indexer-frontend/src/app/views/collections/tokens/tokens.component.ts @@ -20,6 +20,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'tokens', @@ -53,10 +54,39 @@ import { InputTextModule } from 'primeng/inputtext'; export class TokensComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'tokenId', title: 'grid.token_id', width: '250px', + hederaType: HederaType.TOKEN, + }, + { + type: ColumnType.TEXT, + field: 'createdTimestamp', + title: 'grid.createdTimestamp', + width: '250px', + sort: true, + formatValue: (value: any) => { + if (value) { + value = new Date(Math.floor(value * 1000)); + const formattedDate = value.toLocaleString(); + return formattedDate; + } + } + }, + { + type: ColumnType.TEXT, + field: 'modifiedTimestamp', + title: 'grid.modifiedTimestamp', + width: '250px', + sort: true, + formatValue: (value: any) => { + if (value) { + value = new Date(Math.floor(value * 1000)); + const formattedDate = value.toLocaleString(); + return formattedDate; + } + } }, { type: ColumnType.TEXT, @@ -77,10 +107,11 @@ export class TokensComponent extends BaseGridComponent { width: '200px', }, { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'treasury', title: 'grid.treasury', width: '200px', + hederaType: HederaType.ACCOUNT, }, { type: ColumnType.BUTTON, diff --git a/indexer-frontend/src/app/views/collections/tools/tools.component.ts b/indexer-frontend/src/app/views/collections/tools/tools.component.ts index 7647e04e39..8821296c6c 100644 --- a/indexer-frontend/src/app/views/collections/tools/tools.component.ts +++ b/indexer-frontend/src/app/views/collections/tools/tools.component.ts @@ -20,6 +20,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'tools', @@ -53,11 +54,25 @@ import { InputTextModule } from 'primeng/inputtext'; export class ToolsComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/topics/topics.component.ts b/indexer-frontend/src/app/views/collections/topics/topics.component.ts index 1344b49730..18ae7f387e 100644 --- a/indexer-frontend/src/app/views/collections/topics/topics.component.ts +++ b/indexer-frontend/src/app/views/collections/topics/topics.component.ts @@ -20,6 +20,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'topics', @@ -53,11 +54,25 @@ import { InputTextModule } from 'primeng/inputtext'; export class TopicsComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/vc-documents/vc-documents.component.ts b/indexer-frontend/src/app/views/collections/vc-documents/vc-documents.component.ts index 9140c7e253..f719e5c360 100644 --- a/indexer-frontend/src/app/views/collections/vc-documents/vc-documents.component.ts +++ b/indexer-frontend/src/app/views/collections/vc-documents/vc-documents.component.ts @@ -20,6 +20,7 @@ import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { InputTextModule } from 'primeng/inputtext'; import { ChipsModule } from 'primeng/chips'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'vc-documents', @@ -53,11 +54,25 @@ import { ChipsModule } from 'primeng/chips'; export class VcDocumentsComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/collections/vp-documents/vp-documents.component.ts b/indexer-frontend/src/app/views/collections/vp-documents/vp-documents.component.ts index 39d3d5edc8..8164b2ee6b 100644 --- a/indexer-frontend/src/app/views/collections/vp-documents/vp-documents.component.ts +++ b/indexer-frontend/src/app/views/collections/vp-documents/vp-documents.component.ts @@ -19,6 +19,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; import { ChipsModule } from 'primeng/chips'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'vp-documents', @@ -51,11 +52,25 @@ import { ChipsModule } from 'primeng/chips'; export class VpDocumentsComponent extends BaseGridComponent { columns: any[] = [ { - type: ColumnType.TEXT, + type: ColumnType.HEDERA, field: 'consensusTimestamp', title: 'grid.consensus_timestamp', width: '250px', - sort: true + sort: true, + hederaType: HederaType.TRANSACTION, + }, + { + type: ColumnType.TEXT, + field: 'consensusTimestamp', + title: 'grid.date', + width: '250px', + sort: true, + formatValue: (value: any) => { + const fixedTimestamp = Math.floor(value * 1000); + value = new Date(fixedTimestamp); + const formattedDate = value.toLocaleString(); + return formattedDate; + } }, { type: ColumnType.TEXT, diff --git a/indexer-frontend/src/app/views/details/base-details/base-details.component.ts b/indexer-frontend/src/app/views/details/base-details/base-details.component.ts index f5e74e8af7..77581fa8b7 100644 --- a/indexer-frontend/src/app/views/details/base-details/base-details.component.ts +++ b/indexer-frontend/src/app/views/details/base-details/base-details.component.ts @@ -101,6 +101,8 @@ export abstract class BaseDetailsComponent { return () => this.onOpenContracts(); case Activity.Users: return () => this.onOpenUsers(); + case Activity.Formulas: + return () => this.onOpenFormulas(); default: throw new Error(`Unknown activity: ${activity}`); } @@ -158,6 +160,11 @@ export abstract class BaseDetailsComponent { this.router.navigate(['/registry-users']); } + protected onOpenFormulas() { + this.router.navigate(['/formulas']); + } + + protected handleActivities(activity: any) { this.totalActivity = 0; this.activityItems = []; diff --git a/indexer-frontend/src/app/views/details/base-details/relationships-chart.config.ts b/indexer-frontend/src/app/views/details/base-details/relationships-chart.config.ts index fe4c38bb65..46fde5e68d 100644 --- a/indexer-frontend/src/app/views/details/base-details/relationships-chart.config.ts +++ b/indexer-frontend/src/app/views/details/base-details/relationships-chart.config.ts @@ -52,7 +52,7 @@ export function createChartConfig( links, lineStyle: { color: 'source', - curveness: 0.3, + curveness: 0.1, }, tooltip: { trigger: 'item', @@ -68,9 +68,11 @@ export function createChartData( item: any, target: any, index: number, - count: number + count: number, + columnOffsetX: number, + previousCategoryIndex: number | null, ): any { - const [x, y] = getCoordinates(item.category, index, count); + const [x, y] = getCoordinates(item.category, index, count, columnOffsetX, previousCategoryIndex); return { symbolSize: [80, 80], name: item.id, @@ -90,9 +92,29 @@ export function createChartData( }; } -function getCoordinates(categoryIndex: number, index: number, count: number) { - const x = categoryIndex * 300 + (index % 2 === 0 ? 30 : -30); - const y = index * 200 - (count / 2) * 200; +function getCoordinates(categoryIndex: number, index: number, count: number, columnOffsetX: number, previousCategoryIndex: number | null) { + let x: number; + let y: number; + if (count > 5) { + const column = Math.floor(index / 5); + const row = index % 5; + + x = categoryIndex * 100 + column * 100; + columnOffsetX = x; + + const totalRows = Math.ceil(count / 3); + const centerOffset = (totalRows - 1) * 100; + + y = row * 200 - centerOffset; + } else { + x = columnOffsetX + categoryIndex * 300; + y = index * 200 - (count / 2) * 200; + } + + if (previousCategoryIndex !== categoryIndex) + previousCategoryIndex = categoryIndex; + + x += columnOffsetX; return [x, y]; } @@ -117,15 +139,22 @@ export function createChart(result: Relationships | null = null) { ).length; categoriesIndexes[i] = 0; } + + const sortedRelationships = relationships.sort((a,b) => a.category - b.category) + + let columnOffsetX = 0; + let previousCategoryIndex: number | null = null; // tslint:disable-next-line:prefer-for-of - for (let index = 0; index < relationships.length; index++) { - const item: any = relationships[index]; + for (let index = 0; index < sortedRelationships.length; index++) { + const item: any = sortedRelationships[index]; data.push( createChartData( item, result.target, categoriesIndexes[item.category], - categoriesLength[item.category] + categoriesLength[item.category], + columnOffsetX, + previousCategoryIndex, ) ); categoriesIndexes[item.category]++; diff --git a/indexer-frontend/src/app/views/details/contract-details/contract-details.component.ts b/indexer-frontend/src/app/views/details/contract-details/contract-details.component.ts index 304507548e..6b74da380e 100644 --- a/indexer-frontend/src/app/views/details/contract-details/contract-details.component.ts +++ b/indexer-frontend/src/app/views/details/contract-details/contract-details.component.ts @@ -61,6 +61,10 @@ export class ContractDetailsComponent extends BaseDetailsComponent { { label: 'details.contract.overview.owner', path: 'owner', + link: '/contracts', + filters: { + owner: 'owner', + }, }, { label: 'details.contract.overview.type', diff --git a/indexer-frontend/src/app/views/details/formula-details/formula-details.component.html b/indexer-frontend/src/app/views/details/formula-details/formula-details.component.html new file mode 100644 index 0000000000..95516cbb06 --- /dev/null +++ b/indexer-frontend/src/app/views/details/formula-details/formula-details.component.html @@ -0,0 +1,83 @@ +
+
+
+

{{ 'details.formula.header' | transloco }} {{id}}

+
+ @if (loading || subLoading) { +
+ +
+ } @else { + @if (row) { + + @if (target) { + + + + + + @if (formulaData) { + + } + + + + @if (first._ipfs) { +
+
+
+
+ {{ 'details.cid' | transloco }}: +
+
+ {{file.cid}} +
+
+ @if (first._ipfsStatus) { +
+ +
+ } +
+ @if (!first._ipfsStatus) { +
+
+ @if (first._ipfs.length<2) { +
+ {{ 'details.document_not_loaded_header' | transloco }} +
+
+ {{ 'details.document_not_loaded_message' | transloco }} +
+ } @else { +
+ {{ 'details.documents_not_loaded_header' | transloco }} +
+
+ {{ 'details.documents_not_loaded_message' | transloco }} +
+ } + +
+
+ } +
+ } +
+ } + + +
+ +
+
+
+ } @else { +
{{ 'details.not_found' | transloco }}
+ } + } +
+
diff --git a/indexer-frontend/src/app/views/details/formula-details/formula-details.component.scss b/indexer-frontend/src/app/views/details/formula-details/formula-details.component.scss new file mode 100644 index 0000000000..b72bc30419 --- /dev/null +++ b/indexer-frontend/src/app/views/details/formula-details/formula-details.component.scss @@ -0,0 +1,3 @@ +.document-container-group textarea { + min-height: calc(100vh - 450px); +} \ No newline at end of file diff --git a/indexer-frontend/src/app/views/details/formula-details/formula-details.component.ts b/indexer-frontend/src/app/views/details/formula-details/formula-details.component.ts new file mode 100644 index 0000000000..460085dd03 --- /dev/null +++ b/indexer-frontend/src/app/views/details/formula-details/formula-details.component.ts @@ -0,0 +1,171 @@ +import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ActivatedRoute, Router } from '@angular/router'; +import { LoadingComponent } from '@components/loading/loading.component'; +import { MatTabsModule } from '@angular/material/tabs'; +import { NgxEchartsDirective } from 'ngx-echarts'; +import { MatInputModule } from '@angular/material/input'; +import { BaseDetailsComponent } from '../base-details/base-details.component'; +import { TranslocoModule } from '@jsverse/transloco'; +import { EntitiesService } from '@services/entities.service'; +import { TabViewModule } from 'primeng/tabview'; +import { ProgressSpinnerModule } from 'primeng/progressspinner'; +import { ButtonModule } from 'primeng/button'; +import { + OverviewFormComponent, + OverviewFormField, +} from '@components/overview-form/overview-form.component'; +import { ActivityComponent } from '@components/activity/activity.component'; +import { InputTextareaModule } from 'primeng/inputtextarea'; +import { OrganizationChartModule } from 'primeng/organizationchart'; +import CID from 'cids'; +import { FormulaViewComponent } from '@components/formula-view/formula-view.component'; + +@Component({ + selector: 'formula-details', + templateUrl: './formula-details.component.html', + styleUrls: [ + '../base-details/base-details.component.scss', + './formula-details.component.scss', + ], + standalone: true, + imports: [ + CommonModule, + LoadingComponent, + MatTabsModule, + NgxEchartsDirective, + MatInputModule, + TranslocoModule, + TabViewModule, + ProgressSpinnerModule, + ButtonModule, + OverviewFormComponent, + ActivityComponent, + InputTextareaModule, + OrganizationChartModule, + FormulaViewComponent + ], +}) +export class FormulaDetailsComponent extends BaseDetailsComponent { + public subLoading: boolean = false; + + tabs: any[] = ['overview', 'view', 'document', 'raw']; + overviewFields: OverviewFormField[] = [ + { + label: 'details.formula.overview.topic_id', + path: 'topicId', + link: '/topics', + }, + { + label: 'details.formula.overview.owner', + path: 'options.owner', + }, + { + label: 'details.formula.overview.name', + path: 'options.name', + }, + { + label: 'details.formula.overview.description', + path: 'options.description', + }, + { + label: 'details.formula.overview.policy', + path: 'analytics.policyId', + link: '/policies', + }, + ]; + formulaData: any; + + constructor( + entitiesService: EntitiesService, + route: ActivatedRoute, + router: Router + ) { + super(entitiesService, route, router); + } + + protected override loadData(): void { + if (this.id) { + this.loading = true; + this.entitiesService.getFormula(this.id).subscribe({ + next: (result) => { + this.setResult(result); + setTimeout(() => { + this.loading = false; + }, 500); + }, + error: ({ message }) => { + this.loading = false; + console.error(message); + }, + }); + } else { + this.setResult(); + } + } + + protected override setFiles(item: any) { + if (item) { + if (Array.isArray(item.files)) { + item._ipfs = []; + item._ipfsStatus = true; + for (let i = 0; i < item.files.length; i++) { + const url = item.files[i]; + const document = item.analytics?.config; + const json = this.getJson(document); + const cid = new CID(url); + const ipfs = { + version: cid.version, + cid: url, + global: cid.toV1().toString('base32'), + document, + json, + } + if (!document) { + item._ipfsStatus = false; + } + item._ipfs.push(ipfs); + } + } + } + } + + protected override onNavigate(): void { + if (this.id && this.tab === 'view' && !this.formulaData) { + this.subLoading = true; + this.entitiesService.getFormulaRelationships(this.id).subscribe({ + next: (result) => { + this.formulaData = result; + }, + complete: () => (this.subLoading = false), + }); + } + } + + + protected getJson(item: any): string { + try { + return JSON.stringify(item, null, 4); + } catch (error) { + console.log(error); + return ''; + } + } + + protected override getTabIndex(name: string): number { + if (this.target) { + const tabIndex = this.tabs.findIndex((item) => item === name); + return tabIndex >= 0 ? tabIndex : 0; + } else { + return 0; + } + } + + protected override getTabName(index: number): string { + if (this.target) { + return this.tabs[index] || 'raw'; + } else { + return 'raw'; + } + } +} diff --git a/indexer-frontend/src/app/views/details/label-document-details/label-document-details.component.html b/indexer-frontend/src/app/views/details/label-document-details/label-document-details.component.html index 259daa4ba2..fc85df228f 100644 --- a/indexer-frontend/src/app/views/details/label-document-details/label-document-details.component.html +++ b/indexer-frontend/src/app/views/details/label-document-details/label-document-details.component.html @@ -193,7 +193,7 @@

{{ 'details.header.label' | transloco }}

-
+
} diff --git a/indexer-frontend/src/app/views/details/nft-details/nft-details.component.ts b/indexer-frontend/src/app/views/details/nft-details/nft-details.component.ts index 60685219fa..1e5672b210 100644 --- a/indexer-frontend/src/app/views/details/nft-details/nft-details.component.ts +++ b/indexer-frontend/src/app/views/details/nft-details/nft-details.component.ts @@ -54,7 +54,20 @@ export class NFTDetailsComponent extends BaseDetailsComponent { path: 'metadata', link: '/vp-documents', pattern: '^\\d{10}\\.\\d{9}$' - } + }, + { + label: 'details.nft.overview.sr', + path: 'analytics.sr', + link: '/registries', + filters: { + 'options.did': 'analytics.sr', + }, + }, + { + label: 'details.nft.overview.policy', + path: 'analytics.policyId', + link: '/policies', + }, ] tabs: any[] = ['overview', 'history', 'labels', 'raw']; historyColumns: any[] = [ diff --git a/indexer-frontend/src/app/views/details/policy-details/policy-details.component.html b/indexer-frontend/src/app/views/details/policy-details/policy-details.component.html index e1f29a6ea0..14ae8e32a2 100644 --- a/indexer-frontend/src/app/views/details/policy-details/policy-details.component.html +++ b/indexer-frontend/src/app/views/details/policy-details/policy-details.component.html @@ -18,6 +18,11 @@

{{ 'details.policy.header' | transloco }} {{id}}

+ + +
+
+
}
diff --git a/indexer-frontend/src/app/views/details/policy-details/policy-details.component.ts b/indexer-frontend/src/app/views/details/policy-details/policy-details.component.ts index 329de682ae..2c02839625 100644 --- a/indexer-frontend/src/app/views/details/policy-details/policy-details.component.ts +++ b/indexer-frontend/src/app/views/details/policy-details/policy-details.component.ts @@ -17,6 +17,9 @@ import { } from '@components/overview-form/overview-form.component'; import { ActivityComponent } from '@components/activity/activity.component'; import { InputTextareaModule } from 'primeng/inputtextarea'; +import { ColumnType } from '@components/table/table.component'; +import { createChart } from '../base-details/relationships-chart.config'; +import { EChartsOption } from 'echarts'; @Component({ selector: 'policy-details', @@ -42,7 +45,10 @@ import { InputTextareaModule } from 'primeng/inputtextarea'; ], }) export class PolicyDetailsComponent extends BaseDetailsComponent { - tabs: any[] = ['overview', 'activity', 'raw']; + + public chartOption: EChartsOption = createChart(); + + tabs: any[] = ['overview', 'activity', 'relationships', 'raw']; overviewFields: OverviewFormField[] = [ { label: 'details.policy.overview.topic_id', @@ -109,7 +115,24 @@ export class PolicyDetailsComponent extends BaseDetailsComponent { } } - protected override onNavigate(): void {} + protected override onNavigate(): void { + if (this.id && this.tab === 'relationships') { + this.loading = true; + this.entitiesService.getPolicyRelationships(this.id).subscribe({ + next: (result) => { + this.setRelationships(result); + this.setChartData(); + setTimeout(() => { + this.loading = false; + }, 500); + }, + error: ({ message }) => { + this.loading = false; + console.error(message); + }, + }); + } + } protected override getTabIndex(name: string): number { if (this.target) { @@ -128,6 +151,20 @@ export class PolicyDetailsComponent extends BaseDetailsComponent { } } + private setChartData() { + this.chartOption = createChart(this.relationships); + } + + public onSelect(event: any) { + if (event.dataType === 'node') { + this.toEntity( + String(event.data?.entityType), + event.name, + 'relationships' + ); + } + } + public override onOpenSchemas() { this.router.navigate(['/schemas'], { queryParams: { @@ -159,4 +196,12 @@ export class PolicyDetailsComponent extends BaseDetailsComponent { }, }); } + + public override onOpenFormulas() { + this.router.navigate(['/formulas'], { + queryParams: { + topicId: this.row.topicId, + }, + }); + } } diff --git a/indexer-frontend/src/app/views/details/registry-details/registry-details.component.html b/indexer-frontend/src/app/views/details/registry-details/registry-details.component.html index 4c3a78f3ac..aac7dbce1f 100644 --- a/indexer-frontend/src/app/views/details/registry-details/registry-details.component.html +++ b/indexer-frontend/src/app/views/details/registry-details/registry-details.component.html @@ -18,6 +18,11 @@

{{ 'details.registry.header' | transloco }}

+ + +
+
+
}
diff --git a/indexer-frontend/src/app/views/details/registry-details/registry-details.component.ts b/indexer-frontend/src/app/views/details/registry-details/registry-details.component.ts index 080bd03587..d43c836943 100644 --- a/indexer-frontend/src/app/views/details/registry-details/registry-details.component.ts +++ b/indexer-frontend/src/app/views/details/registry-details/registry-details.component.ts @@ -18,6 +18,7 @@ import { OverviewFormField, } from '@components/overview-form/overview-form.component'; import { InputTextareaModule } from 'primeng/inputtextarea'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'registry-details', @@ -42,12 +43,15 @@ import { InputTextareaModule } from 'primeng/inputtextarea'; ], }) export class RegistryDetailsComponent extends BaseDetailsComponent { + + public chartOption: EChartsOption = createChart(); - tabs: any[] = ['overview', 'activity', 'raw']; + tabs: any[] = ['overview', 'activity', 'relationships', 'raw']; overviewFields: OverviewFormField[] = [ { label: 'details.registry.overview.account_id', path: 'owner', + hederaExplorerType: HederaType.ACCOUNT, }, { label: 'details.registry.overview.topic_id', @@ -98,7 +102,24 @@ export class RegistryDetailsComponent extends BaseDetailsComponent { } } - protected override onNavigate(): void {} + protected override onNavigate(): void { + if (this.id && this.tab === 'relationships') { + this.loading = true; + this.entitiesService.getRegistryRelationships(this.id).subscribe({ + next: (result) => { + this.setRelationships(result); + this.setChartData(); + setTimeout(() => { + this.loading = false; + }, 500); + }, + error: ({ message }) => { + this.loading = false; + console.error(message); + }, + }); + } + } protected override getTabIndex(name: string): number { if (this.target) { @@ -116,10 +137,18 @@ export class RegistryDetailsComponent extends BaseDetailsComponent { return 'raw'; } } + + private setChartData() { + this.chartOption = createChart(this.relationships); + } - public onSelect(event: ECElementEvent) { + public onSelect(event: any) { if (event.dataType === 'node') { - this.toEntity(String(event.value), event.name, 'relationships'); + this.toEntity( + String(event.data?.entityType), + event.name, + 'relationships' + ); } } diff --git a/indexer-frontend/src/app/views/details/registry-user-details/registry-user-details.component.ts b/indexer-frontend/src/app/views/details/registry-user-details/registry-user-details.component.ts index c697dcf002..40fedf6415 100644 --- a/indexer-frontend/src/app/views/details/registry-user-details/registry-user-details.component.ts +++ b/indexer-frontend/src/app/views/details/registry-user-details/registry-user-details.component.ts @@ -15,6 +15,7 @@ import { ButtonModule } from 'primeng/button'; import { OverviewFormComponent, OverviewFormField } from '@components/overview-form/overview-form.component'; import { ActivityComponent } from '@components/activity/activity.component'; import { InputTextareaModule } from 'primeng/inputtextarea'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; @Component({ selector: 'registry-user-details', @@ -50,6 +51,7 @@ export class RegistryUserDetailsComponent extends BaseDetailsComponent { { label: 'details.registry.overview.account_id', path: 'owner', + hederaExplorerType: HederaType.ACCOUNT, }, { label: 'details.registry.overview.topic_id', diff --git a/indexer-frontend/src/app/views/details/token-details/token-details.component.ts b/indexer-frontend/src/app/views/details/token-details/token-details.component.ts index 5d6acfbede..021dd47ea7 100644 --- a/indexer-frontend/src/app/views/details/token-details/token-details.component.ts +++ b/indexer-frontend/src/app/views/details/token-details/token-details.component.ts @@ -20,6 +20,7 @@ import { TagModule } from 'primeng/tag'; import { ActivityComponent } from '@components/activity/activity.component'; import { InputTextareaModule } from 'primeng/inputtextarea'; import { ColumnType, TableComponent } from '@components/table/table.component'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; export enum TokenType { FT = 'FUNGIBLE_COMMON', @@ -60,6 +61,7 @@ export class TokenDetailsComponent extends BaseDetailsComponent { { label: 'details.token.overview.token_id', path: 'tokenId', + hederaExplorerType: HederaType.TOKEN, }, { label: 'details.token.overview.name', @@ -72,6 +74,10 @@ export class TokenDetailsComponent extends BaseDetailsComponent { { label: 'details.token.overview.treasury', path: 'treasury', + link: '/tokens', + filters: { + treasury: 'treasury', + }, }, { label: 'details.token.overview.type', diff --git a/indexer-frontend/src/app/views/details/topic-details/topic-details.component.ts b/indexer-frontend/src/app/views/details/topic-details/topic-details.component.ts index 0dc8c138e3..f52fa31647 100644 --- a/indexer-frontend/src/app/views/details/topic-details/topic-details.component.ts +++ b/indexer-frontend/src/app/views/details/topic-details/topic-details.component.ts @@ -18,6 +18,7 @@ import { } from '@components/overview-form/overview-form.component'; import { TagModule } from 'primeng/tag'; import { ActivityComponent } from '@components/activity/activity.component'; +import { HederaType } from '@components/hedera-explorer/hedera-explorer.component'; export enum TopicType { UserTopic = 'USER_TOPIC', @@ -79,6 +80,7 @@ export class TopicDetailsComponent extends BaseDetailsComponent { { label: 'details.topic.overview.topic_id', path: 'topicId', + hederaExplorerType: HederaType.TOPIC, }, { label: 'details.topic.overview.name', diff --git a/indexer-frontend/src/app/views/details/vc-document-details/vc-document-details.component.html b/indexer-frontend/src/app/views/details/vc-document-details/vc-document-details.component.html index 623f5a5988..b4a3eb59c4 100644 --- a/indexer-frontend/src/app/views/details/vc-document-details/vc-document-details.component.html +++ b/indexer-frontend/src/app/views/details/vc-document-details/vc-document-details.component.html @@ -60,7 +60,8 @@

{{ 'details.vc.header' | transloco }} {{id}}

+ [private-fields]="privateFields" + [formulas]="formulasResults">
@@ -119,7 +120,7 @@

{{ 'details.vc.header' | transloco }} {{id}}

-
+
} diff --git a/indexer-frontend/src/app/views/details/vc-document-details/vc-document-details.component.ts b/indexer-frontend/src/app/views/details/vc-document-details/vc-document-details.component.ts index 694e457649..e33d179eab 100644 --- a/indexer-frontend/src/app/views/details/vc-document-details/vc-document-details.component.ts +++ b/indexer-frontend/src/app/views/details/vc-document-details/vc-document-details.component.ts @@ -23,6 +23,7 @@ import { OverviewFormField, } from '@components/overview-form/overview-form.component'; import { ButtonModule } from 'primeng/button'; +import { FormulasTree } from '../../../models/formula-tree'; @Component({ selector: 'vc-document-details', @@ -128,6 +129,8 @@ export class VcDocumentDetailsComponent extends BaseDetailsComponent { 'policyId': true, 'ref': true }; + formulas?: FormulasTree | null; + formulasResults?: any | null; constructor( entitiesService: EntitiesService, @@ -149,6 +152,14 @@ export class VcDocumentDetailsComponent extends BaseDetailsComponent { } catch (error) { console.log(error); } + try { + if (result?.formulasData) { + this.formulas = FormulasTree.from(result.formulasData); + this.formulasResults = this.formulas?.getFields(this.schema?.iri); + } + } catch (error) { + console.log(error); + } } protected override setFiles(result?: any) { diff --git a/indexer-frontend/src/app/views/details/vp-document-details/vp-document-details.component.html b/indexer-frontend/src/app/views/details/vp-document-details/vp-document-details.component.html index 59d86a8ec4..b72b951668 100644 --- a/indexer-frontend/src/app/views/details/vp-document-details/vp-document-details.component.html +++ b/indexer-frontend/src/app/views/details/vp-document-details/vp-document-details.component.html @@ -74,7 +74,7 @@

{{ 'details.header.vp' | transloco }}

-
+
diff --git a/indexer-frontend/src/app/views/home/home.component.html b/indexer-frontend/src/app/views/home/home.component.html index 8f87e62a8b..de7f03eb8e 100644 --- a/indexer-frontend/src/app/views/home/home.component.html +++ b/indexer-frontend/src/app/views/home/home.component.html @@ -24,14 +24,8 @@

{{ 'landing.overview' | transloco }}

@for (stat of stats; track $index) { - + } -
diff --git a/indexer-frontend/src/app/views/home/home.component.scss b/indexer-frontend/src/app/views/home/home.component.scss index 847f9f63fb..8e21ea2e8b 100644 --- a/indexer-frontend/src/app/views/home/home.component.scss +++ b/indexer-frontend/src/app/views/home/home.component.scss @@ -80,7 +80,7 @@ display: flex; flex-wrap: wrap; justify-content: space-evenly; - gap: 24px; + gap: 8px; align-items: center; height: 100%; margin: auto 0; diff --git a/indexer-frontend/src/app/views/home/home.component.ts b/indexer-frontend/src/app/views/home/home.component.ts index 93c27e5fa2..3bea00d96e 100644 --- a/indexer-frontend/src/app/views/home/home.component.ts +++ b/indexer-frontend/src/app/views/home/home.component.ts @@ -5,7 +5,6 @@ import { FormControl, FormsModule, ReactiveFormsModule, - Validators, } from '@angular/forms'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatButtonModule } from '@angular/material/button'; @@ -17,6 +16,7 @@ import { IconFieldModule } from 'primeng/iconfield'; import { InputIconModule } from 'primeng/inputicon'; import { InputTextModule } from 'primeng/inputtext'; import { LandingService } from '@services/landing.service'; +import { ProgressBarComponent } from "../../components/progress-bar/progress-bar.component"; @Component({ selector: 'app-home', @@ -35,7 +35,7 @@ import { LandingService } from '@services/landing.service'; ProjectLocationsComponent, InputTextModule, IconFieldModule, - InputIconModule, + InputIconModule ], }) export class HomeComponent { @@ -48,7 +48,7 @@ export class HomeComponent { constructor( private router: Router, private landingService: LandingService - ) {} + ) { } ngOnInit() { this.landingService.getAnalytics().subscribe((result) => { @@ -56,67 +56,139 @@ export class HomeComponent { return; } const labels = result.map( - (item: { date: string | number | Date }) => - new Date(item.date).toLocaleString() + (item: { date: string | number | Date }) => { + const date = new Date(item.date); + const formattedDate = date.toLocaleDateString('ru-RU', { + year: '2-digit', + month: '2-digit', + day: '2-digit', + }); + const formattedTime = date.toLocaleTimeString('ru-RU', { + hour: '2-digit', + minute: '2-digit', + }); + return `${formattedDate} ${formattedTime}`; + } ); const hasUpcount = result.length > 1; this.stats.push({ - label: 'stat.registries', - labels, - data: result.map( - (item: { registries: any }) => item.registries - ), - count: result[result.length - 1].registries, - upcount: hasUpcount - ? result[result.length - 1].registries - - result[result.length - 2].registries - : 0, - link: '/registries', + statData: [{ + label: 'stat.registries', + chartData: { + labels, + data: result.map( + (item: { registries: any }) => item.registries + ), + }, + count: result[result.length - 1].registries, + upcount: hasUpcount + ? result[result.length - 1].registries - + result[result.length - 2].registries + : 0, + link: '/registries', + }] }); this.stats.push({ - label: 'stat.methodologies', - labels, - data: result.map( - (item: { methodologies: any }) => item.methodologies - ), - count: result[result.length - 1].methodologies, - upcount: hasUpcount - ? result[result.length - 1].methodologies - - result[result.length - 2].methodologies - : 0, - link: '/policies', + statData: [{ + label: 'stat.methodologies', + chartData: { + labels, + data: result.map( + (item: { methodologies: any }) => item.methodologies + ), + }, + count: result[result.length - 1].methodologies, + upcount: hasUpcount + ? result[result.length - 1].methodologies - + result[result.length - 2].methodologies + : 0, + link: '/policies', + }] }); this.stats.push({ - label: 'stat.projects', - labels, - data: result.map((item: { projects: any }) => item.projects), - count: result[result.length - 1].projects, - upcount: hasUpcount - ? result[result.length - 1].projects - - result[result.length - 2].projects - : 0, - link: '/vc-documents', - }); - this.stats.push({ - label: 'stat.total_issuance', - labels, - data: result.map( - (item: { totalIssuance: any }) => item.totalIssuance - ), - count: result[result.length - 1].totalIssuance, - upcount: hasUpcount - ? result[result.length - 1].totalIssuance - - result[result.length - 2].totalIssuance - : 0, - link: '/tokens', + statData: [{ + label: 'stat.projects', + chartData: { + labels, + data: result.map((item: { projects: any }) => item.projects), + }, + count: result[result.length - 1].projects, + upcount: hasUpcount + ? result[result.length - 1].projects - + result[result.length - 2].projects + : 0, + link: '/vc-documents', + }] }); + + if (result.some(item => item.totalFungible)) { + this.stats.push({ + statData: [ + { + label: 'stat.projects_issuance', + chartData: { + labels, + data: result.filter(item => item.totalFungible).map( + (item: { totalFungible: any }) => item.totalFungible + ), + }, + count: result[result.length - 1].totalFungible, + upcount: hasUpcount + ? result[result.length - 1].totalFungible - + result[result.length - 2].totalFungible + : 0, + link: '/tokens', + tabLabel: 'stat.total_fungible', + }, + { + label: 'stat.projects_issuance', + chartData: { + labels, + data: result.filter(item => item.totalSerialized).map( + (item: { totalSerialized: any }) => item.totalSerialized + ), + }, + count: result[result.length - 1].totalSerialized, + upcount: hasUpcount + ? result[result.length - 1].totalSerialized - + result[result.length - 2].totalSerialized + : 0, + link: '/tokens', + tabLabel: 'stat.total_serialized', + } + ] + }); + } else if (result.some(item => item.totalIssuance)) { + this.stats.push({ + statData: [ + { + label: 'stat.projects_issuance', + chartData: { + labels, + data: result.filter(item => item.totalIssuance).map( + (item: { totalIssuance: any }) => item.totalIssuance + ), + }, + count: result[result.length - 1].totalIssuance, + upcount: hasUpcount + ? result[result.length - 1].totalIssuance - + result[result.length - 2].totalIssuance + : 0, + link: '/tokens', + tabLabel: 'stat.total_fungible', + } + ] + }); + } }); this.landingService .getProjectsCoordinates() .subscribe((result) => (this.projectLocations = result)); } - ngOnDestroy(): void {} + ngOnDestroy(): void { + this.landingService.stopPollingDataLoadingProgress(); + } public onSearch() { if (this.searchControl.valid && this.searchControl.value) { diff --git a/indexer-frontend/src/assets/i18n/en.json b/indexer-frontend/src/assets/i18n/en.json index 43f491a3be..a4c66b3aec 100644 --- a/indexer-frontend/src/assets/i18n/en.json +++ b/indexer-frontend/src/assets/i18n/en.json @@ -8,7 +8,9 @@ "registries": "Registries", "methodologies": "Methodologies", "projects": "Total Documents", - "total_issuance": "Total Issuance", + "projects_issuance": "Projects Issuance", + "total_serialized": "Total Serialized", + "total_fungible": "Total Fungible", "x": "Date and time", "y": "Count" }, @@ -41,7 +43,10 @@ "others": "Others", "search_placeholder": "Search by keyword", "statistics": "Statistics", - "labels": "Labels" + "labels": "Labels", + "formulas": "Formulas", + "loading_progress": "Loading data...", + "left": "left" }, "home": { "header": "Indexer" @@ -82,6 +87,11 @@ "registrantTopicId": "User Topic Id", "open": "Open", "target": "Target", + "sr": "Registry", + "policy": "Policy", + "date": "Date", + "createdTimestamp": "Created Date", + "modifiedTimestamp": "Modified Date", "filter": { "policy": "Policy", "schema": "Schema", @@ -112,6 +122,7 @@ "relationships": "Relationships", "raw_data": "Raw data", "labels": "Labels", + "formulas": "Formulas", "tabs": { "activity": "Activity" }, @@ -128,7 +139,8 @@ "tools": "Tools", "modules": "Modules", "vcs": "Verifiable Credentials", - "vps": "Verifiable Presentations" + "vps": "Verifiable Presentations", + "formulas": "Formulas" }, "hedera": { "topic_id": "Topic Id", @@ -243,6 +255,25 @@ "owner": "Owner" } }, + "formula": { + "header": "Formula", + "tabs": { + "overview": "Overview", + "view": "View", + "document": "Document", + "raw_data": "Raw data", + "formulas": "Formulas", + "files": "Files" + }, + "overview": { + "topic_id": "Topic Id", + "policy_topic_id": "Policy Topic Id", + "name": "Name", + "description": "Description", + "owner": "Owner", + "policy": "Policy" + } + }, "statistic": { "header": "Statistic", "tabs": { @@ -314,7 +345,9 @@ "overview": { "token_id": "Token Id", "serial_number": "Serial Number", - "metadata": "Metadata" + "metadata": "Metadata", + "policy": "Policy", + "sr": "Standard Registry" } }, "token": { diff --git a/indexer-frontend/src/styles.scss b/indexer-frontend/src/styles.scss index d8c4b97828..f9eb6f453d 100644 --- a/indexer-frontend/src/styles.scss +++ b/indexer-frontend/src/styles.scss @@ -3,6 +3,7 @@ @import 'primeicons/primeicons.css'; @import 'assets/primeng/lara-light-blue/theme.css'; @import 'primeng/resources/primeng.css'; +@import 'mathlive/fonts.css'; html, body { @@ -40,8 +41,7 @@ body { @font-face { font-family: 'Archivo Black'; - src: url('assets/fonts/Archivo_Black/ArchivoBlack-Regular.ttf') - format('truetype'); + src: url('assets/fonts/Archivo_Black/ArchivoBlack-Regular.ttf') format('truetype'); font-weight: normal; font-style: normal; } @@ -69,11 +69,14 @@ h1 { .p-button { padding: 6px 16px; + .p-button-label { font-weight: 500; } + &.p-button-link { user-select: all; + .p-button-label { font-weight: 400; } @@ -139,16 +142,20 @@ p-tabview { } @keyframes custom-spin { + 100%, 0% { stroke: var(--primary-color); } + 40% { stroke: var(--primary-color); } + 66% { stroke: var(--primary-color); } + 80%, 90% { stroke: var(--primary-color); @@ -159,10 +166,12 @@ p-tabview { width: 5px; height: 5px; } + *::-webkit-scrollbar-thumb { background-color: #babac0; border-radius: 5px; } + *::-webkit-scrollbar-button { display: none; } @@ -185,16 +194,20 @@ a { .p-selectbutton { .p-button { border: 1px solid var(--color-gray-2); + .p-button-icon-left { color: var(--color-gray-3); } } + .p-button:focus { box-shadow: none; } + .p-button.p-highlight { background: var(--color-gray-2); border-color: var(--color-gray-2); + .p-button-icon-left { color: var(--color-gray-4); } @@ -207,4 +220,4 @@ a { .p-inputtextarea { width: 100%; -} +} \ No newline at end of file diff --git a/indexer-frontend/src/variables.scss b/indexer-frontend/src/variables.scss index 204695a74b..d4a7b6ecd0 100644 --- a/indexer-frontend/src/variables.scss +++ b/indexer-frontend/src/variables.scss @@ -11,7 +11,7 @@ --header-height: 84px; - --color-primary: #6000c4; + --color-primary: #4169E2; --color-primary-negative: #23252e; --color-primary-background: #fff; --color-primary-border: #6a458d; diff --git a/indexer-frontend/yarn.lock b/indexer-frontend/yarn.lock index c297e75777..c3dddf46c2 100644 --- a/indexer-frontend/yarn.lock +++ b/indexer-frontend/yarn.lock @@ -1268,6 +1268,14 @@ resolved "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== +"@cortex-js/compute-engine@0.24.1": + version "0.24.1" + resolved "https://registry.npmjs.org/@cortex-js/compute-engine/-/compute-engine-0.24.1.tgz" + integrity sha512-B9pLaZFC1vBrL64yR2LQWy2sj1E/+wtwIVokPuPqX8YWXwj9W2AMVyS9pSMN8gEdjpAC50nSmtL6110Rgi7dKA== + dependencies: + complex.js "^2.1.1" + decimal.js "^10.4.3" + "@discoveryjs/json-ext@0.5.7": version "0.5.7" resolved "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz" @@ -1284,7 +1292,7 @@ integrity sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA== "@indexer/interfaces@file:../indexer-interfaces": - version "2.27.0" + version "3.0.0" resolved "file:../indexer-interfaces" "@isaacs/cliui@^8.0.2": @@ -3208,6 +3216,11 @@ common-path-prefix@^3.0.0: resolved "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz" integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== +complex.js@^2.1.1: + version "2.4.2" + resolved "https://registry.npmjs.org/complex.js/-/complex.js-2.4.2.tgz" + integrity sha512-qtx7HRhPGSCBtGiST4/WGHuW+zeaND/6Ld+db6PbrulIB1i2Ev/2UPiqcmpQNPSyfBKraC0EOvOKCB5dGZKt3g== + compressible@~2.0.16: version "2.0.18" resolved "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz" @@ -3425,6 +3438,11 @@ debug@2.6.9: dependencies: ms "2.0.0" +decimal.js@^10.4.3: + version "10.5.0" + resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz" + integrity sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw== + default-gateway@^6.0.3: version "6.0.3" resolved "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz" @@ -5027,6 +5045,13 @@ make-fetch-happen@^13.0.0: promise-retry "^2.0.1" ssri "^10.0.0" +mathlive@^0.103.0: + version "0.103.0" + resolved "https://registry.npmjs.org/mathlive/-/mathlive-0.103.0.tgz" + integrity sha512-gNJDMUOz0WePyDpLO/w1sGkrz0JrMwrT1QoFdGloVjjerWlUeKWn1JGM6XlO5SQ1AqXWemRKvlyVXft+QsxX8w== + dependencies: + "@cortex-js/compute-engine" "0.24.1" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" diff --git a/indexer-interfaces/package.json b/indexer-interfaces/package.json index 05766c720d..bf67da7960 100644 --- a/indexer-interfaces/package.json +++ b/indexer-interfaces/package.json @@ -3,7 +3,7 @@ "dependencies": {}, "description": "Indexer interfaces", "devDependencies": { - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "tslint": "^6.1.3", "typescript": "^4.5.5" }, @@ -21,5 +21,5 @@ "prepack": "npm run build" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/indexer-interfaces/src/interfaces/data-loading-progress.interface.ts b/indexer-interfaces/src/interfaces/data-loading-progress.interface.ts new file mode 100644 index 0000000000..f9b3699773 --- /dev/null +++ b/indexer-interfaces/src/interfaces/data-loading-progress.interface.ts @@ -0,0 +1,14 @@ + +/** + * NFT + */ +export class DataLoadingProgress { + /** + * Loaded messages count + */ + loadedCount: number; + /** + * Total messages count + */ + total: number; +} diff --git a/indexer-interfaces/src/interfaces/details/formula.details.ts b/indexer-interfaces/src/interfaces/details/formula.details.ts new file mode 100644 index 0000000000..e5a2ec1cbd --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/formula.details.ts @@ -0,0 +1,93 @@ +import { DetailsActivity } from './details.interface.js'; +import { Message } from '../message.interface.js'; +import { ISchema } from './schema.details.js'; + +/** + * Formula options + */ +export interface FormulaOptions { + /** + * UUID + */ + uuid: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + /** + * Owner + */ + owner: string; + /** + * Policy topic identifier + */ + policyTopicId: string; + /** + * Instance topic identifier + */ + policyInstanceTopicId: string; +} + +/** + * Formula analytics + */ +export interface FormulaAnalytics { + /** + * Text search + */ + textSearch?: string; + /** + * Owner + */ + owner?: string; + /** + * Policy id + */ + policyId?: string; + /** + * Config + */ + config?: any; +} + +/** + * Formula Relationships + */ +export interface FormulaRelationships { + /** + * Message ID + */ + id: string; + /** + * Formula + */ + item?: Formula; + /** + * Schemas + */ + schemas?: ISchema[]; + /** + * Formulas + */ + formulas?: Formula[]; +} + +/** + * Formula activity + */ +// tslint:disable-next-line:no-empty-interface +export interface FormulaActivity {} + +/** + * Formula + */ +export type Formula = Message; + +/** + * Formula details + */ +export type FormulaDetails = DetailsActivity; diff --git a/indexer-interfaces/src/interfaces/details/index.ts b/indexer-interfaces/src/interfaces/details/index.ts index eaeef4f11c..afedff5113 100644 --- a/indexer-interfaces/src/interfaces/details/index.ts +++ b/indexer-interfaces/src/interfaces/details/index.ts @@ -14,4 +14,5 @@ export * from './topic.details.js'; export * from './token.details.js'; export * from './nft.details.js'; export * from './statistic.details.js'; -export * from './label.details.js'; \ No newline at end of file +export * from './label.details.js'; +export * from './formula.details.js'; \ No newline at end of file diff --git a/indexer-interfaces/src/interfaces/details/policy.details.ts b/indexer-interfaces/src/interfaces/details/policy.details.ts index d88d8204a5..5f9380c40b 100644 --- a/indexer-interfaces/src/interfaces/details/policy.details.ts +++ b/indexer-interfaces/src/interfaces/details/policy.details.ts @@ -121,6 +121,10 @@ export interface PolicyActivity { * Schemas */ schemas: number; + /** + * Formulas + */ + formulas: number; } /** diff --git a/indexer-interfaces/src/interfaces/details/vc.details.ts b/indexer-interfaces/src/interfaces/details/vc.details.ts index c76be180e8..a57f6c2236 100644 --- a/indexer-interfaces/src/interfaces/details/vc.details.ts +++ b/indexer-interfaces/src/interfaces/details/vc.details.ts @@ -53,4 +53,13 @@ export type VC = Message; /** * VC details */ -export type VCDetails = DetailsHistory & { schema?: any }; +export type VCDetails = DetailsHistory & { + schema?: any, + formulasData?: { + document: any, + policy: any, + formulas: any[], + relationships: any[], + schemas: any[] + } +}; diff --git a/indexer-interfaces/src/interfaces/formulas.interface.ts b/indexer-interfaces/src/interfaces/formulas.interface.ts new file mode 100644 index 0000000000..999db44040 --- /dev/null +++ b/indexer-interfaces/src/interfaces/formulas.interface.ts @@ -0,0 +1,45 @@ +export enum FormulaItemType { + Constant = 'constant', + Variable = 'variable', + Formula = 'formula', + Text = 'text' +} + +export interface IFormulaLink { + type: 'formula' | 'schema'; + entityId: string; + item: string; +} + +export interface IFormulaItem { + uuid: string; + name: string; + description: string; + type: FormulaItemType; + value?: any; + link?: IFormulaLink | null; + relationships?: string[]; +} + +export interface IFormulaFile { + name?: string; + url?: string; + type?: string; +} + +export interface IFormulaConfig { + formulas?: IFormulaItem[]; + files?: IFormulaFile[]; +} + +export interface IFormula { + id?: string; + uuid?: string; + name?: string; + description?: string; + policyId?: string; + policyTopicId?: string; + owner?: string; + status?: string; + config?: IFormulaConfig; +} \ No newline at end of file diff --git a/indexer-interfaces/src/interfaces/index.ts b/indexer-interfaces/src/interfaces/index.ts index 4d71f652c6..eeae1e29eb 100644 --- a/indexer-interfaces/src/interfaces/index.ts +++ b/indexer-interfaces/src/interfaces/index.ts @@ -11,3 +11,6 @@ export * from './raw-nft.interface.js'; export * from './raw-token.interface.js'; export * from './raw-topic.interface.js'; export * from './search-policy.interface.js'; +export * from './formulas.interface.js'; +export * from './network-explorer-settings.interface.js'; +export * from './data-loading-progress.interface.js'; diff --git a/indexer-interfaces/src/interfaces/langing-analytics.interface.ts b/indexer-interfaces/src/interfaces/langing-analytics.interface.ts index 8e0b38e27f..8ab1e2c2b5 100644 --- a/indexer-interfaces/src/interfaces/langing-analytics.interface.ts +++ b/indexer-interfaces/src/interfaces/langing-analytics.interface.ts @@ -18,6 +18,14 @@ export interface LandingAnalytics { * Total Issuance */ totalIssuance: number; + /** + * Total Serialized + */ + totalSerialized: number; + /** + * Total Fungible + */ + totalFungible: number; /** * Date */ diff --git a/indexer-interfaces/src/interfaces/network-explorer-settings.interface.ts b/indexer-interfaces/src/interfaces/network-explorer-settings.interface.ts new file mode 100644 index 0000000000..5a6975bf0f --- /dev/null +++ b/indexer-interfaces/src/interfaces/network-explorer-settings.interface.ts @@ -0,0 +1,10 @@ + +/** + * NFT + */ +export class NetworkExplorerSettings { + /** + * Hedera network explorer link + */ + networkExplorerLink: string; +} diff --git a/indexer-interfaces/src/interfaces/raw-nft.interface.ts b/indexer-interfaces/src/interfaces/raw-nft.interface.ts index c9e3e52f0a..3e2032e4c2 100644 --- a/indexer-interfaces/src/interfaces/raw-nft.interface.ts +++ b/indexer-interfaces/src/interfaces/raw-nft.interface.ts @@ -27,4 +27,9 @@ export class RawNFT { * Metadata */ metadata: string; + + /** + * Analytics + */ + analytics?: any; } diff --git a/indexer-interfaces/src/interfaces/relationships.interface.ts b/indexer-interfaces/src/interfaces/relationships.interface.ts index 5a7298be5b..902ad48d22 100644 --- a/indexer-interfaces/src/interfaces/relationships.interface.ts +++ b/indexer-interfaces/src/interfaces/relationships.interface.ts @@ -11,6 +11,7 @@ export enum RelationshipCategory { Role = 'Role', VC = 'VC', VP = 'VP', + TOKEN = 'Token', } /** @@ -35,6 +36,9 @@ export const RELATIONSHIP_CATEGORIES = [ { name: RelationshipCategory.VP, }, + { + name: RelationshipCategory.TOKEN, + }, ]; /** diff --git a/indexer-interfaces/src/interfaces/schema/schema-field.interface.ts b/indexer-interfaces/src/interfaces/schema/schema-field.interface.ts index 3c13f0acc4..66251d1b53 100644 --- a/indexer-interfaces/src/interfaces/schema/schema-field.interface.ts +++ b/indexer-interfaces/src/interfaces/schema/schema-field.interface.ts @@ -86,6 +86,11 @@ export interface SchemaField { */ path?: string; + /** + * Full field path + */ + fullPath?: string; + /** * Remote link */ diff --git a/indexer-interfaces/src/models/schema.ts b/indexer-interfaces/src/models/schema.ts index 209c02f041..cae9aaf102 100644 --- a/indexer-interfaces/src/models/schema.ts +++ b/indexer-interfaces/src/models/schema.ts @@ -5,6 +5,22 @@ import { SchemaHelper } from '../helpers/index.js'; * Schema class */ export class Schema { + /** + * IRI + */ + public iri?: string; + /** + * Name + */ + public name?: string; + /** + * Description + */ + public description?: string; + /** + * Type + */ + public type?: string; /** * Document */ @@ -34,6 +50,10 @@ export class Schema { this.document = null; } if (this.document) { + this.iri = this.document.$id || ''; + this.name = this.document.title || ''; + this.type = this.iri.replace(/^\#/, ''); + this.description = this.document.description || ''; this.parseDocument(); } } @@ -57,5 +77,65 @@ export class Schema { this.fields, schemaCache ); + this.setPaths(this.fields, '', this.iri + '/'); + } + + /** + * Parse document + * @private + */ + private setPaths(fields: SchemaField[], path: string, fullPath: string): void { + for (const f of fields) { + f.path = path + f.name; + f.fullPath = fullPath + f.name; + if (Array.isArray(f.fields)) { + this.setPaths(f.fields, f.path + '.', f.fullPath + '.'); + } + } + } + + /** + * Get all fields + */ + public getFields(): SchemaField[] { + return this._getFields([], this.fields); + } + + /** + * Get all fields + */ + private _getFields(result: SchemaField[], fields?: SchemaField[]): SchemaField[] { + if (Array.isArray(fields)) { + for (const field of fields) { + result.push(field); + this._getFields(result, field.fields); + } + } + return result; + } + + /** + * Get field + */ + public getField(path: string): SchemaField | null { + return this._getField(path, this.fields); + } + + /** + * Get field + */ + private _getField(path: string, fields?: SchemaField[]): SchemaField | null { + if (Array.isArray(fields)) { + for (const field of fields) { + if (field.path === path) { + return field; + } + const result = this._getField(path, field.fields); + if (result) { + return result; + } + } + } + return null; } } diff --git a/indexer-interfaces/src/types/index.ts b/indexer-interfaces/src/types/index.ts index 509a0623de..7ab7a272a8 100644 --- a/indexer-interfaces/src/types/index.ts +++ b/indexer-interfaces/src/types/index.ts @@ -2,4 +2,5 @@ export * from './message-type.type.js'; export * from './message-action.type.js'; export * from './topic.type.js'; export * from './contract.type.js'; -export * from './message-status.type.js'; \ No newline at end of file +export * from './message-status.type.js'; +export * from './token.type.js'; \ No newline at end of file diff --git a/indexer-interfaces/src/types/message-action.type.ts b/indexer-interfaces/src/types/message-action.type.ts index 06ec996060..f59b590b7c 100644 --- a/indexer-interfaces/src/types/message-action.type.ts +++ b/indexer-interfaces/src/types/message-action.type.ts @@ -39,4 +39,5 @@ export enum MessageAction { CreateStatisticAssessment = 'create-assessment-document', PublishPolicyLabel = 'publish-policy-label', CreateLabelDocument = 'create-label-document', + PublishFormula = 'publish-formula', } diff --git a/indexer-interfaces/src/types/message-type.type.ts b/indexer-interfaces/src/types/message-type.type.ts index c623d7eb3c..29746241e4 100644 --- a/indexer-interfaces/src/types/message-type.type.ts +++ b/indexer-interfaces/src/types/message-type.type.ts @@ -22,5 +22,6 @@ export enum MessageType { GUARDIAN_ROLE = 'Guardian-Role-Document', USER_PERMISSIONS = 'User-Permissions', POLICY_STATISTIC = 'Policy-Statistic', - POLICY_LABEL = 'Policy-Label' + POLICY_LABEL = 'Policy-Label', + FORMULA = 'Formula' } \ No newline at end of file diff --git a/indexer-interfaces/src/types/token.type.ts b/indexer-interfaces/src/types/token.type.ts new file mode 100644 index 0000000000..c5ad8de742 --- /dev/null +++ b/indexer-interfaces/src/types/token.type.ts @@ -0,0 +1,7 @@ +/** + * Token type + */ +export enum TokenType { + FT = 'FUNGIBLE_COMMON', + NFT = 'NON_FUNGIBLE_UNIQUE', +} diff --git a/indexer-service/configs/.env.worker b/indexer-service/configs/.env.worker index ef60530ece..5c58da50de 100644 --- a/indexer-service/configs/.env.worker +++ b/indexer-service/configs/.env.worker @@ -7,4 +7,5 @@ HEDERA_NET="testnet" # "mainnet" | "testnet" | "previewnet" | "localnode" PREUSED_HEDERA_NET="testnet" IPFS_GATEWAY="https://ipfs.io/ipfs/${cid}" SYNC_ALL_MASK= "0 * * * *" -START_SYNC_ALL= "true" \ No newline at end of file +START_SYNC_ALL= "true" +HEDERA_EXPLORER_LINK="https://hashscan.io/${network}/${type}/${value}/${subType}/${subValue}" \ No newline at end of file diff --git a/indexer-service/configs/.env.worker.develop b/indexer-service/configs/.env.worker.develop index ef60530ece..5c58da50de 100644 --- a/indexer-service/configs/.env.worker.develop +++ b/indexer-service/configs/.env.worker.develop @@ -7,4 +7,5 @@ HEDERA_NET="testnet" # "mainnet" | "testnet" | "previewnet" | "localnode" PREUSED_HEDERA_NET="testnet" IPFS_GATEWAY="https://ipfs.io/ipfs/${cid}" SYNC_ALL_MASK= "0 * * * *" -START_SYNC_ALL= "true" \ No newline at end of file +START_SYNC_ALL= "true" +HEDERA_EXPLORER_LINK="https://hashscan.io/${network}/${type}/${value}/${subType}/${subValue}" \ No newline at end of file diff --git a/indexer-service/configs/.env.worker.template b/indexer-service/configs/.env.worker.template index 914f073e8e..fefdc37de3 100644 --- a/indexer-service/configs/.env.worker.template +++ b/indexer-service/configs/.env.worker.template @@ -6,4 +6,5 @@ DB_DATABASE="indexer_db" HEDERA_NET="testnet" # "mainnet" | "testnet" | "previewnet" | "localnode" IPFS_GATEWAY="https://ipfs.io/ipfs/${cid}" SYNC_ALL_MASK= "0 * * * *" -START_SYNC_ALL= "true" \ No newline at end of file +START_SYNC_ALL= "true" +HEDERA_EXPLORER_LINK="https://hashscan.io/${network}/${type}/${value}/${subType}/${subValue}" \ No newline at end of file diff --git a/indexer-service/package.json b/indexer-service/package.json index a7fc1c5d19..58f7733188 100644 --- a/indexer-service/package.json +++ b/indexer-service/package.json @@ -1,8 +1,8 @@ { "author": "Envision Blockchain Solutions ", "dependencies": { - "@indexer/common": "^3.0.0", - "@indexer/interfaces": "^3.0.0", + "@indexer/common": "^3.1.0-rc", + "@indexer/interfaces": "^3.1.0-rc", "mongodb": "6.5.0", "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", @@ -28,7 +28,7 @@ "devDependencies": { "@types/gulp": "^4", "@types/gulp-rename": "^2", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "chai": "4.3.4", "gulp": "^4.0.2", "gulp-copy": "^4.0.1", @@ -60,5 +60,5 @@ }, "type": "module", "types": "dist/index.d.ts", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/indexer-service/src/api/analytics.service.ts b/indexer-service/src/api/analytics.service.ts index 222086e27c..ab385654d0 100644 --- a/indexer-service/src/api/analytics.service.ts +++ b/indexer-service/src/api/analytics.service.ts @@ -136,7 +136,7 @@ export class AnalyticsService { try { const { topicId } = msg; const em = DataBaseHelper.getEntityManager(); - const [messages, count] = (await em.findAndCount( + const [messages] = (await em.findAndCount( Message, { topicId, @@ -152,22 +152,23 @@ export class AnalyticsService { )) as any; for (const message of messages) { - let VCdocuments: VCDetails[] = []; + const VCdocuments: VCDetails[] = []; for (const fileName of message.files) { try { const file = await DataBaseHelper.loadFile(fileName); VCdocuments.push(JSON.parse(file) as VCDetails); + // tslint:disable-next-line:no-empty } catch (error) { } } message.documents = VCdocuments; - var messageCache = messagesCache.find((cache: MessageCache) => cache.consensusTimestamp == message.consensusTimestamp); + const messageCache = messagesCache.find((cache: MessageCache) => cache.consensusTimestamp === message.consensusTimestamp); if (messageCache) { message.sequenceNumber = messageCache.sequenceNumber; } } - + return new MessageResponse(messages); } catch (error) { return new MessageError(error); diff --git a/indexer-service/src/api/entities.service.ts b/indexer-service/src/api/entities.service.ts index 9cd082edef..582c9e381d 100644 --- a/indexer-service/src/api/entities.service.ts +++ b/indexer-service/src/api/entities.service.ts @@ -55,7 +55,11 @@ import { StatisticDetails, Label, LabelDetails, - LabelDocumentDetails + LabelDocumentDetails, + Formula, + FormulaDetails, + FormulaRelationships, + PolicyActivity } from '@indexer/interfaces'; import { parsePageParams } from '../utils/parse-page-params.js'; import axios from 'axios'; @@ -112,7 +116,20 @@ function parseKeywordFilter(keywordsString: string) { return filter; } -async function loadDocuments(row: Message, tryLoad: boolean): Promise { +async function getPolicy(row: Message): Promise { + const em = DataBaseHelper.getEntityManager(); + const policyMessage = await em.findOne(Message, { + type: MessageType.INSTANCE_POLICY, + consensusTimestamp: row.analytics?.policyId, + } as any); + return policyMessage; +} + +async function loadDocuments( + row: Message, + tryLoad: boolean, + prepare?: (file: string) => string +): Promise { try { const result = { ...row }; if (!result?.files?.length) { @@ -127,7 +144,11 @@ async function loadDocuments(row: Message, tryLoad: boolean): Promise { result.documents = []; for (const fileName of result.files) { const file = await DataBaseHelper.loadFile(fileName); - result.documents.push(file); + if (prepare) { + result.documents.push(prepare(file)); + } else { + result.documents.push(file); + } } return result; } catch (error) { @@ -135,6 +156,20 @@ async function loadDocuments(row: Message, tryLoad: boolean): Promise { } } +async function loadSchemaDocument(row: Message): Promise { + try { + const result = { ...row }; + if (!result?.files?.length) { + return result; + } + const file = await DataBaseHelper.loadFile(result.files[0]); + result.documents = [file]; + return result; + } catch (error) { + return row; + } +} + async function loadSchema( row: Message, tryLoad: boolean, @@ -185,6 +220,50 @@ async function loadSchema( } } +async function loadFormulas( + row: Message, +): Promise { + try { + const policyId = row.analytics.policyId; + if (!policyId) { + return null; + } + + const em = DataBaseHelper.getEntityManager(); + const formulasMessages = await em.find(Message, { + type: MessageType.FORMULA, + 'analytics.policyId': policyId, + } as any); + + return formulasMessages; + } catch (error) { + return null; + } +} + +async function loadSchemas(topicId: string,): Promise { + try { + const em = DataBaseHelper.getEntityManager(); + const schemas = await em.find(Message, { + type: MessageType.SCHEMA, + action: { + $in: [ + MessageAction.PublishSchema, + MessageAction.PublishSystemSchema, + ], + }, + topicId, + } as any); + + for (let i = 0; i < schemas.length; i++) { + schemas[i] = await loadSchemaDocument(schemas[i]); + } + return schemas; + } catch (error) { + return []; + } +} + async function checkDocuments(row: Message, timeout: number): Promise { if (row?.files?.length) { const fns: Promise[] = []; @@ -268,6 +347,59 @@ function getContext(file: string): any { return null; } } + +async function findRelationships(target: Message): Promise { + if (!target) { + return []; + } + + const em = DataBaseHelper.getEntityManager(); + const map = new Map(); + map.set(target.consensusTimestamp, target); + + await addRelationships(target, map, em); + + const documents = []; + for (const message of map.values()) { + if (message) { + const document = await loadDocuments(message, false); + if (document) { + documents.push(document) + } + } + } + return documents; +} + +async function addRelationships( + doc: Message, + relationships: Map, + em: any +) { + if (Array.isArray(doc?.options?.relationships)) { + for (const id of doc.options.relationships) { + await addRelationship(id, relationships, em); + } + } +} + +async function addRelationship( + messageId: string, + relationships: Map, + em: any +) { + if (!messageId || relationships.has(messageId)) { + return; + } + + const doc = (await em.findOne(Message, { + consensusTimestamp: messageId, + type: MessageType.VC_DOCUMENT, + })); + + relationships.set(messageId, doc); + await addRelationships(doc, relationships, em); +} //#endregion @Controller() @@ -397,6 +529,40 @@ export class EntityService { } } + @MessagePattern(IndexerMessageAPI.GET_REGISTRY_RELATIONSHIPS) + async getRegistryRelationships( + @Payload() msg: { messageId: string } + ): Promise> { + try { + const { messageId } = msg; + const em = DataBaseHelper.getEntityManager(); + const item = await em.findOne(Message, { + consensusTimestamp: messageId, + type: MessageType.STANDARD_REGISTRY, + }); + if (!item) { + return new MessageResponse({ + id: messageId, + }); + } + + const utils = new Relationships(item); + const { target, relationships, links, categories } = + await utils.load(); + + return new MessageResponse({ + id: messageId, + item, + target, + relationships, + links, + categories, + }); + } catch (error) { + console.log(error); + return new MessageError(error, error.code); + } + } //#endregion //#region REGISTRY USERS @MessagePattern(IndexerMessageAPI.GET_REGISTRY_USERS) @@ -606,11 +772,17 @@ export class EntityService { type: MessageType.ROLE_DOCUMENT, 'analytics.policyId': row.consensusTimestamp, } as any); - const activity: any = { + const formulas = await em.count(Message, { + type: MessageType.FORMULA, + topicId: row.topicId, + } as any); + + const activity: PolicyActivity = { schemas, vcs, vps, roles, + formulas }; if (!item) { return new MessageResponse({ @@ -631,6 +803,42 @@ export class EntityService { return new MessageError(error, error.code); } } + + @MessagePattern(IndexerMessageAPI.GET_POLICY_RELATIONSHIPS) + async getPolicyRelationships( + @Payload() msg: { messageId: string } + ): Promise> { + try { + const { messageId } = msg; + const em = DataBaseHelper.getEntityManager(); + const item = await em.findOne(Message, { + consensusTimestamp: messageId, + type: MessageType.INSTANCE_POLICY, + action: MessageAction.PublishPolicy, + }); + if (!item) { + return new MessageResponse({ + id: messageId, + }); + } + + const utils = new Relationships(item); + const { target, relationships, links, categories } = + await utils.load(); + + return new MessageResponse({ + id: messageId, + item, + target, + relationships, + links, + categories, + }); + } catch (error) { + console.log(error); + return new MessageError(error, error.code); + } + } //#endregion //#region TOOLS @MessagePattern(IndexerMessageAPI.GET_TOOLS) @@ -1233,6 +1441,133 @@ export class EntityService { } } //#endregion + //#region FORMULAS + @MessagePattern(IndexerMessageAPI.GET_FORMULAS) + async getFormulas( + @Payload() msg: PageFilters + ): Promise>> { + try { + const options = parsePageParams(msg); + const filters = parsePageFilters(msg); + filters.type = MessageType.FORMULA; + filters.action = MessageAction.PublishFormula; + const em = DataBaseHelper.getEntityManager(); + const [rows, count] = (await em.findAndCount( + Message, + filters, + options + )) as [Formula[], number]; + const result = { + items: rows.map((item) => { + delete item.analytics; + return item; + }), + pageIndex: options.offset / options.limit, + pageSize: options.limit, + total: count, + order: options.orderBy, + }; + return new MessageResponse>(result); + } catch (error) { + return new MessageError(error, error.code); + } + } + + @MessagePattern(IndexerMessageAPI.GET_FORMULA) + async getFormula( + @Payload() msg: { messageId: string } + ): Promise> { + try { + const { messageId } = msg; + const em = DataBaseHelper.getEntityManager(); + const item = await em.findOne(Message, { + consensusTimestamp: messageId, + type: MessageType.FORMULA, + action: MessageAction.PublishFormula + }); + const row = await em.findOne(MessageCache, { + consensusTimestamp: messageId, + }); + + const activity: any = {}; + + if (!item) { + return new MessageResponse({ + id: messageId, + row, + activity, + }); + } + + return new MessageResponse({ + id: messageId, + uuid: item.uuid, + item, + row, + activity, + }); + } catch (error) { + return new MessageError(error, error.code); + } + } + + @MessagePattern(IndexerMessageAPI.GET_FORMULA_RELATIONSHIPS) + async getFormulaRelationships( + @Payload() msg: { messageId: string } + ): Promise> { + try { + const { messageId } = msg; + const em = DataBaseHelper.getEntityManager(); + const item = await em.findOne(Message, { + consensusTimestamp: messageId, + type: MessageType.FORMULA, + action: MessageAction.PublishFormula + }); + const row = await em.findOne(MessageCache, { + consensusTimestamp: messageId, + }); + + const schemas = await em.find(Message, { + type: MessageType.SCHEMA, + action: { + $in: [ + MessageAction.PublishSchema, + MessageAction.PublishSystemSchema, + ], + }, + topicId: row.topicId, + } as any); + + for (let i = 0; i < schemas.length; i++) { + schemas[i] = await loadSchemaDocument(schemas[i]); + } + + const formulas = await em.find(Message, { + type: MessageType.FORMULA, + action: MessageAction.PublishFormula, + topicId: row.topicId, + } as any); + + if (!item) { + return new MessageResponse({ + id: messageId, + schemas, + formulas + }); + } + + return new MessageResponse({ + id: messageId, + item, + schemas, + formulas + }); + } catch (error) { + console.log(error); + return new MessageError(error, error.code); + } + } + //#endregion //#endregion //#region DOCUMENTS @@ -1525,7 +1860,6 @@ export class EntityService { item = await loadDocuments(item, true); const schema = await loadSchema(item, true); - const history = await em.find( Message, { @@ -1542,6 +1876,23 @@ export class EntityService { history[i] = await loadDocuments(history[i], false); } + //formulas + let formulasData:any = null; + const formulas = await loadFormulas(item); + if(formulas && formulas.length) { + const policy = await getPolicy(item); + const relationships = await findRelationships(item); + const schemas = await loadSchemas(policy?.topicId); + const document = item; + formulasData = { + policy, + formulas, + relationships, + schemas, + document + } + } + return new MessageResponse({ id: messageId, uuid: item.uuid, @@ -1549,6 +1900,7 @@ export class EntityService { history, row, schema, + formulasData }); } catch (error) { return new MessageError(error, error.code); @@ -1693,8 +2045,34 @@ export class EntityService { filters, options ); + + const nftsConsensusTimestamps = rows.map((row) => row.metadata); + + let messagesMap = new Map(); + + if (nftsConsensusTimestamps.length > 0) { + const messagesRows = await em.find(Message, { + consensusTimestamp: { $in: nftsConsensusTimestamps }, + }); + + messagesMap = new Map( + messagesRows.map((message) => [ + message.consensusTimestamp, + { + policyId: message.analytics.policyId, + sr: message.analytics.issuer, + }, + ]) + ); + } + + const newRows = rows.map((row) => ({ + ...row, + analytics: messagesMap.get(row.metadata), + })); + const result = { - items: rows, + items: newRows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, @@ -1726,9 +2104,21 @@ export class EntityService { action: MessageAction.CreateLabelDocument, 'options.target': row?.metadata } as any)); + + const message = await em.findOne(Message, { + consensusTimestamp: row.metadata, + }); + + const analytics = { + policyId: message.analytics.policyId, + sr: message.analytics.issuer, + } + + var newRow = {...row, analytics}; + return new MessageResponse({ id: tokenId, - row, + row: newRow, labels, history: nftHistory.data?.transactions || [], }); diff --git a/indexer-service/src/api/landing.service.ts b/indexer-service/src/api/landing.service.ts index 0c2888ebd1..4f17b52e85 100644 --- a/indexer-service/src/api/landing.service.ts +++ b/indexer-service/src/api/landing.service.ts @@ -7,8 +7,12 @@ import { DataBaseHelper, ProjectCoordinates, Analytics, + Message, + MessageCache, + MessageError, } from '@indexer/common'; import { + DataLoadingProgress, LandingAnalytics as IAnalytics, ProjectCoordinates as IProjectCoordinates, } from '@indexer/interfaces'; @@ -31,6 +35,8 @@ export class LandingService { 'methodologies', 'projects', 'totalIssuance', + 'totalSerialized', + 'totalFungible', 'date', ], } @@ -39,10 +45,37 @@ export class LandingService { } @MessagePattern(IndexerMessageAPI.GET_PROJECTS_COORDINATES) - async getProjects(): Promise> { + async getProjects(): Promise> { const em = DataBaseHelper.getEntityManager(); - return new MessageResponse( - await em.findAll(ProjectCoordinates) - ); + const coordinates: IProjectCoordinates[] = (await em.find( + ProjectCoordinates, + {} + )) as any; + return new MessageResponse(coordinates); + } + + @MessagePattern(IndexerMessageAPI.GET_DATA_LOADING_PROGRESS) + async getDataLoadingProgress(): Promise> { + try { + const em = DataBaseHelper.getEntityManager(); + + const loadedCount = (await em.count( + Message, + { + loaded: true, + } as any + )) as any; + + const total = (await em.count( + MessageCache, + { + type: 'Message', + } as any + )) as any; + + return new MessageResponse({ loadedCount, total }); + } catch (error) { + return new MessageError(error); + } } } diff --git a/indexer-service/src/api/settings.service.ts b/indexer-service/src/api/settings.service.ts new file mode 100644 index 0000000000..fb8b43727a --- /dev/null +++ b/indexer-service/src/api/settings.service.ts @@ -0,0 +1,31 @@ +import { Controller } from '@nestjs/common'; +import { MessagePattern } from '@nestjs/microservices'; +import { + AnyResponse, + IndexerMessageAPI, + MessageResponse, +} from '@indexer/common'; +import escapeStringRegexp from 'escape-string-regexp'; +import { NetworkExplorerSettings } from '@indexer/interfaces'; + +function createRegex(text: string) { + return { + $regex: `.*${escapeStringRegexp(text).trim()}.*`, + $options: 'si', + } +} + +@Controller() +export class SettingsService { + @MessagePattern(IndexerMessageAPI.GET_NETWORK) + async getNetworkExplorer(): Promise> { + return new MessageResponse(process.env.HEDERA_NET); + } + + @MessagePattern(IndexerMessageAPI.GET_NETWORK_EXPLORER) + async getNetworkExplorerSettings(): Promise> { + return new MessageResponse({ + networkExplorerLink: process.env.HEDERA_EXPLORER_LINK?.replace('${network}', process.env.HEDERA_NET), + }); + } +} diff --git a/indexer-service/src/app.ts b/indexer-service/src/app.ts index c915e8ae7a..2a2f5eea4d 100644 --- a/indexer-service/src/app.ts +++ b/indexer-service/src/app.ts @@ -10,23 +10,8 @@ import { EntityService } from './api/entities.service.js'; import { FiltersService } from './api/filters.service.js'; import { LandingService } from './api/landing.service.js'; import { AnalyticsService } from './api/analytics.service.js'; -import { - SynchronizationAnalytics, - SynchronizationContracts, - SynchronizationDid, - SynchronizationModules, - SynchronizationPolicy, - SynchronizationProjects, - SynchronizationRegistries, - SynchronizationRoles, - SynchronizationSchemas, - SynchronizationTools, - SynchronizationTopics, - SynchronizationVCs, - SynchronizationVPs, - SynchronizationLabels, - SynchronizationAll -} from './helpers/synchronizers/index.js'; +import { SettingsService } from './api/settings.service.js'; +import { SynchronizationAll } from './helpers/synchronizers/index.js'; import { fixtures } from './helpers/fixtures.js'; const channelName = ( @@ -74,14 +59,6 @@ async function updateIndexes() { } } -function getMask(mask: string | undefined): string { - return (mask || '0 * * * *'); -} - -function getBoolean(flag: string | undefined): boolean { - return (flag?.toLowerCase() === 'true'); -} - @Module({ imports: [ ClientsModule.register([ @@ -102,7 +79,8 @@ function getBoolean(flag: string | undefined): boolean { EntityService, FiltersService, LandingService, - AnalyticsService + AnalyticsService, + SettingsService, ], }) class AppModule { } @@ -154,52 +132,7 @@ Promise.all([ /** * Sync tasks */ - if (process.env.SYNC_ALL_MASK) { - (new SynchronizationAll(getMask(process.env.SYNC_ALL_MASK))) - .start(getBoolean(process.env.START_SYNC_ALL)); - } else { - (new SynchronizationAnalytics(getMask(process.env.SYNC_ANALYTICS_MASK))) - .start(getBoolean(process.env.START_SYNC_ANALYTICS)); - - (new SynchronizationProjects(getMask(process.env.SYNC_ANALYTICS_MASK))) - .start(getBoolean(process.env.START_SYNC_ANALYTICS)); - - (new SynchronizationModules(getMask(process.env.SYNC_MODULES_MASK))) - .start(getBoolean(process.env.START_SYNC_MODULES)); - - (new SynchronizationRegistries(getMask(process.env.SYNC_REGISTRIES_MASK))) - .start(getBoolean(process.env.START_SYNC_REGISTRIES)); - - (new SynchronizationRoles(getMask(process.env.SYNC_ROLES_MASK))) - .start(getBoolean(process.env.START_SYNC_ROLES)); - - (new SynchronizationTools(getMask(process.env.SYNC_TOOLS_MASK))) - .start(getBoolean(process.env.START_SYNC_TOOLS)); - - (new SynchronizationTopics(getMask(process.env.SYNC_TOPICS_MASK))) - .start(getBoolean(process.env.START_SYNC_TOPICS)); - - (new SynchronizationSchemas(getMask(process.env.SYNC_SCHEMAS_MASK))) - .start(getBoolean(process.env.START_SYNC_SCHEMAS)); - - (new SynchronizationDid(getMask(process.env.SYNC_DID_DOCUMENTS_MASK))) - .start(getBoolean(process.env.START_SYNC_DID_DOCUMENTS)); - - (new SynchronizationVCs(getMask(process.env.SYNC_VC_DOCUMENTS_MASK))) - .start(getBoolean(process.env.START_SYNC_VC_DOCUMENTS)); - - (new SynchronizationVPs(getMask(process.env.SYNC_VP_DOCUMENTS_MASK))) - .start(getBoolean(process.env.START_SYNC_VP_DOCUMENTS)); - - (new SynchronizationPolicy(getMask(process.env.SYNC_POLICIES_MASK))) - .start(getBoolean(process.env.START_SYNC_POLICIES)); - - (new SynchronizationContracts(getMask(process.env.SYNC_CONTRACTS_MASK))) - .start(getBoolean(process.env.START_SYNC_CONTRACTS)); - - (new SynchronizationLabels(getMask(process.env.SYNC_LABELS_MASK))) - .start(getBoolean(process.env.START_SYNC_LABELS)); - } + SynchronizationAll.createAllTasks(); }, (reason) => { console.log(reason); diff --git a/indexer-service/src/helpers/fixtures.ts b/indexer-service/src/helpers/fixtures.ts index 05d2a74d38..7195540d41 100644 --- a/indexer-service/src/helpers/fixtures.ts +++ b/indexer-service/src/helpers/fixtures.ts @@ -12,6 +12,8 @@ export async function fixtures(): Promise { methodologies: 0, projects: 0, totalIssuance: 0, + totalSerialized: 0, + totalFungible: 0, date: new Date(), }) ); diff --git a/indexer-service/src/helpers/parsers/formula.parser.ts b/indexer-service/src/helpers/parsers/formula.parser.ts new file mode 100644 index 0000000000..455bcaaeba --- /dev/null +++ b/indexer-service/src/helpers/parsers/formula.parser.ts @@ -0,0 +1,20 @@ +import JSZip from 'jszip'; +export interface IFormulaComponents { + formula: any; +} +export const FORMULA_FILE_NAME = 'formula.json'; +export async function parseFormulaFile(zipFile: any): Promise { + try { + const zip = new JSZip(); + const content = await zip.loadAsync(zipFile); + if (!content.files[FORMULA_FILE_NAME] || content.files[FORMULA_FILE_NAME].dir) { + throw new Error('Zip file is not a formula'); + } + const formulaString = await content.files[FORMULA_FILE_NAME].async('string'); + const formula = JSON.parse(formulaString); + return { formula }; + } catch (error) { + console.log('Failed to parse formula') + return null; + } +} diff --git a/indexer-service/src/helpers/parsers/index.ts b/indexer-service/src/helpers/parsers/index.ts index 33bce7b8b1..92994a2213 100644 --- a/indexer-service/src/helpers/parsers/index.ts +++ b/indexer-service/src/helpers/parsers/index.ts @@ -1,4 +1,5 @@ export * from './module.parser.js'; export * from './policy.parser.js'; export * from './tool.parser.js'; -export * from './label.parser.js'; \ No newline at end of file +export * from './label.parser.js'; +export * from './formula.parser.js'; \ No newline at end of file diff --git a/indexer-service/src/helpers/synchronizers/index.ts b/indexer-service/src/helpers/synchronizers/index.ts index b0cd6a2580..0518e89dec 100644 --- a/indexer-service/src/helpers/synchronizers/index.ts +++ b/indexer-service/src/helpers/synchronizers/index.ts @@ -13,4 +13,5 @@ export * from './synchronize-vp.js'; export * from './synchronize-contracts.js'; export * from './synchronize-projects.js'; export * from './synchronize-all.js'; -export * from './synchronize-labels.js'; \ No newline at end of file +export * from './synchronize-labels.js'; +export * from './synchronize-formula.js'; \ No newline at end of file diff --git a/indexer-service/src/helpers/synchronizers/synchronize-all.ts b/indexer-service/src/helpers/synchronizers/synchronize-all.ts index e3c5a34d15..af0e18c83b 100644 --- a/indexer-service/src/helpers/synchronizers/synchronize-all.ts +++ b/indexer-service/src/helpers/synchronizers/synchronize-all.ts @@ -2,6 +2,7 @@ import { SynchronizationTask } from '../synchronization-task.js'; import { SynchronizationAnalytics } from './synchronize-analytics.js'; import { SynchronizationContracts } from './synchronize-contracts.js'; import { SynchronizationDid } from './synchronize-dids.js'; +import { SynchronizationFormulas } from './synchronize-formula.js'; import { SynchronizationLabels } from './synchronize-labels.js'; import { SynchronizationModules } from './synchronize-module.js'; import { SynchronizationPolicy } from './synchronize-policy.js'; @@ -14,6 +15,14 @@ import { SynchronizationTopics } from './synchronize-topic.js'; import { SynchronizationVCs } from './synchronize-vcs.js'; import { SynchronizationVPs } from './synchronize-vp.js'; +function getMask(mask: string | undefined): string { + return (mask || '0 * * * *'); +} + +function getBoolean(flag: string | undefined): boolean { + return (flag?.toLowerCase() === 'true'); +} + export class SynchronizationAll extends SynchronizationTask { public readonly name: string = 'all'; @@ -31,6 +40,7 @@ export class SynchronizationAll extends SynchronizationTask { private readonly synchronizationPolicy: SynchronizationPolicy; private readonly synchronizationContracts: SynchronizationContracts; private readonly synchronizationLabels: SynchronizationLabels; + private readonly synchronizationFormulas: SynchronizationFormulas; constructor(mask: string) { super('all', mask); @@ -49,6 +59,7 @@ export class SynchronizationAll extends SynchronizationTask { this.synchronizationPolicy = (new SynchronizationPolicy(this.getMask(process.env.SYNC_POLICIES_MASK))); this.synchronizationContracts = (new SynchronizationContracts(this.getMask(process.env.SYNC_CONTRACTS_MASK))); this.synchronizationLabels = (new SynchronizationLabels(this.getMask(process.env.SYNC_LABELS_MASK))); + this.synchronizationFormulas = (new SynchronizationFormulas(this.getMask(process.env.SYNC_FORMULAS_MASK))); } public override async sync(): Promise { @@ -66,6 +77,7 @@ export class SynchronizationAll extends SynchronizationTask { await this.runTask(this.synchronizationPolicy); await this.runTask(this.synchronizationContracts); await this.runTask(this.synchronizationLabels); + await this.runTask(this.synchronizationFormulas); } private async runTask(task: SynchronizationTask) { @@ -83,4 +95,64 @@ export class SynchronizationAll extends SynchronizationTask { private getMask(mask: string | undefined): string { return (mask || '0 * * * *'); } + + public static createAllTasks() { + if (process.env.SYNC_ALL_MASK) { + SynchronizationAll.createSyncTasks(); + } else { + SynchronizationAll.createAsyncTasks(); + } + } + + public static createSyncTasks() { + (new SynchronizationAll(getMask(process.env.SYNC_ALL_MASK))) + .start(getBoolean(process.env.START_SYNC_ALL)); + } + + public static createAsyncTasks() { + (new SynchronizationAnalytics(getMask(process.env.SYNC_ANALYTICS_MASK))) + .start(getBoolean(process.env.START_SYNC_ANALYTICS)); + + (new SynchronizationProjects(getMask(process.env.SYNC_ANALYTICS_MASK))) + .start(getBoolean(process.env.START_SYNC_ANALYTICS)); + + (new SynchronizationModules(getMask(process.env.SYNC_MODULES_MASK))) + .start(getBoolean(process.env.START_SYNC_MODULES)); + + (new SynchronizationRegistries(getMask(process.env.SYNC_REGISTRIES_MASK))) + .start(getBoolean(process.env.START_SYNC_REGISTRIES)); + + (new SynchronizationRoles(getMask(process.env.SYNC_ROLES_MASK))) + .start(getBoolean(process.env.START_SYNC_ROLES)); + + (new SynchronizationTools(getMask(process.env.SYNC_TOOLS_MASK))) + .start(getBoolean(process.env.START_SYNC_TOOLS)); + + (new SynchronizationTopics(getMask(process.env.SYNC_TOPICS_MASK))) + .start(getBoolean(process.env.START_SYNC_TOPICS)); + + (new SynchronizationSchemas(getMask(process.env.SYNC_SCHEMAS_MASK))) + .start(getBoolean(process.env.START_SYNC_SCHEMAS)); + + (new SynchronizationDid(getMask(process.env.SYNC_DID_DOCUMENTS_MASK))) + .start(getBoolean(process.env.START_SYNC_DID_DOCUMENTS)); + + (new SynchronizationVCs(getMask(process.env.SYNC_VC_DOCUMENTS_MASK))) + .start(getBoolean(process.env.START_SYNC_VC_DOCUMENTS)); + + (new SynchronizationVPs(getMask(process.env.SYNC_VP_DOCUMENTS_MASK))) + .start(getBoolean(process.env.START_SYNC_VP_DOCUMENTS)); + + (new SynchronizationPolicy(getMask(process.env.SYNC_POLICIES_MASK))) + .start(getBoolean(process.env.START_SYNC_POLICIES)); + + (new SynchronizationContracts(getMask(process.env.SYNC_CONTRACTS_MASK))) + .start(getBoolean(process.env.START_SYNC_CONTRACTS)); + + (new SynchronizationLabels(getMask(process.env.SYNC_LABELS_MASK))) + .start(getBoolean(process.env.START_SYNC_LABELS)); + + (new SynchronizationFormulas(getMask(process.env.SYNC_FORMULAS_MASK))) + .start(getBoolean(process.env.START_SYNC_FORMULAS)); + } } \ No newline at end of file diff --git a/indexer-service/src/helpers/synchronizers/synchronize-analytics.ts b/indexer-service/src/helpers/synchronizers/synchronize-analytics.ts index 893ec83401..10eb2435a5 100644 --- a/indexer-service/src/helpers/synchronizers/synchronize-analytics.ts +++ b/indexer-service/src/helpers/synchronizers/synchronize-analytics.ts @@ -1,5 +1,5 @@ import { DataBaseHelper, Message, Analytics } from '@indexer/common'; -import { MessageType, MessageAction } from '@indexer/interfaces'; +import { MessageType, MessageAction, TokenType } from '@indexer/interfaces'; import { SynchronizationTask } from '../synchronization-task.js'; export class SynchronizationAnalytics extends SynchronizationTask { @@ -24,7 +24,7 @@ export class SynchronizationAnalytics extends SynchronizationTask { action: MessageAction.CreateVC }); - const totalIssuance = await this.getTotalIssuance(); + const [totalIssuance, totalSerialized, totalFungible] = await this.getTotalIssuance(); const date = new Date(); await em.persistAndFlush( em.create(Analytics, { @@ -32,6 +32,8 @@ export class SynchronizationAnalytics extends SynchronizationTask { methodologies, projects, totalIssuance, + totalSerialized, + totalFungible, date, }) ); @@ -41,17 +43,26 @@ export class SynchronizationAnalytics extends SynchronizationTask { const em = DataBaseHelper.getEntityManager(); const tokens = em.getCollection('token_cache').find(); let totalSupply = 0; + let totalSerialized = 0; + let totalFungible = 0; while (await tokens.hasNext()) { const token = await tokens.next(); const decimals = parseInt(token.decimals, 10); const tokenTotalSupply = parseInt(token.totalSupply, 10); + let tokenSupply = 0; if (decimals > 0) { - totalSupply += tokenTotalSupply / decimals; + tokenSupply = tokenTotalSupply / decimals; } else { - totalSupply += tokenTotalSupply; + tokenSupply = tokenTotalSupply; + } + totalSupply += tokenSupply; + + if (token.type == TokenType.FT) { + totalFungible += tokenSupply; + } else if (token.type == TokenType.NFT) { + totalSerialized += tokenSupply; } } - return totalSupply; + return [totalSupply, totalSerialized, totalFungible]; } - } \ No newline at end of file diff --git a/indexer-service/src/helpers/synchronizers/synchronize-formula.ts b/indexer-service/src/helpers/synchronizers/synchronize-formula.ts new file mode 100644 index 0000000000..b05617f58e --- /dev/null +++ b/indexer-service/src/helpers/synchronizers/synchronize-formula.ts @@ -0,0 +1,120 @@ +import { DataBaseHelper, Message } from '@indexer/common'; +import { MessageType, MessageAction, FormulaAnalytics } from '@indexer/interfaces'; +import { SynchronizationTask } from '../synchronization-task.js'; +import { Collection } from 'mongodb'; +import { textSearch } from '../text-search-options.js'; +import { parseFormulaFile } from '../parsers/index.js'; +import { loadFiles } from '../load-files.js'; + +export class SynchronizationFormulas extends SynchronizationTask { + public readonly name: string = 'formulas'; + + constructor(mask: string) { + super('formulas', mask); + } + + private async loadFormulas( + collection: Collection, + fileIds: Set + ) { + console.log(`Sync formulas: load formulas`) + const formulas = collection.find({ + type: MessageType.FORMULA, + action: MessageAction.PublishFormula, + ...this.filter(), + }, { + limit: 100000 + }); + const allDocuments: Message[] = []; + while (await formulas.hasNext()) { + const formula = await formulas.next(); + allDocuments.push(formula); + fileIds.add(formula.files?.[0]); + } + return allDocuments; + } + + private async loadPolicies(collection: Collection) { + const policyMap = new Map(); + const policies = collection.find({ type: MessageType.INSTANCE_POLICY }); + while (await policies.hasNext()) { + const policy = await policies.next(); + if (policy.options?.instanceTopicId) { + policyMap.set(policy.options.instanceTopicId, policy); + } + } + return policyMap + } + + public override async sync(): Promise { + const em = DataBaseHelper.getEntityManager(); + const collection = em.getCollection('message'); + + const fileIds: Set = new Set(); + const needUpdate = await this.loadFormulas(collection, fileIds); + + console.log(`Sync VCs: load policies`) + const policyMap = await this.loadPolicies(collection); + + console.log(`Sync formulas: load files`) + const fileMap = await loadFiles(fileIds, true); + + console.log(`Sync formulas: update data`) + for (const document of needUpdate) { + const row = em.getReference(Message, document._id); + row.analytics = await this.createAnalytics(document, policyMap, fileMap); + em.persist(row); + } + + console.log(`Sync formulas: flush`) + await em.flush(); + } + + private async createAnalytics( + document: Message, + policyMap: Map, + fileMap: Map, + ): Promise { + const analytics: FormulaAnalytics = { + textSearch: textSearch(document), + config: null + }; + const formulaFileId = document.files[0]; + const formulaFileBuffer = fileMap.get(formulaFileId); + if (!formulaFileBuffer) { + return analytics; + } + const formulaData = await parseFormulaFile(formulaFileBuffer); + if (!formulaData) { + return analytics; + } + analytics.config = formulaData.formula; + + const policyMessage = policyMap.get(document.options?.policyInstanceTopicId); + if (policyMessage) { + analytics.policyId = policyMessage.consensusTimestamp; + analytics.textSearch += `|${policyMessage.consensusTimestamp}`; + } + + return analytics; + } + + private filter() { + return { + $or: [ + { + analytics: { $exists: false }, + }, + { + analytics: null, + }, + { + analytics: undefined, + }, + { + 'analytics.config': null, + }, + ], + }; + } +} \ No newline at end of file diff --git a/indexer-service/src/helpers/synchronizers/synchronize-policy.ts b/indexer-service/src/helpers/synchronizers/synchronize-policy.ts index 1c13d99581..b97393ec58 100644 --- a/indexer-service/src/helpers/synchronizers/synchronize-policy.ts +++ b/indexer-service/src/helpers/synchronizers/synchronize-policy.ts @@ -1,16 +1,11 @@ import { DataBaseHelper, Message, TokenCache } from '@indexer/common'; -import { MessageType, MessageAction, PolicyAnalytics } from '@indexer/interfaces'; +import { MessageType, MessageAction, PolicyAnalytics, TokenType } from '@indexer/interfaces'; import { textSearch } from '../text-search-options.js'; import { parsePolicyFile } from '../parsers/policy.parser.js'; import { HashComparator, PolicyLoader } from '../../analytics/index.js'; import { SynchronizationTask } from '../synchronization-task.js'; import { loadFiles } from '../load-files.js'; -enum TokenType { - FT = 'FUNGIBLE_COMMON', - NFT = 'NON_FUNGIBLE_UNIQUE', -} - export class SynchronizationPolicy extends SynchronizationTask { public readonly name: string = 'policy'; diff --git a/indexer-service/src/helpers/synchronizers/synchronize-role.ts b/indexer-service/src/helpers/synchronizers/synchronize-role.ts index b1f752f21a..13a6d8ddf9 100644 --- a/indexer-service/src/helpers/synchronizers/synchronize-role.ts +++ b/indexer-service/src/helpers/synchronizers/synchronize-role.ts @@ -50,6 +50,7 @@ export class SynchronizationRoles extends SynchronizationTask { if (policyMessage) { analytics.policyId = policyMessage.consensusTimestamp; analytics.textSearch += `|${policyMessage.consensusTimestamp}`; + analytics.sr = policyMessage.owner; } return analytics; } @@ -63,6 +64,9 @@ export class SynchronizationRoles extends SynchronizationTask { { 'analytics.policyId': null, }, + { + 'analytics.sr': null, + }, ], }; } diff --git a/indexer-service/src/helpers/synchronizers/synchronize-vcs.ts b/indexer-service/src/helpers/synchronizers/synchronize-vcs.ts index d7b9610d34..ab33b7a1aa 100644 --- a/indexer-service/src/helpers/synchronizers/synchronize-vcs.ts +++ b/indexer-service/src/helpers/synchronizers/synchronize-vcs.ts @@ -42,6 +42,8 @@ export class SynchronizationVCs extends SynchronizationTask { const documents = collection.find({ type: { $in: [MessageType.VC_DOCUMENT] }, ...this.filter(), + }, { + limit: 100000 }); const allDocuments: Message[] = []; const fileIds: Set = new Set(); diff --git a/indexer-service/src/helpers/synchronizers/synchronize-vp.ts b/indexer-service/src/helpers/synchronizers/synchronize-vp.ts index 9be70e2a48..ca2d2f3946 100644 --- a/indexer-service/src/helpers/synchronizers/synchronize-vp.ts +++ b/indexer-service/src/helpers/synchronizers/synchronize-vp.ts @@ -82,6 +82,8 @@ export class SynchronizationVPs extends SynchronizationTask { const documents = collection.find({ type: { $in: [MessageType.VP_DOCUMENT] }, ...this.filter(), + }, { + limit: 100000 }); const allDocuments: Message[] = []; while (await documents.hasNext()) { diff --git a/indexer-service/src/utils/relationships.ts b/indexer-service/src/utils/relationships.ts index 5cf15f9632..4ad7e70c64 100644 --- a/indexer-service/src/utils/relationships.ts +++ b/indexer-service/src/utils/relationships.ts @@ -9,6 +9,7 @@ const categories = [ MessageType.ROLE_DOCUMENT, MessageType.VC_DOCUMENT, MessageType.VP_DOCUMENT, + MessageType.TOKEN, ]; class RelationshipItem { @@ -57,6 +58,9 @@ class RelationshipItem { case MessageType.ROLE_DOCUMENT: this._name = item.options?.role; break; + case MessageType.TOKEN: + this._name = item.options?.tokenName; + break; default: break; } @@ -222,6 +226,21 @@ export class Relationships { } break; } + case MessageType.STANDARD_REGISTRY: { + const policyMessages = await this.em.find(Message, { + type: MessageType.INSTANCE_POLICY, + 'options.owner': item.options.did + } as any); + + policyMessages.forEach(policy => { + this.messages.set(policy.consensusTimestamp, new RelationshipItem(policy.consensusTimestamp, policy)); + this.links.push({ + source: messageId, + target: policy.consensusTimestamp, + type: 'relationships', + }); + }); + } default: break; } @@ -239,5 +258,20 @@ export class Relationships { }); } } + + if (item.analytics.tokens?.length > 0) { + const tokenMessages = await this.em.find(Message, { + topicId: item.topicId, + type: MessageType.TOKEN, + }); + tokenMessages.forEach(token => { + this.messages.set(token.tokens[0], new RelationshipItem(token.tokens[0], token)); + this.links.push({ + source: token.tokens[0], + target: messageId, + type: 'relationships', + }); + }); + } } } diff --git a/indexer-worker-service/package.json b/indexer-worker-service/package.json index a0ce767af2..dd598ca9d2 100644 --- a/indexer-worker-service/package.json +++ b/indexer-worker-service/package.json @@ -1,8 +1,8 @@ { "author": "Envision Blockchain Solutions ", "dependencies": { - "@indexer/interfaces": "^3.0.0", - "@indexer/common": "^3.0.0", + "@indexer/interfaces": "^3.1.0-rc", + "@indexer/common": "^3.1.0-rc", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", "@nestjs/microservices": "^9.4.1", @@ -17,13 +17,14 @@ "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", "@mikro-orm/migrations-mongodb": "6.2.2", - "multiformats": "^13.1.0" + "multiformats": "^13.1.0", + "cids": "^1.1.9" }, "description": "", "devDependencies": { "@types/gulp": "^4", "@types/gulp-rename": "^2", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "chai": "4.3.4", "gulp": "^4.0.2", "gulp-copy": "^4.0.1", @@ -55,5 +56,5 @@ }, "type": "module", "types": "dist/index.d.ts", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/indexer-worker-service/src/loaders/hedera-service.ts b/indexer-worker-service/src/loaders/hedera-service.ts index 8eec524e8f..cacce02b24 100644 --- a/indexer-worker-service/src/loaders/hedera-service.ts +++ b/indexer-worker-service/src/loaders/hedera-service.ts @@ -10,12 +10,12 @@ export class HederaService { public static readonly REST_API_MAX_LIMIT: number = 100; public static async init() { - this.mirrorNodeUrl = Environment.mirrorNode; + HederaService.mirrorNodeUrl = Environment.mirrorNode; } public static async getMessages(topicId: string, lastNumber: number): Promise { try { - const url = this.mirrorNodeUrl + 'topics/' + topicId + '/messages'; + const url = HederaService.mirrorNodeUrl + 'topics/' + topicId + '/messages'; const option: any = { params: { limit: HederaService.REST_API_MAX_LIMIT @@ -44,7 +44,7 @@ export class HederaService { public static async getToken(tokenId: string): Promise { try { - const url = this.mirrorNodeUrl + 'tokens/' + tokenId; + const url = HederaService.mirrorNodeUrl + 'tokens/' + tokenId; const option: any = { responseType: 'json', timeout: 2 * 60 * 1000, @@ -63,7 +63,7 @@ export class HederaService { } public static async getSerials(tokenId: string, lastNumber: number): Promise { - const url = this.mirrorNodeUrl + 'tokens/' + tokenId + '/nfts'; + const url = HederaService.mirrorNodeUrl + 'tokens/' + tokenId + '/nfts'; const option: any = { params: { order: 'asc', diff --git a/indexer-worker-service/src/loaders/ipfs-service.ts b/indexer-worker-service/src/loaders/ipfs-service.ts index 1fce42dbd8..04597fe8c5 100644 --- a/indexer-worker-service/src/loaders/ipfs-service.ts +++ b/indexer-worker-service/src/loaders/ipfs-service.ts @@ -11,8 +11,8 @@ export class IPFSService { public static node: BaseNode; public static async init() { - this.node = new HttpNode(); - await this.node.start(); + IPFSService.node = new HttpNode(); + await IPFSService.node.start(); } public static parseCID(file: string): CID | null { @@ -28,14 +28,14 @@ export class IPFSService { } private static async loadFile(cid: string): Promise { - const check = await this.node.check(cid); + const check = await IPFSService.node.check(cid); if (check.check === true) { - const file = await this.node.get(cid); + const file = await IPFSService.node.get(cid); console.log(`IPFS loaded: ${cid}`); return file; } else if (check.check === undefined) { console.log(`IPFS check: ${cid}`, check.error); - const file = await this.node.get(cid); + const file = await IPFSService.node.get(cid); console.log(`IPFS loaded: ${cid}`); return file; } else { @@ -52,7 +52,7 @@ export class IPFSService { reject(new Error('Timeout exceeded')); }, IPFSService.LOAD_TIMEOUT); }); - return await Promise.race([this.loadFile(cid), timeoutPromise]); + return await Promise.race([IPFSService.loadFile(cid), timeoutPromise]); } catch (error) { console.log(`IPFS error: ${cid}`, error.message); return undefined; diff --git a/indexer-worker-service/src/loaders/ipfs/http-node.ts b/indexer-worker-service/src/loaders/ipfs/http-node.ts index 19eebded30..85e57bb7f9 100644 --- a/indexer-worker-service/src/loaders/ipfs/http-node.ts +++ b/indexer-worker-service/src/loaders/ipfs/http-node.ts @@ -6,10 +6,6 @@ export class HttpNode implements BaseNode { private readonly LOAD_TIMEOUT: number = 60 * 1000; private readonly CHECK_TIMEOUT: number = 15 * 1000; - constructor() { - - } - private parseCID(cid: string): string { return new CID(cid).toV1().toString('base32'); } @@ -24,7 +20,7 @@ export class HttpNode implements BaseNode { } public async stop() { - + return; } public async get(cid: string, timeout?: number): Promise { diff --git a/indexer-worker-service/src/services/token-service.ts b/indexer-worker-service/src/services/token-service.ts index 328995ea6d..957c560dda 100644 --- a/indexer-worker-service/src/services/token-service.ts +++ b/indexer-worker-service/src/services/token-service.ts @@ -31,6 +31,14 @@ export class TokenService { data.totalSupply = info.total_supply; data.decimals = info.decimals; } + + if(!data.createdTimestamp) { + data.createdTimestamp = info.created_timestamp; + } + + if(!data.modifiedTimestamp) { + data.modifiedTimestamp = info.modified_timestamp; + } if (data.memo && row.status !== 'UPDATED') { await TopicService.addTopic(data.memo); diff --git a/indexer-worker-service/src/utils/parser.ts b/indexer-worker-service/src/utils/parser.ts index 4ae291a91e..c1b06208d7 100644 --- a/indexer-worker-service/src/utils/parser.ts +++ b/indexer-worker-service/src/utils/parser.ts @@ -251,6 +251,17 @@ export class Parser { message.files.push(json.cid); } break; + case MessageType.FORMULA: + message.options.uuid = json.uuid; + message.options.name = json.name; + message.options.description = json.description; + message.options.owner = json.owner; + message.options.policyTopicId = json.policyTopicId; + message.options.policyInstanceTopicId = json.policyInstanceTopicId; + if (json.cid) { + message.files.push(json.cid); + } + break; default: return null; } diff --git a/interfaces/package.json b/interfaces/package.json index d45c380a40..53cdea8ef7 100644 --- a/interfaces/package.json +++ b/interfaces/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@types/gulp": "^4", "@types/gulp-rename": "^2", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "mocha-junit-reporter": "^2.0.2", "tslint": "^6.1.3", "typescript": "^4.5.5" @@ -33,5 +33,5 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/interfaces/src/helpers/permissions-helper.ts b/interfaces/src/helpers/permissions-helper.ts index 4388ffdf47..c708d1a1d0 100644 --- a/interfaces/src/helpers/permissions-helper.ts +++ b/interfaces/src/helpers/permissions-helper.ts @@ -520,7 +520,7 @@ export class UserPermissions { return this.check(Permissions.SCHEMAS_RULE_EXECUTE); } - //SCHEMA RULES + //SCHEMA LABELS public get STATISTICS_LABEL_CREATE(): boolean { return this.check(Permissions.STATISTICS_LABEL_CREATE); } @@ -529,6 +529,15 @@ export class UserPermissions { return this.check(Permissions.STATISTICS_LABEL_READ); } + //SCHEMA FORMULAS + public get FORMULAS_FORMULA_CREATE(): boolean { + return this.check(Permissions.FORMULAS_FORMULA_CREATE); + } + + public get FORMULAS_FORMULA_READ(): boolean { + return this.check(Permissions.FORMULAS_FORMULA_READ); + } + public static isPolicyAdmin(user: any): boolean { return ( UserPermissions.has(user, Permissions.POLICIES_MIGRATION_CREATE) || diff --git a/interfaces/src/interface/formulas.interface.ts b/interfaces/src/interface/formulas.interface.ts new file mode 100644 index 0000000000..5477886e8a --- /dev/null +++ b/interfaces/src/interface/formulas.interface.ts @@ -0,0 +1,49 @@ +import { EntityStatus } from '../type'; + +export enum FormulaItemType { + Constant = 'constant', + Variable = 'variable', + Formula = 'formula', + Text = 'text' +} + +export interface IFormulaLink { + type: 'formula' | 'schema'; + entityId: string; + item: string; +} + +export interface IFormulaItem { + uuid: string; + name: string; + description: string; + type: FormulaItemType; + value?: any; + link?: IFormulaLink | null; + relationships?: string[]; +} + +export interface IFormulaFile { + name?: string; + url?: string; + type?: string; +} + +export interface IFormulaConfig { + formulas?: IFormulaItem[]; + files?: IFormulaFile[]; +} + +export interface IFormula { + id?: string; + uuid?: string; + name?: string; + description?: string; + policyId?: string; + policyTopicId?: string; + policyInstanceTopicId?: string; + owner?: string; + creator?: string; + status?: EntityStatus; + config?: IFormulaConfig; +} \ No newline at end of file diff --git a/interfaces/src/interface/index.ts b/interfaces/src/interface/index.ts index 63a3c24457..f257d14753 100644 --- a/interfaces/src/interface/index.ts +++ b/interfaces/src/interface/index.ts @@ -45,3 +45,4 @@ export * from './statistic.interface.js' export * from './schema-rules.interface.js' export * from './retirement-message.interface.js' export * from './policy-label.interface.js' +export * from './formulas.interface.js' diff --git a/interfaces/src/models/schema.ts b/interfaces/src/models/schema.ts index c64b5fe3d9..d129a0537c 100644 --- a/interfaces/src/models/schema.ts +++ b/interfaces/src/models/schema.ts @@ -449,4 +449,41 @@ export class Schema implements ISchema { } return result; } + + /** + * Get field + */ + public getField(path: string): SchemaField | null { + return this._getField(path, this.fields); + } + + /** + * Get field + */ + private _getField(path: string, fields?: SchemaField[]): SchemaField | null { + if (Array.isArray(fields)) { + for (const field of fields) { + if (field.path === path) { + return field; + } + const result = this._getField(path, field.fields); + if (result) { + return result; + } + } + } + return null; + } + + /** + * Create Schema + */ + public static from(response: ISchema): Schema | null { + try { + return new Schema(response); + } catch (error) { + console.error(error); + return null; + } + } } diff --git a/interfaces/src/type/messages/message-api.type.ts b/interfaces/src/type/messages/message-api.type.ts index b74c0f9b74..e52f849523 100644 --- a/interfaces/src/type/messages/message-api.type.ts +++ b/interfaces/src/type/messages/message-api.type.ts @@ -263,6 +263,17 @@ export enum MessageAPI { GET_POLICY_LABEL_DOCUMENTS = 'GET_POLICY_LABEL_DOCUMENTS', GET_POLICY_LABEL_DOCUMENT = 'GET_POLICY_LABEL_DOCUMENT', GET_POLICY_LABEL_DOCUMENT_RELATIONSHIPS = 'GET_POLICY_LABEL_DOCUMENT_RELATIONSHIPS', + CREATE_FORMULA = 'CREATE_FORMULA', + GET_FORMULAS = 'GET_FORMULAS', + GET_FORMULA = 'GET_FORMULA', + UPDATE_FORMULA = 'UPDATE_FORMULA', + DELETE_FORMULA = 'DELETE_FORMULA', + IMPORT_FORMULA_FILE = 'IMPORT_FORMULA_FILE', + EXPORT_FORMULA_FILE = 'EXPORT_FORMULA_FILE', + PREVIEW_FORMULA_FILE = 'PREVIEW_FORMULA_FILE', + GET_FORMULA_RELATIONSHIPS = 'GET_FORMULA_RELATIONSHIPS', + GET_FORMULAS_DATA = 'GET_FORMULAS_DATA', + PUBLISH_FORMULA = 'PUBLISH_FORMULA', } /** diff --git a/interfaces/src/type/messages/policy-engine-events.ts b/interfaces/src/type/messages/policy-engine-events.ts index 4becd3a250..45c13278a4 100644 --- a/interfaces/src/type/messages/policy-engine-events.ts +++ b/interfaces/src/type/messages/policy-engine-events.ts @@ -72,4 +72,5 @@ export enum PolicyEngineEvents { CREATE_SAVEPOINT = 'policy-engine-event-create-savepoint', DELETE_SAVEPOINT = 'policy-engine-event-delete-savepoint', RESTORE_SAVEPOINT = 'policy-engine-event-restore-savepoint', + GET_SAVEPOINT = 'policy-engine-event-get-savepoint' } diff --git a/interfaces/src/type/permissions.type.ts b/interfaces/src/type/permissions.type.ts index ee5016eb03..da746a28af 100644 --- a/interfaces/src/type/permissions.type.ts +++ b/interfaces/src/type/permissions.type.ts @@ -25,6 +25,7 @@ export enum PermissionCategories { ACCESS = 'ACCESS', DELEGATION = 'DELEGATION', STATISTICS = 'STATISTICS', + FORMULAS = 'FORMULAS', } /** @@ -66,7 +67,8 @@ export enum PermissionEntities { ROLE = 'ROLE', STATISTIC = 'STATISTIC', RULE = 'RULE', - LABEL = 'LABEL' + LABEL = 'LABEL', + FORMULA = 'FORMULA', } /** @@ -227,7 +229,10 @@ export enum Permissions { //SCHEMA RULES SCHEMAS_RULE_CREATE = 'SCHEMAS_RULE_CREATE', SCHEMAS_RULE_READ = 'SCHEMAS_RULE_READ', - SCHEMAS_RULE_EXECUTE = 'SCHEMAS_RULE_EXECUTE' + SCHEMAS_RULE_EXECUTE = 'SCHEMAS_RULE_EXECUTE', + //FORMULAS + FORMULAS_FORMULA_CREATE = 'FORMULAS_FORMULA_CREATE', + FORMULAS_FORMULA_READ = 'FORMULAS_FORMULA_READ' } /** @@ -1146,7 +1151,10 @@ export const PermissionsArray: { category: PermissionCategories.STATISTICS, entity: PermissionEntities.STATISTIC, action: PermissionActions.CREATE, - disabled: false + disabled: false, + dependOn: [ + Permissions.STATISTICS_STATISTIC_READ + ] }, { name: Permissions.STATISTICS_LABEL_READ, @@ -1160,7 +1168,10 @@ export const PermissionsArray: { category: PermissionCategories.STATISTICS, entity: PermissionEntities.LABEL, action: PermissionActions.CREATE, - disabled: false + disabled: false, + dependOn: [ + Permissions.STATISTICS_LABEL_READ + ] }, //SCHEMA RULE { @@ -1175,15 +1186,40 @@ export const PermissionsArray: { category: PermissionCategories.SCHEMAS, entity: PermissionEntities.RULE, action: PermissionActions.CREATE, - disabled: false + disabled: false, + dependOn: [ + Permissions.SCHEMAS_RULE_READ + ] }, { name: Permissions.SCHEMAS_RULE_EXECUTE, category: PermissionCategories.SCHEMAS, entity: PermissionEntities.RULE, action: PermissionActions.EXECUTE, + disabled: false, + dependOn: [ + Permissions.SCHEMAS_RULE_READ + ] + }, + + //SCHEMA RULE + { + name: Permissions.FORMULAS_FORMULA_READ, + category: PermissionCategories.FORMULAS, + entity: PermissionEntities.FORMULA, + action: PermissionActions.READ, disabled: false }, + { + name: Permissions.FORMULAS_FORMULA_CREATE, + category: PermissionCategories.FORMULAS, + entity: PermissionEntities.FORMULA, + action: PermissionActions.CREATE, + disabled: false, + dependOn: [ + Permissions.FORMULAS_FORMULA_READ + ] + }, //ACCESS { name: Permissions.ACCESS_POLICY_ALL, @@ -1326,6 +1362,8 @@ export const SRDefaultPermission: Permissions[] = [ Permissions.SCHEMAS_RULE_CREATE, Permissions.SCHEMAS_RULE_READ, Permissions.SCHEMAS_RULE_EXECUTE, + Permissions.FORMULAS_FORMULA_CREATE, + Permissions.FORMULAS_FORMULA_READ, ]; export const AuditDefaultPermission: Permissions[] = [ diff --git a/logger-service/package.json b/logger-service/package.json index 478e46123b..fcc6b715e6 100644 --- a/logger-service/package.json +++ b/logger-service/package.json @@ -5,8 +5,8 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "^3.0.0", - "@guardian/interfaces": "^3.0.0", + "@guardian/common": "^3.1.0-rc", + "@guardian/interfaces": "^3.1.0-rc", "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", "@nestjs/common": "^9.4.1", @@ -31,7 +31,7 @@ "@types/fs-extra": "^9.0.12", "@types/gulp": "^4", "@types/gulp-rename": "^2", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "chai": "4.3.6", "mocha": "^9.2.0", "mocha-junit-reporter": "^2.0.2", @@ -57,5 +57,5 @@ "watch": "nodemon src/index.ts" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/mrv-sender/package.json b/mrv-sender/package.json index 513cb58137..5b31b4fe04 100644 --- a/mrv-sender/package.json +++ b/mrv-sender/package.json @@ -5,7 +5,7 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "^3.0.0", + "@guardian/common": "^3.1.0-rc", "@transmute/credentials-context": "0.7.0-unstable.80", "@transmute/did-context": "0.7.0-unstable.80", "@transmute/ed25519-signature-2018": "0.7.0-unstable.80", @@ -44,5 +44,5 @@ "start": "node dist/index.js" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/notification-service/package.json b/notification-service/package.json index 1f3be4b7c6..5517007d5f 100644 --- a/notification-service/package.json +++ b/notification-service/package.json @@ -5,8 +5,8 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "^3.0.0", - "@guardian/interfaces": "^3.0.0", + "@guardian/common": "^3.1.0-rc", + "@guardian/interfaces": "^3.1.0-rc", "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", "@nestjs/common": "^9.4.1", @@ -30,7 +30,7 @@ "@types/fs-extra": "^9.0.12", "@types/gulp": "^4", "@types/gulp-rename": "^2", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "chai": "4.3.6", "mocha": "^9.2.0", "mocha-junit-reporter": "^2.0.2", @@ -56,5 +56,5 @@ "watch": "nodemon src/index.ts" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/package.json b/package.json index 44da8996d1..1f57984936 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "indexer-service", "indexer-worker-service" ], - "version": "3.0.0", + "version": "3.1.0-rc", "devDependencies": { "detect-secrets": "^1.0.6" }, diff --git a/policy-service/package.json b/policy-service/package.json index 74cdce22f1..56dc32eb3e 100644 --- a/policy-service/package.json +++ b/policy-service/package.json @@ -15,8 +15,8 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "3.0.0", - "@guardian/interfaces": "3.0.0", + "@guardian/common": "3.1.0-rc", + "@guardian/interfaces": "3.1.0-rc", "@hashgraph/sdk": "2.52.0", "@mattrglobal/jsonld-signatures-bbs": "^1.1.2", "@meeco/cryppo": "2.0.2", @@ -62,7 +62,7 @@ "@types/fs-extra": "^9.0.12", "@types/gulp": "^4", "@types/gulp-rename": "^2", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "chai": "4.3.4", "gulp": "^4.0.2", "gulp-copy": "^4.0.1", @@ -99,5 +99,5 @@ "test:stability": "mocha tests/stability.test.js" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/queue-service/package.json b/queue-service/package.json index f236959618..acc3425e64 100644 --- a/queue-service/package.json +++ b/queue-service/package.json @@ -2,8 +2,8 @@ "author": "Envision Blockchain Solutions ", "dependencies": { "@filebase/client": "^0.0.5", - "@guardian/common": "^3.0.0", - "@guardian/interfaces": "^3.0.0", + "@guardian/common": "^3.1.0-rc", + "@guardian/interfaces": "^3.1.0-rc", "@hashgraph/sdk": "2.52.0", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", @@ -32,7 +32,7 @@ "devDependencies": { "@types/gulp": "^4", "@types/gulp-rename": "^2", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "chai": "4.3.4", "concurrently": "^8.2.2", "gulp": "^4.0.2", @@ -66,5 +66,5 @@ }, "type": "module", "types": "dist/index.d.ts", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/swagger-indexer.yaml b/swagger-indexer.yaml index 1c49089b1f..c6ea8c3ac8 100644 --- a/swagger-indexer.yaml +++ b/swagger-indexer.yaml @@ -124,6 +124,13 @@ paths: example: 0.0.4481265 schema: type: string + - name: options.attributes.OrganizationName + required: false + in: query + description: Registry organization name + example: Example + schema: + type: string responses: '200': description: Registries @@ -172,6 +179,33 @@ paths: schema: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 + /entities/registries/{messageId}/relationships: + get: + operationId: EntityApi_getRegistriesRelationships + summary: Get registry relationships + description: Returns registry relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Registry relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 /entities/registry-users: get: operationId: EntityApi_getRegistryUsers @@ -399,6 +433,33 @@ paths: schema: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 + /entities/policies/{messageId}/relationships: + get: + operationId: EntityApi_getPolicyRelationships + summary: Get policy relationships + description: Returns policy relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Policy relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 /entities/tools: get: operationId: EntityApi_getTools @@ -926,6 +987,16 @@ paths: did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 schema: type: string + - name: options.role + required: true + in: query + schema: + type: string + - name: analytics.sr + required: true + in: query + schema: + type: string - name: topicId required: false in: query @@ -1463,6 +1534,146 @@ paths: schema: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 + /entities/formulas: + get: + operationId: EntityApi_getFormulas + summary: Get formulas + description: Returns formulas + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search formulas, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Policy topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.owner + required: false + in: query + description: formula owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + responses: + '200': + description: formulas + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/FormulaDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/formulas/{messageId}: + get: + operationId: EntityApi_getFormula + summary: Get formula + description: Returns formula + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Formula details + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/formulas/{messageId}/relationships: + get: + operationId: EntityApi_getFormulaRelationships + summary: Get formula relationships + description: Returns formula relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Formula relationships + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaRelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 /entities/did-documents: get: operationId: EntityApi_getDidDocuments @@ -2270,7 +2481,7 @@ paths: summary: Get landing page analytics description: >- Returns count of registries, methodologies, projects, totalIssuance, - date + totalSerialized, totalFungible, date parameters: [] responses: '200': @@ -2311,6 +2522,28 @@ paths: schema: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 + /landing/data-loading-progress: + get: + operationId: LandingApi_getDataLoadingProgress + summary: Get data loading progress + description: Returns the number of messages loaded and the total number of messages + parameters: [] + responses: + '200': + description: Data loading progress result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DataLoadingProgress' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 /analytics/search/policy: post: operationId: AnalyticsApi_search @@ -2394,6 +2627,47 @@ paths: schema: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_2 + /settings/network: + get: + operationId: SettingsApi_getNetworkEnvironment + summary: Get Hedera network + description: Returns Hedera network + parameters: [] + responses: + '200': + description: Hedera network result + content: + application/json: + schema: + type: string + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_3 + - settings + /settings/networkExplorer: + get: + operationId: SettingsApi_getNetworkExplorer + summary: Get Hedera network explorer settings + description: Returns Hedera network explorer settings + parameters: [] + responses: + '200': + description: Hedera network explorer settings result + content: + application/json: + schema: + type: string + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 info: title: Guardian description: >- @@ -2544,21 +2818,21 @@ components: description: Status message files: description: Files - example: &ref_3 + example: &ref_4 - QmYtKEVfpbDwn7XLHjnjap224ESi3vLiYpkbWoabnxs6cX type: array items: type: string topics: description: Topics - example: &ref_4 + example: &ref_5 - 0.0.4481265 type: array items: type: string tokens: description: Tokens - example: &ref_5 + example: &ref_6 - 0.0.4481265 type: array items: @@ -2592,6 +2866,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Standard Registry action: type: string @@ -2634,6 +2909,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: Init options: $ref: '#/components/schemas/RegistryOptionsDTO' @@ -2802,25 +3078,7 @@ components: - item - row - activity - RegistryUserOptionsDTO: - type: object - properties: - did: - type: string - description: DID - example: >- - did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 - required: - - did - RegistryUserAnalyticsDTO: - type: object - properties: - textSearch: - type: string - description: Text search - required: - - textSearch - RegistryUserGridDTO: + MessageDTO: type: object properties: id: @@ -2864,19 +3122,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -2884,14 +3142,215 @@ components: type: number description: SequenceNumber example: 0 - type: - type: string - description: Type - enum: - - EVC-Document - - VC-Document - - DID-Document - - Schema + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber + RelationshipDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + - Guardian-Role-Document + - User-Permissions + - Policy-Statistic + - Policy-Label + - Formula + category: + type: number + description: Category + example: 1 + name: + type: string + description: Name + example: Monitoring Report Document + required: + - id + - uuid + - type + - category + - name + RelationshipLinkDTO: + type: object + properties: + source: + type: string + description: Source message identifier + example: '1706823227.586179534' + target: + type: string + description: Target message identifier + example: '1706823227.586179534' + required: + - source + - target + RelationshipsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + item: + $ref: '#/components/schemas/MessageDTO' + target: + $ref: '#/components/schemas/RelationshipDTO' + relationships: + type: array + items: + $ref: '#/components/schemas/RelationshipDTO' + links: + type: array + items: + $ref: '#/components/schemas/RelationshipLinkDTO' + categories: + description: Categories + example: + - name: Registry + - name: Policy + - name: Schema + - name: Role + - name: VC + - name: VP + - name: Token + type: array + items: + type: string + required: + - id + - item + - target + - relationships + - links + - categories + RegistryUserOptionsDTO: + type: object + properties: + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - did + RegistryUserAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + RegistryUserGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_4 + type: array + items: + type: string + topics: + description: Topics + example: *ref_5 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_6 + type: array + items: + type: string + sequenceNumber: + type: number + description: SequenceNumber + example: 0 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema - schema-document - Policy - Instance-Policy @@ -2909,6 +3368,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: DID-Document action: type: string @@ -2951,6 +3411,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: create-did-document options: $ref: '#/components/schemas/RegistryUserOptionsDTO' @@ -3019,19 +3480,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -3064,6 +3525,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: DID-Document action: type: string @@ -3106,6 +3568,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: create-did-document options: $ref: '#/components/schemas/RegistryUserOptionsDTO' @@ -3352,19 +3815,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -3397,6 +3860,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Policy action: type: string @@ -3439,6 +3903,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: publish-policy options: $ref: '#/components/schemas/PolicyOptionsDTO' @@ -3482,11 +3947,16 @@ components: type: number description: Roles example: 10 + formulas: + type: number + description: Formulas + example: 10 required: - schemas - vcs - vps - roles + - formulas PolicyDetailsDTO: type: object properties: @@ -3602,19 +4072,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -3647,6 +4117,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Tool action: type: string @@ -3689,6 +4160,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: publish-tool options: $ref: '#/components/schemas/ToolOptionsDTO' @@ -3832,19 +4304,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -3877,6 +4349,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Module action: type: string @@ -3919,6 +4392,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: publish-module options: $ref: '#/components/schemas/ModuleOptionsDTO' @@ -4055,19 +4529,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -4100,6 +4574,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Schema action: type: string @@ -4142,6 +4617,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: publish-schema options: $ref: '#/components/schemas/SchemaOptionsDTO' @@ -4248,19 +4724,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -4293,6 +4769,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Schema action: type: string @@ -4335,6 +4812,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: publish-schema options: $ref: '#/components/schemas/SchemaOptionsDTO' @@ -4644,19 +5122,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -4689,6 +5167,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: VP-Document action: type: string @@ -4731,6 +5210,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: create-vp-document options: $ref: '#/components/schemas/VPOptionsDTO' @@ -4858,19 +5338,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -4903,6 +5383,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Role-Document action: type: string @@ -4945,6 +5426,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: create-vc-document options: $ref: '#/components/schemas/RoleOptionsDTO' @@ -5083,19 +5565,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -5128,6 +5610,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Policy-Label action: type: string @@ -5170,6 +5653,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: publish-policy-label options: $ref: '#/components/schemas/StatisticOptionsDTO' @@ -5325,19 +5809,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -5370,6 +5854,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: VC-Document action: type: string @@ -5412,6 +5897,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: create-vc-document options: $ref: '#/components/schemas/VCOptionsDTO' @@ -5533,19 +6019,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -5578,6 +6064,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Policy-Label action: type: string @@ -5620,6 +6107,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: publish-policy-label options: $ref: '#/components/schemas/LabelOptionsDTO' @@ -5755,19 +6243,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -5800,6 +6288,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: VP-Document action: type: string @@ -5842,6 +6331,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: create-vp-document options: $ref: '#/components/schemas/VPOptionsDTO' @@ -5863,33 +6353,60 @@ components: - type - action - options - DIDOptionsDTO: + FormulaOptionsDTO: type: object properties: - relationships: - description: Relationships - example: - - '1706823227.586179534' - type: array - items: - type: string - did: + uuid: type: string - description: DID + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Formula Name + description: + type: string + description: Description + example: Formula Description + owner: + type: string + description: Owner example: >- did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + policyTopicId: + type: string + description: Policy topic identifier + example: 0.0.4481265 + policyInstanceTopicId: + type: string + description: Policy instance topic identifier + example: 0.0.4481265 required: - - relationships - - did - DIDAnalyticsDTO: + - uuid + - name + - description + - owner + - policyTopicId + - policyInstanceTopicId + FormulaAnalyticsDTO: type: object properties: textSearch: type: string description: Text search + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + config: + type: object + description: Formula Config required: - textSearch - DIDGridDTO: + - owner + - config + FormulaDTO: type: object properties: id: @@ -5933,19 +6450,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -5978,7 +6495,8 @@ components: - User-Permissions - Policy-Statistic - Policy-Label - example: DID-Document + - Formula + example: Formula action: type: string description: Action @@ -6020,11 +6538,12 @@ components: - create-assessment-document - publish-policy-label - create-label-document - example: create-did-document + - publish-formula + example: publish-formula options: - $ref: '#/components/schemas/DIDOptionsDTO' + $ref: '#/components/schemas/FormulaOptionsDTO' analytics: - $ref: '#/components/schemas/DIDAnalyticsDTO' + $ref: '#/components/schemas/FormulaAnalyticsDTO' required: - id - topicId @@ -6044,7 +6563,92 @@ components: - action - options - analytics - DIDDetailsItemDTO: + FormulaActivityDTO: + type: object + properties: + schemas: + type: number + description: Schemas + example: 10 + vps: + type: number + description: VPs + example: 10 + required: + - schemas + - vps + FormulaDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/FormulaDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/FormulaActivityDTO' + required: + - id + - uuid + - item + - row + - activity + FormulaRelationshipsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + item: + $ref: '#/components/schemas/MessageDTO' + schemas: + type: array + items: + $ref: '#/components/schemas/MessageDTO' + formulas: + type: array + items: + $ref: '#/components/schemas/MessageDTO' + required: + - id + - item + - schemas + - formulas + DIDOptionsDTO: + type: object + properties: + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - relationships + - did + DIDAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + DIDGridDTO: type: object properties: id: @@ -6088,19 +6692,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -6133,6 +6737,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: DID-Document action: type: string @@ -6175,19 +6780,12 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: create-did-document options: $ref: '#/components/schemas/DIDOptionsDTO' analytics: $ref: '#/components/schemas/DIDAnalyticsDTO' - documents: - type: array - description: Documents - items: - type: string - example: - - >- - "{"@context":"https://www.w3.org/ns/did/v1","id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","verificationMethod":[{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key","type":"Ed25519VerificationKey2018","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"8WkE4uKLN7i9RnzeoUJfxSH9Jw8M1yTzKk6rtwVa6uGP"},{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key-bbs","type":"Bls12381G2Key2020","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"237NDsUq7LAmSMzE6CEBFyuz9s2sscSz2M6cn4zUKPmJ5Q6rMh6SLRGC3EDdna7vSKwHMCGjhCiLKM6qYU7ZeYKRPNnRMcadoJbSQ44SGAAiyrpmhX8aaoTZpMdHmGFVXdqC"}],"authentication":["did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key"],"assertionMethod":["#did-root-key","#did-root-key-bbs"]}" required: - id - topicId @@ -6207,33 +6805,7 @@ components: - action - options - analytics - - documents - DIDDetailsDTO: - type: object - properties: - id: - type: string - description: Message identifier - example: '1706823227.586179534' - uuid: - type: string - description: UUID - example: 93938a10-d032-4a9b-9425-092e58bffbf7 - item: - $ref: '#/components/schemas/DIDDetailsItemDTO' - row: - $ref: '#/components/schemas/RawMessageDTO' - history: - type: array - items: - $ref: '#/components/schemas/DIDDetailsItemDTO' - required: - - id - - uuid - - item - - row - - history - MessageDTO: + DIDDetailsItemDTO: type: object properties: id: @@ -6277,19 +6849,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -6297,32 +6869,6 @@ components: type: number description: SequenceNumber example: 0 - required: - - id - - topicId - - consensusTimestamp - - owner - - uuid - - status - - statusReason - - lang - - responseType - - statusMessage - - files - - topics - - tokens - - sequenceNumber - RelationshipDTO: - type: object - properties: - id: - type: string - description: Message identifier - example: '1706823227.586179534' - uuid: - type: string - description: UUID - example: 93938a10-d032-4a9b-9425-092e58bffbf7 type: type: string description: Type @@ -6348,72 +6894,108 @@ components: - User-Permissions - Policy-Statistic - Policy-Label - category: - type: number - description: Category - example: 1 - name: + - Formula + example: DID-Document + action: type: string - description: Name - example: Monitoring Report Document + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + - create-role + - update-role + - delete-role + - set-role + - publish-policy-statistic + - create-assessment-document + - publish-policy-label + - create-label-document + - publish-formula + example: create-did-document + options: + $ref: '#/components/schemas/DIDOptionsDTO' + analytics: + $ref: '#/components/schemas/DIDAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"@context":"https://www.w3.org/ns/did/v1","id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","verificationMethod":[{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key","type":"Ed25519VerificationKey2018","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"8WkE4uKLN7i9RnzeoUJfxSH9Jw8M1yTzKk6rtwVa6uGP"},{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key-bbs","type":"Bls12381G2Key2020","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"237NDsUq7LAmSMzE6CEBFyuz9s2sscSz2M6cn4zUKPmJ5Q6rMh6SLRGC3EDdna7vSKwHMCGjhCiLKM6qYU7ZeYKRPNnRMcadoJbSQ44SGAAiyrpmhX8aaoTZpMdHmGFVXdqC"}],"authentication":["did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key"],"assertionMethod":["#did-root-key","#did-root-key-bbs"]}" required: - id + - topicId + - consensusTimestamp + - owner - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - sequenceNumber - type - - category - - name - RelationshipLinkDTO: - type: object - properties: - source: - type: string - description: Source message identifier - example: '1706823227.586179534' - target: - type: string - description: Target message identifier - example: '1706823227.586179534' - required: - - source - - target - RelationshipsDTO: + - action + - options + - analytics + - documents + DIDDetailsDTO: type: object properties: id: type: string description: Message identifier example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 item: - $ref: '#/components/schemas/MessageDTO' - target: - $ref: '#/components/schemas/RelationshipDTO' - relationships: - type: array - items: - $ref: '#/components/schemas/RelationshipDTO' - links: - type: array - items: - $ref: '#/components/schemas/RelationshipLinkDTO' - categories: - description: Categories - example: - - name: Registry - - name: Policy - - name: Schema - - name: Role - - name: VC - - name: VP + $ref: '#/components/schemas/DIDDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: type: array items: - type: string + $ref: '#/components/schemas/DIDDetailsItemDTO' required: - id + - uuid - item - - target - - relationships - - links - - categories + - row + - history VPDetailsDTO: type: object properties: @@ -6488,19 +7070,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -6533,6 +7115,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: VC-Document action: type: string @@ -6575,6 +7158,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: create-vc-document options: $ref: '#/components/schemas/VCOptionsDTO' @@ -6683,6 +7267,9 @@ components: - law - tags additionalProperties: false + formulasData: + type: object + description: Formulas data required: - id - uuid @@ -6690,6 +7277,7 @@ components: - row - history - schema + - formulasData NFTDTO: type: object properties: @@ -6861,19 +7449,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -6906,6 +7494,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Topic action: type: string @@ -6948,6 +7537,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: create-topic options: $ref: '#/components/schemas/TopicOptionsDTO' @@ -7167,19 +7757,19 @@ components: description: Status message files: description: Files - example: *ref_3 + example: *ref_4 type: array items: type: string topics: description: Topics - example: *ref_4 + example: *ref_5 type: array items: type: string tokens: description: Tokens - example: *ref_5 + example: *ref_6 type: array items: type: string @@ -7212,6 +7802,7 @@ components: - User-Permissions - Policy-Statistic - Policy-Label + - Formula example: Contract action: type: string @@ -7254,6 +7845,7 @@ components: - create-assessment-document - publish-policy-label - create-label-document + - publish-formula example: create-contract options: $ref: '#/components/schemas/ContractOptionsDTO' @@ -7335,6 +7927,14 @@ components: type: number description: Total issuance example: '10' + totalSerialized: + type: number + description: Total serialized + example: '10' + totalFungible: + type: number + description: Total fungible + example: '10' date: format: date-time type: string @@ -7345,6 +7945,8 @@ components: - methodologies - projects - totalIssuance + - totalSerialized + - totalFungible - date ProjectCoordinatesDTO: type: object @@ -7360,6 +7962,9 @@ components: required: - coordinates - projectId + DataLoadingProgress: + type: object + properties: {} SearchPolicyBlocksDTO: type: object properties: diff --git a/swagger.yaml b/swagger.yaml index 40bc9705db..ba7617e781 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -6601,9 +6601,9 @@ paths: /policies/{policyId}/savepoint/create: post: operationId: PolicyApi_createSavepoint - summary: Create dru-run savepoint. + summary: Create dry-run savepoint. description: >- - Create dru-run savepoint. Only users with the Standard Registry role are + Create dry-run savepoint. Only users with the Standard Registry role are allowed to make the request. parameters: - name: policyId @@ -6639,9 +6639,9 @@ paths: /policies/{policyId}/savepoint/delete: post: operationId: PolicyApi_deleteSavepoint - summary: Delete dru-run savepoint. + summary: Delete dry-run savepoint. description: >- - Delete dru-run savepoint. Only users with the Standard Registry role are + Delete dry-run savepoint. Only users with the Standard Registry role are allowed to make the request. parameters: - name: policyId @@ -6675,11 +6675,48 @@ paths: security: - bearer: [] /policies/{policyId}/savepoint/restore: + get: + operationId: PolicyApi_getSavepointState + summary: Get savepoint state. + description: >- + Get savepoint state. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: . + content: + application/json: + schema: + type: string + responses: + '200': + description: . + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] post: operationId: PolicyApi_restoreSavepoint - summary: Restore dru-run savepoint. + summary: Restore dry-run savepoint. description: >- - Restore dru-run savepoint. Only users with the Standard Registry role + Restore dry-run savepoint. Only users with the Standard Registry role are allowed to make the request. parameters: - name: policyId @@ -13086,18 +13123,20 @@ paths: parameters: [] requestBody: required: true - description: Configuration. + description: Options. content: application/json: schema: - $ref: '#/components/schemas/SchemaRuleDataDTO' + $ref: '#/components/schemas/SchemaRuleOptionsDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/SchemaRuleDataDTO' + type: array + items: + $ref: '#/components/schemas/SchemaRuleDataDTO' '401': description: Unauthorized. '403': @@ -13213,6 +13252,400 @@ paths: tags: *ref_28 security: - bearer: [] + /formulas: + post: + operationId: FormulasApi_createFormula + summary: Creates a new formula. + description: Creates a new formula. + parameters: [] + requestBody: + required: true + description: Configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_29 + - formulas + security: + - bearer: [] + get: + operationId: FormulasApi_getFormulas + summary: Return a list of all formulas. + description: Returns all formulas. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: policyId + required: false + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/{formulaId}: + get: + operationId: FormulasApi_getFormulaById + summary: Retrieves formula. + description: Retrieves formula for the specified ID. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + put: + operationId: FormulasApi_updateFormula + summary: Updates formula. + description: Updates formula configuration for the specified formula ID. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains a configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + delete: + operationId: FormulasApi_deleteFormula + summary: Deletes the formula. + description: Deletes the formula with the provided ID. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/{formulaId}/relationships: + get: + operationId: FormulasApi_getSchemaRuleRelationships + summary: Retrieves Formula relationships. + description: Retrieves Formula relationships for the specified ID. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaRelationshipsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/{policyId}/import/file: + post: + operationId: FormulasApi_importFormula + summary: Imports new formula from a zip file. + description: Imports new formula from the provided zip file into the local DB. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A zip file containing formula to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/{formulaId}/export/file: + get: + operationId: FormulasApi_exportFormula + summary: Returns a zip file containing formula. + description: Returns a zip file containing formula. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/import/file/preview: + post: + operationId: FormulasApi_previewFormula + summary: Imports a zip file containing formula. + description: Imports a zip file containing formula. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Formula preview. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/{formulaId}/publish: + put: + operationId: FormulasApi_publishPolicyLabel + summary: Publishes formula. + description: Publishes formula for the specified formula ID. + parameters: + - name: formulaId + required: true + in: path + description: Formula Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] + /formulas/data: + post: + operationId: FormulasApi_getSchemaRuleData + summary: '' + description: '' + parameters: [] + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulasOptionsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/FormulasDataDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_29 + security: + - bearer: [] /policy-labels: post: operationId: PolicyLabelsApi_createPolicyLabel @@ -13243,7 +13676,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_29 + tags: &ref_30 - policy-labels security: - bearer: [] @@ -13299,7 +13732,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/{definitionId}: @@ -13332,7 +13765,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] put: @@ -13371,7 +13804,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] delete: @@ -13403,7 +13836,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/{definitionId}/publish: @@ -13436,7 +13869,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/push/{definitionId}/publish: @@ -13469,7 +13902,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/{definitionId}/relationships: @@ -13502,7 +13935,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/{policyId}/import/file: @@ -13542,7 +13975,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/{definitionId}/export/file: @@ -13571,7 +14004,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/import/file/preview: @@ -13604,7 +14037,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/components: @@ -13633,7 +14066,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/{definitionId}/tokens: @@ -13689,7 +14122,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/{definitionId}/tokens/{documentId}: @@ -13736,7 +14169,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/{definitionId}/documents: @@ -13776,7 +14209,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] get: @@ -13831,7 +14264,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/{definitionId}/documents/{documentId}: @@ -13871,7 +14304,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /policy-labels/{definitionId}/documents/{documentId}/relationships: @@ -13911,7 +14344,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_29 + tags: *ref_30 security: - bearer: [] /worker-tasks: @@ -13960,7 +14393,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_30 + tags: &ref_31 - worker-tasks security: - bearer: [] @@ -13983,7 +14416,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_30 + tags: *ref_31 security: - bearer: [] /worker-tasks/delete/{taskId}: @@ -14012,7 +14445,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_30 + tags: *ref_31 security: - bearer: [] info: @@ -14497,19 +14930,19 @@ components: example: username role: type: string - enum: &ref_39 + enum: &ref_40 - STANDARD_REGISTRY - USER - AUDITOR example: USER permissionsGroup: - example: &ref_40 + example: &ref_41 - {} type: array items: type: string permissions: - example: &ref_41 + example: &ref_42 - POLICIES_POLICY_READ type: array items: @@ -14694,35 +15127,35 @@ components: type: object properties: idLvl: - oneOf: &ref_31 + oneOf: &ref_32 - type: string - type: number - enum: &ref_32 + enum: &ref_33 - 0 - 1 example: 0 eventsLvl: - oneOf: &ref_33 + oneOf: &ref_34 - type: string - type: number - enum: &ref_34 + enum: &ref_35 - 0 - 1 example: 0 propLvl: - oneOf: &ref_35 + oneOf: &ref_36 - type: string - type: number - enum: &ref_36 + enum: &ref_37 - 0 - 1 - 2 example: 0 childrenLvl: - oneOf: &ref_37 + oneOf: &ref_38 - type: string - type: number - enum: &ref_38 + enum: &ref_39 - 0 - 1 - 2 @@ -14786,20 +15219,20 @@ components: type: object properties: idLvl: - oneOf: *ref_31 - enum: *ref_32 + oneOf: *ref_32 + enum: *ref_33 example: 0 eventsLvl: - oneOf: *ref_33 - enum: *ref_34 + oneOf: *ref_34 + enum: *ref_35 example: 0 propLvl: - oneOf: *ref_35 - enum: *ref_36 + oneOf: *ref_36 + enum: *ref_37 example: 0 childrenLvl: - oneOf: *ref_37 - enum: *ref_38 + oneOf: *ref_38 + enum: *ref_39 example: 0 moduleId1: type: string @@ -14913,20 +15346,20 @@ components: type: object properties: idLvl: - oneOf: *ref_31 - enum: *ref_32 + oneOf: *ref_32 + enum: *ref_33 example: 0 eventsLvl: - oneOf: *ref_33 - enum: *ref_34 + oneOf: *ref_34 + enum: *ref_35 example: 0 propLvl: - oneOf: *ref_35 - enum: *ref_36 + oneOf: *ref_36 + enum: *ref_37 example: 0 childrenLvl: - oneOf: *ref_37 - enum: *ref_38 + oneOf: *ref_38 + enum: *ref_39 example: 0 documentId1: type: string @@ -14961,20 +15394,20 @@ components: type: object properties: idLvl: - oneOf: *ref_31 - enum: *ref_32 + oneOf: *ref_32 + enum: *ref_33 example: 0 eventsLvl: - oneOf: *ref_33 - enum: *ref_34 + oneOf: *ref_34 + enum: *ref_35 example: 0 propLvl: - oneOf: *ref_35 - enum: *ref_36 + oneOf: *ref_36 + enum: *ref_37 example: 0 childrenLvl: - oneOf: *ref_37 - enum: *ref_38 + oneOf: *ref_38 + enum: *ref_39 example: 0 toolId1: type: string @@ -15725,15 +16158,15 @@ components: example: username role: type: string - enum: *ref_39 + enum: *ref_40 example: USER permissionsGroup: - example: *ref_40 + example: *ref_41 type: array items: type: string permissions: - example: *ref_41 + example: *ref_42 type: array items: type: string @@ -17022,7 +17455,7 @@ components: #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 permissions: type: string - enum: &ref_42 + enum: &ref_43 - ANALYTIC_POLICY_READ - ANALYTIC_MODULE_READ - ANALYTIC_TOOL_READ @@ -17077,6 +17510,8 @@ components: - SCHEMAS_RULE_READ - SCHEMAS_RULE_CREATE - SCHEMAS_RULE_EXECUTE + - FORMULAS_FORMULA_READ + - FORMULAS_FORMULA_CREATE - ACCESS_POLICY_ALL - ACCESS_POLICY_ASSIGNED - ACCESS_POLICY_PUBLISHED @@ -17095,7 +17530,7 @@ components: properties: name: type: string - enum: *ref_42 + enum: *ref_43 example: ANALYTIC_POLICY_READ category: type: string @@ -17123,6 +17558,7 @@ components: - ACCESS - DELEGATION - STATISTICS + - FORMULAS example: ANALYTIC entity: type: string @@ -17163,6 +17599,7 @@ components: - STATISTIC - RULE - LABEL + - FORMULA example: POLICY action: type: string @@ -17380,6 +17817,21 @@ components: type: array items: $ref: '#/components/schemas/SchemaDTO' + SchemaRuleOptionsDTO: + type: object + properties: + policyId: + type: string + example: '000000000000000000000001' + schemaId: + type: string + example: '000000000000000000000001' + documentId: + type: string + example: '000000000000000000000001' + parentId: + type: string + example: '000000000000000000000001' SchemaRuleDataDTO: type: object properties: @@ -17391,6 +17843,99 @@ components: type: array items: $ref: '#/components/schemas/VcDocumentDTO' + FormulaDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tool name + description: + type: string + example: Description + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + messageId: + type: string + example: '0000000000.000000001' + policyId: + type: string + example: '000000000000000000000001' + policyTopicId: + type: string + example: 0.0.1 + policyInstanceTopicId: + type: string + example: 0.0.1 + status: + type: string + enum: + - DRAFT + - PUBLISHED + - ERROR + - ACTIVE + example: DRAFT + config: + type: object + nullable: true + required: + - name + FormulaRelationshipsDTO: + type: object + properties: + policy: + $ref: '#/components/schemas/PolicyDTO' + schemas: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + formulas: + type: array + items: + $ref: '#/components/schemas/FormulaDTO' + FormulasDataDTO: + type: object + properties: + formulas: + type: array + items: + $ref: '#/components/schemas/FormulaDTO' + document: + $ref: '#/components/schemas/VcDocumentDTO' + relationships: + type: array + items: + $ref: '#/components/schemas/VcDocumentDTO' + schemas: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + FormulasOptionsDTO: + type: object + properties: + policyId: + type: string + example: '000000000000000000000001' + schemaId: + type: string + example: '000000000000000000000001' + documentId: + type: string + example: '000000000000000000000001' + parentId: + type: string + example: '000000000000000000000001' PolicyLabelDTO: type: object properties: diff --git a/topic-viewer/package.json b/topic-viewer/package.json index ef640c4d4d..b5c4aef47e 100644 --- a/topic-viewer/package.json +++ b/topic-viewer/package.json @@ -30,5 +30,5 @@ "start": "node dist/index.js" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/tree-viewer/package.json b/tree-viewer/package.json index dbd41a0787..0a3e5e0ee6 100644 --- a/tree-viewer/package.json +++ b/tree-viewer/package.json @@ -28,5 +28,5 @@ "start": "node dist/index.js" }, "type": "module", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/worker-service/configs/.env.worker.develop b/worker-service/configs/.env.worker.develop index 72623c6a2e..059e5d28f2 100644 --- a/worker-service/configs/.env.worker.develop +++ b/worker-service/configs/.env.worker.develop @@ -15,7 +15,7 @@ TASK_TIMEOUT="300" REFRESH_INTERVAL="60" IPFS_TIMEOUT="720" IPFS_PROVIDER="web3storage" # 'filebase', 'web3storage' or 'local' -IPFS_PUBLIC_GATEWAY='https://w3s.link/ipfs/${cid}' +IPFS_PUBLIC_GATEWAY='http://localhost:8080/ipfs/${cid}' IPFS_NODE_ADDRESS="http://localhost:5001" ANALYTICS_SERVICE="http://localhost:3021" #ANALYTICS_SERVICE_TOKEN="" # mandatory to be able to use the MGS indexer diff --git a/worker-service/package.json b/worker-service/package.json index a2a1144bca..2b368b6fc0 100644 --- a/worker-service/package.json +++ b/worker-service/package.json @@ -2,8 +2,8 @@ "author": "Envision Blockchain Solutions ", "dependencies": { "@filebase/client": "^0.0.5", - "@guardian/common": "^3.0.0", - "@guardian/interfaces": "^3.0.0", + "@guardian/common": "^3.1.0-rc", + "@guardian/interfaces": "^3.1.0-rc", "@hashgraph/sdk": "2.52.0", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", @@ -33,7 +33,7 @@ "devDependencies": { "@types/gulp": "^4", "@types/gulp-rename": "^2", - "@types/node": "^18.16.0", + "@types/node": "^22.10.10", "chai": "4.3.4", "concurrently": "^8.2.2", "gulp": "^4.0.2", @@ -70,5 +70,5 @@ }, "type": "module", "types": "dist/index.d.ts", - "version": "3.0.0" + "version": "3.1.0-rc" } diff --git a/worker-service/src/api/worker.ts b/worker-service/src/api/worker.ts index 5917d70e8f..a2e3555b75 100644 --- a/worker-service/src/api/worker.ts +++ b/worker-service/src/api/worker.ts @@ -19,7 +19,6 @@ function rejectTimeout(t: number): Promise { }) } - function getAnalytycsHeaders() { const headers: any = {}; const token = process.env.ANALYTICS_SERVICE_TOKEN; diff --git a/yarn.lock b/yarn.lock index d7f233866e..c16351dafe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1292,13 +1292,20 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.9.tgz#7b903b6149b0f8fa7ad564af646c4c38a77fc44b" integrity sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA== -"@babel/runtime@^7.15.4", "@babel/runtime@^7.18.6", "@babel/runtime@^7.21.0": +"@babel/runtime@^7.15.4", "@babel/runtime@^7.21.0": version "7.23.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7" integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw== dependencies: regenerator-runtime "^0.14.0" +"@babel/runtime@^7.18.6": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.7.tgz#f4e7fe527cd710f8dc0618610b61b4b060c3c341" + integrity sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/runtime@^7.25.7": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1" @@ -1347,6 +1354,20 @@ ky "^0.25.1" ky-universal "^0.8.2" +"@digitalbazaar/http-client@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@digitalbazaar/http-client/-/http-client-3.4.1.tgz#5116fc44290d647cfe4b615d1f3fad9d6005e44d" + integrity sha512-Ahk1N+s7urkgj7WvvUND5f8GiWEPfUw0D41hdElaqLgu8wZScI8gdI0q+qWw5N1d35x7GCRH2uk9mi+Uzo9M3g== + dependencies: + ky "^0.33.3" + ky-universal "^0.11.0" + undici "^5.21.2" + +"@digitalbazaar/security-context@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@digitalbazaar/security-context/-/security-context-1.0.1.tgz#badc4b8da03411a32d4e7321ce7c4b355776b410" + integrity sha512-0WZa6tPiTZZF8leBtQgYAfXQePFQp2z5ivpCEN/iZguYYZ0TB9qRmWtan5XH6mNFuusHtMcyIzAcReyE6rZPhA== + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" @@ -1583,10 +1604,10 @@ resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff" integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== -"@fastify/busboy@^2.1.0": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d" - integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== +"@fastify/busboy@^3.0.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-3.1.1.tgz#af3aea7f1e52ec916d8b5c9dcc0f09d4c060a3fc" + integrity sha512-5DGmA8FTdB2XbDeEwc/5ZXBl6UbBAyBOOLlPuBnZ/N1SwdH9Ii+cOX3tBROlDgcTXxjOYnLMVoKk9+FXAw0CJw== "@fastify/cors@8.3.0": version "8.3.0" @@ -1596,16 +1617,21 @@ fastify-plugin "^4.0.0" mnemonist "0.39.5" -"@fastify/deepmerge@^1.0.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@fastify/deepmerge/-/deepmerge-1.3.0.tgz#8116858108f0c7d9fd460d05a7d637a13fe3239a" - integrity sha512-J8TOSBq3SoZbDhM9+R/u77hP93gz/rajSA+K2kGyijPpORPWUXHUpTaleoj+92As0S9uPRP7Oi8IqMf0u+ro6A== +"@fastify/deepmerge@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@fastify/deepmerge/-/deepmerge-2.0.1.tgz#68150cd7ab709b63a718aac8335561779b910032" + integrity sha512-hx+wJQr9Ph1hY/dyzY0SxqjumMyqZDlIF6oe71dpRKDHUg7dFQfjG94qqwQ274XRjmUrwKiYadex8XplNHx3CA== -"@fastify/error@^3.0.0", "@fastify/error@^3.2.0", "@fastify/error@^3.3.0": +"@fastify/error@^3.2.0", "@fastify/error@^3.3.0": version "3.4.1" resolved "https://registry.yarnpkg.com/@fastify/error/-/error-3.4.1.tgz#b14bb4cac3dd4ec614becbc643d1511331a6425c" integrity sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ== +"@fastify/error@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@fastify/error/-/error-4.0.0.tgz#7842d6161fbce78953638318be99033a0c2d5070" + integrity sha512-OO/SA8As24JtT1usTUTKgGH7uLvhfwZPwlptRi2Dp5P4KKmJI3gvsZ8MIHnNwDs4sLf/aai5LzTyl66xr7qMxA== + "@fastify/fast-json-stringify-compiler@^4.3.0": version "4.3.0" resolved "https://registry.yarnpkg.com/@fastify/fast-json-stringify-compiler/-/fast-json-stringify-compiler-4.3.0.tgz#5df89fa4d1592cbb8780f78998355feb471646d5" @@ -1638,14 +1664,14 @@ path-to-regexp "^6.1.0" reusify "^1.0.4" -"@fastify/multipart@^8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@fastify/multipart/-/multipart-8.2.0.tgz#90359b78eccd0f944cf145a2e907d167a3a6c731" - integrity sha512-OZ8nsyyoS2TV7Yeu3ZdrdDGsKUTAbfjrKC9jSxGgT2qdgek+BxpWX31ZubTrWMNZyU5xwk4ox6AvTjAbYWjrWg== +"@fastify/multipart@^8.3.1": + version "8.3.1" + resolved "https://registry.yarnpkg.com/@fastify/multipart/-/multipart-8.3.1.tgz#bd266584e026f812ab98f677e70171e0f1dd1812" + integrity sha512-pncbnG28S6MIskFSVRtzTKE9dK+GrKAJl0NbaQ/CG8ded80okWFsYKzSlP9haaLNQhNRDOoHqmGQNvgbiPVpWQ== dependencies: - "@fastify/busboy" "^2.1.0" - "@fastify/deepmerge" "^1.0.0" - "@fastify/error" "^3.0.0" + "@fastify/busboy" "^3.0.0" + "@fastify/deepmerge" "^2.0.0" + "@fastify/error" "^4.0.0" fastify-plugin "^4.0.0" secure-json-parse "^2.4.0" stream-wormhole "^1.1.0" @@ -1694,18 +1720,18 @@ streaming-iterables "^6.0.0" throttled-queue "^2.1.2" -"@formulajs/formulajs@^4.4.0": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@formulajs/formulajs/-/formulajs-4.4.1.tgz#c0219d3b12dda5931a989357eb90e2a2bad8f17d" - integrity sha512-SXQl1/NT8AoJ9mxAT6h8HGJtbVrF/jvvaHiJ1J2tsrb/HODRMF7mmTDr1Jfsi9E5aqreRWSEC0FJUDiNUedvGA== +"@formulajs/formulajs@4.4.6": + version "4.4.6" + resolved "https://registry.yarnpkg.com/@formulajs/formulajs/-/formulajs-4.4.6.tgz#c488cc67f81d51b4457f6b95ea6d5ce78e654b60" + integrity sha512-9wzWxMUFNW4RF6o0xJ7KM+oyyXUWKEErvn5c9Gu/Man6cobpG8svYeAvWiWXaT+c8dDa1erUdfH3Amd8oI9xPA== dependencies: bessel "^1.0.2" jstat "^1.9.6" -"@formulajs/formulajs@^4.4.6": - version "4.4.8" - resolved "https://registry.yarnpkg.com/@formulajs/formulajs/-/formulajs-4.4.8.tgz#69475c5b00c95d2e53d4a791d24f542f74585b73" - integrity sha512-U1xG4thAqdCVCrJgjNA/I4Bn8WvhMPIGidbm9zO1jowcXEX03eDIaYReWQIRxxTRPJeSl5nTVlzxQYDn1nL10Q== +"@formulajs/formulajs@^4.4.0": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@formulajs/formulajs/-/formulajs-4.4.1.tgz#c0219d3b12dda5931a989357eb90e2a2bad8f17d" + integrity sha512-SXQl1/NT8AoJ9mxAT6h8HGJtbVrF/jvvaHiJ1J2tsrb/HODRMF7mmTDr1Jfsi9E5aqreRWSEC0FJUDiNUedvGA== dependencies: bessel "^1.0.2" jstat "^1.9.6" @@ -4286,7 +4312,7 @@ dependencies: node-vault "*" -"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@^20.8.0": +"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.7.0": version "20.11.19" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.19.tgz#b466de054e9cb5b3831bee38938de64ac7f81195" integrity sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ== @@ -4303,13 +4329,20 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.63.tgz#1788fa8da838dbb5f9ea994b834278205db6ca2b" integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ== -"@types/node@^18.0.0", "@types/node@^18.11.18", "@types/node@^18.16.0": +"@types/node@^18.0.0", "@types/node@^18.11.18": version "18.19.17" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.17.tgz#a581a9fb4b2cfdbc61f008804f4436b2d5c40354" integrity sha512-SzyGKgwPzuWp2SHhlpXKzCX0pIOfcI4V2eF37nNBJOhwlegQ83omtVQ1XxZpDE06V/d6AQvfQdPfnw0tRC//Ng== dependencies: undici-types "~5.26.4" +"@types/node@^22.10.10": + version "22.12.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.12.0.tgz#bf8af3b2af0837b5a62a368756ff2b705ae0048c" + integrity sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA== + dependencies: + undici-types "~6.20.0" + "@types/normalize-package-data@^2.4.0": version "2.4.4" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" @@ -5377,6 +5410,11 @@ base-x@^4.0.0: resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== +base-x@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-5.0.0.tgz#6d835ceae379130e1a4cb846a70ac4746f28ea9b" + integrity sha512-sMW3VGSX1QWVFA6l8U62MLKz29rRfpTlYdCqLdpLo1/Yd4zZwSbnUaDfciIAowAqvq7YFnWq9hrhdg1KYgc1lQ== + base64-js@^1.0.2, base64-js@^1.1.2, base64-js@^1.3.0, base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -5721,6 +5759,13 @@ bs58@5.0.0: dependencies: base-x "^4.0.0" +bs58@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-6.0.0.tgz#a2cda0130558535dd281a2f8697df79caaf425d8" + integrity sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw== + dependencies: + base-x "^5.0.0" + bson@^4.0.4: version "4.7.2" resolved "https://registry.yarnpkg.com/bson/-/bson-4.7.2.tgz#320f4ad0eaf5312dd9b45dc369cc48945e2a5f2e" @@ -6353,12 +6398,7 @@ commander@^9.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== -complex.js@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/complex.js/-/complex.js-2.1.1.tgz#0675dac8e464ec431fb2ab7d30f41d889fb25c31" - integrity sha512-8njCHOTtFFLtegk6zQo0kkVX1rngygb/KQI6z1qZxlFI3scluC+LVTCFbrkWjBv4vvLlbQ9t88IPMC6k95VTTg== - -complex.js@^2.2.5: +complex.js@^2.1.1, complex.js@^2.2.5: version "2.4.2" resolved "https://registry.yarnpkg.com/complex.js/-/complex.js-2.4.2.tgz#76f260a9e7e232d8ad26348484a9b128c13fcc9a" integrity sha512-qtx7HRhPGSCBtGiST4/WGHuW+zeaND/6Ld+db6PbrulIB1i2Ev/2UPiqcmpQNPSyfBKraC0EOvOKCB5dGZKt3g== @@ -6725,7 +6765,12 @@ decamelize@^4.0.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== -decimal.js@^10.3.1, decimal.js@^10.4.3: +decimal.js@^10.3.1: + version "10.5.0" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.5.0.tgz#0f371c7cf6c4898ce0afb09836db73cd82010f22" + integrity sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw== + +decimal.js@^10.4.3: version "10.4.3" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== @@ -10339,6 +10384,16 @@ jsonld-checker@^0.1.6: jsonld "^5.2.0" node-fetch "^2.6.1" +jsonld-signatures@11.5.0: + version "11.5.0" + resolved "https://registry.yarnpkg.com/jsonld-signatures/-/jsonld-signatures-11.5.0.tgz#020ad488bd1977c5169de3d2a4cc28a76dec2663" + integrity sha512-Kdto+e8uvY/5u3HYkmAbpy52bplWX9uqS8fmqdCv6oxnCFwCTM0hMt6r4rWqlhw5/aHoCHJIRxwYb4QKGC69Jw== + dependencies: + "@digitalbazaar/security-context" "^1.0.0" + jsonld "^8.0.0" + rdf-canonize "^4.0.1" + serialize-error "^8.1.0" + jsonld-signatures@7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/jsonld-signatures/-/jsonld-signatures-7.0.0.tgz#4b2021422c16d25aa8a561d1806bd68a6130afa1" @@ -10373,6 +10428,16 @@ jsonld@5.2.0, jsonld@^5.2.0: lru-cache "^6.0.0" rdf-canonize "^3.0.0" +jsonld@^8.0.0: + version "8.3.3" + resolved "https://registry.yarnpkg.com/jsonld/-/jsonld-8.3.3.tgz#08cc927833c8684e42319d4697cc8199c0908ffc" + integrity sha512-9YcilrF+dLfg9NTEof/mJLMtbdX1RJ8dbWtJgE00cMOIohb1lIyJl710vFiTaiHTl6ZYODJuBd32xFvUhmv3kg== + dependencies: + "@digitalbazaar/http-client" "^3.4.1" + canonicalize "^1.0.1" + lru-cache "^6.0.0" + rdf-canonize "^3.4.0" + jsonpointer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" @@ -10581,6 +10646,14 @@ kubo-rpc-client@^5.0.2: uint8arrays "^5.0.3" wherearewe "^2.0.1" +ky-universal@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.11.0.tgz#f5edf857865aaaea416a1968222148ad7d9e4017" + integrity sha512-65KyweaWvk+uKKkCrfAf+xqN2/epw1IJDtlyCPxYffFCMR8u1sp2U65NtWpnozYfZxQ6IUzIlvUcw+hQ82U2Xw== + dependencies: + abort-controller "^3.0.0" + node-fetch "^3.2.10" + ky-universal@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.8.2.tgz#edc398d54cf495d7d6830aa1ab69559a3cc7f824" @@ -10594,6 +10667,11 @@ ky@^0.25.1: resolved "https://registry.yarnpkg.com/ky/-/ky-0.25.1.tgz#0df0bd872a9cc57e31acd5dbc1443547c881bfbc" integrity sha512-PjpCEWlIU7VpiMVrTwssahkYXX1by6NCT0fhTUX34F3DTinARlgMpriuroolugFPcMgpPWrOW4mTb984Qm1RXA== +ky@^0.33.3: + version "0.33.3" + resolved "https://registry.yarnpkg.com/ky/-/ky-0.33.3.tgz#bf1ad322a3f2c3428c13cfa4b3af95e6c4a2f543" + integrity sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw== + "langchain@>=0.2.3 <0.3.0 || >=0.3.4 <0.4.0": version "0.3.5" resolved "https://registry.yarnpkg.com/langchain/-/langchain-0.3.5.tgz#87b282454bc215b12b920d4dd5e35ed58030bad1" @@ -11860,7 +11938,7 @@ node-fetch@^2.6.1, node-fetch@^2.6.7, node-fetch@^2.6.8, node-fetch@^2.6.9, node dependencies: whatwg-url "^5.0.0" -node-fetch@^3.3.1: +node-fetch@^3.2.10, node-fetch@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== @@ -13071,7 +13149,7 @@ protobufjs@^6.10.2: "@types/node" ">=13.7.0" long "^4.0.0" -protobufjs@^7.0.0, protobufjs@^7.1.2, protobufjs@^7.2.4, protobufjs@^7.2.5: +protobufjs@^7.0.0, protobufjs@^7.1.2, protobufjs@^7.2.4: version "7.3.0" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.3.0.tgz#a32ec0422c039798c41a0700306a6e305b9cb32c" integrity sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g== @@ -13089,6 +13167,24 @@ protobufjs@^7.0.0, protobufjs@^7.1.2, protobufjs@^7.2.4, protobufjs@^7.2.5: "@types/node" ">=13.7.0" long "^5.0.0" +protobufjs@^7.2.5: + version "7.4.0" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.4.0.tgz#7efe324ce9b3b61c82aae5de810d287bc08a248a" + integrity sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/node" ">=13.7.0" + long "^5.0.0" + protons-runtime@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/protons-runtime/-/protons-runtime-5.5.0.tgz#ea06d9ef843aad77ea5de3e1ebafa81b58c24570" @@ -13313,13 +13409,20 @@ rdf-canonize@^2.0.1: semver "^6.3.0" setimmediate "^1.0.5" -rdf-canonize@^3.0.0: +rdf-canonize@^3.0.0, rdf-canonize@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/rdf-canonize/-/rdf-canonize-3.4.0.tgz#87f88342b173cc371d812a07de350f0c1aa9f058" integrity sha512-fUeWjrkOO0t1rg7B2fdyDTvngj+9RlUyL92vOdiB7c0FPguWVsniIMjEtHH+meLBO9rzkUlUzBVXgWrjI8P9LA== dependencies: setimmediate "^1.0.5" +rdf-canonize@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/rdf-canonize/-/rdf-canonize-4.0.1.tgz#2b5a37f147d35b484b40ff2140245fc5985a9595" + integrity sha512-B5ynHt4sasbUafzrvYI2GFARgeFcD8Sx9yXPbg7gEyT2EH76rlCv84kyO6tnxzVbxUN/uJDbK1S/MXh+DsnuTA== + dependencies: + setimmediate "^1.0.5" + react-native-fetch-api@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/react-native-fetch-api/-/react-native-fetch-api-3.0.0.tgz#81e1bb6562c292521bc4eca52fe1097f4c1ebab5" @@ -14018,6 +14121,13 @@ serialize-error@^7.0.1: dependencies: type-fest "^0.13.1" +serialize-error@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-8.1.0.tgz#3a069970c712f78634942ddd50fbbc0eaebe2f67" + integrity sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ== + dependencies: + type-fest "^0.20.2" + serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" @@ -15413,6 +15523,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + undici@^5.12.0: version "5.28.3" resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.3.tgz#a731e0eff2c3fcfd41c1169a869062be222d1e5b" @@ -15420,6 +15535,13 @@ undici@^5.12.0: dependencies: "@fastify/busboy" "^2.0.0" +undici@^5.21.2: + version "5.28.5" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.5.tgz#b2b94b6bf8f1d919bc5a6f31f2c01deb02e54d4b" + integrity sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA== + dependencies: + "@fastify/busboy" "^2.0.0" + undici@^7.1.0: version "7.1.1" resolved "https://registry.yarnpkg.com/undici/-/undici-7.1.1.tgz#f11eceeaaaa34ff8a28da31b68b0b4a8d75562f0"