21 lines
507 B
TypeScript
21 lines
507 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsNotEmpty, IsString, MaxLength } from 'class-validator';
|
|
|
|
const MAX_TOKEN_LENGTH = 4096;
|
|
|
|
export class PutTbankConnectionDto {
|
|
@ApiProperty({ writeOnly: true })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@MaxLength(MAX_TOKEN_LENGTH)
|
|
declare token: string;
|
|
}
|
|
|
|
export class TbankConnectionStatusDto {
|
|
@ApiProperty()
|
|
declare connected: boolean;
|
|
|
|
@ApiProperty({ type: String, nullable: true, format: 'date-time' })
|
|
declare connectedAt: string | null;
|
|
}
|