39 lines
929 B
TypeScript
39 lines
929 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
import { IsNotEmpty, IsOptional, IsString } from "class-validator";
|
|
|
|
export class CreateDomainAccessDto {
|
|
@ApiProperty({
|
|
description: "Domain name to add to the list",
|
|
example: "example.com",
|
|
})
|
|
@IsNotEmpty()
|
|
@IsString()
|
|
domain: string;
|
|
|
|
@ApiPropertyOptional({
|
|
description: "Optional description for this domain entry. Note: May not be supported for all operations (e.g., allowlist operations)",
|
|
example: "Trusted business partner domain",
|
|
})
|
|
@IsOptional()
|
|
@IsString()
|
|
description?: string;
|
|
}
|
|
|
|
export class ListDomainAccessQueryDto {
|
|
@ApiPropertyOptional({
|
|
description: "Number of entries to return",
|
|
example: 20,
|
|
default: 20,
|
|
})
|
|
@IsOptional()
|
|
limit?: number;
|
|
|
|
@ApiPropertyOptional({
|
|
description: "Page number for pagination",
|
|
example: 1,
|
|
default: 1,
|
|
})
|
|
@IsOptional()
|
|
page?: number;
|
|
}
|