Merge remote-tracking branch 'origin' into feat/xxhash
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { AssetFileEntity } from 'src/entities/asset-files.entity';
|
||||
import { AssetJobStatusEntity } from 'src/entities/asset-job-status.entity';
|
||||
import { AssetEntity } from 'src/entities/asset.entity';
|
||||
import { ExifEntity } from 'src/entities/exif.entity';
|
||||
@@ -195,6 +196,8 @@ export interface IAssetRepository {
|
||||
getDuplicates(options: AssetBuilderOptions): Promise<AssetEntity[]>;
|
||||
getAllForUserFullSync(options: AssetFullSyncOptions): Promise<AssetEntity[]>;
|
||||
getChangedDeltaSync(options: AssetDeltaSyncOptions): Promise<AssetEntity[]>;
|
||||
getFileById(assetFileId: string): Promise<AssetFileEntity | null>;
|
||||
removeFile(assetId: string, type: AssetFileType): Promise<void>;
|
||||
upsertFile(file: UpsertFileOptions): Promise<void>;
|
||||
upsertFiles(files: UpsertFileOptions[]): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ export interface ICryptoRepository {
|
||||
hashFile(filePath: string | Buffer): Promise<Buffer>;
|
||||
hashSha256(data: string): string;
|
||||
xxHash(value: string): Buffer;
|
||||
xxHashFile(filePath: string | Buffer): Promise<Buffer>;
|
||||
verifySha256(data: string, encrypted: string, publicKey: string): boolean;
|
||||
hashSha1(data: string | Buffer): Buffer;
|
||||
hashBcrypt(data: string | Buffer, saltOrRounds: string | number): Promise<string>;
|
||||
|
||||
@@ -15,6 +15,7 @@ export enum QueueName {
|
||||
SIDECAR = 'sidecar',
|
||||
LIBRARY = 'library',
|
||||
NOTIFICATION = 'notifications',
|
||||
REPAIR = 'repair',
|
||||
}
|
||||
|
||||
export type ConcurrentQueueName = Exclude<
|
||||
@@ -111,6 +112,9 @@ export enum JobName {
|
||||
|
||||
// Version check
|
||||
VERSION_CHECK = 'version-check',
|
||||
|
||||
// REPAIR
|
||||
REPAIR_VERIFY_CHECKSUM = 'repair-verify-checksum',
|
||||
}
|
||||
|
||||
export const JOBS_ASSET_PAGINATION_SIZE = 1000;
|
||||
@@ -283,7 +287,10 @@ export type JobItem =
|
||||
| { name: JobName.NOTIFY_SIGNUP; data: INotifySignupJob }
|
||||
|
||||
// Version check
|
||||
| { name: JobName.VERSION_CHECK; data: IBaseJob };
|
||||
| { name: JobName.VERSION_CHECK; data: IBaseJob }
|
||||
|
||||
// Repairs
|
||||
| { name: JobName.REPAIR_VERIFY_CHECKSUM; data: IEntityJob };
|
||||
|
||||
export enum JobStatus {
|
||||
SUCCESS = 'success',
|
||||
|
||||
9
server/src/interfaces/repair.interface.ts
Normal file
9
server/src/interfaces/repair.interface.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { RepairEntity } from 'src/entities/repair.entity';
|
||||
import { Paginated, PaginationOptions } from 'src/utils/pagination';
|
||||
|
||||
export const IRepairRepository = 'IRepairRepository';
|
||||
|
||||
export interface IRepairRepository {
|
||||
create(repair: Partial<RepairEntity>): Promise<RepairEntity>;
|
||||
getAll(pagination: PaginationOptions): Paginated<RepairEntity>;
|
||||
}
|
||||
Reference in New Issue
Block a user