@uipath/maestro-builder-sdk 6.4.0 → 6.5.1
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/bpmn/uipath-moddle.v1.json +21 -0
- package/dist/cli/commands/registry.js +68 -12
- package/dist/registry/archive/entry-policy.d.ts +36 -0
- package/dist/registry/archive/entry-policy.js +60 -0
- package/dist/registry/archive/extract.d.ts +31 -0
- package/dist/registry/archive/extract.js +92 -0
- package/dist/registry/archive/zip-reader.d.ts +38 -0
- package/dist/registry/archive/zip-reader.js +256 -0
- package/dist/registry/codecs/pyjson.d.ts +62 -0
- package/dist/registry/codecs/pyjson.js +208 -0
- package/dist/registry/compat/compare.d.ts +18 -0
- package/dist/registry/compat/compare.js +32 -0
- package/dist/registry/compat/paths.d.ts +4 -0
- package/dist/registry/compat/paths.js +17 -0
- package/dist/registry/compat/pystr.d.ts +50 -0
- package/dist/registry/compat/pystr.js +221 -0
- package/dist/registry/concurrency.d.ts +10 -0
- package/dist/registry/concurrency.js +34 -0
- package/dist/registry/curated-overlay.d.ts +36 -4
- package/dist/registry/curated-overlay.js +87 -14
- package/dist/registry/errors.d.ts +26 -0
- package/dist/registry/errors.js +38 -0
- package/dist/registry/extractor.d.ts +9 -10
- package/dist/registry/extractor.js +5 -15
- package/dist/registry/files.d.ts +26 -0
- package/dist/registry/files.js +160 -0
- package/dist/registry/generators/descriptors.d.ts +81 -0
- package/dist/registry/generators/descriptors.js +405 -0
- package/dist/registry/generators/fields.d.ts +46 -0
- package/dist/registry/generators/fields.js +111 -0
- package/dist/registry/generators/markdown/common.d.ts +21 -0
- package/dist/registry/generators/markdown/common.js +55 -0
- package/dist/registry/generators/markdown/index.d.ts +33 -0
- package/dist/registry/generators/markdown/index.js +37 -0
- package/dist/registry/generators/markdown/page.d.ts +8 -0
- package/dist/registry/generators/markdown/page.js +52 -0
- package/dist/registry/generators/markdown/pyvalue.d.ts +34 -0
- package/dist/registry/generators/markdown/pyvalue.js +106 -0
- package/dist/registry/generators/markdown/sections/choosing-object.d.ts +2 -0
- package/dist/registry/generators/markdown/sections/choosing-object.js +52 -0
- package/dist/registry/generators/markdown/sections/example.d.ts +22 -0
- package/dist/registry/generators/markdown/sections/example.js +295 -0
- package/dist/registry/generators/markdown/sections/filtering.d.ts +2 -0
- package/dist/registry/generators/markdown/sections/filtering.js +76 -0
- package/dist/registry/generators/markdown/sections/header.d.ts +2 -0
- package/dist/registry/generators/markdown/sections/header.js +37 -0
- package/dist/registry/generators/markdown/sections/inputs.d.ts +30 -0
- package/dist/registry/generators/markdown/sections/inputs.js +151 -0
- package/dist/registry/generators/markdown/sections/lookups.d.ts +12 -0
- package/dist/registry/generators/markdown/sections/lookups.js +150 -0
- package/dist/registry/generators/markdown/sections/outputs.d.ts +3 -0
- package/dist/registry/generators/markdown/sections/outputs.js +9 -0
- package/dist/registry/generators/markdown/sections/resolving-fields.d.ts +2 -0
- package/dist/registry/generators/markdown/sections/resolving-fields.js +139 -0
- package/dist/registry/generators/markdown/sections/schema-dynamic.d.ts +2 -0
- package/dist/registry/generators/markdown/sections/schema-dynamic.js +86 -0
- package/dist/registry/generators/materialize.d.ts +30 -0
- package/dist/registry/generators/materialize.js +132 -0
- package/dist/registry/generators/md-symbols.d.ts +22 -0
- package/dist/registry/generators/md-symbols.js +58 -0
- package/dist/registry/generators/triggers.d.ts +15 -0
- package/dist/registry/generators/triggers.js +85 -0
- package/dist/registry/generators/type-registry.d.ts +50 -0
- package/dist/registry/generators/type-registry.js +154 -0
- package/dist/registry/generators/type-tree.d.ts +65 -0
- package/dist/registry/generators/type-tree.js +179 -0
- package/dist/registry/library-build/build.d.ts +57 -0
- package/dist/registry/library-build/build.js +286 -0
- package/dist/registry/library-build/canonical.d.ts +119 -0
- package/dist/registry/library-build/canonical.js +512 -0
- package/dist/registry/library-build/cli.d.ts +45 -0
- package/dist/registry/library-build/cli.js +182 -0
- package/dist/registry/library-build/context.d.ts +107 -0
- package/dist/registry/library-build/context.js +267 -0
- package/dist/registry/library-build/enrich.d.ts +36 -0
- package/dist/registry/library-build/enrich.js +158 -0
- package/dist/registry/library-build/events.d.ts +108 -0
- package/dist/registry/library-build/events.js +476 -0
- package/dist/registry/library-build/generic-expand.d.ts +77 -0
- package/dist/registry/library-build/generic-expand.js +363 -0
- package/dist/registry/library-build/plan.d.ts +71 -0
- package/dist/registry/library-build/plan.js +270 -0
- package/dist/registry/library-build/py.d.ts +45 -0
- package/dist/registry/library-build/py.js +167 -0
- package/dist/registry/library-build/schema-action.d.ts +38 -0
- package/dist/registry/library-build/schema-action.js +107 -0
- package/dist/registry/library-build/write.d.ts +6 -0
- package/dist/registry/library-build/write.js +26 -0
- package/dist/registry/library-reader.d.ts +20 -0
- package/dist/registry/library-reader.js +50 -0
- package/dist/registry/lookup-specs.d.ts +55 -0
- package/dist/registry/lookup-specs.js +140 -0
- package/dist/registry/materialize-cli.js +28 -14
- package/dist/registry/materializer.d.ts +25 -3
- package/dist/registry/materializer.js +45 -29
- package/dist/registry/model/library.d.ts +254 -0
- package/dist/registry/model/library.js +23 -0
- package/dist/registry/naming.d.ts +54 -0
- package/dist/registry/naming.js +142 -0
- package/dist/registry/orphans.d.ts +4 -0
- package/dist/registry/orphans.js +86 -0
- package/dist/registry/prepare/actions.d.ts +26 -0
- package/dist/registry/prepare/actions.js +94 -0
- package/dist/registry/prepare/connections.d.ts +181 -0
- package/dist/registry/prepare/connections.js +399 -0
- package/dist/registry/prepare/event.d.ts +96 -0
- package/dist/registry/prepare/event.js +268 -0
- package/dist/registry/prepare/handoff.d.ts +21 -0
- package/dist/registry/prepare/handoff.js +91 -0
- package/dist/registry/prepare/ledger.d.ts +104 -0
- package/dist/registry/prepare/ledger.js +216 -0
- package/dist/registry/prepare/messages.d.ts +190 -0
- package/dist/registry/prepare/messages.js +472 -0
- package/dist/registry/prepare/objects.d.ts +130 -0
- package/dist/registry/prepare/objects.js +318 -0
- package/dist/registry/prepare/overlay.d.ts +149 -0
- package/dist/registry/prepare/overlay.js +487 -0
- package/dist/registry/prepare/parents.d.ts +41 -0
- package/dist/registry/prepare/parents.js +122 -0
- package/dist/registry/prepare/pipeline.d.ts +91 -0
- package/dist/registry/prepare/pipeline.js +376 -0
- package/dist/registry/prepare/regenerate.d.ts +9 -0
- package/dist/registry/prepare/regenerate.js +50 -0
- package/dist/registry/prepare/resolve.d.ts +199 -0
- package/dist/registry/prepare/resolve.js +470 -0
- package/dist/registry/prepare/retry.d.ts +83 -0
- package/dist/registry/prepare/retry.js +109 -0
- package/dist/registry/prepare/source-import.d.ts +54 -0
- package/dist/registry/prepare/source-import.js +192 -0
- package/dist/registry/prepare/support.d.ts +41 -0
- package/dist/registry/prepare/support.js +178 -0
- package/dist/registry/prepare-cli.d.ts +16 -5
- package/dist/registry/prepare-cli.js +60 -53
- package/dist/registry/pull-cli.js +8 -7
- package/dist/registry/reporter.d.ts +26 -0
- package/dist/registry/reporter.js +41 -0
- package/dist/registry/uip/client.d.ts +99 -0
- package/dist/registry/uip/client.js +226 -0
- package/dist/registry/uip/commands.d.ts +40 -0
- package/dist/registry/uip/commands.js +80 -0
- package/dist/registry/uip/envelope.d.ts +37 -0
- package/dist/registry/uip/envelope.js +84 -0
- package/dist/registry/uip/response-cache.d.ts +28 -0
- package/dist/registry/uip/response-cache.js +57 -0
- package/lib/README.md +10 -8
- package/package.json +3 -3
- package/dist/generators/_connections.py +0 -331
- package/dist/generators/_events.py +0 -355
- package/dist/generators/_lookups.py +0 -114
- package/dist/generators/_naming.py +0 -185
- package/dist/generators/_objects.py +0 -299
- package/dist/generators/_resolve.py +0 -319
- package/dist/generators/convert_library_to_md.py +0 -1441
- package/dist/generators/extract_library.py +0 -125
- package/dist/generators/generate_connectors_ts.py +0 -936
- package/dist/generators/generate_library_json.py +0 -2527
- package/dist/generators/generate_triggers_ts.py +0 -110
- package/dist/generators/materialize_registry.py +0 -155
- package/dist/generators/prepare_connector.py +0 -1860
- package/dist/registry/python.d.ts +0 -26
- package/dist/registry/python.js +0 -46
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `is resources describe` enrichment: the second pass over every canonical
|
|
3
|
+
* entry.
|
|
4
|
+
*
|
|
5
|
+
* `flow registry get` (without `--connection-id`) returns a sparse view: many
|
|
6
|
+
* connectors come back with empty definitions and no `connectorMethodInfo`.
|
|
7
|
+
* `is resources describe <connector> <object> --operation <op>` returns the
|
|
8
|
+
* same data plus path placeholders, the path/query parameter split and full
|
|
9
|
+
* request/response field schemas — without a connection for every
|
|
10
|
+
* schema-static connector.
|
|
11
|
+
*
|
|
12
|
+
* Split in two here: {@link applyDescribe} is the pure merge of one describe
|
|
13
|
+
* payload into one entry, {@link enrichEntry} is the fetch plan around it
|
|
14
|
+
* (registry verb first, then the alternate the object itself advertises).
|
|
15
|
+
*/
|
|
16
|
+
import { mapConcurrent } from "../concurrency.js";
|
|
17
|
+
import { messageOf } from "../errors.js";
|
|
18
|
+
import { normalizeFieldKeys, pick } from "./canonical.js";
|
|
19
|
+
import { isDescribeObject, isDescribeOperation } from "./context.js";
|
|
20
|
+
import { get, item, pyEquals, pyIter, pyOr, truthy } from "./py.js";
|
|
21
|
+
/**
|
|
22
|
+
* Registry `httpMethod` (e.g. `GETBYID`) → a guess at the `is resources`
|
|
23
|
+
* operation name, for an entry whose canonical `operation.name` is empty.
|
|
24
|
+
*/
|
|
25
|
+
export const HTTP_METHOD_TO_OPERATION = new Map([
|
|
26
|
+
["GET", "List"],
|
|
27
|
+
["GETBYID", "Retrieve"],
|
|
28
|
+
["POST", "Create"],
|
|
29
|
+
["PATCH", "Update"],
|
|
30
|
+
["PUT", "Replace"],
|
|
31
|
+
["DELETE", "Delete"],
|
|
32
|
+
]);
|
|
33
|
+
/**
|
|
34
|
+
* `discover_operation_name`: the `is resources` operation whose HTTP method
|
|
35
|
+
* matches the entry's, from the object's `AvailableOperations`; `null` when
|
|
36
|
+
* the object cannot be described or nothing matches.
|
|
37
|
+
*/
|
|
38
|
+
export async function discoverOperationName(ctx, entry) {
|
|
39
|
+
const operation = item(entry, "operation");
|
|
40
|
+
const connectorKey = item(item(entry, "connector"), "key");
|
|
41
|
+
const objectName = item(operation, "objectName");
|
|
42
|
+
const httpMethod = item(operation, "httpMethod");
|
|
43
|
+
if (!truthy(connectorKey) || !truthy(objectName))
|
|
44
|
+
return null;
|
|
45
|
+
const objData = await isDescribeObject(ctx, connectorKey, objectName);
|
|
46
|
+
if (!truthy(objData))
|
|
47
|
+
return null;
|
|
48
|
+
for (const op of pyIter(pyOr(pick(objData, "AvailableOperations", "availableOperations"), []))) {
|
|
49
|
+
if (pyEquals(pick(op, "Method", "method"), httpMethod))
|
|
50
|
+
return pick(op, "Name", "name");
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The pure half of `enrich_entry`: merge one describe `Data` payload into the
|
|
56
|
+
* entry, in place. `operation.name` is filled only when the registry left it
|
|
57
|
+
* empty; `pathTemplate`, `parameters` and the two schemas come from the
|
|
58
|
+
* payload; `objectDisplayName` and `display.operationLabel` fill gaps only.
|
|
59
|
+
*/
|
|
60
|
+
export function applyDescribe(entry, data) {
|
|
61
|
+
const e = entry;
|
|
62
|
+
const operation = item(e, "operation");
|
|
63
|
+
const display = item(e, "display");
|
|
64
|
+
const opData = pyOr(pick(data, "Operation", "operation"), {});
|
|
65
|
+
// If the name was discovered via fallback, persist it now.
|
|
66
|
+
const opResolvedName = pick(opData, "Name", "name");
|
|
67
|
+
if (!truthy(item(operation, "name")) && truthy(opResolvedName))
|
|
68
|
+
operation.name = opResolvedName;
|
|
69
|
+
// Path with placeholders (supersedes the simple `path`).
|
|
70
|
+
const opPath = pick(opData, "Path", "path");
|
|
71
|
+
if (truthy(opPath))
|
|
72
|
+
operation.pathTemplate = opPath;
|
|
73
|
+
if (!truthy(get(operation, "objectDisplayName"))) {
|
|
74
|
+
const displayName = pick(data, "DisplayName", "displayName");
|
|
75
|
+
if (truthy(displayName))
|
|
76
|
+
operation.objectDisplayName = displayName;
|
|
77
|
+
}
|
|
78
|
+
const opCurated = pick(opData, "Curated", "curated");
|
|
79
|
+
if (truthy(opCurated) && !truthy(get(display, "operationLabel")))
|
|
80
|
+
display.operationLabel = opCurated;
|
|
81
|
+
// Parameters (path / query) — raw shape, camelCase keys.
|
|
82
|
+
const params = pyOr(pick(data, "Parameters", "parameters"), []);
|
|
83
|
+
if (truthy(params))
|
|
84
|
+
operation.parameters = normalizeFieldKeys(params);
|
|
85
|
+
// Do not infer schema discovery from empty field lists: delete and file
|
|
86
|
+
// operations legitimately expose neither. Connector metadata owns that flag.
|
|
87
|
+
const requestFields = pyOr(pick(data, "RequestFields", "requestFields"), []);
|
|
88
|
+
const responseFields = pyOr(pick(data, "ResponseFields", "responseFields"), []);
|
|
89
|
+
if (truthy(requestFields))
|
|
90
|
+
e.inputSchema = { fields: normalizeFieldKeys(requestFields) };
|
|
91
|
+
if (truthy(responseFields))
|
|
92
|
+
e.outputSchema = { fields: normalizeFieldKeys(responseFields) };
|
|
93
|
+
return entry;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* `enrich_entry`: augment a canonical entry with `is resources describe` data.
|
|
97
|
+
* On any failure the entry is returned as it was, so the pipeline degrades
|
|
98
|
+
* gracefully.
|
|
99
|
+
*
|
|
100
|
+
* The registry's verb and the IS CLI's can DISAGREE for the same operation
|
|
101
|
+
* (Data Service `QueryEntityRecordsCurated`: registry `List`, CLI `Create`).
|
|
102
|
+
* When the registry's name does not resolve, the OBJECT is asked which
|
|
103
|
+
* operations it has and the one whose HTTP method matches is retried.
|
|
104
|
+
* `operation.name` deliberately keeps the REGISTRY's verb even then — it maps
|
|
105
|
+
* to a CRUD verb the offline fixtures are synthesised from; the discovered
|
|
106
|
+
* name is only for reaching the schema.
|
|
107
|
+
*/
|
|
108
|
+
export async function enrichEntry(ctx, entry) {
|
|
109
|
+
const operation = item(entry, "operation");
|
|
110
|
+
const connectorKey = item(item(entry, "connector"), "key");
|
|
111
|
+
const objectName = item(operation, "objectName");
|
|
112
|
+
let opName = item(operation, "name");
|
|
113
|
+
// Fallback: no operation name from the registry — discover via httpMethod.
|
|
114
|
+
if (!truthy(opName)) {
|
|
115
|
+
opName = pyOr(await discoverOperationName(ctx, entry), HTTP_METHOD_TO_OPERATION.get(item(operation, "httpMethod")) ?? null);
|
|
116
|
+
}
|
|
117
|
+
if (!truthy(opName))
|
|
118
|
+
return entry; // nothing to do
|
|
119
|
+
let data = await isDescribeOperation(ctx, connectorKey, objectName, opName);
|
|
120
|
+
if (!truthy(data)) {
|
|
121
|
+
const alt = await discoverOperationName(ctx, entry);
|
|
122
|
+
if (truthy(alt) && alt !== opName)
|
|
123
|
+
data = await isDescribeOperation(ctx, connectorKey, objectName, alt);
|
|
124
|
+
}
|
|
125
|
+
if (!truthy(data))
|
|
126
|
+
return entry; // connector might be a stub or recently removed
|
|
127
|
+
return applyDescribe(entry, data);
|
|
128
|
+
}
|
|
129
|
+
/** `enrich_all`: `enrichEntry` over every entry, results in input order. */
|
|
130
|
+
export async function enrichAll(ctx, entries) {
|
|
131
|
+
let done = 0;
|
|
132
|
+
const enriched = await mapConcurrent(entries, ctx.concurrency, async (e, i) => {
|
|
133
|
+
let out;
|
|
134
|
+
try {
|
|
135
|
+
out = await enrichEntry(ctx, e);
|
|
136
|
+
}
|
|
137
|
+
catch (exc) {
|
|
138
|
+
// Non-fatal — keep the un-enriched entry.
|
|
139
|
+
out = entries[i];
|
|
140
|
+
ctx.reporter.warn(` WARN: enrichment failed for ${item(entries[i], "nodeType")}: ${messageOf(exc)}`);
|
|
141
|
+
}
|
|
142
|
+
done += 1;
|
|
143
|
+
if (done % 100 === 0 || done === entries.length)
|
|
144
|
+
ctx.reporter.info(` Enriched ${done}/${entries.length}`);
|
|
145
|
+
return out;
|
|
146
|
+
});
|
|
147
|
+
let pathTemplateAdded = 0;
|
|
148
|
+
let schemaAdded = 0;
|
|
149
|
+
for (const e of enriched) {
|
|
150
|
+
if (truthy(get(get(e, "operation", {}), "pathTemplate")))
|
|
151
|
+
pathTemplateAdded += 1;
|
|
152
|
+
if (truthy(get(get(e, "inputSchema", {}), "fields")) || truthy(get(get(e, "outputSchema", {}), "fields")))
|
|
153
|
+
schemaAdded += 1;
|
|
154
|
+
}
|
|
155
|
+
ctx.reporter.info(` pathTemplate added on ${pathTemplateAdded}/${entries.length}`);
|
|
156
|
+
ctx.reporter.info(` schema added/augmented on ${schemaAdded}/${entries.length}`);
|
|
157
|
+
return enriched;
|
|
158
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Refusal } from "../errors.js";
|
|
2
|
+
import type { LibraryEntry } from "../model/library.js";
|
|
3
|
+
import type { UipClient } from "../uip/client.js";
|
|
4
|
+
import { type BuildContext } from "./context.js";
|
|
5
|
+
import { type Dict } from "./py.js";
|
|
6
|
+
/** A trigger metadata call failed, with the reason and the way forward. */
|
|
7
|
+
export declare class EventDiscoveryError extends Refusal {
|
|
8
|
+
/**
|
|
9
|
+
* True when the call was never made — the client refused it (`--offline`).
|
|
10
|
+
* Such a failure is not an answer from the tenant and must not be cached
|
|
11
|
+
* as one; see {@link triggersObjectsCached}.
|
|
12
|
+
*/
|
|
13
|
+
readonly refused: boolean;
|
|
14
|
+
constructor(message: string,
|
|
15
|
+
/**
|
|
16
|
+
* True when the call was never made — the client refused it (`--offline`).
|
|
17
|
+
* Such a failure is not an answer from the tenant and must not be cached
|
|
18
|
+
* as one; see {@link triggersObjectsCached}.
|
|
19
|
+
*/
|
|
20
|
+
refused?: boolean);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* `triggers_objects`: the event objects for `(connector, operation)`, PascalCase
|
|
24
|
+
* rows. `connectionId` is optional; a connector whose objects do not come from
|
|
25
|
+
* the connection answers identically either way.
|
|
26
|
+
*/
|
|
27
|
+
export declare function triggersObjects(client: UipClient, key: string, operation: string, connectionId?: string, timeoutMs?: number): Promise<unknown[]>;
|
|
28
|
+
/** `triggers_describe`: `EventParameters` / `FilterFields` / `OutputFields` for one object. */
|
|
29
|
+
export declare function triggersDescribe(client: UipClient, key: string, operation: string, objectName: string, connectionId?: string, timeoutMs?: number): Promise<Dict>;
|
|
30
|
+
/** `_camelize`: lower-case the first letter of every key, recursively. */
|
|
31
|
+
export declare function camelize(value: unknown): unknown;
|
|
32
|
+
/** `_is_hidden`: a hidden parameter that is safe to DROP — hidden and optional. */
|
|
33
|
+
export declare function isHidden(low: Dict): boolean;
|
|
34
|
+
/** `_keep_hidden_marker`: flag a kept parameter the designer hides (necessarily a required one). */
|
|
35
|
+
export declare function keepHiddenMarker(low: Dict, field: Dict): Dict;
|
|
36
|
+
/**
|
|
37
|
+
* `_with_cascade`: mark each parameter that another one has to resolve before
|
|
38
|
+
* it, then order by the designer's `sortOrder` (unset last), stably.
|
|
39
|
+
*/
|
|
40
|
+
export declare function withCascade(fields: Dict[]): Dict[];
|
|
41
|
+
/** `camel_fields`: describe/objects fields normalized to the registry's camelCase shape. */
|
|
42
|
+
export declare function camelFields(fields: unknown): Dict[];
|
|
43
|
+
/** `normalize_bucket_fields`: `triggers objects → Parameters[]` rows, camelCase, bucket made explicit. */
|
|
44
|
+
export declare function normalizeBucketFields(parameters: unknown): Dict[];
|
|
45
|
+
/**
|
|
46
|
+
* `union_event_parameters`: describe's EventParameters ∪ the object row's
|
|
47
|
+
* Parameters, deduped by name; `required` is an OR; the object row's bucket
|
|
48
|
+
* survives the merge.
|
|
49
|
+
*/
|
|
50
|
+
export declare function unionEventParameters(declared: unknown, objectParameters: unknown): Dict[];
|
|
51
|
+
/** `merge_describe_into_node`: fold a `triggers describe` answer into a registry trigger definition (a copy). */
|
|
52
|
+
export declare function mergeDescribeIntoNode(node: Dict, describe: Dict, objectParameters?: unknown): Dict;
|
|
53
|
+
export interface EventFacts {
|
|
54
|
+
eventMode: string;
|
|
55
|
+
byoaConnection: boolean;
|
|
56
|
+
isWebhookUrlVisible: boolean;
|
|
57
|
+
textBlocks: string[];
|
|
58
|
+
}
|
|
59
|
+
/** `event_facts`: the three facts that change how a subscription is prepared or tested; the object row wins. */
|
|
60
|
+
export declare function eventFacts(node: Dict, objectRow: unknown): EventFacts;
|
|
61
|
+
/**
|
|
62
|
+
* `triggers_objects_cached`: cached `uip is triggers objects <key> <OPERATION>`,
|
|
63
|
+
* called WITHOUT a connection on purpose. A failure is reported and cached as
|
|
64
|
+
* an empty catalog — a REAL failure, that is. The Python had no offline mode,
|
|
65
|
+
* so every failure it cached was the tenant's answer. Under `--offline` the
|
|
66
|
+
* client refuses the call instead; caching that as `{objects: []}` would make
|
|
67
|
+
* the next ONLINE build over the same `--keep-temp` caches see an empty event
|
|
68
|
+
* catalogue and expand nothing, silently. So a refusal is reported and used,
|
|
69
|
+
* but never written down. (The four describe/list helpers in `context.ts` now
|
|
70
|
+
* apply the same rule explicitly. They used to rest on an accident — a
|
|
71
|
+
* refusal's empty stdout is not JSON, so they returned before their cache
|
|
72
|
+
* write — which held only for as long as the offline client wrote nothing to
|
|
73
|
+
* stdout. That is precisely the accident this flag replaced, so they check the
|
|
74
|
+
* flag instead.)
|
|
75
|
+
*/
|
|
76
|
+
export declare function triggersObjectsCached(ctx: BuildContext, key: string, operation: string): Promise<unknown[]>;
|
|
77
|
+
/**
|
|
78
|
+
* `triggers_describe_cached`: cached `uip is triggers describe <key> <OPERATION> <object>`.
|
|
79
|
+
* A refused call is not cached, for the reason given on {@link triggersObjectsCached}.
|
|
80
|
+
*/
|
|
81
|
+
export declare function triggersDescribeCached(ctx: BuildContext, key: string, operation: string, objectName: string): Promise<Dict>;
|
|
82
|
+
/**
|
|
83
|
+
* `_apply_event_schema`: put an event's OWN schema on the entry, replacing the
|
|
84
|
+
* node manifest's. `inputSchema` becomes the union rule's answer; `eventSchema`
|
|
85
|
+
* is appended to the entry and later stamped onto the sidecar.
|
|
86
|
+
*/
|
|
87
|
+
export declare function applyEventSchema(entry: LibraryEntry, describe: unknown, obj: unknown): LibraryEntry;
|
|
88
|
+
/** `_describe_curated_events`: give each CURATED event its own schema, in place. */
|
|
89
|
+
export declare function describeCuratedEvents(ctx: BuildContext, entries: LibraryEntry[]): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* `_make_expanded_event_entry`: one per-object variant of a generic connector
|
|
92
|
+
* EVENT. The variant keeps `activityType: GenericTrigger` and the template's
|
|
93
|
+
* nodeType deliberately; the object rides on `operation.objectName`.
|
|
94
|
+
*/
|
|
95
|
+
export declare function makeExpandedEventEntry(template: LibraryEntry, obj: unknown, describe: unknown): LibraryEntry;
|
|
96
|
+
/**
|
|
97
|
+
* `_expand_generic_events`: expand each generic EVENT template into one entry
|
|
98
|
+
* per event object. Variants come back in template × object order (the Python
|
|
99
|
+
* appended them as the describes completed); `build` sorts them before
|
|
100
|
+
* planning.
|
|
101
|
+
*/
|
|
102
|
+
export declare function expandGenericEvents(ctx: BuildContext, templates: LibraryEntry[]): Promise<LibraryEntry[]>;
|
|
103
|
+
/**
|
|
104
|
+
* `resolve_connector_events`: give every connector EVENT its real schema;
|
|
105
|
+
* expand the expandable ones. Returns `[entries, expanded]` — `entries` is the
|
|
106
|
+
* input with curated events described in place.
|
|
107
|
+
*/
|
|
108
|
+
export declare function resolveConnectorEvents(ctx: BuildContext, entries: LibraryEntry[]): Promise<[LibraryEntry[], LibraryEntry[]]>;
|