62 lines
914 B
TypeScript
62 lines
914 B
TypeScript
import {
|
|||
|
|
IsBoolean,
|
||
|
|
IsOptional,
|
||
|
|
IsString,
|
||
|
|
MaxLength,
|
||
|
|
MinLength,
|
||
|
|
} from 'class-validator';
|
||
|
|
|
||
|
|
export class CreateVoipConnectionDto {
|
||
|
|
@IsString()
|
||
|
|
@MinLength(2)
|
||
|
|
@MaxLength(80)
|
||
|
|
label!: string;
|
||
|
|
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
@MaxLength(200)
|
||
|
|
webhookSecret?: string;
|
||
|
|
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
@MaxLength(500)
|
||
|
|
clickToCallUrl?: string | null;
|
||
|
|
|
||
|
|
@IsOptional()
|
||
|
|
@IsBoolean()
|
||
|
|
enabled?: boolean;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class UpdateVoipConnectionDto {
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
@MinLength(2)
|
||
|
|
@MaxLength(80)
|
||
|
|
label?: string;
|
||
|
|
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
@MaxLength(200)
|
||
|
|
webhookSecret?: string | null;
|
||
|
|
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
@MaxLength(500)
|
||
|
|
clickToCallUrl?: string | null;
|
||
|
|
|
||
|
|
@IsOptional()
|
||
|
|
@IsBoolean()
|
||
|
|
enabled?: boolean;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class VoipClickToCallDto {
|
||
|
|
@IsString()
|
||
|
|
@MinLength(3)
|
||
|
|
@MaxLength(32)
|
||
|
|
number!: string;
|
||
|
|
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
personId?: string;
|
||
|
|
}
|