mirror of
https://github.com/immich-app/immich.git
synced 2025-01-23 12:12:45 +01:00
parent
6d9e7694b1
commit
ef4a492cb1
83 changed files with 104 additions and 100 deletions
.vscode
server
e2e/jobs/specs
src
apps
commands
controllers
activity.controller.tsalbum.controller.tsapi-key.controller.tsapp.controller.tsasset.controller.tsaudit.controller.tsauth.controller.tsdownload.controller.tsface.controller.tsjob.controller.tslibrary.controller.tsoauth.controller.tspartner.controller.tsperson.controller.tssearch.controller.tsserver-info.controller.tsshared-link.controller.tssystem-config.controller.tstag.controller.tstrash.controller.tsuser.controller.ts
dtos
immich/api-v1/asset
middleware
repositories
services
activity.service.spec.tsactivity.service.tsalbum.service.spec.tsalbum.service.tsapi-key.service.spec.tsapi-key.service.tsasset.service.spec.tsasset.service.tsaudit.service.spec.tsaudit.service.tsauth.service.spec.tsauth.service.tsdatabase.service.spec.tsdatabase.service.tsdownload.service.spec.tsdownload.service.tsjob.service.spec.tsjob.service.tslibrary.service.spec.tslibrary.service.tsmedia.service.spec.tsmedia.service.tsmetadata.service.spec.tsmetadata.service.tspartner.service.spec.tspartner.service.tsperson.service.spec.tsperson.service.tssearch.service.spec.tssearch.service.tsserver-info.service.spec.tsserver-info.service.tsshared-link.service.spec.tsshared-link.service.tssmart-info.service.spec.tssmart-info.service.tsstorage-template.service.spec.tsstorage-template.service.tsstorage.service.spec.tsstorage.service.tssystem-config.service.spec.tssystem-config.service.tstag.service.spec.tstag.service.tstrash.service.spec.tstrash.service.tsuser.service.spec.tsuser.service.ts
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
|
@ -27,4 +27,8 @@
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"immich"
|
"immich"
|
||||||
],
|
],
|
||||||
|
"explorer.fileNesting.enabled": true,
|
||||||
|
"explorer.fileNesting.patterns": {
|
||||||
|
"*.ts": "${capture}.spec.ts,${capture}.mock.ts"
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,12 +1,12 @@
|
||||||
import { api } from 'e2e/client';
|
import { api } from 'e2e/client';
|
||||||
import fs from 'node:fs/promises';
|
import fs from 'node:fs/promises';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { LibraryService } from 'src/domain/library/library.service';
|
|
||||||
import { LoginResponseDto } from 'src/dtos/auth.dto';
|
import { LoginResponseDto } from 'src/dtos/auth.dto';
|
||||||
import { LibraryResponseDto } from 'src/dtos/library.dto';
|
import { LibraryResponseDto } from 'src/dtos/library.dto';
|
||||||
import { AssetType } from 'src/entities/asset.entity';
|
import { AssetType } from 'src/entities/asset.entity';
|
||||||
import { LibraryType } from 'src/entities/library.entity';
|
import { LibraryType } from 'src/entities/library.entity';
|
||||||
import { StorageEventType } from 'src/interfaces/storage.repository';
|
import { StorageEventType } from 'src/interfaces/storage.repository';
|
||||||
|
import { LibraryService } from 'src/services/library.service';
|
||||||
import {
|
import {
|
||||||
IMMICH_TEST_ASSET_PATH,
|
IMMICH_TEST_ASSET_PATH,
|
||||||
IMMICH_TEST_ASSET_TEMP_PATH,
|
IMMICH_TEST_ASSET_TEMP_PATH,
|
||||||
|
|
|
@ -3,15 +3,15 @@ import { Cron, CronExpression, Interval } from '@nestjs/schedule';
|
||||||
import { NextFunction, Request, Response } from 'express';
|
import { NextFunction, Request, Response } from 'express';
|
||||||
import { readFileSync } from 'node:fs';
|
import { readFileSync } from 'node:fs';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { AuthService } from 'src/domain/auth/auth.service';
|
|
||||||
import { DatabaseService } from 'src/domain/database/database.service';
|
|
||||||
import { ONE_HOUR, WEB_ROOT } from 'src/domain/domain.constant';
|
import { ONE_HOUR, WEB_ROOT } from 'src/domain/domain.constant';
|
||||||
import { JobService } from 'src/domain/job/job.service';
|
|
||||||
import { ServerInfoService } from 'src/domain/server-info/server-info.service';
|
|
||||||
import { SharedLinkService } from 'src/domain/shared-link/shared-link.service';
|
|
||||||
import { StorageService } from 'src/domain/storage/storage.service';
|
|
||||||
import { SystemConfigService } from 'src/domain/system-config/system-config.service';
|
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
import { AuthService } from 'src/services/auth.service';
|
||||||
|
import { DatabaseService } from 'src/services/database.service';
|
||||||
|
import { JobService } from 'src/services/job.service';
|
||||||
|
import { ServerInfoService } from 'src/services/server-info.service';
|
||||||
|
import { SharedLinkService } from 'src/services/shared-link.service';
|
||||||
|
import { StorageService } from 'src/services/storage.service';
|
||||||
|
import { SystemConfigService } from 'src/services/system-config.service';
|
||||||
import { OpenGraphTags } from 'src/utils';
|
import { OpenGraphTags } from 'src/utils';
|
||||||
|
|
||||||
const render = (index: string, meta: OpenGraphTags) => {
|
const render = (index: string, meta: OpenGraphTags) => {
|
||||||
|
|
|
@ -6,30 +6,6 @@ import { ScheduleModule, SchedulerRegistry } from '@nestjs/schedule';
|
||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
import { OpenTelemetryModule } from 'nestjs-otel';
|
import { OpenTelemetryModule } from 'nestjs-otel';
|
||||||
import { bullConfig, bullQueues, immichAppConfig } from 'src/config';
|
import { bullConfig, bullQueues, immichAppConfig } from 'src/config';
|
||||||
import { ActivityService } from 'src/domain/activity/activity.service';
|
|
||||||
import { AlbumService } from 'src/domain/album/album.service';
|
|
||||||
import { APIKeyService } from 'src/domain/api-key/api-key.service';
|
|
||||||
import { AssetService } from 'src/domain/asset/asset.service';
|
|
||||||
import { AuditService } from 'src/domain/audit/audit.service';
|
|
||||||
import { AuthService } from 'src/domain/auth/auth.service';
|
|
||||||
import { DatabaseService } from 'src/domain/database/database.service';
|
|
||||||
import { DownloadService } from 'src/domain/download/download.service';
|
|
||||||
import { JobService } from 'src/domain/job/job.service';
|
|
||||||
import { LibraryService } from 'src/domain/library/library.service';
|
|
||||||
import { MediaService } from 'src/domain/media/media.service';
|
|
||||||
import { MetadataService } from 'src/domain/metadata/metadata.service';
|
|
||||||
import { PartnerService } from 'src/domain/partner/partner.service';
|
|
||||||
import { PersonService } from 'src/domain/person/person.service';
|
|
||||||
import { SearchService } from 'src/domain/search/search.service';
|
|
||||||
import { ServerInfoService } from 'src/domain/server-info/server-info.service';
|
|
||||||
import { SharedLinkService } from 'src/domain/shared-link/shared-link.service';
|
|
||||||
import { SmartInfoService } from 'src/domain/smart-info/smart-info.service';
|
|
||||||
import { StorageTemplateService } from 'src/domain/storage-template/storage-template.service';
|
|
||||||
import { StorageService } from 'src/domain/storage/storage.service';
|
|
||||||
import { SystemConfigService } from 'src/domain/system-config/system-config.service';
|
|
||||||
import { TagService } from 'src/domain/tag/tag.service';
|
|
||||||
import { TrashService } from 'src/domain/trash/trash.service';
|
|
||||||
import { UserService } from 'src/domain/user/user.service';
|
|
||||||
import { databaseEntities } from 'src/entities';
|
import { databaseEntities } from 'src/entities';
|
||||||
import { databaseConfig } from 'src/infra/database.config';
|
import { databaseConfig } from 'src/infra/database.config';
|
||||||
import { otelConfig } from 'src/infra/instrumentation';
|
import { otelConfig } from 'src/infra/instrumentation';
|
||||||
|
@ -88,6 +64,30 @@ import { SystemMetadataRepository } from 'src/repositories/system-metadata.repos
|
||||||
import { TagRepository } from 'src/repositories/tag.repository';
|
import { TagRepository } from 'src/repositories/tag.repository';
|
||||||
import { UserTokenRepository } from 'src/repositories/user-token.repository';
|
import { UserTokenRepository } from 'src/repositories/user-token.repository';
|
||||||
import { UserRepository } from 'src/repositories/user.repository';
|
import { UserRepository } from 'src/repositories/user.repository';
|
||||||
|
import { ActivityService } from 'src/services/activity.service';
|
||||||
|
import { AlbumService } from 'src/services/album.service';
|
||||||
|
import { APIKeyService } from 'src/services/api-key.service';
|
||||||
|
import { AssetService } from 'src/services/asset.service';
|
||||||
|
import { AuditService } from 'src/services/audit.service';
|
||||||
|
import { AuthService } from 'src/services/auth.service';
|
||||||
|
import { DatabaseService } from 'src/services/database.service';
|
||||||
|
import { DownloadService } from 'src/services/download.service';
|
||||||
|
import { JobService } from 'src/services/job.service';
|
||||||
|
import { LibraryService } from 'src/services/library.service';
|
||||||
|
import { MediaService } from 'src/services/media.service';
|
||||||
|
import { MetadataService } from 'src/services/metadata.service';
|
||||||
|
import { PartnerService } from 'src/services/partner.service';
|
||||||
|
import { PersonService } from 'src/services/person.service';
|
||||||
|
import { SearchService } from 'src/services/search.service';
|
||||||
|
import { ServerInfoService } from 'src/services/server-info.service';
|
||||||
|
import { SharedLinkService } from 'src/services/shared-link.service';
|
||||||
|
import { SmartInfoService } from 'src/services/smart-info.service';
|
||||||
|
import { StorageTemplateService } from 'src/services/storage-template.service';
|
||||||
|
import { StorageService } from 'src/services/storage.service';
|
||||||
|
import { SystemConfigService } from 'src/services/system-config.service';
|
||||||
|
import { TagService } from 'src/services/tag.service';
|
||||||
|
import { TrashService } from 'src/services/trash.service';
|
||||||
|
import { UserService } from 'src/services/user.service';
|
||||||
|
|
||||||
const services: Provider[] = [
|
const services: Provider[] = [
|
||||||
APIKeyService,
|
APIKeyService,
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { AssetService } from 'src/domain/asset/asset.service';
|
|
||||||
import { AuditService } from 'src/domain/audit/audit.service';
|
|
||||||
import { DatabaseService } from 'src/domain/database/database.service';
|
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { IDeleteFilesJob } from 'src/domain/job/job.interface';
|
import { IDeleteFilesJob } from 'src/domain/job/job.interface';
|
||||||
import { JobService } from 'src/domain/job/job.service';
|
|
||||||
import { LibraryService } from 'src/domain/library/library.service';
|
|
||||||
import { MediaService } from 'src/domain/media/media.service';
|
|
||||||
import { MetadataService } from 'src/domain/metadata/metadata.service';
|
|
||||||
import { PersonService } from 'src/domain/person/person.service';
|
|
||||||
import { SmartInfoService } from 'src/domain/smart-info/smart-info.service';
|
|
||||||
import { StorageTemplateService } from 'src/domain/storage-template/storage-template.service';
|
|
||||||
import { StorageService } from 'src/domain/storage/storage.service';
|
|
||||||
import { SystemConfigService } from 'src/domain/system-config/system-config.service';
|
|
||||||
import { UserService } from 'src/domain/user/user.service';
|
|
||||||
import { otelSDK } from 'src/infra/instrumentation';
|
import { otelSDK } from 'src/infra/instrumentation';
|
||||||
|
import { AssetService } from 'src/services/asset.service';
|
||||||
|
import { AuditService } from 'src/services/audit.service';
|
||||||
|
import { DatabaseService } from 'src/services/database.service';
|
||||||
|
import { JobService } from 'src/services/job.service';
|
||||||
|
import { LibraryService } from 'src/services/library.service';
|
||||||
|
import { MediaService } from 'src/services/media.service';
|
||||||
|
import { MetadataService } from 'src/services/metadata.service';
|
||||||
|
import { PersonService } from 'src/services/person.service';
|
||||||
|
import { SmartInfoService } from 'src/services/smart-info.service';
|
||||||
|
import { StorageTemplateService } from 'src/services/storage-template.service';
|
||||||
|
import { StorageService } from 'src/services/storage.service';
|
||||||
|
import { SystemConfigService } from 'src/services/system-config.service';
|
||||||
|
import { UserService } from 'src/services/user.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MicroservicesService {
|
export class MicroservicesService {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Command, CommandRunner } from 'nest-commander';
|
import { Command, CommandRunner } from 'nest-commander';
|
||||||
import { UserService } from 'src/domain/user/user.service';
|
|
||||||
import { UserEntity } from 'src/entities/user.entity';
|
import { UserEntity } from 'src/entities/user.entity';
|
||||||
|
import { UserService } from 'src/services/user.service';
|
||||||
|
|
||||||
@Command({
|
@Command({
|
||||||
name: 'list-users',
|
name: 'list-users',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Command, CommandRunner } from 'nest-commander';
|
import { Command, CommandRunner } from 'nest-commander';
|
||||||
import { SystemConfigService } from 'src/domain/system-config/system-config.service';
|
import { SystemConfigService } from 'src/services/system-config.service';
|
||||||
|
|
||||||
@Command({
|
@Command({
|
||||||
name: 'enable-oauth-login',
|
name: 'enable-oauth-login',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Command, CommandRunner } from 'nest-commander';
|
import { Command, CommandRunner } from 'nest-commander';
|
||||||
import { SystemConfigService } from 'src/domain/system-config/system-config.service';
|
import { SystemConfigService } from 'src/services/system-config.service';
|
||||||
|
|
||||||
@Command({
|
@Command({
|
||||||
name: 'enable-password-login',
|
name: 'enable-password-login',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Command, CommandRunner, InquirerService, Question, QuestionSet } from 'nest-commander';
|
import { Command, CommandRunner, InquirerService, Question, QuestionSet } from 'nest-commander';
|
||||||
import { UserService } from 'src/domain/user/user.service';
|
|
||||||
import { UserResponseDto } from 'src/dtos/user.dto';
|
import { UserResponseDto } from 'src/dtos/user.dto';
|
||||||
|
import { UserService } from 'src/services/user.service';
|
||||||
|
|
||||||
@Command({
|
@Command({
|
||||||
name: 'reset-admin-password',
|
name: 'reset-admin-password',
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Query, Res } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Query, Res } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { Response } from 'express';
|
import { Response } from 'express';
|
||||||
import { ActivityService } from 'src/domain/activity/activity.service';
|
|
||||||
import {
|
import {
|
||||||
ActivityCreateDto,
|
ActivityCreateDto,
|
||||||
ActivityDto,
|
ActivityDto,
|
||||||
|
@ -11,6 +10,7 @@ import {
|
||||||
} from 'src/dtos/activity.dto';
|
} from 'src/dtos/activity.dto';
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { ActivityService } from 'src/services/activity.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Activity')
|
@ApiTags('Activity')
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Body, Controller, Delete, Get, Param, Patch, Post, Put, Query } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, Param, Patch, Post, Put, Query } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { AlbumService } from 'src/domain/album/album.service';
|
|
||||||
import {
|
import {
|
||||||
AddUsersDto,
|
AddUsersDto,
|
||||||
AlbumCountResponseDto,
|
AlbumCountResponseDto,
|
||||||
|
@ -13,6 +12,7 @@ import {
|
||||||
import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto';
|
import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto';
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { Auth, Authenticated, SharedLinkRoute } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated, SharedLinkRoute } from 'src/middleware/auth.guard';
|
||||||
|
import { AlbumService } from 'src/services/album.service';
|
||||||
import { ParseMeUUIDPipe, UUIDParamDto } from 'src/validation';
|
import { ParseMeUUIDPipe, UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Album')
|
@ApiTags('Album')
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { APIKeyService } from 'src/domain/api-key/api-key.service';
|
|
||||||
import { APIKeyCreateDto, APIKeyCreateResponseDto, APIKeyResponseDto, APIKeyUpdateDto } from 'src/dtos/api-key.dto';
|
import { APIKeyCreateDto, APIKeyCreateResponseDto, APIKeyResponseDto, APIKeyUpdateDto } from 'src/dtos/api-key.dto';
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { APIKeyService } from 'src/services/api-key.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('API Key')
|
@ApiTags('API Key')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Controller, Get, Header } from '@nestjs/common';
|
import { Controller, Get, Header } from '@nestjs/common';
|
||||||
import { ApiExcludeEndpoint } from '@nestjs/swagger';
|
import { ApiExcludeEndpoint } from '@nestjs/swagger';
|
||||||
import { SystemConfigService } from 'src/domain/system-config/system-config.service';
|
|
||||||
import { PublicRoute } from 'src/middleware/auth.guard';
|
import { PublicRoute } from 'src/middleware/auth.guard';
|
||||||
|
import { SystemConfigService } from 'src/services/system-config.service';
|
||||||
|
|
||||||
@Controller()
|
@Controller()
|
||||||
export class AppController {
|
export class AppController {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common';
|
||||||
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||||
import { AssetService } from 'src/domain/asset/asset.service';
|
|
||||||
import { SearchService } from 'src/domain/search/search.service';
|
|
||||||
import { AssetResponseDto, MemoryLaneResponseDto } from 'src/dtos/asset-response.dto';
|
import { AssetResponseDto, MemoryLaneResponseDto } from 'src/dtos/asset-response.dto';
|
||||||
import {
|
import {
|
||||||
AssetBulkDeleteDto,
|
AssetBulkDeleteDto,
|
||||||
|
@ -19,6 +17,8 @@ import { UpdateStackParentDto } from 'src/dtos/stack.dto';
|
||||||
import { TimeBucketAssetDto, TimeBucketDto, TimeBucketResponseDto } from 'src/dtos/time-bucket.dto';
|
import { TimeBucketAssetDto, TimeBucketDto, TimeBucketResponseDto } from 'src/dtos/time-bucket.dto';
|
||||||
import { Auth, Authenticated, SharedLinkRoute } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated, SharedLinkRoute } from 'src/middleware/auth.guard';
|
||||||
import { Route } from 'src/middleware/file-upload.interceptor';
|
import { Route } from 'src/middleware/file-upload.interceptor';
|
||||||
|
import { AssetService } from 'src/services/asset.service';
|
||||||
|
import { SearchService } from 'src/services/search.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Asset')
|
@ApiTags('Asset')
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Body, Controller, Get, Post, Query } from '@nestjs/common';
|
import { Body, Controller, Get, Post, Query } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { AuditService } from 'src/domain/audit/audit.service';
|
|
||||||
import {
|
import {
|
||||||
AuditDeletesDto,
|
AuditDeletesDto,
|
||||||
AuditDeletesResponseDto,
|
AuditDeletesResponseDto,
|
||||||
|
@ -11,6 +10,7 @@ import {
|
||||||
} from 'src/dtos/audit.dto';
|
} from 'src/dtos/audit.dto';
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { AdminRoute, Auth, Authenticated } from 'src/middleware/auth.guard';
|
import { AdminRoute, Auth, Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { AuditService } from 'src/services/audit.service';
|
||||||
|
|
||||||
@ApiTags('Audit')
|
@ApiTags('Audit')
|
||||||
@Controller('audit')
|
@Controller('audit')
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Req,
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { Request, Response } from 'express';
|
import { Request, Response } from 'express';
|
||||||
import { IMMICH_ACCESS_COOKIE, IMMICH_AUTH_TYPE_COOKIE, IMMICH_IS_AUTHENTICATED } from 'src/domain/auth/auth.constant';
|
import { IMMICH_ACCESS_COOKIE, IMMICH_AUTH_TYPE_COOKIE, IMMICH_IS_AUTHENTICATED } from 'src/domain/auth/auth.constant';
|
||||||
import { AuthService, LoginDetails } from 'src/domain/auth/auth.service';
|
|
||||||
import {
|
import {
|
||||||
AuthDeviceResponseDto,
|
AuthDeviceResponseDto,
|
||||||
AuthDto,
|
AuthDto,
|
||||||
|
@ -15,6 +14,7 @@ import {
|
||||||
} from 'src/dtos/auth.dto';
|
} from 'src/dtos/auth.dto';
|
||||||
import { UserResponseDto, mapUser } from 'src/dtos/user.dto';
|
import { UserResponseDto, mapUser } from 'src/dtos/user.dto';
|
||||||
import { Auth, Authenticated, GetLoginDetails, PublicRoute } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated, GetLoginDetails, PublicRoute } from 'src/middleware/auth.guard';
|
||||||
|
import { AuthService, LoginDetails } from 'src/services/auth.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Authentication')
|
@ApiTags('Authentication')
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { Body, Controller, HttpCode, HttpStatus, Next, Param, Post, Res, StreamableFile } from '@nestjs/common';
|
import { Body, Controller, HttpCode, HttpStatus, Next, Param, Post, Res, StreamableFile } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { NextFunction, Response } from 'express';
|
import { NextFunction, Response } from 'express';
|
||||||
import { DownloadService } from 'src/domain/download/download.service';
|
|
||||||
import { AssetIdsDto } from 'src/dtos/asset.dto';
|
import { AssetIdsDto } from 'src/dtos/asset.dto';
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { DownloadInfoDto, DownloadResponseDto } from 'src/dtos/download.dto';
|
import { DownloadInfoDto, DownloadResponseDto } from 'src/dtos/download.dto';
|
||||||
import { asStreamableFile, sendFile } from 'src/immich/app.utils';
|
import { asStreamableFile, sendFile } from 'src/immich/app.utils';
|
||||||
import { Auth, Authenticated, FileResponse, SharedLinkRoute } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated, FileResponse, SharedLinkRoute } from 'src/middleware/auth.guard';
|
||||||
|
import { DownloadService } from 'src/services/download.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Download')
|
@ApiTags('Download')
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Body, Controller, Get, Param, Put, Query } from '@nestjs/common';
|
import { Body, Controller, Get, Param, Put, Query } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { PersonService } from 'src/domain/person/person.service';
|
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { AssetFaceResponseDto, FaceDto, PersonResponseDto } from 'src/dtos/person.dto';
|
import { AssetFaceResponseDto, FaceDto, PersonResponseDto } from 'src/dtos/person.dto';
|
||||||
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { PersonService } from 'src/services/person.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Face')
|
@ApiTags('Face')
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Body, Controller, Get, Param, Put } from '@nestjs/common';
|
import { Body, Controller, Get, Param, Put } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { JobService } from 'src/domain/job/job.service';
|
|
||||||
import { AllJobStatusResponseDto, JobCommandDto, JobIdParamDto, JobStatusDto } from 'src/dtos/job.dto';
|
import { AllJobStatusResponseDto, JobCommandDto, JobIdParamDto, JobStatusDto } from 'src/dtos/job.dto';
|
||||||
import { Authenticated } from 'src/middleware/auth.guard';
|
import { Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { JobService } from 'src/services/job.service';
|
||||||
|
|
||||||
@ApiTags('Job')
|
@ApiTags('Job')
|
||||||
@Controller('jobs')
|
@Controller('jobs')
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { LibraryService } from 'src/domain/library/library.service';
|
|
||||||
import {
|
import {
|
||||||
CreateLibraryDto,
|
CreateLibraryDto,
|
||||||
LibraryResponseDto,
|
LibraryResponseDto,
|
||||||
|
@ -12,6 +11,7 @@ import {
|
||||||
ValidateLibraryResponseDto,
|
ValidateLibraryResponseDto,
|
||||||
} from 'src/dtos/library.dto';
|
} from 'src/dtos/library.dto';
|
||||||
import { AdminRoute, Authenticated } from 'src/middleware/auth.guard';
|
import { AdminRoute, Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { LibraryService } from 'src/services/library.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Library')
|
@ApiTags('Library')
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Body, Controller, Get, HttpStatus, Post, Redirect, Req, Res } from '@nestjs/common';
|
import { Body, Controller, Get, HttpStatus, Post, Redirect, Req, Res } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { Request, Response } from 'express';
|
import { Request, Response } from 'express';
|
||||||
import { AuthService, LoginDetails } from 'src/domain/auth/auth.service';
|
|
||||||
import {
|
import {
|
||||||
AuthDto,
|
AuthDto,
|
||||||
LoginResponseDto,
|
LoginResponseDto,
|
||||||
|
@ -11,6 +10,7 @@ import {
|
||||||
} from 'src/dtos/auth.dto';
|
} from 'src/dtos/auth.dto';
|
||||||
import { UserResponseDto } from 'src/dtos/user.dto';
|
import { UserResponseDto } from 'src/dtos/user.dto';
|
||||||
import { Auth, Authenticated, GetLoginDetails, PublicRoute } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated, GetLoginDetails, PublicRoute } from 'src/middleware/auth.guard';
|
||||||
|
import { AuthService, LoginDetails } from 'src/services/auth.service';
|
||||||
|
|
||||||
@ApiTags('OAuth')
|
@ApiTags('OAuth')
|
||||||
@Controller('oauth')
|
@Controller('oauth')
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Body, Controller, Delete, Get, Param, Post, Put, Query } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, Param, Post, Put, Query } from '@nestjs/common';
|
||||||
import { ApiQuery, ApiTags } from '@nestjs/swagger';
|
import { ApiQuery, ApiTags } from '@nestjs/swagger';
|
||||||
import { PartnerService } from 'src/domain/partner/partner.service';
|
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { PartnerResponseDto, UpdatePartnerDto } from 'src/dtos/partner.dto';
|
import { PartnerResponseDto, UpdatePartnerDto } from 'src/dtos/partner.dto';
|
||||||
import { PartnerDirection } from 'src/interfaces/partner.repository';
|
import { PartnerDirection } from 'src/interfaces/partner.repository';
|
||||||
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { PartnerService } from 'src/services/partner.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Partner')
|
@ApiTags('Partner')
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Body, Controller, Get, Next, Param, Post, Put, Query, Res } from '@nestjs/common';
|
import { Body, Controller, Get, Next, Param, Post, Put, Query, Res } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { NextFunction, Response } from 'express';
|
import { NextFunction, Response } from 'express';
|
||||||
import { PersonService } from 'src/domain/person/person.service';
|
|
||||||
import { BulkIdResponseDto } from 'src/dtos/asset-ids.response.dto';
|
import { BulkIdResponseDto } from 'src/dtos/asset-ids.response.dto';
|
||||||
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
|
@ -18,6 +17,7 @@ import {
|
||||||
} from 'src/dtos/person.dto';
|
} from 'src/dtos/person.dto';
|
||||||
import { sendFile } from 'src/immich/app.utils';
|
import { sendFile } from 'src/immich/app.utils';
|
||||||
import { Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard';
|
||||||
|
import { PersonService } from 'src/services/person.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Person')
|
@ApiTags('Person')
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Body, Controller, Get, HttpCode, HttpStatus, Post, Query } from '@nestjs/common';
|
import { Body, Controller, Get, HttpCode, HttpStatus, Post, Query } from '@nestjs/common';
|
||||||
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||||
import { SearchService } from 'src/domain/search/search.service';
|
|
||||||
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { PersonResponseDto } from 'src/dtos/person.dto';
|
import { PersonResponseDto } from 'src/dtos/person.dto';
|
||||||
|
@ -16,6 +15,7 @@ import {
|
||||||
SmartSearchDto,
|
SmartSearchDto,
|
||||||
} from 'src/dtos/search.dto';
|
} from 'src/dtos/search.dto';
|
||||||
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { SearchService } from 'src/services/search.service';
|
||||||
|
|
||||||
@ApiTags('Search')
|
@ApiTags('Search')
|
||||||
@Controller('search')
|
@Controller('search')
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Controller, Get, HttpCode, HttpStatus, Post } from '@nestjs/common';
|
import { Controller, Get, HttpCode, HttpStatus, Post } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { ServerInfoService } from 'src/domain/server-info/server-info.service';
|
|
||||||
import {
|
import {
|
||||||
ServerConfigDto,
|
ServerConfigDto,
|
||||||
ServerFeaturesDto,
|
ServerFeaturesDto,
|
||||||
|
@ -12,6 +11,7 @@ import {
|
||||||
ServerVersionResponseDto,
|
ServerVersionResponseDto,
|
||||||
} from 'src/dtos/server-info.dto';
|
} from 'src/dtos/server-info.dto';
|
||||||
import { AdminRoute, Authenticated, PublicRoute } from 'src/middleware/auth.guard';
|
import { AdminRoute, Authenticated, PublicRoute } from 'src/middleware/auth.guard';
|
||||||
|
import { ServerInfoService } from 'src/services/server-info.service';
|
||||||
|
|
||||||
@ApiTags('Server Info')
|
@ApiTags('Server Info')
|
||||||
@Controller('server-info')
|
@Controller('server-info')
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { Body, Controller, Delete, Get, Param, Patch, Post, Put, Query, Req, Res
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { Request, Response } from 'express';
|
import { Request, Response } from 'express';
|
||||||
import { IMMICH_SHARED_LINK_ACCESS_COOKIE } from 'src/domain/auth/auth.constant';
|
import { IMMICH_SHARED_LINK_ACCESS_COOKIE } from 'src/domain/auth/auth.constant';
|
||||||
import { SharedLinkService } from 'src/domain/shared-link/shared-link.service';
|
|
||||||
import { AssetIdsResponseDto } from 'src/dtos/asset-ids.response.dto';
|
import { AssetIdsResponseDto } from 'src/dtos/asset-ids.response.dto';
|
||||||
import { AssetIdsDto } from 'src/dtos/asset.dto';
|
import { AssetIdsDto } from 'src/dtos/asset.dto';
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
|
@ -13,6 +12,7 @@ import {
|
||||||
SharedLinkResponseDto,
|
SharedLinkResponseDto,
|
||||||
} from 'src/dtos/shared-link.dto';
|
} from 'src/dtos/shared-link.dto';
|
||||||
import { Auth, Authenticated, SharedLinkRoute } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated, SharedLinkRoute } from 'src/middleware/auth.guard';
|
||||||
|
import { SharedLinkService } from 'src/services/shared-link.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Shared Link')
|
@ApiTags('Shared Link')
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Body, Controller, Get, Put, Query } from '@nestjs/common';
|
import { Body, Controller, Get, Put, Query } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { MapThemeDto } from 'src/domain/system-config/system-config-map-theme.dto';
|
import { MapThemeDto } from 'src/dtos/system-config-map-theme.dto';
|
||||||
import { SystemConfigService } from 'src/domain/system-config/system-config.service';
|
|
||||||
import { SystemConfigTemplateStorageOptionDto } from 'src/dtos/system-config-storage-template.dto';
|
import { SystemConfigTemplateStorageOptionDto } from 'src/dtos/system-config-storage-template.dto';
|
||||||
import { SystemConfigDto } from 'src/dtos/system-config.dto';
|
import { SystemConfigDto } from 'src/dtos/system-config.dto';
|
||||||
import { AdminRoute, Authenticated } from 'src/middleware/auth.guard';
|
import { AdminRoute, Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { SystemConfigService } from 'src/services/system-config.service';
|
||||||
|
|
||||||
@ApiTags('System Config')
|
@ApiTags('System Config')
|
||||||
@Controller('system-config')
|
@Controller('system-config')
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { Body, Controller, Delete, Get, Param, Patch, Post, Put } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, Param, Patch, Post, Put } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { TagService } from 'src/domain/tag/tag.service';
|
|
||||||
import { AssetIdsResponseDto } from 'src/dtos/asset-ids.response.dto';
|
import { AssetIdsResponseDto } from 'src/dtos/asset-ids.response.dto';
|
||||||
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
||||||
import { AssetIdsDto } from 'src/dtos/asset.dto';
|
import { AssetIdsDto } from 'src/dtos/asset.dto';
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { CreateTagDto, TagResponseDto, UpdateTagDto } from 'src/dtos/tag.dto';
|
import { CreateTagDto, TagResponseDto, UpdateTagDto } from 'src/dtos/tag.dto';
|
||||||
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { TagService } from 'src/services/tag.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('Tag')
|
@ApiTags('Tag')
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common';
|
import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { TrashService } from 'src/domain/trash/trash.service';
|
|
||||||
import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto';
|
import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto';
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
||||||
|
import { TrashService } from 'src/services/trash.service';
|
||||||
|
|
||||||
@ApiTags('Trash')
|
@ApiTags('Trash')
|
||||||
@Controller('trash')
|
@Controller('trash')
|
||||||
|
|
|
@ -16,13 +16,13 @@ import {
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger';
|
import { ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger';
|
||||||
import { NextFunction, Response } from 'express';
|
import { NextFunction, Response } from 'express';
|
||||||
import { UserService } from 'src/domain/user/user.service';
|
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { CreateProfileImageDto, CreateProfileImageResponseDto } from 'src/dtos/user-profile.dto';
|
import { CreateProfileImageDto, CreateProfileImageResponseDto } from 'src/dtos/user-profile.dto';
|
||||||
import { CreateUserDto, DeleteUserDto, UpdateUserDto, UserResponseDto } from 'src/dtos/user.dto';
|
import { CreateUserDto, DeleteUserDto, UpdateUserDto, UserResponseDto } from 'src/dtos/user.dto';
|
||||||
import { sendFile } from 'src/immich/app.utils';
|
import { sendFile } from 'src/immich/app.utils';
|
||||||
import { AdminRoute, Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard';
|
import { AdminRoute, Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard';
|
||||||
import { FileUploadInterceptor, Route } from 'src/middleware/file-upload.interceptor';
|
import { FileUploadInterceptor, Route } from 'src/middleware/file-upload.interceptor';
|
||||||
|
import { UserService } from 'src/services/user.service';
|
||||||
import { UUIDParamDto } from 'src/validation';
|
import { UUIDParamDto } from 'src/validation';
|
||||||
|
|
||||||
@ApiTags('User')
|
@ApiTags('User')
|
||||||
|
|
|
@ -6,7 +6,6 @@ import {
|
||||||
NotFoundException,
|
NotFoundException,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { AccessCore, Permission } from 'src/cores/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
import { UploadFile } from 'src/domain/asset/asset.service';
|
|
||||||
import { mimeTypes } from 'src/domain/domain.constant';
|
import { mimeTypes } from 'src/domain/domain.constant';
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { AssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto';
|
import { AssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto';
|
||||||
|
@ -36,6 +35,7 @@ import { IJobRepository } from 'src/interfaces/job.repository';
|
||||||
import { ILibraryRepository } from 'src/interfaces/library.repository';
|
import { ILibraryRepository } from 'src/interfaces/library.repository';
|
||||||
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
import { IUserRepository } from 'src/interfaces/user.repository';
|
import { IUserRepository } from 'src/interfaces/user.repository';
|
||||||
|
import { UploadFile } from 'src/services/asset.service';
|
||||||
import { CacheControl, ImmichFileResponse, getLivePhotoMotionFilename } from 'src/utils';
|
import { CacheControl, ImmichFileResponse, getLivePhotoMotionFilename } from 'src/utils';
|
||||||
import { QueryFailedError } from 'typeorm';
|
import { QueryFailedError } from 'typeorm';
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ import { Reflector } from '@nestjs/core';
|
||||||
import { ApiBearerAuth, ApiCookieAuth, ApiOkResponse, ApiQuery, ApiSecurity } from '@nestjs/swagger';
|
import { ApiBearerAuth, ApiCookieAuth, ApiOkResponse, ApiQuery, ApiSecurity } from '@nestjs/swagger';
|
||||||
import { Request } from 'express';
|
import { Request } from 'express';
|
||||||
import { IMMICH_API_KEY_NAME } from 'src/domain/auth/auth.constant';
|
import { IMMICH_API_KEY_NAME } from 'src/domain/auth/auth.constant';
|
||||||
import { AuthService, LoginDetails } from 'src/domain/auth/auth.service';
|
|
||||||
import { AuthDto } from 'src/dtos/auth.dto';
|
import { AuthDto } from 'src/dtos/auth.dto';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
import { AuthService, LoginDetails } from 'src/services/auth.service';
|
||||||
import { UAParser } from 'ua-parser-js';
|
import { UAParser } from 'ua-parser-js';
|
||||||
|
|
||||||
export enum Metadata {
|
export enum Metadata {
|
||||||
|
|
|
@ -6,10 +6,10 @@ import { NextFunction, RequestHandler } from 'express';
|
||||||
import multer, { StorageEngine, diskStorage } from 'multer';
|
import multer, { StorageEngine, diskStorage } from 'multer';
|
||||||
import { createHash, randomUUID } from 'node:crypto';
|
import { createHash, randomUUID } from 'node:crypto';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { AssetService, UploadFile } from 'src/domain/asset/asset.service';
|
|
||||||
import { UploadFieldName } from 'src/dtos/asset.dto';
|
import { UploadFieldName } from 'src/dtos/asset.dto';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
import { AuthRequest } from 'src/middleware/auth.guard';
|
import { AuthRequest } from 'src/middleware/auth.guard';
|
||||||
|
import { AssetService, UploadFile } from 'src/services/asset.service';
|
||||||
|
|
||||||
export enum Route {
|
export enum Route {
|
||||||
ASSET = 'asset',
|
ASSET = 'asset',
|
||||||
|
|
|
@ -7,7 +7,6 @@ import {
|
||||||
WebSocketServer,
|
WebSocketServer,
|
||||||
} from '@nestjs/websockets';
|
} from '@nestjs/websockets';
|
||||||
import { Server, Socket } from 'socket.io';
|
import { Server, Socket } from 'socket.io';
|
||||||
import { AuthService } from 'src/domain/auth/auth.service';
|
|
||||||
import { Instrumentation } from 'src/infra/instrumentation';
|
import { Instrumentation } from 'src/infra/instrumentation';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
import {
|
import {
|
||||||
|
@ -18,6 +17,7 @@ import {
|
||||||
OnServerEventCallback,
|
OnServerEventCallback,
|
||||||
ServerEvent,
|
ServerEvent,
|
||||||
} from 'src/interfaces/communication.repository';
|
} from 'src/interfaces/communication.repository';
|
||||||
|
import { AuthService } from 'src/services/auth.service';
|
||||||
|
|
||||||
@Instrumentation()
|
@Instrumentation()
|
||||||
@WebSocketGateway({
|
@WebSocketGateway({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
import { ActivityService } from 'src/domain/activity/activity.service';
|
|
||||||
import { ReactionType } from 'src/dtos/activity.dto';
|
import { ReactionType } from 'src/dtos/activity.dto';
|
||||||
import { IActivityRepository } from 'src/interfaces/activity.repository';
|
import { IActivityRepository } from 'src/interfaces/activity.repository';
|
||||||
|
import { ActivityService } from 'src/services/activity.service';
|
||||||
import { activityStub } from 'test/fixtures/activity.stub';
|
import { activityStub } from 'test/fixtures/activity.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { IAccessRepositoryMock, newAccessRepositoryMock } from 'test/repositories/access.repository.mock';
|
import { IAccessRepositoryMock, newAccessRepositoryMock } from 'test/repositories/access.repository.mock';
|
|
@ -1,10 +1,10 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { AlbumService } from 'src/domain/album/album.service';
|
|
||||||
import { BulkIdErrorReason } from 'src/dtos/asset-ids.response.dto';
|
import { BulkIdErrorReason } from 'src/dtos/asset-ids.response.dto';
|
||||||
import { IAlbumRepository } from 'src/interfaces/album.repository';
|
import { IAlbumRepository } from 'src/interfaces/album.repository';
|
||||||
import { IAssetRepository } from 'src/interfaces/asset.repository';
|
import { IAssetRepository } from 'src/interfaces/asset.repository';
|
||||||
import { IUserRepository } from 'src/interfaces/user.repository';
|
import { IUserRepository } from 'src/interfaces/user.repository';
|
||||||
|
import { AlbumService } from 'src/services/album.service';
|
||||||
import { albumStub } from 'test/fixtures/album.stub';
|
import { albumStub } from 'test/fixtures/album.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { userStub } from 'test/fixtures/user.stub';
|
import { userStub } from 'test/fixtures/user.stub';
|
|
@ -1,7 +1,7 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
import { APIKeyService } from 'src/domain/api-key/api-key.service';
|
|
||||||
import { IKeyRepository } from 'src/interfaces/api-key.repository';
|
import { IKeyRepository } from 'src/interfaces/api-key.repository';
|
||||||
import { ICryptoRepository } from 'src/interfaces/crypto.repository';
|
import { ICryptoRepository } from 'src/interfaces/crypto.repository';
|
||||||
|
import { APIKeyService } from 'src/services/api-key.service';
|
||||||
import { keyStub } from 'test/fixtures/api-key.stub';
|
import { keyStub } from 'test/fixtures/api-key.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { newKeyRepositoryMock } from 'test/repositories/api-key.repository.mock';
|
import { newKeyRepositoryMock } from 'test/repositories/api-key.repository.mock';
|
|
@ -1,6 +1,5 @@
|
||||||
import { BadRequestException, UnauthorizedException } from '@nestjs/common';
|
import { BadRequestException, UnauthorizedException } from '@nestjs/common';
|
||||||
import { when } from 'jest-when';
|
import { when } from 'jest-when';
|
||||||
import { AssetService } from 'src/domain/asset/asset.service';
|
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { mapAsset } from 'src/dtos/asset-response.dto';
|
import { mapAsset } from 'src/dtos/asset-response.dto';
|
||||||
import { AssetJobName, AssetStatsResponseDto, UploadFieldName } from 'src/dtos/asset.dto';
|
import { AssetJobName, AssetStatsResponseDto, UploadFieldName } from 'src/dtos/asset.dto';
|
||||||
|
@ -13,6 +12,7 @@ import { IPartnerRepository } from 'src/interfaces/partner.repository';
|
||||||
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
import { IUserRepository } from 'src/interfaces/user.repository';
|
import { IUserRepository } from 'src/interfaces/user.repository';
|
||||||
|
import { AssetService } from 'src/services/asset.service';
|
||||||
import { assetStackStub, assetStub } from 'test/fixtures/asset.stub';
|
import { assetStackStub, assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { faceStub } from 'test/fixtures/face.stub';
|
import { faceStub } from 'test/fixtures/face.stub';
|
|
@ -1,4 +1,3 @@
|
||||||
import { AuditService } from 'src/domain/audit/audit.service';
|
|
||||||
import { DatabaseAction, EntityType } from 'src/entities/audit.entity';
|
import { DatabaseAction, EntityType } from 'src/entities/audit.entity';
|
||||||
import { IAssetRepository } from 'src/interfaces/asset.repository';
|
import { IAssetRepository } from 'src/interfaces/asset.repository';
|
||||||
import { IAuditRepository } from 'src/interfaces/audit.repository';
|
import { IAuditRepository } from 'src/interfaces/audit.repository';
|
||||||
|
@ -7,6 +6,7 @@ import { JobStatus } from 'src/interfaces/job.repository';
|
||||||
import { IPersonRepository } from 'src/interfaces/person.repository';
|
import { IPersonRepository } from 'src/interfaces/person.repository';
|
||||||
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
import { IUserRepository } from 'src/interfaces/user.repository';
|
import { IUserRepository } from 'src/interfaces/user.repository';
|
||||||
|
import { AuditService } from 'src/services/audit.service';
|
||||||
import { auditStub } from 'test/fixtures/audit.stub';
|
import { auditStub } from 'test/fixtures/audit.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { IAccessRepositoryMock, newAccessRepositoryMock } from 'test/repositories/access.repository.mock';
|
import { IAccessRepositoryMock, newAccessRepositoryMock } from 'test/repositories/access.repository.mock';
|
|
@ -3,7 +3,6 @@ import { IncomingHttpHeaders } from 'node:http';
|
||||||
import { Issuer, generators } from 'openid-client';
|
import { Issuer, generators } from 'openid-client';
|
||||||
import { Socket } from 'socket.io';
|
import { Socket } from 'socket.io';
|
||||||
import { AuthType } from 'src/domain/auth/auth.constant';
|
import { AuthType } from 'src/domain/auth/auth.constant';
|
||||||
import { AuthService } from 'src/domain/auth/auth.service';
|
|
||||||
import { AuthDto, SignUpDto } from 'src/dtos/auth.dto';
|
import { AuthDto, SignUpDto } from 'src/dtos/auth.dto';
|
||||||
import { UserEntity } from 'src/entities/user.entity';
|
import { UserEntity } from 'src/entities/user.entity';
|
||||||
import { IKeyRepository } from 'src/interfaces/api-key.repository';
|
import { IKeyRepository } from 'src/interfaces/api-key.repository';
|
||||||
|
@ -13,6 +12,7 @@ import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
import { IUserTokenRepository } from 'src/interfaces/user-token.repository';
|
import { IUserTokenRepository } from 'src/interfaces/user-token.repository';
|
||||||
import { IUserRepository } from 'src/interfaces/user.repository';
|
import { IUserRepository } from 'src/interfaces/user.repository';
|
||||||
|
import { AuthService } from 'src/services/auth.service';
|
||||||
import { keyStub } from 'test/fixtures/api-key.stub';
|
import { keyStub } from 'test/fixtures/api-key.stub';
|
||||||
import { authStub, loginResponseStub } from 'test/fixtures/auth.stub';
|
import { authStub, loginResponseStub } from 'test/fixtures/auth.stub';
|
||||||
import { sharedLinkStub } from 'test/fixtures/shared-link.stub';
|
import { sharedLinkStub } from 'test/fixtures/shared-link.stub';
|
|
@ -1,7 +1,7 @@
|
||||||
import { DatabaseService } from 'src/domain/database/database.service';
|
|
||||||
import { Version, VersionType } from 'src/domain/domain.constant';
|
import { Version, VersionType } from 'src/domain/domain.constant';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
import { DatabaseExtension, IDatabaseRepository, VectorIndex } from 'src/interfaces/database.repository';
|
import { DatabaseExtension, IDatabaseRepository, VectorIndex } from 'src/interfaces/database.repository';
|
||||||
|
import { DatabaseService } from 'src/services/database.service';
|
||||||
import { newDatabaseRepositoryMock } from 'test/repositories/database.repository.mock';
|
import { newDatabaseRepositoryMock } from 'test/repositories/database.repository.mock';
|
||||||
|
|
||||||
describe(DatabaseService.name, () => {
|
describe(DatabaseService.name, () => {
|
|
@ -1,9 +1,9 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
import { when } from 'jest-when';
|
import { when } from 'jest-when';
|
||||||
import { DownloadService } from 'src/domain/download/download.service';
|
|
||||||
import { DownloadResponseDto } from 'src/dtos/download.dto';
|
import { DownloadResponseDto } from 'src/dtos/download.dto';
|
||||||
import { IAssetRepository } from 'src/interfaces/asset.repository';
|
import { IAssetRepository } from 'src/interfaces/asset.repository';
|
||||||
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
|
import { DownloadService } from 'src/services/download.service';
|
||||||
import { CacheControl, ImmichFileResponse } from 'src/utils';
|
import { CacheControl, ImmichFileResponse } from 'src/utils';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
|
@ -1,13 +1,13 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core';
|
import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { JobCommand, JobName, QueueName } from 'src/domain/job/job.constants';
|
import { JobCommand, JobName, QueueName } from 'src/domain/job/job.constants';
|
||||||
import { JobService } from 'src/domain/job/job.service';
|
|
||||||
import { SystemConfig, SystemConfigKey } from 'src/entities/system-config.entity';
|
import { SystemConfig, SystemConfigKey } from 'src/entities/system-config.entity';
|
||||||
import { IAssetRepository } from 'src/interfaces/asset.repository';
|
import { IAssetRepository } from 'src/interfaces/asset.repository';
|
||||||
import { ICommunicationRepository } from 'src/interfaces/communication.repository';
|
import { ICommunicationRepository } from 'src/interfaces/communication.repository';
|
||||||
import { IJobRepository, JobHandler, JobItem, JobStatus } from 'src/interfaces/job.repository';
|
import { IJobRepository, JobHandler, JobItem, JobStatus } from 'src/interfaces/job.repository';
|
||||||
import { IPersonRepository } from 'src/interfaces/person.repository';
|
import { IPersonRepository } from 'src/interfaces/person.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
|
import { JobService } from 'src/services/job.service';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { newAssetRepositoryMock } from 'test/repositories/asset.repository.mock';
|
import { newAssetRepositoryMock } from 'test/repositories/asset.repository.mock';
|
||||||
import { newCommunicationRepositoryMock } from 'test/repositories/communication.repository.mock';
|
import { newCommunicationRepositoryMock } from 'test/repositories/communication.repository.mock';
|
|
@ -5,7 +5,6 @@ import { Stats } from 'node:fs';
|
||||||
import { SystemConfigCore } from 'src/cores/system-config.core';
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { ILibraryFileJob, ILibraryRefreshJob } from 'src/domain/job/job.interface';
|
import { ILibraryFileJob, ILibraryRefreshJob } from 'src/domain/job/job.interface';
|
||||||
import { LibraryService } from 'src/domain/library/library.service';
|
|
||||||
import { mapLibrary } from 'src/dtos/library.dto';
|
import { mapLibrary } from 'src/dtos/library.dto';
|
||||||
import { AssetType } from 'src/entities/asset.entity';
|
import { AssetType } from 'src/entities/asset.entity';
|
||||||
import { LibraryType } from 'src/entities/library.entity';
|
import { LibraryType } from 'src/entities/library.entity';
|
||||||
|
@ -18,6 +17,7 @@ import { IJobRepository, JobStatus } from 'src/interfaces/job.repository';
|
||||||
import { ILibraryRepository } from 'src/interfaces/library.repository';
|
import { ILibraryRepository } from 'src/interfaces/library.repository';
|
||||||
import { IStorageRepository, StorageEventType } from 'src/interfaces/storage.repository';
|
import { IStorageRepository, StorageEventType } from 'src/interfaces/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
|
import { LibraryService } from 'src/services/library.service';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { libraryStub } from 'test/fixtures/library.stub';
|
import { libraryStub } from 'test/fixtures/library.stub';
|
|
@ -1,6 +1,5 @@
|
||||||
import { Stats } from 'node:fs';
|
import { Stats } from 'node:fs';
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { MediaService } from 'src/domain/media/media.service';
|
|
||||||
import { AssetType } from 'src/entities/asset.entity';
|
import { AssetType } from 'src/entities/asset.entity';
|
||||||
import { ExifEntity } from 'src/entities/exif.entity';
|
import { ExifEntity } from 'src/entities/exif.entity';
|
||||||
import {
|
import {
|
||||||
|
@ -20,6 +19,7 @@ import { IMoveRepository } from 'src/interfaces/move.repository';
|
||||||
import { IPersonRepository } from 'src/interfaces/person.repository';
|
import { IPersonRepository } from 'src/interfaces/person.repository';
|
||||||
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
|
import { MediaService } from 'src/services/media.service';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { faceStub } from 'test/fixtures/face.stub';
|
import { faceStub } from 'test/fixtures/face.stub';
|
||||||
import { probeStub } from 'test/fixtures/media.stub';
|
import { probeStub } from 'test/fixtures/media.stub';
|
|
@ -4,7 +4,6 @@ import { randomBytes } from 'node:crypto';
|
||||||
import { Stats } from 'node:fs';
|
import { Stats } from 'node:fs';
|
||||||
import { constants } from 'node:fs/promises';
|
import { constants } from 'node:fs/promises';
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { MetadataService, Orientation } from 'src/domain/metadata/metadata.service';
|
|
||||||
import { AssetType } from 'src/entities/asset.entity';
|
import { AssetType } from 'src/entities/asset.entity';
|
||||||
import { ExifEntity } from 'src/entities/exif.entity';
|
import { ExifEntity } from 'src/entities/exif.entity';
|
||||||
import { SystemConfigKey } from 'src/entities/system-config.entity';
|
import { SystemConfigKey } from 'src/entities/system-config.entity';
|
||||||
|
@ -20,6 +19,7 @@ import { IMoveRepository } from 'src/interfaces/move.repository';
|
||||||
import { IPersonRepository } from 'src/interfaces/person.repository';
|
import { IPersonRepository } from 'src/interfaces/person.repository';
|
||||||
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
|
import { MetadataService, Orientation } from 'src/services/metadata.service';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { fileStub } from 'test/fixtures/file.stub';
|
import { fileStub } from 'test/fixtures/file.stub';
|
||||||
import { probeStub } from 'test/fixtures/media.stub';
|
import { probeStub } from 'test/fixtures/media.stub';
|
|
@ -1,9 +1,9 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
import { PartnerService } from 'src/domain/partner/partner.service';
|
|
||||||
import { PartnerResponseDto } from 'src/dtos/partner.dto';
|
import { PartnerResponseDto } from 'src/dtos/partner.dto';
|
||||||
import { UserAvatarColor } from 'src/entities/user.entity';
|
import { UserAvatarColor } from 'src/entities/user.entity';
|
||||||
import { IAccessRepository } from 'src/interfaces/access.repository';
|
import { IAccessRepository } from 'src/interfaces/access.repository';
|
||||||
import { IPartnerRepository, PartnerDirection } from 'src/interfaces/partner.repository';
|
import { IPartnerRepository, PartnerDirection } from 'src/interfaces/partner.repository';
|
||||||
|
import { PartnerService } from 'src/services/partner.service';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { partnerStub } from 'test/fixtures/partner.stub';
|
import { partnerStub } from 'test/fixtures/partner.stub';
|
||||||
import { newPartnerRepositoryMock } from 'test/repositories/partner.repository.mock';
|
import { newPartnerRepositoryMock } from 'test/repositories/partner.repository.mock';
|
|
@ -1,6 +1,5 @@
|
||||||
import { BadRequestException, NotFoundException } from '@nestjs/common';
|
import { BadRequestException, NotFoundException } from '@nestjs/common';
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { PersonService } from 'src/domain/person/person.service';
|
|
||||||
import { BulkIdErrorReason } from 'src/dtos/asset-ids.response.dto';
|
import { BulkIdErrorReason } from 'src/dtos/asset-ids.response.dto';
|
||||||
import { PersonResponseDto, mapFaces, mapPerson } from 'src/dtos/person.dto';
|
import { PersonResponseDto, mapFaces, mapPerson } from 'src/dtos/person.dto';
|
||||||
import { AssetFaceEntity } from 'src/entities/asset-face.entity';
|
import { AssetFaceEntity } from 'src/entities/asset-face.entity';
|
||||||
|
@ -15,6 +14,7 @@ import { IPersonRepository } from 'src/interfaces/person.repository';
|
||||||
import { FaceSearchResult, ISearchRepository } from 'src/interfaces/search.repository';
|
import { FaceSearchResult, ISearchRepository } from 'src/interfaces/search.repository';
|
||||||
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
|
import { PersonService } from 'src/services/person.service';
|
||||||
import { CacheControl, ImmichFileResponse } from 'src/utils';
|
import { CacheControl, ImmichFileResponse } from 'src/utils';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
|
@ -1,4 +1,3 @@
|
||||||
import { SearchService } from 'src/domain/search/search.service';
|
|
||||||
import { mapAsset } from 'src/dtos/asset-response.dto';
|
import { mapAsset } from 'src/dtos/asset-response.dto';
|
||||||
import { SearchDto } from 'src/dtos/search.dto';
|
import { SearchDto } from 'src/dtos/search.dto';
|
||||||
import { SystemConfigKey } from 'src/entities/system-config.entity';
|
import { SystemConfigKey } from 'src/entities/system-config.entity';
|
||||||
|
@ -9,6 +8,7 @@ import { IPartnerRepository } from 'src/interfaces/partner.repository';
|
||||||
import { IPersonRepository } from 'src/interfaces/person.repository';
|
import { IPersonRepository } from 'src/interfaces/person.repository';
|
||||||
import { ISearchRepository } from 'src/interfaces/search.repository';
|
import { ISearchRepository } from 'src/interfaces/search.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
|
import { SearchService } from 'src/services/search.service';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { personStub } from 'test/fixtures/person.stub';
|
import { personStub } from 'test/fixtures/person.stub';
|
|
@ -1,5 +1,4 @@
|
||||||
import { serverVersion } from 'src/domain/domain.constant';
|
import { serverVersion } from 'src/domain/domain.constant';
|
||||||
import { ServerInfoService } from 'src/domain/server-info/server-info.service';
|
|
||||||
import { SystemMetadataKey } from 'src/entities/system-metadata.entity';
|
import { SystemMetadataKey } from 'src/entities/system-metadata.entity';
|
||||||
import { ICommunicationRepository } from 'src/interfaces/communication.repository';
|
import { ICommunicationRepository } from 'src/interfaces/communication.repository';
|
||||||
import { IServerInfoRepository } from 'src/interfaces/server-info.repository';
|
import { IServerInfoRepository } from 'src/interfaces/server-info.repository';
|
||||||
|
@ -7,6 +6,7 @@ import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.repository';
|
import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.repository';
|
||||||
import { IUserRepository } from 'src/interfaces/user.repository';
|
import { IUserRepository } from 'src/interfaces/user.repository';
|
||||||
|
import { ServerInfoService } from 'src/services/server-info.service';
|
||||||
import { newCommunicationRepositoryMock } from 'test/repositories/communication.repository.mock';
|
import { newCommunicationRepositoryMock } from 'test/repositories/communication.repository.mock';
|
||||||
import { newStorageRepositoryMock } from 'test/repositories/storage.repository.mock';
|
import { newStorageRepositoryMock } from 'test/repositories/storage.repository.mock';
|
||||||
import { newSystemConfigRepositoryMock } from 'test/repositories/system-config.repository.mock';
|
import { newSystemConfigRepositoryMock } from 'test/repositories/system-config.repository.mock';
|
|
@ -1,10 +1,10 @@
|
||||||
import { BadRequestException, ForbiddenException, UnauthorizedException } from '@nestjs/common';
|
import { BadRequestException, ForbiddenException, UnauthorizedException } from '@nestjs/common';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { SharedLinkService } from 'src/domain/shared-link/shared-link.service';
|
|
||||||
import { AssetIdErrorReason } from 'src/dtos/asset-ids.response.dto';
|
import { AssetIdErrorReason } from 'src/dtos/asset-ids.response.dto';
|
||||||
import { SharedLinkType } from 'src/entities/shared-link.entity';
|
import { SharedLinkType } from 'src/entities/shared-link.entity';
|
||||||
import { ICryptoRepository } from 'src/interfaces/crypto.repository';
|
import { ICryptoRepository } from 'src/interfaces/crypto.repository';
|
||||||
import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository';
|
import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository';
|
||||||
|
import { SharedLinkService } from 'src/services/shared-link.service';
|
||||||
import { albumStub } from 'test/fixtures/album.stub';
|
import { albumStub } from 'test/fixtures/album.stub';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
|
@ -1,6 +1,5 @@
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { cleanModelName, getCLIPModelInfo } from 'src/domain/smart-info/smart-info.constant';
|
import { cleanModelName, getCLIPModelInfo } from 'src/domain/smart-info/smart-info.constant';
|
||||||
import { SmartInfoService } from 'src/domain/smart-info/smart-info.service';
|
|
||||||
import { AssetEntity } from 'src/entities/asset.entity';
|
import { AssetEntity } from 'src/entities/asset.entity';
|
||||||
import { SystemConfigKey } from 'src/entities/system-config.entity';
|
import { SystemConfigKey } from 'src/entities/system-config.entity';
|
||||||
import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository';
|
import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository';
|
||||||
|
@ -9,6 +8,7 @@ import { IJobRepository } from 'src/interfaces/job.repository';
|
||||||
import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository';
|
import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository';
|
||||||
import { ISearchRepository } from 'src/interfaces/search.repository';
|
import { ISearchRepository } from 'src/interfaces/search.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
|
import { SmartInfoService } from 'src/services/smart-info.service';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { newAssetRepositoryMock } from 'test/repositories/asset.repository.mock';
|
import { newAssetRepositoryMock } from 'test/repositories/asset.repository.mock';
|
||||||
import { newDatabaseRepositoryMock } from 'test/repositories/database.repository.mock';
|
import { newDatabaseRepositoryMock } from 'test/repositories/database.repository.mock';
|
|
@ -1,7 +1,6 @@
|
||||||
import { when } from 'jest-when';
|
import { when } from 'jest-when';
|
||||||
import { Stats } from 'node:fs';
|
import { Stats } from 'node:fs';
|
||||||
import { SystemConfigCore, defaults } from 'src/cores/system-config.core';
|
import { SystemConfigCore, defaults } from 'src/cores/system-config.core';
|
||||||
import { StorageTemplateService } from 'src/domain/storage-template/storage-template.service';
|
|
||||||
import { AssetPathType } from 'src/entities/move.entity';
|
import { AssetPathType } from 'src/entities/move.entity';
|
||||||
import { SystemConfig, SystemConfigKey } from 'src/entities/system-config.entity';
|
import { SystemConfig, SystemConfigKey } from 'src/entities/system-config.entity';
|
||||||
import { IAlbumRepository } from 'src/interfaces/album.repository';
|
import { IAlbumRepository } from 'src/interfaces/album.repository';
|
||||||
|
@ -14,6 +13,7 @@ import { IPersonRepository } from 'src/interfaces/person.repository';
|
||||||
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
import { IUserRepository } from 'src/interfaces/user.repository';
|
import { IUserRepository } from 'src/interfaces/user.repository';
|
||||||
|
import { StorageTemplateService } from 'src/services/storage-template.service';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { userStub } from 'test/fixtures/user.stub';
|
import { userStub } from 'test/fixtures/user.stub';
|
||||||
import { newAlbumRepositoryMock } from 'test/repositories/album.repository.mock';
|
import { newAlbumRepositoryMock } from 'test/repositories/album.repository.mock';
|
|
@ -1,5 +1,5 @@
|
||||||
import { StorageService } from 'src/domain/storage/storage.service';
|
|
||||||
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
|
import { StorageService } from 'src/services/storage.service';
|
||||||
import { newStorageRepositoryMock } from 'test/repositories/storage.repository.mock';
|
import { newStorageRepositoryMock } from 'test/repositories/storage.repository.mock';
|
||||||
|
|
||||||
describe(StorageService.name, () => {
|
describe(StorageService.name, () => {
|
|
@ -1,7 +1,6 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
import { defaults } from 'src/cores/system-config.core';
|
import { defaults } from 'src/cores/system-config.core';
|
||||||
import { QueueName } from 'src/domain/job/job.constants';
|
import { QueueName } from 'src/domain/job/job.constants';
|
||||||
import { SystemConfigService } from 'src/domain/system-config/system-config.service';
|
|
||||||
import {
|
import {
|
||||||
AudioCodec,
|
AudioCodec,
|
||||||
CQMode,
|
CQMode,
|
||||||
|
@ -19,6 +18,7 @@ import { ImmichLogger } from 'src/infra/logger';
|
||||||
import { ICommunicationRepository, ServerEvent } from 'src/interfaces/communication.repository';
|
import { ICommunicationRepository, ServerEvent } from 'src/interfaces/communication.repository';
|
||||||
import { ISearchRepository } from 'src/interfaces/search.repository';
|
import { ISearchRepository } from 'src/interfaces/search.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
|
import { SystemConfigService } from 'src/services/system-config.service';
|
||||||
import { newCommunicationRepositoryMock } from 'test/repositories/communication.repository.mock';
|
import { newCommunicationRepositoryMock } from 'test/repositories/communication.repository.mock';
|
||||||
import { newSystemConfigRepositoryMock } from 'test/repositories/system-config.repository.mock';
|
import { newSystemConfigRepositoryMock } from 'test/repositories/system-config.repository.mock';
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
import { when } from 'jest-when';
|
import { when } from 'jest-when';
|
||||||
import { TagService } from 'src/domain/tag/tag.service';
|
|
||||||
import { AssetIdErrorReason } from 'src/dtos/asset-ids.response.dto';
|
import { AssetIdErrorReason } from 'src/dtos/asset-ids.response.dto';
|
||||||
import { TagType } from 'src/entities/tag.entity';
|
import { TagType } from 'src/entities/tag.entity';
|
||||||
import { ITagRepository } from 'src/interfaces/tag.repository';
|
import { ITagRepository } from 'src/interfaces/tag.repository';
|
||||||
|
import { TagService } from 'src/services/tag.service';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { tagResponseStub, tagStub } from 'test/fixtures/tag.stub';
|
import { tagResponseStub, tagStub } from 'test/fixtures/tag.stub';
|
|
@ -1,9 +1,9 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { TrashService } from 'src/domain/trash/trash.service';
|
|
||||||
import { IAssetRepository } from 'src/interfaces/asset.repository';
|
import { IAssetRepository } from 'src/interfaces/asset.repository';
|
||||||
import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository';
|
import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository';
|
||||||
import { IJobRepository } from 'src/interfaces/job.repository';
|
import { IJobRepository } from 'src/interfaces/job.repository';
|
||||||
|
import { TrashService } from 'src/services/trash.service';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { IAccessRepositoryMock, newAccessRepositoryMock } from 'test/repositories/access.repository.mock';
|
import { IAccessRepositoryMock, newAccessRepositoryMock } from 'test/repositories/access.repository.mock';
|
|
@ -6,7 +6,6 @@ import {
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { when } from 'jest-when';
|
import { when } from 'jest-when';
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { UserService } from 'src/domain/user/user.service';
|
|
||||||
import { UpdateUserDto, mapUser } from 'src/dtos/user.dto';
|
import { UpdateUserDto, mapUser } from 'src/dtos/user.dto';
|
||||||
import { UserEntity, UserStatus } from 'src/entities/user.entity';
|
import { UserEntity, UserStatus } from 'src/entities/user.entity';
|
||||||
import { IAlbumRepository } from 'src/interfaces/album.repository';
|
import { IAlbumRepository } from 'src/interfaces/album.repository';
|
||||||
|
@ -16,6 +15,7 @@ import { ILibraryRepository } from 'src/interfaces/library.repository';
|
||||||
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
import { IStorageRepository } from 'src/interfaces/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
import { ISystemConfigRepository } from 'src/interfaces/system-config.repository';
|
||||||
import { IUserRepository } from 'src/interfaces/user.repository';
|
import { IUserRepository } from 'src/interfaces/user.repository';
|
||||||
|
import { UserService } from 'src/services/user.service';
|
||||||
import { CacheControl, ImmichFileResponse } from 'src/utils';
|
import { CacheControl, ImmichFileResponse } from 'src/utils';
|
||||||
import { authStub } from 'test/fixtures/auth.stub';
|
import { authStub } from 'test/fixtures/auth.stub';
|
||||||
import { systemConfigStub } from 'test/fixtures/system-config.stub';
|
import { systemConfigStub } from 'test/fixtures/system-config.stub';
|
Loading…
Reference in a new issue