@@ -682,16 +682,26 @@ export const UpdateMetadataResponseBody = z.object({
682
682
683
683
export type UpdateMetadataResponseBody = z . infer < typeof UpdateMetadataResponseBody > ;
684
684
685
+ const RawShapeDate = z
686
+ . string ( )
687
+ . transform ( ( val ) => `${ val } Z` )
688
+ . pipe ( z . coerce . date ( ) ) ;
689
+
690
+ const RawOptionalShapeDate = z
691
+ . string ( )
692
+ . nullish ( )
693
+ . transform ( ( val ) => ( val ? new Date ( `${ val } Z` ) : val ) ) ;
694
+
685
695
export const SubscribeRunRawShape = z . object ( {
686
696
id : z . string ( ) ,
687
697
idempotencyKey : z . string ( ) . nullish ( ) ,
688
- createdAt : z . coerce . date ( ) ,
689
- updatedAt : z . coerce . date ( ) ,
690
- startedAt : z . coerce . date ( ) . nullish ( ) ,
691
- delayUntil : z . coerce . date ( ) . nullish ( ) ,
692
- queuedAt : z . coerce . date ( ) . nullish ( ) ,
693
- expiredAt : z . coerce . date ( ) . nullish ( ) ,
694
- completedAt : z . coerce . date ( ) . nullish ( ) ,
698
+ createdAt : RawShapeDate ,
699
+ updatedAt : RawShapeDate ,
700
+ startedAt : RawOptionalShapeDate ,
701
+ delayUntil : RawOptionalShapeDate ,
702
+ queuedAt : RawOptionalShapeDate ,
703
+ expiredAt : RawOptionalShapeDate ,
704
+ completedAt : RawOptionalShapeDate ,
695
705
taskIdentifier : z . string ( ) ,
696
706
friendlyId : z . string ( ) ,
697
707
number : z . number ( ) ,
0 commit comments