after claude code
This commit is contained in:
24
src/modules/sync/dto/sync-request.dto.ts
Normal file
24
src/modules/sync/dto/sync-request.dto.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { IsOptional, IsDateString, IsArray, IsString } from 'class-validator';
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
export class SyncRequestDto {
|
||||
@ApiPropertyOptional({
|
||||
description: 'Last sync timestamp (ISO 8601). Returns only changes since this time.',
|
||||
example: '2025-01-15T10:30:00.000Z',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsDateString({}, { message: 'Last sync timestamp must be a valid ISO 8601 date' })
|
||||
lastSyncTimestamp?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'Specific entities to sync. If not provided, syncs all entities.',
|
||||
example: ['products', 'categories'],
|
||||
isArray: true,
|
||||
type: String,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsArray({ message: 'Entities must be an array' })
|
||||
@IsString({ each: true, message: 'Each entity must be a string' })
|
||||
entities?: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user