@octaviaflow/flow-rules 0.10.0 → 0.11.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/catalog/ai/ai-agent/config.d.ts +68 -0
- package/dist/catalog/ai/idp-extract/config.d.ts +55 -0
- package/dist/catalog/logic/group/config.d.ts +21 -0
- package/dist/catalog/storage/csv-action/config.d.ts +136 -0
- package/dist/catalog/storage/dropbox-action/config.d.ts +85 -0
- package/dist/catalog/storage/excel-action/config.d.ts +127 -0
- package/dist/catalog/storage/file-action/config.d.ts +197 -0
- package/dist/catalog/storage/fileEditContract.d.ts +127 -0
- package/dist/catalog/storage/ftp-action/config.d.ts +85 -0
- package/dist/catalog/storage/google-drive-action/config.d.ts +135 -0
- package/dist/catalog/storage/json-action/config.d.ts +131 -0
- package/dist/catalog/storage/onedrive-action/config.d.ts +94 -0
- package/dist/catalog/storage/s3-action/config.d.ts +122 -0
- package/dist/catalog/storage/storage-action/config.d.ts +78 -0
- package/dist/catalog/storage/xml-action/config.d.ts +123 -0
- package/dist/catalog/triggers/connector-trigger/config.d.ts +110 -0
- package/dist/index.cjs +605 -6
- package/dist/index.d.ts +16 -0
- package/dist/index.js +605 -6
- package/dist/rules/configContracts.d.ts +6 -7
- package/package.json +1 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the file-format actions share.
|
|
3
|
+
*
|
|
4
|
+
* `csv_action`, `json_action`, `xml_action`, `excel_action` and `file_action`
|
|
5
|
+
* are one panel family (CsvConfigPanel + FileEditControls in the editor) and
|
|
6
|
+
* one executor family (`doEditFile` in the Engine). The keys they share when
|
|
7
|
+
* `operation` is `edit` live here once, so five contracts cannot drift from
|
|
8
|
+
* each other the way `index.ts` and `config.ts` once did.
|
|
9
|
+
*
|
|
10
|
+
* Shapes are what the editor WRITES and the Engine READS today — not what
|
|
11
|
+
* either could accept. `setFields` is edited as a list of pairs but stored as
|
|
12
|
+
* an object; `mergeUpdate` is true unless it is exactly `false`.
|
|
13
|
+
*/
|
|
14
|
+
export type FileFormatOperation = 'parse' | 'generate' | 'edit';
|
|
15
|
+
export type FileEditOperation = 'append' | 'update' | 'upsert' | 'set_fields';
|
|
16
|
+
export type FileEditMatchOp = '=' | '!=' | '>' | '<' | '>=' | '<=' | 'contains';
|
|
17
|
+
export type FileEditDestination = 'new' | 'in_place';
|
|
18
|
+
export type FileEditSource = 'inline' | 's3' | 'url';
|
|
19
|
+
export declare const FILE_FORMAT_OPERATIONS: readonly FileFormatOperation[];
|
|
20
|
+
export declare const FILE_EDIT_OPERATIONS: readonly FileEditOperation[];
|
|
21
|
+
export declare const FILE_EDIT_MATCH_OPS: readonly FileEditMatchOp[];
|
|
22
|
+
export declare const FILE_EDIT_DESTINATIONS: readonly FileEditDestination[];
|
|
23
|
+
export declare const FILE_EDIT_SOURCES: readonly FileEditSource[];
|
|
24
|
+
export interface FileEditConfigType {
|
|
25
|
+
/** `append` (default) | `update` | `upsert` | `set_fields`. */
|
|
26
|
+
editOperation?: FileEditOperation;
|
|
27
|
+
/** The column that identifies a row — required by `update` and `upsert`. */
|
|
28
|
+
keyField?: string;
|
|
29
|
+
/** `false` replaces the whole matched row; anything else merges into it. */
|
|
30
|
+
mergeUpdate?: boolean;
|
|
31
|
+
/** `set_fields`: the column the row filter reads. */
|
|
32
|
+
matchField?: string;
|
|
33
|
+
/** `set_fields`: how `matchField` is compared to `matchValue`; `=` by default. */
|
|
34
|
+
matchOp?: FileEditMatchOp;
|
|
35
|
+
/** `set_fields`: the value compared against. */
|
|
36
|
+
matchValue?: string;
|
|
37
|
+
/** `set_fields`: column → new value, applied to every matching row. */
|
|
38
|
+
setFields?: Record<string, string>;
|
|
39
|
+
/** `new` (default) writes an edited copy; `in_place` overwrites an S3 source. */
|
|
40
|
+
destination?: FileEditDestination;
|
|
41
|
+
/** Name of the edited copy when `destination` is `new`. */
|
|
42
|
+
outputFileName?: string;
|
|
43
|
+
/** Where the file to edit comes from; inferred from `content` when absent. */
|
|
44
|
+
source?: FileEditSource;
|
|
45
|
+
/** `source: 's3'` — the platform-bucket key of the file to edit. */
|
|
46
|
+
s3Key?: string;
|
|
47
|
+
/** `source: 'url'` — the file to edit is fetched from here. */
|
|
48
|
+
url?: string;
|
|
49
|
+
}
|
|
50
|
+
/** The shared schema entries, spread into each file-format contract. */
|
|
51
|
+
export declare const FILE_EDIT_SCHEMA: {
|
|
52
|
+
readonly editOperation: {
|
|
53
|
+
readonly type: "select";
|
|
54
|
+
readonly required: false;
|
|
55
|
+
readonly options: readonly FileEditOperation[];
|
|
56
|
+
readonly description: "How the file is edited: append rows, update rows by key, upsert, or set fields on matching rows";
|
|
57
|
+
};
|
|
58
|
+
readonly keyField: {
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
readonly required: false;
|
|
61
|
+
readonly description: "Match key column for update / upsert";
|
|
62
|
+
};
|
|
63
|
+
readonly mergeUpdate: {
|
|
64
|
+
readonly type: "boolean";
|
|
65
|
+
readonly required: false;
|
|
66
|
+
readonly description: "false replaces the whole matched row; default merges";
|
|
67
|
+
};
|
|
68
|
+
readonly matchField: {
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
readonly required: false;
|
|
71
|
+
readonly description: "set_fields: column the row filter reads";
|
|
72
|
+
};
|
|
73
|
+
readonly matchOp: {
|
|
74
|
+
readonly type: "select";
|
|
75
|
+
readonly required: false;
|
|
76
|
+
readonly options: readonly FileEditMatchOp[];
|
|
77
|
+
readonly description: "set_fields: comparison; \"=\" by default";
|
|
78
|
+
};
|
|
79
|
+
readonly matchValue: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly required: false;
|
|
82
|
+
readonly description: "set_fields: value compared against";
|
|
83
|
+
};
|
|
84
|
+
readonly setFields: {
|
|
85
|
+
readonly type: "object";
|
|
86
|
+
readonly required: false;
|
|
87
|
+
readonly description: "set_fields: { column: newValue } applied to matching rows";
|
|
88
|
+
};
|
|
89
|
+
readonly destination: {
|
|
90
|
+
readonly type: "select";
|
|
91
|
+
readonly required: false;
|
|
92
|
+
readonly options: readonly FileEditDestination[];
|
|
93
|
+
readonly description: "\"new\" writes an edited copy (default); \"in_place\" overwrites an S3 source";
|
|
94
|
+
};
|
|
95
|
+
readonly outputFileName: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly required: false;
|
|
98
|
+
readonly description: "Name of the edited copy when destination is \"new\"";
|
|
99
|
+
};
|
|
100
|
+
readonly source: {
|
|
101
|
+
readonly type: "select";
|
|
102
|
+
readonly required: false;
|
|
103
|
+
readonly options: readonly FileEditSource[];
|
|
104
|
+
readonly description: "Where the file to edit comes from; inferred from content when absent";
|
|
105
|
+
};
|
|
106
|
+
readonly s3Key: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
readonly required: false;
|
|
109
|
+
readonly description: "source \"s3\": platform-bucket key of the file to edit";
|
|
110
|
+
};
|
|
111
|
+
readonly url: {
|
|
112
|
+
readonly type: "url";
|
|
113
|
+
readonly required: false;
|
|
114
|
+
readonly description: "source \"url\": the file to edit is fetched from here";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* The errors the Engine would raise for an edit, said before the run. Only
|
|
119
|
+
* what blocks execution — the panel enforces nothing else.
|
|
120
|
+
*/
|
|
121
|
+
export declare function fileEditErrors(config: Partial<FileEditConfigType> & {
|
|
122
|
+
operation?: string;
|
|
123
|
+
}): string[];
|
|
124
|
+
/** `operation` must be one of the three when it is set; absent means `parse`. */
|
|
125
|
+
export declare function fileFormatErrors(config: {
|
|
126
|
+
operation?: string;
|
|
127
|
+
} & Partial<FileEditConfigType>): string[];
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FTP / SFTP Action Configuration (deprecated — `storage_action` replaces it)
|
|
3
|
+
*
|
|
4
|
+
* What FtpConfigPanel writes and the Engine's `runFtp` reads. The Backend adds
|
|
5
|
+
* `_resolvedFtpCredentials` from `connector` at dispatch.
|
|
6
|
+
*/
|
|
7
|
+
export type FtpOperation = 'download' | 'upload' | 'list' | 'delete' | 'move';
|
|
8
|
+
export declare const FTP_OPERATIONS: readonly FtpOperation[];
|
|
9
|
+
export interface FtpActionConfigType {
|
|
10
|
+
/** The FTP/SFTP connector instance (a connection id). */
|
|
11
|
+
connector: string;
|
|
12
|
+
/** `download` when absent. */
|
|
13
|
+
operation?: FtpOperation;
|
|
14
|
+
/** File or folder path on the server (`/` for list when absent). */
|
|
15
|
+
remotePath?: string;
|
|
16
|
+
/** `upload`: the body. */
|
|
17
|
+
content?: string;
|
|
18
|
+
/** `upload`: name when `remotePath` is a folder. */
|
|
19
|
+
fileName?: string;
|
|
20
|
+
/** `move`: the new path. */
|
|
21
|
+
destPath?: string;
|
|
22
|
+
/** `upload`: `overwrite` (default) or `skip` when the file exists. */
|
|
23
|
+
ifExists?: 'overwrite' | 'skip';
|
|
24
|
+
/** `list`: keep only these extensions. */
|
|
25
|
+
fileTypes?: string[];
|
|
26
|
+
/** `list`: keep only names matching this glob. */
|
|
27
|
+
filePattern?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const FtpActionConfig: {
|
|
30
|
+
defaults: FtpActionConfigType;
|
|
31
|
+
schema: {
|
|
32
|
+
connector: {
|
|
33
|
+
type: string;
|
|
34
|
+
required: boolean;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
operation: {
|
|
38
|
+
type: string;
|
|
39
|
+
required: boolean;
|
|
40
|
+
options: readonly FtpOperation[];
|
|
41
|
+
};
|
|
42
|
+
remotePath: {
|
|
43
|
+
type: string;
|
|
44
|
+
required: boolean;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
content: {
|
|
48
|
+
type: string;
|
|
49
|
+
required: boolean;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
fileName: {
|
|
53
|
+
type: string;
|
|
54
|
+
required: boolean;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
destPath: {
|
|
58
|
+
type: string;
|
|
59
|
+
required: boolean;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
ifExists: {
|
|
63
|
+
type: string;
|
|
64
|
+
required: boolean;
|
|
65
|
+
options: string[];
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
fileTypes: {
|
|
69
|
+
type: string;
|
|
70
|
+
required: boolean;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
filePattern: {
|
|
74
|
+
type: string;
|
|
75
|
+
required: boolean;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
validate: (config: Partial<FtpActionConfigType>) => {
|
|
80
|
+
valid: boolean;
|
|
81
|
+
errors: string[];
|
|
82
|
+
};
|
|
83
|
+
merge: (userConfig: Partial<FtpActionConfigType>) => FtpActionConfigType;
|
|
84
|
+
getLabel: (config: FtpActionConfigType) => string;
|
|
85
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Drive Action Configuration (deprecated — `storage_action` replaces it)
|
|
3
|
+
*
|
|
4
|
+
* What GoogleDriveConfigPanel writes and the Engine's `runGoogleDrive` reads.
|
|
5
|
+
* The Backend adds `_resolvedStorageCredentials` from `connector` at dispatch.
|
|
6
|
+
*/
|
|
7
|
+
export type GoogleDriveOperation = 'upload' | 'download' | 'list' | 'delete' | 'move' | 'copy' | 'share' | 'create_folder';
|
|
8
|
+
export declare const GOOGLE_DRIVE_OPERATIONS: readonly GoogleDriveOperation[];
|
|
9
|
+
export interface GoogleDriveActionConfigType {
|
|
10
|
+
/** The Google Drive connector instance (a connection id). */
|
|
11
|
+
connector: string;
|
|
12
|
+
/** `upload` when absent. */
|
|
13
|
+
operation?: GoogleDriveOperation;
|
|
14
|
+
/** download / delete / move / copy / share: the file. */
|
|
15
|
+
fileId?: string;
|
|
16
|
+
/** upload / list / create_folder: the folder (root when empty). */
|
|
17
|
+
folderId?: string;
|
|
18
|
+
/** upload: folder path (`a/b/c`) resolved — or created — when `folderId` is empty. */
|
|
19
|
+
folderName?: string;
|
|
20
|
+
/** upload: name; copy: the copy's name; create_folder: the folder's name. */
|
|
21
|
+
fileName?: string;
|
|
22
|
+
/** upload: the body; pulled from the upstream step when empty. */
|
|
23
|
+
content?: string;
|
|
24
|
+
/** upload: MIME type (`application/octet-stream` by default). */
|
|
25
|
+
mimeType?: string;
|
|
26
|
+
/** upload: create `folderName` when it does not exist (true unless exactly false). */
|
|
27
|
+
createFolderIfNotExists?: boolean;
|
|
28
|
+
/** move / copy: destination folder. */
|
|
29
|
+
destFolderId?: string;
|
|
30
|
+
/** share: who. */
|
|
31
|
+
shareEmail?: string;
|
|
32
|
+
/** share: `reader` (default) or `writer`. */
|
|
33
|
+
shareRole?: 'reader' | 'writer';
|
|
34
|
+
/** list: Drive search query. */
|
|
35
|
+
query?: string;
|
|
36
|
+
/** list: page size (50 by default). */
|
|
37
|
+
pageSize?: number;
|
|
38
|
+
/** list: keep only these extensions. */
|
|
39
|
+
fileTypes?: string[];
|
|
40
|
+
/** list: keep only names matching this glob. */
|
|
41
|
+
filePattern?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const GoogleDriveActionConfig: {
|
|
44
|
+
defaults: GoogleDriveActionConfigType;
|
|
45
|
+
schema: {
|
|
46
|
+
connector: {
|
|
47
|
+
type: string;
|
|
48
|
+
required: boolean;
|
|
49
|
+
description: string;
|
|
50
|
+
};
|
|
51
|
+
operation: {
|
|
52
|
+
type: string;
|
|
53
|
+
required: boolean;
|
|
54
|
+
options: readonly GoogleDriveOperation[];
|
|
55
|
+
};
|
|
56
|
+
fileId: {
|
|
57
|
+
type: string;
|
|
58
|
+
required: boolean;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
folderId: {
|
|
62
|
+
type: string;
|
|
63
|
+
required: boolean;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
folderName: {
|
|
67
|
+
type: string;
|
|
68
|
+
required: boolean;
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
fileName: {
|
|
72
|
+
type: string;
|
|
73
|
+
required: boolean;
|
|
74
|
+
description: string;
|
|
75
|
+
};
|
|
76
|
+
content: {
|
|
77
|
+
type: string;
|
|
78
|
+
required: boolean;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
mimeType: {
|
|
82
|
+
type: string;
|
|
83
|
+
required: boolean;
|
|
84
|
+
description: string;
|
|
85
|
+
};
|
|
86
|
+
createFolderIfNotExists: {
|
|
87
|
+
type: string;
|
|
88
|
+
required: boolean;
|
|
89
|
+
description: string;
|
|
90
|
+
};
|
|
91
|
+
destFolderId: {
|
|
92
|
+
type: string;
|
|
93
|
+
required: boolean;
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
shareEmail: {
|
|
97
|
+
type: string;
|
|
98
|
+
required: boolean;
|
|
99
|
+
description: string;
|
|
100
|
+
};
|
|
101
|
+
shareRole: {
|
|
102
|
+
type: string;
|
|
103
|
+
required: boolean;
|
|
104
|
+
options: string[];
|
|
105
|
+
description: string;
|
|
106
|
+
};
|
|
107
|
+
query: {
|
|
108
|
+
type: string;
|
|
109
|
+
required: boolean;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
pageSize: {
|
|
113
|
+
type: string;
|
|
114
|
+
required: boolean;
|
|
115
|
+
min: number;
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
fileTypes: {
|
|
119
|
+
type: string;
|
|
120
|
+
required: boolean;
|
|
121
|
+
description: string;
|
|
122
|
+
};
|
|
123
|
+
filePattern: {
|
|
124
|
+
type: string;
|
|
125
|
+
required: boolean;
|
|
126
|
+
description: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
validate: (config: Partial<GoogleDriveActionConfigType>) => {
|
|
130
|
+
valid: boolean;
|
|
131
|
+
errors: string[];
|
|
132
|
+
};
|
|
133
|
+
merge: (userConfig: Partial<GoogleDriveActionConfigType>) => GoogleDriveActionConfigType;
|
|
134
|
+
getLabel: (config: GoogleDriveActionConfigType) => string;
|
|
135
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON Action Configuration
|
|
3
|
+
*
|
|
4
|
+
* What JsonConfigPanel writes and the Engine's json_action case reads.
|
|
5
|
+
*/
|
|
6
|
+
import { type FileEditConfigType, type FileFormatOperation } from '../fileEditContract';
|
|
7
|
+
export interface JsonActionConfigType extends FileEditConfigType {
|
|
8
|
+
/** `parse` (default when absent) | `generate` | `edit`. */
|
|
9
|
+
operation: FileFormatOperation;
|
|
10
|
+
/** Legacy alias for `operation`. */
|
|
11
|
+
mode?: string;
|
|
12
|
+
/** `json` (an array, default) or `jsonl` (one object per line). */
|
|
13
|
+
format?: 'json' | 'jsonl';
|
|
14
|
+
/** JSON text, or an FX token from an upstream step. */
|
|
15
|
+
content?: string;
|
|
16
|
+
/** Legacy alias for `content`. */
|
|
17
|
+
inlineContent?: string;
|
|
18
|
+
/** `generate`: indent the output (true unless exactly false). */
|
|
19
|
+
prettyPrint?: boolean;
|
|
20
|
+
/** `generate`: name of the produced file. */
|
|
21
|
+
fileName?: string;
|
|
22
|
+
/** `edit`: the Engine's edit path reads this flag, not `format`, to pick JSONL. */
|
|
23
|
+
jsonl?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const JsonActionConfig: {
|
|
26
|
+
defaults: JsonActionConfigType;
|
|
27
|
+
schema: {
|
|
28
|
+
editOperation: {
|
|
29
|
+
readonly type: "select";
|
|
30
|
+
readonly required: false;
|
|
31
|
+
readonly options: readonly import("../fileEditContract").FileEditOperation[];
|
|
32
|
+
readonly description: "How the file is edited: append rows, update rows by key, upsert, or set fields on matching rows";
|
|
33
|
+
};
|
|
34
|
+
keyField: {
|
|
35
|
+
readonly type: "string";
|
|
36
|
+
readonly required: false;
|
|
37
|
+
readonly description: "Match key column for update / upsert";
|
|
38
|
+
};
|
|
39
|
+
mergeUpdate: {
|
|
40
|
+
readonly type: "boolean";
|
|
41
|
+
readonly required: false;
|
|
42
|
+
readonly description: "false replaces the whole matched row; default merges";
|
|
43
|
+
};
|
|
44
|
+
matchField: {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
readonly required: false;
|
|
47
|
+
readonly description: "set_fields: column the row filter reads";
|
|
48
|
+
};
|
|
49
|
+
matchOp: {
|
|
50
|
+
readonly type: "select";
|
|
51
|
+
readonly required: false;
|
|
52
|
+
readonly options: readonly import("../fileEditContract").FileEditMatchOp[];
|
|
53
|
+
readonly description: "set_fields: comparison; \"=\" by default";
|
|
54
|
+
};
|
|
55
|
+
matchValue: {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
readonly required: false;
|
|
58
|
+
readonly description: "set_fields: value compared against";
|
|
59
|
+
};
|
|
60
|
+
setFields: {
|
|
61
|
+
readonly type: "object";
|
|
62
|
+
readonly required: false;
|
|
63
|
+
readonly description: "set_fields: { column: newValue } applied to matching rows";
|
|
64
|
+
};
|
|
65
|
+
destination: {
|
|
66
|
+
readonly type: "select";
|
|
67
|
+
readonly required: false;
|
|
68
|
+
readonly options: readonly import("../fileEditContract").FileEditDestination[];
|
|
69
|
+
readonly description: "\"new\" writes an edited copy (default); \"in_place\" overwrites an S3 source";
|
|
70
|
+
};
|
|
71
|
+
outputFileName: {
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
readonly required: false;
|
|
74
|
+
readonly description: "Name of the edited copy when destination is \"new\"";
|
|
75
|
+
};
|
|
76
|
+
source: {
|
|
77
|
+
readonly type: "select";
|
|
78
|
+
readonly required: false;
|
|
79
|
+
readonly options: readonly import("../fileEditContract").FileEditSource[];
|
|
80
|
+
readonly description: "Where the file to edit comes from; inferred from content when absent";
|
|
81
|
+
};
|
|
82
|
+
s3Key: {
|
|
83
|
+
readonly type: "string";
|
|
84
|
+
readonly required: false;
|
|
85
|
+
readonly description: "source \"s3\": platform-bucket key of the file to edit";
|
|
86
|
+
};
|
|
87
|
+
url: {
|
|
88
|
+
readonly type: "url";
|
|
89
|
+
readonly required: false;
|
|
90
|
+
readonly description: "source \"url\": the file to edit is fetched from here";
|
|
91
|
+
};
|
|
92
|
+
operation: {
|
|
93
|
+
type: string;
|
|
94
|
+
required: boolean;
|
|
95
|
+
options: readonly FileFormatOperation[];
|
|
96
|
+
description: string;
|
|
97
|
+
};
|
|
98
|
+
format: {
|
|
99
|
+
type: string;
|
|
100
|
+
required: boolean;
|
|
101
|
+
options: string[];
|
|
102
|
+
description: string;
|
|
103
|
+
};
|
|
104
|
+
content: {
|
|
105
|
+
type: string;
|
|
106
|
+
required: boolean;
|
|
107
|
+
description: string;
|
|
108
|
+
};
|
|
109
|
+
prettyPrint: {
|
|
110
|
+
type: string;
|
|
111
|
+
required: boolean;
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
fileName: {
|
|
115
|
+
type: string;
|
|
116
|
+
required: boolean;
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
jsonl: {
|
|
120
|
+
type: string;
|
|
121
|
+
required: boolean;
|
|
122
|
+
description: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
validate: (config: Partial<JsonActionConfigType>) => {
|
|
126
|
+
valid: boolean;
|
|
127
|
+
errors: string[];
|
|
128
|
+
};
|
|
129
|
+
merge: (userConfig: Partial<JsonActionConfigType>) => JsonActionConfigType;
|
|
130
|
+
getLabel: (config: JsonActionConfigType) => string;
|
|
131
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OneDrive Action Configuration (deprecated — `storage_action` replaces it)
|
|
3
|
+
*
|
|
4
|
+
* The editor renders this one from the generic schema form (no custom panel):
|
|
5
|
+
* a save writes exactly `connector`, `operation`, `path`, `content`,
|
|
6
|
+
* `fileName`, `destPath` and nothing else. The Engine's `runOneDrive` reads
|
|
7
|
+
* these plus `contentType`, `fileTypes` and `filePattern`. The Backend adds
|
|
8
|
+
* `_resolvedStorageCredentials` from `connector` at dispatch.
|
|
9
|
+
*/
|
|
10
|
+
export type OneDriveOperation = 'download' | 'upload' | 'list' | 'delete' | 'move' | 'copy';
|
|
11
|
+
export declare const ONEDRIVE_OPERATIONS: readonly OneDriveOperation[];
|
|
12
|
+
export interface OneDriveActionConfigType {
|
|
13
|
+
/** The Microsoft / OneDrive connector instance (a connection id). */
|
|
14
|
+
connector: string;
|
|
15
|
+
/** `download` when absent. */
|
|
16
|
+
operation?: OneDriveOperation;
|
|
17
|
+
/** Path from the drive root (`''` or `/` is the root). */
|
|
18
|
+
path?: string;
|
|
19
|
+
/** Item id, as an alternative to `path`. */
|
|
20
|
+
itemId?: string;
|
|
21
|
+
/** upload: the body (simple PUT, under 4 MB). */
|
|
22
|
+
content?: string;
|
|
23
|
+
/** upload: name when `path` is a folder. */
|
|
24
|
+
fileName?: string;
|
|
25
|
+
/** move / copy: full destination path; its last segment is the new name. */
|
|
26
|
+
destPath?: string;
|
|
27
|
+
/** upload: MIME type (`application/octet-stream` by default). */
|
|
28
|
+
contentType?: string;
|
|
29
|
+
/** list: keep only these extensions. */
|
|
30
|
+
fileTypes?: string[];
|
|
31
|
+
/** list: keep only names matching this glob. */
|
|
32
|
+
filePattern?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare const OneDriveActionConfig: {
|
|
35
|
+
defaults: OneDriveActionConfigType;
|
|
36
|
+
schema: {
|
|
37
|
+
connector: {
|
|
38
|
+
type: string;
|
|
39
|
+
required: boolean;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
operation: {
|
|
43
|
+
type: string;
|
|
44
|
+
required: boolean;
|
|
45
|
+
options: readonly OneDriveOperation[];
|
|
46
|
+
};
|
|
47
|
+
path: {
|
|
48
|
+
type: string;
|
|
49
|
+
required: boolean;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
itemId: {
|
|
53
|
+
type: string;
|
|
54
|
+
required: boolean;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
content: {
|
|
58
|
+
type: string;
|
|
59
|
+
required: boolean;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
fileName: {
|
|
63
|
+
type: string;
|
|
64
|
+
required: boolean;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
destPath: {
|
|
68
|
+
type: string;
|
|
69
|
+
required: boolean;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
contentType: {
|
|
73
|
+
type: string;
|
|
74
|
+
required: boolean;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
fileTypes: {
|
|
78
|
+
type: string;
|
|
79
|
+
required: boolean;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
filePattern: {
|
|
83
|
+
type: string;
|
|
84
|
+
required: boolean;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
validate: (config: Partial<OneDriveActionConfigType>) => {
|
|
89
|
+
valid: boolean;
|
|
90
|
+
errors: string[];
|
|
91
|
+
};
|
|
92
|
+
merge: (userConfig: Partial<OneDriveActionConfigType>) => OneDriveActionConfigType;
|
|
93
|
+
getLabel: (config: OneDriveActionConfigType) => string;
|
|
94
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AWS S3 Action Configuration (deprecated — `storage_action` replaces it)
|
|
3
|
+
*
|
|
4
|
+
* Kept so existing steps resolve, edit and validate. What S3ConfigPanel
|
|
5
|
+
* writes and the Engine's `runS3` reads. The Backend adds
|
|
6
|
+
* `_resolvedStorageCredentials` from `connector` at dispatch.
|
|
7
|
+
*/
|
|
8
|
+
export type S3Operation = 'list' | 'download' | 'upload' | 'delete' | 'copy' | 'move' | 'presign';
|
|
9
|
+
export declare const S3_OPERATIONS: readonly S3Operation[];
|
|
10
|
+
export interface S3ActionConfigType {
|
|
11
|
+
/** The S3 connector instance (a connection id). */
|
|
12
|
+
connector: string;
|
|
13
|
+
/** `download` when absent. */
|
|
14
|
+
operation?: S3Operation;
|
|
15
|
+
/** Overrides the connector's bucket. */
|
|
16
|
+
bucket?: string;
|
|
17
|
+
/** Overrides the connector's region. */
|
|
18
|
+
region?: string;
|
|
19
|
+
/** Object key (download, upload, delete, copy, move, presign). */
|
|
20
|
+
key?: string;
|
|
21
|
+
/** `list`: key prefix. */
|
|
22
|
+
prefix?: string;
|
|
23
|
+
/** `upload`: the body. */
|
|
24
|
+
content?: string;
|
|
25
|
+
/** `upload`: MIME type (`application/octet-stream` by default). */
|
|
26
|
+
contentType?: string;
|
|
27
|
+
/** `copy` / `move`: destination bucket (source bucket by default). */
|
|
28
|
+
destBucket?: string;
|
|
29
|
+
/** `copy` / `move`: destination key. */
|
|
30
|
+
destKey?: string;
|
|
31
|
+
/** `presign`: URL lifetime in seconds (3600 by default). */
|
|
32
|
+
expiresIn?: number;
|
|
33
|
+
/** `list`: page size (100 by default). */
|
|
34
|
+
maxKeys?: number;
|
|
35
|
+
/** `list`: keep only these extensions. */
|
|
36
|
+
fileTypes?: string[];
|
|
37
|
+
/** `list`: keep only names matching this glob. */
|
|
38
|
+
filePattern?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const S3ActionConfig: {
|
|
41
|
+
defaults: S3ActionConfigType;
|
|
42
|
+
schema: {
|
|
43
|
+
connector: {
|
|
44
|
+
type: string;
|
|
45
|
+
required: boolean;
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
operation: {
|
|
49
|
+
type: string;
|
|
50
|
+
required: boolean;
|
|
51
|
+
options: readonly S3Operation[];
|
|
52
|
+
};
|
|
53
|
+
bucket: {
|
|
54
|
+
type: string;
|
|
55
|
+
required: boolean;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
region: {
|
|
59
|
+
type: string;
|
|
60
|
+
required: boolean;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
key: {
|
|
64
|
+
type: string;
|
|
65
|
+
required: boolean;
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
prefix: {
|
|
69
|
+
type: string;
|
|
70
|
+
required: boolean;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
content: {
|
|
74
|
+
type: string;
|
|
75
|
+
required: boolean;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
contentType: {
|
|
79
|
+
type: string;
|
|
80
|
+
required: boolean;
|
|
81
|
+
description: string;
|
|
82
|
+
};
|
|
83
|
+
destBucket: {
|
|
84
|
+
type: string;
|
|
85
|
+
required: boolean;
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
destKey: {
|
|
89
|
+
type: string;
|
|
90
|
+
required: boolean;
|
|
91
|
+
description: string;
|
|
92
|
+
};
|
|
93
|
+
expiresIn: {
|
|
94
|
+
type: string;
|
|
95
|
+
required: boolean;
|
|
96
|
+
min: number;
|
|
97
|
+
description: string;
|
|
98
|
+
};
|
|
99
|
+
maxKeys: {
|
|
100
|
+
type: string;
|
|
101
|
+
required: boolean;
|
|
102
|
+
min: number;
|
|
103
|
+
description: string;
|
|
104
|
+
};
|
|
105
|
+
fileTypes: {
|
|
106
|
+
type: string;
|
|
107
|
+
required: boolean;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
filePattern: {
|
|
111
|
+
type: string;
|
|
112
|
+
required: boolean;
|
|
113
|
+
description: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
validate: (config: Partial<S3ActionConfigType>) => {
|
|
117
|
+
valid: boolean;
|
|
118
|
+
errors: string[];
|
|
119
|
+
};
|
|
120
|
+
merge: (userConfig: Partial<S3ActionConfigType>) => S3ActionConfigType;
|
|
121
|
+
getLabel: (config: S3ActionConfigType) => string;
|
|
122
|
+
};
|