Skip to content

Commit

Permalink
Cleanup import / exports
Browse files Browse the repository at this point in the history
  • Loading branch information
CeEv committed Oct 11, 2023
1 parent 69766b9 commit b27b5d3
Show file tree
Hide file tree
Showing 26 changed files with 25 additions and 26 deletions.
1 change: 1 addition & 0 deletions apps/server/src/modules/authorization/domain/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './service';
export * from './mapper';
export * from './error';
export * from './type';
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NotFoundException } from '@nestjs/common';
import { Test, TestingModule } from '@nestjs/testing';
import { courseFactory, setupEntities, userFactory } from '@shared/testing';
import { ObjectId } from 'bson';
import { AuthorizableReferenceType } from '../types';
import { AuthorizableReferenceType } from '../type';
import { AuthorizationService } from './authorization.service';
import { ReferenceLoader } from './reference.loader';
import { AuthorizationContextBuilder } from '../mapper/authorization-context.builder';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
import { EntityId } from '@shared/domain';
import { ReferenceLoader } from './reference.loader';
import { AuthorizationContext } from '../../type';
import { AuthorizableReferenceType } from '../types';
import { AuthorizableReferenceType } from '../type';
import { ForbiddenLoggableException } from '../error';
import { AuthorizationService } from './authorization.service';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from '../types';
export * from './authorization.service';
export * from './authorization.helper';
export * from './rule-manager';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { setupEntities, userFactory } from '@shared/testing';
import { BoardDoAuthorizableService } from '@src/modules/board';
import { ContextExternalToolAuthorizableService } from '@src/modules/tool/context-external-tool/service/context-external-tool-authorizable.service';
import { ReferenceLoader } from './reference.loader';
import { AuthorizableReferenceType } from '../types';
import { AuthorizableReferenceType } from '../type';

describe('reference.loader', () => {
let service: ReferenceLoader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from '@shared/repo';
import { BoardDoAuthorizableService } from '@src/modules/board/service';
import { ContextExternalToolAuthorizableService } from '@src/modules/tool/context-external-tool/service';
import { AuthorizableReferenceType } from '../types';
import { AuthorizableReferenceType } from '../type';

type RepoType =
| TaskRepo
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/board/uc/board.uc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
EntityId,
} from '@shared/domain';
import { LegacyLogger } from '@src/core/logger';
import { AuthorizationService } from '@src/modules/authorization/domain/service/authorization.service';
import { AuthorizationService } from '@src/modules/authorization/domain';
import { Action } from '@src/modules/authorization/type/action.enum';
import { CardService, ColumnBoardService, ColumnService } from '../service';
import { BoardDoAuthorizableService } from '../service/board-do-authorizable.service';
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/board/uc/card.uc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { AnyBoardDo, AnyContentElementDo, Card, ContentElementType, EntityId } from '@shared/domain';
import { LegacyLogger } from '@src/core/logger';
import { AuthorizationService } from '@src/modules/authorization/domain/service/authorization.service';
import { AuthorizationService } from '@src/modules/authorization';
import { Action } from '@src/modules/authorization/type/action.enum';
import { BoardDoAuthorizableService, CardService, ContentElementService } from '../service';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NotImplementedException } from '@nestjs/common';
import { fileRecordFactory, setupEntities } from '@shared/testing';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/types';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/type';
import {
DownloadFileParams,
FileRecordListResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NotImplementedException, StreamableFile } from '@nestjs/common';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/types';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/type';
import { plainToClass } from 'class-transformer';
import {
DownloadFileParams,
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/modules/learnroom/uc/course-copy.uc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { ForbiddenException, InternalServerErrorException } from '@nestjs/common
import { Test, TestingModule } from '@nestjs/testing';
import { Permission } from '@shared/domain';
import { courseFactory, setupEntities, userFactory } from '@shared/testing';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/types';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/type';
import { AuthorizationContextBuilder } from '@src/modules/authorization';
import { AuthorizationReferenceService } from '@src/modules/authorization/domain/service';
import { AuthorizationReferenceService } from '@src/modules/authorization/domain';
import { CopyElementType, CopyStatusEnum } from '@src/modules/copy-helper';
import { CourseCopyService } from '../service';
import { CourseCopyUC } from './course-copy.uc';
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/learnroom/uc/course-copy.uc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Configuration } from '@hpi-schul-cloud/commons';
import { Injectable, InternalServerErrorException } from '@nestjs/common';
import { EntityId, Permission } from '@shared/domain';
import { AuthorizationContextBuilder } from '@src/modules/authorization';
import { AuthorizationReferenceService, AuthorizableReferenceType } from '@src/modules/authorization/domain/service';
import { AuthorizationReferenceService, AuthorizableReferenceType } from '@src/modules/authorization/domain';
import { CopyStatus } from '@src/modules/copy-helper';
import { CourseCopyService } from '../service';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Test, TestingModule } from '@nestjs/testing';
import { createMock, DeepMocked } from '@golevelup/ts-jest';
import { CommonCartridgeExportService } from '@src/modules/learnroom/service/common-cartridge-export.service';
import { AuthorizationReferenceService } from '@src/modules/authorization/domain/service';
import { AuthorizationReferenceService } from '@src/modules/authorization/domain';
import { ObjectId } from 'bson';
import { ForbiddenException } from '@nestjs/common';
import { CourseExportUc } from './course-export.uc';
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/learnroom/uc/course-export.uc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { EntityId, Permission } from '@shared/domain';
import { AuthorizationContextBuilder } from '@src/modules/authorization';
import { AuthorizationReferenceService, AuthorizableReferenceType } from '@src/modules/authorization/domain/service';
import { AuthorizationReferenceService, AuthorizableReferenceType } from '@src/modules/authorization/domain';
import { CommonCartridgeVersion } from '../common-cartridge';
import { CommonCartridgeExportService } from '../service/common-cartridge-export.service';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import {
TaskWithStatusVo,
User,
} from '@shared/domain';
import { AuthorizationService } from '@src/modules/authorization/domain/service/authorization.service';
import { Action } from '@src/modules/authorization/type/action.enum';
import { AuthorizationService, Action } from '@src/modules/authorization';
import {
ColumnBoardMetaData,
LessonMetaData,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { OauthProviderService } from '@shared/infra/oauth-provider/index';
import { Permission, User } from '@shared/domain/index';
import { AuthorizationService } from '@src/modules/authorization/domain/service/authorization.service';
import { AuthorizationService } from '@src/modules/authorization';
import { ProviderOauthClient } from '@shared/infra/oauth-provider/dto';
import { ICurrentUser } from '@src/modules/authentication';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NotImplementedException } from '@nestjs/common';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/types';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/type';
import { ShareTokenContextType } from '../domainobject/share-token.do';
import { ShareTokenContextTypeMapper } from './context-type.mapper';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NotImplementedException } from '@nestjs/common';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/types';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/type';
import { ShareTokenContextType } from '../domainobject/share-token.do';

export class ShareTokenContextTypeMapper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NotImplementedException } from '@nestjs/common';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/types';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/type';
import { ShareTokenParentType } from '../domainobject/share-token.do';
import { ShareTokenParentTypeMapper } from './parent-type.mapper';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NotImplementedException } from '@nestjs/common';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/types';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/type';
import { ShareTokenParentType } from '../domainobject/share-token.do';

export class ShareTokenParentTypeMapper {
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/sharing/uc/share-token.uc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BadRequestException, Injectable, InternalServerErrorException, NotImple
import { EntityId, Permission } from '@shared/domain';
import { LegacyLogger } from '@src/core/logger';
import { AuthorizationContextBuilder, AuthorizationService } from '@src/modules/authorization';
import { AuthorizationReferenceService } from '@src/modules/authorization/domain/service';
import { AuthorizationReferenceService } from '@src/modules/authorization/domain';
import { CopyStatus } from '@src/modules/copy-helper';
import { CourseCopyService } from '@src/modules/learnroom';
import { CourseService } from '@src/modules/learnroom/service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/types';
import { AuthorizableReferenceType } from '@src/modules/authorization/domain/type';
import { ToolContextType } from '../enum';

const typeMapping: Record<ToolContextType, AuthorizableReferenceType> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import { TeamsRepo, VideoConferenceRepo } from '@shared/repo';
import { roleFactory, setupEntities, userDoFactory } from '@shared/testing';
import { teamFactory } from '@shared/testing/factory/team.factory';
import { LegacySchoolService, UserService } from '@src/modules';
import { AuthorizationReferenceService } from '@src/modules/authorization/domain/service';
import { AuthorizationReferenceService } from '@src/modules/authorization/domain';
import { ICurrentUser } from '@src/modules/authentication';
import { CourseService } from '@src/modules/learnroom/service';
import { CourseService } from '@src/modules/learnroom';
import { IScopeInfo, VideoConference, VideoConferenceJoin, VideoConferenceState } from './dto';
import { VideoConferenceDeprecatedUc } from './video-conference-deprecated.uc';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { TeamsRepo } from '@shared/repo';
import { VideoConferenceRepo } from '@shared/repo/videoconference/video-conference.repo';
import { ICurrentUser } from '@src/modules/authentication';
import { Action, AuthorizationContextBuilder } from '@src/modules/authorization';
import { AuthorizationReferenceService, AuthorizableReferenceType } from '@src/modules/authorization/domain/service';
import { AuthorizationReferenceService, AuthorizableReferenceType } from '@src/modules/authorization/domain';
import { LegacySchoolService } from '@src/modules/legacy-school';
import { CourseService } from '@src/modules/learnroom/service/course.service';
import { UserService } from '@src/modules/user';
Expand Down

0 comments on commit b27b5d3

Please sign in to comment.