Skip to content

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

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

import { IsString, IsObject, IsOptional, IsEnum } from 'class-validator'
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
import { WebhookEvent } from '../constants/webhook-events.constants'

export class SendWebhookDto {
  @ApiProperty({
    description: 'The type of event being sent',
    enum: WebhookEvent,
    enumName: 'WebhookEvent',
    example: 'box.created',
  })
  @IsEnum(WebhookEvent)
  eventType: WebhookEvent

  @ApiProperty({
    description: 'The payload data to send',
    example: { id: 'box-123', name: 'My Box' },
  })
  @IsObject()
  payload: Record<string, any>

  @ApiPropertyOptional({
    description: 'Optional event ID for idempotency',
    example: 'evt_1234567890abcdef',
  })
  @IsOptional()
  @IsString()
  eventId?: string
}