From 7ae761d7348d7a005a1c6dc4e1a3837cb1b40862 Mon Sep 17 00:00:00 2001 From: Firas Shmit Date: Fri, 13 Dec 2024 13:41:15 +0100 Subject: [PATCH] EW-1060 modified deep imports of some dtos --- .../common-cartridge-client/card-client/dto/index.ts | 8 ++++++++ .../service/common-cartridge-export.service.spec.ts | 8 +++++--- .../service/common-cartridge-export.service.ts | 10 ++++++---- .../lesson/controller/dto/lesson-content.response.ts | 1 + 4 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 apps/server/src/modules/common-cartridge/common-cartridge-client/card-client/dto/index.ts diff --git a/apps/server/src/modules/common-cartridge/common-cartridge-client/card-client/dto/index.ts b/apps/server/src/modules/common-cartridge/common-cartridge-client/card-client/dto/index.ts new file mode 100644 index 00000000000..64c051f06c7 --- /dev/null +++ b/apps/server/src/modules/common-cartridge/common-cartridge-client/card-client/dto/index.ts @@ -0,0 +1,8 @@ +export { RichTextElementResponseDto } from './rich-text-element-response.dto'; +export { RichTextElementContentDto } from './rich-text-element-content.dto'; +export { LinkElementContentDto } from './link-element-content.dto'; +export { LinkElementResponseDto } from './link-element-response.dto'; +export { CardResponseDto } from './card-response.dto'; +export { CardListResponseDto } from './card-list-response.dto'; +export { TimestampResponseDto } from './timestamp-response.dto'; +export { VisibilitySettingsResponseDto } from './visibility-settings-response.dto'; diff --git a/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts b/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts index 8dd4f206d43..1e2d7fab28b 100644 --- a/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts +++ b/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.spec.ts @@ -16,8 +16,11 @@ import { BoardLessonDto, BoardColumnBoardDto, } from '../common-cartridge-client/room-client/dto'; -import { RichTextElementContentDto } from '../common-cartridge-client/card-client/dto/rich-text-element-content.dto'; -import { LinkElementContentDto } from '../common-cartridge-client/card-client/dto/link-element-content.dto'; +import { + RichTextElementContentDto, + LinkElementContentDto, + CardListResponseDto, +} from '../common-cartridge-client/card-client/dto'; import { boardCloumnBoardFactory, boardLessonFactory, @@ -28,7 +31,6 @@ import { listOfCardResponseFactory, roomFactory, } from '../testing/common-cartridge-dtos.factory'; -import { CardListResponseDto } from '../common-cartridge-client/card-client/dto/card-list-response.dto'; describe('CommonCartridgeExportService', () => { let module: TestingModule; diff --git a/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.ts b/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.ts index c61bf7a16e1..586106f3308 100644 --- a/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.ts +++ b/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.ts @@ -10,7 +10,6 @@ import { BoardTaskDto, } from '../common-cartridge-client/room-client/dto'; import { CardClientAdapter } from '../common-cartridge-client/card-client/card-client.adapter'; -import { CardListResponseDto } from '../common-cartridge-client/card-client/dto/card-list-response.dto'; import { LessonClientAdapter } from '../common-cartridge-client/lesson-client/lesson-client.adapter'; import { LessonContentDto, LessonDto } from '../common-cartridge-client/lesson-client/dto'; import { CommonCartridgeFileBuilder } from '../export/builders/common-cartridge-file-builder'; @@ -19,10 +18,13 @@ import { CommonCartridgeExportMapper } from './common-cartridge.mapper'; import { CommonCartridgeOrganizationNode } from '../export/builders/common-cartridge-organization-node'; import { createIdentifier } from '../export/utils'; import { BoardElementDtoType } from '../common-cartridge-client/room-client/enums/board-element.enum'; -import { CardResponseDto } from '../common-cartridge-client/card-client/dto/card-response.dto'; import { CardResponseElementsInnerDto } from '../common-cartridge-client/card-client/types/card-response-elements-inner.type'; -import { RichTextElementResponseDto } from '../common-cartridge-client/card-client/dto/rich-text-element-response.dto'; -import { LinkElementResponseDto } from '../common-cartridge-client/card-client/dto/link-element-response.dto'; +import { + RichTextElementResponseDto, + LinkElementResponseDto, + CardListResponseDto, + CardResponseDto, +} from '../common-cartridge-client/card-client/dto'; const isRichTextElement = (reference: unknown): reference is RichTextElementResponseDto => reference instanceof RichTextElementResponseDto; diff --git a/apps/server/src/modules/lesson/controller/dto/lesson-content.response.ts b/apps/server/src/modules/lesson/controller/dto/lesson-content.response.ts index 86844f8f2c2..3a52a17b47b 100644 --- a/apps/server/src/modules/lesson/controller/dto/lesson-content.response.ts +++ b/apps/server/src/modules/lesson/controller/dto/lesson-content.response.ts @@ -11,6 +11,7 @@ import { ComponentType, } from '@shared/domain/entity/lesson.entity'; +// eslint problem will be solved in EW-1090 class ComponentTextPropsImpl implements ComponentTextProperties { @ApiProperty({ nullable: false }) text!: string;