@octaviaflow/flow-rules 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -0
- package/dist/index.js +3010 -28
- package/package.json +14 -5
- package/dist/catalog/actions/console-log/config.js +0 -70
- package/dist/catalog/actions/console-log/index.js +0 -89
- package/dist/catalog/actions/delay/config.js +0 -79
- package/dist/catalog/actions/delay/index.js +0 -71
- package/dist/catalog/actions/delay/migrate.js +0 -38
- package/dist/catalog/actions/delay/types.js +0 -17
- package/dist/catalog/actions/http-request/config.js +0 -111
- package/dist/catalog/actions/http-request/index.js +0 -223
- package/dist/catalog/ai/ai-agent/index.js +0 -72
- package/dist/catalog/ai/idp-extract/index.js +0 -90
- package/dist/catalog/api/graphql-query/config.js +0 -31
- package/dist/catalog/api/graphql-query/index.js +0 -75
- package/dist/catalog/communication/email-send/config.js +0 -80
- package/dist/catalog/communication/email-send/index.js +0 -152
- package/dist/catalog/communication/google-chat/config.js +0 -28
- package/dist/catalog/communication/google-chat/index.js +0 -36
- package/dist/catalog/communication/slack-message/config.js +0 -36
- package/dist/catalog/communication/slack-message/index.js +0 -37
- package/dist/catalog/communication/teams-message/config.js +0 -29
- package/dist/catalog/communication/teams-message/index.js +0 -39
- package/dist/catalog/communication/webhook-call/config.js +0 -31
- package/dist/catalog/communication/webhook-call/index.js +0 -43
- package/dist/catalog/communication/whatsapp-send/config.js +0 -36
- package/dist/catalog/communication/whatsapp-send/index.js +0 -57
- package/dist/catalog/general/query/config.js +0 -257
- package/dist/catalog/general/query/index.js +0 -271
- package/dist/catalog/general/query/types.js +0 -82
- package/dist/catalog/general/transform/config.js +0 -95
- package/dist/catalog/general/transform/index.js +0 -63
- package/dist/catalog/index.js +0 -168
- package/dist/catalog/logic/condition/config.js +0 -93
- package/dist/catalog/logic/condition/index.js +0 -64
- package/dist/catalog/logic/for-each/config.js +0 -75
- package/dist/catalog/logic/for-each/index.js +0 -92
- package/dist/catalog/logic/for-each/pathOptions.js +0 -151
- package/dist/catalog/logic/group/index.js +0 -46
- package/dist/catalog/policies.js +0 -62
- package/dist/catalog/storage/csv-action/index.js +0 -38
- package/dist/catalog/storage/dropbox-action/index.js +0 -33
- package/dist/catalog/storage/excel-action/index.js +0 -32
- package/dist/catalog/storage/file-action/index.js +0 -119
- package/dist/catalog/storage/file-operation/config.js +0 -45
- package/dist/catalog/storage/file-operation/index.js +0 -111
- package/dist/catalog/storage/ftp-action/index.js +0 -33
- package/dist/catalog/storage/google-drive-action/index.js +0 -38
- package/dist/catalog/storage/json-action/index.js +0 -31
- package/dist/catalog/storage/onedrive-action/index.js +0 -33
- package/dist/catalog/storage/s3-action/index.js +0 -36
- package/dist/catalog/storage/storage-action/index.js +0 -72
- package/dist/catalog/storage/storageCapabilities.js +0 -207
- package/dist/catalog/storage/xml-action/index.js +0 -31
- package/dist/catalog/transforms/format/config.js +0 -19
- package/dist/catalog/transforms/format/index.js +0 -39
- package/dist/catalog/triggers/connector-trigger/index.js +0 -72
- package/dist/catalog/triggers/manual-trigger/config.js +0 -60
- package/dist/catalog/triggers/manual-trigger/index.js +0 -74
- package/dist/catalog/triggers/schedule-trigger/config.js +0 -42
- package/dist/catalog/triggers/schedule-trigger/index.js +0 -102
- package/dist/catalog/triggers/webhook-trigger/config.js +0 -27
- package/dist/catalog/triggers/webhook-trigger/index.js +0 -89
- package/dist/catalog/types.js +0 -135
- package/dist/catalog/utility/debug/config.js +0 -90
- package/dist/catalog/utility/debug/index.js +0 -38
- package/dist/catalog/utility/error/config.js +0 -25
- package/dist/catalog/utility/error/index.js +0 -46
- package/dist/catalog/utility/variables/config.js +0 -70
- package/dist/catalog/utility/variables/index.js +0 -40
- package/dist/catalog/workflow.js +0 -25
- package/dist/ids.js +0 -53
- package/dist/rules/nodeConfigStatus.js +0 -217
- package/dist/rules/workflowValidator.js +0 -358
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTP Request Action
|
|
3
|
-
*
|
|
4
|
-
* Make HTTP requests to external APIs and services
|
|
5
|
-
*/
|
|
6
|
-
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
7
|
-
export const httpRequestDefinition = {
|
|
8
|
-
id: 'http_request',
|
|
9
|
-
name: 'HTTP Request',
|
|
10
|
-
description: 'Make HTTP requests to external APIs and services',
|
|
11
|
-
category: ActionCategory.API,
|
|
12
|
-
type: ActionType.HTTPRequest,
|
|
13
|
-
tags: ['api', 'http', 'request', 'built-in'],
|
|
14
|
-
status: ActionStatus.Stable,
|
|
15
|
-
icon: 'CloudUpload',
|
|
16
|
-
color: '#0043ce',
|
|
17
|
-
inputSchema: {
|
|
18
|
-
fields: [
|
|
19
|
-
{
|
|
20
|
-
key: 'apiType',
|
|
21
|
-
label: 'API Type',
|
|
22
|
-
type: FieldType.Select,
|
|
23
|
-
description: 'Type of API request to make',
|
|
24
|
-
defaultValue: 'rest',
|
|
25
|
-
options: [
|
|
26
|
-
{ label: 'REST', value: 'rest' },
|
|
27
|
-
{ label: 'GraphQL', value: 'graphql' },
|
|
28
|
-
],
|
|
29
|
-
validation: { required: true },
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
key: 'method',
|
|
33
|
-
label: 'Method',
|
|
34
|
-
type: FieldType.Select,
|
|
35
|
-
description: 'HTTP method to use (REST only)',
|
|
36
|
-
defaultValue: 'GET',
|
|
37
|
-
options: [
|
|
38
|
-
{ label: 'GET', value: 'GET' },
|
|
39
|
-
{ label: 'POST', value: 'POST' },
|
|
40
|
-
{ label: 'PUT', value: 'PUT' },
|
|
41
|
-
{ label: 'PATCH', value: 'PATCH' },
|
|
42
|
-
{ label: 'DELETE', value: 'DELETE' },
|
|
43
|
-
{ label: 'HEAD', value: 'HEAD' },
|
|
44
|
-
{ label: 'OPTIONS', value: 'OPTIONS' },
|
|
45
|
-
],
|
|
46
|
-
validation: { required: false },
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
key: 'url',
|
|
50
|
-
label: 'URL',
|
|
51
|
-
type: FieldType.URL,
|
|
52
|
-
description: 'The URL to send the request to. Supports {{variable}} interpolation.',
|
|
53
|
-
placeholder: 'https://api.example.com/endpoint',
|
|
54
|
-
validation: { required: true },
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
key: 'headers',
|
|
58
|
-
label: 'Headers',
|
|
59
|
-
type: FieldType.JSON,
|
|
60
|
-
description: 'HTTP headers (JSON object or key-value array). Supports {{variable}} interpolation.',
|
|
61
|
-
defaultValue: {},
|
|
62
|
-
validation: { required: false },
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
key: 'body',
|
|
66
|
-
label: 'Request Body',
|
|
67
|
-
type: FieldType.JSON,
|
|
68
|
-
description: 'Request body for POST/PUT/PATCH. Supports {{variable}} interpolation.',
|
|
69
|
-
validation: { required: false },
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
key: 'graphqlQuery',
|
|
73
|
-
label: 'GraphQL Query',
|
|
74
|
-
type: FieldType.String,
|
|
75
|
-
description: 'GraphQL query or mutation string (GraphQL only)',
|
|
76
|
-
validation: { required: false },
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
key: 'graphqlVariables',
|
|
80
|
-
label: 'GraphQL Variables',
|
|
81
|
-
type: FieldType.JSON,
|
|
82
|
-
description: 'GraphQL variables object. Supports {{variable}} interpolation.',
|
|
83
|
-
defaultValue: {},
|
|
84
|
-
validation: { required: false },
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
key: 'auth',
|
|
88
|
-
label: 'Authentication',
|
|
89
|
-
type: FieldType.JSON,
|
|
90
|
-
description: 'Authentication config: { type: "none"|"basic"|"bearer"|"apikey", token?, username?, password?, apiKeyName?, apiKeyValue?, apiKeyLocation? }',
|
|
91
|
-
defaultValue: { type: 'none' },
|
|
92
|
-
validation: { required: false },
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
key: 'timeout',
|
|
96
|
-
label: 'Timeout (ms)',
|
|
97
|
-
type: FieldType.Number,
|
|
98
|
-
description: 'Request timeout in milliseconds',
|
|
99
|
-
defaultValue: 30000,
|
|
100
|
-
validation: { required: false, min: 1000 },
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
key: 'failOnError',
|
|
104
|
-
label: 'Fail on non-2xx',
|
|
105
|
-
type: FieldType.Boolean,
|
|
106
|
-
description: 'If true, step fails when response status is not 2xx. Default: true.',
|
|
107
|
-
defaultValue: true,
|
|
108
|
-
validation: { required: false },
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
key: 'responseType',
|
|
112
|
-
label: 'Response Type',
|
|
113
|
-
type: FieldType.Select,
|
|
114
|
-
description: 'How to parse the response body. JSON tries to parse as JSON; Text returns raw text; Binary returns Uint8Array bytes plus fileName/contentType/size.',
|
|
115
|
-
defaultValue: 'json',
|
|
116
|
-
options: [
|
|
117
|
-
{ label: 'JSON', value: 'json' },
|
|
118
|
-
{ label: 'Text', value: 'text' },
|
|
119
|
-
{ label: 'Binary', value: 'binary' },
|
|
120
|
-
],
|
|
121
|
-
validation: { required: false },
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
key: 'expectedContentTypes',
|
|
125
|
-
label: 'Expected Content-Types',
|
|
126
|
-
type: FieldType.JSON,
|
|
127
|
-
description: 'Optional array of content-type prefixes (e.g. ["application/pdf"]). Logs a warning if the response content-type does not start with any of these.',
|
|
128
|
-
defaultValue: [],
|
|
129
|
-
validation: { required: false },
|
|
130
|
-
},
|
|
131
|
-
],
|
|
132
|
-
},
|
|
133
|
-
outputSchema: {
|
|
134
|
-
type: 'object',
|
|
135
|
-
properties: [
|
|
136
|
-
{
|
|
137
|
-
key: 'status',
|
|
138
|
-
type: FieldType.Number,
|
|
139
|
-
description: 'HTTP status code',
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
key: 'statusText',
|
|
143
|
-
type: FieldType.String,
|
|
144
|
-
description: 'HTTP status text',
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
key: 'ok',
|
|
148
|
-
type: FieldType.Boolean,
|
|
149
|
-
description: 'True if status is 2xx',
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
key: 'headers',
|
|
153
|
-
type: FieldType.Object,
|
|
154
|
-
description: 'Response headers',
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
key: 'body',
|
|
158
|
-
type: FieldType.JSON,
|
|
159
|
-
description: 'Response body (parsed JSON or raw string)',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
key: 'duration',
|
|
163
|
-
type: FieldType.Number,
|
|
164
|
-
description: 'Request duration in milliseconds',
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
key: 'graphqlErrors',
|
|
168
|
-
type: FieldType.JSON,
|
|
169
|
-
description: 'GraphQL errors array (GraphQL only, present when errors returned)',
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
key: 'pages',
|
|
173
|
-
type: FieldType.Number,
|
|
174
|
-
description: 'Number of pages fetched (pagination only)',
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
key: 'attempts',
|
|
178
|
-
type: FieldType.Number,
|
|
179
|
-
description: 'Total fetch attempts made (includes retries)',
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
key: 'extracted',
|
|
183
|
-
type: FieldType.Object,
|
|
184
|
-
description: 'Named fields extracted from response body via dot-notation paths',
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
key: 'fileName',
|
|
188
|
-
type: FieldType.String,
|
|
189
|
-
description: 'Derived file name (only present when Response Type is Binary). Sourced from Content-Disposition header or URL pathname.',
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
key: 'contentType',
|
|
193
|
-
type: FieldType.String,
|
|
194
|
-
description: 'Response content-type (only present when Response Type is Binary). Defaults to application/octet-stream when missing.',
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
key: 'size',
|
|
198
|
-
type: FieldType.Number,
|
|
199
|
-
description: 'Response body size in bytes (only present when Response Type is Binary).',
|
|
200
|
-
},
|
|
201
|
-
],
|
|
202
|
-
sampleOutput: {
|
|
203
|
-
status: 200,
|
|
204
|
-
statusText: 'OK',
|
|
205
|
-
ok: true,
|
|
206
|
-
headers: { 'content-type': 'application/json' },
|
|
207
|
-
body: { success: true, data: {} },
|
|
208
|
-
duration: 245,
|
|
209
|
-
attempts: 1,
|
|
210
|
-
extracted: {},
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
execution: {
|
|
214
|
-
timeout: 30000,
|
|
215
|
-
retryable: true,
|
|
216
|
-
},
|
|
217
|
-
version: '1.0.0',
|
|
218
|
-
createdAt: '2025-01-01T00:00:00Z',
|
|
219
|
-
updatedAt: '2025-12-15T00:00:00Z',
|
|
220
|
-
createdBy: 'system',
|
|
221
|
-
isOfficial: true,
|
|
222
|
-
testable: true,
|
|
223
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AI Agent Workflow Action — definition (DEV-92, epic DEV-85).
|
|
3
|
-
*
|
|
4
|
-
* Picks a saved Agent (chat or etl) and runs it as a workflow step.
|
|
5
|
-
* Config: { agentId, input?, overrides? }.
|
|
6
|
-
*
|
|
7
|
-
* The actual configuration UI lives in `components/AIAgentActionPanel.tsx`.
|
|
8
|
-
*
|
|
9
|
-
* See:
|
|
10
|
-
*/
|
|
11
|
-
import { ActionCategory, ActionStatus, ActionType, FieldType, } from '../../types';
|
|
12
|
-
export const aiAgentDefinition = {
|
|
13
|
-
id: 'ai_agent',
|
|
14
|
-
name: 'AI Agent',
|
|
15
|
-
description: 'Run a reusable AI agent. Pick a saved agent from /ai/agents; optionally override model, temperature, or instructions per step.',
|
|
16
|
-
category: ActionCategory.AI,
|
|
17
|
-
type: ActionType.AIAgent,
|
|
18
|
-
tags: ['ai', 'agent', 'chat', 'built-in'],
|
|
19
|
-
status: ActionStatus.Stable,
|
|
20
|
-
icon: 'Bot',
|
|
21
|
-
color: '#7c3aed',
|
|
22
|
-
// The configuration UI is a custom panel (see components/AIAgentActionPanel.tsx).
|
|
23
|
-
// Fields below are the storage shape — the panel reads/writes them via
|
|
24
|
-
// setConfig but does NOT auto-render from this schema. This list keeps
|
|
25
|
-
// the action introspectable for downstream tooling (workflow validators,
|
|
26
|
-
// versioning) without duplicating the panel.
|
|
27
|
-
inputSchema: {
|
|
28
|
-
fields: [
|
|
29
|
-
{
|
|
30
|
-
key: 'agentId',
|
|
31
|
-
label: 'Agent',
|
|
32
|
-
type: FieldType.String,
|
|
33
|
-
description: 'Saved Agent public id (e.g. agt_xxx).',
|
|
34
|
-
validation: { required: true },
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
key: 'input',
|
|
38
|
-
label: 'Input',
|
|
39
|
-
type: FieldType.String,
|
|
40
|
-
description: 'Chat agents: a string (template-supported via {{step.field}}). ETL agents: rows array. When blank, falls back to upstream step output.',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
key: 'overrides',
|
|
44
|
-
label: 'Overrides',
|
|
45
|
-
type: FieldType.JSON,
|
|
46
|
-
description: 'Optional per-step overrides of the agent\u2019s own settings: model, temperature, maxTokens, topP, instructions and instructionsMode.',
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
outputSchema: {
|
|
51
|
-
type: 'object',
|
|
52
|
-
properties: [
|
|
53
|
-
{ key: 'text', type: FieldType.String, description: 'Agent response text (chat agents)' },
|
|
54
|
-
{ key: 'rows', type: FieldType.JSON, description: 'Output rows (etl agents)' },
|
|
55
|
-
{ key: 'usage', type: FieldType.JSON, description: 'Token usage + cost: tokensIn, tokensOut, latencyMs, costUsd' },
|
|
56
|
-
{ key: 'model', type: FieldType.String, description: 'Model that produced the response' },
|
|
57
|
-
{ key: 'agentVersion', type: FieldType.Number, description: 'Version of the agent definition that ran' },
|
|
58
|
-
],
|
|
59
|
-
sampleOutput: {
|
|
60
|
-
text: 'Sure — happy to help. What would you like to know?',
|
|
61
|
-
usage: { tokensIn: 42, tokensOut: 18, latencyMs: 612, costUsd: 0.000041 },
|
|
62
|
-
model: 'gpt-4o-mini',
|
|
63
|
-
agentVersion: 3,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
version: '1.0.0',
|
|
67
|
-
createdAt: '2026-05-27T00:00:00Z',
|
|
68
|
-
updatedAt: '2026-05-27T00:00:00Z',
|
|
69
|
-
createdBy: 'system',
|
|
70
|
-
isOfficial: true,
|
|
71
|
-
testable: true,
|
|
72
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IDP — Extract action.
|
|
3
|
-
*
|
|
4
|
-
* Workflow primitive that runs Intelligent Document Processing on files
|
|
5
|
-
* received from an upstream step (HTTP download, FTP get, query result,
|
|
6
|
-
* data stream from any connector that produces files).
|
|
7
|
-
*
|
|
8
|
-
* Engine resolves the configured LLM connector at execution time —
|
|
9
|
-
* same pattern as `_resolvedConnection` for HTTP steps — and calls
|
|
10
|
-
* the document-extraction service once per file. Results emit as one
|
|
11
|
-
* row per source file: { fileName, data, confidence, audit, error? }.
|
|
12
|
-
*
|
|
13
|
-
* The action does NOT take file uploads of its own. Wire an upstream
|
|
14
|
-
* step that emits files with `{ fileName, body | s3Key, contentType }`
|
|
15
|
-
* (HTTP binary response, FTP/Storage download, etc.) into this step.
|
|
16
|
-
*/
|
|
17
|
-
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
18
|
-
export const idpExtractDefinition = {
|
|
19
|
-
id: 'idp_extract',
|
|
20
|
-
name: 'IDP',
|
|
21
|
-
description: 'Extract structured data from documents received from an upstream step. Configure the model provider, model, and the JSON Schema to extract.',
|
|
22
|
-
category: ActionCategory.AI,
|
|
23
|
-
type: ActionType.IdpExtract,
|
|
24
|
-
tags: ['ai', 'idp', 'document', 'extract', 'built-in'],
|
|
25
|
-
status: ActionStatus.Stable,
|
|
26
|
-
icon: 'DocumentImport',
|
|
27
|
-
color: '#0F62FE',
|
|
28
|
-
inputSchema: {
|
|
29
|
-
fields: [
|
|
30
|
-
{
|
|
31
|
-
key: 'llmConnectorId',
|
|
32
|
-
label: 'Model provider (connector)',
|
|
33
|
-
type: FieldType.Select,
|
|
34
|
-
description: 'Connected AI provider (OpenAI, Anthropic, Gemini, …). Resolved at execution time.',
|
|
35
|
-
validation: { required: true },
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
key: 'model',
|
|
39
|
-
label: 'Model',
|
|
40
|
-
type: FieldType.Select,
|
|
41
|
-
description: 'LLM available on the selected provider (e.g. gpt-4o, claude-3.5-sonnet, gemini-2.0-flash). Vision-capable models recommended.',
|
|
42
|
-
validation: { required: true },
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
key: 'expectedSchema',
|
|
46
|
-
label: 'Output schema',
|
|
47
|
-
type: FieldType.JSON,
|
|
48
|
-
description: 'JSON Schema describing the fields to extract. The LLM is forced to emit JSON matching this shape.',
|
|
49
|
-
// NOT required (DEV-220 rules parity, PO decision 2026-07-16): the
|
|
50
|
-
// schema is either LLM-generated at run time or user-supplied — an
|
|
51
|
-
// empty value is a valid "let the LLM infer it" configuration, so
|
|
52
|
-
// the rules engine must not flag it.
|
|
53
|
-
validation: { required: false },
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
key: 'systemPromptOverride',
|
|
57
|
-
label: 'System prompt override',
|
|
58
|
-
type: FieldType.String,
|
|
59
|
-
description: 'Optional extra instructions appended to the extraction prompt.',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
key: 'strategy',
|
|
63
|
-
label: 'Strategy',
|
|
64
|
-
type: FieldType.Select,
|
|
65
|
-
description: 'vision-direct sends the file as an image to a vision LLM. auto picks based on PDF text content.',
|
|
66
|
-
defaultValue: 'vision-direct',
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
},
|
|
70
|
-
outputSchema: {
|
|
71
|
-
type: 'object',
|
|
72
|
-
properties: [
|
|
73
|
-
{ key: 'state', type: FieldType.String, description: 'Aggregate state — completed | partial-success | failed.' },
|
|
74
|
-
{
|
|
75
|
-
key: 'pages',
|
|
76
|
-
type: FieldType.Array,
|
|
77
|
-
description: 'One row per file received from upstream: { fileName, data, confidence, audit, error? }',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
key: 'totals',
|
|
81
|
-
type: FieldType.Object,
|
|
82
|
-
description: 'Summary { pages, completed, failed }',
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
},
|
|
86
|
-
version: '2.0.0',
|
|
87
|
-
createdAt: '2026-05-06T00:00:00Z',
|
|
88
|
-
updatedAt: '2026-05-10T00:00:00Z',
|
|
89
|
-
createdBy: 'system',
|
|
90
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GraphQL Query Configuration
|
|
3
|
-
*/
|
|
4
|
-
export const GraphQLQueryConfig = {
|
|
5
|
-
defaults: {
|
|
6
|
-
endpoint: '',
|
|
7
|
-
query: '',
|
|
8
|
-
variables: {},
|
|
9
|
-
headers: {},
|
|
10
|
-
},
|
|
11
|
-
schema: {
|
|
12
|
-
endpoint: { type: 'url', required: true },
|
|
13
|
-
query: { type: 'code', required: true },
|
|
14
|
-
variables: { type: 'json', required: false },
|
|
15
|
-
headers: { type: 'json', required: false },
|
|
16
|
-
},
|
|
17
|
-
validate: (config) => {
|
|
18
|
-
const errors = [];
|
|
19
|
-
if (!config.endpoint)
|
|
20
|
-
errors.push('Endpoint is required');
|
|
21
|
-
if (!config.query)
|
|
22
|
-
errors.push('Query is required');
|
|
23
|
-
return { valid: errors.length === 0, errors };
|
|
24
|
-
},
|
|
25
|
-
merge: (userConfig) => {
|
|
26
|
-
return { ...GraphQLQueryConfig.defaults, ...userConfig };
|
|
27
|
-
},
|
|
28
|
-
getLabel: (config) => {
|
|
29
|
-
return `GraphQL: ${config.endpoint}`;
|
|
30
|
-
},
|
|
31
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GraphQL Query Action
|
|
3
|
-
*
|
|
4
|
-
* Execute GraphQL queries against GraphQL endpoints
|
|
5
|
-
*/
|
|
6
|
-
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
7
|
-
export const graphqlQueryDefinition = {
|
|
8
|
-
id: 'graphql_query',
|
|
9
|
-
name: 'GraphQL Query',
|
|
10
|
-
description: 'Execute GraphQL queries against GraphQL endpoints',
|
|
11
|
-
category: ActionCategory.API,
|
|
12
|
-
type: ActionType.GraphQLQuery,
|
|
13
|
-
tags: ['api', 'graphql', 'query', 'built-in'],
|
|
14
|
-
status: ActionStatus.Stable,
|
|
15
|
-
icon: 'GraphQL',
|
|
16
|
-
color: '#0043ce',
|
|
17
|
-
inputSchema: {
|
|
18
|
-
fields: [
|
|
19
|
-
{
|
|
20
|
-
key: 'endpoint',
|
|
21
|
-
label: 'GraphQL Endpoint',
|
|
22
|
-
type: FieldType.URL,
|
|
23
|
-
description: 'GraphQL endpoint URL',
|
|
24
|
-
validation: { required: true },
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
key: 'query',
|
|
28
|
-
label: 'Query',
|
|
29
|
-
type: FieldType.Code,
|
|
30
|
-
description: 'GraphQL query',
|
|
31
|
-
language: 'json',
|
|
32
|
-
validation: { required: true },
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
key: 'variables',
|
|
36
|
-
label: 'Variables',
|
|
37
|
-
type: FieldType.JSON,
|
|
38
|
-
description: 'Query variables',
|
|
39
|
-
validation: { required: false },
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
key: 'headers',
|
|
43
|
-
label: 'Headers',
|
|
44
|
-
type: FieldType.JSON,
|
|
45
|
-
description: 'HTTP headers',
|
|
46
|
-
validation: { required: false },
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
outputSchema: {
|
|
51
|
-
type: 'object',
|
|
52
|
-
properties: [
|
|
53
|
-
{
|
|
54
|
-
key: 'data',
|
|
55
|
-
type: FieldType.JSON,
|
|
56
|
-
description: 'Query result data',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
key: 'errors',
|
|
60
|
-
type: FieldType.Array,
|
|
61
|
-
description: 'GraphQL errors',
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
sampleOutput: {
|
|
65
|
-
data: { user: { id: '1', name: 'John' } },
|
|
66
|
-
errors: [],
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
version: '1.0.0',
|
|
70
|
-
createdAt: '2025-01-01T00:00:00Z',
|
|
71
|
-
updatedAt: '2025-12-15T00:00:00Z',
|
|
72
|
-
createdBy: 'system',
|
|
73
|
-
isOfficial: true,
|
|
74
|
-
testable: true,
|
|
75
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Email Configuration
|
|
3
|
-
*
|
|
4
|
-
* Only `send` runs today. The other operation values stay in the type so a
|
|
5
|
-
* step saved before DEV-349 still parses — but `validate` rejects them, so the
|
|
6
|
-
* editor shows an error instead of the Engine skipping the step silently.
|
|
7
|
-
*/
|
|
8
|
-
export const EmailConfig = {
|
|
9
|
-
defaults: {
|
|
10
|
-
connection: '',
|
|
11
|
-
operation: 'send',
|
|
12
|
-
to: '',
|
|
13
|
-
cc: '',
|
|
14
|
-
bcc: '',
|
|
15
|
-
subject: '',
|
|
16
|
-
body: '',
|
|
17
|
-
isHtml: false,
|
|
18
|
-
attachments: [],
|
|
19
|
-
folder: 'Inbox',
|
|
20
|
-
query: '',
|
|
21
|
-
limit: 10,
|
|
22
|
-
},
|
|
23
|
-
schema: {
|
|
24
|
-
connection: { type: 'connection', required: true },
|
|
25
|
-
operation: { type: 'select', required: true },
|
|
26
|
-
to: { type: 'string', required: false },
|
|
27
|
-
cc: { type: 'string', required: false },
|
|
28
|
-
bcc: { type: 'string', required: false },
|
|
29
|
-
subject: { type: 'string', required: false },
|
|
30
|
-
body: { type: 'string', required: false },
|
|
31
|
-
isHtml: { type: 'boolean', required: false },
|
|
32
|
-
attachments: { type: 'array', required: false },
|
|
33
|
-
folder: { type: 'string', required: false },
|
|
34
|
-
query: { type: 'string', required: false },
|
|
35
|
-
limit: { type: 'number', required: false },
|
|
36
|
-
},
|
|
37
|
-
validate: (config) => {
|
|
38
|
-
const errors = [];
|
|
39
|
-
if (!config.connection)
|
|
40
|
-
errors.push('Email service connection is required');
|
|
41
|
-
if (!config.operation)
|
|
42
|
-
errors.push('Operation is required');
|
|
43
|
-
// Validate operation-specific requirements
|
|
44
|
-
if (config.operation === 'send') {
|
|
45
|
-
if (!config.to)
|
|
46
|
-
errors.push('Recipient email is required for send operation');
|
|
47
|
-
if (!config.subject)
|
|
48
|
-
errors.push('Subject is required for send operation');
|
|
49
|
-
if (!config.body)
|
|
50
|
-
errors.push('Body is required for send operation');
|
|
51
|
-
}
|
|
52
|
-
else if (config.operation) {
|
|
53
|
-
// Read / Search / Delete / Move / Mark-as-read are not implemented by
|
|
54
|
-
// the Engine (DEV-349). Fail here so the step cannot be saved as valid.
|
|
55
|
-
errors.push('Only Send is available for the Email action right now');
|
|
56
|
-
}
|
|
57
|
-
return { valid: errors.length === 0, errors };
|
|
58
|
-
},
|
|
59
|
-
merge: (userConfig) => {
|
|
60
|
-
return { ...EmailConfig.defaults, ...userConfig };
|
|
61
|
-
},
|
|
62
|
-
getLabel: (config) => {
|
|
63
|
-
switch (config.operation) {
|
|
64
|
-
case 'send':
|
|
65
|
-
return `Email: Send to ${config.to}`;
|
|
66
|
-
case 'read':
|
|
67
|
-
return `Email: Read from ${config.folder}`;
|
|
68
|
-
case 'search':
|
|
69
|
-
return `Email: Search "${config.query}"`;
|
|
70
|
-
case 'delete':
|
|
71
|
-
return `Email: Delete from ${config.folder}`;
|
|
72
|
-
case 'move':
|
|
73
|
-
return `Email: Move to ${config.folder}`;
|
|
74
|
-
case 'mark_read':
|
|
75
|
-
return `Email: Mark as read`;
|
|
76
|
-
default:
|
|
77
|
-
return `Email: ${config.operation}`;
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
};
|