@elementumai/edk 0.12.0 → 0.13.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 +8 -2
- package/dist-sdk/src/catalog/factories.d.ts +7 -1
- package/dist-sdk/src/catalog/factories.js +10 -2
- package/dist-sdk/src/catalog/index.d.ts +2 -2
- package/dist-sdk/src/catalog/index.js +1 -1
- package/dist-sdk/src/catalog/org.js +79 -34
- package/dist-sdk/src/catalog/token.js +5 -0
- package/dist-sdk/src/catalog/types.d.ts +12 -1
- package/dist-sdk/src/catalog/types.js +3 -0
- package/dist-sdk/src/core/system-fields.d.ts +1 -1
- package/dist-sdk/src/core/system-fields.js +1 -1
- package/dist-sdk/src/core/types/app.d.ts +6 -0
- package/dist-sdk/src/engine/build/context.d.ts +3 -0
- package/dist-sdk/src/engine/coverage-gaps.d.ts +2 -0
- package/dist-sdk/src/engine/coverage-gaps.js +4 -0
- package/dist-sdk/src/engine/ei/run.d.ts +8 -0
- package/dist-sdk/src/engine/ei/run.js +46 -7
- package/dist-sdk/src/engine/pull/authored-address.js +42 -6
- package/dist-sdk/src/engine/pull/authored-root.d.ts +88 -0
- package/dist-sdk/src/engine/pull/authored-root.js +306 -0
- package/dist-sdk/src/engine/pull/context.d.ts +34 -0
- package/dist-sdk/src/engine/pull/field-refs-registry.d.ts +114 -0
- package/dist-sdk/src/engine/pull/field-refs-registry.js +501 -0
- package/dist-sdk/src/engine/pull/org.d.ts +1 -0
- package/dist-sdk/src/engine/pull/org.js +2 -0
- package/dist-sdk/src/engine/pull/partition.d.ts +8 -0
- package/dist-sdk/src/engine/pull/partition.js +43 -0
- package/dist-sdk/src/engine/pull/pulled-roots.d.ts +89 -0
- package/dist-sdk/src/engine/pull/pulled-roots.js +203 -0
- package/dist-sdk/src/engine/pull/ref-only.d.ts +4 -0
- package/dist-sdk/src/engine/pull/ref-only.js +7 -1
- package/dist-sdk/src/engine/pull/source-resources.d.ts +39 -0
- package/dist-sdk/src/engine/pull/source-resources.js +110 -0
- package/dist-sdk/src/engine/pull/stream-root.d.ts +159 -0
- package/dist-sdk/src/engine/pull/stream-root.js +579 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.js +16 -2
- package/dist-sdk/src/engine/workspace/reserved-catalog-keys.d.ts +47 -0
- package/dist-sdk/src/engine/workspace/reserved-catalog-keys.js +115 -0
- package/dist-sdk/src/entities/access-policy/build.d.ts +2 -1
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +7 -0
- package/dist-sdk/src/entities/access-policy/from-tf.js +17 -5
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +19 -0
- package/dist-sdk/src/entities/access-policy/to-tf.js +65 -8
- package/dist-sdk/src/entities/agent/build.d.ts +52 -1
- package/dist-sdk/src/entities/agent/build.js +34 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +70 -1
- package/dist-sdk/src/entities/agent/from-tf.d.ts +36 -1
- package/dist-sdk/src/entities/agent/from-tf.js +289 -2
- package/dist-sdk/src/entities/agent/index.d.ts +1 -1
- package/dist-sdk/src/entities/agent/module.js +1 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +11 -11
- package/dist-sdk/src/entities/agent/to-tf.js +179 -17
- package/dist-sdk/src/entities/agent-tool/from-tf.js +6 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +2 -2
- package/dist-sdk/src/entities/agent-tool/to-tf.js +2 -2
- package/dist-sdk/src/entities/app/build.d.ts +33 -13
- package/dist-sdk/src/entities/app/build.js +14 -12
- package/dist-sdk/src/entities/app/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/app/from-tf.js +7 -9
- package/dist-sdk/src/entities/app/index.d.ts +1 -0
- package/dist-sdk/src/entities/app/index.js +1 -0
- package/dist-sdk/src/entities/app/module.js +3 -0
- package/dist-sdk/src/entities/app/stage-keys.d.ts +2 -2
- package/dist-sdk/src/entities/app/stage-keys.js +3 -3
- package/dist-sdk/src/entities/app/to-tf.js +1 -0
- package/dist-sdk/src/entities/approval-chain/build.d.ts +46 -11
- package/dist-sdk/src/entities/approval-chain/build.js +120 -8
- package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +24 -2
- package/dist-sdk/src/entities/approval-chain/from-tf.js +148 -6
- package/dist-sdk/src/entities/approval-chain/index.d.ts +4 -1
- package/dist-sdk/src/entities/approval-chain/index.js +4 -1
- package/dist-sdk/src/entities/approval-chain/module.js +23 -5
- package/dist-sdk/src/entities/approval-chain/printer.d.ts +1 -1
- package/dist-sdk/src/entities/approval-chain/printer.js +91 -5
- package/dist-sdk/src/entities/approval-chain/steps-tf.d.ts +77 -0
- package/dist-sdk/src/entities/approval-chain/steps-tf.js +255 -0
- package/dist-sdk/src/entities/approval-chain/steps.d.ts +71 -0
- package/dist-sdk/src/entities/approval-chain/steps.js +83 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.d.ts +16 -6
- package/dist-sdk/src/entities/approval-chain/to-tf.js +37 -4
- package/dist-sdk/src/entities/automation/build.d.ts +10 -1
- package/dist-sdk/src/entities/automation/build.js +70 -27
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +21 -5
- package/dist-sdk/src/entities/automation/from-tf.d.ts +26 -5
- package/dist-sdk/src/entities/automation/from-tf.js +665 -112
- package/dist-sdk/src/entities/automation/index.d.ts +2 -1
- package/dist-sdk/src/entities/automation/index.js +1 -0
- package/dist-sdk/src/entities/automation/module.d.ts +4 -3
- package/dist-sdk/src/entities/automation/module.js +45 -12
- package/dist-sdk/src/entities/automation/refs-read.d.ts +19 -0
- package/dist-sdk/src/entities/automation/refs-read.js +48 -0
- package/dist-sdk/src/entities/automation/slack-message-refs.d.ts +9 -0
- package/dist-sdk/src/entities/automation/slack-message-refs.js +75 -0
- package/dist-sdk/src/entities/automation/system-ref-name.d.ts +23 -3
- package/dist-sdk/src/entities/automation/system-ref-name.js +86 -4
- package/dist-sdk/src/entities/automation/task-output-labels.d.ts +11 -0
- package/dist-sdk/src/entities/automation/task-output-labels.js +23 -0
- package/dist-sdk/src/entities/automation/tasks.d.ts +29 -4
- package/dist-sdk/src/entities/automation/tasks.js +34 -11
- package/dist-sdk/src/entities/automation/to-tf.d.ts +8 -1
- package/dist-sdk/src/entities/automation/to-tf.js +563 -103
- package/dist-sdk/src/entities/automation/triggers.d.ts +0 -8
- package/dist-sdk/src/entities/automation/triggers.js +26 -11
- package/dist-sdk/src/entities/automation/unsafe-script-output.d.ts +50 -0
- package/dist-sdk/src/entities/automation/unsafe-script-output.js +92 -0
- package/dist-sdk/src/entities/chart/build.d.ts +9 -1
- package/dist-sdk/src/entities/chart/from-tf.js +3 -0
- package/dist-sdk/src/entities/chart/to-tf.js +19 -2
- package/dist-sdk/src/entities/dashboard/from-tf.d.ts +3 -1
- package/dist-sdk/src/entities/dashboard/from-tf.js +42 -2
- package/dist-sdk/src/entities/dashboard/to-tf.js +9 -1
- package/dist-sdk/src/entities/dashboard-widget-order/module.d.ts +10 -0
- package/dist-sdk/src/entities/dashboard-widget-order/module.js +25 -0
- package/dist-sdk/src/entities/dashboard-widget-order/order.d.ts +31 -0
- package/dist-sdk/src/entities/dashboard-widget-order/order.js +102 -0
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +2 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +44 -5
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +46 -12
- package/dist-sdk/src/entities/element/audit-field-guard.d.ts +9 -0
- package/dist-sdk/src/entities/element/audit-field-guard.js +88 -0
- package/dist-sdk/src/entities/element/build.js +2 -1
- package/dist-sdk/src/entities/element/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/element/from-tf.js +4 -7
- package/dist-sdk/src/entities/element/module.js +5 -0
- package/dist-sdk/src/entities/element/system-fields.d.ts +13 -0
- package/dist-sdk/src/entities/element/system-fields.js +23 -0
- package/dist-sdk/src/entities/element/to-tf.js +1 -0
- package/dist-sdk/src/entities/field/build.d.ts +9 -0
- package/dist-sdk/src/entities/field/from-tf.d.ts +52 -1
- package/dist-sdk/src/entities/field/from-tf.js +212 -14
- package/dist-sdk/src/entities/field/module.js +4 -0
- package/dist-sdk/src/entities/field/to-tf.d.ts +5 -1
- package/dist-sdk/src/entities/field/to-tf.js +33 -12
- package/dist-sdk/src/entities/org/category.js +1 -0
- package/dist-sdk/src/entities/org/index.d.ts +1 -0
- package/dist-sdk/src/entities/org/index.js +1 -0
- package/dist-sdk/src/entities/org/voice-auth.d.ts +5 -0
- package/dist-sdk/src/entities/org/voice-auth.js +33 -0
- package/dist-sdk/src/entities/organization/build.d.ts +3 -0
- package/dist-sdk/src/entities/organization/build.js +2 -0
- package/dist-sdk/src/entities/organization/index.d.ts +1 -0
- package/dist-sdk/src/entities/organization/index.js +1 -0
- package/dist-sdk/src/entities/organization/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/organization/to-tf.js +59 -1
- package/dist-sdk/src/entities/organization/voice-auth.d.ts +60 -0
- package/dist-sdk/src/entities/organization/voice-auth.js +60 -0
- package/dist-sdk/src/entities/phone-service/build.d.ts +9 -1
- package/dist-sdk/src/entities/phone-service/build.js +1 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +3 -0
- package/dist-sdk/src/entities/phone-service/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/phone-service/from-tf.js +8 -1
- package/dist-sdk/src/entities/phone-service/to-tf.js +16 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.js +2 -2
- package/dist-sdk/src/entities/relationship/from-tf.js +9 -4
- package/dist-sdk/src/entities/relationship/module.js +2 -2
- package/dist-sdk/src/entities/relationship/pair-check.d.ts +6 -2
- package/dist-sdk/src/entities/relationship/pair-check.js +105 -18
- package/dist-sdk/src/entities/relationship/to-tf.js +5 -2
- package/dist-sdk/src/entities/role/build.d.ts +3 -4
- package/dist-sdk/src/entities/role/permission-levels.d.ts +7 -0
- package/dist-sdk/src/entities/role/permission-levels.js +78 -0
- package/dist-sdk/src/entities/role/to-tf.js +32 -2
- package/dist-sdk/src/entities/search-table/build.d.ts +9 -3
- package/dist-sdk/src/entities/search-table/build.js +4 -4
- package/dist-sdk/src/entities/search-table/printer.js +3 -1
- package/dist-sdk/src/entities/search-table/to-tf.js +20 -2
- package/dist-sdk/src/entities/service-account/module.d.ts +2 -1
- package/dist-sdk/src/entities/service-account/module.js +4 -1
- package/dist-sdk/src/entities/service-account/resource-type.d.ts +2 -0
- package/dist-sdk/src/entities/service-account/resource-type.js +2 -0
- package/dist-sdk/src/entities/service-account/role-membership-check.d.ts +20 -0
- package/dist-sdk/src/entities/service-account/role-membership-check.js +80 -0
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.d.ts +15 -0
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +36 -0
- package/dist-sdk/src/entities/shared/context.d.ts +14 -1
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +2 -0
- package/dist-sdk/src/entities/shared/filters/index.d.ts +97 -15
- package/dist-sdk/src/entities/shared/filters/index.js +30 -7
- package/dist-sdk/src/entities/shared/filters/option-lookups.d.ts +57 -0
- package/dist-sdk/src/entities/shared/filters/option-lookups.js +108 -0
- package/dist-sdk/src/entities/shared/filters/print.d.ts +2 -0
- package/dist-sdk/src/entities/shared/filters/print.js +19 -6
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +16 -7
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +25 -5
- package/dist-sdk/src/entities/shared/filters/types.d.ts +4 -0
- package/dist-sdk/src/entities/shared/raw-option-id.d.ts +30 -0
- package/dist-sdk/src/entities/shared/raw-option-id.js +41 -0
- package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +1 -1
- package/dist-sdk/src/entities/shared/tool-field-ref.js +3 -2
- package/dist-sdk/src/entities/skill/input-coverage.js +5 -2
- package/dist-sdk/src/entities/sla/build.d.ts +96 -0
- package/dist-sdk/src/entities/sla/build.js +124 -0
- package/dist-sdk/src/entities/sla/from-tf.d.ts +40 -0
- package/dist-sdk/src/entities/sla/from-tf.js +164 -0
- package/dist-sdk/src/entities/sla/index.d.ts +1 -0
- package/dist-sdk/src/entities/sla/index.js +1 -0
- package/dist-sdk/src/entities/sla/module.d.ts +4 -0
- package/dist-sdk/src/entities/sla/module.js +73 -0
- package/dist-sdk/src/entities/sla/printer.d.ts +2 -0
- package/dist-sdk/src/entities/sla/printer.js +84 -0
- package/dist-sdk/src/entities/sla/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/sla/to-tf.js +81 -0
- package/dist-sdk/src/entities/table/build.d.ts +7 -2
- package/dist-sdk/src/entities/table/build.js +22 -1
- package/dist-sdk/src/entities/table/deserializer/normalize.d.ts +4 -1
- package/dist-sdk/src/entities/table/from-tf.js +89 -14
- package/dist-sdk/src/entities/table/index.d.ts +1 -1
- package/dist-sdk/src/entities/table/to-tf.js +41 -2
- package/dist-sdk/src/entities/task/from-tf.js +3 -2
- package/dist-sdk/src/entities/view/custom-view-validate.d.ts +6 -4
- package/dist-sdk/src/entities/view/custom-view-validate.js +36 -18
- package/dist-sdk/src/entities/view/from-tf.js +16 -4
- package/dist-sdk/src/entities/view/to-tf.js +66 -47
- package/dist-sdk/src/entities/visual-flow/module.js +52 -1
- package/dist-sdk/src/entities/widget/from-tf.js +19 -8
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +49 -4
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
- package/dist-sdk/src/graph/index.d.ts +9 -0
- package/dist-sdk/src/graph/index.js +8 -0
- package/dist-sdk/src/graph/modules.js +13 -1
- package/dist-sdk/src/graph/resource-types.d.ts +47 -0
- package/dist-sdk/src/graph/resource-types.js +62 -0
- package/dist-sdk/src/graph/types.d.ts +113 -6
- package/package.json +7 -4
|
@@ -3,13 +3,28 @@ import { isExpr } from "../field/calc/runtime.js";
|
|
|
3
3
|
import { isRef } from "../shared/ref.js";
|
|
4
4
|
import { renderCalculationExpression, } from "./calculation-expression.js";
|
|
5
5
|
import { extractScriptBody, isScriptFile, readScriptFile, toPlatformScriptBody } from "./script-code.js";
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Where an undefined `fields[i].field` most likely came from, for the error.
|
|
8
|
+
* `catalog.<owner>.fields.someKey` evaluates to undefined when the key is not
|
|
9
|
+
* in the owner's fields bag: renamed or removed in source (#1579), or added
|
|
10
|
+
* in Elementum after the owner's source was last pulled, while the pulled
|
|
11
|
+
* automation already uses it (#2629). Build names the exact keys it can find
|
|
12
|
+
* in the file; this names the owner and the pull that refreshes it.
|
|
13
|
+
*/
|
|
14
|
+
function missingFieldHint(target) {
|
|
15
|
+
const owner = target;
|
|
16
|
+
if (owner?.refName === undefined)
|
|
17
|
+
return "Check the key against its app/element's fields bag.";
|
|
18
|
+
const kind = owner.__kind === "element" || owner.__kind === "task" ? owner.__kind : "app";
|
|
19
|
+
const label = `${kind} ${JSON.stringify(owner.name ?? owner.refName)}`;
|
|
20
|
+
return (`The key is not in the fields bag of ${label} (catalog.${owner.refName}.fields). ` +
|
|
21
|
+
`If the field was added or renamed in Elementum after that ${kind} was last pulled, run ` +
|
|
22
|
+
`\`elementum pull ${kind} ${owner.namespace ?? owner.refName}\`; if it was renamed or removed in source, use its current key.`);
|
|
23
|
+
}
|
|
24
|
+
function workflowFields(action, target, fields) {
|
|
7
25
|
return fields.map((f, index) => {
|
|
8
26
|
if (typeof f.field !== "object" || f.field === null) {
|
|
9
|
-
|
|
10
|
-
// bag (renamed or removed, e.g. by a re-pull, #1579).
|
|
11
|
-
throw new Error(`updateField: fields[${index}].field is ${String(f.field)}; the field key it reads does not exist on its app/element ` +
|
|
12
|
-
"(renamed or removed?). Check the app's fields bag for the current key.");
|
|
27
|
+
throw new Error(`${action}: fields[${index}].field is ${String(f.field)}: the field key it reads does not exist. ${missingFieldHint(target)}`);
|
|
13
28
|
}
|
|
14
29
|
const updateMode = "updateMode" in f ? f.updateMode : undefined;
|
|
15
30
|
const fieldType = "fieldType" in f.field ? f.field.fieldType : undefined;
|
|
@@ -60,7 +75,7 @@ export function createRecord(opts) {
|
|
|
60
75
|
key: "createRecord",
|
|
61
76
|
config: {
|
|
62
77
|
aspectId: opts.app,
|
|
63
|
-
workflowFields: workflowFields(opts.fields),
|
|
78
|
+
workflowFields: workflowFields("createRecord", opts.app, opts.fields),
|
|
64
79
|
relateToRecord: opts.relateToRecord ?? false,
|
|
65
80
|
...(opts.record !== undefined ? { recordReference: serializeValueOrRef(opts.record) } : {}),
|
|
66
81
|
},
|
|
@@ -77,7 +92,7 @@ export function updateField(opts) {
|
|
|
77
92
|
config: {
|
|
78
93
|
aspectId: opts.app,
|
|
79
94
|
recordReference: serializeValueOrRef(opts.record),
|
|
80
|
-
workflowFields: workflowFields(opts.fields),
|
|
95
|
+
workflowFields: workflowFields("updateField", opts.app, opts.fields),
|
|
81
96
|
},
|
|
82
97
|
__recordApp: opts.app.refName,
|
|
83
98
|
...recordKindOf(opts.app),
|
|
@@ -95,7 +110,7 @@ export function bulkUpdateFields(opts) {
|
|
|
95
110
|
config: {
|
|
96
111
|
aspectId: opts.app,
|
|
97
112
|
filter: opts.filter,
|
|
98
|
-
workflowFields: workflowFields(opts.fields),
|
|
113
|
+
workflowFields: workflowFields("bulkUpdateFields", opts.app, opts.fields),
|
|
99
114
|
},
|
|
100
115
|
__recordApp: opts.app.refName,
|
|
101
116
|
...recordKindOf(opts.app),
|
|
@@ -491,12 +506,16 @@ export function aiSummarize(opts) {
|
|
|
491
506
|
};
|
|
492
507
|
}
|
|
493
508
|
export function aiTransform(opts) {
|
|
509
|
+
if (opts.dimensions !== undefined && (!Number.isInteger(opts.dimensions) || opts.dimensions < 1)) {
|
|
510
|
+
throw new Error(`aiTransform dimensions must be a whole number ≥ 1 (got ${String(opts.dimensions)}).`);
|
|
511
|
+
}
|
|
494
512
|
return {
|
|
495
513
|
key: "aiTransform",
|
|
496
514
|
config: {
|
|
497
515
|
prompt: serializeValueOrRef(opts.prompt),
|
|
498
516
|
fieldType: opts.fieldType,
|
|
499
517
|
...connectorSlot(opts.connector),
|
|
518
|
+
...(opts.dimensions !== undefined ? { dimensions: opts.dimensions } : {}),
|
|
500
519
|
},
|
|
501
520
|
};
|
|
502
521
|
}
|
|
@@ -592,14 +611,16 @@ export function assignGroup(opts) {
|
|
|
592
611
|
return { key: "assignGroup", config: { fieldId: opts.field, groupId: opts.groupId } };
|
|
593
612
|
}
|
|
594
613
|
export function addWatcher(opts) {
|
|
595
|
-
if (!opts.userIds?.length && !opts.groupIds?.length) {
|
|
596
|
-
throw new Error("addWatcher requires at least one of: userIds or
|
|
614
|
+
if (!opts.userIds?.length && !opts.groupIds?.length && !opts.userRefs?.length && !opts.groupRefs?.length) {
|
|
615
|
+
throw new Error("addWatcher requires at least one of: userIds, groupIds, userRefs, or groupRefs.");
|
|
597
616
|
}
|
|
598
617
|
return {
|
|
599
618
|
key: "addWatcher",
|
|
600
619
|
config: {
|
|
601
620
|
...(opts.userIds?.length ? { userIds: opts.userIds } : {}),
|
|
602
621
|
...(opts.groupIds?.length ? { groupIds: opts.groupIds } : {}),
|
|
622
|
+
...(opts.userRefs?.length ? { users: refList(opts.userRefs) } : {}),
|
|
623
|
+
...(opts.groupRefs?.length ? { groups: refList(opts.groupRefs) } : {}),
|
|
603
624
|
...(opts.record !== undefined ? { recordReference: serializeValueOrRef(opts.record) } : {}),
|
|
604
625
|
},
|
|
605
626
|
};
|
|
@@ -846,7 +867,8 @@ export function approvalStatusUpdate(opts) {
|
|
|
846
867
|
return {
|
|
847
868
|
key: "approvalStatusUpdate",
|
|
848
869
|
config: {
|
|
849
|
-
approvalReference:
|
|
870
|
+
approvalReference: opts.approvalReference,
|
|
871
|
+
recordReference: serializeValueOrRef(opts.record),
|
|
850
872
|
status: opts.status,
|
|
851
873
|
...(opts.reason !== undefined ? { reason: serializeValueOrRef(opts.reason) } : {}),
|
|
852
874
|
},
|
|
@@ -915,6 +937,7 @@ export function approvalChain(opts) {
|
|
|
915
937
|
...(opts.approvers !== undefined ? { approverReferences: opts.approvers.map((a) => serializeValueOrRef(a)) } : {}),
|
|
916
938
|
...(opts.reason !== undefined ? { reason: serializeValueOrRef(opts.reason) } : {}),
|
|
917
939
|
...(opts.summary !== undefined ? { summary: serializeValueOrRef(opts.summary) } : {}),
|
|
940
|
+
...(opts.tag !== undefined ? { tags: serializeValueOrRef(opts.tag) } : {}),
|
|
918
941
|
},
|
|
919
942
|
};
|
|
920
943
|
}
|
|
@@ -2,8 +2,9 @@ import type { DeployableEntity } from "../../engine/entity.js";
|
|
|
2
2
|
import { type ValidationFailure } from "../../engine/validation.js";
|
|
3
3
|
import { type TfBlock, type TfValue } from "../../engine/tf/index.js";
|
|
4
4
|
import { type ForeignRootIdentity, type OrgRefLookup, type WorkspaceAspect } from "../../engine/build/context.js";
|
|
5
|
-
import type { BuildFieldMetadata } from "../../graph/types.js";
|
|
5
|
+
import type { AdvisoryWhileRecorded, BuildFieldMetadata } from "../../graph/types.js";
|
|
6
6
|
import type { AppServiceAccount } from "../service-account/build.js";
|
|
7
|
+
import type { OptionIdIndex } from "../../engine/pull/field-refs-registry.js";
|
|
7
8
|
export interface AutomationToTfContext {
|
|
8
9
|
/** The owning app or element's refName. */
|
|
9
10
|
readonly appRefName?: string;
|
|
@@ -33,6 +34,10 @@ export interface AutomationToTfContext {
|
|
|
33
34
|
* searched aspect's own `<resource>.<label>.id` to interpolate.
|
|
34
35
|
*/
|
|
35
36
|
readonly fieldAddressesByAppRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
37
|
+
/** Org catalog field types for every app/element it lists, keyed by refName and then field key. */
|
|
38
|
+
readonly catalogFieldTypesByAppRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
39
|
+
/** Whole-object findings, advisories only while the revision record lists them (#2283). */
|
|
40
|
+
readonly advisoriesWhileRecorded?: AdvisoryWhileRecorded[];
|
|
36
41
|
/**
|
|
37
42
|
* Every app/element authored in the workspace, keyed by
|
|
38
43
|
* `workspaceAspectKey`, including those this build leaves out (pull builds
|
|
@@ -42,6 +47,8 @@ export interface AutomationToTfContext {
|
|
|
42
47
|
readonly authoredAspectKeys?: ReadonlySet<string>;
|
|
43
48
|
/** Build-time tolerance for stale labels retained by pulled automations. */
|
|
44
49
|
readonly allowUnknownPicklistOptions?: boolean;
|
|
50
|
+
/** Option ids known offline, so a raw id's warning can name its label (#1733). */
|
|
51
|
+
readonly optionIds?: OptionIdIndex;
|
|
45
52
|
readonly orgRefs?: OrgRefLookup;
|
|
46
53
|
readonly diagnostics?: string[];
|
|
47
54
|
readonly serviceAccounts?: Readonly<Record<string, AppServiceAccount>>;
|