import { IsArray, IsNotEmpty, IsOptional, ValidateNested } from 'class-validator' import { Type } from 'class-transformer' export class SessionVariables { @IsNotEmpty() readonly 'x-hasura-user-id': string @IsNotEmpty() readonly 'x-hasura-role': string } export class ImportArguments { @IsNotEmpty() file_path: string @IsOptional() @IsArray() users: Array @IsNotEmpty() smartfit_unit: string } export class ImportParams { @IsNotEmpty() @ValidateNested() @Type(() => ImportArguments) readonly input: ImportArguments @IsNotEmpty() @ValidateNested() @Type(() => SessionVariables) readonly session_variables: SessionVariables }