@uipath/maestro-builder-sdk 6.117.3 → 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.
@@ -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 {};