@@ -5,49 +5,95 @@ import { PayloadStatus, PayloadType } from "../entities/signed-payload.entity";
55 * Response DTO for payload operations
66 */
77export class PayloadResponseDto {
8- @ApiProperty ( { description : "Unique payload UUID" , example : "a1b2c3d4-1234-5678-90ef-ghijklmnopqr" } )
8+ @ApiProperty ( {
9+ description : "Unique payload UUID" ,
10+ example : "a1b2c3d4-1234-5678-90ef-ghijklmnopqr" ,
11+ } )
912 id : string ;
1013
11- @ApiProperty ( { description : "Type of payload" , enum : PayloadType , example : PayloadType . PRICE_FEED } )
14+ @ApiProperty ( {
15+ description : "Type of payload" ,
16+ enum : PayloadType ,
17+ example : PayloadType . PRICE_FEED ,
18+ } )
1219 payloadType : PayloadType ;
1320
14- @ApiProperty ( { description : "Ethereum address that signed this payload" , example : "0xAbCd1234567890abcdef1234567890abcdef1234" } )
21+ @ApiProperty ( {
22+ description : "Ethereum address that signed this payload" ,
23+ example : "0xAbCd1234567890abcdef1234567890abcdef1234" ,
24+ } )
1525 signerAddress : string ;
1626
1727 @ApiProperty ( { description : "Submission nonce" , example : "42" } )
1828 nonce : string ;
1929
20- @ApiProperty ( { description : "Raw payload data" , type : "object" , example : { token : "ETH" , price : 3200.5 } } )
30+ @ApiProperty ( {
31+ description : "Raw payload data" ,
32+ type : "object" ,
33+ example : { token : "ETH" , price : 3200.5 } ,
34+ } )
2135 payload : Record < string , any > ;
2236
23- @ApiProperty ( { description : "Keccak256 hash of the payload" , example : "0xabc123..." } )
37+ @ApiProperty ( {
38+ description : "Keccak256 hash of the payload" ,
39+ example : "0xabc123..." ,
40+ } )
2441 payloadHash : string ;
2542
26- @ApiProperty ( { description : "EIP-712 structured data hash" , example : "0xdef456..." } )
43+ @ApiProperty ( {
44+ description : "EIP-712 structured data hash" ,
45+ example : "0xdef456..." ,
46+ } )
2747 structuredDataHash : string ;
2848
29- @ApiPropertyOptional ( { description : "ECDSA signature (0x-prefixed, 132 chars)" , nullable : true , example : "0x..." } )
49+ @ApiPropertyOptional ( {
50+ description : "ECDSA signature (0x-prefixed, 132 chars)" ,
51+ nullable : true ,
52+ example : "0x..." ,
53+ } )
3054 signature : string | null ;
3155
3256 @ApiProperty ( { description : "Payload expiry timestamp" } )
3357 expiresAt : Date ;
3458
35- @ApiProperty ( { description : "Current submission status" , enum : PayloadStatus , example : PayloadStatus . PENDING } )
59+ @ApiProperty ( {
60+ description : "Current submission status" ,
61+ enum : PayloadStatus ,
62+ example : PayloadStatus . PENDING ,
63+ } )
3664 status : PayloadStatus ;
3765
38- @ApiPropertyOptional ( { description : "On-chain transaction hash after submission" , nullable : true , example : "0x..." } )
66+ @ApiPropertyOptional ( {
67+ description : "On-chain transaction hash after submission" ,
68+ nullable : true ,
69+ example : "0x..." ,
70+ } )
3971 transactionHash : string | null ;
4072
41- @ApiPropertyOptional ( { description : "Block number when confirmed on-chain" , nullable : true , example : "18500000" } )
73+ @ApiPropertyOptional ( {
74+ description : "Block number when confirmed on-chain" ,
75+ nullable : true ,
76+ example : "18500000" ,
77+ } )
4278 blockNumber : string | null ;
4379
44- @ApiProperty ( { description : "Total number of submission attempts" , example : 1 } )
80+ @ApiProperty ( {
81+ description : "Total number of submission attempts" ,
82+ example : 1 ,
83+ } )
4584 submissionAttempts : number ;
4685
47- @ApiPropertyOptional ( { description : "Error message if submission failed" , nullable : true } )
86+ @ApiPropertyOptional ( {
87+ description : "Error message if submission failed" ,
88+ nullable : true ,
89+ } )
4890 errorMessage : string | null ;
4991
50- @ApiPropertyOptional ( { description : "Optional metadata" , nullable : true , type : "object" } )
92+ @ApiPropertyOptional ( {
93+ description : "Optional metadata" ,
94+ nullable : true ,
95+ type : "object" ,
96+ } )
5197 metadata : Record < string , any > | null ;
5298
5399 @ApiProperty ( { description : "Record creation timestamp" } )
@@ -56,9 +102,15 @@ export class PayloadResponseDto {
56102 @ApiProperty ( { description : "Record last-updated timestamp" } )
57103 updatedAt : Date ;
58104
59- @ApiPropertyOptional ( { description : "When submitted to blockchain" , nullable : true } )
105+ @ApiPropertyOptional ( {
106+ description : "When submitted to blockchain" ,
107+ nullable : true ,
108+ } )
60109 submittedAt : Date | null ;
61110
62- @ApiPropertyOptional ( { description : "When confirmed on-chain" , nullable : true } )
111+ @ApiPropertyOptional ( {
112+ description : "When confirmed on-chain" ,
113+ nullable : true ,
114+ } )
63115 confirmedAt : Date | null ;
64116}
0 commit comments