File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export type Draft = Partial<{
3535export type DatabaseObject = {
3636 id : number ;
3737 created : string ;
38- updated ?: string | undefined ;
38+ updated ?: ( null | string ) | undefined ;
3939} ;
4040export type ProposalState =
4141 | {
@@ -119,7 +119,7 @@ const Draft: z.ZodType<Draft> = z
119119const DatabaseObject : z . ZodType < DatabaseObject > = z . object ( {
120120 id : z . number ( ) . int ( ) ,
121121 created : z . string ( ) . datetime ( { offset : true } ) ,
122- updated : z . string ( ) . datetime ( { offset : true } ) . optional ( ) ,
122+ updated : z . union ( [ z . null ( ) , z . string ( ) ] ) . optional ( ) ,
123123} ) ;
124124const DraftIndex : z . ZodType < DraftIndex > = Paginated . and (
125125 z . object ( { drafts : z . array ( Draft . and ( DatabaseObject ) ) } ) ,
@@ -157,7 +157,7 @@ const ProposalIndex: z.ZodType<ProposalIndex> = Paginated.and(
157157 proposals : z . array ( Proposal . and ( ProposalState ) . and ( DatabaseObject ) ) ,
158158 } ) ,
159159) ;
160- const Expirable = z . object ( { expires : z . string ( ) . datetime ( { offset : true } ) } ) ;
160+ const Expirable = z . object ( { expires : z . union ( [ z . null ( ) , z . string ( ) ] ) } ) ;
161161
162162export const schemas = {
163163 Paginated,
You can’t perform that action at this time.
0 commit comments