@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,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Operation Configuration
|
|
3
|
+
*
|
|
4
|
+
* Configuration for file operations across any storage platform
|
|
5
|
+
*/
|
|
6
|
+
export interface FileOperationConfigType {
|
|
7
|
+
connection: string;
|
|
8
|
+
operation: 'upload' | 'download' | 'delete' | 'list' | 'copy' | 'move' | 'exists';
|
|
9
|
+
sourcePath?: string;
|
|
10
|
+
destinationPath: string;
|
|
11
|
+
fileContent?: string;
|
|
12
|
+
options?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export declare const FileOperationConfig: {
|
|
15
|
+
defaults: FileOperationConfigType;
|
|
16
|
+
schema: {
|
|
17
|
+
connection: {
|
|
18
|
+
type: string;
|
|
19
|
+
required: boolean;
|
|
20
|
+
};
|
|
21
|
+
operation: {
|
|
22
|
+
type: string;
|
|
23
|
+
required: boolean;
|
|
24
|
+
};
|
|
25
|
+
sourcePath: {
|
|
26
|
+
type: string;
|
|
27
|
+
required: boolean;
|
|
28
|
+
};
|
|
29
|
+
destinationPath: {
|
|
30
|
+
type: string;
|
|
31
|
+
required: boolean;
|
|
32
|
+
};
|
|
33
|
+
fileContent: {
|
|
34
|
+
type: string;
|
|
35
|
+
required: boolean;
|
|
36
|
+
};
|
|
37
|
+
options: {
|
|
38
|
+
type: string;
|
|
39
|
+
required: boolean;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
validate: (config: Partial<FileOperationConfigType>) => {
|
|
43
|
+
valid: boolean;
|
|
44
|
+
errors: string[];
|
|
45
|
+
};
|
|
46
|
+
merge: (userConfig: Partial<FileOperationConfigType>) => FileOperationConfigType;
|
|
47
|
+
getLabel: (config: FileOperationConfigType) => string;
|
|
48
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Operation Configuration
|
|
3
|
+
*
|
|
4
|
+
* Configuration for file operations across any storage platform
|
|
5
|
+
*/
|
|
6
|
+
export const FileOperationConfig = {
|
|
7
|
+
defaults: {
|
|
8
|
+
connection: '',
|
|
9
|
+
operation: 'upload',
|
|
10
|
+
sourcePath: '',
|
|
11
|
+
destinationPath: '',
|
|
12
|
+
fileContent: '',
|
|
13
|
+
options: {},
|
|
14
|
+
},
|
|
15
|
+
schema: {
|
|
16
|
+
connection: { type: 'connection', required: true },
|
|
17
|
+
operation: { type: 'select', required: true },
|
|
18
|
+
sourcePath: { type: 'string', required: false },
|
|
19
|
+
destinationPath: { type: 'string', required: true },
|
|
20
|
+
fileContent: { type: 'string', required: false },
|
|
21
|
+
options: { type: 'json', required: false },
|
|
22
|
+
},
|
|
23
|
+
validate: (config) => {
|
|
24
|
+
const errors = [];
|
|
25
|
+
if (!config.connection)
|
|
26
|
+
errors.push('Storage connection is required');
|
|
27
|
+
if (!config.operation)
|
|
28
|
+
errors.push('Operation is required');
|
|
29
|
+
if (!config.destinationPath)
|
|
30
|
+
errors.push('Destination path is required');
|
|
31
|
+
// Validate operation-specific requirements
|
|
32
|
+
if (config.operation === 'upload' || config.operation === 'copy' || config.operation === 'move') {
|
|
33
|
+
if (!config.sourcePath) {
|
|
34
|
+
errors.push('Source path is required for upload/copy/move operations');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return { valid: errors.length === 0, errors };
|
|
38
|
+
},
|
|
39
|
+
merge: (userConfig) => {
|
|
40
|
+
return { ...FileOperationConfig.defaults, ...userConfig };
|
|
41
|
+
},
|
|
42
|
+
getLabel: (config) => {
|
|
43
|
+
return `${config.operation.toUpperCase()}: ${config.destinationPath}`;
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Operation Action
|
|
3
|
+
*
|
|
4
|
+
* General action for file operations across any storage platform
|
|
5
|
+
* Supports FTP, SFTP, S3, Azure Blob Storage, Google Cloud Storage, etc.
|
|
6
|
+
*/
|
|
7
|
+
import { ActionDefinition } from '../../types';
|
|
8
|
+
export declare const fileOperationDefinition: ActionDefinition;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Operation Action
|
|
3
|
+
*
|
|
4
|
+
* General action for file operations across any storage platform
|
|
5
|
+
* Supports FTP, SFTP, S3, Azure Blob Storage, Google Cloud Storage, etc.
|
|
6
|
+
*/
|
|
7
|
+
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
8
|
+
export const fileOperationDefinition = {
|
|
9
|
+
id: 'file_operation',
|
|
10
|
+
name: 'File Operation',
|
|
11
|
+
description: 'Perform file operations (upload, download, delete, list) across any storage platform',
|
|
12
|
+
category: ActionCategory.Storage,
|
|
13
|
+
type: ActionType.FileOperation,
|
|
14
|
+
tags: ['storage', 'file', 'ftp', 's3', 'azure', 'gcs', 'built-in'],
|
|
15
|
+
status: ActionStatus.Stable,
|
|
16
|
+
icon: 'DocumentExport',
|
|
17
|
+
color: '#0043ce',
|
|
18
|
+
inputSchema: {
|
|
19
|
+
fields: [
|
|
20
|
+
{
|
|
21
|
+
key: 'connection',
|
|
22
|
+
label: 'Storage Connection',
|
|
23
|
+
type: FieldType.Connection,
|
|
24
|
+
description: 'Connection to storage platform (FTP, SFTP, S3, Azure Blob, GCS, etc.)',
|
|
25
|
+
validation: { required: true },
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: 'operation',
|
|
29
|
+
label: 'Operation',
|
|
30
|
+
type: FieldType.Select,
|
|
31
|
+
description: 'Type of file operation',
|
|
32
|
+
options: [
|
|
33
|
+
{ label: 'Upload', value: 'upload' },
|
|
34
|
+
{ label: 'Download', value: 'download' },
|
|
35
|
+
{ label: 'Delete', value: 'delete' },
|
|
36
|
+
{ label: 'List', value: 'list' },
|
|
37
|
+
{ label: 'Copy', value: 'copy' },
|
|
38
|
+
{ label: 'Move', value: 'move' },
|
|
39
|
+
{ label: 'Exists', value: 'exists' },
|
|
40
|
+
],
|
|
41
|
+
defaultValue: 'upload',
|
|
42
|
+
validation: { required: true },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: 'sourcePath',
|
|
46
|
+
label: 'Source Path',
|
|
47
|
+
type: FieldType.String,
|
|
48
|
+
description: 'Source file path or directory (for upload/copy/move)',
|
|
49
|
+
validation: { required: false },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: 'destinationPath',
|
|
53
|
+
label: 'Destination Path',
|
|
54
|
+
type: FieldType.String,
|
|
55
|
+
description: 'Destination file path or directory',
|
|
56
|
+
validation: { required: true },
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
key: 'fileContent',
|
|
60
|
+
label: 'File Content',
|
|
61
|
+
type: FieldType.String,
|
|
62
|
+
description: 'File content to upload (for text files)',
|
|
63
|
+
validation: { required: false },
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: 'options',
|
|
67
|
+
label: 'Options',
|
|
68
|
+
type: FieldType.JSON,
|
|
69
|
+
description: 'Additional options (overwrite, recursive, etc.)',
|
|
70
|
+
validation: { required: false },
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
outputSchema: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: [
|
|
77
|
+
{
|
|
78
|
+
key: 'success',
|
|
79
|
+
type: FieldType.Boolean,
|
|
80
|
+
description: 'Whether operation succeeded',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
key: 'data',
|
|
84
|
+
type: FieldType.JSON,
|
|
85
|
+
description: 'Operation result data (file list, metadata, etc.)',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
key: 'fileCount',
|
|
89
|
+
type: FieldType.Number,
|
|
90
|
+
description: 'Number of files affected',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
key: 'message',
|
|
94
|
+
type: FieldType.String,
|
|
95
|
+
description: 'Operation status message',
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
sampleOutput: {
|
|
99
|
+
success: true,
|
|
100
|
+
data: { files: ['file1.txt', 'file2.txt'] },
|
|
101
|
+
fileCount: 2,
|
|
102
|
+
message: 'Operation completed successfully',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
version: '1.0.0',
|
|
106
|
+
createdAt: '2025-01-01T00:00:00Z',
|
|
107
|
+
updatedAt: '2025-12-15T00:00:00Z',
|
|
108
|
+
createdBy: 'system',
|
|
109
|
+
isOfficial: true,
|
|
110
|
+
testable: true,
|
|
111
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
2
|
+
export const ftpActionDefinition = {
|
|
3
|
+
id: 'ftp_action',
|
|
4
|
+
name: 'FTP / SFTP',
|
|
5
|
+
description: 'Upload, download, list, delete, or move files on FTP/SFTP servers. Select a configured FTP connector, then pick files from the remote file explorer.',
|
|
6
|
+
category: ActionCategory.Storage,
|
|
7
|
+
type: ActionType.FtpAction,
|
|
8
|
+
tags: ['ftp', 'sftp', 'ftps', 'file', 'transfer', 'server', 'built-in'],
|
|
9
|
+
status: ActionStatus.Beta,
|
|
10
|
+
icon: 'DataBackup',
|
|
11
|
+
color: '#005d5d',
|
|
12
|
+
inputSchema: {
|
|
13
|
+
fields: [
|
|
14
|
+
{ key: 'connector', label: 'FTP / SFTP Connection', type: FieldType.Connection, description: 'Select a configured FTP/SFTP connector from Integrations', validation: { required: true } },
|
|
15
|
+
{ key: 'operation', label: 'Operation', type: FieldType.Select, options: [{ label: 'Download File', value: 'download' }, { label: 'Upload File', value: 'upload' }, { label: 'List Files', value: 'list' }, { label: 'Delete File', value: 'delete' }, { label: 'Move / Rename', value: 'move' }], defaultValue: 'download', validation: { required: true } },
|
|
16
|
+
{ key: 'remotePath', label: 'Remote Path', type: FieldType.String, description: 'File or folder path on the server (use file explorer to browse)' },
|
|
17
|
+
{ key: 'content', label: 'File Content (Upload)', type: FieldType.String, description: 'Content to upload — use FX token from upstream step' },
|
|
18
|
+
{ key: 'fileName', label: 'File Name (Upload)', type: FieldType.String, description: 'Name for the uploaded file' },
|
|
19
|
+
{ key: 'destPath', label: 'Destination Path (Move)', type: FieldType.String, description: 'New path for moved/renamed file' },
|
|
20
|
+
{ key: 'ifExists', label: 'If File Exists', type: FieldType.Select, options: [{ label: 'Overwrite', value: 'overwrite' }, { label: 'Skip', value: 'skip' }], defaultValue: 'overwrite' },
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
outputSchema: {
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: [
|
|
26
|
+
{ key: 'data', type: FieldType.JSON, description: 'Downloaded content, file list, or result' },
|
|
27
|
+
{ key: 'files', type: FieldType.JSON, description: 'List of files (for list op)' },
|
|
28
|
+
{ key: 'success', type: FieldType.Boolean, description: 'Whether operation succeeded' },
|
|
29
|
+
],
|
|
30
|
+
sampleOutput: { success: true, data: 'file content here' },
|
|
31
|
+
},
|
|
32
|
+
version: '1.0.0', createdAt: '2026-03-29T00:00:00Z', updatedAt: '2026-03-29T00:00:00Z', createdBy: 'system', isOfficial: true, testable: false,
|
|
33
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
2
|
+
export const googleDriveActionDefinition = {
|
|
3
|
+
id: 'google_drive_action',
|
|
4
|
+
name: 'Google Drive',
|
|
5
|
+
description: 'Upload, download, list, delete, move, copy, or share files in Google Drive',
|
|
6
|
+
category: ActionCategory.Storage,
|
|
7
|
+
type: ActionType.GoogleDriveAction,
|
|
8
|
+
tags: ['google', 'drive', 'cloud', 'storage', 'upload', 'download', 'built-in'],
|
|
9
|
+
status: ActionStatus.Beta,
|
|
10
|
+
icon: 'CloudUpload',
|
|
11
|
+
color: '#4285F4',
|
|
12
|
+
inputSchema: {
|
|
13
|
+
fields: [
|
|
14
|
+
{ key: 'connector', label: 'Google Account', type: FieldType.Connection, description: 'Select a connected Google Sheets connector (shares Drive access)', validation: { required: true } },
|
|
15
|
+
{ key: 'operation', label: 'Operation', type: FieldType.Select, options: [{ label: 'Upload File', value: 'upload' }, { label: 'Download File', value: 'download' }, { label: 'List Files', value: 'list' }, { label: 'Delete File', value: 'delete' }, { label: 'Move File', value: 'move' }, { label: 'Copy File', value: 'copy' }, { label: 'Share File', value: 'share' }, { label: 'Create Folder', value: 'create_folder' }], defaultValue: 'upload', validation: { required: true } },
|
|
16
|
+
{ key: 'fileId', label: 'File ID / Path', type: FieldType.String, description: 'Google Drive file ID (use file explorer to browse)' },
|
|
17
|
+
{ key: 'folderId', label: 'Folder ID', type: FieldType.String, description: 'Target folder (root if empty)' },
|
|
18
|
+
{ key: 'fileName', label: 'File Name', type: FieldType.String },
|
|
19
|
+
{ key: 'content', label: 'File Content (Upload)', type: FieldType.String, description: 'Content to upload — use FX token from upstream' },
|
|
20
|
+
{ key: 'mimeType', label: 'MIME Type', type: FieldType.String, defaultValue: 'application/octet-stream' },
|
|
21
|
+
{ key: 'destFolderId', label: 'Destination Folder (Move/Copy)', type: FieldType.String },
|
|
22
|
+
{ key: 'shareEmail', label: 'Share With Email', type: FieldType.String },
|
|
23
|
+
{ key: 'shareRole', label: 'Permission', type: FieldType.Select, options: [{ label: 'Viewer', value: 'reader' }, { label: 'Editor', value: 'writer' }], defaultValue: 'reader' },
|
|
24
|
+
{ key: 'query', label: 'Search Query (List)', type: FieldType.String, description: "e.g. name contains 'report'" },
|
|
25
|
+
{ key: 'pageSize', label: 'Max Results', type: FieldType.Number, defaultValue: 50 },
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
outputSchema: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: [
|
|
31
|
+
{ key: 'data', type: FieldType.JSON, description: 'File content, file list, or operation result' },
|
|
32
|
+
{ key: 'fileId', type: FieldType.String, description: 'Google Drive file ID' },
|
|
33
|
+
{ key: 'webViewLink', type: FieldType.String, description: 'Link to view file in browser' },
|
|
34
|
+
],
|
|
35
|
+
sampleOutput: { fileId: '1abc...', webViewLink: 'https://drive.google.com/file/d/1abc.../view' },
|
|
36
|
+
},
|
|
37
|
+
version: '1.0.0', createdAt: '2026-03-28T00:00:00Z', updatedAt: '2026-03-28T00:00:00Z', createdBy: 'system', isOfficial: true, testable: false,
|
|
38
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
2
|
+
export const jsonActionDefinition = {
|
|
3
|
+
id: 'json_action',
|
|
4
|
+
name: 'JSON',
|
|
5
|
+
description: 'Parse JSON/JSONL files into structured records or generate JSON from workflow data',
|
|
6
|
+
category: ActionCategory.Storage,
|
|
7
|
+
type: ActionType.JsonAction,
|
|
8
|
+
tags: ['json', 'jsonl', 'parse', 'generate', 'file', 'format', 'built-in'],
|
|
9
|
+
status: ActionStatus.Stable,
|
|
10
|
+
icon: 'DataStructured',
|
|
11
|
+
color: '#f1c21b',
|
|
12
|
+
inputSchema: {
|
|
13
|
+
fields: [
|
|
14
|
+
{ key: 'operation', label: 'Operation', type: FieldType.Select, options: [{ label: 'Parse (JSON → Records)', value: 'parse' }, { label: 'Generate (Records → JSON)', value: 'generate' }], defaultValue: 'parse', validation: { required: true } },
|
|
15
|
+
{ key: 'format', label: 'Format', type: FieldType.Select, options: [{ label: 'JSON (array)', value: 'json' }, { label: 'JSONL (one object per line)', value: 'jsonl' }], defaultValue: 'json' },
|
|
16
|
+
{ key: 'content', label: 'JSON Content', type: FieldType.String, description: 'Paste JSON content or use FX token from upstream step' },
|
|
17
|
+
{ key: 'prettyPrint', label: 'Pretty Print', type: FieldType.Boolean, description: 'Format output with indentation', defaultValue: true },
|
|
18
|
+
{ key: 'fileName', label: 'Output File Name', type: FieldType.String, defaultValue: 'export.json' },
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
outputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: [
|
|
24
|
+
{ key: 'data', type: FieldType.Array, description: 'Parsed records (parse mode) — loop these with a ForEach. Generated JSON string in generate mode.' },
|
|
25
|
+
{ key: 'columns', type: FieldType.JSON, description: 'Field names' },
|
|
26
|
+
{ key: 'rowCount', type: FieldType.Number, description: 'Number of records' },
|
|
27
|
+
],
|
|
28
|
+
sampleOutput: { data: [{ id: 1, name: 'Widget' }], columns: ['id', 'name'], rowCount: 1 },
|
|
29
|
+
},
|
|
30
|
+
version: '1.0.0', createdAt: '2026-03-28T00:00:00Z', updatedAt: '2026-03-28T00:00:00Z', createdBy: 'system', isOfficial: true, testable: false,
|
|
31
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
2
|
+
export const onedriveActionDefinition = {
|
|
3
|
+
id: 'onedrive_action',
|
|
4
|
+
name: 'OneDrive',
|
|
5
|
+
description: 'Upload, download, list, delete, move, or copy files in Microsoft OneDrive',
|
|
6
|
+
category: ActionCategory.Storage,
|
|
7
|
+
type: ActionType.OneDriveAction,
|
|
8
|
+
tags: ['onedrive', 'microsoft', 'cloud', 'storage', 'built-in'],
|
|
9
|
+
status: ActionStatus.Beta,
|
|
10
|
+
icon: 'CloudUpload',
|
|
11
|
+
color: '#0078D4',
|
|
12
|
+
inputSchema: {
|
|
13
|
+
fields: [
|
|
14
|
+
{ key: 'connector', label: 'Microsoft Account', type: FieldType.Connection, description: 'Select a connected Microsoft/OneDrive account', validation: { required: true } },
|
|
15
|
+
{ key: 'operation', label: 'Operation', type: FieldType.Select, options: [{ label: 'Download File', value: 'download' }, { label: 'Upload File', value: 'upload' }, { label: 'List Files', value: 'list' }, { label: 'Delete', value: 'delete' }, { label: 'Move', value: 'move' }, { label: 'Copy', value: 'copy' }], defaultValue: 'download', validation: { required: true } },
|
|
16
|
+
{ key: 'path', label: 'File / Folder Path', type: FieldType.String, description: 'Path on OneDrive (use file explorer to browse)' },
|
|
17
|
+
{ key: 'itemId', label: 'Item ID', type: FieldType.String, description: 'OneDrive item ID (alternative to path)' },
|
|
18
|
+
{ key: 'content', label: 'File Content (Upload)', type: FieldType.String, description: 'Content to upload — use FX token from upstream' },
|
|
19
|
+
{ key: 'fileName', label: 'File Name (Upload)', type: FieldType.String },
|
|
20
|
+
{ key: 'destPath', label: 'Destination Path (Move/Copy)', type: FieldType.String },
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
outputSchema: {
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: [
|
|
26
|
+
{ key: 'data', type: FieldType.JSON, description: 'File content, list, or metadata' },
|
|
27
|
+
{ key: 'itemId', type: FieldType.String, description: 'OneDrive item ID' },
|
|
28
|
+
{ key: 'webUrl', type: FieldType.String, description: 'Browser URL' },
|
|
29
|
+
],
|
|
30
|
+
sampleOutput: { itemId: 'abc123', webUrl: 'https://onedrive.live.com/...' },
|
|
31
|
+
},
|
|
32
|
+
version: '1.0.0', createdAt: '2026-03-28T00:00:00Z', updatedAt: '2026-03-28T00:00:00Z', createdBy: 'system', isOfficial: true, testable: false,
|
|
33
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
2
|
+
export const s3ActionDefinition = {
|
|
3
|
+
id: 's3_action',
|
|
4
|
+
name: 'AWS S3',
|
|
5
|
+
description: 'Upload, download, list, delete, or copy files in Amazon S3 buckets',
|
|
6
|
+
category: ActionCategory.Storage,
|
|
7
|
+
type: ActionType.S3Action,
|
|
8
|
+
tags: ['s3', 'aws', 'storage', 'cloud', 'bucket', 'upload', 'download', 'built-in'],
|
|
9
|
+
status: ActionStatus.Stable,
|
|
10
|
+
icon: 'CloudUpload',
|
|
11
|
+
color: '#569A31',
|
|
12
|
+
inputSchema: {
|
|
13
|
+
fields: [
|
|
14
|
+
{ key: 'operation', label: 'Operation', type: FieldType.Select, options: [{ label: 'List Files', value: 'list' }, { label: 'Upload File', value: 'upload' }, { label: 'Download File', value: 'download' }, { label: 'Delete File', value: 'delete' }, { label: 'Copy File', value: 'copy' }, { label: 'Move / Rename', value: 'move' }, { label: 'Get Signed URL', value: 'presign' }], defaultValue: 'download', validation: { required: true } },
|
|
15
|
+
{ key: 'bucket', label: 'Bucket Name', type: FieldType.String, description: 'S3 bucket name (defaults to the connector’s bucket)' },
|
|
16
|
+
{ key: 'key', label: 'Object Key (Path)', type: FieldType.String, description: 'S3 object key, e.g. data/reports/monthly.csv' },
|
|
17
|
+
{ key: 'prefix', label: 'Prefix (for List)', type: FieldType.String, description: 'Filter objects by prefix (folder path)' },
|
|
18
|
+
{ key: 'content', label: 'File Content (for Upload)', type: FieldType.String, description: 'Content to upload — use FX token from upstream step' },
|
|
19
|
+
{ key: 'contentType', label: 'Content Type', type: FieldType.String, description: 'MIME type (e.g. text/csv, application/json)', defaultValue: 'application/octet-stream' },
|
|
20
|
+
{ key: 'destBucket', label: 'Destination Bucket (for Copy)', type: FieldType.String },
|
|
21
|
+
{ key: 'destKey', label: 'Destination Key (for Copy)', type: FieldType.String },
|
|
22
|
+
{ key: 'expiresIn', label: 'URL Expiry (seconds)', type: FieldType.Number, description: 'Presigned URL expiry time', defaultValue: 3600 },
|
|
23
|
+
{ key: 'maxKeys', label: 'Max Results (for List)', type: FieldType.Number, defaultValue: 100 },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
outputSchema: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: [
|
|
29
|
+
{ key: 'data', type: FieldType.JSON, description: 'Downloaded content, file list, or operation result' },
|
|
30
|
+
{ key: 'key', type: FieldType.String, description: 'S3 object key' },
|
|
31
|
+
{ key: 'url', type: FieldType.String, description: 'Presigned URL (for presign operation)' },
|
|
32
|
+
],
|
|
33
|
+
sampleOutput: { data: 'file content here', key: 'data/reports/monthly.csv' },
|
|
34
|
+
},
|
|
35
|
+
version: '1.0.0', createdAt: '2026-03-28T00:00:00Z', updatedAt: '2026-03-28T00:00:00Z', createdBy: 'system', isOfficial: true, testable: false,
|
|
36
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ActionDefinition } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Unified Cloud Storage action. One catalog entry for every storage connector
|
|
4
|
+
* (Amazon S3, Dropbox, OneDrive, Google Drive, FTP/SFTP). The provider is the
|
|
5
|
+
* connector you pick; the custom `StorageConfigPanel` adapts the operations +
|
|
6
|
+
* fields to that provider (driven by `storageCapabilities.ts`) and uses the DS
|
|
7
|
+
* FilePicker to browse the connector's real files. Replaces the per-provider
|
|
8
|
+
* actions; existing per-provider nodes still execute (back-compat).
|
|
9
|
+
*
|
|
10
|
+
* The `inputSchema` below is a minimal fallback for generic rendering — the
|
|
11
|
+
* real config UI is the custom panel.
|
|
12
|
+
*/
|
|
13
|
+
export declare const storageActionDefinition: ActionDefinition;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ActionCategory, ActionType, ActionStatus, FieldType } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Unified Cloud Storage action. One catalog entry for every storage connector
|
|
4
|
+
* (Amazon S3, Dropbox, OneDrive, Google Drive, FTP/SFTP). The provider is the
|
|
5
|
+
* connector you pick; the custom `StorageConfigPanel` adapts the operations +
|
|
6
|
+
* fields to that provider (driven by `storageCapabilities.ts`) and uses the DS
|
|
7
|
+
* FilePicker to browse the connector's real files. Replaces the per-provider
|
|
8
|
+
* actions; existing per-provider nodes still execute (back-compat).
|
|
9
|
+
*
|
|
10
|
+
* The `inputSchema` below is a minimal fallback for generic rendering — the
|
|
11
|
+
* real config UI is the custom panel.
|
|
12
|
+
*/
|
|
13
|
+
export const storageActionDefinition = {
|
|
14
|
+
id: 'storage_action',
|
|
15
|
+
name: 'Storage',
|
|
16
|
+
description: 'Browse, transfer, and manage files on any connected storage — cloud (Amazon S3, Google Drive, OneDrive, Dropbox, GCS, Azure Blob) or FTP/SFTP.',
|
|
17
|
+
category: ActionCategory.Storage,
|
|
18
|
+
type: ActionType.StorageAction,
|
|
19
|
+
tags: ['storage', 'files', 's3', 'dropbox', 'onedrive', 'google drive', 'ftp', 'sftp', 'upload', 'download', 'cloud', 'built-in'],
|
|
20
|
+
status: ActionStatus.Stable,
|
|
21
|
+
icon: 'CloudUpload',
|
|
22
|
+
color: '#4F46E5',
|
|
23
|
+
inputSchema: {
|
|
24
|
+
fields: [
|
|
25
|
+
{ key: 'connector', label: 'Storage connector', type: FieldType.Connection, description: 'Pick a connected storage connector — its provider drives the available operations.', validation: { required: true } },
|
|
26
|
+
{
|
|
27
|
+
key: 'operation', label: 'Operation', type: FieldType.Select,
|
|
28
|
+
options: [
|
|
29
|
+
{ label: 'List files', value: 'list' },
|
|
30
|
+
{ label: 'Download file', value: 'download' },
|
|
31
|
+
{ label: 'Upload file', value: 'upload' },
|
|
32
|
+
{ label: 'Delete file', value: 'delete' },
|
|
33
|
+
{ label: 'Copy file', value: 'copy' },
|
|
34
|
+
{ label: 'Move / rename', value: 'move' },
|
|
35
|
+
{ label: 'Get signed URL', value: 'presign' },
|
|
36
|
+
{ label: 'Share', value: 'share' },
|
|
37
|
+
{ label: 'Create folder', value: 'create_folder' },
|
|
38
|
+
{ label: 'Transfer to another connector', value: 'transfer' },
|
|
39
|
+
],
|
|
40
|
+
defaultValue: 'download', validation: { required: true },
|
|
41
|
+
},
|
|
42
|
+
{ key: 'path', label: 'Path', type: FieldType.String, description: 'File or folder path — use the file browser in the panel.' },
|
|
43
|
+
{ key: 'destPath', label: 'Destination path', type: FieldType.String, description: 'Target for copy / move.' },
|
|
44
|
+
{ key: 'content', label: 'File content (for Upload)', type: FieldType.String, description: 'Content to upload — bind an FX token from an upstream step.' },
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
outputSchema: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: [
|
|
50
|
+
{ key: 'operation', type: FieldType.String, description: 'The operation that ran' },
|
|
51
|
+
{ key: 'data', type: FieldType.JSON, description: 'Operation result or downloaded content' },
|
|
52
|
+
{ key: 'files', type: FieldType.JSON, description: 'Listing (for the List operation)' },
|
|
53
|
+
{ key: 'path', type: FieldType.String, description: 'Affected file/folder path' },
|
|
54
|
+
{ key: 'url', type: FieldType.String, description: 'Signed URL (for the Get signed URL operation)' },
|
|
55
|
+
],
|
|
56
|
+
// Listings are normalized across providers (DEV-187): each entry carries a
|
|
57
|
+
// parsed `ext` + best-effort `mimeType` so a ForEach → Condition can filter
|
|
58
|
+
// "only the .csv files" without string-munging the name.
|
|
59
|
+
sampleOutput: {
|
|
60
|
+
operation: 'list',
|
|
61
|
+
files: [
|
|
62
|
+
{ name: 'report.csv', path: '/reports/report.csv', ext: 'csv', mimeType: 'text/csv', type: 'file', size: 2048, modifiedAt: '2026-06-18T10:00:00Z' },
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
version: '1.0.0',
|
|
67
|
+
createdAt: '2026-06-05T00:00:00Z',
|
|
68
|
+
updatedAt: '2026-06-05T00:00:00Z',
|
|
69
|
+
createdBy: 'system',
|
|
70
|
+
isOfficial: true,
|
|
71
|
+
testable: false,
|
|
72
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type StorageOperation = 'list' | 'download' | 'upload' | 'delete' | 'copy' | 'move' | 'presign' | 'share' | 'create_folder' | 'transfer' | 'sync';
|
|
2
|
+
export type StorageFieldType = 'string' | 'number' | 'select' | 'boolean';
|
|
3
|
+
/** A path field rendered via the DS FilePicker (browses the connector). */
|
|
4
|
+
export interface StoragePathField {
|
|
5
|
+
/** Provider-native config key this path is written to. */
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
/** What the FilePicker lets the user pick. */
|
|
9
|
+
selectMode: 'file' | 'folder' | 'both';
|
|
10
|
+
required?: boolean;
|
|
11
|
+
hint?: string;
|
|
12
|
+
}
|
|
13
|
+
/** A non-path field rendered as a normal input. */
|
|
14
|
+
export interface StorageExtraField {
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
type: StorageFieldType;
|
|
18
|
+
options?: {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}[];
|
|
22
|
+
defaultValue?: string | number | boolean;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
/** Tuck behind the "Advanced options" disclosure. */
|
|
25
|
+
advanced?: boolean;
|
|
26
|
+
hint?: string;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface StorageOpSpec {
|
|
30
|
+
value: StorageOperation;
|
|
31
|
+
label: string;
|
|
32
|
+
/** Primary target (rendered via FilePicker). */
|
|
33
|
+
path?: StoragePathField;
|
|
34
|
+
/** Destination target for move/copy (rendered via FilePicker). */
|
|
35
|
+
dest?: StoragePathField;
|
|
36
|
+
/** Shows the multiline content field (uploads). */
|
|
37
|
+
content?: boolean;
|
|
38
|
+
/** Extra inputs (some advanced). */
|
|
39
|
+
fields?: StorageExtraField[];
|
|
40
|
+
}
|
|
41
|
+
export interface StorageProviderSpec {
|
|
42
|
+
connectorId: string;
|
|
43
|
+
label: string;
|
|
44
|
+
/** Whether the connector supports the unified /browse endpoint (FilePicker). */
|
|
45
|
+
browse: boolean;
|
|
46
|
+
operations: StorageOpSpec[];
|
|
47
|
+
}
|
|
48
|
+
export declare const STORAGE_PROVIDERS: Record<string, StorageProviderSpec>;
|
|
49
|
+
/** Connector ids the unified storage action's connector picker offers.
|
|
50
|
+
* Google Sheets shares Drive access (kept in STORAGE_PROVIDERS for browse
|
|
51
|
+
* compat) but it's a spreadsheet/data connector — not a file store — so it's
|
|
52
|
+
* excluded from the picker (a "Google Sheets" app under Storage confuses
|
|
53
|
+
* users). Use the Google Drive connector for file operations. */
|
|
54
|
+
export declare const STORAGE_CONNECTOR_IDS: string[];
|
|
55
|
+
export declare function getStorageProvider(connectorId?: string): StorageProviderSpec | undefined;
|
|
56
|
+
/** All config keys any operation might write — used to clear stale fields when the operation/provider changes. */
|
|
57
|
+
export declare function storageConfigKeys(): string[];
|