@@ -136,9 +136,7 @@ export const EventHandlerSchema = z.object({
136136 /**
137137 * Handler function
138138 */
139- handler : z . function ( )
140- . args ( EventSchema )
141- . returns ( z . promise ( z . void ( ) ) )
139+ handler : z . any ( )
142140 . describe ( 'Handler function' ) ,
143141
144142 /**
@@ -168,9 +166,7 @@ export const EventHandlerSchema = z.object({
168166 /**
169167 * Filter function
170168 */
171- filter : z . function ( )
172- . args ( EventSchema )
173- . returns ( z . boolean ( ) )
169+ filter : z . any ( )
174170 . optional ( )
175171 . describe ( 'Optional filter to determine if handler should execute' ) ,
176172} ) ;
@@ -184,7 +180,7 @@ export type EventHandler = z.infer<typeof EventHandlerSchema>;
184180export const EventRouteSchema = z . object ( {
185181 from : z . string ( ) . describe ( 'Source event pattern (supports wildcards, e.g., user.* or *.created)' ) ,
186182 to : z . array ( z . string ( ) ) . describe ( 'Target event names to route to' ) ,
187- transform : z . function ( ) . optional ( ) . describe ( 'Optional function to transform payload' ) ,
183+ transform : z . any ( ) . optional ( ) . describe ( 'Optional function to transform payload' ) ,
188184} ) ;
189185
190186export type EventRoute = z . infer < typeof EventRouteSchema > ;
@@ -196,7 +192,7 @@ export type EventRoute = z.infer<typeof EventRouteSchema>;
196192export const EventPersistenceSchema = z . object ( {
197193 enabled : z . boolean ( ) . default ( false ) . describe ( 'Enable event persistence' ) ,
198194 retention : z . number ( ) . int ( ) . positive ( ) . describe ( 'Days to retain persisted events' ) ,
199- filter : z . function ( ) . optional ( ) . describe ( 'Optional filter function to select which events to persist' ) ,
195+ filter : z . any ( ) . optional ( ) . describe ( 'Optional filter function to select which events to persist' ) ,
200196 storage : z . enum ( [ 'database' , 'file' , 's3' , 'custom' ] ) . default ( 'database' )
201197 . describe ( 'Storage backend for persisted events' ) ,
202198} ) ;
@@ -529,9 +525,7 @@ export const EventWebhookConfigSchema = z.object({
529525 /**
530526 * Event transformation
531527 */
532- transform : z . function ( )
533- . args ( EventSchema )
534- . returns ( z . any ( ) )
528+ transform : z . any ( )
535529 . optional ( )
536530 . describe ( 'Transform event before sending' ) ,
537531
@@ -658,9 +652,7 @@ export const RealTimeNotificationConfigSchema = z.object({
658652 channels : z . array ( z . object ( {
659653 name : z . string ( ) . describe ( 'Channel name' ) ,
660654 eventPattern : z . string ( ) . describe ( 'Event pattern for channel' ) ,
661- filter : z . function ( )
662- . args ( EventSchema )
663- . returns ( z . boolean ( ) )
655+ filter : z . any ( )
664656 . optional ( )
665657 . describe ( 'Additional filter function' ) ,
666658 } ) ) . optional ( ) . describe ( 'Named channels for event broadcasting' ) ,
0 commit comments