OperationDefinition
Interface: OperationDefinition
Defined in: packages/core/src/core/icore.ts:95
Define an operation within webda app
Extended by
Properties
context?
optionalcontext?:any
Defined in: packages/core/src/core/icore.ts:141
Context to use for the operation
Useful to define a specific context for the operation
deprecated?
optionaldeprecated?:boolean
Defined in: packages/core/src/core/icore.ts:157
Mark the operation as deprecated
description?
optionaldescription?:string
Defined in: packages/core/src/core/icore.ts:149
Full description of the operation
extensions?
optionalextensions?:Record<string,unknown>
Defined in: packages/core/src/core/icore.ts:207
Additional transport hints for future extensibility
generator?
optionalgenerator?:boolean
Defined in: packages/core/src/core/icore.ts:203
The method is an async generator (set by the
Operation
decorator)
graphql?
optionalgraphql?:false| {mutation?:string;query?:string;subscription?:string; }
Defined in: packages/core/src/core/icore.ts:187
GraphQL transport hints
Set to false to explicitly exclude from GraphQL transport.
Provide an object to specify query, mutation, or subscription mappings.
grpc?
optionalgrpc?:false| {streaming?:OperationStreaming; }
Defined in: packages/core/src/core/icore.ts:180
gRPC transport hints
Set to false to explicitly exclude from gRPC transport.
Provide an object to specify streaming mode.
hidden?
optionalhidden?:boolean
Defined in: packages/core/src/core/icore.ts:161
Hide the operation from transport exposure
id
id:
string
Defined in: packages/core/src/core/icore.ts:99
Id of the operation
input
input:
string
Defined in: packages/core/src/core/icore.ts:103
Schema name for operation input. Use "void" for no input.
maxMfaAge?
optionalmaxMfaAge?:string|number
Defined in: packages/core/src/core/icore.ts:119
Require the second factor to be verified within this duration (Duration syntax: 600, "10m")
Implies a logged session with a verified second factor: refused with MFA_REQUIRED (403) when the user has no
second factor, MFA_STEP_UP_REQUIRED (401, details.maxAge in seconds) when it was verified too long ago
mcp?
optionalmcp?:false| {destructive?:boolean;readOnly?:boolean;title?:string; }
Defined in: packages/core/src/core/icore.ts:194
MCP transport hints
Set to false to explicitly exclude from the MCP transport.
Provide an object to set the tool title or override the read-only/destructive hints.
Union Members
false
Type Literal
{ destructive?: boolean; readOnly?: boolean; title?: string; }
destructive?
optionaldestructive?:boolean
Override the derived destructiveHint
readOnly?
optionalreadOnly?:boolean
Override the derived readOnlyHint
title?
optionaltitle?:string
Human-friendly tool title
method
method:
string
Defined in: packages/core/src/core/icore.ts:135
Method implementing the operation
model?
optionalmodel?:string
Defined in: packages/core/src/core/icore.ts:131
Model implementing the operation
Either service or model should be defined
output
output:
string
Defined in: packages/core/src/core/icore.ts:107
Schema name for operation output. Use "void" for no output.
permission?
optionalpermission?:WebdaQLString<unknown>
Defined in: packages/core/src/core/icore.ts:112
WebdaQL to execute on session to know if operation is available to user
rest?
optionalrest?:false| {method:"get"|"post"|"put"|"delete"|"patch";path:string;responses?: {[statusCode:string]:object; }; }
Defined in: packages/core/src/core/icore.ts:173
REST transport hints
Set to false to explicitly exclude from REST transport.
Provide an object to specify REST method, path, and response definitions.
service?
optionalservice?:string
Defined in: packages/core/src/core/icore.ts:125
Service implementing the operation
Either service or model should be defined
static?
optionalstatic?:boolean
Defined in: packages/core/src/core/icore.ts:166
Whether this is a static (class-level) or instance method Used by callOperation to determine if model instance needs to be loaded
streaming?
optionalstreaming?:OperationStreaming
Defined in: packages/core/src/core/icore.ts:199
Streaming mode, set by registerOperation from the schemas (x-webda-stream), the generator flag or
grpc.streaming
summary?
optionalsummary?:string
Defined in: packages/core/src/core/icore.ts:145
Short summary of the operation
tags?
optionaltags?:string[]
Defined in: packages/core/src/core/icore.ts:153
Categorization tags for the operation