DuOrigin v2 - React + NestJS + Prisma + EUDR API Integration
This commit is contained in:
58
backend/src/eudr-api/dto/amend-dds.dto.ts
Normal file
58
backend/src/eudr-api/dto/amend-dds.dto.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user