From 6c4fc4bc6f399c5bd9cf2e264c2750624e6b5d26 Mon Sep 17 00:00:00 2001 From: Ybittan Date: Sun, 10 Dec 2023 20:38:39 -0600 Subject: [PATCH] account module migrated from identity to state. All references updates to match --- .../bri-3/src/bri/identity/identity.module.ts | 2 +- .../bri-3/src/bri/state/agents/state.agent.ts | 6 +++--- .../bpiAccounts/accounts.module.ts | 2 +- .../bpiAccounts/accounts.profile.ts | 0 .../bpiAccounts/agents/bpiAccounts.agent.ts | 2 +- .../agents/bpiAccountsStorage.agent.ts | 2 +- .../bpiAccounts/api/accounts.controller.spec.ts | 16 ++++++++-------- .../bpiAccounts/api/accounts.controller.ts | 0 .../dtos/request/createBpiAccount.dto.spec.ts | 0 .../api/dtos/request/createBpiAccount.dto.ts | 0 .../api/dtos/request/updateBpiAccount.dto.ts | 0 .../api/dtos/response/bpiAccount.dto.ts | 4 ++-- .../bpiAccounts/api/err.messages.ts | 0 .../createBpiAccount/createBpiAccount.command.ts | 0 .../createBpiAccountCommand.handler.ts | 2 +- .../deleteBpiAccount/deleteBpiAccount.command.ts | 0 .../deleteBpiAccountCommand.handler.ts | 0 .../getAllBpiAccountQuery.handler.ts | 0 .../getAllBpiAccounts/getAllBpiAccounts.query.ts | 0 .../getBpiAccountById/getBpiAccountById.query.ts | 0 .../getBpiAccountByIdQuery.handler.ts | 0 .../updateBpiAccount/updateBpiAccount.command.ts | 0 .../updateBpiAccountCommand.handler.ts | 0 .../bpiAccounts/models/bpiAccount.ts | 2 +- .../getStateTreeLeafValueContentQuery.handler.ts | 2 +- .../state/models/stateTreeLeafValueContent.ts | 2 +- examples/bri-3/src/bri/state/state.module.ts | 2 +- .../workflows/agents/workflows.agent.ts | 2 +- .../workflows/api/workflows.controller.spec.ts | 4 ++-- .../createWorkflowCommand.handler.ts | 4 ++-- .../bri/workgroup/workflows/models/workflow.ts | 2 +- .../bri/workgroup/workflows/workflows.module.ts | 2 +- examples/bri-3/src/shared/testing/builders.ts | 2 +- .../bri-3/src/shared/testing/testData.helper.ts | 2 +- 34 files changed, 31 insertions(+), 31 deletions(-) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/accounts.module.ts (94%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/accounts.profile.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/agents/bpiAccounts.agent.ts (94%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/agents/bpiAccountsStorage.agent.ts (97%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/api/accounts.controller.spec.ts (93%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/api/accounts.controller.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/api/dtos/request/createBpiAccount.dto.spec.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/api/dtos/request/createBpiAccount.dto.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/api/dtos/request/updateBpiAccount.dto.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/api/dtos/response/bpiAccount.dto.ts (65%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/api/err.messages.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/capabilities/createBpiAccount/createBpiAccount.command.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/capabilities/createBpiAccount/createBpiAccountCommand.handler.ts (91%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/capabilities/deleteBpiAccount/deleteBpiAccount.command.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/capabilities/deleteBpiAccount/deleteBpiAccountCommand.handler.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/capabilities/getAllBpiAccounts/getAllBpiAccountQuery.handler.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/capabilities/getAllBpiAccounts/getAllBpiAccounts.query.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/capabilities/getBpiAccountById/getBpiAccountById.query.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/capabilities/getBpiAccountById/getBpiAccountByIdQuery.handler.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/capabilities/updateBpiAccount/updateBpiAccount.command.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/capabilities/updateBpiAccount/updateBpiAccountCommand.handler.ts (100%) rename examples/bri-3/src/bri/{identity => state}/bpiAccounts/models/bpiAccount.ts (92%) diff --git a/examples/bri-3/src/bri/identity/identity.module.ts b/examples/bri-3/src/bri/identity/identity.module.ts index 70d923321..a94c93a34 100644 --- a/examples/bri-3/src/bri/identity/identity.module.ts +++ b/examples/bri-3/src/bri/identity/identity.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common'; -import { AccountModule } from './bpiAccounts/accounts.module'; +import { AccountModule } from '../state/bpiAccounts/accounts.module'; import { SubjectAccountModule } from './bpiSubjectAccounts/subjectAccounts.module'; import { SubjectModule } from './bpiSubjects/subjects.module'; diff --git a/examples/bri-3/src/bri/state/agents/state.agent.ts b/examples/bri-3/src/bri/state/agents/state.agent.ts index fbcece246..41ffa2add 100644 --- a/examples/bri-3/src/bri/state/agents/state.agent.ts +++ b/examples/bri-3/src/bri/state/agents/state.agent.ts @@ -1,15 +1,15 @@ import { Injectable, NotFoundException } from '@nestjs/common'; import MerkleTree from 'merkletreejs'; -import { BpiAccountStorageAgent } from '../../identity/bpiAccounts/agents/bpiAccountsStorage.agent'; -import { BpiAccount } from '../../identity/bpiAccounts/models/bpiAccount'; +import { BpiAccountStorageAgent } from '../bpiAccounts/agents/bpiAccountsStorage.agent'; +import { BpiAccount } from '../bpiAccounts/models/bpiAccount'; import { MerkleTreeAgent } from '../../merkleTree/agents/merkleTree.agent'; import { MerkleTreeStorageAgent } from '../../merkleTree/agents/merkleTreeStorage.agent'; import { Witness } from '../../zeroKnowledgeProof/models/witness'; import { StateTreeLeafValueContent } from '../models/stateTreeLeafValueContent'; import { InjectMapper } from '@automapper/nestjs'; import { Mapper } from '@automapper/core'; -import { LEAF_STATE_VALUE_NOT_FOUND_ERR_MESSAGE } from '../../identity/bpiAccounts/api/err.messages'; +import { LEAF_STATE_VALUE_NOT_FOUND_ERR_MESSAGE } from '../bpiAccounts/api/err.messages'; // TODO: #741 We should follow this approach everywhere for storage // https://www.prisma.io/docs/guides/performance-and-optimization/prisma-client-transactions-guide#scenario-pre-computed-ids-and-the-transaction-api diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/accounts.module.ts b/examples/bri-3/src/bri/state/bpiAccounts/accounts.module.ts similarity index 94% rename from examples/bri-3/src/bri/identity/bpiAccounts/accounts.module.ts rename to examples/bri-3/src/bri/state/bpiAccounts/accounts.module.ts index 48c8d6e03..4aef82f8d 100644 --- a/examples/bri-3/src/bri/identity/bpiAccounts/accounts.module.ts +++ b/examples/bri-3/src/bri/state/bpiAccounts/accounts.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { CqrsModule } from '@nestjs/cqrs'; import { MerkleModule } from '../../merkleTree/merkle.module'; -import { SubjectAccountModule } from '../bpiSubjectAccounts/subjectAccounts.module'; +import { SubjectAccountModule } from '../../identity/bpiSubjectAccounts/subjectAccounts.module'; import { AccountsProfile } from './accounts.profile'; import { BpiAccountAgent } from './agents/bpiAccounts.agent'; import { BpiAccountStorageAgent } from './agents/bpiAccountsStorage.agent'; diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/accounts.profile.ts b/examples/bri-3/src/bri/state/bpiAccounts/accounts.profile.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/accounts.profile.ts rename to examples/bri-3/src/bri/state/bpiAccounts/accounts.profile.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/agents/bpiAccounts.agent.ts b/examples/bri-3/src/bri/state/bpiAccounts/agents/bpiAccounts.agent.ts similarity index 94% rename from examples/bri-3/src/bri/identity/bpiAccounts/agents/bpiAccounts.agent.ts rename to examples/bri-3/src/bri/state/bpiAccounts/agents/bpiAccounts.agent.ts index 3dfb66ad3..22b06799d 100644 --- a/examples/bri-3/src/bri/identity/bpiAccounts/agents/bpiAccounts.agent.ts +++ b/examples/bri-3/src/bri/state/bpiAccounts/agents/bpiAccounts.agent.ts @@ -1,6 +1,6 @@ import { Injectable, NotFoundException } from '@nestjs/common'; import { v4 } from 'uuid'; -import { BpiSubjectAccount } from '../../bpiSubjectAccounts/models/bpiSubjectAccount'; +import { BpiSubjectAccount } from '../../../identity/bpiSubjectAccounts/models/bpiSubjectAccount'; import { NOT_FOUND_ERR_MESSAGE } from '../api/err.messages'; import { BpiAccount } from '../models/bpiAccount'; diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/agents/bpiAccountsStorage.agent.ts b/examples/bri-3/src/bri/state/bpiAccounts/agents/bpiAccountsStorage.agent.ts similarity index 97% rename from examples/bri-3/src/bri/identity/bpiAccounts/agents/bpiAccountsStorage.agent.ts rename to examples/bri-3/src/bri/state/bpiAccounts/agents/bpiAccountsStorage.agent.ts index 961ffb49b..34fe25331 100644 --- a/examples/bri-3/src/bri/identity/bpiAccounts/agents/bpiAccountsStorage.agent.ts +++ b/examples/bri-3/src/bri/state/bpiAccounts/agents/bpiAccountsStorage.agent.ts @@ -6,7 +6,7 @@ import { PrismaService } from '../../../../../prisma/prisma.service'; import { Witness } from '../../../zeroKnowledgeProof/models/witness'; import { NOT_FOUND_ERR_MESSAGE } from '../api/err.messages'; import { BpiAccount } from '../models/bpiAccount'; -import { StateTreeLeafValueContent } from '../../../state/models/stateTreeLeafValueContent'; +import { StateTreeLeafValueContent } from '../../models/stateTreeLeafValueContent'; // Repositories are the only places that talk the Prisma language of models. // They are always mapped to and from domain objects so that the business layer of the application diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/api/accounts.controller.spec.ts b/examples/bri-3/src/bri/state/bpiAccounts/api/accounts.controller.spec.ts similarity index 93% rename from examples/bri-3/src/bri/identity/bpiAccounts/api/accounts.controller.spec.ts rename to examples/bri-3/src/bri/state/bpiAccounts/api/accounts.controller.spec.ts index 46bdfdfc8..4ac11246d 100644 --- a/examples/bri-3/src/bri/identity/bpiAccounts/api/accounts.controller.spec.ts +++ b/examples/bri-3/src/bri/state/bpiAccounts/api/accounts.controller.spec.ts @@ -11,14 +11,14 @@ import { uuid } from 'uuidv4'; import { MerkleTreeStorageAgent } from '../../../merkleTree/agents/merkleTreeStorage.agent'; import { MerkleModule } from '../../../merkleTree/merkle.module'; import { BpiMerkleTree } from '../../../merkleTree/models/bpiMerkleTree'; -import { BpiSubjectAccountAgent } from '../../bpiSubjectAccounts/agents/bpiSubjectAccounts.agent'; -import { BpiSubjectAccountStorageAgent } from '../../bpiSubjectAccounts/agents/bpiSubjectAccountsStorage.agent'; -import { NOT_FOUND_ERR_MESSAGE as SUBJECT_ACCOUNT_NOT_FOUND_ERR_MESSAGE } from '../../bpiSubjectAccounts/api/err.messages'; -import { BpiSubjectAccount } from '../../bpiSubjectAccounts/models/bpiSubjectAccount'; -import { SubjectAccountsProfile } from '../../bpiSubjectAccounts/subjectAccounts.profile'; -import { BpiSubjectStorageAgent } from '../../bpiSubjects/agents/bpiSubjectsStorage.agent'; -import { BpiSubject } from '../../bpiSubjects/models/bpiSubject'; -import { SubjectsProfile } from '../../bpiSubjects/subjects.profile'; +import { BpiSubjectAccountAgent } from '../../../identity/bpiSubjectAccounts/agents/bpiSubjectAccounts.agent'; +import { BpiSubjectAccountStorageAgent } from '../../../identity/bpiSubjectAccounts/agents/bpiSubjectAccountsStorage.agent'; +import { NOT_FOUND_ERR_MESSAGE as SUBJECT_ACCOUNT_NOT_FOUND_ERR_MESSAGE } from '../../../identity/bpiSubjectAccounts/api/err.messages'; +import { BpiSubjectAccount } from '../../../identity/bpiSubjectAccounts/models/bpiSubjectAccount'; +import { SubjectAccountsProfile } from '../../../identity/bpiSubjectAccounts/subjectAccounts.profile'; +import { BpiSubjectStorageAgent } from '../../../identity/bpiSubjects/agents/bpiSubjectsStorage.agent'; +import { BpiSubject } from '../../../identity/bpiSubjects/models/bpiSubject'; +import { SubjectsProfile } from '../../../identity/bpiSubjects/subjects.profile'; import { AccountsProfile } from '../accounts.profile'; import { BpiAccountAgent } from '../agents/bpiAccounts.agent'; import { BpiAccountStorageAgent } from '../agents/bpiAccountsStorage.agent'; diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/api/accounts.controller.ts b/examples/bri-3/src/bri/state/bpiAccounts/api/accounts.controller.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/api/accounts.controller.ts rename to examples/bri-3/src/bri/state/bpiAccounts/api/accounts.controller.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/api/dtos/request/createBpiAccount.dto.spec.ts b/examples/bri-3/src/bri/state/bpiAccounts/api/dtos/request/createBpiAccount.dto.spec.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/api/dtos/request/createBpiAccount.dto.spec.ts rename to examples/bri-3/src/bri/state/bpiAccounts/api/dtos/request/createBpiAccount.dto.spec.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/api/dtos/request/createBpiAccount.dto.ts b/examples/bri-3/src/bri/state/bpiAccounts/api/dtos/request/createBpiAccount.dto.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/api/dtos/request/createBpiAccount.dto.ts rename to examples/bri-3/src/bri/state/bpiAccounts/api/dtos/request/createBpiAccount.dto.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/api/dtos/request/updateBpiAccount.dto.ts b/examples/bri-3/src/bri/state/bpiAccounts/api/dtos/request/updateBpiAccount.dto.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/api/dtos/request/updateBpiAccount.dto.ts rename to examples/bri-3/src/bri/state/bpiAccounts/api/dtos/request/updateBpiAccount.dto.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/api/dtos/response/bpiAccount.dto.ts b/examples/bri-3/src/bri/state/bpiAccounts/api/dtos/response/bpiAccount.dto.ts similarity index 65% rename from examples/bri-3/src/bri/identity/bpiAccounts/api/dtos/response/bpiAccount.dto.ts rename to examples/bri-3/src/bri/state/bpiAccounts/api/dtos/response/bpiAccount.dto.ts index 10c3ac08d..8cf6ede35 100644 --- a/examples/bri-3/src/bri/identity/bpiAccounts/api/dtos/response/bpiAccount.dto.ts +++ b/examples/bri-3/src/bri/state/bpiAccounts/api/dtos/response/bpiAccount.dto.ts @@ -1,6 +1,6 @@ import { AutoMap } from '@automapper/classes'; -import { MerkleTreeDto } from '../../../../..//merkleTree/api/dtos/response/merkleTree.dto'; -import { BpiSubjectAccountDto } from '../../../../bpiSubjectAccounts/api/dtos/response/bpiSubjectAccount.dto'; +import { MerkleTreeDto } from '../../../../../merkleTree/api/dtos/response/merkleTree.dto'; +import { BpiSubjectAccountDto } from '../../../../../identity/bpiSubjectAccounts/api/dtos/response/bpiSubjectAccount.dto'; export class BpiAccountDto { @AutoMap() diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/api/err.messages.ts b/examples/bri-3/src/bri/state/bpiAccounts/api/err.messages.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/api/err.messages.ts rename to examples/bri-3/src/bri/state/bpiAccounts/api/err.messages.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/createBpiAccount/createBpiAccount.command.ts b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/createBpiAccount/createBpiAccount.command.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/capabilities/createBpiAccount/createBpiAccount.command.ts rename to examples/bri-3/src/bri/state/bpiAccounts/capabilities/createBpiAccount/createBpiAccount.command.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/createBpiAccount/createBpiAccountCommand.handler.ts b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/createBpiAccount/createBpiAccountCommand.handler.ts similarity index 91% rename from examples/bri-3/src/bri/identity/bpiAccounts/capabilities/createBpiAccount/createBpiAccountCommand.handler.ts rename to examples/bri-3/src/bri/state/bpiAccounts/capabilities/createBpiAccount/createBpiAccountCommand.handler.ts index a78cc7a23..56aee8e49 100644 --- a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/createBpiAccount/createBpiAccountCommand.handler.ts +++ b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/createBpiAccount/createBpiAccountCommand.handler.ts @@ -1,5 +1,5 @@ import { CommandHandler, ICommandHandler } from '@nestjs/cqrs'; -import { BpiSubjectAccountAgent } from '../../../bpiSubjectAccounts/agents/bpiSubjectAccounts.agent'; +import { BpiSubjectAccountAgent } from '../../../../identity/bpiSubjectAccounts/agents/bpiSubjectAccounts.agent'; import { BpiAccountAgent } from '../../agents/bpiAccounts.agent'; import { BpiAccountStorageAgent } from '../../agents/bpiAccountsStorage.agent'; import { CreateBpiAccountCommand } from './createBpiAccount.command'; diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/deleteBpiAccount/deleteBpiAccount.command.ts b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/deleteBpiAccount/deleteBpiAccount.command.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/capabilities/deleteBpiAccount/deleteBpiAccount.command.ts rename to examples/bri-3/src/bri/state/bpiAccounts/capabilities/deleteBpiAccount/deleteBpiAccount.command.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/deleteBpiAccount/deleteBpiAccountCommand.handler.ts b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/deleteBpiAccount/deleteBpiAccountCommand.handler.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/capabilities/deleteBpiAccount/deleteBpiAccountCommand.handler.ts rename to examples/bri-3/src/bri/state/bpiAccounts/capabilities/deleteBpiAccount/deleteBpiAccountCommand.handler.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/getAllBpiAccounts/getAllBpiAccountQuery.handler.ts b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/getAllBpiAccounts/getAllBpiAccountQuery.handler.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/capabilities/getAllBpiAccounts/getAllBpiAccountQuery.handler.ts rename to examples/bri-3/src/bri/state/bpiAccounts/capabilities/getAllBpiAccounts/getAllBpiAccountQuery.handler.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/getAllBpiAccounts/getAllBpiAccounts.query.ts b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/getAllBpiAccounts/getAllBpiAccounts.query.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/capabilities/getAllBpiAccounts/getAllBpiAccounts.query.ts rename to examples/bri-3/src/bri/state/bpiAccounts/capabilities/getAllBpiAccounts/getAllBpiAccounts.query.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/getBpiAccountById/getBpiAccountById.query.ts b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/getBpiAccountById/getBpiAccountById.query.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/capabilities/getBpiAccountById/getBpiAccountById.query.ts rename to examples/bri-3/src/bri/state/bpiAccounts/capabilities/getBpiAccountById/getBpiAccountById.query.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/getBpiAccountById/getBpiAccountByIdQuery.handler.ts b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/getBpiAccountById/getBpiAccountByIdQuery.handler.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/capabilities/getBpiAccountById/getBpiAccountByIdQuery.handler.ts rename to examples/bri-3/src/bri/state/bpiAccounts/capabilities/getBpiAccountById/getBpiAccountByIdQuery.handler.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/updateBpiAccount/updateBpiAccount.command.ts b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/updateBpiAccount/updateBpiAccount.command.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/capabilities/updateBpiAccount/updateBpiAccount.command.ts rename to examples/bri-3/src/bri/state/bpiAccounts/capabilities/updateBpiAccount/updateBpiAccount.command.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/capabilities/updateBpiAccount/updateBpiAccountCommand.handler.ts b/examples/bri-3/src/bri/state/bpiAccounts/capabilities/updateBpiAccount/updateBpiAccountCommand.handler.ts similarity index 100% rename from examples/bri-3/src/bri/identity/bpiAccounts/capabilities/updateBpiAccount/updateBpiAccountCommand.handler.ts rename to examples/bri-3/src/bri/state/bpiAccounts/capabilities/updateBpiAccount/updateBpiAccountCommand.handler.ts diff --git a/examples/bri-3/src/bri/identity/bpiAccounts/models/bpiAccount.ts b/examples/bri-3/src/bri/state/bpiAccounts/models/bpiAccount.ts similarity index 92% rename from examples/bri-3/src/bri/identity/bpiAccounts/models/bpiAccount.ts rename to examples/bri-3/src/bri/state/bpiAccounts/models/bpiAccount.ts index 850f88cd5..d0ab7c555 100644 --- a/examples/bri-3/src/bri/identity/bpiAccounts/models/bpiAccount.ts +++ b/examples/bri-3/src/bri/state/bpiAccounts/models/bpiAccount.ts @@ -1,6 +1,6 @@ import { AutoMap } from '@automapper/classes'; import { BpiMerkleTree } from '../../../merkleTree/models/bpiMerkleTree'; -import { BpiSubjectAccount } from '../../bpiSubjectAccounts/models/bpiSubjectAccount'; +import { BpiSubjectAccount } from '../../../identity/bpiSubjectAccounts/models/bpiSubjectAccount'; export class BpiAccount { @AutoMap() diff --git a/examples/bri-3/src/bri/state/capabilities/getStateContent/getStateTreeLeafValueContentQuery.handler.ts b/examples/bri-3/src/bri/state/capabilities/getStateContent/getStateTreeLeafValueContentQuery.handler.ts index dc2c23efa..deddaa509 100644 --- a/examples/bri-3/src/bri/state/capabilities/getStateContent/getStateTreeLeafValueContentQuery.handler.ts +++ b/examples/bri-3/src/bri/state/capabilities/getStateContent/getStateTreeLeafValueContentQuery.handler.ts @@ -1,7 +1,7 @@ import { Mapper } from '@automapper/core'; import { InjectMapper } from '@automapper/nestjs'; import { IQueryHandler, QueryHandler } from '@nestjs/cqrs'; -import { BpiAccountAgent } from '../../../identity/bpiAccounts/agents/bpiAccounts.agent'; +import { BpiAccountAgent } from '../../bpiAccounts/agents/bpiAccounts.agent'; import { MerkleTreeAgent } from '../../../merkleTree/agents/merkleTree.agent'; import { StateAgent } from '../../agents/state.agent'; import { StateTreeLeafValueContentDto } from '../../api/dtos/response/stateTreeLeafValueContent.dto'; diff --git a/examples/bri-3/src/bri/state/models/stateTreeLeafValueContent.ts b/examples/bri-3/src/bri/state/models/stateTreeLeafValueContent.ts index 48f77ebab..d2a1f6ad1 100644 --- a/examples/bri-3/src/bri/state/models/stateTreeLeafValueContent.ts +++ b/examples/bri-3/src/bri/state/models/stateTreeLeafValueContent.ts @@ -1,5 +1,5 @@ import { AutoMap } from '@automapper/classes'; -import { BpiAccount } from '../../identity/bpiAccounts/models/bpiAccount'; +import { BpiAccount } from '../bpiAccounts/models/bpiAccount'; import MerkleTree from 'merkletreejs'; export class StateTreeLeafValueContent { diff --git a/examples/bri-3/src/bri/state/state.module.ts b/examples/bri-3/src/bri/state/state.module.ts index 08228c90c..8d5147408 100644 --- a/examples/bri-3/src/bri/state/state.module.ts +++ b/examples/bri-3/src/bri/state/state.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { CqrsModule } from '@nestjs/cqrs'; -import { AccountModule } from '../identity/bpiAccounts/accounts.module'; +import { AccountModule } from './bpiAccounts/accounts.module'; import { MerkleModule } from '../merkleTree/merkle.module'; import { StateAgent } from './agents/state.agent'; diff --git a/examples/bri-3/src/bri/workgroup/workflows/agents/workflows.agent.ts b/examples/bri-3/src/bri/workgroup/workflows/agents/workflows.agent.ts index 75aee12c8..f1534a786 100644 --- a/examples/bri-3/src/bri/workgroup/workflows/agents/workflows.agent.ts +++ b/examples/bri-3/src/bri/workgroup/workflows/agents/workflows.agent.ts @@ -15,7 +15,7 @@ import { } from '../api/err.messages'; import { Workflow } from '../models/workflow'; import { WorkflowStorageAgent } from './workflowsStorage.agent'; -import { BpiAccount } from 'src/bri/identity/bpiAccounts/models/bpiAccount'; +import { BpiAccount } from 'src/bri/state/bpiAccounts/models/bpiAccount'; @Injectable() export class WorkflowAgent { diff --git a/examples/bri-3/src/bri/workgroup/workflows/api/workflows.controller.spec.ts b/examples/bri-3/src/bri/workgroup/workflows/api/workflows.controller.spec.ts index 1e2b0dd31..c851a468c 100644 --- a/examples/bri-3/src/bri/workgroup/workflows/api/workflows.controller.spec.ts +++ b/examples/bri-3/src/bri/workgroup/workflows/api/workflows.controller.spec.ts @@ -7,8 +7,8 @@ import { DeepMockProxy, mockDeep } from 'jest-mock-extended'; import { validate as uuidValidate, version as uuidVersion } from 'uuid'; import { uuid } from 'uuidv4'; import { TestDataHelper } from '../../../../shared/testing/testData.helper'; -import { BpiAccountAgent } from '../../../identity/bpiAccounts/agents/bpiAccounts.agent'; -import { BpiAccountStorageAgent } from '../../../identity/bpiAccounts/agents/bpiAccountsStorage.agent'; +import { BpiAccountAgent } from '../../../state/bpiAccounts/agents/bpiAccounts.agent'; +import { BpiAccountStorageAgent } from '../../../state/bpiAccounts/agents/bpiAccountsStorage.agent'; import { BpiSubjectAccountAgent } from '../../../identity/bpiSubjectAccounts/agents/bpiSubjectAccounts.agent'; import { WORKFLOW_NOT_FOUND_ERR_MESSAGE } from '../../workflows/api/err.messages'; import { WorkgroupAgent } from '../../workgroups/agents/workgroups.agent'; diff --git a/examples/bri-3/src/bri/workgroup/workflows/capabilities/createWorkflow/createWorkflowCommand.handler.ts b/examples/bri-3/src/bri/workgroup/workflows/capabilities/createWorkflow/createWorkflowCommand.handler.ts index 2f2fd5df1..1334ec201 100644 --- a/examples/bri-3/src/bri/workgroup/workflows/capabilities/createWorkflow/createWorkflowCommand.handler.ts +++ b/examples/bri-3/src/bri/workgroup/workflows/capabilities/createWorkflow/createWorkflowCommand.handler.ts @@ -1,6 +1,6 @@ import { CommandHandler, ICommandHandler } from '@nestjs/cqrs'; -import { BpiAccountAgent } from '../../../../identity/bpiAccounts/agents/bpiAccounts.agent'; -import { BpiAccountStorageAgent } from '../../../../identity/bpiAccounts/agents/bpiAccountsStorage.agent'; +import { BpiAccountAgent } from '../../../../state/bpiAccounts/agents/bpiAccounts.agent'; +import { BpiAccountStorageAgent } from '../../../../state/bpiAccounts/agents/bpiAccountsStorage.agent'; import { BpiSubjectAccountAgent } from '../../../../identity/bpiSubjectAccounts/agents/bpiSubjectAccounts.agent'; import { WorkgroupAgent } from '../../../../workgroup/workgroups/agents/workgroups.agent'; import { WorkflowAgent } from '../../agents/workflows.agent'; diff --git a/examples/bri-3/src/bri/workgroup/workflows/models/workflow.ts b/examples/bri-3/src/bri/workgroup/workflows/models/workflow.ts index 7cd853037..16de2e67d 100644 --- a/examples/bri-3/src/bri/workgroup/workflows/models/workflow.ts +++ b/examples/bri-3/src/bri/workgroup/workflows/models/workflow.ts @@ -1,5 +1,5 @@ import { AutoMap } from '@automapper/classes'; -import { BpiAccount } from '../../../identity/bpiAccounts/models/bpiAccount'; +import { BpiAccount } from '../../../state/bpiAccounts/models/bpiAccount'; import { Workgroup } from '../../workgroups/models/workgroup'; import { Workstep } from '../../worksteps/models/workstep'; diff --git a/examples/bri-3/src/bri/workgroup/workflows/workflows.module.ts b/examples/bri-3/src/bri/workgroup/workflows/workflows.module.ts index 8e5fc6f54..8dbbc1bf2 100644 --- a/examples/bri-3/src/bri/workgroup/workflows/workflows.module.ts +++ b/examples/bri-3/src/bri/workgroup/workflows/workflows.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { CqrsModule } from '@nestjs/cqrs'; -import { AccountModule } from '../../identity/bpiAccounts/accounts.module'; +import { AccountModule } from '../../state/bpiAccounts/accounts.module'; import { SubjectAccountModule } from '../../identity/bpiSubjectAccounts/subjectAccounts.module'; import { SubjectModule } from '../../identity/bpiSubjects/subjects.module'; import { WorkgroupStorageAgent } from '../workgroups/agents/workgroupStorage.agent'; diff --git a/examples/bri-3/src/shared/testing/builders.ts b/examples/bri-3/src/shared/testing/builders.ts index 3dadfebc2..8f9068cf0 100644 --- a/examples/bri-3/src/shared/testing/builders.ts +++ b/examples/bri-3/src/shared/testing/builders.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-empty-function */ -import { BpiAccount } from '../../bri/identity/bpiAccounts/models/bpiAccount'; +import { BpiAccount } from '../../bri/state/bpiAccounts/models/bpiAccount'; import { BpiSubjectAccount } from '../../bri/identity/bpiSubjectAccounts/models/bpiSubjectAccount'; import { BpiSubject } from '../../bri/identity/bpiSubjects/models/bpiSubject'; import { BpiSubjectRole } from '../../bri/identity/bpiSubjects/models/bpiSubjectRole'; diff --git a/examples/bri-3/src/shared/testing/testData.helper.ts b/examples/bri-3/src/shared/testing/testData.helper.ts index fddfdc8d6..da7a555b6 100644 --- a/examples/bri-3/src/shared/testing/testData.helper.ts +++ b/examples/bri-3/src/shared/testing/testData.helper.ts @@ -1,5 +1,5 @@ import { uuid } from 'uuidv4'; -import { BpiAccount } from '../../bri/identity/bpiAccounts/models/bpiAccount'; +import { BpiAccount } from '../../bri/state/bpiAccounts/models/bpiAccount'; import { BpiSubjectAccount } from '../../bri/identity/bpiSubjectAccounts/models/bpiSubjectAccount'; import { BpiSubject } from '../../bri/identity/bpiSubjects/models/bpiSubject'; import {