workflow / Exports / ValidationPlugin
Interface: ValidationPlugin
Built-in plugin types for common use cases
Hierarchy
↳
ValidationPlugin
Table of contents
Properties
- name
- version
- description
- config
- beforeNodeCreate
- afterNodeCreate
- beforeNodeUpdate
- afterNodeUpdate
- beforeNodeDelete
- afterNodeDelete
- beforeEdgeCreate
- afterEdgeCreate
- beforeEdgeUpdate
- afterEdgeUpdate
- beforeEdgeDelete
- afterEdgeDelete
- beforeSnapshot
- afterSnapshot
- initialize
- configure
- destroy
- getCapabilities
- healthCheck
- validateNode
- validateEdge
- validateWorkflow
Properties
name
• Readonly name: string
Plugin identification
Inherited from
Defined in
interfaces/workflow-plugin.ts:81
version
• Readonly version: string
Inherited from
Defined in
interfaces/workflow-plugin.ts:82
description
• Readonly description: string
Inherited from
Defined in
interfaces/workflow-plugin.ts:83
config
• config: PluginConfig
Plugin configuration
Inherited from
Defined in
interfaces/workflow-plugin.ts:88
beforeNodeCreate
• Optional beforeNodeCreate: PluginHookHandler<WorkflowNode, WorkflowNode>
Lifecycle hooks (all optional)
Inherited from
WorkflowPlugin.beforeNodeCreate
Defined in
interfaces/workflow-plugin.ts:93
afterNodeCreate
• Optional afterNodeCreate: PluginHookHandler<WorkflowNode, void>
Inherited from
WorkflowPlugin.afterNodeCreate
Defined in
interfaces/workflow-plugin.ts:94
beforeNodeUpdate
• Optional beforeNodeUpdate: PluginHookHandler<{ node: WorkflowNode ; updates: Partial<WorkflowNode> }, Partial<WorkflowNode>>
Inherited from
WorkflowPlugin.beforeNodeUpdate
Defined in
interfaces/workflow-plugin.ts:95
afterNodeUpdate
• Optional afterNodeUpdate: PluginHookHandler<{ oldNode: WorkflowNode ; newNode: WorkflowNode }, void>
Inherited from
WorkflowPlugin.afterNodeUpdate
Defined in
interfaces/workflow-plugin.ts:96
beforeNodeDelete
• Optional beforeNodeDelete: PluginHookHandler<WorkflowNode, boolean>
Inherited from
WorkflowPlugin.beforeNodeDelete
Defined in
interfaces/workflow-plugin.ts:97
afterNodeDelete
• Optional afterNodeDelete: PluginHookHandler<WorkflowNode, void>
Inherited from
WorkflowPlugin.afterNodeDelete
Defined in
interfaces/workflow-plugin.ts:98
beforeEdgeCreate
• Optional beforeEdgeCreate: PluginHookHandler<WorkflowEdge, WorkflowEdge>
Inherited from
WorkflowPlugin.beforeEdgeCreate
Defined in
interfaces/workflow-plugin.ts:100
afterEdgeCreate
• Optional afterEdgeCreate: PluginHookHandler<WorkflowEdge, void>
Inherited from
WorkflowPlugin.afterEdgeCreate
Defined in
interfaces/workflow-plugin.ts:101
beforeEdgeUpdate
• Optional beforeEdgeUpdate: PluginHookHandler<{ edge: WorkflowEdge ; updates: Partial<WorkflowEdge> }, Partial<WorkflowEdge>>
Inherited from
WorkflowPlugin.beforeEdgeUpdate
Defined in
interfaces/workflow-plugin.ts:102
afterEdgeUpdate
• Optional afterEdgeUpdate: PluginHookHandler<{ oldEdge: WorkflowEdge ; newEdge: WorkflowEdge }, void>
Inherited from
WorkflowPlugin.afterEdgeUpdate
Defined in
interfaces/workflow-plugin.ts:103
beforeEdgeDelete
• Optional beforeEdgeDelete: PluginHookHandler<WorkflowEdge, boolean>
Inherited from
WorkflowPlugin.beforeEdgeDelete
Defined in
interfaces/workflow-plugin.ts:104
afterEdgeDelete
• Optional afterEdgeDelete: PluginHookHandler<WorkflowEdge, void>
Inherited from
WorkflowPlugin.afterEdgeDelete
Defined in
interfaces/workflow-plugin.ts:105
beforeSnapshot
• Optional beforeSnapshot: PluginHookHandler<WorkflowSnapshot, WorkflowSnapshot>
Inherited from
Defined in
interfaces/workflow-plugin.ts:107
afterSnapshot
• Optional afterSnapshot: PluginHookHandler<WorkflowSnapshot, void>
Inherited from
Defined in
interfaces/workflow-plugin.ts:108
initialize
• Optional initialize: (context: PluginContext) => void | Promise<void>
Plugin lifecycle methods
Type declaration
▸ (context): void | Promise<void>
Parameters
| Name | Type |
|---|---|
context | PluginContext |
Returns
void | Promise<void>
Inherited from
Defined in
interfaces/workflow-plugin.ts:113
configure
• Optional configure: (config: PluginConfig) => void
Type declaration
▸ (config): void
Parameters
| Name | Type |
|---|---|
config | PluginConfig |
Returns
void
Inherited from
Defined in
interfaces/workflow-plugin.ts:114
destroy
• Optional destroy: () => void | Promise<void>
Type declaration
▸ (): void | Promise<void>
Returns
void | Promise<void>
Inherited from
Defined in
interfaces/workflow-plugin.ts:115
getCapabilities
• Optional getCapabilities: () => { providesNodes?: string[] ; providesEdges?: string[] ; modifiesNodes?: string[] ; modifiesEdges?: string[] }
Plugin capabilities
Type declaration
▸ (): Object
Returns
Object
| Name | Type |
|---|---|
providesNodes? | string[] |
providesEdges? | string[] |
modifiesNodes? | string[] |
modifiesEdges? | string[] |
Inherited from
WorkflowPlugin.getCapabilities
Defined in
interfaces/workflow-plugin.ts:120
healthCheck
• Optional healthCheck: () => Promise<{ healthy: boolean ; message?: string ; details?: Record<string, unknown> }>
Plugin health check
Type declaration
▸ (): Promise<{ healthy: boolean ; message?: string ; details?: Record<string, unknown> }>
Returns
Promise<{ healthy: boolean ; message?: string ; details?: Record<string, unknown> }>
Inherited from
Defined in
interfaces/workflow-plugin.ts:130
validateNode
• Optional validateNode: (node: WorkflowNode) => { valid: boolean ; errors: string[] }
Type declaration
▸ (node): Object
Parameters
| Name | Type |
|---|---|
node | WorkflowNode |
Returns
Object
| Name | Type |
|---|---|
valid | boolean |
errors | string[] |
Defined in
interfaces/workflow-plugin.ts:259
validateEdge
• Optional validateEdge: (edge: WorkflowEdge) => { valid: boolean ; errors: string[] }
Type declaration
▸ (edge): Object
Parameters
| Name | Type |
|---|---|
edge | WorkflowEdge |
Returns
Object
| Name | Type |
|---|---|
valid | boolean |
errors | string[] |
Defined in
interfaces/workflow-plugin.ts:260
validateWorkflow
• Optional validateWorkflow: (snapshot: WorkflowSnapshot) => { valid: boolean ; errors: string[] }
Type declaration
▸ (snapshot): Object
Parameters
| Name | Type |
|---|---|
snapshot | WorkflowSnapshot |
Returns
Object
| Name | Type |
|---|---|
valid | boolean |
errors | string[] |