690519:1631 224 to 226 AI #01
CI / CD Pipeline / build (push) Failing after 3m57s
CI / CD Pipeline / deploy (push) Has been skipped

This commit is contained in:
2026-05-19 16:31:50 +07:00
parent 3e25097470
commit ea5499123e
127 changed files with 12387 additions and 42 deletions
@@ -0,0 +1,36 @@
// File: src/modules/ai/dto/ai-intent-request.dto.ts
// Change Log
// - 2026-05-19: สร้าง DTO สำหรับ POST /ai/intent endpoint (ADR-025).
import { IsNotEmpty, IsOptional, IsString, IsUUID } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
/**
* Request body สำหรับ POST /ai/intent
* ส่ง intent code + project context ไปยัง AiToolRegistryService
*/
export class AiIntentRequestDto {
@ApiProperty({
description:
'Intent code เช่น GET_RFA, GET_DRAWING, GET_TRANSMITTAL (ADR-025)',
example: 'GET_RFA',
})
@IsNotEmpty()
@IsString()
intent!: string;
@ApiProperty({
description: 'UUID ของ Project (ADR-019) — จำเป็นสำหรับ CASL scope',
example: '0195a1b2-c3d4-7000-8000-abc123def456',
})
@IsNotEmpty()
@IsUUID()
projectPublicId!: string;
@ApiPropertyOptional({
description: 'Parameters เพิ่มเติม เช่น { statusCode: "DFT" }',
example: { statusCode: 'FAP' },
})
@IsOptional()
params?: Record<string, unknown>;
}