Skip to content

Commit

Permalink
removed export * from './domainobject'
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfganggreschus committed Nov 22, 2023
1 parent 0aac3f3 commit c564371
Show file tree
Hide file tree
Showing 132 changed files with 283 additions and 235 deletions.
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,7 +1,8 @@
import { AccountDto } from '@modules/account/services/dto';
import { Injectable, UnauthorizedException } from '@nestjs/common';
import { PassportStrategy } from '@nestjs/passport';
import { LegacySchoolDo, SystemEntity, User } from '@shared/domain';
import { SystemEntity, User } from '@shared/domain';
import { LegacySchoolDo } from '@shared/domain/domainobject/legacy-school.do';
import { LegacySchoolRepo, SystemRepo, UserRepo } from '@shared/repo';
import { ErrorLoggable } from '@src/core/error/loggable/error.loggable';
import { Logger } from '@src/core/logger';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Injectable } from '@nestjs/common';
import { BaseDO, LegacySchoolDo } from '@shared/domain';
import { User } from '@shared/domain/entity';
import { AuthorizableObject } from '@shared/domain/domain-object';
import { AuthorizationContext, Rule } from '../type';
import { BaseDO, LegacySchoolDo } from '@shared/domain/domainobject';
import { User } from '@shared/domain/entity';
import { AuthorizationHelper } from '../service/authorization.helper';
import { AuthorizationContext, Rule } from '../type';

/**
* @deprecated because it uses the deprecated LegacySchoolDo.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Injectable, UnauthorizedException } from '@nestjs/common';
import { BaseDO, EntityId, User } from '@shared/domain';
import { EntityId, User } from '@shared/domain';
import { AuthorizableObject } from '@shared/domain/domain-object';
import { BaseDO } from '@shared/domain/domainobject';
import { UserRepo } from '@shared/repo';
import { AuthorizationHelper } from './authorization.helper';
import { ForbiddenLoggableException } from '../error';
import { RuleManager } from './rule-manager';
import { AuthorizationContext } from '../type';
import { AuthorizationHelper } from './authorization.helper';
import { RuleManager } from './rule-manager';

@Injectable()
export class AuthorizationService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { BoardDoAuthorizableService } from '@modules/board';
import { LessonService } from '@modules/lesson';
import { ContextExternalToolAuthorizableService } from '@modules/tool';
import { Injectable, NotImplementedException } from '@nestjs/common';
import { BaseDO, EntityId } from '@shared/domain';
import { EntityId } from '@shared/domain';
import { AuthorizableObject } from '@shared/domain/domain-object';
import { BaseDO } from '@shared/domain/domainobject';
import {
CourseGroupRepo,
CourseRepo,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Injectable, InternalServerErrorException, NotImplementedException } from '@nestjs/common';
import { BaseDO, User } from '@shared/domain';
import { User } from '@shared/domain';
import { AuthorizableObject } from '@shared/domain/domain-object'; // fix import when it is avaible
import type { AuthorizationContext, Rule } from '../type';
import { BaseDO } from '@shared/domain/domainobject';
import {
BoardDoRule,
ContextExternalToolRule,
CourseGroupRule,
CourseRule,
GroupRule,
LegacySchoolRule,
LessonRule,
SchoolExternalToolRule,
Expand All @@ -15,8 +16,8 @@ import {
TeamRule,
UserLoginMigrationRule,
UserRule,
GroupRule,
} from '../rules';
import type { AuthorizationContext, Rule } from '../type';

@Injectable()
export class RuleManager {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BaseDO, EntityId } from '@shared/domain';
import { EntityId } from '@shared/domain';
import { AuthorizableObject } from '@shared/domain/domain-object'; // fix import when it is avaible
import { BaseDO } from '@shared/domain/domainobject';

export interface AuthorizationLoaderService {
findById(id: EntityId): Promise<AuthorizableObject | BaseDO>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BaseDO, User } from '@shared/domain';
import { User } from '@shared/domain';
import { AuthorizableObject } from '@shared/domain/domain-object'; // fix import when it is avaible
import { BaseDO } from '@shared/domain/domainobject';
import { AuthorizationContext } from './authorization-context.interface';

export interface Rule<T = AuthorizableObject | BaseDO> {
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/modules/board/board.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ConsoleWriterModule } from '@infra/console';
import { FilesStorageClientModule } from '@modules/files-storage-client';
import { ContextExternalToolModule } from '@modules/tool/context-external-tool';
import { UserModule } from '@modules/user';
import { Module } from '@nestjs/common';
import { ContentElementFactory } from '@shared/domain';
import { ConsoleWriterModule } from '@infra/console';
import { ContentElementFactory } from '@shared/domain/domainobject';
import { CourseRepo } from '@shared/repo';
import { LoggerModule } from '@src/core/logger';
import { BoardDoRepo, BoardNodeRepo, RecursiveDeleteVisitor } from './repo';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiProperty } from '@nestjs/swagger';
import { BoardExternalReferenceType } from '@shared/domain';
import { BoardExternalReferenceType } from '@shared/domain/domainobject';

export class BoardContextResponse {
constructor({ id, type }: BoardContextResponse) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiPropertyOptional } from '@nestjs/swagger';
import { ContentElementType } from '@shared/domain';
import { ContentElementType } from '@shared/domain/domainobject';
import { IsEnum, IsOptional } from 'class-validator';

export class CreateCardBodyParams {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { ContentElementType } from '@shared/domain';
import { ContentElementType } from '@shared/domain/domainobject';
import { IsEnum, IsInt, IsOptional, Min } from 'class-validator';

export class CreateContentElementBodyParams {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiProperty } from '@nestjs/swagger';
import { ContentElementType } from '@shared/domain';
import { ContentElementType } from '@shared/domain/domainobject';
import { TimestampsResponse } from '../timestamps.response';

export class ExternalToolElementContent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ApiProperty } from '@nestjs/swagger';
import { DecodeHtmlEntities } from '@shared/controller';
import { ContentElementType } from '@shared/domain';
import { ContentElementType } from '@shared/domain/domainobject';
import { TimestampsResponse } from '../timestamps.response';

export class FileElementContent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { ContentElementType } from '@shared/domain';
import { ContentElementType } from '@shared/domain/domainobject';
import { TimestampsResponse } from '../timestamps.response';

export class LinkElementContent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ApiProperty } from '@nestjs/swagger';
import { ContentElementType, InputFormat } from '@shared/domain';
import { InputFormat } from '@shared/domain';
import { ContentElementType } from '@shared/domain/domainobject';
import { TimestampsResponse } from '../timestamps.response';

export class RichTextElementContent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiProperty } from '@nestjs/swagger';
import { ContentElementType } from '@shared/domain';
import { ContentElementType } from '@shared/domain/domainobject';
import { TimestampsResponse } from '../timestamps.response';

export class SubmissionContainerElementContent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiProperty, ApiPropertyOptional, getSchemaPath } from '@nestjs/swagger';
import { ContentElementType } from '@shared/domain';
import { ContentElementType } from '@shared/domain/domainobject';
import { InputFormat } from '@shared/domain/types';
import { Type } from 'class-transformer';
import { IsDate, IsEnum, IsMongoId, IsOptional, IsString, ValidateNested } from 'class-validator';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AnyBoardDo } from '@shared/domain';
import type { AnyBoardDo } from '@shared/domain/domainobject';
import type { AnyContentElementResponse } from '../dto';

export interface BaseResponseMapper<T = AnyBoardDo> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpException, HttpStatus } from '@nestjs/common';
import { Column, ColumnBoard } from '@shared/domain';
import { Column, ColumnBoard } from '@shared/domain/domainobject';
import { BoardResponse, TimestampsResponse } from '../dto';
import { ColumnResponseMapper } from './column-response.mapper';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Card } from '@shared/domain';
import { Card } from '@shared/domain/domainobject';
import { CardResponse, TimestampsResponse, VisibilitySettingsResponse } from '../dto';
import { ContentElementResponseFactory } from './content-element-response.factory';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpException, HttpStatus } from '@nestjs/common';
import { Card, Column } from '@shared/domain';
import { Card, Column } from '@shared/domain/domainobject';
import { CardSkeletonResponse, ColumnResponse, TimestampsResponse } from '../dto';

export class ColumnResponseMapper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { NotImplementedException, UnprocessableEntityException } from '@nestjs/common';
import { AnyBoardDo, FileElement, RichTextElement } from '@shared/domain';
import { AnyBoardDo, FileElement, RichTextElement } from '@shared/domain/domainobject';
import {
AnyContentElementResponse,
FileElementResponse,
RichTextElementResponse,
isFileElementResponse,
isRichTextElementResponse,
RichTextElementResponse,
} from '../dto';
import { BaseResponseMapper } from './base-mapper.interface';
import { ExternalToolElementResponseMapper } from './external-tool-element-response.mapper';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContentElementType, ExternalToolElement } from '@shared/domain';
import { ContentElementType, ExternalToolElement } from '@shared/domain/domainobject';
import { ExternalToolElementContent, ExternalToolElementResponse, TimestampsResponse } from '../dto';
import { BaseResponseMapper } from './base-mapper.interface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContentElementType, FileElement } from '@shared/domain';
import { ContentElementType, FileElement } from '@shared/domain/domainobject';
import { FileElementContent, FileElementResponse, TimestampsResponse } from '../dto';
import { BaseResponseMapper } from './base-mapper.interface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContentElementType, LinkElement } from '@shared/domain';
import { ContentElementType, LinkElement } from '@shared/domain/domainobject';
import { LinkElementContent, LinkElementResponse, TimestampsResponse } from '../dto';
import { BaseResponseMapper } from './base-mapper.interface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContentElementType, RichTextElement } from '@shared/domain';
import { ContentElementType, RichTextElement } from '@shared/domain/domainobject';
import { TimestampsResponse } from '../dto';
import { RichTextElementContent, RichTextElementResponse } from '../dto/element/rich-text-element.response';
import { BaseResponseMapper } from './base-mapper.interface';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContentElementType, SubmissionContainerElement } from '@shared/domain';
import { ContentElementType, SubmissionContainerElement } from '@shared/domain/domainobject';
import { SubmissionContainerElementContent, SubmissionContainerElementResponse, TimestampsResponse } from '../dto';
import { BaseResponseMapper } from './base-mapper.interface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { FileElement, isSubmissionItemContent, RichTextElement, SubmissionItem, UserBoardRoles } from '@shared/domain';
import {
FileElement,
isSubmissionItemContent,
RichTextElement,
SubmissionItem,
UserBoardRoles,
} from '@shared/domain/domainobject';
import { SubmissionItemResponse, SubmissionsResponse, TimestampsResponse, UserDataResponse } from '../dto';
import { ContentElementResponseFactory } from './content-element-response.factory';

Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/modules/board/repo/board-do.builder-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import type {
SubmissionContainerElementNode,
SubmissionItemNode,
} from '@shared/domain';
import { BoardNodeType } from '@shared/domain';
import {
AnyBoardDo,
BoardNodeType,
Card,
Column,
ColumnBoard,
Expand All @@ -24,7 +24,7 @@ import {
RichTextElement,
SubmissionContainerElement,
SubmissionItem,
} from '@shared/domain';
} from '@shared/domain/domainobject';

export class BoardDoBuilderImpl implements BoardDoBuilder {
private childrenMap: Record<string, BoardNode[]> = {};
Expand Down
3 changes: 2 additions & 1 deletion apps/server/src/modules/board/repo/board-do.repo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Utils } from '@mikro-orm/core';
import { EntityManager, ObjectId } from '@mikro-orm/mongodb';
import { Injectable, NotFoundException } from '@nestjs/common';
import { AnyBoardDo, BoardExternalReference, BoardNode, ColumnBoardNode, EntityId } from '@shared/domain';
import { BoardNode, ColumnBoardNode, EntityId } from '@shared/domain';
import { AnyBoardDo, BoardExternalReference } from '@shared/domain/domainobject';
import { BoardDoBuilderImpl } from './board-do.builder-impl';
import { BoardNodeRepo } from './board-node.repo';
import { RecursiveDeleteVisitor } from './recursive-delete.vistor';
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/modules/board/repo/recursive-delete.vistor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { FilesStorageClientAdapterService } from '@modules/files-storage-client'
import { ContextExternalTool } from '@modules/tool/context-external-tool/domain';
import { ContextExternalToolService } from '@modules/tool/context-external-tool/service';
import { Injectable } from '@nestjs/common';
import { BoardNode } from '@shared/domain/';
import {
AnyBoardDo,
BoardCompositeVisitorAsync,
BoardNode,
Card,
Column,
ColumnBoard,
Expand All @@ -15,7 +15,7 @@ import {
RichTextElement,
SubmissionContainerElement,
SubmissionItem,
} from '@shared/domain';
} from '@shared/domain/domainobject';
import { LinkElement } from '@shared/domain/domainobject/board/link-element.do';

@Injectable()
Expand Down
24 changes: 13 additions & 11 deletions apps/server/src/modules/board/repo/recursive-save.visitor.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
import { Utils } from '@mikro-orm/core';
import { EntityManager } from '@mikro-orm/mongodb';
import { ContextExternalToolEntity } from '@modules/tool/context-external-tool/entity';
import {
AnyBoardDo,
BoardCompositeVisitor,
BoardNode,
Card,
CardNode,
Column,
ColumnBoard,
ColumnBoardNode,
ColumnNode,
EntityId,
ExternalToolElement,
ExternalToolElementNodeEntity,
FileElement,
FileElementNode,
RichTextElement,
RichTextElementNode,
SubmissionContainerElement,
SubmissionContainerElementNode,
SubmissionItem,
SubmissionItemNode,
} from '@shared/domain';
import {
AnyBoardDo,
BoardCompositeVisitor,
Card,
Column,
ColumnBoard,
ExternalToolElement,
FileElement,
RichTextElement,
SubmissionContainerElement,
SubmissionItem,
} from '@shared/domain/domainobject';
import { LinkElement } from '@shared/domain/domainobject/board/link-element.do';
import { LinkElementNode } from '@shared/domain/entity/boardnode/link-element-node.entity';
import { ContextExternalToolEntity } from '@modules/tool/context-external-tool/entity';
import { BoardNodeRepo } from './board-node.repo';

type ParentData = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { AuthorizationLoaderService } from '@modules/authorization';
import { forwardRef, Inject, Injectable } from '@nestjs/common';
import { Course, EntityId } from '@shared/domain';
import {
AnyBoardDo,
BoardDoAuthorizable,
BoardExternalReferenceType,
BoardRoles,
ColumnBoard,
Course,
EntityId,
UserBoardRoles,
UserRoleEnum,
} from '@shared/domain';
} from '@shared/domain/domainobject';
import { CourseRepo } from '@shared/repo';
import { AuthorizationLoaderService } from '@modules/authorization';
import { BoardDoRepo } from '../repo';

@Injectable()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { AnyBoardDo } from '@shared/domain';
import { CopyStatus } from '@modules/copy-helper';
import { Injectable } from '@nestjs/common';
import { AnyBoardDo } from '@shared/domain/domainobject';
import { RecursiveCopyVisitor } from './recursive-copy.visitor';
import { SchoolSpecificFileCopyService } from './school-specific-file-copy.interface';

Expand Down
Loading

0 comments on commit c564371

Please sign in to comment.