@octaviaflow/flow-rules 0.13.2 → 0.14.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/index.d.ts +1 -3
- package/dist/catalog/storage/fileEditContract.d.ts +4 -4
- package/dist/catalog/triggers/connector-trigger/config.d.ts +9 -1
- package/dist/catalog/types.d.ts +0 -18
- package/dist/index.cjs +10 -309
- package/dist/index.d.ts +0 -1
- package/dist/index.js +10 -309
- package/dist/rules/configContracts.d.ts +3 -1
- package/package.json +1 -1
- package/dist/catalog/api/graphql-query/config.d.ts +0 -36
- package/dist/catalog/api/graphql-query/index.d.ts +0 -7
- package/dist/catalog/storage/file-action/config.d.ts +0 -197
- package/dist/catalog/storage/file-action/index.d.ts +0 -2
- package/dist/catalog/storage/file-operation/config.d.ts +0 -49
- package/dist/catalog/storage/file-operation/index.d.ts +0 -8
- package/dist/catalog/transforms/format/config.d.ts +0 -24
- package/dist/catalog/transforms/format/index.d.ts +0 -5
- package/dist/catalog/utility/error/config.d.ts +0 -26
- package/dist/catalog/utility/error/index.d.ts +0 -7
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File Action Configuration (generic parse / generate / edit)
|
|
3
|
-
*
|
|
4
|
-
* `file_action` has no editor panel and is not in the add palette; the Engine
|
|
5
|
-
* still executes it (`executeFileAction`). This is what that executor reads.
|
|
6
|
-
* Where the same key is shared with the format-specific actions it is the
|
|
7
|
-
* shared entry from `fileEditContract`; `source` and `outputFileName` are
|
|
8
|
-
* redeclared because this action accepts more sources.
|
|
9
|
-
*/
|
|
10
|
-
import { type FileEditConfigType } from '../fileEditContract';
|
|
11
|
-
export type FileActionMode = 'parse' | 'generate' | 'convert' | 'edit';
|
|
12
|
-
export type FileActionSource = 'inline' | 's3' | 'url' | 'previous_step' | 'upload';
|
|
13
|
-
export type FileActionFormat = 'auto' | 'csv' | 'tsv' | 'json' | 'jsonl' | 'xml' | 'excel';
|
|
14
|
-
export type FileActionOutputFormat = 'csv' | 'json' | 'excel' | 'xml' | 'tsv';
|
|
15
|
-
export declare const FILE_ACTION_MODES: readonly FileActionMode[];
|
|
16
|
-
export declare const FILE_ACTION_SOURCES: readonly FileActionSource[];
|
|
17
|
-
export declare const FILE_ACTION_FORMATS: readonly FileActionFormat[];
|
|
18
|
-
export declare const FILE_ACTION_OUTPUT_FORMATS: readonly FileActionOutputFormat[];
|
|
19
|
-
export interface FileActionConfigType extends Omit<FileEditConfigType, 'source'> {
|
|
20
|
-
/** `parse` (default) | `generate` | `convert` | `edit`. */
|
|
21
|
-
mode?: FileActionMode;
|
|
22
|
-
/** Alias the Engine reads first: `operation || mode`. */
|
|
23
|
-
operation?: FileActionMode;
|
|
24
|
-
/** Where the file comes from; `inline` by default. `upload` is not supported at run time. */
|
|
25
|
-
source?: FileActionSource;
|
|
26
|
-
/** Format of the file; detected from the name, then the content, when `auto` or absent. */
|
|
27
|
-
format?: FileActionFormat;
|
|
28
|
-
/** `source: 'inline'` — the text (base64 for Excel). */
|
|
29
|
-
inlineContent?: string;
|
|
30
|
-
/** Alias for `inlineContent`. */
|
|
31
|
-
content?: string;
|
|
32
|
-
/** `source: 's3'` — platform-bucket key. */
|
|
33
|
-
s3Key?: string;
|
|
34
|
-
/** `source: 'url'` — fetched with a 60 s timeout. */
|
|
35
|
-
url?: string;
|
|
36
|
-
/** `generate` / `convert`: format to write. */
|
|
37
|
-
outputFormat?: FileActionOutputFormat;
|
|
38
|
-
/** `generate` / `convert`: name of the produced file. */
|
|
39
|
-
outputFileName?: string;
|
|
40
|
-
/** Name used to detect the format when `format` is `auto`. */
|
|
41
|
-
fileName?: string;
|
|
42
|
-
encoding?: string;
|
|
43
|
-
delimiter?: string;
|
|
44
|
-
headerRow?: number;
|
|
45
|
-
rowElement?: string;
|
|
46
|
-
sheetName?: string;
|
|
47
|
-
includeHeader?: boolean;
|
|
48
|
-
/** Parser options (`delimiter`, `headerRow`, …) read ahead of the top-level keys. */
|
|
49
|
-
options?: Record<string, unknown>;
|
|
50
|
-
}
|
|
51
|
-
export declare const FileActionConfig: {
|
|
52
|
-
defaults: FileActionConfigType;
|
|
53
|
-
schema: {
|
|
54
|
-
mode: {
|
|
55
|
-
type: string;
|
|
56
|
-
required: boolean;
|
|
57
|
-
options: readonly FileActionMode[];
|
|
58
|
-
description: string;
|
|
59
|
-
};
|
|
60
|
-
operation: {
|
|
61
|
-
type: string;
|
|
62
|
-
required: boolean;
|
|
63
|
-
options: readonly FileActionMode[];
|
|
64
|
-
description: string;
|
|
65
|
-
};
|
|
66
|
-
source: {
|
|
67
|
-
type: string;
|
|
68
|
-
required: boolean;
|
|
69
|
-
options: readonly FileActionSource[];
|
|
70
|
-
description: string;
|
|
71
|
-
};
|
|
72
|
-
format: {
|
|
73
|
-
type: string;
|
|
74
|
-
required: boolean;
|
|
75
|
-
options: readonly FileActionFormat[];
|
|
76
|
-
description: string;
|
|
77
|
-
};
|
|
78
|
-
inlineContent: {
|
|
79
|
-
type: string;
|
|
80
|
-
required: boolean;
|
|
81
|
-
description: string;
|
|
82
|
-
};
|
|
83
|
-
content: {
|
|
84
|
-
type: string;
|
|
85
|
-
required: boolean;
|
|
86
|
-
description: string;
|
|
87
|
-
};
|
|
88
|
-
outputFormat: {
|
|
89
|
-
type: string;
|
|
90
|
-
required: boolean;
|
|
91
|
-
options: readonly FileActionOutputFormat[];
|
|
92
|
-
description: string;
|
|
93
|
-
};
|
|
94
|
-
outputFileName: {
|
|
95
|
-
type: string;
|
|
96
|
-
required: boolean;
|
|
97
|
-
description: string;
|
|
98
|
-
};
|
|
99
|
-
fileName: {
|
|
100
|
-
type: string;
|
|
101
|
-
required: boolean;
|
|
102
|
-
description: string;
|
|
103
|
-
};
|
|
104
|
-
encoding: {
|
|
105
|
-
type: string;
|
|
106
|
-
required: boolean;
|
|
107
|
-
};
|
|
108
|
-
delimiter: {
|
|
109
|
-
type: string;
|
|
110
|
-
required: boolean;
|
|
111
|
-
description: string;
|
|
112
|
-
};
|
|
113
|
-
headerRow: {
|
|
114
|
-
type: string;
|
|
115
|
-
required: boolean;
|
|
116
|
-
min: number;
|
|
117
|
-
};
|
|
118
|
-
rowElement: {
|
|
119
|
-
type: string;
|
|
120
|
-
required: boolean;
|
|
121
|
-
description: string;
|
|
122
|
-
};
|
|
123
|
-
sheetName: {
|
|
124
|
-
type: string;
|
|
125
|
-
required: boolean;
|
|
126
|
-
description: string;
|
|
127
|
-
};
|
|
128
|
-
includeHeader: {
|
|
129
|
-
type: string;
|
|
130
|
-
required: boolean;
|
|
131
|
-
};
|
|
132
|
-
options: {
|
|
133
|
-
type: string;
|
|
134
|
-
required: boolean;
|
|
135
|
-
description: string;
|
|
136
|
-
};
|
|
137
|
-
editOperation: {
|
|
138
|
-
readonly type: "select";
|
|
139
|
-
readonly required: false;
|
|
140
|
-
readonly options: readonly import("../fileEditContract").FileEditOperation[];
|
|
141
|
-
readonly description: "How the file is edited: append rows, update rows by key, upsert, or set fields on matching rows";
|
|
142
|
-
};
|
|
143
|
-
keyField: {
|
|
144
|
-
readonly type: "string";
|
|
145
|
-
readonly required: false;
|
|
146
|
-
readonly description: "Match key column for update / upsert";
|
|
147
|
-
};
|
|
148
|
-
mergeUpdate: {
|
|
149
|
-
readonly type: "boolean";
|
|
150
|
-
readonly required: false;
|
|
151
|
-
readonly description: "false replaces the whole matched row; default merges";
|
|
152
|
-
};
|
|
153
|
-
matchField: {
|
|
154
|
-
readonly type: "string";
|
|
155
|
-
readonly required: false;
|
|
156
|
-
readonly description: "set_fields: column the row filter reads";
|
|
157
|
-
};
|
|
158
|
-
matchOp: {
|
|
159
|
-
readonly type: "select";
|
|
160
|
-
readonly required: false;
|
|
161
|
-
readonly options: readonly import("../fileEditContract").FileEditMatchOp[];
|
|
162
|
-
readonly description: "set_fields: comparison; \"=\" by default";
|
|
163
|
-
};
|
|
164
|
-
matchValue: {
|
|
165
|
-
readonly type: "string";
|
|
166
|
-
readonly required: false;
|
|
167
|
-
readonly description: "set_fields: value compared against";
|
|
168
|
-
};
|
|
169
|
-
setFields: {
|
|
170
|
-
readonly type: "object";
|
|
171
|
-
readonly required: false;
|
|
172
|
-
readonly description: "set_fields: { column: newValue } applied to matching rows";
|
|
173
|
-
};
|
|
174
|
-
destination: {
|
|
175
|
-
readonly type: "select";
|
|
176
|
-
readonly required: false;
|
|
177
|
-
readonly options: readonly import("../fileEditContract").FileEditDestination[];
|
|
178
|
-
readonly description: "\"new\" writes an edited copy (default); \"in_place\" overwrites an S3 source";
|
|
179
|
-
};
|
|
180
|
-
s3Key: {
|
|
181
|
-
readonly type: "string";
|
|
182
|
-
readonly required: false;
|
|
183
|
-
readonly description: "source \"s3\": platform-bucket key of the file to edit";
|
|
184
|
-
};
|
|
185
|
-
url: {
|
|
186
|
-
readonly type: "url";
|
|
187
|
-
readonly required: false;
|
|
188
|
-
readonly description: "source \"url\": the file to edit is fetched from here";
|
|
189
|
-
};
|
|
190
|
-
};
|
|
191
|
-
validate: (config: Partial<FileActionConfigType>) => {
|
|
192
|
-
valid: boolean;
|
|
193
|
-
errors: string[];
|
|
194
|
-
};
|
|
195
|
-
merge: (userConfig: Partial<FileActionConfigType>) => FileActionConfigType;
|
|
196
|
-
getLabel: (config: FileActionConfigType) => string;
|
|
197
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
options: string[];
|
|
25
|
-
};
|
|
26
|
-
sourcePath: {
|
|
27
|
-
type: string;
|
|
28
|
-
required: boolean;
|
|
29
|
-
};
|
|
30
|
-
destinationPath: {
|
|
31
|
-
type: string;
|
|
32
|
-
required: boolean;
|
|
33
|
-
};
|
|
34
|
-
fileContent: {
|
|
35
|
-
type: string;
|
|
36
|
-
required: boolean;
|
|
37
|
-
};
|
|
38
|
-
options: {
|
|
39
|
-
type: string;
|
|
40
|
-
required: boolean;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
validate: (config: Partial<FileOperationConfigType>) => {
|
|
44
|
-
valid: boolean;
|
|
45
|
-
errors: string[];
|
|
46
|
-
};
|
|
47
|
-
merge: (userConfig: Partial<FileOperationConfigType>) => FileOperationConfigType;
|
|
48
|
-
getLabel: (config: FileOperationConfigType) => string;
|
|
49
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface FormatConfigType {
|
|
2
|
-
input: string;
|
|
3
|
-
format: 'json' | 'csv' | 'xml' | 'yaml';
|
|
4
|
-
}
|
|
5
|
-
export declare const FormatConfig: {
|
|
6
|
-
defaults: FormatConfigType;
|
|
7
|
-
schema: {
|
|
8
|
-
input: {
|
|
9
|
-
type: string;
|
|
10
|
-
required: boolean;
|
|
11
|
-
};
|
|
12
|
-
format: {
|
|
13
|
-
type: string;
|
|
14
|
-
required: boolean;
|
|
15
|
-
options: string[];
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
validate: (config: Partial<FormatConfigType>) => {
|
|
19
|
-
valid: boolean;
|
|
20
|
-
errors: string[];
|
|
21
|
-
};
|
|
22
|
-
merge: (userConfig: Partial<FormatConfigType>) => FormatConfigType;
|
|
23
|
-
getLabel: (config: FormatConfigType) => string;
|
|
24
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error Configuration
|
|
3
|
-
*/
|
|
4
|
-
export interface ErrorConfigType {
|
|
5
|
-
message: string;
|
|
6
|
-
code?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const ErrorConfig: {
|
|
9
|
-
defaults: ErrorConfigType;
|
|
10
|
-
schema: {
|
|
11
|
-
message: {
|
|
12
|
-
type: string;
|
|
13
|
-
required: boolean;
|
|
14
|
-
};
|
|
15
|
-
code: {
|
|
16
|
-
type: string;
|
|
17
|
-
required: boolean;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
validate: (config: Partial<ErrorConfigType>) => {
|
|
21
|
-
valid: boolean;
|
|
22
|
-
errors: string[];
|
|
23
|
-
};
|
|
24
|
-
merge: (userConfig: Partial<ErrorConfigType>) => ErrorConfigType;
|
|
25
|
-
getLabel: (config: ErrorConfigType) => string;
|
|
26
|
-
};
|