Documentation / @agentick/gateway / MethodDefinitionInput
Interface: MethodDefinitionInput<TSchema>
Defined in: gateway/src/types.ts:341
Method definition input (what you pass to method())
Extended by
Type Parameters
TSchema
TSchema extends ZodLikeSchema = ZodLikeSchema
Properties
description?
optionaldescription:string
Defined in: gateway/src/types.ts:355
Method description for discovery
guard()?
optionalguard: (ctx) =>boolean|Promise<boolean>
Defined in: gateway/src/types.ts:353
Custom guard function
Parameters
ctx
Returns
boolean | Promise<boolean>
handler
handler:
SimpleMethodHandler<ReturnType<TSchema["parse"]>,unknown> |StreamingMethodHandler<ReturnType<TSchema["parse"]>,unknown>
Defined in: gateway/src/types.ts:347
Handler function - receives validated & typed params
response?
optionalresponse:ZodLikeSchema
Defined in: gateway/src/types.ts:345
Zod schema for response (used by schema discovery only)
roles?
optionalroles:string[]
Defined in: gateway/src/types.ts:351
Required roles - checked before handler
schema?
optionalschema:TSchema
Defined in: gateway/src/types.ts:343
Zod schema for params validation + TypeScript inference