mirror of
https://github.com/immich-app/immich.git
synced 2026-02-12 11:58:15 +03:00
Merge branch 'main' into feature/readonly-sharing
# Conflicts: # mobile/openapi/.openapi-generator/FILES # mobile/openapi/README.md # mobile/openapi/lib/api.dart # mobile/openapi/lib/api_client.dart # server/src/services/album.service.spec.ts
This commit is contained in:
@@ -133,6 +133,20 @@ export interface MetadataSearchOptions {
|
||||
numResults: number;
|
||||
}
|
||||
|
||||
export interface AssetFullSyncOptions {
|
||||
ownerId: string;
|
||||
lastCreationDate?: Date;
|
||||
lastId?: string;
|
||||
updatedUntil: Date;
|
||||
limit: number;
|
||||
}
|
||||
|
||||
export interface AssetDeltaSyncOptions {
|
||||
userIds: string[];
|
||||
updatedAfter: Date;
|
||||
limit: number;
|
||||
}
|
||||
|
||||
export type AssetPathEntity = Pick<AssetEntity, 'id' | 'originalPath' | 'isOffline'>;
|
||||
|
||||
export const IAssetRepository = 'IAssetRepository';
|
||||
@@ -155,7 +169,7 @@ export interface IAssetRepository {
|
||||
getRandom(userId: string, count: number): Promise<AssetEntity[]>;
|
||||
getFirstAssetForAlbumId(albumId: string): Promise<AssetEntity | null>;
|
||||
getLastUpdatedAssetForAlbumId(albumId: string): Promise<AssetEntity | null>;
|
||||
getLibraryAssetPaths(pagination: PaginationOptions, libraryId: string): Paginated<AssetPathEntity>;
|
||||
getExternalLibraryAssetPaths(pagination: PaginationOptions, libraryId: string): Paginated<AssetPathEntity>;
|
||||
getByLibraryIdAndOriginalPath(libraryId: string, originalPath: string): Promise<AssetEntity | null>;
|
||||
deleteAll(ownerId: string): Promise<void>;
|
||||
getAll(pagination: PaginationOptions, options?: AssetSearchOptions): Paginated<AssetEntity>;
|
||||
@@ -175,4 +189,6 @@ export interface IAssetRepository {
|
||||
getAssetIdByCity(userId: string, options: AssetExploreFieldOptions): Promise<SearchExploreItem<string>>;
|
||||
getAssetIdByTag(userId: string, options: AssetExploreFieldOptions): Promise<SearchExploreItem<string>>;
|
||||
searchMetadata(query: string, userIds: string[], options: MetadataSearchOptions): Promise<AssetEntity[]>;
|
||||
getAllForUserFullSync(options: AssetFullSyncOptions): Promise<AssetEntity[]>;
|
||||
getChangedDeltaSync(options: AssetDeltaSyncOptions): Promise<AssetEntity[]>;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { AuditEntity, DatabaseAction, EntityType } from 'src/entities/audit.entity';
|
||||
import { DatabaseAction, EntityType } from 'src/entities/audit.entity';
|
||||
|
||||
export const IAuditRepository = 'IAuditRepository';
|
||||
|
||||
export interface AuditSearch {
|
||||
action?: DatabaseAction;
|
||||
entityType?: EntityType;
|
||||
ownerId?: string;
|
||||
userIds: string[];
|
||||
}
|
||||
|
||||
export interface IAuditRepository {
|
||||
getAfter(since: Date, options: AuditSearch): Promise<AuditEntity[]>;
|
||||
getAfter(since: Date, options: AuditSearch): Promise<string[]>;
|
||||
removeBefore(before: Date): Promise<void>;
|
||||
}
|
||||
|
||||
15
server/src/interfaces/logger.interface.ts
Normal file
15
server/src/interfaces/logger.interface.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { LogLevel } from 'src/entities/system-config.entity';
|
||||
|
||||
export const ILoggerRepository = 'ILoggerRepository';
|
||||
|
||||
export interface ILoggerRepository {
|
||||
setContext(message: string): void;
|
||||
setLogLevel(level: LogLevel): void;
|
||||
|
||||
verbose(message: any, ...args: any): void;
|
||||
debug(message: any, ...args: any): void;
|
||||
log(message: any, ...args: any): void;
|
||||
warn(message: any, ...args: any): void;
|
||||
error(message: any, ...args: any): void;
|
||||
fatal(message: any, ...args: any): void;
|
||||
}
|
||||
@@ -31,14 +31,6 @@ export interface WatchEvents {
|
||||
onError(error: Error): void;
|
||||
}
|
||||
|
||||
export enum StorageEventType {
|
||||
READY = 'ready',
|
||||
ADD = 'add',
|
||||
CHANGE = 'change',
|
||||
UNLINK = 'unlink',
|
||||
ERROR = 'error',
|
||||
}
|
||||
|
||||
export interface IStorageRepository {
|
||||
createZipStream(): ImmichZipStream;
|
||||
createReadStream(filepath: string, mimeType?: string | null): Promise<ImmichReadStream>;
|
||||
|
||||
Reference in New Issue
Block a user