Spaces:
Runtime error
Runtime error
| 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 { | |
| ({ | |
| example: false, | |
| required: false, | |
| description: 'Include all environment variables', | |
| }) | |
| (BooleanString) | |
| () | |
| () | |
| all: boolean = false; | |
| } | |
| export class StopRequest { | |
| ({ | |
| example: false, | |
| required: false, | |
| description: | |
| 'By default, it gracefully stops the server, ' + | |
| 'but you can force it to terminate immediately.', | |
| }) | |
| () | |
| () | |
| force: boolean = false; | |
| } | |
| export class StopResponse { | |
| ({ | |
| example: true, | |
| description: "Always 'true' if the server is stopping.", | |
| }) | |
| stopping: boolean = true; | |
| } | |
| export class WorkerInfo { | |
| ({ | |
| example: 'waha', | |
| description: 'The worker ID.', | |
| }) | |
| id: string; | |
| } | |
| export class ServerStatusResponse { | |
| ({ | |
| example: 1723788847247, | |
| description: 'The timestamp when the server started (milliseconds).', | |
| }) | |
| startTimestamp: number; | |
| ({ | |
| example: 3600000, | |
| description: 'The uptime of the server in milliseconds.', | |
| }) | |
| uptime: number; | |
| worker: WorkerInfo; | |
| } | |