mirror of
https://github.com/immich-app/immich.git
synced 2025-06-23 15:34:03 -04:00
* fix(server,mobile): proper asset sync * fix CI issues * only use id instead of createdAt+id * remove createdAt index * fix typo * cleanup createdAt usage --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
35 lines
753 B
TypeScript
35 lines
753 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsInt, IsPositive } from 'class-validator';
|
|
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
|
import { ValidateDate, ValidateUUID } from 'src/validation';
|
|
|
|
export class AssetFullSyncDto {
|
|
@ValidateUUID({ optional: true })
|
|
lastId?: string;
|
|
|
|
@ValidateDate()
|
|
updatedUntil!: Date;
|
|
|
|
@IsInt()
|
|
@IsPositive()
|
|
@ApiProperty({ type: 'integer' })
|
|
limit!: number;
|
|
|
|
@ValidateUUID({ optional: true })
|
|
userId?: string;
|
|
}
|
|
|
|
export class AssetDeltaSyncDto {
|
|
@ValidateDate()
|
|
updatedAfter!: Date;
|
|
|
|
@ValidateUUID({ each: true })
|
|
userIds!: string[];
|
|
}
|
|
|
|
export class AssetDeltaSyncResponseDto {
|
|
needsFullSync!: boolean;
|
|
upserted!: AssetResponseDto[];
|
|
deleted!: string[];
|
|
}
|