Documentation / @agentick/express / MethodDefinition
Interface: MethodDefinition<TSchema> ​
Defined in: packages/gateway/dist/types.d.ts:284
Method definition with symbol marker (returned by method())
Extends ​
MethodDefinitionInput<TSchema>
Type Parameters ​
TSchema ​
TSchema extends ZodLikeSchema = ZodLikeSchema
Properties ​
[METHOD_DEFINITION] ​
[METHOD_DEFINITION]:
true
Defined in: packages/gateway/dist/types.d.ts:285
description? ​
optionaldescription:string
Defined in: packages/gateway/dist/types.d.ts:279
Method description for discovery
Inherited from ​
MethodDefinitionInput.description
guard()? ​
optionalguard: (ctx) =>boolean|Promise<boolean>
Defined in: packages/gateway/dist/types.d.ts:277
Custom guard function
Parameters ​
ctx ​
Returns ​
boolean | Promise<boolean>
Inherited from ​
handler ​
handler:
SimpleMethodHandler<ReturnType<TSchema["parse"]>,unknown> |StreamingMethodHandler<ReturnType<TSchema["parse"]>,unknown>
Defined in: packages/gateway/dist/types.d.ts:273
Handler function - receives validated & typed params
Inherited from ​
response? ​
optionalresponse:ZodLikeSchema
Defined in: packages/gateway/dist/types.d.ts:271
Zod schema for response (used by schema discovery only)
Inherited from ​
MethodDefinitionInput.response
roles? ​
optionalroles:string[]
Defined in: packages/gateway/dist/types.d.ts:275
Required roles - checked before handler
Inherited from ​
schema? ​
optionalschema:TSchema
Defined in: packages/gateway/dist/types.d.ts:269
Zod schema for params validation + TypeScript inference