Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

680 B
Raw Blame
/*
 * Copyright 2025 Daytona Platforms Inc.
 * Modified by BoxLite AI, 2025-2026
 * SPDX-License-Identifier: AGPL-3.0
 */

import { ApiProperty, ApiSchema } from '@nestjs/swagger'
import { Runner } from '../entities/runner.entity'

@ApiSchema({ name: 'CreateRunnerResponse' })
export class CreateRunnerResponseDto {
  @ApiProperty({
    description: 'The ID of the runner',
    example: 'runner123',
  })
  id: string

  @ApiProperty({
    description: 'The API key for the runner',
    example: 'blk_svc_1234567890',
  })
  apiKey: string

  static fromRunner(runner: Runner, apiKey: string): CreateRunnerResponseDto {
    return {
      id: runner.id,
      apiKey,
    }
  }
}