@elementumai/edk 0.9.20 → 0.10.2

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.
Files changed (159) hide show
  1. package/README.md +19 -7
  2. package/dist-sdk/src/catalog/factories.d.ts +10 -2
  3. package/dist-sdk/src/catalog/factories.js +10 -1
  4. package/dist-sdk/src/catalog/index.d.ts +2 -2
  5. package/dist-sdk/src/catalog/index.js +1 -1
  6. package/dist-sdk/src/catalog/token.js +4 -0
  7. package/dist-sdk/src/catalog/types.d.ts +7 -1
  8. package/dist-sdk/src/catalog/types.js +1 -0
  9. package/dist-sdk/src/core/triggers/on-demand.d.ts +2 -2
  10. package/dist-sdk/src/core/triggers/on-demand.js +7 -0
  11. package/dist-sdk/src/core/types/app.d.ts +2 -2
  12. package/dist-sdk/src/engine/coverage-gaps.d.ts +86 -0
  13. package/dist-sdk/src/engine/coverage-gaps.js +156 -0
  14. package/dist-sdk/src/engine/ei/run.d.ts +21 -1
  15. package/dist-sdk/src/engine/ei/run.js +89 -2
  16. package/dist-sdk/src/engine/pull/catalog-ref.d.ts +16 -0
  17. package/dist-sdk/src/engine/pull/catalog-ref.js +24 -0
  18. package/dist-sdk/src/engine/pull/context.d.ts +68 -6
  19. package/dist-sdk/src/engine/pull/context.js +40 -1
  20. package/dist-sdk/src/engine/pull/procedure-refs.d.ts +8 -0
  21. package/dist-sdk/src/engine/pull/procedure-refs.js +28 -0
  22. package/dist-sdk/src/engine/pull/result-output.js +27 -1
  23. package/dist-sdk/src/engine/tf/index.d.ts +1 -1
  24. package/dist-sdk/src/engine/tf/index.js +1 -1
  25. package/dist-sdk/src/engine/tf/labels.d.ts +22 -5
  26. package/dist-sdk/src/engine/tf/labels.js +45 -3
  27. package/dist-sdk/src/engine/tf/parse.js +3 -2
  28. package/dist-sdk/src/engine/validation.d.ts +5 -0
  29. package/dist-sdk/src/engine/validation.js +12 -2
  30. package/dist-sdk/src/entities/access-policy/from-tf.js +38 -1
  31. package/dist-sdk/src/entities/access-policy/principal.d.ts +2 -0
  32. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +3 -0
  33. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +42 -19
  34. package/dist-sdk/src/entities/agent/from-tf.js +11 -3
  35. package/dist-sdk/src/entities/agent/module.js +2 -0
  36. package/dist-sdk/src/entities/agent/to-tf.js +14 -3
  37. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +8 -1
  38. package/dist-sdk/src/entities/agent-tool/from-tf.js +11 -5
  39. package/dist-sdk/src/entities/agent-tool/module.js +3 -0
  40. package/dist-sdk/src/entities/app/auto-share.d.ts +38 -0
  41. package/dist-sdk/src/entities/app/auto-share.js +49 -0
  42. package/dist-sdk/src/entities/app/build.d.ts +17 -3
  43. package/dist-sdk/src/entities/app/build.js +56 -4
  44. package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +6 -1
  45. package/dist-sdk/src/entities/app/from-tf.js +4 -0
  46. package/dist-sdk/src/entities/app/index.d.ts +2 -1
  47. package/dist-sdk/src/entities/app/index.js +1 -8
  48. package/dist-sdk/src/entities/app/module.js +2 -1
  49. package/dist-sdk/src/entities/app/to-tf.d.ts +6 -0
  50. package/dist-sdk/src/entities/app/to-tf.js +25 -2
  51. package/dist-sdk/src/entities/automation/build.d.ts +12 -2
  52. package/dist-sdk/src/entities/automation/build.js +105 -17
  53. package/dist-sdk/src/entities/automation/calculation-expression.d.ts +7 -7
  54. package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +17 -4
  55. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +187 -27
  56. package/dist-sdk/src/entities/automation/from-tf.d.ts +9 -2
  57. package/dist-sdk/src/entities/automation/from-tf.js +397 -89
  58. package/dist-sdk/src/entities/automation/index.d.ts +1 -1
  59. package/dist-sdk/src/entities/automation/index.js +1 -1
  60. package/dist-sdk/src/entities/automation/module.d.ts +3 -0
  61. package/dist-sdk/src/entities/automation/module.js +70 -7
  62. package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +21 -0
  63. package/dist-sdk/src/entities/automation/output-key-wire-name.js +38 -0
  64. package/dist-sdk/src/entities/automation/script-code.d.ts +5 -2
  65. package/dist-sdk/src/entities/automation/script-code.js +23 -5
  66. package/dist-sdk/src/entities/automation/task-output-labels.d.ts +37 -0
  67. package/dist-sdk/src/entities/automation/task-output-labels.js +76 -0
  68. package/dist-sdk/src/entities/automation/tasks.d.ts +92 -20
  69. package/dist-sdk/src/entities/automation/tasks.js +48 -15
  70. package/dist-sdk/src/entities/automation/to-tf.d.ts +20 -3
  71. package/dist-sdk/src/entities/automation/to-tf.js +656 -65
  72. package/dist-sdk/src/entities/automation/triggers.d.ts +8 -4
  73. package/dist-sdk/src/entities/automation/types.d.ts +9 -0
  74. package/dist-sdk/src/entities/automation/types.js +19 -0
  75. package/dist-sdk/src/entities/automation/value-ref-tf.d.ts +1 -1
  76. package/dist-sdk/src/entities/automation/value-ref-tf.js +1 -1
  77. package/dist-sdk/src/entities/chart/from-tf.js +9 -1
  78. package/dist-sdk/src/entities/data-lookup/module.js +2 -0
  79. package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +1 -0
  80. package/dist-sdk/src/entities/dynamic-layout/to-tf.js +7 -5
  81. package/dist-sdk/src/entities/element/build.d.ts +3 -0
  82. package/dist-sdk/src/entities/element/build.js +1 -0
  83. package/dist-sdk/src/entities/element/from-tf.js +4 -0
  84. package/dist-sdk/src/entities/element/module.js +2 -1
  85. package/dist-sdk/src/entities/element/to-tf.d.ts +1 -1
  86. package/dist-sdk/src/entities/element/to-tf.js +12 -14
  87. package/dist-sdk/src/entities/field/build.d.ts +3 -2
  88. package/dist-sdk/src/entities/field/calc.d.ts +7 -7
  89. package/dist-sdk/src/entities/field/from-tf.d.ts +4 -4
  90. package/dist-sdk/src/entities/field/from-tf.js +255 -80
  91. package/dist-sdk/src/entities/field/module.d.ts +6 -0
  92. package/dist-sdk/src/entities/field/module.js +23 -2
  93. package/dist-sdk/src/entities/field/options.js +6 -1
  94. package/dist-sdk/src/entities/field/order.d.ts +16 -0
  95. package/dist-sdk/src/entities/field/order.js +41 -0
  96. package/dist-sdk/src/entities/field/to-tf.d.ts +4 -4
  97. package/dist-sdk/src/entities/field/to-tf.js +7 -1
  98. package/dist-sdk/src/entities/field/types.d.ts +7 -0
  99. package/dist-sdk/src/entities/field/types.js +32 -0
  100. package/dist-sdk/src/entities/role/from-tf.js +3 -3
  101. package/dist-sdk/src/entities/role/to-tf.d.ts +2 -0
  102. package/dist-sdk/src/entities/role/to-tf.js +12 -4
  103. package/dist-sdk/src/entities/service-account/from-tf.js +3 -3
  104. package/dist-sdk/src/entities/service-account/workspace-owner.d.ts +16 -0
  105. package/dist-sdk/src/entities/service-account/workspace-owner.js +22 -0
  106. package/dist-sdk/src/entities/shared/filters/ast.d.ts +15 -1
  107. package/dist-sdk/src/entities/shared/filters/ast.js +2 -0
  108. package/dist-sdk/src/entities/shared/filters/index.d.ts +5 -0
  109. package/dist-sdk/src/entities/shared/filters/index.js +5 -0
  110. package/dist-sdk/src/entities/shared/filters/print.js +7 -2
  111. package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +5 -0
  112. package/dist-sdk/src/entities/shared/filters/tf-codec.js +42 -7
  113. package/dist-sdk/src/entities/shared/filters/types.d.ts +8 -3
  114. package/dist-sdk/src/entities/shared/ref.d.ts +5 -7
  115. package/dist-sdk/src/entities/shared/ref.js +5 -7
  116. package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +9 -0
  117. package/dist-sdk/src/entities/shared/tool-field-ref.js +35 -2
  118. package/dist-sdk/src/entities/shared/types/field-types.d.ts +10 -0
  119. package/dist-sdk/src/entities/shared/types/field-types.js +4 -0
  120. package/dist-sdk/src/entities/skill/access-policy.js +3 -3
  121. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +3 -0
  122. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +12 -5
  123. package/dist-sdk/src/entities/skill/from-tf.js +4 -2
  124. package/dist-sdk/src/entities/skill/module.js +2 -0
  125. package/dist-sdk/src/entities/skill-tool/from-tf.js +41 -8
  126. package/dist-sdk/src/entities/skill-tool/module.js +3 -0
  127. package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +0 -6
  128. package/dist-sdk/src/entities/skill-tool/to-tf.js +22 -9
  129. package/dist-sdk/src/entities/task/build.d.ts +8 -0
  130. package/dist-sdk/src/entities/task/build.js +10 -1
  131. package/dist-sdk/src/entities/task/from-tf.d.ts +4 -2
  132. package/dist-sdk/src/entities/task/from-tf.js +7 -2
  133. package/dist-sdk/src/entities/task/module.js +3 -2
  134. package/dist-sdk/src/entities/task/to-tf.d.ts +8 -4
  135. package/dist-sdk/src/entities/task/to-tf.js +32 -1
  136. package/dist-sdk/src/entities/view/from-tf.js +9 -1
  137. package/dist-sdk/src/entities/view/module.js +4 -1
  138. package/dist-sdk/src/entities/view/to-tf.d.ts +6 -7
  139. package/dist-sdk/src/entities/view/to-tf.js +30 -11
  140. package/dist-sdk/src/entities/view/types.d.ts +6 -0
  141. package/dist-sdk/src/entities/view/types.js +6 -0
  142. package/dist-sdk/src/entities/visual-flow/build.d.ts +16 -1
  143. package/dist-sdk/src/entities/visual-flow/build.js +9 -0
  144. package/dist-sdk/src/entities/visual-flow/from-tf.d.ts +14 -0
  145. package/dist-sdk/src/entities/visual-flow/from-tf.js +51 -3
  146. package/dist-sdk/src/entities/visual-flow/index.d.ts +1 -1
  147. package/dist-sdk/src/entities/visual-flow/index.js +1 -1
  148. package/dist-sdk/src/entities/visual-flow/printer.js +19 -0
  149. package/dist-sdk/src/entities/visual-flow/to-tf.js +87 -3
  150. package/dist-sdk/src/entities/widget/from-tf.js +3 -3
  151. package/dist-sdk/src/entities/widget/to-tf.d.ts +2 -0
  152. package/dist-sdk/src/entities/widget/to-tf.js +7 -6
  153. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +133 -9
  154. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
  155. package/dist-sdk/src/graph/index.d.ts +4 -2
  156. package/dist-sdk/src/graph/index.js +3 -0
  157. package/dist-sdk/src/graph/modules.js +2 -1
  158. package/dist-sdk/src/graph/types.d.ts +41 -3
  159. package/package.json +7 -3
@@ -12,7 +12,7 @@ import type { ApprovalChainRef, AppOrElementRef, DatamineRef, FieldRef } from ".
12
12
  import type { UnsafePlatformId } from "../../core/platform-id.js";
13
13
  import type { RecordShape } from "../field/record-shape.js";
14
14
  import { type InferTriggerType, type WithOnDemandTriggeredBy, type TriggerInputFieldDef, type TriggerInputSchema } from "../../core/triggers/on-demand.js";
15
- import type { TriggerFieldTypeAlias } from "../shared/types/field-types.js";
15
+ import type { OnDemandParamTypeAlias } from "../shared/types/field-types.js";
16
16
  import type { Filter } from "./filter.js";
17
17
  import { type TriggerChain } from "./build.js";
18
18
  /**
@@ -63,7 +63,7 @@ export declare function schedule(opts: ScheduleTriggerOptions): TriggerChain<Sch
63
63
  * the wire trigger-parameter declarations — a bare type parameter would be
64
64
  * erased and deploy a trigger with no declared inputs.
65
65
  */
66
- type TriggerInputShorthand = Exclude<TriggerFieldTypeAlias, "record">;
66
+ type TriggerInputShorthand = Exclude<OnDemandParamTypeAlias, "record">;
67
67
  export type TriggerInputSchemaSpec = Record<string, TriggerInputFieldDef | TriggerInputShorthand>;
68
68
  /** Normalize a spec entry to the full def shape (type level). */
69
69
  type NormalizeSpec<S extends TriggerInputSchemaSpec> = {
@@ -135,11 +135,15 @@ export interface AttachmentTriggerOutput<A extends AppOrElementRef = AppOrElemen
135
135
  readonly record: RecordShape<A>;
136
136
  /**
137
137
  * Trigger attachment payload. `id` is the live ATTACHMENT_ID wire key
138
- * (`refs["Attachment Id"]`); remaining sub-fields (name/url/mediaType/…)
139
- * aren't typed yet — follow-up.
138
+ * (`refs["Attachment Id"]`).
140
139
  */
141
140
  readonly attachment: {
142
141
  readonly id: string;
142
+ readonly name: string;
143
+ readonly url: string;
144
+ readonly mediaType: string;
145
+ readonly size: number;
146
+ readonly description: string;
143
147
  readonly [key: string]: unknown;
144
148
  };
145
149
  }
@@ -17,6 +17,7 @@
17
17
  * is load-bearing (to-tf maps authored → resource by it); the declared rows
18
18
  * need only an accurate `resourceType` for from-tf recognition.
19
19
  */
20
+ import { type ChildResourceScope } from "../../engine/tf/labels.js";
20
21
  export interface AutomationSubType {
21
22
  /** Wire discriminant: a trigger `wire` key or a `ActionDef.key`. */
22
23
  readonly typeKey: string;
@@ -28,6 +29,14 @@ export interface AutomationSubType {
28
29
  /** The automation's own resource + its versioning/publish resource. */
29
30
  export declare const AUTOMATION_RESOURCE_TYPE = "elementum_automation";
30
31
  export declare const WORKFLOW_PUBLISH_RESOURCE_TYPE = "elementum_workflow_publish";
32
+ /**
33
+ * Terraform label of an owned automation. ei labels an element automation
34
+ * `SanitizeName(handle)_SanitizeName(name)` and an app automation
35
+ * `apps_<ns>_<ns>_<automation>`. A bag key that is already that full export
36
+ * label is kept. Every emitter that references an automation resource must
37
+ * use this so the address exists.
38
+ */
39
+ export declare function automationResourceLabel(ownerTfLabel: string, refName: string, scope?: ChildResourceScope, handle?: string): string;
31
40
  export declare const TABLE_RECORDS_SEARCH_TASK_RESOURCE_TYPE = "elementum_table_records_search_task";
32
41
  /** Trigger kinds. One trigger per automation. Phase 1: onDemand only. */
33
42
  export declare const TRIGGER_SUB_TYPES: readonly AutomationSubType[];
@@ -17,9 +17,26 @@
17
17
  * is load-bearing (to-tf maps authored → resource by it); the declared rows
18
18
  * need only an accurate `resourceType` for from-tf recognition.
19
19
  */
20
+ import { appScopedResourceLabel, sanitizeName, tsLabelToTfLabel } from "../../engine/tf/labels.js";
20
21
  /** The automation's own resource + its versioning/publish resource. */
21
22
  export const AUTOMATION_RESOURCE_TYPE = "elementum_automation";
22
23
  export const WORKFLOW_PUBLISH_RESOURCE_TYPE = "elementum_workflow_publish";
24
+ /**
25
+ * Terraform label of an owned automation. ei labels an element automation
26
+ * `SanitizeName(handle)_SanitizeName(name)` and an app automation
27
+ * `apps_<ns>_<ns>_<automation>`. A bag key that is already that full export
28
+ * label is kept. Every emitter that references an automation resource must
29
+ * use this so the address exists.
30
+ */
31
+ export function automationResourceLabel(ownerTfLabel, refName, scope = "app", handle) {
32
+ const child = tsLabelToTfLabel(refName);
33
+ if (scope !== "element")
34
+ return appScopedResourceLabel(ownerTfLabel, child);
35
+ const prefix = handle !== undefined && handle !== "" ? sanitizeName(handle) : ownerTfLabel;
36
+ if (prefix !== "" && (child === prefix || child.startsWith(`${prefix}_`)))
37
+ return child;
38
+ return prefix === "" ? child : `${prefix}_${child}`;
39
+ }
23
40
  export const TABLE_RECORDS_SEARCH_TASK_RESOURCE_TYPE = "elementum_table_records_search_task";
24
41
  /** Trigger kinds. One trigger per automation. Phase 1: onDemand only. */
25
42
  export const TRIGGER_SUB_TYPES = [
@@ -52,6 +69,7 @@ export const TASK_SUB_TYPES = [
52
69
  { typeKey: "variable", resourceType: "elementum_variable_task", implemented: true },
53
70
  { typeKey: "updateVariable", resourceType: "elementum_update_variable_task", implemented: true },
54
71
  { typeKey: "updateField", resourceType: "elementum_update_field_task", implemented: true },
72
+ { typeKey: "bulkUpdateFields", resourceType: "elementum_bulk_update_fields_task", implemented: true },
55
73
  { typeKey: "recordSearch", resourceType: "elementum_record_search_task", implemented: true },
56
74
  { typeKey: "tableRecordsSearch", resourceType: TABLE_RECORDS_SEARCH_TASK_RESOURCE_TYPE, implemented: true },
57
75
  { typeKey: "createRecord", resourceType: "elementum_create_record_task", implemented: true },
@@ -75,6 +93,7 @@ export const TASK_SUB_TYPES = [
75
93
  { typeKey: "approvalStatusUpdate", resourceType: "elementum_approval_status_update_task", implemented: true },
76
94
  { typeKey: "addWatcher", resourceType: "elementum_add_watcher_task", implemented: true },
77
95
  { typeKey: "saveAttachment", resourceType: "elementum_save_attachment_task", implemented: true },
96
+ { typeKey: "unzip", resourceType: "elementum_unzip_file_task", implemented: true },
78
97
  { typeKey: "userSearch", resourceType: "elementum_user_search_task", implemented: true },
79
98
  { typeKey: "userGroupSearch", resourceType: "elementum_user_group_search_task", implemented: true },
80
99
  { typeKey: "aspectRecordFieldLocking", resourceType: "elementum_aspect_record_field_locking_task", implemented: true },
@@ -16,7 +16,7 @@
16
16
  * - on_demand trigger: the DECLARED parameter name (the authored schema key;
17
17
  * the wire's triggerReference name is the Mobius-canonicalized form —
18
18
  * reverse-mapped here via the declared names).
19
- * - variable task: the variable_name (buildVariableTaskRefs).
19
+ * - variable task: each variable's name (buildVariableTaskRefs).
20
20
  * - execute_script: "Result" for the whole result, "result.<prop>" per
21
21
  * output-schema property.
22
22
  */
@@ -16,7 +16,7 @@
16
16
  * - on_demand trigger: the DECLARED parameter name (the authored schema key;
17
17
  * the wire's triggerReference name is the Mobius-canonicalized form —
18
18
  * reverse-mapped here via the declared names).
19
- * - variable task: the variable_name (buildVariableTaskRefs).
19
+ * - variable task: each variable's name (buildVariableTaskRefs).
20
20
  * - execute_script: "Result" for the whole result, "result.<prop>" per
21
21
  * output-schema property.
22
22
  */
@@ -163,7 +163,15 @@ function opaqueSubscriptionFromTf(value, where, ctx) {
163
163
  ? columns.map((column) => plainObject(column)?.["name"]).filter((name) => typeof name === "string")
164
164
  : [];
165
165
  const hasUiRoles = columnNames.includes("Label") && (columnNames.includes("Value") || columnNames.includes("Series"));
166
- if (typeof datasourceId !== "string" || decodedWith === undefined || plainObject(decodedWith)?.["statement"] === undefined || !hasUiRoles)
166
+ const hasStatement = decodedWith !== undefined && plainObject(decodedWith)?.["statement"] !== undefined;
167
+ // UI charts that group by a second picklist join the synthetic datasource by
168
+ // expression instead of carrying a with.statement.
169
+ const joins = rec?.["joins"];
170
+ const hasExpressionJoins = Array.isArray(joins) && joins.length > 0 && joins.every((join) => {
171
+ const joinObject = plainObject(join);
172
+ return joinObject?.["left_expression"] !== undefined && joinObject["right_expression"] !== undefined;
173
+ });
174
+ if (typeof datasourceId !== "string" || !hasUiRoles || (!hasStatement && !hasExpressionJoins))
167
175
  return undefined;
168
176
  const attributes = {};
169
177
  for (const [key, item] of Object.entries(rec)) {
@@ -19,4 +19,6 @@ export const dataLookupModules = [
19
19
  lookup("organization", "elementum_organization", ""),
20
20
  lookup("permission-template", "elementum_permission_template", "template"),
21
21
  lookup("stored-function", "elementum_stored_function", "name"),
22
+ // Task inputs built from secret() reference existing vault entries by key.
23
+ lookup("vault-entry", "elementum_vault_entry", "key", true),
22
24
  ];
@@ -18,6 +18,7 @@ export interface DynamicLayoutWire {
18
18
  export interface DynamicLayoutToTfOptions {
19
19
  readonly ownerRefName: string;
20
20
  readonly ownerTfLabel: string;
21
+ readonly ownerHandle?: string;
21
22
  /** Owning stream root kind; defaults to `"app"`. Elements have no stages. */
22
23
  readonly scope?: ChildResourceScope;
23
24
  readonly objectId: TfValue;
@@ -2,7 +2,7 @@ import { workspaceAspectKey } from "../../engine/build/context.js";
2
2
  import { resolveForeignRef } from "../shared/foreign-ref.js";
3
3
  import { expr, isCanonicalTsLabel, isTfExpr, scopedResourceLabel, tsLabelToTfLabel, } from "../../engine/tf/index.js";
4
4
  import { filterToTf } from "../access-policy/to-tf.js";
5
- import { AUTOMATION_RESOURCE_TYPE, WORKFLOW_PUBLISH_RESOURCE_TYPE } from "../automation/types.js";
5
+ import { AUTOMATION_RESOURCE_TYPE, WORKFLOW_PUBLISH_RESOURCE_TYPE, automationResourceLabel } from "../automation/types.js";
6
6
  import { fieldRefToTfValue } from "../field/to-tf.js";
7
7
  import { targetFilterFieldResolver } from "../relationship/to-tf.js";
8
8
  import { filterTfToWire } from "../shared/filters/tf-codec.js";
@@ -288,7 +288,7 @@ function automationButtonInput(rec, inputs, where, opts) {
288
288
  return [];
289
289
  }
290
290
  out["parameter_id"] = isActiveAutomation(target?.token.refName ?? "", opts)
291
- ? expr.dataAttr(AUTOMATION_RESOURCE_TYPE, publishedAutomationLookup(label, inputs, opts), ["parameter_ids", { index: name }])
291
+ ? expr.dataAttr(AUTOMATION_RESOURCE_TYPE, publishedAutomationLookup(label, inputs), ["parameter_ids", { index: name }])
292
292
  : expr.resourceAttr("elementum_on_demand_trigger", label, ["parameter_ids", { index: name }]);
293
293
  }
294
294
  if (Array.isArray(rec["fieldRefParams"])) {
@@ -453,7 +453,7 @@ function resolveAutomation(token, where, opts) {
453
453
  opts.diagnostics.push(`${where}: automation key "${refName}" is not a canonical tsLabel; dropped`);
454
454
  return undefined;
455
455
  }
456
- return expr.resourceAttr("elementum_automation", scopedResourceLabel(opts.ownerTfLabel, tsLabelToTfLabel(refName), "app"), ["id"]);
456
+ return expr.resourceAttr(AUTOMATION_RESOURCE_TYPE, automationResourceLabel(opts.ownerTfLabel, refName, scopeOf(opts), scopeOf(opts) === "element" ? opts.ownerHandle : undefined), ["id"]);
457
457
  }
458
458
  function isActiveAutomation(refName, opts) {
459
459
  return opts.workspaceAspects?.get(workspaceAspectKey(scopeOf(opts), opts.ownerRefName))
@@ -465,14 +465,16 @@ function isActiveAutomation(refName, opts) {
465
465
  * after publish, as run-automation tasks do. The data address is
466
466
  * module-global, so it is scoped to this layout.
467
467
  */
468
- function publishedAutomationLookup(automationLabel, inputs, opts) {
468
+ function publishedAutomationLookup(automationLabel, inputs) {
469
469
  const label = `${automationLabel}_for_${inputs.layoutLabel}`;
470
470
  inputs.automationLookups.set(`${AUTOMATION_RESOURCE_TYPE}.${label}`, {
471
471
  kind: "data",
472
472
  type: AUTOMATION_RESOURCE_TYPE,
473
473
  label,
474
474
  attrs: {
475
- app_id: opts.objectId,
475
+ // From the automation, not the layout's owner: see the run-automation
476
+ // lookup in automation/to-tf.ts (edk#1514).
477
+ app_id: expr.resourceAttr(AUTOMATION_RESOURCE_TYPE, automationLabel, ["app_id"]),
476
478
  id: expr.resourceAttr(AUTOMATION_RESOURCE_TYPE, automationLabel, ["id"]),
477
479
  depends_on: [expr.resourceAttr(WORKFLOW_PUBLISH_RESOURCE_TYPE, automationLabel)],
478
480
  },
@@ -1,3 +1,4 @@
1
+ import type { AutoShareOptions } from "../app/auto-share.js";
1
2
  import { type AppOrElementRef, type CloudLinkRef, type FieldRef } from "../../catalog/index.js";
2
3
  import type { DeployableEntity, EntityDeployOptions } from "../../engine/entity.js";
3
4
  import type { AccessPolicyOptions } from "../access-policy/build.js";
@@ -75,6 +76,8 @@ interface ElementV2OptionsBase<F extends Record<string, AppField> = Record<strin
75
76
  readonly cloudConnection?: ElementCloudConnection;
76
77
  /** Whether the comments display block is enabled. Omit to leave the platform's current value alone. */
77
78
  readonly commentsEnabled?: boolean;
79
+ /** Automatic record sharing toggles. Omit to leave the platform setting untouched. */
80
+ readonly autoShare?: AutoShareOptions;
78
81
  /** Fields keyed by ref name. At least one required by the compose API. */
79
82
  readonly fields: F;
80
83
  /**
@@ -125,6 +125,7 @@ export function element(opts) {
125
125
  ...(opts.cloudOptions !== undefined ? { cloudOptions: opts.cloudOptions } : {}),
126
126
  ...(opts.cloudConnection !== undefined ? { cloudConnection: opts.cloudConnection } : {}),
127
127
  ...(opts.commentsEnabled !== undefined ? { commentsEnabled: opts.commentsEnabled } : {}),
128
+ ...(opts.autoShare !== undefined ? { autoShare: opts.autoShare } : {}),
128
129
  ...(opts.systemFields?.audit === true ? { auditFields: true } : {}),
129
130
  fields: [
130
131
  ...serializeElementSystemFields(opts.systemFields),
@@ -3,6 +3,7 @@
3
3
  * `NormalizedApp` shape (`type: "ELEMENT"`) that `printElementV2` consumes.
4
4
  * Mirrors `app/from-tf.ts` without app-only status/stages dialect.
5
5
  */
6
+ import { autoShareFromTf } from "../app/auto-share.js";
6
7
  import { DEPLOY_DEFAULT_SYSTEM_FIELD_NAMES } from "../../core/system-fields.js";
7
8
  import { EntityTfError } from "../../engine/entity.js";
8
9
  import { dataRefLabel, optionalBoolean, optionalString } from "../../engine/pull/context.js";
@@ -28,6 +29,7 @@ const KNOWN_ELEMENT_ATTRS = new Set([
28
29
  "category_id",
29
30
  "cloud_link_id",
30
31
  "comments_enabled",
32
+ "auto_share",
31
33
  "cloud_mapping_snowflake_database",
32
34
  "cloud_mapping_snowflake_schema",
33
35
  "cloud_mapping_snowflake_table",
@@ -75,6 +77,7 @@ export function elementFromTf(elementBlock, fieldBlocks, ctx, viewBlocks = {
75
77
  const titleFieldDescription = optionalString(attrs, "title_field_description", `element "${label}"`, ctx);
76
78
  const idFieldDescription = optionalString(attrs, "id_field_description", `element "${label}"`, ctx);
77
79
  const commentsEnabled = optionalBoolean(attrs, "comments_enabled", `element "${label}"`, ctx);
80
+ const autoShare = autoShareFromTf(attrs["auto_share"], `element "${label}"`, ctx.diagnostics);
78
81
  // Snowflake cloud mapping — a LINKED element's Cloud Link + Database/Schema/
79
82
  // Table + column-name wiring. Real and round-tripped: elementToTf re-sends
80
83
  // it on build (create-only — the table binding is immutable once set).
@@ -191,6 +194,7 @@ export function elementFromTf(elementBlock, fieldBlocks, ctx, viewBlocks = {
191
194
  ...(cloudOptions !== undefined && { cloudOptions }),
192
195
  ...(cloudConnection !== undefined && { cloudConnection }),
193
196
  ...(commentsEnabled !== undefined && { commentsEnabled }),
197
+ ...(autoShare !== undefined && { autoShare }),
194
198
  ...(auditFields && { auditFields }),
195
199
  ...(layouts.length > 0 && { layouts }),
196
200
  ...(listViews.length > 0 && { listViews }),
@@ -3,6 +3,7 @@
3
3
  * Offline extract/build and live `edk pull element` (via `ei elements export
4
4
  * --directory` with fields/imports/adoption flags).
5
5
  */
6
+ import { inManagedFieldOrder } from "../field/order.js";
6
7
  import { NO_CATALOG, } from "../../graph/types.js";
7
8
  import { appendFieldLocals } from "../field/locals.js";
8
9
  import { 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";
@@ -16,7 +17,7 @@ function extractElementStreamRoot(stream, ctx) {
16
17
  throw new Error(`expected exactly one ${ELEMENT_RESOURCE_TYPE} resource in the export stream, found ${elementBlocks.length}` +
17
18
  (elementBlocks.length > 1 ? " — was this exported with --recursive?" : ""));
18
19
  }
19
- const fieldBlocks = stream.byKind.get("field") ?? [];
20
+ const fieldBlocks = inManagedFieldOrder(stream.byKind.get("field") ?? [], stream.byKind.get("managed-field-order") ?? []);
20
21
  const viewBlocks = stream.byKind.get("view") ?? [];
21
22
  const layoutBlocks = viewBlocks.filter((b) => b.type === LAYOUT_RESOURCE_TYPE);
22
23
  const listViewBlocks = viewBlocks.filter((b) => b.type === LIST_VIEW_RESOURCE_TYPE);
@@ -3,7 +3,7 @@
3
3
  * field resources in ei's dialect. No status_options/stages (apps always
4
4
  * emit those; element captures do not).
5
5
  */
6
- import { type ToTfContext } from "../../engine/build/context.js";
6
+ import type { ToTfContext } from "../../engine/build/context.js";
7
7
  import { type DeployableEntity } from "../../engine/entity.js";
8
8
  import type { BuildFieldMetadata } from "../../graph/types.js";
9
9
  import { type TfBlock } from "../../engine/tf/index.js";
@@ -3,12 +3,12 @@
3
3
  * field resources in ei's dialect. No status_options/stages (apps always
4
4
  * emit those; element captures do not).
5
5
  */
6
- import { workspaceAspectKey } from "../../engine/build/context.js";
6
+ import { managedFieldOrderToTf } from "../field/order.js";
7
+ import { autoShareToTf } from "../app/auto-share.js";
7
8
  import { EntityTfError } from "../../engine/entity.js";
8
9
  import { expr, snakeSlug } from "../../engine/tf/index.js";
9
10
  import { accessPolicyToTf } from "../access-policy/to-tf.js";
10
11
  import { displayBlocksToLayoutSections } from "../app/display-blocks-to-layout.js";
11
- import { APP_RESOURCE_TYPE } from "../app/module.js";
12
12
  import { displayBlocksToRecordCreateFormSections } from "../app/display-blocks-to-record-create-form.js";
13
13
  import { dashboardsToTf } from "../dashboard/to-tf.js";
14
14
  import { dynamicLayoutsToTf } from "../dynamic-layout/to-tf.js";
@@ -20,6 +20,7 @@ import { CLOUD_LINK_ORG_BAG } from "../org/cloud-link.js";
20
20
  import { recordCreateFormToTf } from "../record-create-form/to-tf.js";
21
21
  import { relationshipsToTf } from "../relationship/to-tf.js";
22
22
  import { rolesToTf } from "../role/to-tf.js";
23
+ import { workspaceServiceAccountAppResolver } from "../service-account/workspace-owner.js";
23
24
  import { relationshipTargetsFromBag, widgetsToTf } from "../widget/to-tf.js";
24
25
  import { viewToTf } from "../view/to-tf.js";
25
26
  import { SYSTEM_FIELD_KEY_BY_TAG } from "../../core/system-fields.js";
@@ -53,6 +54,8 @@ export function elementToTf(entity, ctx) {
53
54
  // default) lets the platform's current value ride through unchanged.
54
55
  if (payload.commentsEnabled !== undefined)
55
56
  elementAttrs["comments_enabled"] = payload.commentsEnabled;
57
+ if (payload.autoShare !== undefined)
58
+ elementAttrs["auto_share"] = autoShareToTf(payload.autoShare);
56
59
  if (payload.namespace !== undefined)
57
60
  elementAttrs["namespace"] = payload.namespace;
58
61
  if (payload.handle !== undefined)
@@ -189,6 +192,9 @@ export function elementToTf(entity, ctx) {
189
192
  blocks.push(field.block);
190
193
  fieldAddresses.set(field.bagKey, field.address);
191
194
  }
195
+ const fieldOrder = managedFieldOrderToTf(ctx.appTfLabel, "element", objectId, fieldAddresses);
196
+ if (fieldOrder !== undefined)
197
+ blocks.push(fieldOrder);
192
198
  blocks.push(...dashboardsToTf(payload.dashboards, {
193
199
  ownerTfLabel: ctx.appTfLabel,
194
200
  scope: "element",
@@ -203,6 +209,7 @@ export function elementToTf(entity, ctx) {
203
209
  blocks.push(...widgetsToTf(payload.widgets, {
204
210
  ownerRefName: ctx.appRefName,
205
211
  ownerTfLabel: ctx.appTfLabel,
212
+ ownerHandle: payload.handle,
206
213
  ownerType: ELEMENT_RESOURCE_TYPE,
207
214
  scope: "element",
208
215
  objectId,
@@ -227,7 +234,6 @@ export function elementToTf(entity, ctx) {
227
234
  ownerRefName: ctx.appRefName,
228
235
  ownerTfLabel: ctx.appTfLabel,
229
236
  scope: "element",
230
- aspectName: payload.name ?? "",
231
237
  objectId,
232
238
  dashboardKeys: new Set(Object.keys(payload.dashboards ?? {})),
233
239
  orgRefs: ctx.orgRefs,
@@ -254,6 +260,7 @@ export function elementToTf(entity, ctx) {
254
260
  blocks.push(...dynamicLayoutsToTf(payload.dynamicLayouts, {
255
261
  ownerRefName: ctx.appRefName,
256
262
  ownerTfLabel: ctx.appTfLabel,
263
+ ownerHandle: payload.handle,
257
264
  scope: "element",
258
265
  objectId,
259
266
  diagnostics: ctx.diagnostics,
@@ -288,17 +295,7 @@ export function elementToTf(entity, ctx) {
288
295
  // An element has no service accounts of its own. Hand the sibling app's
289
296
  // authored bag to the shared resolver so a managed account becomes a
290
297
  // direct resource ref and Terraform sequences same-apply creation.
291
- resolveServiceAccountApp: (appRefName) => {
292
- const app = ctx.workspaceAspects?.get(workspaceAspectKey("app", appRefName));
293
- if (app === undefined)
294
- return undefined;
295
- const serviceAccounts = app.streamRootEntity?.payload?.serviceAccounts;
296
- return {
297
- appTfLabel: app.tfLabel,
298
- appId: expr.resourceAttr(APP_RESOURCE_TYPE, app.tfLabel, ["id"]),
299
- ...(serviceAccounts !== undefined ? { serviceAccounts } : {}),
300
- };
301
- },
298
+ resolveServiceAccountApp: workspaceServiceAccountAppResolver(ctx.workspaceAspects),
302
299
  });
303
300
  blocks.push(block);
304
301
  }
@@ -309,6 +306,7 @@ export function elementToTf(entity, ctx) {
309
306
  objectId,
310
307
  orgRefs: ctx.orgRefs,
311
308
  diagnostics: ctx.diagnostics,
309
+ resolveServiceAccountApp: workspaceServiceAccountAppResolver(ctx.workspaceAspects),
312
310
  }));
313
311
  blocks.unshift({
314
312
  kind: "resource",
@@ -18,7 +18,7 @@
18
18
  * AppField is accepted.
19
19
  */
20
20
  import type { AppField, AppPicklistConfig, PicklistOption } from "../app/build.js";
21
- import type { AppOrElementOrTaskRef, AppOrElementRef, FieldRef } from "../../catalog/index.js";
21
+ import type { AppOrElementOrTaskRef, FieldRef } from "../../catalog/index.js";
22
22
  import type { AppFieldOfExprType, CalculationInclude, Expr, ExprContext, ExprType, ExprTypeOf, FieldRefOfExprType } from "./calc/types.js";
23
23
  import type { UnsafePlatformId } from "../../core/platform-id.js";
24
24
  import type { AspectFieldQrFormat, AspectNumericFieldFormat } from "../../../elementum-entity-client/clients/aspects/models/format.js";
@@ -99,7 +99,8 @@ export interface StaticDropdownConfig {
99
99
  readonly parent?: FieldRef<string, string, "PICKLIST" | "MULTI_PICKLIST">;
100
100
  }
101
101
  export interface DynamicDropdownConfig {
102
- readonly source: AppOrElementRef | UnsafePlatformId;
102
+ /** A task ref is accepted for a task field sourcing its own task (edk#1464). */
103
+ readonly source: AppOrElementOrTaskRef | UnsafePlatformId;
103
104
  readonly label: FieldRef | UnsafePlatformId;
104
105
  readonly parent?: DynamicDropdownParent;
105
106
  /**
@@ -31,33 +31,33 @@ export declare const calc: {
31
31
  dividedBy: <const A extends import("./calc/types.js").NumericLike, const B extends import("./calc/types.js").NumericLike>(a: A, b: B) => import("./calc/types.js").ComposedExpr<"decimal", [A, B]>;
32
32
  gt: {
33
33
  <const A extends import("./calc/types.js").NumericLike, const B extends import("./calc/types.js").NumericLike>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
34
- <T extends "date" | "datetime" | "handle" | "text" | "html", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
34
+ <T extends "text" | "date" | "datetime" | "handle" | "html", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
35
35
  };
36
36
  lt: {
37
37
  <const A extends import("./calc/types.js").NumericLike, const B extends import("./calc/types.js").NumericLike>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
38
- <T extends "date" | "datetime" | "handle" | "text" | "html", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
38
+ <T extends "text" | "date" | "datetime" | "handle" | "html", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
39
39
  };
40
40
  gte: {
41
41
  <const A extends import("./calc/types.js").NumericLike, const B extends import("./calc/types.js").NumericLike>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
42
- <T extends "date" | "datetime" | "handle" | "text" | "html", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
42
+ <T extends "text" | "date" | "datetime" | "handle" | "html", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
43
43
  };
44
44
  lte: {
45
45
  <const A extends import("./calc/types.js").NumericLike, const B extends import("./calc/types.js").NumericLike>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
46
- <T extends "date" | "datetime" | "handle" | "text" | "html", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
46
+ <T extends "text" | "date" | "datetime" | "handle" | "html", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
47
47
  };
48
48
  eq: {
49
49
  <const A extends import("./calc/types.js").NumericLike, const B extends import("./calc/types.js").NumericLike>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
50
- <T extends "group" | "bool" | "date" | "datetime" | "handle" | "json" | "text" | "user" | "html" | "attachment" | "picklist" | "multiPicklist" | "uuid", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
50
+ <T extends "text" | "group" | "bool" | "date" | "datetime" | "handle" | "json" | "user" | "html" | "attachment" | "picklist" | "multiPicklist" | "uuid", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
51
51
  };
52
52
  ne: {
53
53
  <const A extends import("./calc/types.js").NumericLike, const B extends import("./calc/types.js").NumericLike>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
54
- <T extends "group" | "bool" | "date" | "datetime" | "handle" | "json" | "text" | "user" | "html" | "attachment" | "picklist" | "multiPicklist" | "uuid", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
54
+ <T extends "text" | "group" | "bool" | "date" | "datetime" | "handle" | "json" | "user" | "html" | "attachment" | "picklist" | "multiPicklist" | "uuid", const A extends import("./calc/types.js").ExprLike<T>, const B extends import("./calc/types.js").ExprLike<NoInfer<T>>>(a: A, b: B): import("./calc/types.js").ComposedExpr<"bool", [A, B]>;
55
55
  };
56
56
  and: <const A extends import("./calc/types.js").BoolLike, const B extends import("./calc/types.js").BoolLike, const Rest extends readonly import("./calc/types.js").BoolLike[]>(a: A, b: B, ...rest: Rest) => import("./calc/types.js").ComposedExpr<"bool", [A, B, ...Rest]>;
57
57
  or: <const A extends import("./calc/types.js").BoolLike, const B extends import("./calc/types.js").BoolLike, const Rest extends readonly import("./calc/types.js").BoolLike[]>(a: A, b: B, ...rest: Rest) => import("./calc/types.js").ComposedExpr<"bool", [A, B, ...Rest]>;
58
58
  if: {
59
59
  <const Condition extends import("./calc/types.js").BoolLike, const Then extends import("./calc/types.js").NumericLike, const Else extends import("./calc/types.js").NumericLike>(cond: Condition, thenArm: Then, elseArm: Else): import("./calc/types.js").ComposedExpr<import("./calc/types.js").NumericPromotion<Then, Else>, [Condition, Then, Else]>;
60
- <T extends "group" | "bool" | "date" | "datetime" | "handle" | "json" | "text" | "user" | "html" | "attachment" | "picklist" | "multiPicklist" | "uuid", const Condition extends import("./calc/types.js").BoolLike, const Then extends import("./calc/types.js").ExprLike<T>, const Else extends import("./calc/types.js").ExprLike<NoInfer<T>>>(cond: Condition, thenArm: Then, elseArm: Else): import("./calc/types.js").ComposedExpr<T, [Condition, Then, Else]>;
60
+ <T extends "text" | "group" | "bool" | "date" | "datetime" | "handle" | "json" | "user" | "html" | "attachment" | "picklist" | "multiPicklist" | "uuid", const Condition extends import("./calc/types.js").BoolLike, const Then extends import("./calc/types.js").ExprLike<T>, const Else extends import("./calc/types.js").ExprLike<NoInfer<T>>>(cond: Condition, thenArm: Then, elseArm: Else): import("./calc/types.js").ComposedExpr<T, [Condition, Then, Else]>;
61
61
  };
62
62
  ifs: <T extends ExprType, const Rest extends readonly unknown[]>(condition: import("./calc/types.js").BoolLike, value: import("./calc/types.js").ExprLike<T>, ...rest: Rest & (Rest extends readonly [] ? readonly [] : Rest extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, ...Rest_1 extends readonly [] ? readonly [] : Rest_1 extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, ...Rest_1 extends readonly [] ? readonly [] : Rest_1 extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, ...Rest_1 extends readonly [] ? readonly [] : Rest_1 extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, ...Rest_1 extends readonly [] ? readonly [] : Rest_1 extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, ...Rest_1 extends readonly [] ? readonly [] : Rest_1 extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, ...Rest_1 extends readonly [] ? readonly [] : Rest_1 extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, ...Rest_1 extends readonly [] ? readonly [] : Rest_1 extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, ...Rest_1 extends readonly [] ? readonly [] : Rest_1 extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, ...Rest_1 extends readonly [] ? readonly [] : Rest_1 extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, ...Rest_1 extends readonly [] ? readonly [] : Rest_1 extends readonly [infer Condition, infer Value, ...infer Rest_1] ? readonly [Condition & import("./calc/types.js").BoolLike, Value & import("./calc/types.js").ExprLike<NoInfer<T>>, .../*elided*/ any] : never] : never] : never] : never] : never] : never] : never] : never] : never] : never] : never)) => import("./calc/types.js").ComposedExpr<T, [typeof condition, typeof value, ...Rest]>;
63
63
  isBlank: <T extends ExprType, const Value extends import("./calc/types.js").ExprLike<T>>(value: Value) => import("./calc/types.js").ComposedExpr<"bool", [Value]>;
@@ -6,7 +6,7 @@
6
6
  * import blocks and stay data-side.
7
7
  */
8
8
  import { type FromTfContext } from "../../engine/pull/context.js";
9
- import { type ChildResourceScope, type TfBlock, type TfValue } from "../../engine/tf/index.js";
9
+ import { type FieldOwnerScope, type TfBlock, type TfValue } from "../../engine/tf/index.js";
10
10
  import type { NormalizedField } from "../app/deserializer/normalize.js";
11
11
  export interface FieldOwner {
12
12
  /** The owner's resource type ("elementum_app") — what `object_id` must reference. */
@@ -14,7 +14,7 @@ export interface FieldOwner {
14
14
  /** The owner's tfLabel (namespace). */
15
15
  readonly label: string;
16
16
  /** Scope for stripping child label prefixes (defaults to app). */
17
- readonly scope?: ChildResourceScope;
17
+ readonly scope?: FieldOwnerScope;
18
18
  /** The owner's catalog refName — the `appHandle` of same-owner field RefExprs. */
19
19
  readonly refName?: string;
20
20
  }
@@ -30,13 +30,13 @@ export declare function fieldFromTf(block: TfBlock, owner: FieldOwner, ctx: From
30
30
  * fields, view field_ids/columns). Undefined for any other shape or an
31
31
  * unknown resource type.
32
32
  */
33
- export declare function fieldKeyFromTfRef(v: TfValue, ownerTfLabel?: string, scope?: ChildResourceScope): string | undefined;
33
+ export declare function fieldKeyFromTfRef(v: TfValue, ownerTfLabel?: string, scope?: FieldOwnerScope): string | undefined;
34
34
  /**
35
35
  * Resolve either a normal Terraform field reference or a raw platform field
36
36
  * ID recovered from post-adoption state. The owner check prevents a UUID from
37
37
  * one app or element from becoming a same-owner field token accidentally.
38
38
  */
39
- export declare function fieldKeyFromTfValue(v: TfValue, ownerRefName: string, ownerTfLabel: string, scope: ChildResourceScope, ctx: FromTfContext): string | undefined;
39
+ export declare function fieldKeyFromTfValue(v: TfValue, ownerRefName: string, ownerTfLabel: string, scope: FieldOwnerScope, ctx: FromTfContext): string | undefined;
40
40
  export interface DecodedForeignDataField {
41
41
  readonly key: string;
42
42
  readonly name: string;