From b588a87d4aad333bc2a7c462f9674b5a7c770d65 Mon Sep 17 00:00:00 2001 From: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:59:49 +0100 Subject: [PATCH] chore(server): rename domain `repositories` -> `interfaces` (#8147) rename domain repositories --- .../jobs/specs/library-watcher.e2e-spec.ts | 2 +- server/src/apps/app.module.ts | 54 +++++++++---------- server/src/apps/microservices.service.ts | 2 +- server/src/config.ts | 2 +- server/src/controllers/partner.controller.ts | 2 +- server/src/cores/access.core.ts | 2 +- server/src/cores/storage.core.ts | 12 ++--- server/src/cores/system-config.core.ts | 4 +- server/src/cores/user.core.ts | 6 +-- server/src/database.config.ts | 2 +- server/src/dtos/asset.dto.ts | 2 +- server/src/dtos/job.dto.ts | 2 +- server/src/dtos/model-config.dto.ts | 2 +- server/src/dtos/system-config-job.dto.ts | 2 +- server/src/dtos/time-bucket.dto.ts | 2 +- server/src/entities/system-config.entity.ts | 2 +- .../immich/api-v1/asset/asset.service.spec.ts | 10 ++-- .../src/immich/api-v1/asset/asset.service.ts | 12 ++--- server/src/immich/app.utils.ts | 2 +- ...cess.repository.ts => access.interface.ts} | 0 ...ty.repository.ts => activity.interface.ts} | 0 ...album.repository.ts => album.interface.ts} | 0 ...key.repository.ts => api-key.interface.ts} | 0 ...repository.ts => asset-stack.interface.ts} | 0 ...asset.repository.ts => asset.interface.ts} | 4 +- ...audit.repository.ts => audit.interface.ts} | 0 ...pository.ts => communication.interface.ts} | 0 ...ypto.repository.ts => crypto.interface.ts} | 0 ...se.repository.ts => database.interface.ts} | 0 .../{job.repository.ts => job.interface.ts} | 0 ...ary.repository.ts => library.interface.ts} | 0 ...itory.ts => machine-learning.interface.ts} | 0 ...media.repository.ts => media.interface.ts} | 0 ...ta.repository.ts => metadata.interface.ts} | 0 .../{move.repository.ts => move.interface.ts} | 0 ...ner.repository.ts => partner.interface.ts} | 0 ...rson.repository.ts => person.interface.ts} | 0 ...arch.repository.ts => search.interface.ts} | 0 ...repository.ts => server-info.interface.ts} | 0 ...repository.ts => shared-link.interface.ts} | 0 ...age.repository.ts => storage.interface.ts} | 0 ...pository.ts => system-config.interface.ts} | 0 ...sitory.ts => system-metadata.interface.ts} | 0 .../{tag.repository.ts => tag.interface.ts} | 0 ....repository.ts => user-token.interface.ts} | 0 .../{user.repository.ts => user.interface.ts} | 0 .../1700713994428-AddCLIPEmbeddingIndex.ts | 2 +- .../1700714033632-AddFaceEmbeddingIndex.ts | 2 +- server/src/repositories/access.repository.ts | 2 +- .../src/repositories/activity.repository.ts | 2 +- server/src/repositories/album.repository.ts | 2 +- server/src/repositories/api-key.repository.ts | 2 +- .../repositories/asset-stack.repository.ts | 2 +- server/src/repositories/asset.repository.ts | 4 +- server/src/repositories/audit.repository.ts | 2 +- .../repositories/communication.repository.ts | 2 +- server/src/repositories/crypto.repository.ts | 2 +- .../src/repositories/database.repository.ts | 2 +- .../src/repositories/filesystem.provider.ts | 2 +- server/src/repositories/job.repository.ts | 2 +- server/src/repositories/library.repository.ts | 2 +- .../machine-learning.repository.ts | 2 +- server/src/repositories/media.repository.ts | 2 +- .../src/repositories/metadata.repository.ts | 4 +- server/src/repositories/move.repository.ts | 2 +- server/src/repositories/partner.repository.ts | 2 +- server/src/repositories/person.repository.ts | 2 +- server/src/repositories/search.repository.ts | 4 +- .../repositories/server-info.repository.ts | 2 +- .../repositories/shared-link.repository.ts | 2 +- .../repositories/system-config.repository.ts | 2 +- .../system-metadata.repository.ts | 2 +- server/src/repositories/tag.repository.ts | 2 +- .../src/repositories/user-token.repository.ts | 2 +- server/src/repositories/user.repository.ts | 2 +- server/src/services/activity.service.spec.ts | 2 +- server/src/services/activity.service.ts | 4 +- server/src/services/album.service.spec.ts | 6 +-- server/src/services/album.service.ts | 8 +-- server/src/services/api-key.service.spec.ts | 4 +- server/src/services/api-key.service.ts | 4 +- server/src/services/asset.service.spec.ts | 16 +++--- server/src/services/asset.service.ts | 18 +++---- server/src/services/audit.service.spec.ts | 14 ++--- server/src/services/audit.service.ts | 16 +++--- server/src/services/auth.service.spec.ts | 14 ++--- server/src/services/auth.service.ts | 16 +++--- server/src/services/database.service.spec.ts | 2 +- server/src/services/database.service.ts | 2 +- server/src/services/download.service.spec.ts | 4 +- server/src/services/download.service.ts | 6 +-- server/src/services/job.service.spec.ts | 10 ++-- server/src/services/job.service.ts | 10 ++-- server/src/services/library.service.spec.ts | 14 ++--- server/src/services/library.service.ts | 16 +++--- server/src/services/media.service.spec.ts | 16 +++--- server/src/services/media.service.ts | 21 +++----- server/src/services/metadata.service.spec.ts | 24 ++++----- server/src/services/metadata.service.ts | 24 ++++----- server/src/services/partner.service.spec.ts | 4 +- server/src/services/partner.service.ts | 4 +- server/src/services/person.service.spec.ts | 20 +++---- server/src/services/person.service.ts | 22 ++++---- server/src/services/search.service.spec.ts | 14 ++--- server/src/services/search.service.ts | 14 ++--- .../src/services/server-info.service.spec.ts | 12 ++--- server/src/services/server-info.service.ts | 12 ++--- .../src/services/shared-link.service.spec.ts | 4 +- server/src/services/shared-link.service.ts | 6 +-- .../src/services/smart-info.service.spec.ts | 12 ++--- server/src/services/smart-info.service.ts | 12 ++--- .../services/storage-template.service.spec.ts | 20 +++---- .../src/services/storage-template.service.ts | 22 ++++---- server/src/services/storage.service.spec.ts | 2 +- server/src/services/storage.service.ts | 4 +- .../services/system-config.service.spec.ts | 8 +-- server/src/services/system-config.service.ts | 6 +-- server/src/services/tag.service.spec.ts | 2 +- server/src/services/tag.service.ts | 2 +- server/src/services/trash.service.spec.ts | 6 +-- server/src/services/trash.service.ts | 8 +-- server/src/services/user.service.spec.ts | 14 ++--- server/src/services/user.service.ts | 14 ++--- server/src/utils/database.ts | 2 +- server/src/utils/media.ts | 2 +- server/src/utils/sql.ts | 2 +- server/test/fixtures/media.stub.ts | 2 +- .../repositories/access.repository.mock.ts | 2 +- .../repositories/activity.repository.mock.ts | 2 +- .../repositories/album.repository.mock.ts | 2 +- .../repositories/api-key.repository.mock.ts | 2 +- .../asset-stack.repository.mock.ts | 2 +- .../repositories/asset.repository.mock.ts | 2 +- .../repositories/audit.repository.mock.ts | 2 +- .../communication.repository.mock.ts | 2 +- .../repositories/crypto.repository.mock.ts | 2 +- .../repositories/database.repository.mock.ts | 2 +- .../test/repositories/job.repository.mock.ts | 2 +- .../repositories/library.repository.mock.ts | 2 +- .../machine-learning.repository.mock.ts | 2 +- .../repositories/media.repository.mock.ts | 2 +- .../repositories/metadata.repository.mock.ts | 2 +- .../test/repositories/move.repository.mock.ts | 2 +- .../repositories/partner.repository.mock.ts | 2 +- .../repositories/person.repository.mock.ts | 2 +- .../repositories/search.repository.mock.ts | 2 +- .../shared-link.repository.mock.ts | 2 +- .../repositories/storage.repository.mock.ts | 2 +- .../system-config.repository.mock.ts | 2 +- .../system-info.repository.mock.ts | 2 +- .../system-metadata.repository.mock.ts | 2 +- .../test/repositories/tag.repository.mock.ts | 2 +- .../user-token.repository.mock.ts | 2 +- .../test/repositories/user.repository.mock.ts | 2 +- server/test/utils.ts | 6 +-- 155 files changed, 385 insertions(+), 390 deletions(-) rename server/src/interfaces/{access.repository.ts => access.interface.ts} (100%) rename server/src/interfaces/{activity.repository.ts => activity.interface.ts} (100%) rename server/src/interfaces/{album.repository.ts => album.interface.ts} (100%) rename server/src/interfaces/{api-key.repository.ts => api-key.interface.ts} (100%) rename server/src/interfaces/{asset-stack.repository.ts => asset-stack.interface.ts} (100%) rename server/src/interfaces/{asset.repository.ts => asset.interface.ts} (98%) rename server/src/interfaces/{audit.repository.ts => audit.interface.ts} (100%) rename server/src/interfaces/{communication.repository.ts => communication.interface.ts} (100%) rename server/src/interfaces/{crypto.repository.ts => crypto.interface.ts} (100%) rename server/src/interfaces/{database.repository.ts => database.interface.ts} (100%) rename server/src/interfaces/{job.repository.ts => job.interface.ts} (100%) rename server/src/interfaces/{library.repository.ts => library.interface.ts} (100%) rename server/src/interfaces/{machine-learning.repository.ts => machine-learning.interface.ts} (100%) rename server/src/interfaces/{media.repository.ts => media.interface.ts} (100%) rename server/src/interfaces/{metadata.repository.ts => metadata.interface.ts} (100%) rename server/src/interfaces/{move.repository.ts => move.interface.ts} (100%) rename server/src/interfaces/{partner.repository.ts => partner.interface.ts} (100%) rename server/src/interfaces/{person.repository.ts => person.interface.ts} (100%) rename server/src/interfaces/{search.repository.ts => search.interface.ts} (100%) rename server/src/interfaces/{server-info.repository.ts => server-info.interface.ts} (100%) rename server/src/interfaces/{shared-link.repository.ts => shared-link.interface.ts} (100%) rename server/src/interfaces/{storage.repository.ts => storage.interface.ts} (100%) rename server/src/interfaces/{system-config.repository.ts => system-config.interface.ts} (100%) rename server/src/interfaces/{system-metadata.repository.ts => system-metadata.interface.ts} (100%) rename server/src/interfaces/{tag.repository.ts => tag.interface.ts} (100%) rename server/src/interfaces/{user-token.repository.ts => user-token.interface.ts} (100%) rename server/src/interfaces/{user.repository.ts => user.interface.ts} (100%) diff --git a/server/e2e/jobs/specs/library-watcher.e2e-spec.ts b/server/e2e/jobs/specs/library-watcher.e2e-spec.ts index 5ce0868b9f..20a9d32020 100644 --- a/server/e2e/jobs/specs/library-watcher.e2e-spec.ts +++ b/server/e2e/jobs/specs/library-watcher.e2e-spec.ts @@ -5,7 +5,7 @@ import { LoginResponseDto } from 'src/dtos/auth.dto'; import { LibraryResponseDto } from 'src/dtos/library.dto'; import { AssetType } from 'src/entities/asset.entity'; import { LibraryType } from 'src/entities/library.entity'; -import { StorageEventType } from 'src/interfaces/storage.repository'; +import { StorageEventType } from 'src/interfaces/storage.interface'; import { LibraryService } from 'src/services/library.service'; import { IMMICH_TEST_ASSET_PATH, diff --git a/server/src/apps/app.module.ts b/server/src/apps/app.module.ts index 14aae51d9f..59158edfc6 100644 --- a/server/src/apps/app.module.ts +++ b/server/src/apps/app.module.ts @@ -8,33 +8,33 @@ import { OpenTelemetryModule } from 'nestjs-otel'; import { bullConfig, bullQueues, immichAppConfig } from 'src/config'; import { databaseConfig } from 'src/database.config'; import { databaseEntities } from 'src/entities'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IActivityRepository } from 'src/interfaces/activity.repository'; -import { IAlbumRepository } from 'src/interfaces/album.repository'; -import { IKeyRepository } from 'src/interfaces/api-key.repository'; -import { IAssetStackRepository } from 'src/interfaces/asset-stack.repository'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IAuditRepository } from 'src/interfaces/audit.repository'; -import { ICommunicationRepository } from 'src/interfaces/communication.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { IDatabaseRepository } from 'src/interfaces/database.repository'; -import { IJobRepository } from 'src/interfaces/job.repository'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; -import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository'; -import { IMediaRepository } from 'src/interfaces/media.repository'; -import { IMetadataRepository } from 'src/interfaces/metadata.repository'; -import { IMoveRepository } from 'src/interfaces/move.repository'; -import { IPartnerRepository } from 'src/interfaces/partner.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { ISearchRepository } from 'src/interfaces/search.repository'; -import { IServerInfoRepository } from 'src/interfaces/server-info.repository'; -import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.repository'; -import { ITagRepository } from 'src/interfaces/tag.repository'; -import { IUserTokenRepository } from 'src/interfaces/user-token.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IActivityRepository } from 'src/interfaces/activity.interface'; +import { IAlbumRepository } from 'src/interfaces/album.interface'; +import { IKeyRepository } from 'src/interfaces/api-key.interface'; +import { IAssetStackRepository } from 'src/interfaces/asset-stack.interface'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IAuditRepository } from 'src/interfaces/audit.interface'; +import { ICommunicationRepository } from 'src/interfaces/communication.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { IDatabaseRepository } from 'src/interfaces/database.interface'; +import { IJobRepository } from 'src/interfaces/job.interface'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; +import { IMachineLearningRepository } from 'src/interfaces/machine-learning.interface'; +import { IMediaRepository } from 'src/interfaces/media.interface'; +import { IMetadataRepository } from 'src/interfaces/metadata.interface'; +import { IMoveRepository } from 'src/interfaces/move.interface'; +import { IPartnerRepository } from 'src/interfaces/partner.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { ISearchRepository } from 'src/interfaces/search.interface'; +import { IServerInfoRepository } from 'src/interfaces/server-info.interface'; +import { ISharedLinkRepository } from 'src/interfaces/shared-link.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.interface'; +import { ITagRepository } from 'src/interfaces/tag.interface'; +import { IUserTokenRepository } from 'src/interfaces/user-token.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { AccessRepository } from 'src/repositories/access.repository'; import { ActivityRepository } from 'src/repositories/activity.repository'; import { AlbumRepository } from 'src/repositories/album.repository'; diff --git a/server/src/apps/microservices.service.ts b/server/src/apps/microservices.service.ts index a6b7f3869f..d5cae818ec 100644 --- a/server/src/apps/microservices.service.ts +++ b/server/src/apps/microservices.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { IDeleteFilesJob, JobName } from 'src/interfaces/job.repository'; +import { IDeleteFilesJob, JobName } from 'src/interfaces/job.interface'; import { AssetService } from 'src/services/asset.service'; import { AuditService } from 'src/services/audit.service'; import { DatabaseService } from 'src/services/database.service'; diff --git a/server/src/config.ts b/server/src/config.ts index f19546093a..b83efcc316 100644 --- a/server/src/config.ts +++ b/server/src/config.ts @@ -4,7 +4,7 @@ import { QueueOptions } from 'bullmq'; import { RedisOptions } from 'ioredis'; import Joi from 'joi'; import { LogLevel } from 'src/entities/system-config.entity'; -import { QueueName } from 'src/interfaces/job.repository'; +import { QueueName } from 'src/interfaces/job.interface'; const WHEN_DB_URL_SET = Joi.when('DB_URL', { is: Joi.exist(), diff --git a/server/src/controllers/partner.controller.ts b/server/src/controllers/partner.controller.ts index c7d5613f70..f654a72637 100644 --- a/server/src/controllers/partner.controller.ts +++ b/server/src/controllers/partner.controller.ts @@ -2,7 +2,7 @@ import { Body, Controller, Delete, Get, Param, Post, Put, Query } from '@nestjs/ import { ApiQuery, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { PartnerResponseDto, UpdatePartnerDto } from 'src/dtos/partner.dto'; -import { PartnerDirection } from 'src/interfaces/partner.repository'; +import { PartnerDirection } from 'src/interfaces/partner.interface'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { PartnerService } from 'src/services/partner.service'; import { UUIDParamDto } from 'src/validation'; diff --git a/server/src/cores/access.core.ts b/server/src/cores/access.core.ts index 78b30e4b18..f836e97623 100644 --- a/server/src/cores/access.core.ts +++ b/server/src/cores/access.core.ts @@ -1,7 +1,7 @@ import { BadRequestException, UnauthorizedException } from '@nestjs/common'; import { AuthDto } from 'src/dtos/auth.dto'; import { SharedLinkEntity } from 'src/entities/shared-link.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; import { setDifference, setIsEqual, setUnion } from 'src/utils/set'; export enum Permission { diff --git a/server/src/cores/storage.core.ts b/server/src/cores/storage.core.ts index 17f3f03600..b9dad86425 100644 --- a/server/src/cores/storage.core.ts +++ b/server/src/cores/storage.core.ts @@ -4,12 +4,12 @@ import { SystemConfigCore } from 'src/cores/system-config.core'; import { AssetEntity } from 'src/entities/asset.entity'; import { AssetPathType, PathType, PersonPathType } from 'src/entities/move.entity'; import { PersonEntity } from 'src/entities/person.entity'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { IMoveRepository } from 'src/interfaces/move.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { IMoveRepository } from 'src/interfaces/move.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { ImmichLogger } from 'src/utils/logger'; export enum StorageFolder { diff --git a/server/src/cores/system-config.core.ts b/server/src/cores/system-config.core.ts index 6554839a54..01bfacc9bd 100644 --- a/server/src/cores/system-config.core.ts +++ b/server/src/cores/system-config.core.ts @@ -20,8 +20,8 @@ import { TranscodePolicy, VideoCodec, } from 'src/entities/system-config.entity'; -import { QueueName } from 'src/interfaces/job.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { QueueName } from 'src/interfaces/job.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { ImmichLogger } from 'src/utils/logger'; export type SystemConfigValidator = (config: SystemConfig, newConfig: SystemConfig) => void | Promise; diff --git a/server/src/cores/user.core.ts b/server/src/cores/user.core.ts index 1640e8d072..4d7da25ded 100644 --- a/server/src/cores/user.core.ts +++ b/server/src/cores/user.core.ts @@ -3,9 +3,9 @@ import sanitize from 'sanitize-filename'; import { UserResponseDto } from 'src/dtos/user.dto'; import { LibraryType } from 'src/entities/library.entity'; import { UserEntity } from 'src/entities/user.entity'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; const SALT_ROUNDS = 10; diff --git a/server/src/database.config.ts b/server/src/database.config.ts index e4e251ffc5..867b7f4cb1 100644 --- a/server/src/database.config.ts +++ b/server/src/database.config.ts @@ -1,4 +1,4 @@ -import { DatabaseExtension } from 'src/interfaces/database.repository'; +import { DatabaseExtension } from 'src/interfaces/database.interface'; import { DataSource } from 'typeorm'; import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions.js'; diff --git a/server/src/dtos/asset.dto.ts b/server/src/dtos/asset.dto.ts index 5ccf63c987..72f1b24c1b 100644 --- a/server/src/dtos/asset.dto.ts +++ b/server/src/dtos/asset.dto.ts @@ -13,7 +13,7 @@ import { } from 'class-validator'; import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AssetType } from 'src/entities/asset.entity'; -import { AssetStats } from 'src/interfaces/asset.repository'; +import { AssetStats } from 'src/interfaces/asset.interface'; import { Optional, ValidateBoolean, ValidateUUID } from 'src/validation'; export class DeviceIdDto { diff --git a/server/src/dtos/job.dto.ts b/server/src/dtos/job.dto.ts index ad2ffec114..1173ad8d6e 100644 --- a/server/src/dtos/job.dto.ts +++ b/server/src/dtos/job.dto.ts @@ -1,6 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsEnum, IsNotEmpty } from 'class-validator'; -import { JobCommand, QueueName } from 'src/interfaces/job.repository'; +import { JobCommand, QueueName } from 'src/interfaces/job.interface'; import { ValidateBoolean } from 'src/validation'; export class JobIdParamDto { diff --git a/server/src/dtos/model-config.dto.ts b/server/src/dtos/model-config.dto.ts index b63ec74146..d1e8bf3391 100644 --- a/server/src/dtos/model-config.dto.ts +++ b/server/src/dtos/model-config.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { IsEnum, IsNotEmpty, IsNumber, IsString, Max, Min } from 'class-validator'; -import { CLIPMode, ModelType } from 'src/interfaces/machine-learning.repository'; +import { CLIPMode, ModelType } from 'src/interfaces/machine-learning.interface'; import { Optional, ValidateBoolean } from 'src/validation'; export class ModelConfig { diff --git a/server/src/dtos/system-config-job.dto.ts b/server/src/dtos/system-config-job.dto.ts index 86f4dad1d0..2dc5404df1 100644 --- a/server/src/dtos/system-config-job.dto.ts +++ b/server/src/dtos/system-config-job.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { IsInt, IsObject, IsPositive, ValidateNested } from 'class-validator'; -import { ConcurrentQueueName, QueueName } from 'src/interfaces/job.repository'; +import { ConcurrentQueueName, QueueName } from 'src/interfaces/job.interface'; export class JobSettingsDto { @IsInt() diff --git a/server/src/dtos/time-bucket.dto.ts b/server/src/dtos/time-bucket.dto.ts index 40dbb84e6d..a551260136 100644 --- a/server/src/dtos/time-bucket.dto.ts +++ b/server/src/dtos/time-bucket.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsEnum, IsNotEmpty, IsString } from 'class-validator'; import { AssetOrder } from 'src/entities/album.entity'; -import { TimeBucketSize } from 'src/interfaces/asset.repository'; +import { TimeBucketSize } from 'src/interfaces/asset.interface'; import { Optional, ValidateBoolean, ValidateUUID } from 'src/validation'; export class TimeBucketDto { diff --git a/server/src/entities/system-config.entity.ts b/server/src/entities/system-config.entity.ts index 23eae493b7..98b882a36e 100644 --- a/server/src/entities/system-config.entity.ts +++ b/server/src/entities/system-config.entity.ts @@ -1,4 +1,4 @@ -import { ConcurrentQueueName } from 'src/interfaces/job.repository'; +import { ConcurrentQueueName } from 'src/interfaces/job.interface'; import { Column, Entity, PrimaryColumn } from 'typeorm'; @Entity('system_config') diff --git a/server/src/immich/api-v1/asset/asset.service.spec.ts b/server/src/immich/api-v1/asset/asset.service.spec.ts index 0b465e42c0..2d714a0b11 100644 --- a/server/src/immich/api-v1/asset/asset.service.spec.ts +++ b/server/src/immich/api-v1/asset/asset.service.spec.ts @@ -5,11 +5,11 @@ import { IAssetRepositoryV1 } from 'src/immich/api-v1/asset/asset-repository'; import { AssetService } from 'src/immich/api-v1/asset/asset.service'; import { CreateAssetDto } from 'src/immich/api-v1/asset/dto/create-asset.dto'; import { AssetRejectReason, AssetUploadAction } from 'src/immich/api-v1/asset/response-dto/asset-check-response.dto'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IJobRepository, JobName } from 'src/interfaces/job.repository'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IJobRepository, JobName } from 'src/interfaces/job.interface'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { assetStub } from 'test/fixtures/asset.stub'; import { authStub } from 'test/fixtures/auth.stub'; import { fileStub } from 'test/fixtures/file.stub'; diff --git a/server/src/immich/api-v1/asset/asset.service.ts b/server/src/immich/api-v1/asset/asset.service.ts index 61ad72c568..e98305b1a8 100644 --- a/server/src/immich/api-v1/asset/asset.service.ts +++ b/server/src/immich/api-v1/asset/asset.service.ts @@ -26,12 +26,12 @@ import { AssetFileUploadResponseDto } from 'src/immich/api-v1/asset/response-dto import { CheckExistingAssetsResponseDto } from 'src/immich/api-v1/asset/response-dto/check-existing-assets-response.dto'; import { CuratedLocationsResponseDto } from 'src/immich/api-v1/asset/response-dto/curated-locations-response.dto'; import { CuratedObjectsResponseDto } from 'src/immich/api-v1/asset/response-dto/curated-objects-response.dto'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IJobRepository, JobName } from 'src/interfaces/job.repository'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IJobRepository, JobName } from 'src/interfaces/job.interface'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { UploadFile } from 'src/services/asset.service'; import { CacheControl, ImmichFileResponse, getLivePhotoMotionFilename } from 'src/utils/file'; import { ImmichLogger } from 'src/utils/logger'; diff --git a/server/src/immich/app.utils.ts b/server/src/immich/app.utils.ts index 46eeccadb9..5faf5a340a 100644 --- a/server/src/immich/app.utils.ts +++ b/server/src/immich/app.utils.ts @@ -14,7 +14,7 @@ import { access, constants } from 'node:fs/promises'; import path, { isAbsolute } from 'node:path'; import { promisify } from 'node:util'; import { IMMICH_ACCESS_COOKIE, IMMICH_API_KEY_HEADER, IMMICH_API_KEY_NAME, serverVersion } from 'src/constants'; -import { ImmichReadStream } from 'src/interfaces/storage.repository'; +import { ImmichReadStream } from 'src/interfaces/storage.interface'; import { Metadata } from 'src/middleware/auth.guard'; import { CacheControl, ImmichFileResponse } from 'src/utils/file'; import { ImmichLogger } from 'src/utils/logger'; diff --git a/server/src/interfaces/access.repository.ts b/server/src/interfaces/access.interface.ts similarity index 100% rename from server/src/interfaces/access.repository.ts rename to server/src/interfaces/access.interface.ts diff --git a/server/src/interfaces/activity.repository.ts b/server/src/interfaces/activity.interface.ts similarity index 100% rename from server/src/interfaces/activity.repository.ts rename to server/src/interfaces/activity.interface.ts diff --git a/server/src/interfaces/album.repository.ts b/server/src/interfaces/album.interface.ts similarity index 100% rename from server/src/interfaces/album.repository.ts rename to server/src/interfaces/album.interface.ts diff --git a/server/src/interfaces/api-key.repository.ts b/server/src/interfaces/api-key.interface.ts similarity index 100% rename from server/src/interfaces/api-key.repository.ts rename to server/src/interfaces/api-key.interface.ts diff --git a/server/src/interfaces/asset-stack.repository.ts b/server/src/interfaces/asset-stack.interface.ts similarity index 100% rename from server/src/interfaces/asset-stack.repository.ts rename to server/src/interfaces/asset-stack.interface.ts diff --git a/server/src/interfaces/asset.repository.ts b/server/src/interfaces/asset.interface.ts similarity index 98% rename from server/src/interfaces/asset.repository.ts rename to server/src/interfaces/asset.interface.ts index 379357b626..47c13041f5 100644 --- a/server/src/interfaces/asset.repository.ts +++ b/server/src/interfaces/asset.interface.ts @@ -2,8 +2,8 @@ import { AssetOrder } from 'src/entities/album.entity'; import { AssetJobStatusEntity } from 'src/entities/asset-job-status.entity'; import { AssetEntity, AssetType } from 'src/entities/asset.entity'; import { ExifEntity } from 'src/entities/exif.entity'; -import { ReverseGeocodeResult } from 'src/interfaces/metadata.repository'; -import { AssetSearchOptions, SearchExploreItem } from 'src/interfaces/search.repository'; +import { ReverseGeocodeResult } from 'src/interfaces/metadata.interface'; +import { AssetSearchOptions, SearchExploreItem } from 'src/interfaces/search.interface'; import { Paginated, PaginationOptions } from 'src/utils/pagination'; import { FindOptionsRelations, FindOptionsSelect } from 'typeorm'; diff --git a/server/src/interfaces/audit.repository.ts b/server/src/interfaces/audit.interface.ts similarity index 100% rename from server/src/interfaces/audit.repository.ts rename to server/src/interfaces/audit.interface.ts diff --git a/server/src/interfaces/communication.repository.ts b/server/src/interfaces/communication.interface.ts similarity index 100% rename from server/src/interfaces/communication.repository.ts rename to server/src/interfaces/communication.interface.ts diff --git a/server/src/interfaces/crypto.repository.ts b/server/src/interfaces/crypto.interface.ts similarity index 100% rename from server/src/interfaces/crypto.repository.ts rename to server/src/interfaces/crypto.interface.ts diff --git a/server/src/interfaces/database.repository.ts b/server/src/interfaces/database.interface.ts similarity index 100% rename from server/src/interfaces/database.repository.ts rename to server/src/interfaces/database.interface.ts diff --git a/server/src/interfaces/job.repository.ts b/server/src/interfaces/job.interface.ts similarity index 100% rename from server/src/interfaces/job.repository.ts rename to server/src/interfaces/job.interface.ts diff --git a/server/src/interfaces/library.repository.ts b/server/src/interfaces/library.interface.ts similarity index 100% rename from server/src/interfaces/library.repository.ts rename to server/src/interfaces/library.interface.ts diff --git a/server/src/interfaces/machine-learning.repository.ts b/server/src/interfaces/machine-learning.interface.ts similarity index 100% rename from server/src/interfaces/machine-learning.repository.ts rename to server/src/interfaces/machine-learning.interface.ts diff --git a/server/src/interfaces/media.repository.ts b/server/src/interfaces/media.interface.ts similarity index 100% rename from server/src/interfaces/media.repository.ts rename to server/src/interfaces/media.interface.ts diff --git a/server/src/interfaces/metadata.repository.ts b/server/src/interfaces/metadata.interface.ts similarity index 100% rename from server/src/interfaces/metadata.repository.ts rename to server/src/interfaces/metadata.interface.ts diff --git a/server/src/interfaces/move.repository.ts b/server/src/interfaces/move.interface.ts similarity index 100% rename from server/src/interfaces/move.repository.ts rename to server/src/interfaces/move.interface.ts diff --git a/server/src/interfaces/partner.repository.ts b/server/src/interfaces/partner.interface.ts similarity index 100% rename from server/src/interfaces/partner.repository.ts rename to server/src/interfaces/partner.interface.ts diff --git a/server/src/interfaces/person.repository.ts b/server/src/interfaces/person.interface.ts similarity index 100% rename from server/src/interfaces/person.repository.ts rename to server/src/interfaces/person.interface.ts diff --git a/server/src/interfaces/search.repository.ts b/server/src/interfaces/search.interface.ts similarity index 100% rename from server/src/interfaces/search.repository.ts rename to server/src/interfaces/search.interface.ts diff --git a/server/src/interfaces/server-info.repository.ts b/server/src/interfaces/server-info.interface.ts similarity index 100% rename from server/src/interfaces/server-info.repository.ts rename to server/src/interfaces/server-info.interface.ts diff --git a/server/src/interfaces/shared-link.repository.ts b/server/src/interfaces/shared-link.interface.ts similarity index 100% rename from server/src/interfaces/shared-link.repository.ts rename to server/src/interfaces/shared-link.interface.ts diff --git a/server/src/interfaces/storage.repository.ts b/server/src/interfaces/storage.interface.ts similarity index 100% rename from server/src/interfaces/storage.repository.ts rename to server/src/interfaces/storage.interface.ts diff --git a/server/src/interfaces/system-config.repository.ts b/server/src/interfaces/system-config.interface.ts similarity index 100% rename from server/src/interfaces/system-config.repository.ts rename to server/src/interfaces/system-config.interface.ts diff --git a/server/src/interfaces/system-metadata.repository.ts b/server/src/interfaces/system-metadata.interface.ts similarity index 100% rename from server/src/interfaces/system-metadata.repository.ts rename to server/src/interfaces/system-metadata.interface.ts diff --git a/server/src/interfaces/tag.repository.ts b/server/src/interfaces/tag.interface.ts similarity index 100% rename from server/src/interfaces/tag.repository.ts rename to server/src/interfaces/tag.interface.ts diff --git a/server/src/interfaces/user-token.repository.ts b/server/src/interfaces/user-token.interface.ts similarity index 100% rename from server/src/interfaces/user-token.repository.ts rename to server/src/interfaces/user-token.interface.ts diff --git a/server/src/interfaces/user.repository.ts b/server/src/interfaces/user.interface.ts similarity index 100% rename from server/src/interfaces/user.repository.ts rename to server/src/interfaces/user.interface.ts diff --git a/server/src/migrations/1700713994428-AddCLIPEmbeddingIndex.ts b/server/src/migrations/1700713994428-AddCLIPEmbeddingIndex.ts index 6ca4952f16..908ebdb8fa 100644 --- a/server/src/migrations/1700713994428-AddCLIPEmbeddingIndex.ts +++ b/server/src/migrations/1700713994428-AddCLIPEmbeddingIndex.ts @@ -1,5 +1,5 @@ import { vectorExt } from 'src/database.config'; -import { DatabaseExtension } from 'src/interfaces/database.repository'; +import { DatabaseExtension } from 'src/interfaces/database.interface'; import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddCLIPEmbeddingIndex1700713994428 implements MigrationInterface { diff --git a/server/src/migrations/1700714033632-AddFaceEmbeddingIndex.ts b/server/src/migrations/1700714033632-AddFaceEmbeddingIndex.ts index cc68d689c9..75bebfa8e8 100644 --- a/server/src/migrations/1700714033632-AddFaceEmbeddingIndex.ts +++ b/server/src/migrations/1700714033632-AddFaceEmbeddingIndex.ts @@ -1,5 +1,5 @@ import { vectorExt } from 'src/database.config'; -import { DatabaseExtension } from 'src/interfaces/database.repository'; +import { DatabaseExtension } from 'src/interfaces/database.interface'; import { MigrationInterface, QueryRunner } from 'typeorm'; export class AddFaceEmbeddingIndex1700714033632 implements MigrationInterface { diff --git a/server/src/repositories/access.repository.ts b/server/src/repositories/access.repository.ts index fc067f2c2b..37b5be0e81 100644 --- a/server/src/repositories/access.repository.ts +++ b/server/src/repositories/access.repository.ts @@ -9,7 +9,7 @@ import { PartnerEntity } from 'src/entities/partner.entity'; import { PersonEntity } from 'src/entities/person.entity'; import { SharedLinkEntity } from 'src/entities/shared-link.entity'; import { UserTokenEntity } from 'src/entities/user-token.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { Brackets, In, Repository } from 'typeorm'; diff --git a/server/src/repositories/activity.repository.ts b/server/src/repositories/activity.repository.ts index 6d4ef244ed..475ad3b856 100644 --- a/server/src/repositories/activity.repository.ts +++ b/server/src/repositories/activity.repository.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; import { ActivityEntity } from 'src/entities/activity.entity'; -import { IActivityRepository } from 'src/interfaces/activity.repository'; +import { IActivityRepository } from 'src/interfaces/activity.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { IsNull, Repository } from 'typeorm'; diff --git a/server/src/repositories/album.repository.ts b/server/src/repositories/album.repository.ts index c8ad983256..f98be21617 100644 --- a/server/src/repositories/album.repository.ts +++ b/server/src/repositories/album.repository.ts @@ -11,7 +11,7 @@ import { AlbumAssets, AlbumInfoOptions, IAlbumRepository, -} from 'src/interfaces/album.repository'; +} from 'src/interfaces/album.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { setUnion } from 'src/utils/set'; import { DataSource, FindOptionsOrder, FindOptionsRelations, In, IsNull, Not, Repository } from 'typeorm'; diff --git a/server/src/repositories/api-key.repository.ts b/server/src/repositories/api-key.repository.ts index 4ee79f3b45..d03d048063 100644 --- a/server/src/repositories/api-key.repository.ts +++ b/server/src/repositories/api-key.repository.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; import { APIKeyEntity } from 'src/entities/api-key.entity'; -import { IKeyRepository } from 'src/interfaces/api-key.repository'; +import { IKeyRepository } from 'src/interfaces/api-key.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { Repository } from 'typeorm'; diff --git a/server/src/repositories/asset-stack.repository.ts b/server/src/repositories/asset-stack.repository.ts index 404908ee09..660dfbe471 100644 --- a/server/src/repositories/asset-stack.repository.ts +++ b/server/src/repositories/asset-stack.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { AssetStackEntity } from 'src/entities/asset-stack.entity'; -import { IAssetStackRepository } from 'src/interfaces/asset-stack.repository'; +import { IAssetStackRepository } from 'src/interfaces/asset-stack.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { Repository } from 'typeorm'; diff --git a/server/src/repositories/asset.repository.ts b/server/src/repositories/asset.repository.ts index 0fb46a120c..5928392543 100644 --- a/server/src/repositories/asset.repository.ts +++ b/server/src/repositories/asset.repository.ts @@ -28,8 +28,8 @@ import { TimeBucketSize, WithProperty, WithoutProperty, -} from 'src/interfaces/asset.repository'; -import { AssetSearchOptions, SearchExploreItem } from 'src/interfaces/search.repository'; +} from 'src/interfaces/asset.interface'; +import { AssetSearchOptions, SearchExploreItem } from 'src/interfaces/search.interface'; import { OptionalBetween, searchAssetBuilder } from 'src/utils/database'; import { Instrumentation } from 'src/utils/instrumentation'; import { Paginated, PaginationMode, PaginationOptions, paginate, paginatedBuilder } from 'src/utils/pagination'; diff --git a/server/src/repositories/audit.repository.ts b/server/src/repositories/audit.repository.ts index ef80819693..50f5631f3a 100644 --- a/server/src/repositories/audit.repository.ts +++ b/server/src/repositories/audit.repository.ts @@ -1,6 +1,6 @@ import { InjectRepository } from '@nestjs/typeorm'; import { AuditEntity } from 'src/entities/audit.entity'; -import { AuditSearch, IAuditRepository } from 'src/interfaces/audit.repository'; +import { AuditSearch, IAuditRepository } from 'src/interfaces/audit.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { LessThan, MoreThan, Repository } from 'typeorm'; diff --git a/server/src/repositories/communication.repository.ts b/server/src/repositories/communication.repository.ts index 531b63f511..046190e1a3 100644 --- a/server/src/repositories/communication.repository.ts +++ b/server/src/repositories/communication.repository.ts @@ -14,7 +14,7 @@ import { OnConnectCallback, OnServerEventCallback, ServerEvent, -} from 'src/interfaces/communication.repository'; +} from 'src/interfaces/communication.interface'; import { AuthService } from 'src/services/auth.service'; import { Instrumentation } from 'src/utils/instrumentation'; import { ImmichLogger } from 'src/utils/logger'; diff --git a/server/src/repositories/crypto.repository.ts b/server/src/repositories/crypto.repository.ts index f7cfa43ff7..84b74052c9 100644 --- a/server/src/repositories/crypto.repository.ts +++ b/server/src/repositories/crypto.repository.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { compareSync, hash } from 'bcrypt'; import { createHash, randomBytes, randomUUID } from 'node:crypto'; import { createReadStream } from 'node:fs'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; import { Instrumentation } from 'src/utils/instrumentation'; @Instrumentation() diff --git a/server/src/repositories/database.repository.ts b/server/src/repositories/database.repository.ts index 4e46327419..4ff24eeaa4 100644 --- a/server/src/repositories/database.repository.ts +++ b/server/src/repositories/database.repository.ts @@ -10,7 +10,7 @@ import { VectorIndex, VectorUpdateResult, extName, -} from 'src/interfaces/database.repository'; +} from 'src/interfaces/database.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { ImmichLogger } from 'src/utils/logger'; import { Version, VersionType } from 'src/utils/version'; diff --git a/server/src/repositories/filesystem.provider.ts b/server/src/repositories/filesystem.provider.ts index 3722893d8b..b4f2311208 100644 --- a/server/src/repositories/filesystem.provider.ts +++ b/server/src/repositories/filesystem.provider.ts @@ -12,7 +12,7 @@ import { ImmichZipStream, StorageEventType, WatchEvents, -} from 'src/interfaces/storage.repository'; +} from 'src/interfaces/storage.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { ImmichLogger } from 'src/utils/logger'; import { mimeTypes } from 'src/utils/mime-types'; diff --git a/server/src/repositories/job.repository.ts b/server/src/repositories/job.repository.ts index 2d07d77480..b55996ed05 100644 --- a/server/src/repositories/job.repository.ts +++ b/server/src/repositories/job.repository.ts @@ -14,7 +14,7 @@ import { QueueCleanType, QueueName, QueueStatus, -} from 'src/interfaces/job.repository'; +} from 'src/interfaces/job.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { ImmichLogger } from 'src/utils/logger'; diff --git a/server/src/repositories/library.repository.ts b/server/src/repositories/library.repository.ts index ddf63f2285..485e11541d 100644 --- a/server/src/repositories/library.repository.ts +++ b/server/src/repositories/library.repository.ts @@ -3,7 +3,7 @@ import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; import { LibraryStatsResponseDto } from 'src/dtos/library.dto'; import { LibraryEntity, LibraryType } from 'src/entities/library.entity'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { IsNull, Not } from 'typeorm'; import { Repository } from 'typeorm/repository/Repository.js'; diff --git a/server/src/repositories/machine-learning.repository.ts b/server/src/repositories/machine-learning.repository.ts index 75d887943e..3d8f0cac1e 100644 --- a/server/src/repositories/machine-learning.repository.ts +++ b/server/src/repositories/machine-learning.repository.ts @@ -8,7 +8,7 @@ import { ModelType, TextModelInput, VisionModelInput, -} from 'src/interfaces/machine-learning.repository'; +} from 'src/interfaces/machine-learning.interface'; import { Instrumentation } from 'src/utils/instrumentation'; const errorPrefix = 'Machine learning request'; diff --git a/server/src/repositories/media.repository.ts b/server/src/repositories/media.repository.ts index 890657e3b7..52a538909f 100644 --- a/server/src/repositories/media.repository.ts +++ b/server/src/repositories/media.repository.ts @@ -10,7 +10,7 @@ import { ResizeOptions, TranscodeOptions, VideoInfo, -} from 'src/interfaces/media.repository'; +} from 'src/interfaces/media.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { ImmichLogger } from 'src/utils/logger'; import { handlePromiseError } from 'src/utils/misc'; diff --git a/server/src/repositories/metadata.repository.ts b/server/src/repositories/metadata.repository.ts index 1b4dd2b3c3..511023a8ea 100644 --- a/server/src/repositories/metadata.repository.ts +++ b/server/src/repositories/metadata.repository.ts @@ -11,8 +11,8 @@ import { DummyValue, GenerateSql } from 'src/decorators'; import { ExifEntity } from 'src/entities/exif.entity'; import { GeodataPlacesEntity } from 'src/entities/geodata-places.entity'; import { SystemMetadataKey } from 'src/entities/system-metadata.entity'; -import { GeoPoint, IMetadataRepository, ImmichTags, ReverseGeocodeResult } from 'src/interfaces/metadata.repository'; -import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.repository'; +import { GeoPoint, IMetadataRepository, ImmichTags, ReverseGeocodeResult } from 'src/interfaces/metadata.interface'; +import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { ImmichLogger } from 'src/utils/logger'; import { DataSource, QueryRunner, Repository } from 'typeorm'; diff --git a/server/src/repositories/move.repository.ts b/server/src/repositories/move.repository.ts index 5a17d72a55..a8416ff0ac 100644 --- a/server/src/repositories/move.repository.ts +++ b/server/src/repositories/move.repository.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; import { MoveEntity, PathType } from 'src/entities/move.entity'; -import { IMoveRepository, MoveCreate } from 'src/interfaces/move.repository'; +import { IMoveRepository, MoveCreate } from 'src/interfaces/move.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { Repository } from 'typeorm'; diff --git a/server/src/repositories/partner.repository.ts b/server/src/repositories/partner.repository.ts index a07241b537..8465493b54 100644 --- a/server/src/repositories/partner.repository.ts +++ b/server/src/repositories/partner.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { PartnerEntity } from 'src/entities/partner.entity'; -import { IPartnerRepository, PartnerIds } from 'src/interfaces/partner.repository'; +import { IPartnerRepository, PartnerIds } from 'src/interfaces/partner.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { DeepPartial, Repository } from 'typeorm'; diff --git a/server/src/repositories/person.repository.ts b/server/src/repositories/person.repository.ts index 805c91d92f..867d6b1749 100644 --- a/server/src/repositories/person.repository.ts +++ b/server/src/repositories/person.repository.ts @@ -12,7 +12,7 @@ import { PersonSearchOptions, PersonStatistics, UpdateFacesData, -} from 'src/interfaces/person.repository'; +} from 'src/interfaces/person.interface'; import { asVector } from 'src/utils/database'; import { Instrumentation } from 'src/utils/instrumentation'; import { Paginated, PaginationOptions, paginate } from 'src/utils/pagination'; diff --git a/server/src/repositories/search.repository.ts b/server/src/repositories/search.repository.ts index 8c48337ced..a151c0750f 100644 --- a/server/src/repositories/search.repository.ts +++ b/server/src/repositories/search.repository.ts @@ -7,7 +7,7 @@ import { AssetEntity, AssetType } from 'src/entities/asset.entity'; import { GeodataPlacesEntity } from 'src/entities/geodata-places.entity'; import { SmartInfoEntity } from 'src/entities/smart-info.entity'; import { SmartSearchEntity } from 'src/entities/smart-search.entity'; -import { DatabaseExtension } from 'src/interfaces/database.repository'; +import { DatabaseExtension } from 'src/interfaces/database.interface'; import { AssetSearchOptions, Embedding, @@ -16,7 +16,7 @@ import { ISearchRepository, SearchPaginationOptions, SmartSearchOptions, -} from 'src/interfaces/search.repository'; +} from 'src/interfaces/search.interface'; import { asVector, searchAssetBuilder } from 'src/utils/database'; import { Instrumentation } from 'src/utils/instrumentation'; import { ImmichLogger } from 'src/utils/logger'; diff --git a/server/src/repositories/server-info.repository.ts b/server/src/repositories/server-info.repository.ts index 3c25bc65bc..5f14a881c1 100644 --- a/server/src/repositories/server-info.repository.ts +++ b/server/src/repositories/server-info.repository.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { GitHubRelease, IServerInfoRepository } from 'src/interfaces/server-info.repository'; +import { GitHubRelease, IServerInfoRepository } from 'src/interfaces/server-info.interface'; import { Instrumentation } from 'src/utils/instrumentation'; @Instrumentation() diff --git a/server/src/repositories/shared-link.repository.ts b/server/src/repositories/shared-link.repository.ts index 0e343da5e1..48dbb3ab90 100644 --- a/server/src/repositories/shared-link.repository.ts +++ b/server/src/repositories/shared-link.repository.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; import { SharedLinkEntity } from 'src/entities/shared-link.entity'; -import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository'; +import { ISharedLinkRepository } from 'src/interfaces/shared-link.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { Repository } from 'typeorm'; diff --git a/server/src/repositories/system-config.repository.ts b/server/src/repositories/system-config.repository.ts index ac300fb5d0..baa3218b00 100644 --- a/server/src/repositories/system-config.repository.ts +++ b/server/src/repositories/system-config.repository.ts @@ -2,7 +2,7 @@ import { InjectRepository } from '@nestjs/typeorm'; import { readFile } from 'node:fs/promises'; import { Chunked, DummyValue, GenerateSql } from 'src/decorators'; import { SystemConfigEntity } from 'src/entities/system-config.entity'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { In, Repository } from 'typeorm'; diff --git a/server/src/repositories/system-metadata.repository.ts b/server/src/repositories/system-metadata.repository.ts index 60bf479653..80936e46f6 100644 --- a/server/src/repositories/system-metadata.repository.ts +++ b/server/src/repositories/system-metadata.repository.ts @@ -1,6 +1,6 @@ import { InjectRepository } from '@nestjs/typeorm'; import { SystemMetadata, SystemMetadataEntity } from 'src/entities/system-metadata.entity'; -import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.repository'; +import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { Repository } from 'typeorm'; diff --git a/server/src/repositories/tag.repository.ts b/server/src/repositories/tag.repository.ts index 5e2b2bb6d3..6fa827906a 100644 --- a/server/src/repositories/tag.repository.ts +++ b/server/src/repositories/tag.repository.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { AssetEntity } from 'src/entities/asset.entity'; import { TagEntity } from 'src/entities/tag.entity'; -import { ITagRepository } from 'src/interfaces/tag.repository'; +import { ITagRepository } from 'src/interfaces/tag.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { Repository } from 'typeorm'; diff --git a/server/src/repositories/user-token.repository.ts b/server/src/repositories/user-token.repository.ts index 074aec332d..cbf3a3e3b0 100644 --- a/server/src/repositories/user-token.repository.ts +++ b/server/src/repositories/user-token.repository.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; import { UserTokenEntity } from 'src/entities/user-token.entity'; -import { IUserTokenRepository } from 'src/interfaces/user-token.repository'; +import { IUserTokenRepository } from 'src/interfaces/user-token.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { Repository } from 'typeorm'; diff --git a/server/src/repositories/user.repository.ts b/server/src/repositories/user.repository.ts index aaadc637f4..f0e00d0496 100644 --- a/server/src/repositories/user.repository.ts +++ b/server/src/repositories/user.repository.ts @@ -8,7 +8,7 @@ import { UserFindOptions, UserListFilter, UserStatsQueryResponse, -} from 'src/interfaces/user.repository'; +} from 'src/interfaces/user.interface'; import { Instrumentation } from 'src/utils/instrumentation'; import { IsNull, Not, Repository } from 'typeorm'; diff --git a/server/src/services/activity.service.spec.ts b/server/src/services/activity.service.spec.ts index a36d825546..e7049ea6c9 100644 --- a/server/src/services/activity.service.spec.ts +++ b/server/src/services/activity.service.spec.ts @@ -1,6 +1,6 @@ import { BadRequestException } from '@nestjs/common'; import { ReactionType } from 'src/dtos/activity.dto'; -import { IActivityRepository } from 'src/interfaces/activity.repository'; +import { IActivityRepository } from 'src/interfaces/activity.interface'; import { ActivityService } from 'src/services/activity.service'; import { activityStub } from 'test/fixtures/activity.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/activity.service.ts b/server/src/services/activity.service.ts index ff310cb5dc..7589fb8ccc 100644 --- a/server/src/services/activity.service.ts +++ b/server/src/services/activity.service.ts @@ -13,8 +13,8 @@ import { } from 'src/dtos/activity.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { ActivityEntity } from 'src/entities/activity.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IActivityRepository } from 'src/interfaces/activity.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IActivityRepository } from 'src/interfaces/activity.interface'; @Injectable() export class ActivityService { diff --git a/server/src/services/album.service.spec.ts b/server/src/services/album.service.spec.ts index 6a09f54d16..48462fac4c 100644 --- a/server/src/services/album.service.spec.ts +++ b/server/src/services/album.service.spec.ts @@ -1,9 +1,9 @@ import { BadRequestException } from '@nestjs/common'; import _ from 'lodash'; import { BulkIdErrorReason } from 'src/dtos/asset-ids.response.dto'; -import { IAlbumRepository } from 'src/interfaces/album.repository'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAlbumRepository } from 'src/interfaces/album.interface'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { AlbumService } from 'src/services/album.service'; import { albumStub } from 'test/fixtures/album.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/album.service.ts b/server/src/services/album.service.ts index 3ae5ebd741..483ddc3b02 100644 --- a/server/src/services/album.service.ts +++ b/server/src/services/album.service.ts @@ -17,10 +17,10 @@ import { AuthDto } from 'src/dtos/auth.dto'; import { AlbumEntity } from 'src/entities/album.entity'; import { AssetEntity } from 'src/entities/asset.entity'; import { UserEntity } from 'src/entities/user.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { AlbumAssetCount, AlbumInfoOptions, IAlbumRepository } from 'src/interfaces/album.repository'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { AlbumAssetCount, AlbumInfoOptions, IAlbumRepository } from 'src/interfaces/album.interface'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { setUnion } from 'src/utils/set'; @Injectable() diff --git a/server/src/services/api-key.service.spec.ts b/server/src/services/api-key.service.spec.ts index 66dd70d0f9..3c8463c8ff 100644 --- a/server/src/services/api-key.service.spec.ts +++ b/server/src/services/api-key.service.spec.ts @@ -1,6 +1,6 @@ import { BadRequestException } from '@nestjs/common'; -import { IKeyRepository } from 'src/interfaces/api-key.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; +import { IKeyRepository } from 'src/interfaces/api-key.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; import { APIKeyService } from 'src/services/api-key.service'; import { keyStub } from 'test/fixtures/api-key.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/api-key.service.ts b/server/src/services/api-key.service.ts index 6c874895bc..5de908b4da 100644 --- a/server/src/services/api-key.service.ts +++ b/server/src/services/api-key.service.ts @@ -2,8 +2,8 @@ import { BadRequestException, Inject, Injectable } from '@nestjs/common'; import { APIKeyCreateDto, APIKeyCreateResponseDto, APIKeyResponseDto } from 'src/dtos/api-key.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { APIKeyEntity } from 'src/entities/api-key.entity'; -import { IKeyRepository } from 'src/interfaces/api-key.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; +import { IKeyRepository } from 'src/interfaces/api-key.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; @Injectable() export class APIKeyService { diff --git a/server/src/services/asset.service.spec.ts b/server/src/services/asset.service.spec.ts index c2b6a328e3..a8e30a3886 100644 --- a/server/src/services/asset.service.spec.ts +++ b/server/src/services/asset.service.spec.ts @@ -3,14 +3,14 @@ import { when } from 'jest-when'; import { mapAsset } from 'src/dtos/asset-response.dto'; import { AssetJobName, AssetStatsResponseDto, UploadFieldName } from 'src/dtos/asset.dto'; import { AssetEntity, AssetType } from 'src/entities/asset.entity'; -import { IAssetStackRepository } from 'src/interfaces/asset-stack.repository'; -import { AssetStats, IAssetRepository, TimeBucketSize } from 'src/interfaces/asset.repository'; -import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; -import { IJobRepository, JobItem, JobName } from 'src/interfaces/job.repository'; -import { IPartnerRepository } from 'src/interfaces/partner.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAssetStackRepository } from 'src/interfaces/asset-stack.interface'; +import { AssetStats, IAssetRepository, TimeBucketSize } from 'src/interfaces/asset.interface'; +import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.interface'; +import { IJobRepository, JobItem, JobName } from 'src/interfaces/job.interface'; +import { IPartnerRepository } from 'src/interfaces/partner.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { AssetService } from 'src/services/asset.service'; import { assetStackStub, assetStub } from 'test/fixtures/asset.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/asset.service.ts b/server/src/services/asset.service.ts index b537eda1cd..7020d50613 100644 --- a/server/src/services/asset.service.ts +++ b/server/src/services/asset.service.ts @@ -28,10 +28,10 @@ import { UpdateStackParentDto } from 'src/dtos/stack.dto'; import { TimeBucketAssetDto, TimeBucketDto, TimeBucketResponseDto } from 'src/dtos/time-bucket.dto'; import { AssetEntity } from 'src/entities/asset.entity'; import { LibraryType } from 'src/entities/library.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IAssetStackRepository } from 'src/interfaces/asset-stack.repository'; -import { IAssetRepository, TimeBucketOptions } from 'src/interfaces/asset.repository'; -import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IAssetStackRepository } from 'src/interfaces/asset-stack.interface'; +import { IAssetRepository, TimeBucketOptions } from 'src/interfaces/asset.interface'; +import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.interface'; import { IAssetDeletionJob, IJobRepository, @@ -40,11 +40,11 @@ import { JobItem, JobName, JobStatus, -} from 'src/interfaces/job.repository'; -import { IPartnerRepository } from 'src/interfaces/partner.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +} from 'src/interfaces/job.interface'; +import { IPartnerRepository } from 'src/interfaces/partner.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { ImmichLogger } from 'src/utils/logger'; import { mimeTypes } from 'src/utils/mime-types'; import { usePagination } from 'src/utils/pagination'; diff --git a/server/src/services/audit.service.spec.ts b/server/src/services/audit.service.spec.ts index 14d08f9166..4af5c1f94d 100644 --- a/server/src/services/audit.service.spec.ts +++ b/server/src/services/audit.service.spec.ts @@ -1,11 +1,11 @@ import { DatabaseAction, EntityType } from 'src/entities/audit.entity'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IAuditRepository } from 'src/interfaces/audit.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { JobStatus } from 'src/interfaces/job.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IAuditRepository } from 'src/interfaces/audit.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { JobStatus } from 'src/interfaces/job.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { AuditService } from 'src/services/audit.service'; import { auditStub } from 'test/fixtures/audit.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/audit.service.ts b/server/src/services/audit.service.ts index c9e4d16637..ff5e0d9c79 100644 --- a/server/src/services/audit.service.ts +++ b/server/src/services/audit.service.ts @@ -15,14 +15,14 @@ import { import { AuthDto } from 'src/dtos/auth.dto'; import { DatabaseAction } from 'src/entities/audit.entity'; import { AssetPathType, PersonPathType, UserPathType } from 'src/entities/move.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IAuditRepository } from 'src/interfaces/audit.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { JOBS_ASSET_PAGINATION_SIZE, JobStatus } from 'src/interfaces/job.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IAuditRepository } from 'src/interfaces/audit.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { JOBS_ASSET_PAGINATION_SIZE, JobStatus } from 'src/interfaces/job.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { ImmichLogger } from 'src/utils/logger'; import { usePagination } from 'src/utils/pagination'; diff --git a/server/src/services/auth.service.spec.ts b/server/src/services/auth.service.spec.ts index a7d212bac1..30773f3f16 100644 --- a/server/src/services/auth.service.spec.ts +++ b/server/src/services/auth.service.spec.ts @@ -5,13 +5,13 @@ import { Socket } from 'socket.io'; import { AuthType } from 'src/constants'; import { AuthDto, SignUpDto } from 'src/dtos/auth.dto'; import { UserEntity } from 'src/entities/user.entity'; -import { IKeyRepository } from 'src/interfaces/api-key.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; -import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { IUserTokenRepository } from 'src/interfaces/user-token.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IKeyRepository } from 'src/interfaces/api-key.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; +import { ISharedLinkRepository } from 'src/interfaces/shared-link.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { IUserTokenRepository } from 'src/interfaces/user-token.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { AuthService } from 'src/services/auth.service'; import { keyStub } from 'test/fixtures/api-key.stub'; import { authStub, loginResponseStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/auth.service.ts b/server/src/services/auth.service.ts index 0d3d5b118c..8563d83531 100644 --- a/server/src/services/auth.service.ts +++ b/server/src/services/auth.service.ts @@ -39,14 +39,14 @@ import { import { UserResponseDto, mapUser } from 'src/dtos/user.dto'; import { SystemConfig } from 'src/entities/system-config.entity'; import { UserEntity } from 'src/entities/user.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IKeyRepository } from 'src/interfaces/api-key.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; -import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { IUserTokenRepository } from 'src/interfaces/user-token.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IKeyRepository } from 'src/interfaces/api-key.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; +import { ISharedLinkRepository } from 'src/interfaces/shared-link.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { IUserTokenRepository } from 'src/interfaces/user-token.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { HumanReadableSize } from 'src/utils/bytes'; import { ImmichLogger } from 'src/utils/logger'; diff --git a/server/src/services/database.service.spec.ts b/server/src/services/database.service.spec.ts index 57c1c08211..6fa5e7fd81 100644 --- a/server/src/services/database.service.spec.ts +++ b/server/src/services/database.service.spec.ts @@ -1,4 +1,4 @@ -import { DatabaseExtension, IDatabaseRepository, VectorIndex } from 'src/interfaces/database.repository'; +import { DatabaseExtension, IDatabaseRepository, VectorIndex } from 'src/interfaces/database.interface'; import { DatabaseService } from 'src/services/database.service'; import { ImmichLogger } from 'src/utils/logger'; import { Version, VersionType } from 'src/utils/version'; diff --git a/server/src/services/database.service.ts b/server/src/services/database.service.ts index 9f87228b93..a333c0053a 100644 --- a/server/src/services/database.service.ts +++ b/server/src/services/database.service.ts @@ -6,7 +6,7 @@ import { VectorExtension, VectorIndex, extName, -} from 'src/interfaces/database.repository'; +} from 'src/interfaces/database.interface'; import { ImmichLogger } from 'src/utils/logger'; import { Version, VersionType } from 'src/utils/version'; diff --git a/server/src/services/download.service.spec.ts b/server/src/services/download.service.spec.ts index 3c4991cd5b..babc21fa8a 100644 --- a/server/src/services/download.service.spec.ts +++ b/server/src/services/download.service.spec.ts @@ -1,8 +1,8 @@ import { BadRequestException } from '@nestjs/common'; import { when } from 'jest-when'; import { DownloadResponseDto } from 'src/dtos/download.dto'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; import { DownloadService } from 'src/services/download.service'; import { CacheControl, ImmichFileResponse } from 'src/utils/file'; import { assetStub } from 'test/fixtures/asset.stub'; diff --git a/server/src/services/download.service.ts b/server/src/services/download.service.ts index 3ef7dbc4b4..b0b68a1e8c 100644 --- a/server/src/services/download.service.ts +++ b/server/src/services/download.service.ts @@ -5,9 +5,9 @@ import { AssetIdsDto } from 'src/dtos/asset.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { DownloadArchiveInfo, DownloadInfoDto, DownloadResponseDto } from 'src/dtos/download.dto'; import { AssetEntity } from 'src/entities/asset.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IStorageRepository, ImmichReadStream } from 'src/interfaces/storage.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IStorageRepository, ImmichReadStream } from 'src/interfaces/storage.interface'; import { HumanReadableSize } from 'src/utils/bytes'; import { CacheControl, ImmichFileResponse } from 'src/utils/file'; import { mimeTypes } from 'src/utils/mime-types'; diff --git a/server/src/services/job.service.spec.ts b/server/src/services/job.service.spec.ts index 13523a1425..b680abaf13 100644 --- a/server/src/services/job.service.spec.ts +++ b/server/src/services/job.service.spec.ts @@ -1,8 +1,8 @@ import { BadRequestException } from '@nestjs/common'; import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core'; import { SystemConfig, SystemConfigKey } from 'src/entities/system-config.entity'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { ICommunicationRepository } from 'src/interfaces/communication.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { ICommunicationRepository } from 'src/interfaces/communication.interface'; import { IJobRepository, JobCommand, @@ -11,9 +11,9 @@ import { JobName, JobStatus, QueueName, -} from 'src/interfaces/job.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +} from 'src/interfaces/job.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { JobService } from 'src/services/job.service'; import { assetStub } from 'test/fixtures/asset.stub'; import { newAssetRepositoryMock } from 'test/repositories/asset.repository.mock'; diff --git a/server/src/services/job.service.ts b/server/src/services/job.service.ts index e6acd54a32..e6d9b07816 100644 --- a/server/src/services/job.service.ts +++ b/server/src/services/job.service.ts @@ -3,8 +3,8 @@ import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core'; import { mapAsset } from 'src/dtos/asset-response.dto'; import { AllJobStatusResponseDto, JobCommandDto, JobStatusDto } from 'src/dtos/job.dto'; import { AssetType } from 'src/entities/asset.entity'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.interface'; import { ConcurrentQueueName, IJobRepository, @@ -15,9 +15,9 @@ import { JobStatus, QueueCleanType, QueueName, -} from 'src/interfaces/job.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +} from 'src/interfaces/job.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { ImmichLogger } from 'src/utils/logger'; @Injectable() diff --git a/server/src/services/library.service.spec.ts b/server/src/services/library.service.spec.ts index 46cbef3af8..663f8ff689 100644 --- a/server/src/services/library.service.spec.ts +++ b/server/src/services/library.service.spec.ts @@ -8,13 +8,13 @@ import { AssetType } from 'src/entities/asset.entity'; import { LibraryType } from 'src/entities/library.entity'; import { SystemConfig, SystemConfigKey } from 'src/entities/system-config.entity'; import { UserEntity } from 'src/entities/user.entity'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { IDatabaseRepository } from 'src/interfaces/database.repository'; -import { IJobRepository, ILibraryFileJob, ILibraryRefreshJob, JobName, JobStatus } from 'src/interfaces/job.repository'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; -import { IStorageRepository, StorageEventType } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { IDatabaseRepository } from 'src/interfaces/database.interface'; +import { IJobRepository, ILibraryFileJob, ILibraryRefreshJob, JobName, JobStatus } from 'src/interfaces/job.interface'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; +import { IStorageRepository, StorageEventType } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { LibraryService } from 'src/services/library.service'; import { assetStub } from 'test/fixtures/asset.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/library.service.ts b/server/src/services/library.service.ts index 63788d9a7a..e432a59404 100644 --- a/server/src/services/library.service.ts +++ b/server/src/services/library.service.ts @@ -22,10 +22,10 @@ import { } from 'src/dtos/library.dto'; import { AssetType } from 'src/entities/asset.entity'; import { LibraryEntity, LibraryType } from 'src/entities/library.entity'; -import { IAssetRepository, WithProperty } from 'src/interfaces/asset.repository'; -import { InternalEvent, InternalEventMap } from 'src/interfaces/communication.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { DatabaseLock, IDatabaseRepository } from 'src/interfaces/database.repository'; +import { IAssetRepository, WithProperty } from 'src/interfaces/asset.interface'; +import { InternalEvent, InternalEventMap } from 'src/interfaces/communication.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { DatabaseLock, IDatabaseRepository } from 'src/interfaces/database.interface'; import { IBaseJob, IEntityJob, @@ -35,10 +35,10 @@ import { JOBS_ASSET_PAGINATION_SIZE, JobName, JobStatus, -} from 'src/interfaces/job.repository'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; -import { IStorageRepository, StorageEventType } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +} from 'src/interfaces/job.interface'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; +import { IStorageRepository, StorageEventType } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { ImmichLogger } from 'src/utils/logger'; import { mimeTypes } from 'src/utils/mime-types'; import { handlePromiseError } from 'src/utils/misc'; diff --git a/server/src/services/media.service.spec.ts b/server/src/services/media.service.spec.ts index 722d2a31c7..4397730ab6 100644 --- a/server/src/services/media.service.spec.ts +++ b/server/src/services/media.service.spec.ts @@ -10,14 +10,14 @@ import { TranscodePolicy, VideoCodec, } from 'src/entities/system-config.entity'; -import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { IJobRepository, JobName, JobStatus } from 'src/interfaces/job.repository'; -import { IMediaRepository } from 'src/interfaces/media.repository'; -import { IMoveRepository } from 'src/interfaces/move.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { IJobRepository, JobName, JobStatus } from 'src/interfaces/job.interface'; +import { IMediaRepository } from 'src/interfaces/media.interface'; +import { IMoveRepository } from 'src/interfaces/move.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { MediaService } from 'src/services/media.service'; import { assetStub } from 'test/fixtures/asset.stub'; import { faceStub } from 'test/fixtures/face.stub'; diff --git a/server/src/services/media.service.ts b/server/src/services/media.service.ts index 107ac7c734..d0850fd12a 100644 --- a/server/src/services/media.service.ts +++ b/server/src/services/media.service.ts @@ -12,8 +12,8 @@ import { TranscodeTarget, VideoCodec, } from 'src/entities/system-config.entity'; -import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; +import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; import { IBaseJob, IEntityJob, @@ -23,17 +23,12 @@ import { JobName, JobStatus, QueueName, -} from 'src/interfaces/job.repository'; -import { - AudioStreamInfo, - IMediaRepository, - VideoCodecHWConfig, - VideoStreamInfo, -} from 'src/interfaces/media.repository'; -import { IMoveRepository } from 'src/interfaces/move.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +} from 'src/interfaces/job.interface'; +import { AudioStreamInfo, IMediaRepository, VideoCodecHWConfig, VideoStreamInfo } from 'src/interfaces/media.interface'; +import { IMoveRepository } from 'src/interfaces/move.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { ImmichLogger } from 'src/utils/logger'; import { H264Config, diff --git a/server/src/services/metadata.service.spec.ts b/server/src/services/metadata.service.spec.ts index 29347f70c3..4dafa0ac57 100644 --- a/server/src/services/metadata.service.spec.ts +++ b/server/src/services/metadata.service.spec.ts @@ -6,18 +6,18 @@ import { constants } from 'node:fs/promises'; import { AssetType } from 'src/entities/asset.entity'; import { ExifEntity } from 'src/entities/exif.entity'; import { SystemConfigKey } from 'src/entities/system-config.entity'; -import { IAlbumRepository } from 'src/interfaces/album.repository'; -import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; -import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { IDatabaseRepository } from 'src/interfaces/database.repository'; -import { IJobRepository, JobName, JobStatus } from 'src/interfaces/job.repository'; -import { IMediaRepository } from 'src/interfaces/media.repository'; -import { IMetadataRepository, ImmichTags } from 'src/interfaces/metadata.repository'; -import { IMoveRepository } from 'src/interfaces/move.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { IAlbumRepository } from 'src/interfaces/album.interface'; +import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.interface'; +import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { IDatabaseRepository } from 'src/interfaces/database.interface'; +import { IJobRepository, JobName, JobStatus } from 'src/interfaces/job.interface'; +import { IMediaRepository } from 'src/interfaces/media.interface'; +import { IMetadataRepository, ImmichTags } from 'src/interfaces/metadata.interface'; +import { IMoveRepository } from 'src/interfaces/move.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { MetadataService, Orientation } from 'src/services/metadata.service'; import { assetStub } from 'test/fixtures/asset.stub'; import { fileStub } from 'test/fixtures/file.stub'; diff --git a/server/src/services/metadata.service.ts b/server/src/services/metadata.service.ts index 7f9e389bb1..849a12da90 100644 --- a/server/src/services/metadata.service.ts +++ b/server/src/services/metadata.service.ts @@ -10,11 +10,11 @@ import { StorageCore } from 'src/cores/storage.core'; import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core'; import { AssetEntity, AssetType } from 'src/entities/asset.entity'; import { ExifEntity } from 'src/entities/exif.entity'; -import { IAlbumRepository } from 'src/interfaces/album.repository'; -import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; -import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { DatabaseLock, IDatabaseRepository } from 'src/interfaces/database.repository'; +import { IAlbumRepository } from 'src/interfaces/album.interface'; +import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.interface'; +import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { DatabaseLock, IDatabaseRepository } from 'src/interfaces/database.interface'; import { IBaseJob, IEntityJob, @@ -24,13 +24,13 @@ import { JobName, JobStatus, QueueName, -} from 'src/interfaces/job.repository'; -import { IMediaRepository } from 'src/interfaces/media.repository'; -import { IMetadataRepository, ImmichTags } from 'src/interfaces/metadata.repository'; -import { IMoveRepository } from 'src/interfaces/move.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +} from 'src/interfaces/job.interface'; +import { IMediaRepository } from 'src/interfaces/media.interface'; +import { IMetadataRepository, ImmichTags } from 'src/interfaces/metadata.interface'; +import { IMoveRepository } from 'src/interfaces/move.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { ImmichLogger } from 'src/utils/logger'; import { handlePromiseError } from 'src/utils/misc'; import { usePagination } from 'src/utils/pagination'; diff --git a/server/src/services/partner.service.spec.ts b/server/src/services/partner.service.spec.ts index 94ec3b0997..a3c4af7367 100644 --- a/server/src/services/partner.service.spec.ts +++ b/server/src/services/partner.service.spec.ts @@ -1,8 +1,8 @@ import { BadRequestException } from '@nestjs/common'; import { PartnerResponseDto } from 'src/dtos/partner.dto'; import { UserAvatarColor } from 'src/entities/user.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IPartnerRepository, PartnerDirection } from 'src/interfaces/partner.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IPartnerRepository, PartnerDirection } from 'src/interfaces/partner.interface'; import { PartnerService } from 'src/services/partner.service'; import { authStub } from 'test/fixtures/auth.stub'; import { partnerStub } from 'test/fixtures/partner.stub'; diff --git a/server/src/services/partner.service.ts b/server/src/services/partner.service.ts index af3f98061b..14503cc7fa 100644 --- a/server/src/services/partner.service.ts +++ b/server/src/services/partner.service.ts @@ -4,8 +4,8 @@ import { AuthDto } from 'src/dtos/auth.dto'; import { PartnerResponseDto, UpdatePartnerDto } from 'src/dtos/partner.dto'; import { mapUser } from 'src/dtos/user.dto'; import { PartnerEntity } from 'src/entities/partner.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IPartnerRepository, PartnerDirection, PartnerIds } from 'src/interfaces/partner.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IPartnerRepository, PartnerDirection, PartnerIds } from 'src/interfaces/partner.interface'; @Injectable() export class PartnerService { diff --git a/server/src/services/person.service.spec.ts b/server/src/services/person.service.spec.ts index ae391fa2b6..10e42e1b66 100644 --- a/server/src/services/person.service.spec.ts +++ b/server/src/services/person.service.spec.ts @@ -3,16 +3,16 @@ import { BulkIdErrorReason } from 'src/dtos/asset-ids.response.dto'; import { PersonResponseDto, mapFaces, mapPerson } from 'src/dtos/person.dto'; import { AssetFaceEntity } from 'src/entities/asset-face.entity'; import { Colorspace, SystemConfigKey } from 'src/entities/system-config.entity'; -import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { IJobRepository, JobName, JobStatus } from 'src/interfaces/job.repository'; -import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository'; -import { IMediaRepository } from 'src/interfaces/media.repository'; -import { IMoveRepository } from 'src/interfaces/move.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { FaceSearchResult, ISearchRepository } from 'src/interfaces/search.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { IJobRepository, JobName, JobStatus } from 'src/interfaces/job.interface'; +import { IMachineLearningRepository } from 'src/interfaces/machine-learning.interface'; +import { IMediaRepository } from 'src/interfaces/media.interface'; +import { IMoveRepository } from 'src/interfaces/move.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { FaceSearchResult, ISearchRepository } from 'src/interfaces/search.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { PersonService } from 'src/services/person.service'; import { CacheControl, ImmichFileResponse } from 'src/utils/file'; import { assetStub } from 'test/fixtures/asset.stub'; diff --git a/server/src/services/person.service.ts b/server/src/services/person.service.ts index 99eae8c065..504716a55e 100644 --- a/server/src/services/person.service.ts +++ b/server/src/services/person.service.ts @@ -23,9 +23,9 @@ import { } from 'src/dtos/person.dto'; import { PersonPathType } from 'src/entities/move.entity'; import { PersonEntity } from 'src/entities/person.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; import { IBaseJob, IDeferrableJob, @@ -36,14 +36,14 @@ import { JobName, JobStatus, QueueName, -} from 'src/interfaces/job.repository'; -import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository'; -import { CropOptions, IMediaRepository } from 'src/interfaces/media.repository'; -import { IMoveRepository } from 'src/interfaces/move.repository'; -import { IPersonRepository, UpdateFacesData } from 'src/interfaces/person.repository'; -import { ISearchRepository } from 'src/interfaces/search.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +} from 'src/interfaces/job.interface'; +import { IMachineLearningRepository } from 'src/interfaces/machine-learning.interface'; +import { CropOptions, IMediaRepository } from 'src/interfaces/media.interface'; +import { IMoveRepository } from 'src/interfaces/move.interface'; +import { IPersonRepository, UpdateFacesData } from 'src/interfaces/person.interface'; +import { ISearchRepository } from 'src/interfaces/search.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { CacheControl, ImmichFileResponse } from 'src/utils/file'; import { ImmichLogger } from 'src/utils/logger'; import { mimeTypes } from 'src/utils/mime-types'; diff --git a/server/src/services/search.service.spec.ts b/server/src/services/search.service.spec.ts index c7566ea945..72b543f2d7 100644 --- a/server/src/services/search.service.spec.ts +++ b/server/src/services/search.service.spec.ts @@ -1,13 +1,13 @@ import { mapAsset } from 'src/dtos/asset-response.dto'; import { SearchDto } from 'src/dtos/search.dto'; import { SystemConfigKey } from 'src/entities/system-config.entity'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository'; -import { IMetadataRepository } from 'src/interfaces/metadata.repository'; -import { IPartnerRepository } from 'src/interfaces/partner.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { ISearchRepository } from 'src/interfaces/search.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IMachineLearningRepository } from 'src/interfaces/machine-learning.interface'; +import { IMetadataRepository } from 'src/interfaces/metadata.interface'; +import { IPartnerRepository } from 'src/interfaces/partner.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { ISearchRepository } from 'src/interfaces/search.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { SearchService } from 'src/services/search.service'; import { assetStub } from 'test/fixtures/asset.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/search.service.ts b/server/src/services/search.service.ts index 30819dc460..03fa154a38 100644 --- a/server/src/services/search.service.ts +++ b/server/src/services/search.service.ts @@ -17,13 +17,13 @@ import { } from 'src/dtos/search.dto'; import { AssetOrder } from 'src/entities/album.entity'; import { AssetEntity } from 'src/entities/asset.entity'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository'; -import { IMetadataRepository } from 'src/interfaces/metadata.repository'; -import { IPartnerRepository } from 'src/interfaces/partner.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { ISearchRepository, SearchExploreItem, SearchStrategy } from 'src/interfaces/search.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { IMachineLearningRepository } from 'src/interfaces/machine-learning.interface'; +import { IMetadataRepository } from 'src/interfaces/metadata.interface'; +import { IPartnerRepository } from 'src/interfaces/partner.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { ISearchRepository, SearchExploreItem, SearchStrategy } from 'src/interfaces/search.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; @Injectable() export class SearchService { diff --git a/server/src/services/server-info.service.spec.ts b/server/src/services/server-info.service.spec.ts index fe678dbef2..bbb608b212 100644 --- a/server/src/services/server-info.service.spec.ts +++ b/server/src/services/server-info.service.spec.ts @@ -1,11 +1,11 @@ import { serverVersion } from 'src/constants'; import { SystemMetadataKey } from 'src/entities/system-metadata.entity'; -import { ICommunicationRepository } from 'src/interfaces/communication.repository'; -import { IServerInfoRepository } from 'src/interfaces/server-info.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { ICommunicationRepository } from 'src/interfaces/communication.interface'; +import { IServerInfoRepository } from 'src/interfaces/server-info.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { ServerInfoService } from 'src/services/server-info.service'; import { newCommunicationRepositoryMock } from 'test/repositories/communication.repository.mock'; import { newStorageRepositoryMock } from 'test/repositories/storage.repository.mock'; diff --git a/server/src/services/server-info.service.ts b/server/src/services/server-info.service.ts index e0a62bdc74..94195fd4ad 100644 --- a/server/src/services/server-info.service.ts +++ b/server/src/services/server-info.service.ts @@ -13,12 +13,12 @@ import { UsageByUserDto, } from 'src/dtos/server-info.dto'; import { SystemMetadataKey } from 'src/entities/system-metadata.entity'; -import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; -import { IServerInfoRepository } from 'src/interfaces/server-info.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.repository'; -import { IUserRepository, UserStatsQueryResponse } from 'src/interfaces/user.repository'; +import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.interface'; +import { IServerInfoRepository } from 'src/interfaces/server-info.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.interface'; +import { IUserRepository, UserStatsQueryResponse } from 'src/interfaces/user.interface'; import { asHumanReadable } from 'src/utils/bytes'; import { ImmichLogger } from 'src/utils/logger'; import { mimeTypes } from 'src/utils/mime-types'; diff --git a/server/src/services/shared-link.service.spec.ts b/server/src/services/shared-link.service.spec.ts index 611d9b6707..cad52928ca 100644 --- a/server/src/services/shared-link.service.spec.ts +++ b/server/src/services/shared-link.service.spec.ts @@ -2,8 +2,8 @@ import { BadRequestException, ForbiddenException, UnauthorizedException } from ' import _ from 'lodash'; import { AssetIdErrorReason } from 'src/dtos/asset-ids.response.dto'; import { SharedLinkType } from 'src/entities/shared-link.entity'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { ISharedLinkRepository } from 'src/interfaces/shared-link.interface'; import { SharedLinkService } from 'src/services/shared-link.service'; import { albumStub } from 'test/fixtures/album.stub'; import { assetStub } from 'test/fixtures/asset.stub'; diff --git a/server/src/services/shared-link.service.ts b/server/src/services/shared-link.service.ts index 44b1f91e5d..cea0e84143 100644 --- a/server/src/services/shared-link.service.ts +++ b/server/src/services/shared-link.service.ts @@ -13,9 +13,9 @@ import { } from 'src/dtos/shared-link.dto'; import { AssetEntity } from 'src/entities/asset.entity'; import { SharedLinkEntity, SharedLinkType } from 'src/entities/shared-link.entity'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { ISharedLinkRepository } from 'src/interfaces/shared-link.interface'; import { OpenGraphTags } from 'src/utils/misc'; @Injectable() diff --git a/server/src/services/smart-info.service.spec.ts b/server/src/services/smart-info.service.spec.ts index b74211da34..81d7935c38 100644 --- a/server/src/services/smart-info.service.spec.ts +++ b/server/src/services/smart-info.service.spec.ts @@ -1,11 +1,11 @@ import { AssetEntity } from 'src/entities/asset.entity'; import { SystemConfigKey } from 'src/entities/system-config.entity'; -import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; -import { IDatabaseRepository } from 'src/interfaces/database.repository'; -import { IJobRepository, JobName } from 'src/interfaces/job.repository'; -import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository'; -import { ISearchRepository } from 'src/interfaces/search.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.interface'; +import { IDatabaseRepository } from 'src/interfaces/database.interface'; +import { IJobRepository, JobName } from 'src/interfaces/job.interface'; +import { IMachineLearningRepository } from 'src/interfaces/machine-learning.interface'; +import { ISearchRepository } from 'src/interfaces/search.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { SmartInfoService } from 'src/services/smart-info.service'; import { getCLIPModelInfo } from 'src/utils/misc'; import { assetStub } from 'test/fixtures/asset.stub'; diff --git a/server/src/services/smart-info.service.ts b/server/src/services/smart-info.service.ts index d686cd56da..fb19e90a78 100644 --- a/server/src/services/smart-info.service.ts +++ b/server/src/services/smart-info.service.ts @@ -1,7 +1,7 @@ import { Inject, Injectable } from '@nestjs/common'; import { SystemConfigCore } from 'src/cores/system-config.core'; -import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; -import { DatabaseLock, IDatabaseRepository } from 'src/interfaces/database.repository'; +import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.interface'; +import { DatabaseLock, IDatabaseRepository } from 'src/interfaces/database.interface'; import { IBaseJob, IEntityJob, @@ -10,10 +10,10 @@ import { JobName, JobStatus, QueueName, -} from 'src/interfaces/job.repository'; -import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository'; -import { ISearchRepository } from 'src/interfaces/search.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +} from 'src/interfaces/job.interface'; +import { IMachineLearningRepository } from 'src/interfaces/machine-learning.interface'; +import { ISearchRepository } from 'src/interfaces/search.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { ImmichLogger } from 'src/utils/logger'; import { usePagination } from 'src/utils/pagination'; diff --git a/server/src/services/storage-template.service.spec.ts b/server/src/services/storage-template.service.spec.ts index b11d1f534e..1254705ae5 100644 --- a/server/src/services/storage-template.service.spec.ts +++ b/server/src/services/storage-template.service.spec.ts @@ -3,16 +3,16 @@ import { Stats } from 'node:fs'; import { SystemConfigCore, defaults } from 'src/cores/system-config.core'; import { AssetPathType } from 'src/entities/move.entity'; import { SystemConfig, SystemConfigKey } from 'src/entities/system-config.entity'; -import { IAlbumRepository } from 'src/interfaces/album.repository'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { IDatabaseRepository } from 'src/interfaces/database.repository'; -import { JobStatus } from 'src/interfaces/job.repository'; -import { IMoveRepository } from 'src/interfaces/move.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAlbumRepository } from 'src/interfaces/album.interface'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { IDatabaseRepository } from 'src/interfaces/database.interface'; +import { JobStatus } from 'src/interfaces/job.interface'; +import { IMoveRepository } from 'src/interfaces/move.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { StorageTemplateService } from 'src/services/storage-template.service'; import { assetStub } from 'test/fixtures/asset.stub'; import { userStub } from 'test/fixtures/user.stub'; diff --git a/server/src/services/storage-template.service.ts b/server/src/services/storage-template.service.ts index 43c6eb09ea..f2901804fa 100644 --- a/server/src/services/storage-template.service.ts +++ b/server/src/services/storage-template.service.ts @@ -18,17 +18,17 @@ import { SystemConfigCore } from 'src/cores/system-config.core'; import { AssetEntity, AssetType } from 'src/entities/asset.entity'; import { AssetPathType } from 'src/entities/move.entity'; import { SystemConfig } from 'src/entities/system-config.entity'; -import { IAlbumRepository } from 'src/interfaces/album.repository'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { InternalEvent, InternalEventMap } from 'src/interfaces/communication.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { DatabaseLock, IDatabaseRepository } from 'src/interfaces/database.repository'; -import { IEntityJob, JOBS_ASSET_PAGINATION_SIZE, JobStatus } from 'src/interfaces/job.repository'; -import { IMoveRepository } from 'src/interfaces/move.repository'; -import { IPersonRepository } from 'src/interfaces/person.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAlbumRepository } from 'src/interfaces/album.interface'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { InternalEvent, InternalEventMap } from 'src/interfaces/communication.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { DatabaseLock, IDatabaseRepository } from 'src/interfaces/database.interface'; +import { IEntityJob, JOBS_ASSET_PAGINATION_SIZE, JobStatus } from 'src/interfaces/job.interface'; +import { IMoveRepository } from 'src/interfaces/move.interface'; +import { IPersonRepository } from 'src/interfaces/person.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { getLivePhotoMotionFilename } from 'src/utils/file'; import { ImmichLogger } from 'src/utils/logger'; import { usePagination } from 'src/utils/pagination'; diff --git a/server/src/services/storage.service.spec.ts b/server/src/services/storage.service.spec.ts index 4a5607efe4..977f632d5e 100644 --- a/server/src/services/storage.service.spec.ts +++ b/server/src/services/storage.service.spec.ts @@ -1,4 +1,4 @@ -import { IStorageRepository } from 'src/interfaces/storage.repository'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; import { StorageService } from 'src/services/storage.service'; import { newStorageRepositoryMock } from 'test/repositories/storage.repository.mock'; diff --git a/server/src/services/storage.service.ts b/server/src/services/storage.service.ts index 22cac00403..81fdb4f415 100644 --- a/server/src/services/storage.service.ts +++ b/server/src/services/storage.service.ts @@ -1,7 +1,7 @@ import { Inject, Injectable } from '@nestjs/common'; import { StorageCore, StorageFolder } from 'src/cores/storage.core'; -import { IDeleteFilesJob, JobStatus } from 'src/interfaces/job.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; +import { IDeleteFilesJob, JobStatus } from 'src/interfaces/job.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; import { ImmichLogger } from 'src/utils/logger'; @Injectable() diff --git a/server/src/services/system-config.service.spec.ts b/server/src/services/system-config.service.spec.ts index d7896e87ea..122708a639 100644 --- a/server/src/services/system-config.service.spec.ts +++ b/server/src/services/system-config.service.spec.ts @@ -13,10 +13,10 @@ import { TranscodePolicy, VideoCodec, } from 'src/entities/system-config.entity'; -import { ICommunicationRepository, ServerEvent } from 'src/interfaces/communication.repository'; -import { QueueName } from 'src/interfaces/job.repository'; -import { ISearchRepository } from 'src/interfaces/search.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { ICommunicationRepository, ServerEvent } from 'src/interfaces/communication.interface'; +import { QueueName } from 'src/interfaces/job.interface'; +import { ISearchRepository } from 'src/interfaces/search.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { SystemConfigService } from 'src/services/system-config.service'; import { ImmichLogger } from 'src/utils/logger'; import { newCommunicationRepositoryMock } from 'test/repositories/communication.repository.mock'; diff --git a/server/src/services/system-config.service.ts b/server/src/services/system-config.service.ts index acb8b13fb8..94661c32e3 100644 --- a/server/src/services/system-config.service.ts +++ b/server/src/services/system-config.service.ts @@ -22,9 +22,9 @@ import { InternalEvent, InternalEventMap, ServerEvent, -} from 'src/interfaces/communication.repository'; -import { ISearchRepository } from 'src/interfaces/search.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +} from 'src/interfaces/communication.interface'; +import { ISearchRepository } from 'src/interfaces/search.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { ImmichLogger } from 'src/utils/logger'; @Injectable() diff --git a/server/src/services/tag.service.spec.ts b/server/src/services/tag.service.spec.ts index 0dca425c3e..2d684616a3 100644 --- a/server/src/services/tag.service.spec.ts +++ b/server/src/services/tag.service.spec.ts @@ -2,7 +2,7 @@ import { BadRequestException } from '@nestjs/common'; import { when } from 'jest-when'; import { AssetIdErrorReason } from 'src/dtos/asset-ids.response.dto'; import { TagType } from 'src/entities/tag.entity'; -import { ITagRepository } from 'src/interfaces/tag.repository'; +import { ITagRepository } from 'src/interfaces/tag.interface'; import { TagService } from 'src/services/tag.service'; import { assetStub } from 'test/fixtures/asset.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/tag.service.ts b/server/src/services/tag.service.ts index b53eac0d70..c04f9b14c4 100644 --- a/server/src/services/tag.service.ts +++ b/server/src/services/tag.service.ts @@ -4,7 +4,7 @@ import { AssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto'; import { AssetIdsDto } from 'src/dtos/asset.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { CreateTagDto, TagResponseDto, UpdateTagDto, mapTag } from 'src/dtos/tag.dto'; -import { ITagRepository } from 'src/interfaces/tag.repository'; +import { ITagRepository } from 'src/interfaces/tag.interface'; @Injectable() export class TagService { diff --git a/server/src/services/trash.service.spec.ts b/server/src/services/trash.service.spec.ts index 03e87a8d02..e43926e4d6 100644 --- a/server/src/services/trash.service.spec.ts +++ b/server/src/services/trash.service.spec.ts @@ -1,7 +1,7 @@ import { BadRequestException } from '@nestjs/common'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; -import { IJobRepository, JobName } from 'src/interfaces/job.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.interface'; +import { IJobRepository, JobName } from 'src/interfaces/job.interface'; import { TrashService } from 'src/services/trash.service'; import { assetStub } from 'test/fixtures/asset.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/trash.service.ts b/server/src/services/trash.service.ts index 61de730975..5f1ee29f70 100644 --- a/server/src/services/trash.service.ts +++ b/server/src/services/trash.service.ts @@ -3,10 +3,10 @@ import { DateTime } from 'luxon'; import { AccessCore, Permission } from 'src/cores/access.core'; import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; -import { IAccessRepository } from 'src/interfaces/access.repository'; -import { IAssetRepository } from 'src/interfaces/asset.repository'; -import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; -import { IJobRepository, JOBS_ASSET_PAGINATION_SIZE, JobName } from 'src/interfaces/job.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; +import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.interface'; +import { IJobRepository, JOBS_ASSET_PAGINATION_SIZE, JobName } from 'src/interfaces/job.interface'; import { usePagination } from 'src/utils/pagination'; export class TrashService { diff --git a/server/src/services/user.service.spec.ts b/server/src/services/user.service.spec.ts index 6a639003df..973f644d3c 100644 --- a/server/src/services/user.service.spec.ts +++ b/server/src/services/user.service.spec.ts @@ -7,13 +7,13 @@ import { import { when } from 'jest-when'; import { UpdateUserDto, mapUser } from 'src/dtos/user.dto'; import { UserEntity, UserStatus } from 'src/entities/user.entity'; -import { IAlbumRepository } from 'src/interfaces/album.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { IJobRepository, JobName } from 'src/interfaces/job.repository'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IAlbumRepository } from 'src/interfaces/album.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { IJobRepository, JobName } from 'src/interfaces/job.interface'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { IUserRepository } from 'src/interfaces/user.interface'; import { UserService } from 'src/services/user.service'; import { CacheControl, ImmichFileResponse } from 'src/utils/file'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/services/user.service.ts b/server/src/services/user.service.ts index e4d8f11c49..6649927da4 100644 --- a/server/src/services/user.service.ts +++ b/server/src/services/user.service.ts @@ -8,13 +8,13 @@ import { AuthDto } from 'src/dtos/auth.dto'; import { CreateProfileImageResponseDto, mapCreateProfileImageResponse } from 'src/dtos/user-profile.dto'; import { CreateUserDto, DeleteUserDto, UpdateUserDto, UserResponseDto, mapUser } from 'src/dtos/user.dto'; import { UserEntity, UserStatus } from 'src/entities/user.entity'; -import { IAlbumRepository } from 'src/interfaces/album.repository'; -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; -import { IEntityJob, IJobRepository, JobName, JobStatus } from 'src/interfaces/job.repository'; -import { ILibraryRepository } from 'src/interfaces/library.repository'; -import { IStorageRepository } from 'src/interfaces/storage.repository'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; -import { IUserRepository, UserFindOptions } from 'src/interfaces/user.repository'; +import { IAlbumRepository } from 'src/interfaces/album.interface'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; +import { IEntityJob, IJobRepository, JobName, JobStatus } from 'src/interfaces/job.interface'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; +import { IStorageRepository } from 'src/interfaces/storage.interface'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; +import { IUserRepository, UserFindOptions } from 'src/interfaces/user.interface'; import { CacheControl, ImmichFileResponse } from 'src/utils/file'; import { ImmichLogger } from 'src/utils/logger'; diff --git a/server/src/utils/database.ts b/server/src/utils/database.ts index 3a3e4603b7..7ec6777561 100644 --- a/server/src/utils/database.ts +++ b/server/src/utils/database.ts @@ -1,6 +1,6 @@ import _ from 'lodash'; import { AssetEntity } from 'src/entities/asset.entity'; -import { AssetSearchBuilderOptions } from 'src/interfaces/search.repository'; +import { AssetSearchBuilderOptions } from 'src/interfaces/search.interface'; import { Between, IsNull, LessThanOrEqual, MoreThanOrEqual, Not, SelectQueryBuilder } from 'typeorm'; /** diff --git a/server/src/utils/media.ts b/server/src/utils/media.ts index d6a5b53a68..f66eee6a5c 100644 --- a/server/src/utils/media.ts +++ b/server/src/utils/media.ts @@ -7,7 +7,7 @@ import { VideoCodecHWConfig, VideoCodecSWConfig, VideoStreamInfo, -} from 'src/interfaces/media.repository'; +} from 'src/interfaces/media.interface'; class BaseConfig implements VideoCodecSWConfig { presets = ['veryslow', 'slower', 'slow', 'medium', 'fast', 'faster', 'veryfast', 'superfast', 'ultrafast']; diff --git a/server/src/utils/sql.ts b/server/src/utils/sql.ts index f982738064..1afe4d5a84 100644 --- a/server/src/utils/sql.ts +++ b/server/src/utils/sql.ts @@ -9,7 +9,7 @@ import { format } from 'sql-formatter'; import { databaseConfig } from 'src/database.config'; import { GENERATE_SQL_KEY, GenerateSqlQueries } from 'src/decorators'; import { databaseEntities } from 'src/entities'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; import { AccessRepository } from 'src/repositories/access.repository'; import { AlbumRepository } from 'src/repositories/album.repository'; import { ApiKeyRepository } from 'src/repositories/api-key.repository'; diff --git a/server/test/fixtures/media.stub.ts b/server/test/fixtures/media.stub.ts index 1be792c251..5070586ac9 100644 --- a/server/test/fixtures/media.stub.ts +++ b/server/test/fixtures/media.stub.ts @@ -1,4 +1,4 @@ -import { AudioStreamInfo, VideoFormat, VideoInfo, VideoStreamInfo } from 'src/interfaces/media.repository'; +import { AudioStreamInfo, VideoFormat, VideoInfo, VideoStreamInfo } from 'src/interfaces/media.interface'; const probeStubDefaultFormat: VideoFormat = { formatName: 'mov,mp4,m4a,3gp,3g2,mj2', diff --git a/server/test/repositories/access.repository.mock.ts b/server/test/repositories/access.repository.mock.ts index 8d2233cf61..a614512774 100644 --- a/server/test/repositories/access.repository.mock.ts +++ b/server/test/repositories/access.repository.mock.ts @@ -1,5 +1,5 @@ import { AccessCore } from 'src/cores/access.core'; -import { IAccessRepository } from 'src/interfaces/access.repository'; +import { IAccessRepository } from 'src/interfaces/access.interface'; export interface IAccessRepositoryMock { activity: jest.Mocked; diff --git a/server/test/repositories/activity.repository.mock.ts b/server/test/repositories/activity.repository.mock.ts index 84cf7e124c..276b57c6cb 100644 --- a/server/test/repositories/activity.repository.mock.ts +++ b/server/test/repositories/activity.repository.mock.ts @@ -1,4 +1,4 @@ -import { IActivityRepository } from 'src/interfaces/activity.repository'; +import { IActivityRepository } from 'src/interfaces/activity.interface'; export const newActivityRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/album.repository.mock.ts b/server/test/repositories/album.repository.mock.ts index b50fe67503..626358d811 100644 --- a/server/test/repositories/album.repository.mock.ts +++ b/server/test/repositories/album.repository.mock.ts @@ -1,4 +1,4 @@ -import { IAlbumRepository } from 'src/interfaces/album.repository'; +import { IAlbumRepository } from 'src/interfaces/album.interface'; export const newAlbumRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/api-key.repository.mock.ts b/server/test/repositories/api-key.repository.mock.ts index d74a41028d..32b8388a36 100644 --- a/server/test/repositories/api-key.repository.mock.ts +++ b/server/test/repositories/api-key.repository.mock.ts @@ -1,4 +1,4 @@ -import { IKeyRepository } from 'src/interfaces/api-key.repository'; +import { IKeyRepository } from 'src/interfaces/api-key.interface'; export const newKeyRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/asset-stack.repository.mock.ts b/server/test/repositories/asset-stack.repository.mock.ts index cf38d045fd..76ada96cdc 100644 --- a/server/test/repositories/asset-stack.repository.mock.ts +++ b/server/test/repositories/asset-stack.repository.mock.ts @@ -1,4 +1,4 @@ -import { IAssetStackRepository } from 'src/interfaces/asset-stack.repository'; +import { IAssetStackRepository } from 'src/interfaces/asset-stack.interface'; export const newAssetStackRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/asset.repository.mock.ts b/server/test/repositories/asset.repository.mock.ts index c72d004142..22d4f37073 100644 --- a/server/test/repositories/asset.repository.mock.ts +++ b/server/test/repositories/asset.repository.mock.ts @@ -1,4 +1,4 @@ -import { IAssetRepository } from 'src/interfaces/asset.repository'; +import { IAssetRepository } from 'src/interfaces/asset.interface'; export const newAssetRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/audit.repository.mock.ts b/server/test/repositories/audit.repository.mock.ts index 654f677944..9e4adf5608 100644 --- a/server/test/repositories/audit.repository.mock.ts +++ b/server/test/repositories/audit.repository.mock.ts @@ -1,4 +1,4 @@ -import { IAuditRepository } from 'src/interfaces/audit.repository'; +import { IAuditRepository } from 'src/interfaces/audit.interface'; export const newAuditRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/communication.repository.mock.ts b/server/test/repositories/communication.repository.mock.ts index 3d4eaeb37f..38284f3778 100644 --- a/server/test/repositories/communication.repository.mock.ts +++ b/server/test/repositories/communication.repository.mock.ts @@ -1,4 +1,4 @@ -import { ICommunicationRepository } from 'src/interfaces/communication.repository'; +import { ICommunicationRepository } from 'src/interfaces/communication.interface'; export const newCommunicationRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/crypto.repository.mock.ts b/server/test/repositories/crypto.repository.mock.ts index 6cf4adffd0..cbd90ec67c 100644 --- a/server/test/repositories/crypto.repository.mock.ts +++ b/server/test/repositories/crypto.repository.mock.ts @@ -1,4 +1,4 @@ -import { ICryptoRepository } from 'src/interfaces/crypto.repository'; +import { ICryptoRepository } from 'src/interfaces/crypto.interface'; export const newCryptoRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/database.repository.mock.ts b/server/test/repositories/database.repository.mock.ts index 43a2dfb796..704189571a 100644 --- a/server/test/repositories/database.repository.mock.ts +++ b/server/test/repositories/database.repository.mock.ts @@ -1,4 +1,4 @@ -import { IDatabaseRepository } from 'src/interfaces/database.repository'; +import { IDatabaseRepository } from 'src/interfaces/database.interface'; import { Version } from 'src/utils/version'; export const newDatabaseRepositoryMock = (): jest.Mocked => { diff --git a/server/test/repositories/job.repository.mock.ts b/server/test/repositories/job.repository.mock.ts index 851da70daa..9cd21fe874 100644 --- a/server/test/repositories/job.repository.mock.ts +++ b/server/test/repositories/job.repository.mock.ts @@ -1,4 +1,4 @@ -import { IJobRepository } from 'src/interfaces/job.repository'; +import { IJobRepository } from 'src/interfaces/job.interface'; export const newJobRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/library.repository.mock.ts b/server/test/repositories/library.repository.mock.ts index b3c62d6814..6cdfb38f41 100644 --- a/server/test/repositories/library.repository.mock.ts +++ b/server/test/repositories/library.repository.mock.ts @@ -1,4 +1,4 @@ -import { ILibraryRepository } from 'src/interfaces/library.repository'; +import { ILibraryRepository } from 'src/interfaces/library.interface'; export const newLibraryRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/machine-learning.repository.mock.ts b/server/test/repositories/machine-learning.repository.mock.ts index 50da10cb40..bc35b4c855 100644 --- a/server/test/repositories/machine-learning.repository.mock.ts +++ b/server/test/repositories/machine-learning.repository.mock.ts @@ -1,4 +1,4 @@ -import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository'; +import { IMachineLearningRepository } from 'src/interfaces/machine-learning.interface'; export const newMachineLearningRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/media.repository.mock.ts b/server/test/repositories/media.repository.mock.ts index d1806c6362..b904766ea9 100644 --- a/server/test/repositories/media.repository.mock.ts +++ b/server/test/repositories/media.repository.mock.ts @@ -1,4 +1,4 @@ -import { IMediaRepository } from 'src/interfaces/media.repository'; +import { IMediaRepository } from 'src/interfaces/media.interface'; export const newMediaRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/metadata.repository.mock.ts b/server/test/repositories/metadata.repository.mock.ts index a5f13daf5b..ec21ab8c15 100644 --- a/server/test/repositories/metadata.repository.mock.ts +++ b/server/test/repositories/metadata.repository.mock.ts @@ -1,4 +1,4 @@ -import { IMetadataRepository } from 'src/interfaces/metadata.repository'; +import { IMetadataRepository } from 'src/interfaces/metadata.interface'; export const newMetadataRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/move.repository.mock.ts b/server/test/repositories/move.repository.mock.ts index 265799ab6d..b7adec2a7b 100644 --- a/server/test/repositories/move.repository.mock.ts +++ b/server/test/repositories/move.repository.mock.ts @@ -1,4 +1,4 @@ -import { IMoveRepository } from 'src/interfaces/move.repository'; +import { IMoveRepository } from 'src/interfaces/move.interface'; export const newMoveRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/partner.repository.mock.ts b/server/test/repositories/partner.repository.mock.ts index 74c42ba8db..04370730b1 100644 --- a/server/test/repositories/partner.repository.mock.ts +++ b/server/test/repositories/partner.repository.mock.ts @@ -1,4 +1,4 @@ -import { IPartnerRepository } from 'src/interfaces/partner.repository'; +import { IPartnerRepository } from 'src/interfaces/partner.interface'; export const newPartnerRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/person.repository.mock.ts b/server/test/repositories/person.repository.mock.ts index b4b8175358..5b94fbc3d2 100644 --- a/server/test/repositories/person.repository.mock.ts +++ b/server/test/repositories/person.repository.mock.ts @@ -1,4 +1,4 @@ -import { IPersonRepository } from 'src/interfaces/person.repository'; +import { IPersonRepository } from 'src/interfaces/person.interface'; export const newPersonRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/search.repository.mock.ts b/server/test/repositories/search.repository.mock.ts index eb6c13ea41..24e648ee2b 100644 --- a/server/test/repositories/search.repository.mock.ts +++ b/server/test/repositories/search.repository.mock.ts @@ -1,4 +1,4 @@ -import { ISearchRepository } from 'src/interfaces/search.repository'; +import { ISearchRepository } from 'src/interfaces/search.interface'; export const newSearchRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/shared-link.repository.mock.ts b/server/test/repositories/shared-link.repository.mock.ts index ea084c1ed9..2fcaf7aee4 100644 --- a/server/test/repositories/shared-link.repository.mock.ts +++ b/server/test/repositories/shared-link.repository.mock.ts @@ -1,4 +1,4 @@ -import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository'; +import { ISharedLinkRepository } from 'src/interfaces/shared-link.interface'; export const newSharedLinkRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/storage.repository.mock.ts b/server/test/repositories/storage.repository.mock.ts index 72b87aed12..d5049999c7 100644 --- a/server/test/repositories/storage.repository.mock.ts +++ b/server/test/repositories/storage.repository.mock.ts @@ -1,6 +1,6 @@ import { WatchOptions } from 'chokidar'; import { StorageCore } from 'src/cores/storage.core'; -import { IStorageRepository, StorageEventType, WatchEvents } from 'src/interfaces/storage.repository'; +import { IStorageRepository, StorageEventType, WatchEvents } from 'src/interfaces/storage.interface'; interface MockWatcherOptions { items?: Array<{ event: 'change' | 'add' | 'unlink' | 'error'; value: string }>; diff --git a/server/test/repositories/system-config.repository.mock.ts b/server/test/repositories/system-config.repository.mock.ts index 89ce6a0501..0ef11ce18f 100644 --- a/server/test/repositories/system-config.repository.mock.ts +++ b/server/test/repositories/system-config.repository.mock.ts @@ -1,5 +1,5 @@ import { SystemConfigCore } from 'src/cores/system-config.core'; -import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { ISystemConfigRepository } from 'src/interfaces/system-config.interface'; export const newSystemConfigRepositoryMock = (reset = true): jest.Mocked => { if (reset) { diff --git a/server/test/repositories/system-info.repository.mock.ts b/server/test/repositories/system-info.repository.mock.ts index 93ec9c7dda..bdc11f9d63 100644 --- a/server/test/repositories/system-info.repository.mock.ts +++ b/server/test/repositories/system-info.repository.mock.ts @@ -1,4 +1,4 @@ -import { IServerInfoRepository } from 'src/interfaces/server-info.repository'; +import { IServerInfoRepository } from 'src/interfaces/server-info.interface'; export const newServerInfoRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/system-metadata.repository.mock.ts b/server/test/repositories/system-metadata.repository.mock.ts index f93278aaaf..5ffc5dd895 100644 --- a/server/test/repositories/system-metadata.repository.mock.ts +++ b/server/test/repositories/system-metadata.repository.mock.ts @@ -1,4 +1,4 @@ -import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.repository'; +import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.interface'; export const newSystemMetadataRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/tag.repository.mock.ts b/server/test/repositories/tag.repository.mock.ts index 9f5283664b..0c31c546c2 100644 --- a/server/test/repositories/tag.repository.mock.ts +++ b/server/test/repositories/tag.repository.mock.ts @@ -1,4 +1,4 @@ -import { ITagRepository } from 'src/interfaces/tag.repository'; +import { ITagRepository } from 'src/interfaces/tag.interface'; export const newTagRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/user-token.repository.mock.ts b/server/test/repositories/user-token.repository.mock.ts index 23de88d350..b3fa7e73f1 100644 --- a/server/test/repositories/user-token.repository.mock.ts +++ b/server/test/repositories/user-token.repository.mock.ts @@ -1,4 +1,4 @@ -import { IUserTokenRepository } from 'src/interfaces/user-token.repository'; +import { IUserTokenRepository } from 'src/interfaces/user-token.interface'; export const newUserTokenRepositoryMock = (): jest.Mocked => { return { diff --git a/server/test/repositories/user.repository.mock.ts b/server/test/repositories/user.repository.mock.ts index 4db0b16afc..80d9a4cfd0 100644 --- a/server/test/repositories/user.repository.mock.ts +++ b/server/test/repositories/user.repository.mock.ts @@ -1,5 +1,5 @@ import { UserCore } from 'src/cores/user.core'; -import { IUserRepository } from 'src/interfaces/user.repository'; +import { IUserRepository } from 'src/interfaces/user.interface'; export const newUserRepositoryMock = (reset = true): jest.Mocked => { if (reset) { diff --git a/server/test/utils.ts b/server/test/utils.ts index 4feca9946c..e87150dca8 100644 --- a/server/test/utils.ts +++ b/server/test/utils.ts @@ -11,9 +11,9 @@ import { ApiService } from 'src/apps/api.service'; import { AppModule, AppTestModule } from 'src/apps/app.module'; import { MicroservicesService } from 'src/apps/microservices.service'; import { dataSource } from 'src/database.config'; -import { IJobRepository, JobItem, JobItemHandler, QueueName } from 'src/interfaces/job.repository'; -import { IMediaRepository } from 'src/interfaces/media.repository'; -import { StorageEventType } from 'src/interfaces/storage.repository'; +import { IJobRepository, JobItem, JobItemHandler, QueueName } from 'src/interfaces/job.interface'; +import { IMediaRepository } from 'src/interfaces/media.interface'; +import { StorageEventType } from 'src/interfaces/storage.interface'; import { MediaRepository } from 'src/repositories/media.repository'; import { EntityTarget, ObjectLiteral } from 'typeorm';