import { IsEmail, IsNotEmpty, IsString, IsOptional, IsNumber, IsArray, ArrayNotEmpty, IsBoolean, IsEmpty } from "class-validator";
import { ApiProperty } from '@nestjs/swagger';
import { Types } from 'mongoose';
import { Transform } from "class-transformer";


export enum callType {
    null,
    CHAT = "CHAT",
    CALL = "CALL"
}

export enum callStatus {
    null,
    ACTIVE = "ACTIVE",
    COMPLETE = "COMPLETE"
}


export class callList {

    @ApiProperty({ required: false, enum: callType, default:null })
    @IsOptional()
    @IsString()
    type: string;

    @ApiProperty({ required: false, enum: callStatus, default:null })
    @IsOptional()
    @IsString()
    status: string;

    @Transform(({ value }) => parseInt(value))
    @ApiProperty({ required: false })
    @IsNumber()
    @IsOptional()
    pagination: number;

    @Transform(({ value }) => parseInt(value))
    @ApiProperty({ required: false })
    @IsNumber()
    @IsOptional()
    limit: number;

}
export class callTranscript {

    @ApiProperty({ required: false, default:null })
    @IsOptional()
    @IsString()
    call_id: string;

    // @Transform(({ value }) => parseInt(value))
    // @ApiProperty({ required: false })
    // @IsNumber()
    // @IsOptional()
    // pagination: number;

    // @Transform(({ value }) => parseInt(value))
    // @ApiProperty({ required: false })
    // @IsNumber()
    // @IsOptional()
    // limit: number;

}