@elementumai/edk 0.9.19 → 0.10.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/README.md +159 -7
- package/dist-sdk/src/catalog/factories.d.ts +33 -2
- package/dist-sdk/src/catalog/factories.js +40 -1
- package/dist-sdk/src/catalog/from-authoring.d.ts +13 -8
- package/dist-sdk/src/catalog/from-authoring.js +34 -9
- package/dist-sdk/src/catalog/index.d.ts +2 -2
- package/dist-sdk/src/catalog/index.js +2 -2
- package/dist-sdk/src/catalog/render.js +6 -6
- package/dist-sdk/src/catalog/token.js +11 -0
- package/dist-sdk/src/catalog/types.d.ts +40 -1
- package/dist-sdk/src/catalog/types.js +12 -0
- package/dist-sdk/src/core/triggers/on-demand.d.ts +40 -4
- package/dist-sdk/src/core/triggers/on-demand.js +17 -2
- package/dist-sdk/src/core/types/app.d.ts +2 -2
- package/dist-sdk/src/engine/build/context.d.ts +1 -1
- package/dist-sdk/src/engine/coverage-gaps.d.ts +86 -0
- package/dist-sdk/src/engine/coverage-gaps.js +156 -0
- package/dist-sdk/src/engine/ei/run.d.ts +169 -0
- package/dist-sdk/src/engine/ei/run.js +1219 -0
- package/dist-sdk/src/engine/logging.d.ts +17 -0
- package/dist-sdk/src/engine/logging.js +18 -0
- package/dist-sdk/src/engine/pull/catalog-ref.d.ts +16 -0
- package/dist-sdk/src/engine/pull/catalog-ref.js +24 -0
- package/dist-sdk/src/engine/pull/context.d.ts +68 -6
- package/dist-sdk/src/engine/pull/context.js +40 -1
- package/dist-sdk/src/engine/pull/procedure-refs.d.ts +8 -0
- package/dist-sdk/src/engine/pull/procedure-refs.js +28 -0
- package/dist-sdk/src/engine/pull/ref-only.d.ts +5 -0
- package/dist-sdk/src/engine/pull/ref-only.js +10 -7
- package/dist-sdk/src/engine/pull/result-output.d.ts +6 -0
- package/dist-sdk/src/engine/pull/result-output.js +113 -3
- package/dist-sdk/src/engine/tf/expr.js +1 -1
- package/dist-sdk/src/engine/tf/index.d.ts +2 -2
- package/dist-sdk/src/engine/tf/index.js +1 -1
- package/dist-sdk/src/engine/tf/labels.d.ts +28 -5
- package/dist-sdk/src/engine/tf/labels.js +54 -3
- package/dist-sdk/src/engine/tf/model.d.ts +22 -1
- package/dist-sdk/src/engine/tf/parse.js +93 -4
- package/dist-sdk/src/engine/tf/render.d.ts +4 -2
- package/dist-sdk/src/engine/tf/render.js +41 -7
- package/dist-sdk/src/engine/validation.d.ts +44 -0
- package/dist-sdk/src/engine/validation.js +95 -0
- package/dist-sdk/src/entities/access-policy/from-tf.js +38 -1
- package/dist-sdk/src/entities/access-policy/principal.d.ts +2 -0
- package/dist-sdk/src/entities/access-policy/to-tf.js +5 -2
- package/dist-sdk/src/entities/agent/build.d.ts +4 -16
- package/dist-sdk/src/entities/agent/build.js +40 -5
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +3 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +46 -21
- package/dist-sdk/src/entities/agent/from-tf.js +11 -3
- package/dist-sdk/src/entities/agent/module.js +2 -0
- package/dist-sdk/src/entities/agent/to-tf.js +20 -6
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +10 -1
- package/dist-sdk/src/entities/agent-tool/from-tf.js +18 -6
- package/dist-sdk/src/entities/agent-tool/module.js +3 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +2 -2
- package/dist-sdk/src/entities/agent-tool/to-tf.js +27 -5
- package/dist-sdk/src/entities/app/auto-share.d.ts +38 -0
- package/dist-sdk/src/entities/app/auto-share.js +49 -0
- package/dist-sdk/src/entities/app/build.d.ts +105 -22
- package/dist-sdk/src/entities/app/build.js +107 -10
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +22 -1
- package/dist-sdk/src/entities/app/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/app/from-tf.js +11 -2
- package/dist-sdk/src/entities/app/index.d.ts +7 -6
- package/dist-sdk/src/entities/app/index.js +2 -8
- package/dist-sdk/src/entities/app/module.js +5 -2
- package/dist-sdk/src/entities/app/to-tf.d.ts +6 -0
- package/dist-sdk/src/entities/app/to-tf.js +40 -13
- package/dist-sdk/src/entities/automation/build.d.ts +56 -6
- package/dist-sdk/src/entities/automation/build.js +230 -26
- package/dist-sdk/src/entities/automation/calculation-expression.d.ts +7 -7
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +41 -5
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +470 -58
- package/dist-sdk/src/entities/automation/from-tf.d.ts +37 -8
- package/dist-sdk/src/entities/automation/from-tf.js +791 -131
- package/dist-sdk/src/entities/automation/generated/task-output-contracts.d.ts +33 -0
- package/dist-sdk/src/entities/automation/generated/task-output-contracts.js +183 -0
- package/dist-sdk/src/entities/automation/index.d.ts +2 -2
- package/dist-sdk/src/entities/automation/index.js +1 -1
- package/dist-sdk/src/entities/automation/module.d.ts +3 -0
- package/dist-sdk/src/entities/automation/module.js +107 -15
- package/dist-sdk/src/entities/automation/output-field-types.d.ts +7 -0
- package/dist-sdk/src/entities/automation/output-field-types.js +36 -0
- package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +9 -0
- package/dist-sdk/src/entities/automation/output-key-wire-name.js +13 -0
- package/dist-sdk/src/entities/automation/script-code.d.ts +20 -0
- package/dist-sdk/src/entities/automation/script-code.js +109 -5
- package/dist-sdk/src/entities/automation/system-ref-name.js +4 -0
- package/dist-sdk/src/entities/automation/task-output-labels.d.ts +39 -0
- package/dist-sdk/src/entities/automation/task-output-labels.js +85 -0
- package/dist-sdk/src/entities/automation/tasks.d.ts +116 -22
- package/dist-sdk/src/entities/automation/tasks.js +86 -24
- package/dist-sdk/src/entities/automation/to-tf.d.ts +24 -3
- package/dist-sdk/src/entities/automation/to-tf.js +1082 -132
- package/dist-sdk/src/entities/automation/triggers.d.ts +12 -6
- package/dist-sdk/src/entities/automation/triggers.js +4 -0
- package/dist-sdk/src/entities/automation/types.d.ts +9 -0
- package/dist-sdk/src/entities/automation/types.js +19 -0
- package/dist-sdk/src/entities/automation/value-ref-tf.d.ts +1 -1
- package/dist-sdk/src/entities/automation/value-ref-tf.js +1 -1
- package/dist-sdk/src/entities/chart/from-tf.js +9 -1
- package/dist-sdk/src/entities/chart/to-tf.js +10 -3
- package/dist-sdk/src/entities/data-lookup/module.js +2 -0
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +24 -31
- package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +1 -0
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +7 -5
- package/dist-sdk/src/entities/element/build.d.ts +28 -13
- package/dist-sdk/src/entities/element/build.js +5 -1
- package/dist-sdk/src/entities/element/from-tf.d.ts +11 -0
- package/dist-sdk/src/entities/element/from-tf.js +62 -1
- package/dist-sdk/src/entities/element/index.d.ts +5 -3
- package/dist-sdk/src/entities/element/index.js +1 -0
- package/dist-sdk/src/entities/element/module.js +9 -3
- package/dist-sdk/src/entities/element/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/element/to-tf.js +16 -16
- package/dist-sdk/src/entities/field/build.d.ts +17 -3
- package/dist-sdk/src/entities/field/build.js +3 -0
- package/dist-sdk/src/entities/field/calc.d.ts +7 -7
- package/dist-sdk/src/entities/field/from-tf.d.ts +5 -4
- package/dist-sdk/src/entities/field/from-tf.js +244 -49
- package/dist-sdk/src/entities/field/media-types.d.ts +6 -0
- package/dist-sdk/src/entities/field/media-types.js +30 -0
- package/dist-sdk/src/entities/field/module.js +2 -0
- package/dist-sdk/src/entities/field/options.js +6 -1
- package/dist-sdk/src/entities/field/to-tf.d.ts +26 -5
- package/dist-sdk/src/entities/field/to-tf.js +137 -15
- package/dist-sdk/src/entities/field/types.d.ts +2 -0
- package/dist-sdk/src/entities/field/types.js +27 -0
- package/dist-sdk/src/entities/file-reader/from-tf.js +14 -5
- package/dist-sdk/src/entities/file-reader/module.js +1 -0
- package/dist-sdk/src/entities/file-reader/types.d.ts +2 -0
- package/dist-sdk/src/entities/file-reader/types.js +1 -1
- package/dist-sdk/src/entities/portal/build.d.ts +26 -0
- package/dist-sdk/src/entities/portal/build.js +37 -0
- package/dist-sdk/src/entities/portal/from-tf.d.ts +27 -0
- package/dist-sdk/src/entities/portal/from-tf.js +75 -0
- package/dist-sdk/src/entities/portal/index.d.ts +1 -0
- package/dist-sdk/src/entities/portal/index.js +1 -0
- package/dist-sdk/src/entities/portal/module.d.ts +3 -0
- package/dist-sdk/src/entities/portal/module.js +28 -0
- package/dist-sdk/src/entities/portal/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/portal/to-tf.js +73 -0
- package/dist-sdk/src/entities/portal/types.d.ts +1 -0
- package/dist-sdk/src/entities/portal/types.js +1 -0
- package/dist-sdk/src/entities/relationship/module.js +2 -0
- package/dist-sdk/src/entities/relationship/pair-check.d.ts +7 -0
- package/dist-sdk/src/entities/relationship/pair-check.js +68 -0
- package/dist-sdk/src/entities/relationship/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/relationship/to-tf.js +12 -3
- package/dist-sdk/src/entities/role/from-tf.js +3 -3
- package/dist-sdk/src/entities/role/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/role/to-tf.js +12 -4
- package/dist-sdk/src/entities/search-table/module.js +1 -0
- package/dist-sdk/src/entities/search-table/to-tf.d.ts +1 -0
- package/dist-sdk/src/entities/search-table/to-tf.js +1 -1
- package/dist-sdk/src/entities/service-account/build.d.ts +15 -2
- package/dist-sdk/src/entities/service-account/from-tf.d.ts +2 -4
- package/dist-sdk/src/entities/service-account/from-tf.js +20 -8
- package/dist-sdk/src/entities/service-account/role-fidelity.d.ts +56 -0
- package/dist-sdk/src/entities/service-account/role-fidelity.js +243 -0
- package/dist-sdk/src/entities/service-account/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/service-account/to-tf.js +17 -0
- package/dist-sdk/src/entities/service-account/workspace-owner.d.ts +16 -0
- package/dist-sdk/src/entities/service-account/workspace-owner.js +22 -0
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.d.ts +1 -1
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +5 -2
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +23 -1
- package/dist-sdk/src/entities/shared/filters/ast.js +2 -0
- package/dist-sdk/src/entities/shared/filters/index.d.ts +7 -0
- package/dist-sdk/src/entities/shared/filters/index.js +19 -4
- package/dist-sdk/src/entities/shared/filters/print.js +24 -3
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +7 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +46 -7
- package/dist-sdk/src/entities/shared/filters/types.d.ts +15 -2
- package/dist-sdk/src/entities/shared/ref.d.ts +5 -7
- package/dist-sdk/src/entities/shared/ref.js +5 -7
- package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +9 -0
- package/dist-sdk/src/entities/shared/tool-field-ref.js +35 -2
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +20 -5
- package/dist-sdk/src/entities/shared/types/field-types.js +8 -0
- package/dist-sdk/src/entities/skill/access-policy.js +3 -3
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +3 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +14 -6
- package/dist-sdk/src/entities/skill/from-tf.js +70 -15
- package/dist-sdk/src/entities/skill/input-coverage.d.ts +7 -0
- package/dist-sdk/src/entities/skill/input-coverage.js +11 -0
- package/dist-sdk/src/entities/skill/module.js +2 -0
- package/dist-sdk/src/entities/skill/to-tf.js +14 -4
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +2 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.js +49 -10
- package/dist-sdk/src/entities/skill-tool/module.js +3 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +2 -8
- package/dist-sdk/src/entities/skill-tool/to-tf.js +49 -14
- package/dist-sdk/src/entities/table/catalog.d.ts +14 -0
- package/dist-sdk/src/entities/table/catalog.js +66 -0
- package/dist-sdk/src/entities/table/module.js +2 -1
- package/dist-sdk/src/entities/table/to-tf.js +2 -2
- package/dist-sdk/src/entities/task/build.d.ts +8 -0
- package/dist-sdk/src/entities/task/build.js +10 -1
- package/dist-sdk/src/entities/task/from-tf.d.ts +4 -2
- package/dist-sdk/src/entities/task/from-tf.js +7 -2
- package/dist-sdk/src/entities/task/module.js +2 -2
- package/dist-sdk/src/entities/task/to-tf.d.ts +8 -4
- package/dist-sdk/src/entities/task/to-tf.js +28 -1
- package/dist-sdk/src/entities/view/agent-view-layout-from-tf.d.ts +49 -9
- package/dist-sdk/src/entities/view/agent-view-layout-from-tf.js +71 -18
- package/dist-sdk/src/entities/view/agent-view-layout-to-tf.d.ts +19 -4
- package/dist-sdk/src/entities/view/agent-view-layout-to-tf.js +82 -10
- package/dist-sdk/src/entities/view/agent-view-layout.d.ts +53 -23
- package/dist-sdk/src/entities/view/agent-view-layout.js +1 -1
- package/dist-sdk/src/entities/view/from-tf.d.ts +3 -2
- package/dist-sdk/src/entities/view/from-tf.js +133 -13
- package/dist-sdk/src/entities/view/module.js +30 -3
- package/dist-sdk/src/entities/view/to-tf.d.ts +20 -8
- package/dist-sdk/src/entities/view/to-tf.js +86 -18
- package/dist-sdk/src/entities/view/types.d.ts +4 -15
- package/dist-sdk/src/entities/view/types.js +15 -15
- package/dist-sdk/src/entities/visual-flow/build.d.ts +16 -1
- package/dist-sdk/src/entities/visual-flow/build.js +9 -0
- package/dist-sdk/src/entities/visual-flow/from-tf.d.ts +14 -0
- package/dist-sdk/src/entities/visual-flow/from-tf.js +51 -3
- package/dist-sdk/src/entities/visual-flow/index.d.ts +1 -1
- package/dist-sdk/src/entities/visual-flow/index.js +1 -1
- package/dist-sdk/src/entities/visual-flow/printer.js +19 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.js +87 -3
- package/dist-sdk/src/entities/widget/build.d.ts +16 -1
- package/dist-sdk/src/entities/widget/build.js +11 -1
- package/dist-sdk/src/entities/widget/from-tf.js +3 -3
- package/dist-sdk/src/entities/widget/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/widget/to-tf.js +41 -14
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +148 -13
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
- package/dist-sdk/src/graph/index.d.ts +12 -0
- package/dist-sdk/src/graph/index.js +21 -0
- package/dist-sdk/src/graph/modules.js +2 -0
- package/dist-sdk/src/graph/types.d.ts +83 -4
- package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
- package/dist-sdk/src/internal/sdk-package.js +1 -0
- package/package.json +16 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** The app entity's graph module + resource-type constant (see src/graph/). */
|
|
2
2
|
import { NO_CATALOG, } from "../../graph/types.js";
|
|
3
3
|
import { appendFieldLocals } from "../field/locals.js";
|
|
4
|
-
import { AGENT_VIEW_RESOURCE_TYPE, CALENDAR_VIEW_RESOURCE_TYPE, DASHBOARD_VIEW_RESOURCE_TYPE, KANBAN_VIEW_RESOURCE_TYPE, LAYOUT_RESOURCE_TYPE, LIST_VIEW_RESOURCE_TYPE } from "../view/types.js";
|
|
4
|
+
import { AGENT_VIEW_RESOURCE_TYPE, CALENDAR_VIEW_RESOURCE_TYPE, CUSTOM_VIEW_RESOURCE_TYPE, DASHBOARD_VIEW_RESOURCE_TYPE, KANBAN_VIEW_RESOURCE_TYPE, LAYOUT_RESOURCE_TYPE, LIST_VIEW_RESOURCE_TYPE } from "../view/types.js";
|
|
5
5
|
import { appFromTf } from "./from-tf.js";
|
|
6
6
|
import { appendAppLocals } from "./locals.js";
|
|
7
7
|
import { appToTf } from "./to-tf.js";
|
|
@@ -20,6 +20,7 @@ function extractAppStreamRoot(stream, ctx) {
|
|
|
20
20
|
const kanbanViewBlocks = viewBlocks.filter((b) => b.type === KANBAN_VIEW_RESOURCE_TYPE);
|
|
21
21
|
const dashboardViewBlocks = viewBlocks.filter((b) => b.type === DASHBOARD_VIEW_RESOURCE_TYPE);
|
|
22
22
|
const agentViewBlocks = viewBlocks.filter((b) => b.type === AGENT_VIEW_RESOURCE_TYPE);
|
|
23
|
+
const customViewBlocks = viewBlocks.filter((b) => b.type === CUSTOM_VIEW_RESOURCE_TYPE);
|
|
23
24
|
const managedViewOrderBlocks = stream.byKind.get("managed-view-order") ?? [];
|
|
24
25
|
const recordCreateFormBlocks = stream.byKind.get("record-create-form") ?? [];
|
|
25
26
|
const dynamicLayoutBlocks = stream.byKind.get("dynamic-layout") ?? [];
|
|
@@ -40,6 +41,7 @@ function extractAppStreamRoot(stream, ctx) {
|
|
|
40
41
|
kanbanViewBlocks,
|
|
41
42
|
dashboardViewBlocks,
|
|
42
43
|
agentViewBlocks,
|
|
44
|
+
customViewBlocks,
|
|
43
45
|
managedViewOrderBlocks,
|
|
44
46
|
recordCreateFormBlocks,
|
|
45
47
|
dynamicLayoutBlocks,
|
|
@@ -58,7 +60,8 @@ export const appModule = {
|
|
|
58
60
|
stream: { role: "streamRoot", exportVerb: "apps" },
|
|
59
61
|
authoring: { unit: "ownFile", bag: "apps" },
|
|
60
62
|
parents: [{ parent: "org", child: "app" }],
|
|
61
|
-
|
|
63
|
+
// The provider keeps only the system fields a workspace sets (all of them after an import).
|
|
64
|
+
resource: { shape: "single", resourceType: APP_RESOURCE_TYPE, adoptable: true, stateScopedMapAttributes: ["system_field_config"] },
|
|
62
65
|
// Foreign/referenced apps: same KindId + bag; data facet emits
|
|
63
66
|
// `data.elementum_app` (ref-only stubs on disk are later).
|
|
64
67
|
data: { participates: true, lookupAttr: "name", referencedByBuild: true, referenceLookups: [{ strategy: "rootNamespace", compatibilityFallback: "name" }] },
|
|
@@ -18,6 +18,12 @@ import { type ToTfContext } from "../../engine/build/context.js";
|
|
|
18
18
|
import type { BuildFieldMetadata } from "../../graph/types.js";
|
|
19
19
|
import { type DeployableEntity } from "../../engine/entity.js";
|
|
20
20
|
import { type TfBlock } from "../../engine/tf/index.js";
|
|
21
|
+
/**
|
|
22
|
+
* The named gap for a system-field tag with no canonical key (edk#1480).
|
|
23
|
+
* Defensive: every tag in SYSTEM_FIELD_TAGS maps today, so a new tag lands
|
|
24
|
+
* here until SYSTEM_FIELD_TAG_BY_KEY learns it.
|
|
25
|
+
*/
|
|
26
|
+
export declare function unsupportedSystemTagGap(systemTag: string): string;
|
|
21
27
|
/** System-field tags that fold into the app resource instead of emitting a field resource. */
|
|
22
28
|
export declare const SYSTEM_FIELD_TAGS: ReadonlySet<string>;
|
|
23
29
|
export interface AppToTfResult {
|
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
* Unsupported authoring shapes degrade through `diagnostics` — reported,
|
|
15
15
|
* never silent, never thrown (plan §4.3).
|
|
16
16
|
*/
|
|
17
|
+
import { typedCoverageGap } from "../../engine/coverage-gaps.js";
|
|
18
|
+
import { autoShareToTf } from "./auto-share.js";
|
|
17
19
|
import { workspaceAspectKey } from "../../engine/build/context.js";
|
|
18
|
-
import { DEPLOY_DEFAULT_STATUS_OPTION_VALUES, SYSTEM_FIELD_HCL_KEY_BY_KEY, SYSTEM_FIELD_KEY_BY_TAG } from "../../core/system-fields.js";
|
|
20
|
+
import { DEPLOY_DEFAULT_STATUS_OPTION_VALUES, SYSTEM_FIELD_HCL_KEY_BY_KEY, SYSTEM_FIELD_KEY_BY_TAG, SYSTEM_FIELD_REQUIRED } from "../../core/system-fields.js";
|
|
19
21
|
import { EntityTfError } from "../../engine/entity.js";
|
|
20
22
|
import { expr, snakeSlug } from "../../engine/tf/index.js";
|
|
21
23
|
import { accessPolicyToTf } from "../access-policy/to-tf.js";
|
|
@@ -23,17 +25,31 @@ import { dashboardsToTf } from "../dashboard/to-tf.js";
|
|
|
23
25
|
import { picklistLabel } from "../field/options.js";
|
|
24
26
|
import { fieldMetadataFromEntries } from "../field/metadata.js";
|
|
25
27
|
import { dynamicLayoutsToTf } from "../dynamic-layout/to-tf.js";
|
|
26
|
-
import { fieldToTf } from "../field/to-tf.js";
|
|
28
|
+
import { authoredFieldKeysFromPayload, claimFieldDisplayName, fieldToTf } from "../field/to-tf.js";
|
|
27
29
|
import { CATEGORY_ORG_BAG } from "../org/category.js";
|
|
28
30
|
import { categoryIdExpr, missingCategoryDiagnostic } from "../org/category-ref.js";
|
|
29
31
|
import { CLOUD_LINK_ORG_BAG } from "../org/cloud-link.js";
|
|
30
32
|
import { recordCreateFormToTf } from "../record-create-form/to-tf.js";
|
|
31
33
|
import { relationshipsToTf } from "../relationship/to-tf.js";
|
|
34
|
+
import { workspaceServiceAccountAppResolver } from "../service-account/workspace-owner.js";
|
|
32
35
|
import { rolesToTf } from "../role/to-tf.js";
|
|
33
|
-
import {
|
|
36
|
+
import { appServiceAccountBlocks } from "../service-account/to-tf.js";
|
|
34
37
|
import { relationshipTargetsFromBag, widgetsToTf } from "../widget/to-tf.js";
|
|
35
38
|
import { viewToTf } from "../view/to-tf.js";
|
|
36
39
|
import { APP_RESOURCE_TYPE } from "./module.js";
|
|
40
|
+
/**
|
|
41
|
+
* The named gap for a system-field tag with no canonical key (edk#1480).
|
|
42
|
+
* Defensive: every tag in SYSTEM_FIELD_TAGS maps today, so a new tag lands
|
|
43
|
+
* here until SYSTEM_FIELD_TAG_BY_KEY learns it.
|
|
44
|
+
*/
|
|
45
|
+
export function unsupportedSystemTagGap(systemTag) {
|
|
46
|
+
return typedCoverageGap({
|
|
47
|
+
kind: "dropped",
|
|
48
|
+
entity: "systemFields",
|
|
49
|
+
detail: `unsupported semantic tag ${systemTag}; validation flags dropped`,
|
|
50
|
+
consequence: "the field's required/validation flags are not applied, so that validation is not enforced",
|
|
51
|
+
});
|
|
52
|
+
}
|
|
37
53
|
/** System-field tags that fold into the app resource instead of emitting a field resource. */
|
|
38
54
|
export const SYSTEM_FIELD_TAGS = new Set([
|
|
39
55
|
"TITLE",
|
|
@@ -82,6 +98,8 @@ export function appToTf(entity, ctx) {
|
|
|
82
98
|
appAttrs["comments_enabled"] = payload.commentsEnabled;
|
|
83
99
|
if (payload.lockStages !== undefined)
|
|
84
100
|
appAttrs["lock_stages"] = payload.lockStages;
|
|
101
|
+
if (payload.autoShare !== undefined)
|
|
102
|
+
appAttrs["auto_share"] = autoShareToTf(payload.autoShare);
|
|
85
103
|
const categoryName = payload.category?.name;
|
|
86
104
|
if (categoryName !== undefined && categoryName !== "") {
|
|
87
105
|
const category = ctx.orgRefs.byName(CATEGORY_ORG_BAG, categoryName);
|
|
@@ -114,6 +132,7 @@ export function appToTf(entity, ctx) {
|
|
|
114
132
|
// --- Field pass: fold system-tagged fields, emit one resource per custom field.
|
|
115
133
|
const blocks = [];
|
|
116
134
|
const fieldAddresses = new Map();
|
|
135
|
+
const fieldOwnership = authoredFieldKeysFromPayload(payload);
|
|
117
136
|
const fieldMetadata = fieldMetadataFromEntries(payload.fields);
|
|
118
137
|
const fieldNames = new Map();
|
|
119
138
|
let statusOptions;
|
|
@@ -121,6 +140,7 @@ export function appToTf(entity, ctx) {
|
|
|
121
140
|
const systemFieldConfig = {};
|
|
122
141
|
const stageTfLabels = new Set();
|
|
123
142
|
const objectId = expr.resourceAttr(APP_RESOURCE_TYPE, ctx.appTfLabel, ["id"]);
|
|
143
|
+
const fieldDisplayNames = new Map();
|
|
124
144
|
for (const fieldEntry of payload.fields ?? []) {
|
|
125
145
|
const typeKey = Object.keys(fieldEntry)[0];
|
|
126
146
|
if (typeKey === undefined)
|
|
@@ -134,7 +154,7 @@ export function appToTf(entity, ctx) {
|
|
|
134
154
|
if (systemTag !== undefined) {
|
|
135
155
|
const systemKey = SYSTEM_FIELD_KEY_BY_TAG[systemTag];
|
|
136
156
|
if (systemKey === undefined) {
|
|
137
|
-
ctx.diagnostics.push(
|
|
157
|
+
ctx.diagnostics.push(unsupportedSystemTagGap(systemTag));
|
|
138
158
|
}
|
|
139
159
|
else {
|
|
140
160
|
// Canonical system key (title/id/status/…) must map to the display
|
|
@@ -144,11 +164,15 @@ export function appToTf(entity, ctx) {
|
|
|
144
164
|
// falls back to DEPLOY_DEFAULT "Title" (tofu Invalid index).
|
|
145
165
|
if (name !== "")
|
|
146
166
|
fieldNames.set(systemKey, name);
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
167
|
+
// Only a system field with authored validation flags is managed; one
|
|
168
|
+
// that is just named or given options leaves its flags to the platform.
|
|
169
|
+
if (inner.required !== undefined || inner.requiredOnClose !== undefined || inner.showOnCreate !== undefined) {
|
|
170
|
+
systemFieldConfig[SYSTEM_FIELD_HCL_KEY_BY_KEY[systemKey]] = {
|
|
171
|
+
required: inner.required ?? SYSTEM_FIELD_REQUIRED[systemKey],
|
|
172
|
+
required_on_close: inner.requiredOnClose ?? false,
|
|
173
|
+
show_on_create: inner.showOnCreate ?? false,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
152
176
|
}
|
|
153
177
|
switch (systemTag) {
|
|
154
178
|
case "TITLE":
|
|
@@ -209,9 +233,11 @@ export function appToTf(entity, ctx) {
|
|
|
209
233
|
diagnostics: ctx.diagnostics,
|
|
210
234
|
orgRefs: ctx.orgRefs,
|
|
211
235
|
workspaceAspects: ctx.workspaceAspects,
|
|
236
|
+
fieldOwnership,
|
|
212
237
|
});
|
|
213
238
|
if (field === undefined)
|
|
214
239
|
continue;
|
|
240
|
+
claimFieldDisplayName(fieldDisplayNames, field);
|
|
215
241
|
blocks.push(field.block);
|
|
216
242
|
fieldAddresses.set(field.bagKey, field.address);
|
|
217
243
|
}
|
|
@@ -263,7 +289,6 @@ export function appToTf(entity, ctx) {
|
|
|
263
289
|
const { blocks: viewBlocks } = viewToTf(payload.layouts, payload.listViews, payload.calendarViews, payload.kanbanViews, payload.dashboardViews, payload.agentViews, payload.viewOrder, {
|
|
264
290
|
ownerRefName: ctx.appRefName,
|
|
265
291
|
ownerTfLabel: ctx.appTfLabel,
|
|
266
|
-
aspectName: payload.name ?? "",
|
|
267
292
|
objectId,
|
|
268
293
|
stageTfLabels,
|
|
269
294
|
dashboardKeys: new Set(Object.keys(payload.dashboards ?? {})),
|
|
@@ -272,7 +297,7 @@ export function appToTf(entity, ctx) {
|
|
|
272
297
|
diagnostics: ctx.diagnostics,
|
|
273
298
|
fieldAddresses,
|
|
274
299
|
widgetKeys: new Set(Object.keys(payload.widgets ?? {})),
|
|
275
|
-
});
|
|
300
|
+
}, payload.customViews);
|
|
276
301
|
blocks.push(...viewBlocks);
|
|
277
302
|
const recordCreateForm = recordCreateFormToTf(payload.recordCreateForm, {
|
|
278
303
|
ownerRefName: ctx.appRefName,
|
|
@@ -303,6 +328,7 @@ export function appToTf(entity, ctx) {
|
|
|
303
328
|
orgRefs: ctx.orgRefs,
|
|
304
329
|
workspaceAspects: ctx.workspaceAspects,
|
|
305
330
|
diagnostics: ctx.diagnostics,
|
|
331
|
+
fieldOwnership: fieldAddresses,
|
|
306
332
|
}));
|
|
307
333
|
// --- Access policy pass (entities/access-policy), owner passed in.
|
|
308
334
|
// Authored entries only. Creating an app also has the platform mint a
|
|
@@ -319,6 +345,7 @@ export function appToTf(entity, ctx) {
|
|
|
319
345
|
appRefName: ctx.appRefName,
|
|
320
346
|
serviceAccounts: payload.serviceAccounts,
|
|
321
347
|
fieldAddresses,
|
|
348
|
+
resolveServiceAccountApp: workspaceServiceAccountAppResolver(ctx.workspaceAspects),
|
|
322
349
|
});
|
|
323
350
|
blocks.push(block);
|
|
324
351
|
}
|
|
@@ -330,11 +357,11 @@ export function appToTf(entity, ctx) {
|
|
|
330
357
|
serviceAccounts: payload.serviceAccounts,
|
|
331
358
|
orgRefs: ctx.orgRefs,
|
|
332
359
|
diagnostics: ctx.diagnostics,
|
|
360
|
+
resolveServiceAccountApp: workspaceServiceAccountAppResolver(ctx.workspaceAspects),
|
|
333
361
|
}));
|
|
334
|
-
blocks.push(...
|
|
362
|
+
blocks.push(...appServiceAccountBlocks(payload, {
|
|
335
363
|
ownerTfLabel: ctx.appTfLabel,
|
|
336
364
|
appId: objectId,
|
|
337
|
-
roles: payload.roles,
|
|
338
365
|
orgRefs: ctx.orgRefs,
|
|
339
366
|
diagnostics: ctx.diagnostics,
|
|
340
367
|
}));
|
|
@@ -86,6 +86,18 @@ export interface ActionDef<TOutput> {
|
|
|
86
86
|
}
|
|
87
87
|
/** Placeholder `forEachTaskRefKey` the forEach item proxy emits; replaced with the real refKey. */
|
|
88
88
|
export declare const FOR_EACH_PLACEHOLDER = "__forEach__";
|
|
89
|
+
/**
|
|
90
|
+
* CANONICAL reference-name rewrite — used ONLY for workflow-publish OUTPUTS
|
|
91
|
+
* (see DESIGN-canonical-reference-model.md). A workflow output's
|
|
92
|
+
* `taskReference.name` must be the platform's CANONICAL output name
|
|
93
|
+
* (`service_tasks`), NOT the refs-map display label — the platform validates
|
|
94
|
+
* the published output against the canonical name (edk#835). Task INPUTS,
|
|
95
|
+
* FILTERS and CALC mustaches are UNCHANGED (they keep `rewriteForwardTaskRefName`
|
|
96
|
+
* / the display refs-map path — #1271 owns those positions). Maps EDK's friendly
|
|
97
|
+
* accessor → canonical; identity for most kinds. Validated against
|
|
98
|
+
* TASK_OUTPUT_CONTRACTS by canonical-reference-model.test.ts.
|
|
99
|
+
*/
|
|
100
|
+
export declare function rewriteCanonicalOutputRefName(taskKey: string | undefined, name: string, taskRefKey?: string, schema?: unknown): string;
|
|
89
101
|
/** One finalized automation-level output property (already serialized to wire). */
|
|
90
102
|
export interface OutputEntry {
|
|
91
103
|
readonly name: string;
|
|
@@ -143,9 +155,38 @@ type ResolvedRefs<I> = {
|
|
|
143
155
|
};
|
|
144
156
|
/** Static options or options computed from the typed outputs available so far. */
|
|
145
157
|
export type ActionOptions<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TOptions> = TOptions | ((ctx: Context<TTrigger, TActions, TVars>) => TOptions);
|
|
146
|
-
/** One
|
|
147
|
-
export
|
|
158
|
+
/** One enclosing forEach, as `ctx.loops.<name>` sees it from inside its body. */
|
|
159
|
+
export interface ForEachScope<TItem> {
|
|
160
|
+
/** That loop's current item: what `ctx.item` is inside its own body. */
|
|
148
161
|
readonly item: ForEachItem<TItem>;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Inside a loop body, the builders' item type parameter carries the whole
|
|
165
|
+
* loop scope: the nearest loop's item plus every enclosing loop by name. One
|
|
166
|
+
* parameter instead of two keeps the ~40-method builder interface cheap to
|
|
167
|
+
* type-check (a separate loops parameter pushed CI's tsc past its heap).
|
|
168
|
+
*/
|
|
169
|
+
export interface LoopScope<TItem, TLoops> {
|
|
170
|
+
readonly __item: TItem;
|
|
171
|
+
readonly __loops: TLoops;
|
|
172
|
+
}
|
|
173
|
+
/** The nearest loop's item type in a builder's item parameter. */
|
|
174
|
+
type ScopeItem<T> = T extends LoopScope<infer TItem, unknown> ? TItem : T;
|
|
175
|
+
/**
|
|
176
|
+
* The enclosing loops in a builder's item parameter (none outside a body).
|
|
177
|
+
* `never` (the root builder) is checked first: a bare distributive
|
|
178
|
+
* conditional over `never` is `never`, which would erase every loop scope.
|
|
179
|
+
*/
|
|
180
|
+
type ScopeLoops<T> = [T] extends [never] ? EmptyObject : T extends LoopScope<unknown, infer TLoops> ? TLoops : EmptyObject;
|
|
181
|
+
/**
|
|
182
|
+
* One context object for nested actions. forEach bodies add the current item
|
|
183
|
+
* (`ctx.item`, the nearest loop) and every enclosing loop by name
|
|
184
|
+
* (`ctx.loops.<name>.item`), so a task in an inner loop can still read an
|
|
185
|
+
* outer loop's current item.
|
|
186
|
+
*/
|
|
187
|
+
export type NestedActionContext<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TItem = never> = Context<TTrigger, TActions, TVars> & ([TItem] extends [never] ? Record<never, never> : {
|
|
188
|
+
readonly item: ForEachItem<ScopeItem<TItem>>;
|
|
189
|
+
readonly loops: ScopeLoops<TItem>;
|
|
149
190
|
});
|
|
150
191
|
type BuilderActionOptions<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TItem, TOptions> = TOptions | ((ctx: NestedActionContext<TTrigger, TActions, TVars, TItem>) => TOptions);
|
|
151
192
|
type BuilderMode = "root" | "nested";
|
|
@@ -217,6 +258,7 @@ interface ActionMethods<TTrigger, TActions extends Record<string, unknown>, TVar
|
|
|
217
258
|
updateField<TName extends string, A extends AppOrElementOrTaskRef, 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, {
|
|
218
259
|
record: RecordShape<A>;
|
|
219
260
|
}>;
|
|
261
|
+
bulkUpdateFields<TName extends string, A extends AppOrElementOrTaskRef, const Fields extends readonly import("./tasks.js").FieldAssignment[]>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").BulkUpdateFieldsOptions<A, Fields>>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").BulkUpdateFieldsOutput>;
|
|
220
262
|
findRelatedRecords<TName extends string, A extends AppOrElementOrTaskRef>(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").FindRelatedRecordsOutput<A>>;
|
|
221
263
|
relateRecords<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").RelateRecordsOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
222
264
|
sendEmail<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").SendEmailOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
@@ -244,18 +286,19 @@ interface ActionMethods<TTrigger, TActions extends Record<string, unknown>, TVar
|
|
|
244
286
|
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>>;
|
|
245
287
|
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, Record<string, unknown>>;
|
|
246
288
|
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, Record<string, unknown>>;
|
|
247
|
-
runAutomation<TName extends string, const
|
|
289
|
+
runAutomation<TName extends string, const O extends import("./tasks.js").RunAutomationStaticOptions<AutomationCatalogRef> | import("./tasks.js").RunAutomationDynamicReferenceOptions<readonly string[] | undefined>>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, O>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").RunAutomationStepResult<O>>;
|
|
248
290
|
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, Record<string, unknown>>;
|
|
249
291
|
approvalChain<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").ApprovalChainOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
250
292
|
approvalStatusUpdate<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").ApprovalStatusUpdateOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
251
293
|
addWatcher<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").AddWatcherOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
252
294
|
saveAttachment<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").SaveAttachmentOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
295
|
+
unzip<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").UnzipOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
253
296
|
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").UserSearchOutput>;
|
|
254
297
|
userGroupSearch<TName extends string>(name: TName, opts: BuilderActionOptions<TTrigger, TActions, TVars, TItem, import("./tasks.js").UserGroupSearchOptions>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, import("./tasks.js").UserGroupSearchOutput>;
|
|
255
298
|
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>;
|
|
256
299
|
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>;
|
|
257
300
|
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>;
|
|
258
|
-
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>;
|
|
301
|
+
forEach<TName extends string, TForEachItem>(name: TName, opts: ForEachConfig<TTrigger, TActions, TVars, TItem, TForEachItem, TName>, displayName?: string, hclParent?: "trigger" | string): WithAction<TMode, TItem, TTrigger, TActions, TVars, TName, EmptyObject>;
|
|
259
302
|
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>;
|
|
260
303
|
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>;
|
|
261
304
|
}
|
|
@@ -277,9 +320,10 @@ export type ForEachBuilder<TTrigger, TActions extends Record<string, unknown>, T
|
|
|
277
320
|
export type SwitchCaseBuilder<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TItem = never> = NestedActionBuilder<TTrigger, TActions, TVars, TItem>;
|
|
278
321
|
/** A forkJoin branch body builder. */
|
|
279
322
|
export type ForkJoinBranchBuilder<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TItem = never> = NestedActionBuilder<TTrigger, TActions, TVars, TItem>;
|
|
280
|
-
export interface ForEachConfig<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TEnclosingItem, TItem> {
|
|
323
|
+
export interface ForEachConfig<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TEnclosingItem, TItem, TName extends string = string> {
|
|
281
324
|
readonly collection: Ref<readonly TItem[]> | ((ctx: NestedActionContext<TTrigger, TActions, TVars, TEnclosingItem>) => Ref<readonly TItem[]>);
|
|
282
|
-
|
|
325
|
+
/** The loop body. Its context adds `ctx.item` and this loop as `ctx.loops.<name>`. */
|
|
326
|
+
readonly actions: (actions: ForEachBuilder<TTrigger, TActions, TVars, LoopScope<NoInfer<TItem>, ScopeLoops<TEnclosingItem> & Record<TName, ForEachScope<NoInfer<TItem>>>>>) => NestedActionChain;
|
|
283
327
|
}
|
|
284
328
|
export interface SwitchCase<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown>, TItem = never> {
|
|
285
329
|
readonly label?: string;
|
|
@@ -360,4 +404,10 @@ export interface AutomationConfigured {
|
|
|
360
404
|
* `AutomationConfigured` with `ref(refName)` and `def(refName)`.
|
|
361
405
|
*/
|
|
362
406
|
export declare function automation(opts: AutomationOptions): AutomationConfigured;
|
|
407
|
+
/**
|
|
408
|
+
* A record trigger carries no aspect of its own on the wire: it always fires
|
|
409
|
+
* on the automation's owning app or element. A trigger authored against any
|
|
410
|
+
* other app would silently attach to the owner, so it is a build error (#1594).
|
|
411
|
+
*/
|
|
412
|
+
export declare function assertTriggerOnOwningAspect(automationRefName: string, ownerRefName: string, triggerAppRefName: string | undefined): void;
|
|
363
413
|
export {};
|