@uipath/maestro-builder-sdk 6.117.4 → 6.118.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/api-index.md +2 -2
- package/dist/api-members.md +23 -19
- package/dist/compile-cli.js +37 -7
- package/dist/core/json-file.d.ts +3 -1
- package/dist/core/json-file.js +4 -2
- package/dist/core-definitions.json +34 -36
- package/dist/idp-processor-files.d.ts +21 -0
- package/dist/idp-processor-files.js +251 -0
- package/dist/nodes/document/flow/family.d.ts +5 -0
- package/dist/nodes/document/flow/family.js +5 -0
- package/dist/nodes/document/flow/idp-processor.d.ts +122 -0
- package/dist/nodes/document/flow/idp-processor.js +560 -0
- package/dist/nodes/document/flow/node-type.js +127 -18
- package/dist/nodes/document/flow/spec.d.ts +49 -9
- package/package.json +2 -2
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writing each Extract document node's IDP processor resource file, for
|
|
3
|
+
* `compile-cli` (builder-sdk#1984). The rules are the document family's
|
|
4
|
+
* (`nodes/document/flow/idp-processor.ts`, pure, so the flow core loads no
|
|
5
|
+
* `node:fs` — FB015); this module only reads and writes the files.
|
|
6
|
+
*
|
|
7
|
+
* What it does, as `uip maestro flow nodes create` / `nodes provision` and
|
|
8
|
+
* `uip solution pack` do it: find the solution whose `.uipx` lists the
|
|
9
|
+
* project; read its `idpProcessor` resources, matched by `kind` and `key`
|
|
10
|
+
* (never by path); merge each authored processor's spec into its file, or
|
|
11
|
+
* create the file under a de-duplicated name.
|
|
12
|
+
*
|
|
13
|
+
* Confinement: every path read or written resolves inside the solution. The
|
|
14
|
+
* walk follows only canonical paths, a new file's folder is checked through
|
|
15
|
+
* its nearest existing ancestor, and a new file is created exclusively (it
|
|
16
|
+
* fails on anything already at the path, a dangling link included). A link at
|
|
17
|
+
* a candidate path is never read through or reused.
|
|
18
|
+
*
|
|
19
|
+
* A file is only written when its content changes, and never deleted: a
|
|
20
|
+
* resource outlives its node, as pack leaves it.
|
|
21
|
+
*/
|
|
22
|
+
import { existsSync, lstatSync, mkdirSync, readdirSync, readFileSync, realpathSync, statSync } from 'node:fs';
|
|
23
|
+
import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
|
|
24
|
+
import { writeJsonFile } from './core/json-file.js';
|
|
25
|
+
import { buildIdpProcessorSpec, collectWorkflowNodes, DEFAULT_IDP_PROCESSOR_NAME, deriveIdpProcessorName, idpProcessorResourcePath, isIdpProcessorResource, isPublishedIdpProcessorLink, readAuthoringProcessorKey, readIdpProcessorName, readNodeLabel, updateIdpProcessorResource, wrapIdpProcessorSpec, } from './nodes/document/flow/family.js';
|
|
26
|
+
function readJson(path) {
|
|
27
|
+
try {
|
|
28
|
+
return JSON.parse(readFileSync(path, 'utf8'));
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function canonical(path) {
|
|
35
|
+
try {
|
|
36
|
+
return realpathSync(path);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function contains(root, target) {
|
|
43
|
+
const rel = relative(root, target);
|
|
44
|
+
return rel === '' || (!rel.startsWith('..') && !isAbsolute(rel));
|
|
45
|
+
}
|
|
46
|
+
/** The Flow project folders a solution's `.uipx` lists (the CLI's `readFlowProjectDirs`). */
|
|
47
|
+
function flowProjectDirs(solutionDir) {
|
|
48
|
+
let entries;
|
|
49
|
+
try {
|
|
50
|
+
entries = readdirSync(solutionDir);
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
const uipx = entries.find((e) => e.endsWith('.uipx'));
|
|
56
|
+
if (uipx === undefined)
|
|
57
|
+
return [];
|
|
58
|
+
const manifest = readJson(join(solutionDir, uipx));
|
|
59
|
+
const root = resolve(solutionDir);
|
|
60
|
+
const dirs = [];
|
|
61
|
+
for (const project of Array.isArray(manifest?.Projects) ? manifest.Projects : []) {
|
|
62
|
+
if (project?.Type !== 'Flow' || typeof project.ProjectRelativePath !== 'string')
|
|
63
|
+
continue;
|
|
64
|
+
const target = resolve(root, ...project.ProjectRelativePath.replace(/\\/g, '/').split('/'));
|
|
65
|
+
const dir = target.endsWith('.uiproj') ? dirname(target) : target;
|
|
66
|
+
if (contains(root, dir))
|
|
67
|
+
dirs.push(dir);
|
|
68
|
+
}
|
|
69
|
+
return dirs;
|
|
70
|
+
}
|
|
71
|
+
/** The nearest folder at or above `projectDir` whose `.uipx` lists it (the CLI's `findEnclosingSolutionDir`). */
|
|
72
|
+
function enclosingSolution(projectDir) {
|
|
73
|
+
const project = resolve(projectDir);
|
|
74
|
+
let dir = project;
|
|
75
|
+
for (;;) {
|
|
76
|
+
let entries = [];
|
|
77
|
+
try {
|
|
78
|
+
entries = readdirSync(dir);
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
// An unreadable folder is not a solution; keep walking up.
|
|
82
|
+
}
|
|
83
|
+
if (entries.some((e) => e.endsWith('.uipx')) && flowProjectDirs(dir).includes(project))
|
|
84
|
+
return dir;
|
|
85
|
+
const parent = dirname(dir);
|
|
86
|
+
if (parent === dir)
|
|
87
|
+
return undefined;
|
|
88
|
+
dir = parent;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Every processor resource under `<solution>/resources/`, walked through
|
|
93
|
+
* canonical paths so a link cannot carry a write out of the solution, each
|
|
94
|
+
* folder visited once.
|
|
95
|
+
*/
|
|
96
|
+
function readResources(solutionDir) {
|
|
97
|
+
const root = canonical(solutionDir);
|
|
98
|
+
const entries = [];
|
|
99
|
+
if (root === undefined)
|
|
100
|
+
return entries;
|
|
101
|
+
const visited = new Set();
|
|
102
|
+
const walk = (dir) => {
|
|
103
|
+
const at = canonical(dir);
|
|
104
|
+
if (at === undefined || !contains(root, at) || visited.has(at))
|
|
105
|
+
return;
|
|
106
|
+
visited.add(at);
|
|
107
|
+
let names;
|
|
108
|
+
try {
|
|
109
|
+
names = readdirSync(at).sort();
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
for (const name of names) {
|
|
115
|
+
const child = canonical(join(at, name));
|
|
116
|
+
if (child === undefined || !contains(root, child))
|
|
117
|
+
continue;
|
|
118
|
+
const stat = statSync(child);
|
|
119
|
+
if (stat.isDirectory())
|
|
120
|
+
walk(child);
|
|
121
|
+
else if (stat.isFile() && name.endsWith('.json')) {
|
|
122
|
+
const parsed = readJson(child);
|
|
123
|
+
if (!isIdpProcessorResource(parsed))
|
|
124
|
+
continue;
|
|
125
|
+
const resource = parsed.resource;
|
|
126
|
+
entries.push({
|
|
127
|
+
filePath: child,
|
|
128
|
+
key: typeof resource.key === 'string' ? resource.key : '',
|
|
129
|
+
name: typeof resource.name === 'string' ? resource.name : '',
|
|
130
|
+
file: parsed,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
walk(join(root, 'resources'));
|
|
136
|
+
return entries;
|
|
137
|
+
}
|
|
138
|
+
/** What is at a candidate path, without following a link there. */
|
|
139
|
+
function occupant(path) {
|
|
140
|
+
try {
|
|
141
|
+
return lstatSync(path).isSymbolicLink() ? 'link' : 'file';
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
return 'free';
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* `path`, or the first `<name>_<N>.json` that is free or already holds this
|
|
149
|
+
* processor's own file. A link is never followed, read or reused: its path is skipped.
|
|
150
|
+
*/
|
|
151
|
+
function freeResourcePath(path, key) {
|
|
152
|
+
const base = path.slice(0, -'.json'.length);
|
|
153
|
+
for (let suffix = 1, candidate = path;; candidate = `${base}_${suffix++}.json`) {
|
|
154
|
+
const at = occupant(candidate);
|
|
155
|
+
if (at === 'free')
|
|
156
|
+
return { path: candidate, own: false };
|
|
157
|
+
if (at === 'link')
|
|
158
|
+
continue;
|
|
159
|
+
const parsed = readJson(candidate);
|
|
160
|
+
if (parsed?.resource?.key === key)
|
|
161
|
+
return { path: candidate, own: true };
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/** The deterministic bytes the CLI writes a resource file with. */
|
|
165
|
+
function serialized(value) {
|
|
166
|
+
return `${JSON.stringify(value, null, 2)}\n`;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Give each processor the flow's Extract document nodes author its resource
|
|
170
|
+
* file, and each such node the processor's name (`inputs.processorName`) —
|
|
171
|
+
* MUTATES `flow`, so call it before the `.flow` is written. `projectDir` is the
|
|
172
|
+
* Flow project (the folder holding `project.uiproj`) the flow is the main flow of.
|
|
173
|
+
*/
|
|
174
|
+
export function provisionIdpProcessors(flow, projectDir) {
|
|
175
|
+
const authors = collectWorkflowNodes(flow).filter((node) => {
|
|
176
|
+
const key = readAuthoringProcessorKey(node);
|
|
177
|
+
return key !== undefined && !isPublishedIdpProcessorLink(node.inputs);
|
|
178
|
+
});
|
|
179
|
+
const namesByKey = new Map();
|
|
180
|
+
if (authors.length === 0)
|
|
181
|
+
return { written: [], namesByKey, skipped: [] };
|
|
182
|
+
const solutionDir = enclosingSolution(projectDir);
|
|
183
|
+
if (solutionDir === undefined) {
|
|
184
|
+
return {
|
|
185
|
+
written: [],
|
|
186
|
+
namesByKey,
|
|
187
|
+
skipped: [],
|
|
188
|
+
pending: 'the flow project is not inside a solution, so each Extract document step\'s idpProcessor resource file '
|
|
189
|
+
+ 'is created when the project is packed inside one (uip solution pack)',
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
const resources = readResources(solutionDir);
|
|
193
|
+
for (const entry of resources)
|
|
194
|
+
if (entry.key !== '' && entry.name !== '')
|
|
195
|
+
namesByKey.set(entry.key, entry.name);
|
|
196
|
+
const taken = new Set(resources.map((r) => r.name.toLowerCase()).filter((n) => n.length > 0));
|
|
197
|
+
const written = [];
|
|
198
|
+
const skipped = [];
|
|
199
|
+
const done = new Map();
|
|
200
|
+
for (const node of authors) {
|
|
201
|
+
const key = readAuthoringProcessorKey(node);
|
|
202
|
+
const inputs = node.inputs;
|
|
203
|
+
// Nodes sharing a key share its processor: the first one writes it.
|
|
204
|
+
const named = done.get(key);
|
|
205
|
+
if (named !== undefined) {
|
|
206
|
+
inputs.processorName = named;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
const spec = buildIdpProcessorSpec(node);
|
|
210
|
+
const existing = resources.find((r) => r.key === key);
|
|
211
|
+
if (existing !== undefined) {
|
|
212
|
+
// The resource owns the name once created.
|
|
213
|
+
if (existing.name.length > 0)
|
|
214
|
+
inputs.processorName = existing.name;
|
|
215
|
+
const merged = updateIdpProcessorResource(existing.file, spec);
|
|
216
|
+
if (serialized(merged) !== serialized(existing.file)) {
|
|
217
|
+
writeJsonFile(existing.filePath, merged);
|
|
218
|
+
written.push(relative(solutionDir, existing.filePath));
|
|
219
|
+
}
|
|
220
|
+
done.set(key, existing.name.length > 0 ? existing.name : String(inputs.processorName ?? ''));
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
const base = readIdpProcessorName(inputs) ?? readNodeLabel(node) ?? DEFAULT_IDP_PROCESSOR_NAME;
|
|
224
|
+
const name = deriveIdpProcessorName(base, taken) ?? DEFAULT_IDP_PROCESSOR_NAME;
|
|
225
|
+
taken.add(name.toLowerCase());
|
|
226
|
+
inputs.processorName = name;
|
|
227
|
+
namesByKey.set(key, name);
|
|
228
|
+
const found = freeResourcePath(join(solutionDir, ...idpProcessorResourcePath(name).split('/')), key);
|
|
229
|
+
const target = found.path;
|
|
230
|
+
// Nearest existing ancestor first: mkdir would follow a link anywhere above
|
|
231
|
+
// the leaf and carry the new folders out of the solution.
|
|
232
|
+
let probe = dirname(target);
|
|
233
|
+
while (!existsSync(probe) && dirname(probe) !== probe)
|
|
234
|
+
probe = dirname(probe);
|
|
235
|
+
const realProbe = canonical(probe);
|
|
236
|
+
const realRoot = canonical(solutionDir);
|
|
237
|
+
if (realProbe === undefined || realRoot === undefined || !contains(realRoot, realProbe)) {
|
|
238
|
+
skipped.push(`${name} (${key}): ${relative(solutionDir, dirname(target))} resolves outside the solution`);
|
|
239
|
+
done.set(key, name);
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
243
|
+
// Its own file (a regular file, checked above) is rewritten in place; a
|
|
244
|
+
// new one is created exclusively, so nothing that appears at the path in
|
|
245
|
+
// between, a link included, is written through.
|
|
246
|
+
writeJsonFile(target, wrapIdpProcessorSpec({ key, name, spec }), { exclusive: !found.own });
|
|
247
|
+
written.push(relative(solutionDir, target));
|
|
248
|
+
done.set(key, name);
|
|
249
|
+
}
|
|
250
|
+
return { written, namesByKey, skipped };
|
|
251
|
+
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
/** The document node family, as flow-node-registry.ts lists it: Document Classify, Dynamic Extract and an IxP project's extractor. */
|
|
2
2
|
import type { FlowNodeFamily } from '../../../flow-node-type.js';
|
|
3
3
|
export declare const documentFlowFamily: FlowNodeFamily;
|
|
4
|
+
/**
|
|
5
|
+
* The IDP processor rules, for `compile` (`idp-processor-files.ts`) and
|
|
6
|
+
* `bindings_v2.json`: pure, and not part of the public surface.
|
|
7
|
+
*/
|
|
8
|
+
export { buildIdpProcessorSpec, collectWorkflowNodes, DEFAULT_IDP_PROCESSOR_NAME, deriveIdpProcessorName, idpProcessorBindingRows, idpProcessorResourcePath, isIdpProcessorResource, isPublishedIdpProcessorLink, readAuthoringProcessorKey, readIdpProcessorName, readNodeLabel, updateIdpProcessorResource, withIdpProcessorRows, wrapIdpProcessorSpec, type IdpProcessorBindingRow, type WorkflowNodeLike, } from './idp-processor.js';
|
|
@@ -6,3 +6,8 @@ export const documentFlowFamily = {
|
|
|
6
6
|
types: [documentClassifyNodeType, dynamicExtractNodeType, ixpExtractNodeType],
|
|
7
7
|
diagnostics: { ...DOCUMENT_DIAGNOSTICS, ...IXP_DIAGNOSTICS },
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* The IDP processor rules, for `compile` (`idp-processor-files.ts`) and
|
|
11
|
+
* `bindings_v2.json`: pure, and not part of the public surface.
|
|
12
|
+
*/
|
|
13
|
+
export { buildIdpProcessorSpec, collectWorkflowNodes, DEFAULT_IDP_PROCESSOR_NAME, deriveIdpProcessorName, idpProcessorBindingRows, idpProcessorResourcePath, isIdpProcessorResource, isPublishedIdpProcessorLink, readAuthoringProcessorKey, readIdpProcessorName, readNodeLabel, updateIdpProcessorResource, withIdpProcessorRows, wrapIdpProcessorSpec, } from './idp-processor.js';
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/** The node type this module serves, as the family registers it. */
|
|
2
|
+
export declare const DYNAMIC_EXTRACT_TYPE = "uipath.ixp.extract-document-builder";
|
|
3
|
+
/** Node inputs that name the processor (flow-schema `idp-processor-spec.ts`). */
|
|
4
|
+
export declare const PROCESSOR_KEY_INPUT = "processorKey";
|
|
5
|
+
export declare const PROCESSOR_NAME_INPUT = "processorName";
|
|
6
|
+
export declare const PROCESSOR_READONLY_INPUT = "processorReadOnly";
|
|
7
|
+
export declare const PROCESSOR_FOLDER_PATH_INPUT = "processorFolderPath";
|
|
8
|
+
/** The processor name a node with no label gets (the CLI's `DEFAULT_IDP_PROCESSOR_NAME`). */
|
|
9
|
+
export declare const DEFAULT_IDP_PROCESSOR_NAME = "IdpProcessor";
|
|
10
|
+
type Json = Record<string, unknown>;
|
|
11
|
+
/** A node of the file, as far as these rules read one. */
|
|
12
|
+
export interface WorkflowNodeLike {
|
|
13
|
+
id?: unknown;
|
|
14
|
+
type?: unknown;
|
|
15
|
+
inputs?: unknown;
|
|
16
|
+
display?: unknown;
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
/** Every node of a `.flow`, subflow bodies included (flow-schema `collectWorkflowNodes`). */
|
|
20
|
+
export declare function collectWorkflowNodes(workflow: {
|
|
21
|
+
nodes?: unknown;
|
|
22
|
+
subflows?: unknown;
|
|
23
|
+
} | undefined | null): WorkflowNodeLike[];
|
|
24
|
+
export declare function isDynamicExtractNode(node: WorkflowNodeLike | undefined | null): boolean;
|
|
25
|
+
export declare function readIdpProcessorKey(inputs: unknown): string | undefined;
|
|
26
|
+
export declare function readIdpProcessorName(inputs: unknown): string | undefined;
|
|
27
|
+
export declare function readIdpProcessorFolderPath(inputs: unknown): string | undefined;
|
|
28
|
+
export declare function isIdpProcessorReadOnly(inputs: unknown): boolean;
|
|
29
|
+
/** The processor this node writes to: none for a read-only mirror (flow-schema `readAuthoringProcessorKey`). */
|
|
30
|
+
export declare function readAuthoringProcessorKey(node: WorkflowNodeLike): string | undefined;
|
|
31
|
+
/** A processor published to the tenant: the key comes with the folder it lives in, and no solution resource exists. */
|
|
32
|
+
export declare function isPublishedIdpProcessorLink(inputs: unknown): boolean;
|
|
33
|
+
/** The node's `display.label` (else a top-level `label`), the name a new processor takes. */
|
|
34
|
+
export declare function readNodeLabel(node: WorkflowNodeLike): string | undefined;
|
|
35
|
+
/** The spec of an `idpProcessor` resource (flow-schema `IdpProcessorSpec`). */
|
|
36
|
+
export interface IdpProcessorSpec {
|
|
37
|
+
name?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
prompt: string;
|
|
40
|
+
outputSchema: string;
|
|
41
|
+
extractionStrategy: string;
|
|
42
|
+
modelOverride?: string;
|
|
43
|
+
attributionStrategy?: string;
|
|
44
|
+
attributionModelOverride: string;
|
|
45
|
+
languageSupport?: string;
|
|
46
|
+
layoutEngine: string;
|
|
47
|
+
layoutModel: string;
|
|
48
|
+
overrides?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The spec a node's processor holds (flow-schema `buildIdpProcessorSpec` over
|
|
52
|
+
* `collectIdpProcessorUpdates`' inputs): the taxonomy JSON-encoded, and the
|
|
53
|
+
* model settings in the backend's vocabulary. For instance the seeded node
|
|
54
|
+
* gives `{ description: '', prompt: '', outputSchema: '{"type":"object",…}',
|
|
55
|
+
* extractionStrategy: 'SingleExtract', modelOverride: 'gemini-2.5-flash', … }`.
|
|
56
|
+
*/
|
|
57
|
+
export declare function buildIdpProcessorSpec(node: WorkflowNodeLike): IdpProcessorSpec;
|
|
58
|
+
/**
|
|
59
|
+
* A processor's name from the node's label, suffixed `_1`, `_2`, … when the
|
|
60
|
+
* solution already has it (case-insensitive); undefined for a blank label.
|
|
61
|
+
* For instance `deriveIdpProcessorName('Extract', ['extract'])` is `'Extract_1'`.
|
|
62
|
+
*/
|
|
63
|
+
export declare function deriveIdpProcessorName(label: string | undefined, takenNames: Iterable<string>): string | undefined;
|
|
64
|
+
/** Solution-relative path a NEW processor's file is created at, e.g. `resources/solution_folder/idpProcessor/extraction/Extract_invoice.json`. */
|
|
65
|
+
export declare function idpProcessorResourcePath(name: string): string;
|
|
66
|
+
/** Whether a parsed resource file is an IDP processor's (its `kind`, case-insensitively). */
|
|
67
|
+
export declare function isIdpProcessorResource(file: unknown): boolean;
|
|
68
|
+
/** A brand-new resource file for a processor. */
|
|
69
|
+
export declare function wrapIdpProcessorSpec(input: {
|
|
70
|
+
key: string;
|
|
71
|
+
name: string;
|
|
72
|
+
spec: IdpProcessorSpec;
|
|
73
|
+
}): Json;
|
|
74
|
+
/**
|
|
75
|
+
* An existing resource file with a fresh spec merged in key by key: its key,
|
|
76
|
+
* name and any spec key the node does not manage stay; a managed optional key
|
|
77
|
+
* the fresh spec omits is cleared.
|
|
78
|
+
*/
|
|
79
|
+
export declare function updateIdpProcessorResource(file: Json, spec: IdpProcessorSpec): Json;
|
|
80
|
+
/** One `bindings_v2.json` row, as `bindings-v2.ts` merges them. */
|
|
81
|
+
export interface IdpProcessorBindingRow {
|
|
82
|
+
resource: string;
|
|
83
|
+
key: string;
|
|
84
|
+
id: string;
|
|
85
|
+
value: Record<string, {
|
|
86
|
+
defaultValue?: string;
|
|
87
|
+
isExpression: boolean;
|
|
88
|
+
displayName: string;
|
|
89
|
+
}>;
|
|
90
|
+
metadata: Record<string, string>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The `idpProcessor` row of each distinct processor the flow's Extract document
|
|
94
|
+
* nodes name, as pack derives it: `processorKey` with the key, `name` with the
|
|
95
|
+
* resource's name (`namesByKey`, else the node's `processorName`, else its
|
|
96
|
+
* label), `folderPath` with a published processor's folder. An attribute with no
|
|
97
|
+
* value carries no `defaultValue`, as pack writes it.
|
|
98
|
+
*/
|
|
99
|
+
export declare function idpProcessorBindingRows(workflow: {
|
|
100
|
+
nodes?: unknown;
|
|
101
|
+
subflows?: unknown;
|
|
102
|
+
}, namesByKey?: ReadonlyMap<string, string>): IdpProcessorBindingRow[];
|
|
103
|
+
/**
|
|
104
|
+
* `bindings_v2.json` rows with the processor rows replaced by `rows`: a row
|
|
105
|
+
* for a key no node names any more goes, as pack drops it, unless some flow
|
|
106
|
+
* could not be read (`keepUnderived`), when the old rows stay. Every other
|
|
107
|
+
* row is kept as it is.
|
|
108
|
+
*/
|
|
109
|
+
export declare function withIdpProcessorRows<R extends {
|
|
110
|
+
resource?: unknown;
|
|
111
|
+
key?: unknown;
|
|
112
|
+
}>(resources: R[], rows: readonly IdpProcessorBindingRow[], options?: {
|
|
113
|
+
keepUnderived?: boolean;
|
|
114
|
+
}): R[];
|
|
115
|
+
/** The `config` block the Schema Editor insists on, from the node's model settings (the CLI's `buildScaffoldConfig`). */
|
|
116
|
+
export declare function buildScaffoldConfig(modelConfig: unknown): Json;
|
|
117
|
+
/**
|
|
118
|
+
* The schema document `nodes create` seeds a node with: no field groups, and
|
|
119
|
+
* the default field types to reference. Fresh per call.
|
|
120
|
+
*/
|
|
121
|
+
export declare function buildDefaultSchemaDocument(modelConfig?: unknown): Json;
|
|
122
|
+
export {};
|