99
1010// Code generated by Oracle. DO NOT EDIT.
1111
12- import { type optional , record , status , zod } from "@synnaxlabs/x" ;
12+ import { caseconv , type optional , record , status , zod } from "@synnaxlabs/x" ;
1313import { z } from "zod" ;
1414
1515import { ontology } from "@/ontology" ;
@@ -24,7 +24,7 @@ export const statusDetailsZ = <Data extends z.ZodType = z.ZodType>(data?: Data)
2424 task : keyZ ,
2525 running : z . boolean ( ) ,
2626 cmd : z . string ( ) . optional ( ) ,
27- data : data ?? record . nullishToEmpty . optional ( ) ,
27+ data : data ?? record . nullishToEmpty ( ) . optional ( ) ,
2828 } ) ;
2929export interface StatusDetails < Data extends z . ZodType = z . ZodType > {
3030 task : Key ;
@@ -38,7 +38,7 @@ export const newStatusDetailsZ = <Data extends z.ZodType = z.ZodType>(data?: Dat
3838 task : keyZ . optional ( ) ,
3939 running : z . boolean ( ) ,
4040 cmd : z . string ( ) . optional ( ) ,
41- data : data ?? record . nullishToEmpty ,
41+ data : data ?? record . nullishToEmpty ( ) ,
4242 } ) ;
4343export type NewStatusDetails < Data extends z . ZodType = z . ZodType > = z . infer <
4444 ReturnType < typeof newStatusDetailsZ < Data > >
@@ -53,7 +53,7 @@ export const commandZ = z.object({
5353 /** key is a unique identifier for this command instance. */
5454 key : z . string ( ) ,
5555 /** args contains optional arguments for the command. */
56- args : zod . nullToUndefined ( record . unknownZ ) ,
56+ args : zod . nullToUndefined ( record . unknownZ ( ) ) ,
5757} ) ;
5858export interface Command extends z . infer < typeof commandZ > { }
5959
@@ -88,7 +88,7 @@ export const payloadZ = <
8888 key : keyZ ,
8989 name : z . string ( ) ,
9090 type : type ?? z . string ( ) ,
91- config : config ?? record . nullishToEmpty ,
91+ config : caseconv . preserveCase ( config ?? record . nullishToEmpty ( ) ) ,
9292 internal : z . boolean ( ) . optional ( ) ,
9393 snapshot : z . boolean ( ) . optional ( ) ,
9494 status : status . statusZ ( { details : statusDetailsZ ( statusData ) } ) . optional ( ) ,
@@ -123,11 +123,11 @@ export const newZ = <
123123 StatusData extends z . ZodType = z . ZodType ,
124124> ( { type, config, statusData } : NewSchemas < Type , Config , StatusData > = { } ) =>
125125 payloadZ ( { type, config, statusData } )
126- . omit ( { internal : true , snapshot : true , config : true , status : true } )
126+ . omit ( { internal : true , snapshot : true , status : true , config : true } )
127127 . partial ( { key : true } )
128128 . extend ( {
129- config : config ?? record . nullishToEmpty ,
130129 status : status . newZ ( { details : newStatusDetailsZ ( statusData ) } ) . optional ( ) ,
130+ config : config ?? record . nullishToEmpty ( ) ,
131131 } ) ;
132132export type New <
133133 Type extends z . ZodType < string > = z . ZodString ,
@@ -136,12 +136,12 @@ export type New<
136136> = optional . Optional <
137137 Omit <
138138 Payload < Type , Config , StatusData > ,
139- "internal" | "snapshot" | "config " | "status "
139+ "internal" | "snapshot" | "status " | "config "
140140 > ,
141141 "key"
142142> & {
143- config : z . infer < Config > ;
144143 status ?: NewStatus < StatusData > ;
144+ config : z . infer < Config > ;
145145} ;
146146
147147export const ontologyID = ontology . createIDFactory < Key > ( "task" ) ;
0 commit comments