Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC - 5654 Remove usage of @shared/domain/index.ts #4563

Merged
merged 49 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a1cef1b
initial commit
wolfganggreschus Nov 17, 2023
0aac3f3
Merge branch 'main' into BC-5654-remove-usage-of-index
wolfganggreschus Nov 21, 2023
c564371
removed export * from './domainobject'
wolfganggreschus Nov 22, 2023
aee60ab
corrected apps/server/src/modules/authentication/strategy/ldap.strate…
wolfganggreschus Nov 22, 2023
9f6d182
removed: export * from './types';
wolfganggreschus Nov 23, 2023
14f03ce
Merge branch 'main' into BC-5654-remove-usage-of-index
wolfganggreschus Nov 23, 2023
cd9399d
adjusted tests
wolfganggreschus Nov 23, 2023
0112528
more tests adjusted
wolfganggreschus Nov 23, 2023
737884e
removed: export * from './service'
wolfganggreschus Nov 23, 2023
caf6a74
removed: export * from './interface'
wolfganggreschus Nov 23, 2023
c4ff532
removed: export * from './interface';
wolfganggreschus Nov 24, 2023
4ebfe2d
Merge branch 'main' into BC-5654-remove-usage-of-index
wolfganggreschus Nov 24, 2023
def2153
removed: export * from './entity';
wolfganggreschus Nov 24, 2023
335ca49
test corrected
wolfganggreschus Nov 24, 2023
a087be2
tests adjusted regarding Pseudonym
wolfganggreschus Nov 25, 2023
d1dc80b
solved merge conflicts
wolfganggreschus Nov 25, 2023
fe75635
solved type errors caused by merge conflict
wolfganggreschus Nov 25, 2023
b9f076a
linting errors
wolfganggreschus Nov 25, 2023
0c1e5e2
test errors removed
wolfganggreschus Nov 25, 2023
6b419c7
solved more linting errors
wolfganggreschus Nov 25, 2023
f45a090
more linting errors
wolfganggreschus Nov 25, 2023
eacc9ac
type-errors: apps\server\src\shared\testing\factory\systemEntityFacto…
wolfganggreschus Nov 25, 2023
8acbc97
temporary solution to make sanis.strategy.spec work
wolfganggreschus Nov 27, 2023
5e17fe9
removed comments
wolfganggreschus Nov 27, 2023
30a4b12
more precise but still temporary solution for sanis.strategy
wolfganggreschus Nov 27, 2023
985799b
Merge branch 'main' into BC-5654-remove-usage-of-index
wolfganggreschus Nov 27, 2023
6359cfa
eslint-disable import/first in sanis.strategy.spec.ts
wolfganggreschus Nov 27, 2023
804f185
Merge branch 'BC-5654-remove-usage-of-index' of github.com:hpi-schul-…
wolfganggreschus Nov 27, 2023
32ef28b
removed comment
wolfganggreschus Nov 27, 2023
8a7ec7e
fixed merge conflicts
wolfganggreschus Nov 28, 2023
4a36e20
removed unused input-types, added RICHT_TEXT_NEWS
wolfganggreschus Nov 28, 2023
677501f
Merge branch 'main' into BC-5654-remove-usage-of-index
wolfganggreschus Nov 28, 2023
b9750b3
Merge branches 'main' and 'main' of github.com:hpi-schul-cloud/schulc…
wolfganggreschus Nov 28, 2023
2c5948a
removed index in shared/domain
wolfganggreschus Nov 28, 2023
cb9eb5c
tests adjusted
Nov 28, 2023
fe83597
linting problems
Nov 28, 2023
740e5e9
linting problems
Nov 28, 2023
950149e
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server
wolfganggreschus Nov 30, 2023
d7fdc5c
resolved merge conflicts
wolfganggreschus Nov 30, 2023
2a091f6
linting problems
wolfganggreschus Nov 30, 2023
0cec43b
more linting problems solved
wolfganggreschus Nov 30, 2023
a1faa4d
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server
wolfganggreschus Nov 30, 2023
79f836f
soled merge conflicts
wolfganggreschus Nov 30, 2023
25d5e31
Merge branch 'main' into BC-5654-remove-usage-of-index
wolfganggreschus Nov 30, 2023
0628377
reordered elements in card controller
wolfganggreschus Nov 30, 2023
9439140
Merge branch 'BC-5654-remove-usage-of-index' of github.com:hpi-schul-…
wolfganggreschus Nov 30, 2023
7980a45
Merge branch 'main' into BC-5654-remove-usage-of-index
wolfganggreschus Nov 30, 2023
c13a6a6
write uncovered test
Nov 30, 2023
6f0d14d
write uncovered test
Nov 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions apps/server/src/console/console.module.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Configuration } from '@hpi-schul-cloud/commons/lib';
import { Dictionary, IPrimaryKey } from '@mikro-orm/core';
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { Module, NotFoundException } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { ALL_ENTITIES } from '@shared/domain';
import { ConsoleWriterModule } from '@infra/console/console-writer/console-writer.module';

Check warning on line 2 in apps/server/src/console/console.module.ts

View workflow job for this annotation

GitHub Actions / nest_lint

'@infra/console/console-writer/console-writer.module' import is restricted from being used by a pattern. Do not deep import from a module
import { KeycloakModule } from '@infra/identity-management/keycloak/keycloak.module';

Check warning on line 3 in apps/server/src/console/console.module.ts

View workflow job for this annotation

GitHub Actions / nest_lint

'@infra/identity-management/keycloak/keycloak.module' import is restricted from being used by a pattern. Do not deep import from a module
import { DB_PASSWORD, DB_URL, DB_USERNAME, createConfigModuleOptions } from '@src/config';
import { Dictionary, IPrimaryKey } from '@mikro-orm/core';
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { FilesModule } from '@modules/files';
import { FileEntity } from '@modules/files/entity';
import { FileRecord } from '@modules/files-storage/entity';

Check warning on line 7 in apps/server/src/console/console.module.ts

View workflow job for this annotation

GitHub Actions / nest_lint

'@modules/files-storage/entity' import is restricted from being used by a pattern. Do not deep import from a module
import { FileEntity } from '@modules/files/entity';
import { ManagementModule } from '@modules/management/management.module';
import { serverConfig } from '@modules/server';
import { Module, NotFoundException } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { ALL_ENTITIES } from '@shared/domain/entity';
import { DB_PASSWORD, DB_URL, DB_USERNAME, createConfigModuleOptions } from '@src/config';
import { ConsoleModule } from 'nestjs-console';
import { ServerConsole } from './server.console';

Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/infra/calendar/service/calendar.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Configuration } from '@hpi-schul-cloud/commons/lib';
import { HttpService } from '@nestjs/axios';
import { Injectable, InternalServerErrorException } from '@nestjs/common';
import { EntityId } from '@shared/domain';
import { EntityId } from '@shared/domain/types';
import { ErrorUtils } from '@src/core/error/utils';
import { AxiosRequestConfig, AxiosResponse } from 'axios';
import { firstValueFrom, Observable } from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createMock } from '@golevelup/ts-jest';
import { ObjectId } from '@mikro-orm/mongodb';
import { TeamDto } from '@modules/collaborative-storage/services/dto/team.dto'; // invalid import please fix
import { Test, TestingModule } from '@nestjs/testing';
import { RoleName } from '@shared/domain';
import { RoleName } from '@shared/domain/interface';
import { LegacyLogger } from '@src/core/logger';
import { CollaborativeStorageAdapter } from './collaborative-storage.adapter';
import { CollaborativeStorageAdapterMapper } from './mapper/collaborative-storage-adapter.mapper';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Test, TestingModule } from '@nestjs/testing';
import { RoleName } from '@shared/domain';
import { CollaborativeStorageAdapterMapper } from '@infra/collaborative-storage/mapper/collaborative-storage-adapter.mapper';
import { Test, TestingModule } from '@nestjs/testing';
import { RoleName } from '@shared/domain/interface';

describe('TeamStorage Mapper', () => {
let module: TestingModule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import { createMock, DeepMocked } from '@golevelup/ts-jest';
import { TeamDto, TeamUserDto } from '@modules/collaborative-storage/services/dto/team.dto';
import { PseudonymService } from '@modules/pseudonym';
import { ExternalToolService } from '@modules/tool/external-tool/service';
import { UserService } from '@modules/user';
import { UnprocessableEntityException } from '@nestjs/common';
import { Test, TestingModule } from '@nestjs/testing';
import { LtiPrivacyPermission, LtiRoleType, Pseudonym, RoleName, User, UserDO } from '@shared/domain';
import { Pseudonym, UserDO } from '@shared/domain/domainobject';
import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do';
import { LtiPrivacyPermission, LtiRoleType, User } from '@shared/domain/entity';
import { RoleName } from '@shared/domain/interface';
import { LtiToolRepo } from '@shared/repo';
import { ltiToolDOFactory, pseudonymFactory, setupEntities, userDoFactory, userFactory } from '@shared/testing';
import { LegacyLogger } from '@src/core/logger';
import { TeamDto, TeamUserDto } from '@modules/collaborative-storage/services/dto/team.dto';
import { PseudonymService } from '@modules/pseudonym';
import { ExternalToolService } from '@modules/tool/external-tool/service';
import { UserService } from '@modules/user';
import { NextcloudStrategy } from './nextcloud.strategy';
import { NextcloudClient } from './nextcloud.client';
import { TeamRolePermissionsDto } from '../../dto/team-role-permissions.dto';
import { NextcloudClient } from './nextcloud.client';
import { NextcloudStrategy } from './nextcloud.strategy';

class NextcloudStrategySpec extends NextcloudStrategy {
static specGenerateGroupId(dto: TeamRolePermissionsDto): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ExternalTool } from '@modules/tool/external-tool/domain';
import { ExternalToolService } from '@modules/tool/external-tool/service';
import { UserService } from '@modules/user';
import { Injectable, UnprocessableEntityException } from '@nestjs/common';
import { Pseudonym, UserDO } from '@shared/domain/';
import { Pseudonym, UserDO } from '@shared/domain/domainobject';
import { LtiToolDO } from '@shared/domain/domainobject/ltitool.do';
import { LtiToolRepo } from '@shared/repo/ltitool/';
import { LegacyLogger } from '@src/core/logger';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BaseEntity } from '@shared/domain';
import { MikroORM } from '@mikro-orm/core';
import { EntityManager } from '@mikro-orm/mongodb';
import { Injectable } from '@nestjs/common';
import { BaseEntity } from '@shared/domain/entity';
import { Collection, Db } from 'mongodb';
import { MikroORM } from '@mikro-orm/core';

@Injectable()
export class DatabaseManagementService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MikroORM } from '@mikro-orm/core';
import { MikroOrmModule, MikroOrmModuleAsyncOptions } from '@mikro-orm/nestjs';
import { DynamicModule, Inject, Module, OnModuleDestroy } from '@nestjs/common';
import { ALL_ENTITIES } from '@shared/domain';
import { ALL_ENTITIES } from '@shared/domain/entity';
import _ from 'lodash';
import { MongoDatabaseModuleOptions } from './types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Counted, IdmAccount, IdmAccountUpdate } from '@shared/domain';
import { IdmAccount, IdmAccountUpdate } from '@shared/domain/interface';
import { Counted } from '@shared/domain/types';

export type SearchOptions = {
exact?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import { SystemOidcService } from '@modules/system/service/system-oidc.service';
import { HttpService } from '@nestjs/axios';
import { ConfigService } from '@nestjs/config';
import { Test, TestingModule } from '@nestjs/testing';
import { SystemEntity, SystemTypeEnum } from '@shared/domain';
import { SystemEntity } from '@shared/domain/entity';
import { SystemTypeEnum } from '@shared/domain/types';

import { systemEntityFactory } from '@shared/testing';
import { AxiosResponse } from 'axios';
import { of } from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { EntityManager } from '@mikro-orm/mongodb';
import { MongoMemoryDatabaseModule } from '@infra/database';
import KeycloakAdminClient from '@keycloak/keycloak-admin-client';
import { EntityManager } from '@mikro-orm/mongodb';
import { ConfigModule } from '@nestjs/config';
import { Test, TestingModule } from '@nestjs/testing';
import { Account } from '@shared/domain';
import { MongoMemoryDatabaseModule } from '@infra/database';
import { Account } from '@shared/domain/entity';
import { accountFactory, cleanupCollections } from '@shared/testing';
import { LoggerModule } from '@src/core/logger';
import { v1 } from 'uuid';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { KeycloakAdministrationService } from '@infra/identity-management/keycloak-administration/service/keycloak-administration.service';
import { KeycloakModule } from '@infra/identity-management/keycloak/keycloak.module';
import KeycloakAdminClient from '@keycloak/keycloak-admin-client-cjs/keycloak-admin-client-cjs-index';
import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation';
import { ObjectId } from '@mikro-orm/mongodb';
import { ServerModule } from '@modules/server';
import { HttpModule } from '@nestjs/axios';
import { Test, TestingModule } from '@nestjs/testing';
import { IdmAccount, IdmAccountUpdate } from '@shared/domain';
import { KeycloakAdministrationService } from '@infra/identity-management/keycloak-administration/service/keycloak-administration.service';
import { KeycloakModule } from '@infra/identity-management/keycloak/keycloak.module';
import { ServerModule } from '@modules/server';
import { IdmAccount, IdmAccountUpdate } from '@shared/domain/interface';
import { v1 } from 'uuid';
import { IdentityManagementService } from '../../identity-management.service';
import { KeycloakIdentityManagementService } from './keycloak-identity-management.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation';
import { Injectable } from '@nestjs/common';
import { EntityNotFoundError } from '@shared/common';
import { Counted, IdmAccount, IdmAccountUpdate } from '@shared/domain';
import { IdmAccount, IdmAccountUpdate } from '@shared/domain/interface';
import { Counted } from '@shared/domain/types';
import { IdentityManagementService, SearchOptions } from '../../identity-management.service';
import { KeycloakAdministrationService } from '../../keycloak-administration/service/keycloak-administration.service';

Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/infra/rabbitmq/exchange/files-storage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Configuration } from '@hpi-schul-cloud/commons/lib';
import { EntityId } from '@shared/domain';
import { EntityId } from '@shared/domain/types';

export const FilesStorageExchange = Configuration.get('FILES_STORAGE__EXCHANGE') as string;

Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/modules/account/account-api.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Module } from '@nestjs/common';
import { PermissionService } from '@shared/domain';
import { PermissionService } from '@shared/domain/service';
import { UserRepo } from '@shared/repo';
import { LoggerModule } from '../../core/logger/logger.module';
import { AccountModule } from './account.module';
import { AccountController } from './controller/account.controller';
import { AccountUc } from './uc/account.uc';
import { LoggerModule } from '../../core/logger/logger.module';

@Module({
imports: [AccountModule, LoggerModule],
Expand Down
3 changes: 2 additions & 1 deletion apps/server/src/modules/account/account.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { IdentityManagementModule } from '@infra/identity-management';
import { Module } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PermissionService } from '@shared/domain';
import { PermissionService } from '@shared/domain/service';
import { LegacySystemRepo, UserRepo } from '@shared/repo';

import { LoggerModule } from '@src/core/logger/logger.module';
import { ServerConfig } from '../server/server.config';
import { AccountIdmToDtoMapper, AccountIdmToDtoMapperDb, AccountIdmToDtoMapperIdm } from './mapper';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { EntityManager } from '@mikro-orm/core';
import { ExecutionContext, INestApplication } from '@nestjs/common';
import { Test, TestingModule } from '@nestjs/testing';
import { Account, Permission, RoleName, User } from '@shared/domain';
import { Account, User } from '@shared/domain/entity';
import { Permission, RoleName } from '@shared/domain/interface';
import { accountFactory, mapUserToCurrentUser, roleFactory, schoolFactory, userFactory } from '@shared/testing';
import {
AccountByIdBodyParams,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Account } from '@shared/domain';
import { Account } from '@shared/domain/entity';
import { ObjectId } from 'bson';
import { AccountEntityToDtoMapper } from './account-entity-to-dto.mapper';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Account, Counted } from '@shared/domain';
import { Account } from '@shared/domain/entity';
import { Counted } from '@shared/domain/types';
import { AccountDto } from '../services/dto/account.dto';

export class AccountEntityToDtoMapper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common';
import { IdmAccount } from '@shared/domain';
import { IdmAccount } from '@shared/domain/interface';
import { AccountDto } from '../services/dto/account.dto';

@Injectable()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Test, TestingModule } from '@nestjs/testing';
import { IdmAccount } from '@shared/domain';
import { IdmAccount } from '@shared/domain/interface';
import { AccountDto } from '../services/dto';
import { AccountIdmToDtoMapper } from './account-idm-to-dto.mapper.abstract';
import { AccountIdmToDtoMapperDb } from './account-idm-to-dto.mapper.db';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IdmAccount } from '@shared/domain';
import { IdmAccount } from '@shared/domain/interface';
import { AccountDto } from '../services/dto/account.dto';
import { AccountIdmToDtoMapper } from './account-idm-to-dto.mapper.abstract';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Test, TestingModule } from '@nestjs/testing';
import { IdmAccount } from '@shared/domain';
import { IdmAccount } from '@shared/domain/interface';
import { AccountDto } from '../services/dto';
import { AccountIdmToDtoMapper } from './account-idm-to-dto.mapper.abstract';
import { AccountIdmToDtoMapperIdm } from './account-idm-to-dto.mapper.idm';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IdmAccount } from '@shared/domain';
import { IdmAccount } from '@shared/domain/interface';
import { AccountDto } from '../services/dto/account.dto';
import { AccountIdmToDtoMapper } from './account-idm-to-dto.mapper.abstract';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Account } from '@shared/domain';
import { AccountDto } from '@modules/account/services/dto/account.dto';
import { ObjectId } from '@mikro-orm/mongodb';
import { AccountDto } from '@modules/account/services/dto/account.dto';
import { Account } from '@shared/domain/entity';
import { AccountResponseMapper } from '.';

describe('AccountResponseMapper', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Account } from '@shared/domain';
import { AccountDto } from '@modules/account/services/dto/account.dto';
import { Account } from '@shared/domain/entity';
import { AccountResponse } from '../controller/dto';

export class AccountResponseMapper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { MongoMemoryDatabaseModule } from '@infra/database';
import { NotFoundError } from '@mikro-orm/core';
import { EntityManager, ObjectId } from '@mikro-orm/mongodb';
import { Test, TestingModule } from '@nestjs/testing';
import { Account, User } from '@shared/domain';
import { MongoMemoryDatabaseModule } from '@infra/database';
import { Account, User } from '@shared/domain/entity';
import { accountFactory, cleanupCollections, userFactory } from '@shared/testing';
import { AccountRepo } from './account.repo';

Expand Down
3 changes: 2 additions & 1 deletion apps/server/src/modules/account/repo/account.repo.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { AnyEntity, EntityName, Primary } from '@mikro-orm/core';
import { ObjectId } from '@mikro-orm/mongodb';
import { Injectable } from '@nestjs/common';
import { EntityId, SortOrder } from '@shared/domain';
import { Account } from '@shared/domain/entity/account.entity';
import { SortOrder } from '@shared/domain/interface';
import { EntityId } from '@shared/domain/types';
import { BaseRepo } from '@shared/repo/base.repo';

@Injectable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { ServerConfig } from '@modules/server';
import { ConfigService } from '@nestjs/config';
import { Test, TestingModule } from '@nestjs/testing';
import { EntityNotFoundError } from '@shared/common';
import { Account, EntityId, Permission, Role, RoleName, SchoolEntity, User } from '@shared/domain';
import { Account, Role, SchoolEntity, User } from '@shared/domain/entity';

import { Permission, RoleName } from '@shared/domain/interface';
import { EntityId } from '@shared/domain/types';
import { accountFactory, schoolFactory, setupEntities, userFactory } from '@shared/testing';
import bcrypt from 'bcryptjs';
import { LegacyLogger } from '../../../core/logger';
Expand Down
11 changes: 6 additions & 5 deletions apps/server/src/modules/account/services/account-db.service.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { ObjectId } from '@mikro-orm/mongodb';
import { Injectable } from '@nestjs/common';
import bcrypt from 'bcryptjs';
import { EntityNotFoundError } from '@shared/common';
import { Account, Counted, EntityId } from '@shared/domain';
import { AccountRepo } from '../repo/account.repo';
import { Account } from '@shared/domain/entity';
import { Counted, EntityId } from '@shared/domain/types';
import bcrypt from 'bcryptjs';
import { AccountEntityToDtoMapper } from '../mapper';
import { AccountDto, AccountSaveDto } from './dto';
import { AbstractAccountService } from './account.service.abstract';
import { AccountRepo } from '../repo/account.repo';
import { AccountLookupService } from './account-lookup.service';
import { AbstractAccountService } from './account.service.abstract';
import { AccountDto, AccountSaveDto } from './dto';

@Injectable()
export class AccountServiceDb extends AbstractAccountService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { v1 } from 'uuid';
import { IdentityManagementModule, IdentityManagementService } from '@infra/identity-management';
import { KeycloakAdministrationService } from '@infra/identity-management/keycloak-administration/service/keycloak-administration.service';
import KeycloakAdminClient from '@keycloak/keycloak-admin-client-cjs/keycloak-admin-client-cjs-index';
import { ObjectId } from '@mikro-orm/mongodb';
import { AccountSaveDto } from '@modules/account/services/dto';
import { ConfigModule } from '@nestjs/config';
import { Test, TestingModule } from '@nestjs/testing';
import { IdmAccount } from '@shared/domain';
import { KeycloakAdministrationService } from '@infra/identity-management/keycloak-administration/service/keycloak-administration.service';
import { AccountSaveDto } from '@modules/account/services/dto';
import { IdmAccount } from '@shared/domain/interface';
import { LoggerModule } from '@src/core/logger';
import { IdentityManagementModule, IdentityManagementService } from '@infra/identity-management';
import { v1 } from 'uuid';
import { AccountIdmToDtoMapper, AccountIdmToDtoMapperDb } from '../mapper';
import { AccountServiceIdm } from './account-idm.service';
import { AbstractAccountService } from './account.service.abstract';
import { AccountLookupService } from './account-lookup.service';
import { AbstractAccountService } from './account.service.abstract';

describe('AccountIdmService Integration', () => {
let module: TestingModule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { createMock, DeepMocked } from '@golevelup/ts-jest';
import { Test, TestingModule } from '@nestjs/testing';
import { EntityNotFoundError } from '@shared/common';
import { IdmAccount } from '@shared/domain';
import { MongoMemoryDatabaseModule } from '@infra/database';
import { IdentityManagementOauthService, IdentityManagementService } from '@infra/identity-management';
import { NotImplementedException } from '@nestjs/common';
import { LoggerModule } from '@src/core/logger';
import { ConfigModule } from '@nestjs/config';
import { Test, TestingModule } from '@nestjs/testing';
import { EntityNotFoundError } from '@shared/common';
import { IdmAccount } from '@shared/domain/interface';
import { LoggerModule } from '@src/core/logger';
import { AccountIdmToDtoMapper, AccountIdmToDtoMapperDb } from '../mapper';
import { AccountServiceIdm } from './account-idm.service';
import { AccountLookupService } from './account-lookup.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { IdentityManagementOauthService, IdentityManagementService } from '@infra/identity-management';
import { ObjectId } from '@mikro-orm/mongodb';
import { Injectable, NotImplementedException } from '@nestjs/common';
import { EntityNotFoundError } from '@shared/common';
import { Counted, EntityId, IdmAccount, IdmAccountUpdate } from '@shared/domain';
import { IdentityManagementService, IdentityManagementOauthService } from '@infra/identity-management';
import { IdmAccount, IdmAccountUpdate } from '@shared/domain/interface';
import { Counted, EntityId } from '@shared/domain/types';
import { LegacyLogger } from '@src/core/logger';
import { AccountIdmToDtoMapper } from '../mapper';
import { AccountLookupService } from './account-lookup.service';
import { AbstractAccountService } from './account.service.abstract';
import { AccountDto, AccountSaveDto } from './dto';
import { AccountLookupService } from './account-lookup.service';

@Injectable()
export class AccountServiceIdm extends AbstractAccountService {
Expand Down
Loading
Loading