import { IsDefined , IsEmail , IsOptional , IsString } from 'class-validator' ; import { CommandHelper } from '../../../shared/commands/command.helper' ; import { ApplicationCommand } from '../../../shared/commands/project.command' ; export class CreateSubscriberCommand extends ApplicationCommand { static create ( data ) { return CommandHelper . create ( CreateSubscriberCommand , data ) ; } @ IsString ( ) @ IsDefined ( ) subscriberId : string ; @ IsEmail ( ) @ IsOptional ( ) email ? : string ; @ IsString ( ) @ IsOptional ( ) firstName ? : string ; @ IsString ( ) @ IsOptional ( ) lastName ? : string ; @ IsString ( ) @ IsOptional ( ) phone ? : string ; }