@octaviaflow/flow-rules 0.1.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/README.md +96 -0
- package/dist/catalog/actions/console-log/config.d.ts +58 -0
- package/dist/catalog/actions/console-log/config.js +70 -0
- package/dist/catalog/actions/console-log/index.d.ts +7 -0
- package/dist/catalog/actions/console-log/index.js +89 -0
- package/dist/catalog/actions/delay/config.d.ts +50 -0
- package/dist/catalog/actions/delay/config.js +79 -0
- package/dist/catalog/actions/delay/index.d.ts +7 -0
- package/dist/catalog/actions/delay/index.js +71 -0
- package/dist/catalog/actions/delay/migrate.d.ts +18 -0
- package/dist/catalog/actions/delay/migrate.js +38 -0
- package/dist/catalog/actions/delay/types.d.ts +58 -0
- package/dist/catalog/actions/delay/types.js +17 -0
- package/dist/catalog/actions/http-request/config.d.ts +114 -0
- package/dist/catalog/actions/http-request/config.js +111 -0
- package/dist/catalog/actions/http-request/index.d.ts +7 -0
- package/dist/catalog/actions/http-request/index.js +223 -0
- package/dist/catalog/ai/ai-agent/index.d.ts +12 -0
- package/dist/catalog/ai/ai-agent/index.js +72 -0
- package/dist/catalog/ai/idp-extract/index.d.ts +18 -0
- package/dist/catalog/ai/idp-extract/index.js +90 -0
- package/dist/catalog/api/graphql-query/config.d.ts +36 -0
- package/dist/catalog/api/graphql-query/config.js +31 -0
- package/dist/catalog/api/graphql-query/index.d.ts +7 -0
- package/dist/catalog/api/graphql-query/index.js +75 -0
- package/dist/catalog/communication/email-send/config.d.ts +80 -0
- package/dist/catalog/communication/email-send/config.js +80 -0
- package/dist/catalog/communication/email-send/index.d.ts +11 -0
- package/dist/catalog/communication/email-send/index.js +152 -0
- package/dist/catalog/communication/google-chat/config.d.ts +45 -0
- package/dist/catalog/communication/google-chat/config.js +28 -0
- package/dist/catalog/communication/google-chat/index.d.ts +5 -0
- package/dist/catalog/communication/google-chat/index.js +36 -0
- package/dist/catalog/communication/slack-message/config.d.ts +47 -0
- package/dist/catalog/communication/slack-message/config.js +36 -0
- package/dist/catalog/communication/slack-message/index.d.ts +5 -0
- package/dist/catalog/communication/slack-message/index.js +37 -0
- package/dist/catalog/communication/teams-message/config.d.ts +48 -0
- package/dist/catalog/communication/teams-message/config.js +29 -0
- package/dist/catalog/communication/teams-message/index.d.ts +5 -0
- package/dist/catalog/communication/teams-message/index.js +39 -0
- package/dist/catalog/communication/webhook-call/config.d.ts +36 -0
- package/dist/catalog/communication/webhook-call/config.js +31 -0
- package/dist/catalog/communication/webhook-call/index.d.ts +5 -0
- package/dist/catalog/communication/webhook-call/index.js +43 -0
- package/dist/catalog/communication/whatsapp-send/config.d.ts +23 -0
- package/dist/catalog/communication/whatsapp-send/config.js +36 -0
- package/dist/catalog/communication/whatsapp-send/index.d.ts +15 -0
- package/dist/catalog/communication/whatsapp-send/index.js +57 -0
- package/dist/catalog/general/query/config.d.ts +36 -0
- package/dist/catalog/general/query/config.js +257 -0
- package/dist/catalog/general/query/index.d.ts +11 -0
- package/dist/catalog/general/query/index.js +271 -0
- package/dist/catalog/general/query/types.d.ts +205 -0
- package/dist/catalog/general/query/types.js +82 -0
- package/dist/catalog/general/transform/config.d.ts +117 -0
- package/dist/catalog/general/transform/config.js +95 -0
- package/dist/catalog/general/transform/index.d.ts +8 -0
- package/dist/catalog/general/transform/index.js +63 -0
- package/dist/catalog/index.d.ts +57 -0
- package/dist/catalog/index.js +168 -0
- package/dist/catalog/logic/condition/config.d.ts +54 -0
- package/dist/catalog/logic/condition/config.js +93 -0
- package/dist/catalog/logic/condition/index.d.ts +7 -0
- package/dist/catalog/logic/condition/index.js +64 -0
- package/dist/catalog/logic/for-each/config.d.ts +100 -0
- package/dist/catalog/logic/for-each/config.js +75 -0
- package/dist/catalog/logic/for-each/index.d.ts +7 -0
- package/dist/catalog/logic/for-each/index.js +92 -0
- package/dist/catalog/logic/for-each/pathOptions.d.ts +62 -0
- package/dist/catalog/logic/for-each/pathOptions.js +151 -0
- package/dist/catalog/logic/group/index.d.ts +15 -0
- package/dist/catalog/logic/group/index.js +46 -0
- package/dist/catalog/policies.d.ts +75 -0
- package/dist/catalog/policies.js +62 -0
- package/dist/catalog/storage/csv-action/index.d.ts +2 -0
- package/dist/catalog/storage/csv-action/index.js +38 -0
- package/dist/catalog/storage/dropbox-action/index.d.ts +2 -0
- package/dist/catalog/storage/dropbox-action/index.js +33 -0
- package/dist/catalog/storage/excel-action/index.d.ts +2 -0
- package/dist/catalog/storage/excel-action/index.js +32 -0
- package/dist/catalog/storage/file-action/index.d.ts +2 -0
- package/dist/catalog/storage/file-action/index.js +119 -0
- package/dist/catalog/storage/file-operation/config.d.ts +48 -0
- package/dist/catalog/storage/file-operation/config.js +45 -0
- package/dist/catalog/storage/file-operation/index.d.ts +8 -0
- package/dist/catalog/storage/file-operation/index.js +111 -0
- package/dist/catalog/storage/ftp-action/index.d.ts +2 -0
- package/dist/catalog/storage/ftp-action/index.js +33 -0
- package/dist/catalog/storage/google-drive-action/index.d.ts +2 -0
- package/dist/catalog/storage/google-drive-action/index.js +38 -0
- package/dist/catalog/storage/json-action/index.d.ts +2 -0
- package/dist/catalog/storage/json-action/index.js +31 -0
- package/dist/catalog/storage/onedrive-action/index.d.ts +2 -0
- package/dist/catalog/storage/onedrive-action/index.js +33 -0
- package/dist/catalog/storage/s3-action/index.d.ts +2 -0
- package/dist/catalog/storage/s3-action/index.js +36 -0
- package/dist/catalog/storage/storage-action/index.d.ts +13 -0
- package/dist/catalog/storage/storage-action/index.js +72 -0
- package/dist/catalog/storage/storageCapabilities.d.ts +57 -0
- package/dist/catalog/storage/storageCapabilities.js +207 -0
- package/dist/catalog/storage/xml-action/index.d.ts +2 -0
- package/dist/catalog/storage/xml-action/index.js +31 -0
- package/dist/catalog/transforms/format/config.d.ts +23 -0
- package/dist/catalog/transforms/format/config.js +19 -0
- package/dist/catalog/transforms/format/index.d.ts +5 -0
- package/dist/catalog/transforms/format/index.js +39 -0
- package/dist/catalog/triggers/connector-trigger/index.d.ts +7 -0
- package/dist/catalog/triggers/connector-trigger/index.js +72 -0
- package/dist/catalog/triggers/manual-trigger/config.d.ts +40 -0
- package/dist/catalog/triggers/manual-trigger/config.js +60 -0
- package/dist/catalog/triggers/manual-trigger/index.d.ts +10 -0
- package/dist/catalog/triggers/manual-trigger/index.js +74 -0
- package/dist/catalog/triggers/schedule-trigger/config.d.ts +42 -0
- package/dist/catalog/triggers/schedule-trigger/config.js +42 -0
- package/dist/catalog/triggers/schedule-trigger/index.d.ts +7 -0
- package/dist/catalog/triggers/schedule-trigger/index.js +102 -0
- package/dist/catalog/triggers/webhook-trigger/config.d.ts +31 -0
- package/dist/catalog/triggers/webhook-trigger/config.js +27 -0
- package/dist/catalog/triggers/webhook-trigger/index.d.ts +7 -0
- package/dist/catalog/triggers/webhook-trigger/index.js +89 -0
- package/dist/catalog/types.d.ts +360 -0
- package/dist/catalog/types.js +135 -0
- package/dist/catalog/utility/debug/config.d.ts +72 -0
- package/dist/catalog/utility/debug/config.js +90 -0
- package/dist/catalog/utility/debug/index.d.ts +11 -0
- package/dist/catalog/utility/debug/index.js +38 -0
- package/dist/catalog/utility/error/config.d.ts +26 -0
- package/dist/catalog/utility/error/config.js +25 -0
- package/dist/catalog/utility/error/index.d.ts +7 -0
- package/dist/catalog/utility/error/index.js +46 -0
- package/dist/catalog/utility/variables/config.d.ts +76 -0
- package/dist/catalog/utility/variables/config.js +70 -0
- package/dist/catalog/utility/variables/index.d.ts +13 -0
- package/dist/catalog/utility/variables/index.js +40 -0
- package/dist/catalog/workflow.d.ts +308 -0
- package/dist/catalog/workflow.js +25 -0
- package/dist/ids.d.ts +31 -0
- package/dist/ids.js +53 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +28 -0
- package/dist/rules/nodeConfigStatus.d.ts +33 -0
- package/dist/rules/nodeConfigStatus.js +217 -0
- package/dist/rules/workflowValidator.d.ts +53 -0
- package/dist/rules/workflowValidator.js +358 -0
- package/package.json +41 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schedule Trigger Configuration
|
|
3
|
+
*/
|
|
4
|
+
export const ScheduleTriggerConfig = {
|
|
5
|
+
defaults: {
|
|
6
|
+
scheduleType: 'interval',
|
|
7
|
+
interval: 60,
|
|
8
|
+
intervalUnit: 'minutes',
|
|
9
|
+
timezone: 'UTC',
|
|
10
|
+
},
|
|
11
|
+
schema: {
|
|
12
|
+
scheduleType: { type: 'select', required: true },
|
|
13
|
+
interval: { type: 'number', required: false, min: 1 },
|
|
14
|
+
intervalUnit: { type: 'select', required: false },
|
|
15
|
+
cronExpression: { type: 'string', required: false },
|
|
16
|
+
timezone: { type: 'string', required: false },
|
|
17
|
+
},
|
|
18
|
+
validate: (config) => {
|
|
19
|
+
const errors = [];
|
|
20
|
+
if (!config.scheduleType) {
|
|
21
|
+
errors.push('Schedule type is required');
|
|
22
|
+
}
|
|
23
|
+
if (config.scheduleType === 'interval') {
|
|
24
|
+
if (!config.interval || config.interval < 1) {
|
|
25
|
+
errors.push('Interval must be at least 1');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (config.scheduleType === 'cron' && !config.cronExpression) {
|
|
29
|
+
errors.push('Cron expression is required');
|
|
30
|
+
}
|
|
31
|
+
return { valid: errors.length === 0, errors };
|
|
32
|
+
},
|
|
33
|
+
merge: (userConfig) => {
|
|
34
|
+
return { ...ScheduleTriggerConfig.defaults, ...userConfig };
|
|
35
|
+
},
|
|
36
|
+
getLabel: (config) => {
|
|
37
|
+
if (config.scheduleType === 'interval') {
|
|
38
|
+
return `Every ${config.interval} ${config.intervalUnit}`;
|
|
39
|
+
}
|
|
40
|
+
return `Schedule: ${config.scheduleType}`;
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schedule Trigger Action
|
|
3
|
+
*
|
|
4
|
+
* Trigger workflows on a schedule using cron expressions or intervals
|
|
5
|
+
*/
|
|
6
|
+
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
7
|
+
export const scheduleTriggerDefinition = {
|
|
8
|
+
id: 'schedule_trigger',
|
|
9
|
+
name: 'Schedule Trigger',
|
|
10
|
+
description: 'Trigger workflow on a schedule using cron or intervals',
|
|
11
|
+
category: ActionCategory.Trigger,
|
|
12
|
+
type: ActionType.Schedule,
|
|
13
|
+
tags: ['trigger', 'schedule', 'cron', 'built-in'],
|
|
14
|
+
status: ActionStatus.Stable,
|
|
15
|
+
icon: 'Time',
|
|
16
|
+
color: '#0f62fe',
|
|
17
|
+
inputSchema: {
|
|
18
|
+
fields: [
|
|
19
|
+
{
|
|
20
|
+
key: 'scheduleType',
|
|
21
|
+
label: 'Schedule Type',
|
|
22
|
+
type: FieldType.Select,
|
|
23
|
+
description: 'Type of schedule',
|
|
24
|
+
defaultValue: 'interval',
|
|
25
|
+
options: [
|
|
26
|
+
{ label: 'Interval', value: 'interval' },
|
|
27
|
+
{ label: 'Cron Expression', value: 'cron' },
|
|
28
|
+
{ label: 'Specific Time', value: 'specific' },
|
|
29
|
+
],
|
|
30
|
+
validation: { required: true },
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: 'interval',
|
|
34
|
+
label: 'Interval',
|
|
35
|
+
type: FieldType.Number,
|
|
36
|
+
description: 'Interval value (used with interval type)',
|
|
37
|
+
validation: { required: false, min: 1 },
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: 'intervalUnit',
|
|
41
|
+
label: 'Interval Unit',
|
|
42
|
+
type: FieldType.Select,
|
|
43
|
+
description: 'Unit for interval (minutes, hours, days)',
|
|
44
|
+
defaultValue: 'minutes',
|
|
45
|
+
options: [
|
|
46
|
+
{ label: 'Minutes', value: 'minutes' },
|
|
47
|
+
{ label: 'Hours', value: 'hours' },
|
|
48
|
+
{ label: 'Days', value: 'days' },
|
|
49
|
+
{ label: 'Weeks', value: 'weeks' },
|
|
50
|
+
],
|
|
51
|
+
validation: { required: false },
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: 'cronExpression',
|
|
55
|
+
label: 'Cron Expression',
|
|
56
|
+
type: FieldType.String,
|
|
57
|
+
description: 'Cron expression (e.g., 0 0 * * * for daily at midnight)',
|
|
58
|
+
placeholder: '0 0 * * *',
|
|
59
|
+
validation: { required: false },
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: 'timezone',
|
|
63
|
+
label: 'Timezone',
|
|
64
|
+
type: FieldType.String,
|
|
65
|
+
description: 'Timezone for schedule (e.g., UTC, America/New_York)',
|
|
66
|
+
defaultValue: 'UTC',
|
|
67
|
+
validation: { required: false },
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
outputSchema: {
|
|
72
|
+
type: 'object',
|
|
73
|
+
properties: [
|
|
74
|
+
{
|
|
75
|
+
key: 'scheduledAt',
|
|
76
|
+
type: FieldType.DateTime,
|
|
77
|
+
description: 'When the schedule was triggered',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
key: 'nextRun',
|
|
81
|
+
type: FieldType.DateTime,
|
|
82
|
+
description: 'When the next run is scheduled',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: 'scheduleType',
|
|
86
|
+
type: FieldType.String,
|
|
87
|
+
description: 'Type of schedule that triggered',
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
sampleOutput: {
|
|
91
|
+
scheduledAt: new Date().toISOString(),
|
|
92
|
+
nextRun: new Date(Date.now() + 3600000).toISOString(),
|
|
93
|
+
scheduleType: 'interval',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
version: '1.0.0',
|
|
97
|
+
createdAt: '2025-01-01T00:00:00Z',
|
|
98
|
+
updatedAt: '2025-12-15T00:00:00Z',
|
|
99
|
+
createdBy: 'system',
|
|
100
|
+
isOfficial: true,
|
|
101
|
+
testable: true,
|
|
102
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webhook Trigger Configuration
|
|
3
|
+
*/
|
|
4
|
+
export interface WebhookTriggerConfigType {
|
|
5
|
+
webhookPath?: string;
|
|
6
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
7
|
+
requireAuth?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const WebhookTriggerConfig: {
|
|
10
|
+
defaults: WebhookTriggerConfigType;
|
|
11
|
+
schema: {
|
|
12
|
+
webhookPath: {
|
|
13
|
+
type: string;
|
|
14
|
+
required: boolean;
|
|
15
|
+
};
|
|
16
|
+
method: {
|
|
17
|
+
type: string;
|
|
18
|
+
required: boolean;
|
|
19
|
+
};
|
|
20
|
+
requireAuth: {
|
|
21
|
+
type: string;
|
|
22
|
+
required: boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
validate: (config: Partial<WebhookTriggerConfigType>) => {
|
|
26
|
+
valid: boolean;
|
|
27
|
+
errors: string[];
|
|
28
|
+
};
|
|
29
|
+
merge: (userConfig: Partial<WebhookTriggerConfigType>) => WebhookTriggerConfigType;
|
|
30
|
+
getLabel: (config: WebhookTriggerConfigType) => string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webhook Trigger Configuration
|
|
3
|
+
*/
|
|
4
|
+
export const WebhookTriggerConfig = {
|
|
5
|
+
defaults: {
|
|
6
|
+
method: 'POST',
|
|
7
|
+
requireAuth: true,
|
|
8
|
+
},
|
|
9
|
+
schema: {
|
|
10
|
+
webhookPath: { type: 'string', required: false },
|
|
11
|
+
method: { type: 'select', required: true },
|
|
12
|
+
requireAuth: { type: 'boolean', required: false },
|
|
13
|
+
},
|
|
14
|
+
validate: (config) => {
|
|
15
|
+
const errors = [];
|
|
16
|
+
if (!config.method) {
|
|
17
|
+
errors.push('HTTP method is required');
|
|
18
|
+
}
|
|
19
|
+
return { valid: errors.length === 0, errors };
|
|
20
|
+
},
|
|
21
|
+
merge: (userConfig) => {
|
|
22
|
+
return { ...WebhookTriggerConfig.defaults, ...userConfig };
|
|
23
|
+
},
|
|
24
|
+
getLabel: (config) => {
|
|
25
|
+
return `Webhook ${config.method}${config.webhookPath ? ` ${config.webhookPath}` : ''}`;
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webhook Trigger Action
|
|
3
|
+
*
|
|
4
|
+
* Trigger workflows via HTTP webhooks
|
|
5
|
+
*/
|
|
6
|
+
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
7
|
+
export const webhookTriggerDefinition = {
|
|
8
|
+
id: 'webhook_trigger',
|
|
9
|
+
name: 'Webhook Trigger',
|
|
10
|
+
description: 'Trigger workflow via HTTP webhook',
|
|
11
|
+
category: ActionCategory.Trigger,
|
|
12
|
+
type: ActionType.Webhook,
|
|
13
|
+
tags: ['trigger', 'webhook', 'http', 'built-in'],
|
|
14
|
+
status: ActionStatus.Stable,
|
|
15
|
+
icon: 'WebhookAlt',
|
|
16
|
+
color: '#0f62fe',
|
|
17
|
+
inputSchema: {
|
|
18
|
+
fields: [
|
|
19
|
+
{
|
|
20
|
+
key: 'webhookPath',
|
|
21
|
+
label: 'Webhook Path',
|
|
22
|
+
type: FieldType.String,
|
|
23
|
+
description: 'Custom path for the webhook URL',
|
|
24
|
+
placeholder: '/my-webhook',
|
|
25
|
+
validation: { required: false },
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: 'method',
|
|
29
|
+
label: 'HTTP Method',
|
|
30
|
+
type: FieldType.Select,
|
|
31
|
+
description: 'Allowed HTTP methods',
|
|
32
|
+
defaultValue: 'POST',
|
|
33
|
+
options: [
|
|
34
|
+
{ label: 'GET', value: 'GET' },
|
|
35
|
+
{ label: 'POST', value: 'POST' },
|
|
36
|
+
{ label: 'PUT', value: 'PUT' },
|
|
37
|
+
{ label: 'PATCH', value: 'PATCH' },
|
|
38
|
+
{ label: 'DELETE', value: 'DELETE' },
|
|
39
|
+
],
|
|
40
|
+
validation: { required: true },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
key: 'requireAuth',
|
|
44
|
+
label: 'Require Authentication',
|
|
45
|
+
type: FieldType.Boolean,
|
|
46
|
+
description: 'Require API key or token for webhook',
|
|
47
|
+
defaultValue: true,
|
|
48
|
+
validation: { required: false },
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
outputSchema: {
|
|
53
|
+
type: 'object',
|
|
54
|
+
properties: [
|
|
55
|
+
{
|
|
56
|
+
key: 'webhookUrl',
|
|
57
|
+
type: FieldType.URL,
|
|
58
|
+
description: 'The generated webhook URL',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: 'method',
|
|
62
|
+
type: FieldType.String,
|
|
63
|
+
description: 'HTTP method used',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: 'payload',
|
|
67
|
+
type: FieldType.JSON,
|
|
68
|
+
description: 'Request payload received',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'headers',
|
|
72
|
+
type: FieldType.Object,
|
|
73
|
+
description: 'Request headers',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
sampleOutput: {
|
|
77
|
+
webhookUrl: 'https://api.example.com/webhooks/trigger-123',
|
|
78
|
+
method: 'POST',
|
|
79
|
+
payload: { data: 'example' },
|
|
80
|
+
headers: { 'content-type': 'application/json' },
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
version: '1.0.0',
|
|
84
|
+
createdAt: '2025-01-01T00:00:00Z',
|
|
85
|
+
updatedAt: '2025-12-15T00:00:00Z',
|
|
86
|
+
createdBy: 'system',
|
|
87
|
+
isOfficial: true,
|
|
88
|
+
testable: true,
|
|
89
|
+
};
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action System Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Complete type definitions for the action system including enums, interfaces, and utilities
|
|
5
|
+
*/
|
|
6
|
+
export declare enum ActionCategory {
|
|
7
|
+
Trigger = "trigger",
|
|
8
|
+
Action = "action",
|
|
9
|
+
Logic = "logic",
|
|
10
|
+
Transform = "transform",
|
|
11
|
+
AI = "ai",
|
|
12
|
+
Database = "database",
|
|
13
|
+
API = "api",
|
|
14
|
+
Storage = "storage",
|
|
15
|
+
FileStorage = "file_storage",
|
|
16
|
+
Communication = "communication",
|
|
17
|
+
CRM = "crm",
|
|
18
|
+
Ecommerce = "ecommerce",
|
|
19
|
+
Marketing = "marketing",
|
|
20
|
+
Analytics = "analytics",
|
|
21
|
+
Productivity = "productivity",
|
|
22
|
+
Custom = "custom",
|
|
23
|
+
Utility = "utility"
|
|
24
|
+
}
|
|
25
|
+
export declare enum ActionType {
|
|
26
|
+
Schedule = "schedule",
|
|
27
|
+
Webhook = "webhook",
|
|
28
|
+
Manual = "manual",
|
|
29
|
+
DataChange = "data_change",
|
|
30
|
+
Event = "event",
|
|
31
|
+
Read = "read",
|
|
32
|
+
Write = "write",
|
|
33
|
+
Update = "update",
|
|
34
|
+
Delete = "delete",
|
|
35
|
+
Query = "query",
|
|
36
|
+
HTTPRequest = "http_request",
|
|
37
|
+
GraphQLQuery = "graphql_query",
|
|
38
|
+
Condition = "condition",
|
|
39
|
+
ForEach = "for_each",
|
|
40
|
+
Group = "group",
|
|
41
|
+
Format = "format",
|
|
42
|
+
AIAgent = "ai_agent",
|
|
43
|
+
Embedding = "embedding",
|
|
44
|
+
VectorSearch = "vector_search",
|
|
45
|
+
ImageGeneration = "image_generation",
|
|
46
|
+
ImageAnalysis = "image_analysis",
|
|
47
|
+
SpeechToText = "speech_to_text",
|
|
48
|
+
TextToSpeech = "text_to_speech",
|
|
49
|
+
Transform = "transform",
|
|
50
|
+
FileOperation = "file_operation",
|
|
51
|
+
FileAction = "file_action",
|
|
52
|
+
CsvAction = "csv_action",
|
|
53
|
+
JsonAction = "json_action",
|
|
54
|
+
XmlAction = "xml_action",
|
|
55
|
+
ExcelAction = "excel_action",
|
|
56
|
+
S3Action = "s3_action",
|
|
57
|
+
FtpAction = "ftp_action",
|
|
58
|
+
GoogleDriveAction = "google_drive_action",
|
|
59
|
+
DropboxAction = "dropbox_action",
|
|
60
|
+
OneDriveAction = "onedrive_action",
|
|
61
|
+
StorageAction = "storage_action",
|
|
62
|
+
EmailSend = "email_send",
|
|
63
|
+
SlackMessage = "slack_message",
|
|
64
|
+
WhatsappSend = "whatsapp_send",
|
|
65
|
+
TeamsMessage = "teams_message",
|
|
66
|
+
GoogleChat = "google_chat",
|
|
67
|
+
WebhookCall = "webhook_call",
|
|
68
|
+
Delay = "delay",
|
|
69
|
+
Wait = "wait",
|
|
70
|
+
Console = "console",
|
|
71
|
+
Debug = "debug",
|
|
72
|
+
Error = "error",
|
|
73
|
+
CustomCode = "custom_code",
|
|
74
|
+
CustomAction = "custom_action",
|
|
75
|
+
IdpExtract = "idp_extract"
|
|
76
|
+
}
|
|
77
|
+
export declare enum ActionStatus {
|
|
78
|
+
Stable = "stable",
|
|
79
|
+
Beta = "beta",
|
|
80
|
+
Alpha = "alpha",
|
|
81
|
+
Experimental = "experimental",
|
|
82
|
+
Deprecated = "deprecated"
|
|
83
|
+
}
|
|
84
|
+
export declare enum FieldType {
|
|
85
|
+
String = "string",
|
|
86
|
+
Number = "number",
|
|
87
|
+
Boolean = "boolean",
|
|
88
|
+
Date = "date",
|
|
89
|
+
DateTime = "datetime",
|
|
90
|
+
Array = "array",
|
|
91
|
+
Object = "object",
|
|
92
|
+
JSON = "json",
|
|
93
|
+
File = "file",
|
|
94
|
+
Image = "image",
|
|
95
|
+
Select = "select",
|
|
96
|
+
MultiSelect = "multi_select",
|
|
97
|
+
Code = "code",
|
|
98
|
+
Expression = "expression",
|
|
99
|
+
Mapping = "mapping",
|
|
100
|
+
Connection = "connection",
|
|
101
|
+
Secret = "secret",
|
|
102
|
+
Color = "color",
|
|
103
|
+
URL = "url",
|
|
104
|
+
Email = "email",
|
|
105
|
+
Phone = "phone",
|
|
106
|
+
RichText = "rich_text",
|
|
107
|
+
Markdown = "markdown"
|
|
108
|
+
}
|
|
109
|
+
export interface FieldValidation {
|
|
110
|
+
required?: boolean;
|
|
111
|
+
min?: number;
|
|
112
|
+
max?: number;
|
|
113
|
+
minLength?: number;
|
|
114
|
+
maxLength?: number;
|
|
115
|
+
pattern?: string;
|
|
116
|
+
custom?: string;
|
|
117
|
+
}
|
|
118
|
+
export interface FieldOption {
|
|
119
|
+
label: string;
|
|
120
|
+
value: string | number;
|
|
121
|
+
description?: string;
|
|
122
|
+
icon?: string;
|
|
123
|
+
disabled?: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface FieldConditional {
|
|
126
|
+
field: string;
|
|
127
|
+
operator: '==' | '!=' | '>' | '<' | '>=' | '<=' | 'in' | 'not_in' | 'contains';
|
|
128
|
+
value: unknown;
|
|
129
|
+
action: 'show' | 'hide' | 'enable' | 'disable' | 'require';
|
|
130
|
+
}
|
|
131
|
+
export interface FieldConfig {
|
|
132
|
+
key: string;
|
|
133
|
+
label: string;
|
|
134
|
+
type: FieldType;
|
|
135
|
+
description?: string;
|
|
136
|
+
placeholder?: string;
|
|
137
|
+
helpText?: string;
|
|
138
|
+
tooltip?: string;
|
|
139
|
+
defaultValue?: unknown;
|
|
140
|
+
value?: unknown;
|
|
141
|
+
options?: FieldOption[];
|
|
142
|
+
optionsSource?: {
|
|
143
|
+
type: 'static' | 'dynamic' | 'api';
|
|
144
|
+
apiEndpoint?: string;
|
|
145
|
+
dependsOn?: string[];
|
|
146
|
+
};
|
|
147
|
+
validation?: FieldValidation;
|
|
148
|
+
hidden?: boolean;
|
|
149
|
+
disabled?: boolean;
|
|
150
|
+
readonly?: boolean;
|
|
151
|
+
advanced?: boolean;
|
|
152
|
+
conditional?: FieldConditional[];
|
|
153
|
+
language?: 'javascript' | 'python' | 'sql' | 'json' | 'markdown';
|
|
154
|
+
mappingSource?: string;
|
|
155
|
+
connectorId?: string;
|
|
156
|
+
itemSchema?: FieldConfig;
|
|
157
|
+
properties?: FieldConfig[];
|
|
158
|
+
}
|
|
159
|
+
export interface FieldGroup {
|
|
160
|
+
id: string;
|
|
161
|
+
label: string;
|
|
162
|
+
description?: string;
|
|
163
|
+
collapsed?: boolean;
|
|
164
|
+
fields: string[];
|
|
165
|
+
}
|
|
166
|
+
export interface ActionIOSchema {
|
|
167
|
+
fields: FieldConfig[];
|
|
168
|
+
groups?: FieldGroup[];
|
|
169
|
+
dynamic?: {
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
source: 'connector' | 'api' | 'function';
|
|
172
|
+
endpoint?: string;
|
|
173
|
+
dependsOn?: string[];
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
export interface ActionOutputProperty {
|
|
177
|
+
key: string;
|
|
178
|
+
type: FieldType;
|
|
179
|
+
description?: string;
|
|
180
|
+
example?: unknown;
|
|
181
|
+
}
|
|
182
|
+
export interface ActionOutputSchema {
|
|
183
|
+
type: 'object' | 'array' | 'string' | 'number' | 'boolean' | 'void';
|
|
184
|
+
properties?: ActionOutputProperty[];
|
|
185
|
+
itemType?: string;
|
|
186
|
+
sampleOutput?: unknown;
|
|
187
|
+
dynamic?: boolean;
|
|
188
|
+
}
|
|
189
|
+
export interface ActionExecutionConfig {
|
|
190
|
+
timeout?: number;
|
|
191
|
+
retryable?: boolean;
|
|
192
|
+
requiresAuth?: boolean;
|
|
193
|
+
costPerExecution?: number;
|
|
194
|
+
rateLimitPerMinute?: number;
|
|
195
|
+
rateLimitPerHour?: number;
|
|
196
|
+
}
|
|
197
|
+
export interface ActionExample {
|
|
198
|
+
name: string;
|
|
199
|
+
description: string;
|
|
200
|
+
inputExample: unknown;
|
|
201
|
+
outputExample: unknown;
|
|
202
|
+
}
|
|
203
|
+
export interface ActionAIMetadata {
|
|
204
|
+
modelProvider?: string;
|
|
205
|
+
defaultModel?: string;
|
|
206
|
+
estimatedTokens?: number;
|
|
207
|
+
estimatedCost?: number;
|
|
208
|
+
supportsStreaming?: boolean;
|
|
209
|
+
}
|
|
210
|
+
export interface ActionRequirements {
|
|
211
|
+
minPlan?: 'free' | 'starter' | 'growth' | 'enterprise';
|
|
212
|
+
permissions?: string[];
|
|
213
|
+
features?: string[];
|
|
214
|
+
}
|
|
215
|
+
export interface ActionDefinition {
|
|
216
|
+
id: string;
|
|
217
|
+
name: string;
|
|
218
|
+
description: string;
|
|
219
|
+
longDescription?: string;
|
|
220
|
+
category: ActionCategory;
|
|
221
|
+
type: ActionType;
|
|
222
|
+
tags: string[];
|
|
223
|
+
status: ActionStatus;
|
|
224
|
+
icon?: string;
|
|
225
|
+
iconString?: string;
|
|
226
|
+
color?: string;
|
|
227
|
+
connectorId?: string;
|
|
228
|
+
inputSchema: ActionIOSchema;
|
|
229
|
+
outputSchema: ActionOutputSchema;
|
|
230
|
+
execution?: ActionExecutionConfig;
|
|
231
|
+
testable?: boolean;
|
|
232
|
+
testInputExample?: unknown;
|
|
233
|
+
documentationUrl?: string;
|
|
234
|
+
videoTutorialUrl?: string;
|
|
235
|
+
examples?: ActionExample[];
|
|
236
|
+
aiMetadata?: ActionAIMetadata;
|
|
237
|
+
requires?: ActionRequirements;
|
|
238
|
+
version: string;
|
|
239
|
+
deprecated?: boolean;
|
|
240
|
+
deprecatedSince?: string;
|
|
241
|
+
replacedBy?: string;
|
|
242
|
+
createdAt: string;
|
|
243
|
+
updatedAt: string;
|
|
244
|
+
createdBy: string;
|
|
245
|
+
isOfficial?: boolean;
|
|
246
|
+
isVerified?: boolean;
|
|
247
|
+
isCommunity?: boolean;
|
|
248
|
+
author?: string;
|
|
249
|
+
authorUrl?: string;
|
|
250
|
+
usageCount?: number;
|
|
251
|
+
popularityScore?: number;
|
|
252
|
+
}
|
|
253
|
+
export interface ActionCategoryInfo {
|
|
254
|
+
id: ActionCategory;
|
|
255
|
+
label: string;
|
|
256
|
+
description: string;
|
|
257
|
+
icon: string;
|
|
258
|
+
order: number;
|
|
259
|
+
}
|
|
260
|
+
export interface ActionLibrary {
|
|
261
|
+
actions: ActionDefinition[];
|
|
262
|
+
categories: ActionCategoryInfo[];
|
|
263
|
+
featured: string[];
|
|
264
|
+
recommended: string[];
|
|
265
|
+
recentlyUsed?: string[];
|
|
266
|
+
customActions?: ActionDefinition[];
|
|
267
|
+
version: string;
|
|
268
|
+
lastUpdated: string;
|
|
269
|
+
}
|
|
270
|
+
export interface ActionErrorHandler {
|
|
271
|
+
type: 'skip' | 'retry' | 'goto' | 'fail';
|
|
272
|
+
gotoStepId?: string;
|
|
273
|
+
retries?: number;
|
|
274
|
+
}
|
|
275
|
+
export interface ActionValidationError {
|
|
276
|
+
field: string;
|
|
277
|
+
message: string;
|
|
278
|
+
}
|
|
279
|
+
export interface ActionInstance {
|
|
280
|
+
id: string;
|
|
281
|
+
actionDefinitionId: string;
|
|
282
|
+
name: string;
|
|
283
|
+
description?: string;
|
|
284
|
+
notes?: string;
|
|
285
|
+
config: Record<string, unknown>;
|
|
286
|
+
timeout?: number;
|
|
287
|
+
retries?: number;
|
|
288
|
+
retryDelay?: number;
|
|
289
|
+
condition?: string;
|
|
290
|
+
continueOnError?: boolean;
|
|
291
|
+
errorHandler?: ActionErrorHandler;
|
|
292
|
+
position: {
|
|
293
|
+
x: number;
|
|
294
|
+
y: number;
|
|
295
|
+
};
|
|
296
|
+
expanded?: boolean;
|
|
297
|
+
minimized?: boolean;
|
|
298
|
+
isValid?: boolean;
|
|
299
|
+
validationErrors?: ActionValidationError[];
|
|
300
|
+
createdAt: string;
|
|
301
|
+
updatedAt: string;
|
|
302
|
+
}
|
|
303
|
+
export interface ActionTestResult {
|
|
304
|
+
success: boolean;
|
|
305
|
+
output?: unknown;
|
|
306
|
+
error?: string;
|
|
307
|
+
duration?: number;
|
|
308
|
+
cost?: number;
|
|
309
|
+
}
|
|
310
|
+
export interface DynamicSchemaRequest {
|
|
311
|
+
actionDefinitionId: string;
|
|
312
|
+
dependentValues: Record<string, unknown>;
|
|
313
|
+
}
|
|
314
|
+
export interface DynamicSchemaResponse {
|
|
315
|
+
fields: FieldConfig[];
|
|
316
|
+
}
|
|
317
|
+
export interface AIFieldMappingSuggestion {
|
|
318
|
+
mappings: Record<string, string>;
|
|
319
|
+
confidence: Record<string, number>;
|
|
320
|
+
}
|
|
321
|
+
export interface ActionConnection {
|
|
322
|
+
from: string;
|
|
323
|
+
to: string;
|
|
324
|
+
condition?: string;
|
|
325
|
+
}
|
|
326
|
+
export type TriggerAction = ActionDefinition & {
|
|
327
|
+
category: ActionCategory.Trigger;
|
|
328
|
+
};
|
|
329
|
+
export type AIAction = ActionDefinition & {
|
|
330
|
+
category: ActionCategory.AI;
|
|
331
|
+
};
|
|
332
|
+
export type DatabaseAction = ActionDefinition & {
|
|
333
|
+
category: ActionCategory.Database;
|
|
334
|
+
};
|
|
335
|
+
export type APIAction = ActionDefinition & {
|
|
336
|
+
category: ActionCategory.API;
|
|
337
|
+
};
|
|
338
|
+
export type LogicAction = ActionDefinition & {
|
|
339
|
+
category: ActionCategory.Logic;
|
|
340
|
+
};
|
|
341
|
+
export type TransformAction = ActionDefinition & {
|
|
342
|
+
category: ActionCategory.Transform;
|
|
343
|
+
};
|
|
344
|
+
export type ConnectorBasedAction = ActionDefinition & {
|
|
345
|
+
connectorId: string;
|
|
346
|
+
};
|
|
347
|
+
export type BuiltInAction = ActionDefinition & {
|
|
348
|
+
connectorId: null | undefined;
|
|
349
|
+
};
|
|
350
|
+
export type ConditionalField = FieldConfig & {
|
|
351
|
+
conditional: FieldConditional[];
|
|
352
|
+
};
|
|
353
|
+
export type DynamicField = FieldConfig & {
|
|
354
|
+
optionsSource: {
|
|
355
|
+
type: 'dynamic' | 'api';
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
export type AdvancedField = FieldConfig & {
|
|
359
|
+
advanced: true;
|
|
360
|
+
};
|