Spaces:
Runtime error
Runtime error
File size: 1,354 Bytes
4327358 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
import { ApiProperty } from '@nestjs/swagger';
import { BooleanString } from '@waha/nestjs/validation/BooleanString';
import { Transform } from 'class-transformer';
import { IsBoolean, IsOptional } from 'class-validator';
export class EnvironmentQuery {
@ApiProperty({
example: false,
required: false,
description: 'Include all environment variables',
})
@Transform(BooleanString)
@IsBoolean()
@IsOptional()
all: boolean = false;
}
export class StopRequest {
@ApiProperty({
example: false,
required: false,
description:
'By default, it gracefully stops the server, ' +
'but you can force it to terminate immediately.',
})
@IsBoolean()
@IsOptional()
force: boolean = false;
}
export class StopResponse {
@ApiProperty({
example: true,
description: "Always 'true' if the server is stopping.",
})
stopping: boolean = true;
}
export class WorkerInfo {
@ApiProperty({
example: 'waha',
description: 'The worker ID.',
})
id: string;
}
export class ServerStatusResponse {
@ApiProperty({
example: 1723788847247,
description: 'The timestamp when the server started (milliseconds).',
})
startTimestamp: number;
@ApiProperty({
example: 3600000,
description: 'The uptime of the server in milliseconds.',
})
uptime: number;
worker: WorkerInfo;
}
|