mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 09:15:35 +03:00
feat: pending sync reset flag (#19861)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { IsInt, IsPositive, IsString } from 'class-validator';
|
||||
import { Session } from 'src/database';
|
||||
import { Optional } from 'src/validation';
|
||||
import { Optional, ValidateBoolean } from 'src/validation';
|
||||
|
||||
export class SessionCreateDto {
|
||||
/**
|
||||
@@ -20,6 +20,11 @@ export class SessionCreateDto {
|
||||
deviceOS?: string;
|
||||
}
|
||||
|
||||
export class SessionUpdateDto {
|
||||
@ValidateBoolean({ optional: true })
|
||||
isPendingSyncReset?: boolean;
|
||||
}
|
||||
|
||||
export class SessionResponseDto {
|
||||
id!: string;
|
||||
createdAt!: string;
|
||||
@@ -28,6 +33,7 @@ export class SessionResponseDto {
|
||||
current!: boolean;
|
||||
deviceType!: string;
|
||||
deviceOS!: string;
|
||||
isPendingSyncReset!: boolean;
|
||||
}
|
||||
|
||||
export class SessionCreateResponseDto extends SessionResponseDto {
|
||||
@@ -42,4 +48,5 @@ export const mapSession = (entity: Session, currentId?: string): SessionResponse
|
||||
current: currentId === entity.id,
|
||||
deviceOS: entity.deviceOS,
|
||||
deviceType: entity.deviceType,
|
||||
isPendingSyncReset: entity.isPendingSyncReset,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user