59 lines
1.2 KiB
TypeScript
59 lines
1.2 KiB
TypeScript
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;
|
|
}
|