OperationDefinitionInfo
Interface: OperationDefinitionInfo
Defined in: packages/core/src/core/icore.ts:296
Define an operation within webda app
Extends
Properties
context?
optionalcontext?:any
Defined in: packages/core/src/core/icore.ts:158
Context to use for the operation
Useful to define a specific context for the operation
Inherited from
deprecated?
optionaldeprecated?:boolean
Defined in: packages/core/src/core/icore.ts:174
Mark the operation as deprecated
Inherited from
OperationDefinition.deprecated
description?
optionaldescription?:string
Defined in: packages/core/src/core/icore.ts:166
Full description of the operation
Inherited from
OperationDefinition.description
dryRun?
optionaldryRun?:"execute"|"delegate"|"skip"
Defined in: packages/core/src/core/icore.ts:249
How the operation behaves when the call runs in dry mode
- "execute": it has no side effects, so it runs normally (default for read-only operations)
- "delegate": the method is called and handles dry mode itself through
useDryRun()("dryable") - "skip": the method is NOT called; the call is validated, logged and reported (default for everything else)
Inherited from
extensions?
optionalextensions?:Record<string,unknown>
Defined in: packages/core/src/core/icore.ts:232
Additional transport hints for future extensibility
Inherited from
OperationDefinition.extensions
featureFlag?
optionalfeatureFlag?:string|true
Defined in: packages/core/src/core/icore.ts:238
Feature flag gating the operation. When the flag is off for the caller
the operation answers NotFound and is left out of listings.
true uses the operation id as flag name.
Inherited from
OperationDefinition.featureFlag
featureFlags?
optionalfeatureFlags?:string[]
Defined in: packages/core/src/core/icore.ts:242
Feature flags gating the operation (from definition + pattern mappings)
Inherited from
OperationDefinition.featureFlags
generator?
optionalgenerator?:boolean
Defined in: packages/core/src/core/icore.ts:220
The method is an async generator (set by the
Operation
decorator)
Inherited from
graphql?
optionalgraphql?:false| {mutation?:string;query?:string;subscription?:string; }
Defined in: packages/core/src/core/icore.ts:204
GraphQL transport hints
Set to false to explicitly exclude from GraphQL transport.
Provide an object to specify query, mutation, or subscription mappings.
Inherited from
grpc?
optionalgrpc?:false| {streaming?:OperationStreaming; }
Defined in: packages/core/src/core/icore.ts:197
gRPC transport hints
Set to false to explicitly exclude from gRPC transport.
Provide an object to specify streaming mode.
Inherited from
hidden?
optionalhidden?:boolean
Defined in: packages/core/src/core/icore.ts:178
Hide the operation from transport exposure
Inherited from
id
id:
string
Defined in: packages/core/src/core/icore.ts:116
Id of the operation
Inherited from
input
input:
string
Defined in: packages/core/src/core/icore.ts:120
Schema name for operation input. Use "void" for no input.
Inherited from
maxMfaAge?
optionalmaxMfaAge?:string|number
Defined in: packages/core/src/core/icore.ts:136
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
Inherited from
maxMfaAgeSeconds?
optionalmaxMfaAgeSeconds?:number
Defined in: packages/core/src/core/icore.ts:304
Contains the parsed maxMfaAge, in seconds
mcp?
optionalmcp?:false| {destructive?:boolean;readOnly?:boolean;title?:string; }
Defined in: packages/core/src/core/icore.ts:211
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
Inherited from
method
method:
string
Defined in: packages/core/src/core/icore.ts:152
Method implementing the operation
Inherited from
model?
optionalmodel?:string
Defined in: packages/core/src/core/icore.ts:148
Model implementing the operation
Either service or model should be defined
Inherited from
output
output:
string
Defined in: packages/core/src/core/icore.ts:124
Schema name for operation output. Use "void" for no output.
Inherited from
permission?
optionalpermission?:WebdaQLString<unknown>
Defined in: packages/core/src/core/icore.ts:129
WebdaQL to execute on session to know if operation is available to user
Inherited from
OperationDefinition.permission
permissionQuery?
optionalpermissionQuery?:QueryValidator
Defined in: packages/core/src/core/icore.ts:300
Contains the parse permission query
rest?
optionalrest?:false| {body?:string;method:"get"|"post"|"put"|"delete"|"patch";path:string;responses?: {[statusCode:string]:object; }; }
Defined in: packages/core/src/core/icore.ts:190
REST transport hints
Set to false to explicitly exclude from REST transport.
Provide an object to specify REST method, path, and response definitions.
Union Members
false
Type Literal
{ body?: string; method: "get" | "post" | "put" | "delete" | "patch"; path: string; responses?: {[statusCode: string]: object; }; }
body?
optionalbody?:string
Method parameter receiving the whole JSON body.
method
method:
"get"|"post"|"put"|"delete"|"patch"
path
path:
string
responses?
optionalresponses?:object
Index Signature
[statusCode: string]: object
Inherited from
service?
optionalservice?:string
Defined in: packages/core/src/core/icore.ts:142
Service implementing the operation
Either service or model should be defined
Inherited from
static?
optionalstatic?:boolean
Defined in: packages/core/src/core/icore.ts:183
Whether this is a static (class-level) or instance method Used by callOperation to determine if model instance needs to be loaded
Inherited from
streaming?
optionalstreaming?:OperationStreaming
Defined in: packages/core/src/core/icore.ts:216
Streaming mode, set by registerOperation from the schemas (x-webda-stream), the generator flag or
grpc.streaming
Inherited from
summary?
optionalsummary?:string
Defined in: packages/core/src/core/icore.ts:162
Short summary of the operation
Inherited from
tags?
optionaltags?:string[]
Defined in: packages/core/src/core/icore.ts:170
Categorization tags for the operation
Inherited from
transaction?
optionaltransaction?:boolean
Defined in: packages/core/src/core/icore.ts:228
Run the operation in a transaction of the registered participants (e.g. a SQL store with
transaction: "operation")
false opts the operation out, e.g. a long streaming read that should not hold a connection; undefined lets the
participants decide. A nested operation always joins the transaction of the outermost one.