DuOrigin v2 - React + NestJS + Prisma + EUDR API Integration

This commit is contained in:
2026-02-09 09:10:15 -03:00
parent cb90bad239
commit 4122dc6f3b
170 changed files with 31333 additions and 200 deletions

View File

@@ -0,0 +1,58 @@
import { IsString, IsOptional, IsBoolean, ValidateNested, IsArray, IsUUID } from 'class-validator';
import { Type } from 'class-transformer';
import { CommodityDto, OperatorAddressDto, ReferencedDdsDto } from './common.dto';
/**
* Request DTO for amending an existing DDS
* Note: Activity type cannot be changed
*/
export class AmendDdsRequestDto {
@IsUUID()
uuid: string;
@IsBoolean()
confidentialityFlag: boolean;
@IsOptional()
@IsString()
companyInternalReference?: string;
/**
* Required when amending as Authorized Representative (V2)
*/
@IsOptional()
@ValidateNested()
@Type(() => OperatorAddressDto)
onBehalfOfOperator?: OperatorAddressDto;
@IsArray()
@ValidateNested({ each: true })
@Type(() => CommodityDto)
commodities: CommodityDto[];
@IsOptional()
@IsArray()
@ValidateNested({ each: true })
@Type(() => ReferencedDdsDto)
referencedDds?: ReferencedDdsDto[];
}
/**
* Response DTO for DDS amendment
*/
export class AmendDdsResponseDto {
/**
* HTTP status code (200 = success)
*/
httpStatus: number;
/**
* Success indicator
*/
success: boolean;
/**
* Raw SOAP response for debugging
*/
rawResponse?: string;
}