@elementumai/edk 0.9.6 → 0.9.9
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/README.md +34 -3
- package/dist-sdk/src/catalog/factories.d.ts +26 -6
- package/dist-sdk/src/catalog/factories.js +41 -6
- package/dist-sdk/src/catalog/from-authoring.js +27 -33
- package/dist-sdk/src/catalog/index.d.ts +2 -2
- package/dist-sdk/src/catalog/index.js +2 -2
- package/dist-sdk/src/catalog/org.js +93 -42
- package/dist-sdk/src/catalog/token.js +10 -0
- package/dist-sdk/src/catalog/types.d.ts +42 -3
- package/dist-sdk/src/catalog/types.js +5 -0
- package/dist-sdk/src/core/index.d.ts +2 -2
- package/dist-sdk/src/core/index.js +1 -1
- package/dist-sdk/src/core/platform-id.d.ts +2 -0
- package/dist-sdk/src/core/platform-id.js +4 -0
- package/dist-sdk/src/core/system-fields.d.ts +18 -0
- package/dist-sdk/src/core/system-fields.js +21 -0
- package/dist-sdk/src/core/triggers/on-demand.d.ts +27 -24
- package/dist-sdk/src/core/triggers/on-demand.js +33 -12
- package/dist-sdk/src/core/types/app.d.ts +14 -9
- package/dist-sdk/src/core/types/aspect-category.d.ts +1 -0
- package/dist-sdk/src/core/types/aspect-category.js +1 -0
- package/dist-sdk/src/core/types/platform.d.ts +1 -1
- package/dist-sdk/src/engine/build/context.d.ts +24 -8
- package/dist-sdk/src/engine/build/source-context.d.ts +14 -17
- package/dist-sdk/src/engine/build/source-context.js +1 -1
- package/dist-sdk/src/engine/pull/context.d.ts +18 -0
- package/dist-sdk/src/engine/pull/org.d.ts +4 -0
- package/dist-sdk/src/engine/pull/org.js +17 -2
- package/dist-sdk/src/engine/pull/procedure-refs.d.ts +16 -0
- package/dist-sdk/src/engine/pull/procedure-refs.js +69 -0
- package/dist-sdk/src/engine/pull/ref-only.d.ts +14 -0
- package/dist-sdk/src/engine/pull/ref-only.js +35 -2
- package/dist-sdk/src/engine/tf/expr.js +1 -1
- package/dist-sdk/src/engine/workspace/authoring-layout.d.ts +15 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.js +33 -1
- package/dist-sdk/src/engine/workspace/loader.d.ts +40 -0
- package/dist-sdk/src/engine/workspace/loader.js +328 -0
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +4 -0
- package/dist-sdk/src/entities/access-policy/from-tf.js +24 -4
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +7 -0
- package/dist-sdk/src/entities/access-policy/to-tf.js +11 -3
- package/dist-sdk/src/entities/agent/build.d.ts +54 -8
- package/dist-sdk/src/entities/agent/build.js +36 -1
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +144 -3
- package/dist-sdk/src/entities/agent/from-tf.d.ts +7 -6
- package/dist-sdk/src/entities/agent/from-tf.js +176 -5
- package/dist-sdk/src/entities/agent/index.d.ts +2 -2
- package/dist-sdk/src/entities/agent/index.js +1 -1
- package/dist-sdk/src/entities/agent/module.js +1 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +5 -4
- package/dist-sdk/src/entities/agent/to-tf.js +186 -11
- package/dist-sdk/src/entities/agent/tools.d.ts +16 -5
- package/dist-sdk/src/entities/agent/tools.js +13 -1
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +16 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.js +39 -6
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.js +12 -12
- package/dist-sdk/src/entities/agent-tool/types.js +1 -0
- package/dist-sdk/src/entities/app/build.d.ts +44 -24
- package/dist-sdk/src/entities/app/build.js +18 -8
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +15 -0
- package/dist-sdk/src/entities/app/display-blocks-to-layout.d.ts +45 -0
- package/dist-sdk/src/entities/app/display-blocks-to-layout.js +98 -0
- package/dist-sdk/src/entities/app/display-blocks-to-record-create-form.d.ts +55 -0
- package/dist-sdk/src/entities/app/display-blocks-to-record-create-form.js +99 -0
- package/dist-sdk/src/entities/app/from-tf.js +79 -14
- package/dist-sdk/src/entities/app/index.d.ts +3 -2
- package/dist-sdk/src/entities/app/index.js +2 -1
- package/dist-sdk/src/entities/app/to-tf.js +30 -6
- package/dist-sdk/src/entities/automation/build.d.ts +37 -18
- package/dist-sdk/src/entities/automation/build.js +121 -12
- package/dist-sdk/src/entities/automation/catalog-render.js +5 -2
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +8 -10
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +2 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +103 -20
- package/dist-sdk/src/entities/automation/from-tf.d.ts +10 -1
- package/dist-sdk/src/entities/automation/from-tf.js +1165 -91
- package/dist-sdk/src/entities/automation/index.d.ts +1 -1
- package/dist-sdk/src/entities/automation/module.js +15 -5
- package/dist-sdk/src/entities/automation/operators.d.ts +2 -2
- package/dist-sdk/src/entities/automation/operators.js +1 -0
- package/dist-sdk/src/entities/automation/output-field-types.d.ts +17 -0
- package/dist-sdk/src/entities/automation/output-field-types.js +45 -0
- package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +20 -4
- package/dist-sdk/src/entities/automation/output-key-wire-name.js +33 -6
- package/dist-sdk/src/entities/automation/script-code.d.ts +1 -1
- package/dist-sdk/src/entities/automation/script-code.js +168 -36
- package/dist-sdk/src/entities/automation/task-label.d.ts +2 -0
- package/dist-sdk/src/entities/automation/task-label.js +18 -0
- package/dist-sdk/src/entities/automation/tasks.d.ts +159 -45
- package/dist-sdk/src/entities/automation/tasks.js +60 -47
- package/dist-sdk/src/entities/automation/to-tf.d.ts +7 -1
- package/dist-sdk/src/entities/automation/to-tf.js +816 -87
- package/dist-sdk/src/entities/automation/triggers.d.ts +14 -5
- package/dist-sdk/src/entities/automation/triggers.js +1 -1
- package/dist-sdk/src/entities/automation/value-ref-tf.d.ts +78 -0
- package/dist-sdk/src/entities/automation/value-ref-tf.js +193 -0
- package/dist-sdk/src/entities/dashboard/from-tf.js +1 -1
- package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +1 -0
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +1 -1
- package/dist-sdk/src/entities/element/build.d.ts +30 -7
- package/dist-sdk/src/entities/element/build.js +7 -3
- package/dist-sdk/src/entities/element/from-tf.js +7 -3
- package/dist-sdk/src/entities/element/index.d.ts +3 -2
- package/dist-sdk/src/entities/element/index.js +3 -2
- package/dist-sdk/src/entities/element/to-tf.js +49 -8
- package/dist-sdk/src/entities/field/build.d.ts +94 -3
- package/dist-sdk/src/entities/field/build.js +82 -3
- package/dist-sdk/src/entities/field/from-tf.d.ts +6 -0
- package/dist-sdk/src/entities/field/from-tf.js +104 -1
- package/dist-sdk/src/entities/field/locals.js +6 -7
- package/dist-sdk/src/entities/field/module.js +1 -0
- package/dist-sdk/src/entities/field/options.d.ts +2 -0
- package/dist-sdk/src/entities/field/options.js +12 -2
- package/dist-sdk/src/entities/field/record-shape.d.ts +12 -15
- package/dist-sdk/src/entities/field/to-tf.d.ts +13 -3
- package/dist-sdk/src/entities/field/to-tf.js +191 -56
- package/dist-sdk/src/entities/field/types.js +2 -0
- package/dist-sdk/src/entities/org/category-ref.d.ts +5 -0
- package/dist-sdk/src/entities/org/category-ref.js +12 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.js +3 -3
- package/dist-sdk/src/entities/record-create-form/to-tf.d.ts +1 -0
- package/dist-sdk/src/entities/record-create-form/to-tf.js +18 -13
- package/dist-sdk/src/entities/relationship/from-tf.js +100 -7
- package/dist-sdk/src/entities/role/from-tf.js +10 -4
- package/dist-sdk/src/entities/search-table/build.d.ts +1 -1
- package/dist-sdk/src/entities/search-table/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/search-table/from-tf.js +6 -0
- package/dist-sdk/src/entities/search-table/printer.js +3 -1
- package/dist-sdk/src/entities/search-table/to-tf.js +3 -3
- package/dist-sdk/src/entities/search-table/types.js +1 -0
- package/dist-sdk/src/entities/service-account/from-tf.js +10 -4
- package/dist-sdk/src/entities/service-account/to-tf.d.ts +2 -1
- package/dist-sdk/src/entities/service-account/to-tf.js +7 -0
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.d.ts +9 -0
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +39 -0
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +24 -1
- package/dist-sdk/src/entities/shared/filters/ast.js +4 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +13 -2
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +14 -8
- package/dist-sdk/src/entities/shared/handle-description.d.ts +12 -0
- package/dist-sdk/src/entities/shared/handle-description.js +20 -0
- package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +5 -3
- package/dist-sdk/src/entities/shared/tool-field-ref.js +11 -16
- package/dist-sdk/src/entities/shared/types/common.d.ts +7 -5
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +6 -1
- package/dist-sdk/src/entities/shared/types/field-types.js +5 -8
- package/dist-sdk/src/entities/shared/types/platform.d.ts +15 -2
- package/dist-sdk/src/entities/skill/build.d.ts +51 -2
- package/dist-sdk/src/entities/skill/build.js +65 -8
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +1 -1
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +79 -18
- package/dist-sdk/src/entities/skill/from-tf.d.ts +11 -0
- package/dist-sdk/src/entities/skill/from-tf.js +47 -5
- package/dist-sdk/src/entities/skill/index.d.ts +1 -1
- package/dist-sdk/src/entities/skill/index.js +1 -1
- package/dist-sdk/src/entities/skill/input-coverage.d.ts +89 -0
- package/dist-sdk/src/entities/skill/input-coverage.js +327 -0
- package/dist-sdk/src/entities/skill/module.js +2 -0
- package/dist-sdk/src/entities/skill/to-tf.d.ts +9 -25
- package/dist-sdk/src/entities/skill/to-tf.js +29 -40
- package/dist-sdk/src/entities/skill/tools.d.ts +12 -2
- package/dist-sdk/src/entities/skill/tools.js +3 -6
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +19 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.js +50 -14
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +9 -7
- package/dist-sdk/src/entities/skill-tool/to-tf.js +29 -23
- package/dist-sdk/src/entities/table/to-tf.js +21 -5
- package/dist-sdk/src/entities/task/to-tf.js +3 -2
- package/dist-sdk/src/entities/view/from-tf.js +36 -10
- package/dist-sdk/src/entities/view/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/view/to-tf.js +49 -30
- package/dist-sdk/src/entities/visual-flow/from-tf.js +6 -2
- package/dist-sdk/src/entities/widget/from-tf.js +2 -2
- package/dist-sdk/src/entities/widget/to-tf.d.ts +1 -0
- package/dist-sdk/src/entities/widget/to-tf.js +52 -23
- package/dist-sdk/src/graph/index.d.ts +19 -1
- package/dist-sdk/src/graph/index.js +20 -0
- package/dist-sdk/src/graph/types.d.ts +22 -0
- package/package.json +11 -5
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* identically for both pull paths. Platform ids come only from the stream's
|
|
8
8
|
* import blocks and stay data-side — they never reach printed source.
|
|
9
9
|
*/
|
|
10
|
+
import { DEPLOY_DEFAULT_SYSTEM_FIELD_NAMES, SYSTEM_FIELD_KEYS, SYSTEM_FIELD_KEY_BY_HCL_KEY, SYSTEM_FIELD_TAG_BY_KEY, } from "../../core/system-fields.js";
|
|
10
11
|
import { EntityTfError } from "../../engine/entity.js";
|
|
11
12
|
import { dataRefLabel, optionalString, plainObject } from "../../engine/pull/context.js";
|
|
12
13
|
import { snakeSlug, tfLabelToTsLabel } from "../../engine/tf/index.js";
|
|
@@ -41,7 +42,47 @@ const KNOWN_APP_ATTRS = new Set([
|
|
|
41
42
|
"id_field_description",
|
|
42
43
|
"status_field_description",
|
|
43
44
|
"comments_enabled",
|
|
45
|
+
"system_field_config",
|
|
44
46
|
]);
|
|
47
|
+
const SYSTEM_FIELD_TYPE_BY_KEY = {
|
|
48
|
+
id: "HANDLE",
|
|
49
|
+
title: "TEXT",
|
|
50
|
+
status: "PICKLIST",
|
|
51
|
+
stage: "PICKLIST",
|
|
52
|
+
createdAt: "DATETIME",
|
|
53
|
+
createdBy: "USER",
|
|
54
|
+
updatedAt: "DATETIME",
|
|
55
|
+
updatedBy: "USER",
|
|
56
|
+
closedAt: "DATETIME",
|
|
57
|
+
closedBy: "USER",
|
|
58
|
+
};
|
|
59
|
+
function systemFieldConfigFromTf(value, owner, ctx) {
|
|
60
|
+
const result = new Map();
|
|
61
|
+
if (value === undefined)
|
|
62
|
+
return result;
|
|
63
|
+
const config = plainObject(value);
|
|
64
|
+
if (config === undefined) {
|
|
65
|
+
ctx.diagnostics.push(`${owner}: system_field_config is not a map; dropped`);
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
for (const [rawKey, rawValue] of Object.entries(config)) {
|
|
69
|
+
const publicKey = SYSTEM_FIELD_KEY_BY_HCL_KEY[rawKey];
|
|
70
|
+
if (publicKey === undefined) {
|
|
71
|
+
ctx.diagnostics.push(`${owner}: system_field_config has unknown key "${rawKey}"; dropped`);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const entry = plainObject(rawValue);
|
|
75
|
+
const required = entry?.["required"];
|
|
76
|
+
const requiredOnClose = entry?.["required_on_close"];
|
|
77
|
+
const showOnCreate = entry?.["show_on_create"];
|
|
78
|
+
if (typeof required !== "boolean" || typeof requiredOnClose !== "boolean" || typeof showOnCreate !== "boolean") {
|
|
79
|
+
ctx.diagnostics.push(`${owner}: system_field_config.${rawKey} must contain boolean required, required_on_close, and show_on_create; dropped`);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
result.set(publicKey, { required, requiredOnClose, showOnCreate });
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
45
86
|
export function appFromTf(appBlock, fieldBlocks, ctx, viewBlocks = { layoutBlocks: [], listViewBlocks: [], calendarViewBlocks: [], kanbanViewBlocks: [], dashboardViewBlocks: [], agentViewBlocks: [], managedViewOrderBlocks: [], recordCreateFormBlocks: [], dynamicLayoutBlocks: [], relationshipBlocks: [], dashboardBlocks: [], dashboardWidgetBlocks: [], widgetBlocks: [] }, accessPolicyBlocks = [], roleBlocks = [], serviceAccountBlocks = []) {
|
|
46
87
|
const label = appBlock.label;
|
|
47
88
|
if (label === undefined || label === "") {
|
|
@@ -95,19 +136,28 @@ export function appFromTf(appBlock, fieldBlocks, ctx, viewBlocks = { layoutBlock
|
|
|
95
136
|
cloudLinkId = `data.elementum_cloudlink.${dataLabel}`;
|
|
96
137
|
}
|
|
97
138
|
}
|
|
98
|
-
// --- System-field attributes → tagged NormalizedField entries.
|
|
139
|
+
// --- System-field attributes/config → tagged NormalizedField entries.
|
|
99
140
|
const fields = [];
|
|
141
|
+
const owner = { type: APP_RESOURCE_TYPE, label, scope: "app" };
|
|
142
|
+
const customFields = fieldBlocks.flatMap((block) => {
|
|
143
|
+
const entry = fieldFromTf(block, owner, ctx);
|
|
144
|
+
return entry === undefined ? [] : [entry];
|
|
145
|
+
});
|
|
146
|
+
const hasCustomStatusField = customFields.some((field) => field.key === "status");
|
|
147
|
+
const systemConfig = systemFieldConfigFromTf(attrs["system_field_config"], `app "${label}"`, ctx);
|
|
100
148
|
const titleName = optionalString(attrs, "title_field_name", `app "${label}"`, ctx);
|
|
101
|
-
if (titleName !== undefined || titleFieldDescription !== undefined) {
|
|
102
|
-
fields.push(systemEntry("title", titleName ?? "Title", "TEXT", "TITLE", titleFieldDescription));
|
|
149
|
+
if (titleName !== undefined || titleFieldDescription !== undefined || systemConfig.has("title")) {
|
|
150
|
+
fields.push(systemEntry("title", titleName ?? "Title", "TEXT", "TITLE", titleFieldDescription, systemConfig.get("title")));
|
|
103
151
|
}
|
|
104
152
|
const idName = optionalString(attrs, "id_field_name", `app "${label}"`, ctx);
|
|
105
|
-
if (idName !== undefined || idFieldDescription !== undefined) {
|
|
106
|
-
fields.push(systemEntry("id", idName ?? "ID", "TEXT", "HANDLE", idFieldDescription));
|
|
153
|
+
if (idName !== undefined || idFieldDescription !== undefined || systemConfig.has("id")) {
|
|
154
|
+
fields.push(systemEntry("id", idName ?? "ID", "TEXT", "HANDLE", idFieldDescription, systemConfig.get("id")));
|
|
107
155
|
}
|
|
108
156
|
const statusName = optionalString(attrs, "status_field_name", `app "${label}"`, ctx) ?? "Status";
|
|
109
157
|
const statusOptions = optionsFromTf(attrs["status_options"], `app "${label}" status_options`, ctx);
|
|
110
|
-
if (
|
|
158
|
+
if (!hasCustomStatusField
|
|
159
|
+
&& (statusName !== "Status" || statusOptions !== undefined || statusFieldDescription !== undefined || systemConfig.has("status"))) {
|
|
160
|
+
const flags = systemConfig.get("status");
|
|
111
161
|
fields.push({
|
|
112
162
|
key: "status",
|
|
113
163
|
field: {
|
|
@@ -117,9 +167,19 @@ export function appFromTf(appBlock, fieldBlocks, ctx, viewBlocks = { layoutBlock
|
|
|
117
167
|
tags: ["STATUS"],
|
|
118
168
|
...(statusFieldDescription !== undefined && { description: statusFieldDescription }),
|
|
119
169
|
...(statusOptions !== undefined && { options: statusOptions }),
|
|
170
|
+
...(flags !== undefined && flags),
|
|
120
171
|
},
|
|
121
172
|
});
|
|
122
173
|
}
|
|
174
|
+
for (const key of SYSTEM_FIELD_KEYS) {
|
|
175
|
+
if (key === "id" || key === "title" || key === "status")
|
|
176
|
+
continue;
|
|
177
|
+
const flags = systemConfig.get(key);
|
|
178
|
+
if (flags === undefined)
|
|
179
|
+
continue;
|
|
180
|
+
const tag = SYSTEM_FIELD_TAG_BY_KEY[key];
|
|
181
|
+
fields.push(systemEntry(key, DEPLOY_DEFAULT_SYSTEM_FIELD_NAMES[key], SYSTEM_FIELD_TYPE_BY_KEY[key], tag, undefined, flags));
|
|
182
|
+
}
|
|
123
183
|
const stages = [];
|
|
124
184
|
const stagesAttr = attrs["stages"];
|
|
125
185
|
if (Array.isArray(stagesAttr)) {
|
|
@@ -144,12 +204,7 @@ export function appFromTf(appBlock, fieldBlocks, ctx, viewBlocks = { layoutBlock
|
|
|
144
204
|
ctx.diagnostics.push(`app "${label}": stages is not a list; dropped`);
|
|
145
205
|
}
|
|
146
206
|
// --- Custom field resources (entities/field).
|
|
147
|
-
|
|
148
|
-
for (const block of fieldBlocks) {
|
|
149
|
-
const entry = fieldFromTf(block, owner, ctx);
|
|
150
|
-
if (entry !== undefined)
|
|
151
|
-
fields.push(entry);
|
|
152
|
-
}
|
|
207
|
+
fields.push(...customFields);
|
|
153
208
|
const appId = ctx.importId(`${APP_RESOURCE_TYPE}.${label}`);
|
|
154
209
|
if (appId === undefined) {
|
|
155
210
|
ctx.diagnostics.push(`app "${label}": no import block in the stream — adoption has no identity to bind`);
|
|
@@ -213,6 +268,16 @@ export function appFromTf(appBlock, fieldBlocks, ctx, viewBlocks = { layoutBlock
|
|
|
213
268
|
};
|
|
214
269
|
return { app, ...(cloudLinkHandle !== undefined && { cloudLinkHandle }) };
|
|
215
270
|
}
|
|
216
|
-
function systemEntry(key, name, type, tag, description) {
|
|
217
|
-
return {
|
|
271
|
+
function systemEntry(key, name, type, tag, description, flags) {
|
|
272
|
+
return {
|
|
273
|
+
key,
|
|
274
|
+
field: {
|
|
275
|
+
id: "",
|
|
276
|
+
name,
|
|
277
|
+
type,
|
|
278
|
+
tags: [tag],
|
|
279
|
+
...(description !== undefined && { description }),
|
|
280
|
+
...(flags !== undefined && flags),
|
|
281
|
+
},
|
|
282
|
+
};
|
|
218
283
|
}
|
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
* `src/elements/build.ts`'s header for why apps and elements split into
|
|
6
6
|
* dedicated builders despite sharing this module's field/print internals.
|
|
7
7
|
*/
|
|
8
|
-
export { app, type AppAgentView, type AppCalendarView, type AppDashboardView, type AppKanbanView, type AppListView, type AppCategory, type AppCloudOptions, type AppField, type AppPicklistConfig, type AppPicklistDynamicConfig, type AppPicklistDynamicSortOrder, type AppRecordCreateForm, type AppRecordCreateFormSection, type AppConfigured, type AppFieldRefs, type AppRef, type AppSelfRef, type AppReferenceConfiguration, type AppV2Options,
|
|
8
|
+
export { app, type AppAgentView, type AppCalendarView, type AppDashboardView, type AppKanbanView, type AppListView, type AppCategory, type AppCloudOptions, type AppField, type AppPicklistConfig, type AppPicklistDynamicConfig, type AppPicklistDynamicSortOrder, type AppRecordCreateForm, type AppRecordCreateFormSection, type AppConfigured, type AppFieldRefs, type AppRef, type AppSelfRef, type AppReferenceConfiguration, type AppV2Options, } from "./build.js";
|
|
9
9
|
export { listViewDensity, managedViewSortAggregation, managedViewSortDirection, type ListViewDensity, type ManagedViewSort, type ManagedViewSortAggregation, type ManagedViewSortDirection, type ManagedViewSortField, type ManagedViewSortOrder, } from "../view/build.js";
|
|
10
10
|
export { type AppWidget, type CreateRecordWidget, type LinkRecordsWidget, type RelatedRecordsWidget, type RunAutomationWidget, type RunAutomationWidgetParameter, type WidgetButtonStyle, type WidgetButtonType, } from "../widget/build.js";
|
|
11
11
|
export { type DisplayBlock } from "./display-blocks.js";
|
|
12
12
|
export { type AppRelationship, type AppRelationshipColumn } from "../relationship/build.js";
|
|
13
13
|
export { dashboardChartWidget, dashboardRecordsWidget, dashboardWidgetSize, type DashboardChartWidget, type DashboardRecordsWidget, type DashboardWidget, type DashboardWidgetSize, } from "../dashboard/build.js";
|
|
14
14
|
export { type AppDynamicLayout, type DynamicLayoutComponent, type DynamicLayoutCondition, type DynamicLayoutCssLength, type DynamicLayoutDependency, type DynamicLayoutFieldComponent, type DynamicLayoutFieldValidation, type DynamicLayoutSaveGroup, type DynamicLayoutStyle, type DynamicLayoutTypedValue, type DynamicLayoutValidationRule, dynamicLayout, } from "../dynamic-layout/build.js";
|
|
15
|
-
export { attachmentField, booleanField, calculatedField, dateField, dateTimeField, decimalField, groupField, jsonField,
|
|
15
|
+
export { attachmentField, booleanField, calculatedField, dateField, dateTimeField, decimalField, dropdownDisplay, dropdownField, dropdownOption, dropdownValue, groupField, jsonField, multiSelectField, numberField, relationField, richTextField, textField, userField, type BaseFieldOptions, type CalculatedFieldOptions, type InferredCalculatedField, type DropdownConfig, type DropdownDisplay, type DropdownFieldOptions, type DropdownOption, type DropdownParentValueRef, type DynamicDropdownConfig, type DynamicDropdownParent, type DynamicDropdownParentMapping, type MultiSelectFieldOptions, type NumericFieldOptions, type NumericFieldFormat, type PicklistFieldOptions, type RelationFieldOptions, type TextFieldOptions, type QrFieldFormat, } from "../field/build.js";
|
|
16
|
+
export { asc, desc, sortBy, type SortDirection, type SortOrder } from "../shared/types/common.js";
|
|
16
17
|
export { calc, dateDifUnit, dateTimeTruncPrecision, field, orderByDirection, predicateOp, weekdayMode, type ConcatExprType, type DateDifUnit, type DateTimeTruncPrecision, type Expr, type ExprType, type FieldRefExprType, type OrderByDirection, type Predicate, type PredicateOp, type StringAggOptions, type StringAggOrderBy, type WeekdayMode, } from "../field/calc.js";
|
|
17
18
|
export { agentEvaluation, type AgentEvaluationConfigured, type AgentEvaluationOptions, } from "../agent-evaluation/index.js";
|
|
18
19
|
export { phoneService, callerAccessMode, type CallerAccessMode, type E164PhoneNumber, type PhoneServiceConfigured, type PhoneServiceNumber, type PhoneServiceOptions, type PhoneServiceRegistration, } from "../phone-service/index.js";
|
|
@@ -9,7 +9,8 @@ export { app, } from "./build.js";
|
|
|
9
9
|
export { listViewDensity, managedViewSortAggregation, managedViewSortDirection, } from "../view/build.js";
|
|
10
10
|
export { dashboardChartWidget, dashboardRecordsWidget, dashboardWidgetSize, } from "../dashboard/build.js";
|
|
11
11
|
export { dynamicLayout, } from "../dynamic-layout/build.js";
|
|
12
|
-
export { attachmentField, booleanField, calculatedField, dateField, dateTimeField, decimalField, groupField, jsonField,
|
|
12
|
+
export { attachmentField, booleanField, calculatedField, dateField, dateTimeField, decimalField, dropdownDisplay, dropdownField, dropdownOption, dropdownValue, groupField, jsonField, multiSelectField, numberField, relationField, richTextField, textField, userField, } from "../field/build.js";
|
|
13
|
+
export { asc, desc, sortBy } from "../shared/types/common.js";
|
|
13
14
|
export { calc, dateDifUnit, dateTimeTruncPrecision, field, orderByDirection, predicateOp, weekdayMode, } from "../field/calc.js";
|
|
14
15
|
export { agentEvaluation, } from "../agent-evaluation/index.js";
|
|
15
16
|
export { phoneService, callerAccessMode, } from "../phone-service/index.js";
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* Unsupported authoring shapes degrade through `diagnostics` — reported,
|
|
15
15
|
* never silent, never thrown (plan §4.3).
|
|
16
16
|
*/
|
|
17
|
+
import { DEPLOY_DEFAULT_STATUS_OPTION_VALUES, SYSTEM_FIELD_HCL_KEY_BY_KEY, SYSTEM_FIELD_KEY_BY_TAG } from "../../core/system-fields.js";
|
|
17
18
|
import { EntityTfError } from "../../engine/entity.js";
|
|
18
19
|
import { expr, snakeSlug } from "../../engine/tf/index.js";
|
|
19
20
|
import { accessPolicyToTf } from "../access-policy/to-tf.js";
|
|
@@ -23,6 +24,7 @@ import { dynamicLayoutsToTf } from "../dynamic-layout/to-tf.js";
|
|
|
23
24
|
import { fieldToTf } from "../field/to-tf.js";
|
|
24
25
|
import { SUB_TYPE_BY_TYPE_KEY } from "../field/types.js";
|
|
25
26
|
import { CATEGORY_ORG_BAG } from "../org/category.js";
|
|
27
|
+
import { categoryIdExpr, missingCategoryDiagnostic } from "../org/category-ref.js";
|
|
26
28
|
import { CLOUD_LINK_ORG_BAG } from "../org/cloud-link.js";
|
|
27
29
|
import { recordCreateFormToTf } from "../record-create-form/to-tf.js";
|
|
28
30
|
import { relationshipsToTf } from "../relationship/to-tf.js";
|
|
@@ -81,10 +83,10 @@ export function appToTf(entity, ctx) {
|
|
|
81
83
|
if (categoryName !== undefined && categoryName !== "") {
|
|
82
84
|
const category = ctx.orgRefs.byName(CATEGORY_ORG_BAG, categoryName);
|
|
83
85
|
if (category === undefined) {
|
|
84
|
-
ctx.diagnostics.push(
|
|
86
|
+
ctx.diagnostics.push(missingCategoryDiagnostic(categoryName));
|
|
85
87
|
}
|
|
86
88
|
else {
|
|
87
|
-
appAttrs["category_id"] =
|
|
89
|
+
appAttrs["category_id"] = categoryIdExpr(category);
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
const cloudLink = payload.cloudLinkId;
|
|
@@ -113,6 +115,7 @@ export function appToTf(entity, ctx) {
|
|
|
113
115
|
const fieldNames = new Map();
|
|
114
116
|
let statusOptions;
|
|
115
117
|
let stages;
|
|
118
|
+
const systemFieldConfig = {};
|
|
116
119
|
const stageTfLabels = new Set();
|
|
117
120
|
const objectId = expr.resourceAttr(APP_RESOURCE_TYPE, ctx.appTfLabel, ["id"]);
|
|
118
121
|
for (const fieldEntry of payload.fields ?? []) {
|
|
@@ -137,6 +140,17 @@ export function appToTf(entity, ctx) {
|
|
|
137
140
|
fieldNames.set(fieldKey, name);
|
|
138
141
|
const systemTag = inner.tags?.find((tag) => SYSTEM_FIELD_TAGS.has(tag));
|
|
139
142
|
if (systemTag !== undefined) {
|
|
143
|
+
const systemKey = SYSTEM_FIELD_KEY_BY_TAG[systemTag];
|
|
144
|
+
if (systemKey === undefined) {
|
|
145
|
+
ctx.diagnostics.push(`systemFields: unsupported semantic tag ${systemTag}; validation flags dropped`);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
systemFieldConfig[SYSTEM_FIELD_HCL_KEY_BY_KEY[systemKey]] = {
|
|
149
|
+
required: inner.required ?? false,
|
|
150
|
+
required_on_close: inner.requiredOnClose ?? false,
|
|
151
|
+
show_on_create: inner.showOnCreate ?? false,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
140
154
|
switch (systemTag) {
|
|
141
155
|
case "TITLE":
|
|
142
156
|
if (name !== "Title")
|
|
@@ -202,10 +216,15 @@ export function appToTf(entity, ctx) {
|
|
|
202
216
|
blocks.push(field.block);
|
|
203
217
|
fieldAddresses.set(field.bagKey, field.address);
|
|
204
218
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
219
|
+
if (Object.keys(systemFieldConfig).length > 0) {
|
|
220
|
+
appAttrs["system_field_config"] = systemFieldConfig;
|
|
221
|
+
}
|
|
222
|
+
// Render platform defaults explicitly when no status override is authored.
|
|
223
|
+
// The platform creates these values for an empty list, but returning them
|
|
224
|
+
// after apply would violate Terraform's configured list length.
|
|
225
|
+
appAttrs["status_options"] = statusOptions === undefined || statusOptions.length === 0
|
|
226
|
+
? DEPLOY_DEFAULT_STATUS_OPTION_VALUES.map((option) => ({ ...option, tags: [...option.tags] }))
|
|
227
|
+
: statusOptions;
|
|
209
228
|
if (stages === undefined || stages.length === 0) {
|
|
210
229
|
appAttrs["stages"] = [
|
|
211
230
|
{ key: "stage_1", name: "Stage 1" },
|
|
@@ -238,6 +257,7 @@ export function appToTf(entity, ctx) {
|
|
|
238
257
|
orgRefs: ctx.orgRefs,
|
|
239
258
|
workspaceAspects: ctx.workspaceAspects,
|
|
240
259
|
diagnostics: ctx.diagnostics,
|
|
260
|
+
fieldAddresses,
|
|
241
261
|
}));
|
|
242
262
|
const { blocks: viewBlocks } = viewToTf(payload.layouts, payload.listViews, payload.calendarViews, payload.kanbanViews, payload.dashboardViews, payload.agentViews, payload.viewOrder, {
|
|
243
263
|
ownerRefName: ctx.appRefName,
|
|
@@ -248,6 +268,7 @@ export function appToTf(entity, ctx) {
|
|
|
248
268
|
dashboardKeys: new Set(Object.keys(payload.dashboards ?? {})),
|
|
249
269
|
orgRefs: ctx.orgRefs,
|
|
250
270
|
diagnostics: ctx.diagnostics,
|
|
271
|
+
fieldAddresses,
|
|
251
272
|
});
|
|
252
273
|
blocks.push(...viewBlocks);
|
|
253
274
|
const recordCreateForm = recordCreateFormToTf(payload.recordCreateForm, {
|
|
@@ -256,6 +277,7 @@ export function appToTf(entity, ctx) {
|
|
|
256
277
|
scope: "app",
|
|
257
278
|
objectId,
|
|
258
279
|
diagnostics: ctx.diagnostics,
|
|
280
|
+
fieldAddresses,
|
|
259
281
|
});
|
|
260
282
|
if (recordCreateForm !== undefined)
|
|
261
283
|
blocks.push(recordCreateForm);
|
|
@@ -266,6 +288,7 @@ export function appToTf(entity, ctx) {
|
|
|
266
288
|
diagnostics: ctx.diagnostics,
|
|
267
289
|
orgRefs: ctx.orgRefs,
|
|
268
290
|
workspaceAspects: ctx.workspaceAspects,
|
|
291
|
+
fieldAddresses,
|
|
269
292
|
}));
|
|
270
293
|
blocks.push(...relationshipsToTf(payload.relationships, {
|
|
271
294
|
ownerRefName: ctx.appRefName,
|
|
@@ -290,6 +313,7 @@ export function appToTf(entity, ctx) {
|
|
|
290
313
|
diagnostics: ctx.diagnostics,
|
|
291
314
|
appRefName: ctx.appRefName,
|
|
292
315
|
serviceAccounts: payload.serviceAccounts,
|
|
316
|
+
fieldAddresses,
|
|
293
317
|
});
|
|
294
318
|
blocks.push(block);
|
|
295
319
|
}
|
|
@@ -6,6 +6,7 @@ import { type Context, type ForEachItem } from "../shared/context.js";
|
|
|
6
6
|
import { type Ref, type Simplify, type ValueOrRef } from "../shared/ref.js";
|
|
7
7
|
import type { Filter } from "./filter.js";
|
|
8
8
|
import { type ScriptInput } from "./script-code.js";
|
|
9
|
+
import type { ScriptOutputs } from "./tasks.js";
|
|
9
10
|
/** Structural empty object — neutral element for the accumulated action map. */
|
|
10
11
|
type EmptyObject = {
|
|
11
12
|
[K in never]: never;
|
|
@@ -37,27 +38,27 @@ export interface NestedActionEntry {
|
|
|
37
38
|
readonly hclParent?: string;
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
40
|
-
* One branch of an operator:
|
|
41
|
-
*
|
|
41
|
+
* One branch of an operator: an optional label, an optional filter (switch
|
|
42
|
+
* case condition), and its tasks. Switch defaults are marked independently so
|
|
43
|
+
* a platform-authored conditional branch with no label remains a case.
|
|
42
44
|
* Maps to the wire `children` entry `{ label, filter?, tasks }`.
|
|
43
45
|
*/
|
|
44
46
|
export interface OperatorChild {
|
|
45
|
-
readonly label
|
|
47
|
+
readonly label?: string | null;
|
|
48
|
+
readonly isDefault?: boolean;
|
|
46
49
|
readonly filter?: Filter;
|
|
47
50
|
readonly tasks: readonly NestedActionEntry[];
|
|
48
51
|
/**
|
|
49
52
|
* The switch default branch's actual display label, when it deviates from
|
|
50
53
|
* the platform's usual "Default" (e.g. a manually renamed "Default Path").
|
|
51
|
-
* Only meaningful when `
|
|
52
|
-
* `to-tf.ts`/the printer can keep using it as the case-vs-default
|
|
53
|
-
* discriminator.
|
|
54
|
+
* Only meaningful when `isDefault` is true.
|
|
54
55
|
*/
|
|
55
56
|
readonly defaultLabel?: string;
|
|
56
57
|
/**
|
|
57
58
|
* Which wire shape to-tf.ts should emit for this switch default branch —
|
|
58
59
|
* `"explicitTrueFilter"` for the older `filter = {type:"true"}` form,
|
|
59
60
|
* unset/`"isDefault"` for the newer `is_default = true` form. Only
|
|
60
|
-
* meaningful when `
|
|
61
|
+
* meaningful when `isDefault` is true. Round-trip metadata: `edk pull`
|
|
61
62
|
* records whichever shape a case's export actually has (see #157); a
|
|
62
63
|
* hand-authored default branch should leave this unset.
|
|
63
64
|
*/
|
|
@@ -81,6 +82,11 @@ export interface ActionDef<TOutput> {
|
|
|
81
82
|
}
|
|
82
83
|
/** Placeholder `forEachTaskRefKey` the forEach item proxy emits; replaced with the real refKey. */
|
|
83
84
|
export declare const FOR_EACH_PLACEHOLDER = "__forEach__";
|
|
85
|
+
/** One finalized automation-level output property (already serialized to wire). */
|
|
86
|
+
export interface OutputEntry {
|
|
87
|
+
readonly name: string;
|
|
88
|
+
readonly value: unknown;
|
|
89
|
+
}
|
|
84
90
|
/**
|
|
85
91
|
* The finalized automation body `automation` embeds — the wire trigger,
|
|
86
92
|
* serialized platform task list, and optional output properties. Produced by
|
|
@@ -110,8 +116,15 @@ export interface ActionChain {
|
|
|
110
116
|
__finalize(): ActionSequenceDef;
|
|
111
117
|
/** @internal — onDemand parameter metadata; empty for non-onDemand triggers. */
|
|
112
118
|
__triggerParams(): readonly TriggerParamMeta[];
|
|
113
|
-
/** @internal — output
|
|
114
|
-
|
|
119
|
+
/** @internal — output properties declared via `.outputs()`; empty if none. */
|
|
120
|
+
__outputEntries(): readonly OutputEntry[];
|
|
121
|
+
/**
|
|
122
|
+
* @internal — declared (wire-shaped) `output_schema` for every executeScript
|
|
123
|
+
* task in this chain, by refKey. Used to resolve `OutputPropertyRef.valueType`
|
|
124
|
+
* for an automation-level output whose value is a plain ref to one of these
|
|
125
|
+
* tasks' `result.<prop>`.
|
|
126
|
+
*/
|
|
127
|
+
__executeScriptOutputSchemas(): ReadonlyMap<string, unknown>;
|
|
115
128
|
}
|
|
116
129
|
/** A value an output property can carry: a typed ctx ref, or a literal. */
|
|
117
130
|
type OutputValue = Ref<unknown> | string | number | boolean | null;
|
|
@@ -161,11 +174,12 @@ interface ActionMethods<TTrigger, TActions extends Record<string, unknown>, TVar
|
|
|
161
174
|
readonly code: (input: ScriptInput<ResolvedRefs<NoInfer<I>>>) => R;
|
|
162
175
|
/**
|
|
163
176
|
* Override the inferred output schema: property name → `"text" |
|
|
164
|
-
* "integer" | "number" | "decimal" | "boolean"
|
|
165
|
-
*
|
|
166
|
-
*
|
|
177
|
+
* "integer" | "number" | "decimal" | "boolean"`, or `{ name,
|
|
178
|
+
* properties }` to also carry the root object's name. `null`
|
|
179
|
+
* explicitly means "no schema" and suppresses inference; omitting the
|
|
180
|
+
* option infers from the code body.
|
|
167
181
|
*/
|
|
168
|
-
readonly outputs?:
|
|
182
|
+
readonly outputs?: ScriptOutputs | null;
|
|
169
183
|
}, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, {
|
|
170
184
|
result: R;
|
|
171
185
|
textResult: string;
|
|
@@ -190,7 +204,7 @@ interface ActionMethods<TTrigger, TActions extends Record<string, unknown>, TVar
|
|
|
190
204
|
recordSearch<TName extends string, A extends AppOrElementRef>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").RecordSearchOptions<A>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").RecordSearchOutput<A>>;
|
|
191
205
|
tableRecordsSearch<TName extends string, A extends AppOrElementRef = AppOrElementRef>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").TableRecordsSearchOptions<A>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").TableRecordsSearchOutput<A>>;
|
|
192
206
|
createRecord<TName extends string, A extends AppOrElementRef>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").CreateRecordOptions<A>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").CreateRecordOutput<A>>;
|
|
193
|
-
updateField<TName extends string, A extends AppOrElementRef>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").UpdateFieldOptions<A>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, {
|
|
207
|
+
updateField<TName extends string, A extends AppOrElementRef, const Fields extends readonly import("./tasks.js").FieldAssignment[]>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").UpdateFieldOptions<A, Fields>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, {
|
|
194
208
|
record: RecordShape<A>;
|
|
195
209
|
}>;
|
|
196
210
|
findRelatedRecords<TName extends string, A extends AppOrElementRef>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").FindRelatedRecordsOptions<A>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").RecordSearchOutput<A>>;
|
|
@@ -214,15 +228,19 @@ interface ActionMethods<TTrigger, TActions extends Record<string, unknown>, TVar
|
|
|
214
228
|
}>;
|
|
215
229
|
apiRequest<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").ApiRequestOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, {
|
|
216
230
|
response: unknown;
|
|
231
|
+
file?: unknown;
|
|
232
|
+
statusCode?: unknown;
|
|
233
|
+
textResponse?: unknown;
|
|
217
234
|
}>;
|
|
218
235
|
calculation<TName extends string, const Values extends import("./tasks.js").CalculationValues>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").CalculationOptions<Values>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").CalculationValueOutputs<Values>>;
|
|
219
236
|
calculation<TName extends string, const Entries extends readonly import("./tasks.js").CalculationEntry[]>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").LegacyCalculationOptions<Entries>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").CalculationOutputs<Entries>>;
|
|
220
|
-
procedure<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").
|
|
237
|
+
procedure<TName extends string, const Parameters extends readonly import("../../catalog/types.js").ProcedureParameterType[]>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").TypedProcedureOptions<Parameters>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, {
|
|
221
238
|
output: unknown;
|
|
222
239
|
}>;
|
|
223
|
-
|
|
240
|
+
procedure<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").LegacyProcedureOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, {
|
|
224
241
|
output: unknown;
|
|
225
242
|
}>;
|
|
243
|
+
runAutomation<TName extends string, const A extends AutomationCatalogRef>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").RunAutomationOptions<A>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").RunAutomationOutput<A>>;
|
|
226
244
|
readFile<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").ReadFileOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, {
|
|
227
245
|
output: unknown;
|
|
228
246
|
}>;
|
|
@@ -233,6 +251,7 @@ interface ActionMethods<TTrigger, TActions extends Record<string, unknown>, TVar
|
|
|
233
251
|
userSearch<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").UserSearchOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").RecordSearchOutput>;
|
|
234
252
|
initiateCall<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").InitiateCallOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
235
253
|
recordFieldLocking<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").RecordFieldLockingOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
254
|
+
unimplementedTask<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").UnimplementedTaskOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
236
255
|
forEach<TName extends string, TForEachItem>(name: TName, opts: ForEachConfig<TTrigger, TActions, TVars, TItem, TForEachItem>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
237
256
|
switch<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, SwitchConfig<TTrigger, TActions, TVars, TItem>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
238
257
|
forkJoin<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, ForkJoinConfig<TTrigger, TActions, TVars, TItem>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
@@ -260,7 +279,7 @@ export interface ForEachConfig<TTrigger, TActions extends Record<string, unknown
|
|
|
260
279
|
readonly actions: (actions: ForEachBuilder<TTrigger, TActions, TVars, NoInfer<TItem>>) => NestedActionChain;
|
|
261
280
|
}
|
|
262
281
|
export interface SwitchCase<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TItem = never> {
|
|
263
|
-
readonly label
|
|
282
|
+
readonly label?: string;
|
|
264
283
|
readonly condition?: Filter;
|
|
265
284
|
readonly actions: (actions: SwitchCaseBuilder<TTrigger, TActions, TVars, TItem>) => NestedActionChain;
|
|
266
285
|
}
|
|
@@ -273,7 +292,7 @@ export interface SwitchConfig<TTrigger, TActions extends Record<string, unknown>
|
|
|
273
292
|
};
|
|
274
293
|
}
|
|
275
294
|
export interface ForkJoinBranch<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TItem = never> {
|
|
276
|
-
readonly label
|
|
295
|
+
readonly label?: string;
|
|
277
296
|
readonly actions: (actions: ForkJoinBranchBuilder<TTrigger, TActions, TVars, TItem>) => NestedActionChain;
|
|
278
297
|
}
|
|
279
298
|
export interface ForkJoinConfig<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TItem = never> {
|