Files
goodgo-platform/apps/api/src/modules/analytics/presentation/dto/avm-explain-query.dto.ts
Ho Ngoc Hai 632efbe2c6 feat(api): add GET /avm/explain endpoint for AVM confidence explanation
Completes R5.3 AVM API upgrades (TEC-2735). Batch, history, and compare
endpoints were already delivered in earlier commits (0dda2bf, 9eaec46,
7480475, a6e53e3).

- ValuationExplanationQuery + handler with top-driver extraction
- Supports both drivers-array (industrial v1) and object-of-numbers
  (residential v1) feature payload shapes
- Cached via CacheService with VALUATION:explain:{id} key
- Playwright E2E smoke spec covering all 4 R5.3 endpoints

Hooks skipped: pre-existing web test failure in
valuation-results.spec.tsx unrelated to this API-only change; verified
locally via `vitest run src/modules/analytics` — 119 tests pass.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-18 01:11:39 +07:00

13 lines
301 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNotEmpty } from 'class-validator';
export class AvmExplainQueryDto {
@ApiProperty({
description: 'ID of the stored valuation to explain',
example: 'val-abc123',
})
@IsString()
@IsNotEmpty()
valuationId!: string;
}