@elementumai/edk 0.9.18 → 0.9.20
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 +154 -9
- package/dist-sdk/src/catalog/factories.d.ts +35 -1
- package/dist-sdk/src/catalog/factories.js +36 -0
- 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/org.d.ts +39 -1
- package/dist-sdk/src/catalog/org.js +460 -50
- package/dist-sdk/src/catalog/render.js +6 -6
- package/dist-sdk/src/catalog/token.js +7 -0
- package/dist-sdk/src/catalog/types.d.ts +44 -1
- package/dist-sdk/src/catalog/types.js +13 -0
- package/dist-sdk/src/core/triggers/on-demand.d.ts +39 -3
- package/dist-sdk/src/core/triggers/on-demand.js +10 -2
- package/dist-sdk/src/engine/build/context.d.ts +1 -1
- package/dist-sdk/src/engine/ei/run.d.ts +149 -0
- package/dist-sdk/src/engine/ei/run.js +1132 -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/ref-only.d.ts +5 -0
- package/dist-sdk/src/engine/pull/ref-only.js +64 -27
- package/dist-sdk/src/engine/pull/result-output.d.ts +8 -0
- package/dist-sdk/src/engine/pull/result-output.js +88 -4
- package/dist-sdk/src/engine/tf/expr.js +39 -14
- package/dist-sdk/src/engine/tf/index.d.ts +3 -3
- package/dist-sdk/src/engine/tf/index.js +2 -2
- package/dist-sdk/src/engine/tf/labels.d.ts +8 -0
- package/dist-sdk/src/engine/tf/labels.js +13 -0
- package/dist-sdk/src/engine/tf/model.d.ts +22 -1
- package/dist-sdk/src/engine/tf/parse.d.ts +19 -0
- package/dist-sdk/src/engine/tf/parse.js +197 -10
- 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 +39 -0
- package/dist-sdk/src/engine/validation.js +85 -0
- package/dist-sdk/src/engine/workspace/loader.js +49 -12
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +11 -1
- package/dist-sdk/src/entities/access-policy/from-tf.js +6 -1
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +11 -0
- package/dist-sdk/src/entities/access-policy/to-tf.js +16 -6
- 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.js +4 -2
- package/dist-sdk/src/entities/agent/to-tf.js +6 -3
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +2 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.js +7 -1
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +2 -2
- package/dist-sdk/src/entities/agent-tool/to-tf.js +29 -6
- package/dist-sdk/src/entities/app/build.d.ts +98 -19
- package/dist-sdk/src/entities/app/build.js +51 -19
- 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 -5
- package/dist-sdk/src/entities/app/index.d.ts +6 -5
- package/dist-sdk/src/entities/app/index.js +2 -0
- package/dist-sdk/src/entities/app/module.js +18 -2
- package/dist-sdk/src/entities/app/to-tf.js +21 -11
- package/dist-sdk/src/entities/automation/build.d.ts +49 -6
- package/dist-sdk/src/entities/automation/build.js +163 -19
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +24 -1
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +320 -39
- package/dist-sdk/src/entities/automation/from-tf.d.ts +28 -6
- package/dist-sdk/src/entities/automation/from-tf.js +563 -74
- 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 +2 -0
- package/dist-sdk/src/entities/automation/module.js +93 -8
- 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 +17 -0
- package/dist-sdk/src/entities/automation/script-code.js +91 -5
- package/dist-sdk/src/entities/automation/system-ref-name.d.ts +16 -0
- package/dist-sdk/src/entities/automation/system-ref-name.js +48 -0
- package/dist-sdk/src/entities/automation/task-output-labels.d.ts +17 -0
- package/dist-sdk/src/entities/automation/task-output-labels.js +47 -0
- package/dist-sdk/src/entities/automation/tasks.d.ts +53 -4
- package/dist-sdk/src/entities/automation/tasks.js +38 -9
- package/dist-sdk/src/entities/automation/to-tf.d.ts +4 -0
- package/dist-sdk/src/entities/automation/to-tf.js +647 -167
- package/dist-sdk/src/entities/automation/triggers.d.ts +4 -2
- package/dist-sdk/src/entities/automation/triggers.js +4 -0
- package/dist-sdk/src/entities/automation/types.js +1 -0
- package/dist-sdk/src/entities/chart/from-tf.js +33 -17
- package/dist-sdk/src/entities/chart/module.js +3 -1
- package/dist-sdk/src/entities/chart/printer.d.ts +1 -0
- package/dist-sdk/src/entities/chart/printer.js +26 -16
- package/dist-sdk/src/entities/chart/rebind-owner.d.ts +3 -0
- package/dist-sdk/src/entities/chart/rebind-owner.js +42 -0
- package/dist-sdk/src/entities/chart/to-tf.js +21 -12
- package/dist-sdk/src/entities/dashboard/build.d.ts +4 -0
- package/dist-sdk/src/entities/dashboard/from-tf.js +15 -4
- package/dist-sdk/src/entities/dashboard/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/dashboard/to-tf.js +13 -0
- package/dist-sdk/src/entities/dashboard-widget/module.js +4 -0
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +72 -30
- package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +3 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.js +5 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +9 -6
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +188 -26
- package/dist-sdk/src/entities/dynamic-layout/module.js +4 -1
- package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +5 -1
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +254 -23
- package/dist-sdk/src/entities/element/build.d.ts +33 -13
- package/dist-sdk/src/entities/element/build.js +5 -1
- package/dist-sdk/src/entities/element/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/element/from-tf.js +64 -3
- package/dist-sdk/src/entities/element/index.d.ts +5 -2
- package/dist-sdk/src/entities/element/index.js +2 -0
- package/dist-sdk/src/entities/element/module.js +11 -3
- package/dist-sdk/src/entities/element/to-tf.js +20 -2
- package/dist-sdk/src/entities/field/build.d.ts +14 -1
- package/dist-sdk/src/entities/field/build.js +3 -0
- package/dist-sdk/src/entities/field/from-tf.d.ts +3 -0
- package/dist-sdk/src/entities/field/from-tf.js +50 -1
- 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 +1 -0
- package/dist-sdk/src/entities/field/to-tf.d.ts +23 -2
- package/dist-sdk/src/entities/field/to-tf.js +142 -22
- 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/from-tf.d.ts +8 -1
- package/dist-sdk/src/entities/relationship/from-tf.js +53 -10
- 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 +10 -0
- package/dist-sdk/src/entities/relationship/to-tf.js +31 -13
- 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 +17 -5
- 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/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 +15 -2
- package/dist-sdk/src/entities/shared/filters/index.d.ts +25 -2
- package/dist-sdk/src/entities/shared/filters/index.js +38 -5
- package/dist-sdk/src/entities/shared/filters/print.js +31 -3
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +25 -3
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +51 -15
- package/dist-sdk/src/entities/shared/filters/types.d.ts +22 -5
- package/dist-sdk/src/entities/shared/foreign-ref.d.ts +16 -0
- package/dist-sdk/src/entities/shared/foreign-ref.js +17 -1
- package/dist-sdk/src/entities/shared/tool-field-ref.js +6 -9
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +10 -5
- package/dist-sdk/src/entities/shared/types/field-types.js +4 -0
- package/dist-sdk/src/entities/skill/access-policy.d.ts +17 -0
- package/dist-sdk/src/entities/skill/access-policy.js +101 -0
- package/dist-sdk/src/entities/skill/build.d.ts +3 -0
- package/dist-sdk/src/entities/skill/build.js +3 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +4 -1
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +23 -1
- package/dist-sdk/src/entities/skill/from-tf.d.ts +2 -0
- package/dist-sdk/src/entities/skill/from-tf.js +70 -22
- package/dist-sdk/src/entities/skill/index.d.ts +2 -0
- package/dist-sdk/src/entities/skill/index.js +1 -0
- 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 +1 -0
- package/dist-sdk/src/entities/skill/to-tf.d.ts +2 -2
- package/dist-sdk/src/entities/skill/to-tf.js +19 -6
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +2 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.js +8 -2
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +2 -2
- package/dist-sdk/src/entities/skill-tool/to-tf.js +29 -6
- 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 +5 -5
- package/dist-sdk/src/entities/view/agent-view-layout-from-tf.d.ts +89 -0
- package/dist-sdk/src/entities/view/agent-view-layout-from-tf.js +277 -0
- package/dist-sdk/src/entities/view/agent-view-layout-to-tf.d.ts +51 -0
- package/dist-sdk/src/entities/view/agent-view-layout-to-tf.js +360 -0
- package/dist-sdk/src/entities/view/agent-view-layout.d.ts +151 -0
- package/dist-sdk/src/entities/view/agent-view-layout.js +21 -0
- package/dist-sdk/src/entities/view/from-tf.d.ts +6 -3
- package/dist-sdk/src/entities/view/from-tf.js +161 -14
- package/dist-sdk/src/entities/view/module.js +30 -3
- package/dist-sdk/src/entities/view/to-tf.d.ts +24 -2
- package/dist-sdk/src/entities/view/to-tf.js +95 -9
- package/dist-sdk/src/entities/view/types.d.ts +4 -15
- package/dist-sdk/src/entities/view/types.js +17 -15
- 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/to-tf.js +36 -10
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +38 -10
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
- package/dist-sdk/src/graph/index.d.ts +54 -0
- package/dist-sdk/src/graph/index.js +30 -0
- package/dist-sdk/src/graph/modules.js +2 -0
- package/dist-sdk/src/graph/types.d.ts +133 -2
- package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
- package/dist-sdk/src/internal/sdk-package.js +1 -0
- package/package.json +11 -1
|
@@ -15,10 +15,13 @@ import { tsLabelToTfLabel } from "../../engine/tf/index.js";
|
|
|
15
15
|
export const LAYOUT_RESOURCE_TYPE = "elementum_layout";
|
|
16
16
|
export const LIST_VIEW_RESOURCE_TYPE = "elementum_list_view";
|
|
17
17
|
export const AGENT_VIEW_RESOURCE_TYPE = "elementum_agent_view";
|
|
18
|
+
export const CUSTOM_VIEW_RESOURCE_TYPE = "elementum_custom_view";
|
|
18
19
|
export const CALENDAR_VIEW_RESOURCE_TYPE = "elementum_calendar_view";
|
|
19
20
|
export const KANBAN_VIEW_RESOURCE_TYPE = "elementum_kanban_view";
|
|
20
21
|
export const DASHBOARD_VIEW_RESOURCE_TYPE = "elementum_dashboard_view";
|
|
21
22
|
export const MANAGED_VIEW_ORDER_RESOURCE_TYPE = "elementum_managed_view_order";
|
|
23
|
+
/** Looks up a managed view by owner and name (a portal menu's view outside the workspace). */
|
|
24
|
+
export const VIEW_DATA_RESOURCE_TYPE = "elementum_view";
|
|
22
25
|
/**
|
|
23
26
|
* Layout section `type` discriminator: authoring camelCase ↔ the provider's
|
|
24
27
|
* wire value, verified against `provider/internal/provider/layout_resource.go`
|
|
@@ -42,21 +45,6 @@ export const SECTION_TYPE_FROM_WIRE = new Map(Object.entries(SECTION_TYPE_TO_WIR
|
|
|
42
45
|
export const GROUP_SECTION_WIRE_TYPE = "group";
|
|
43
46
|
/** The one other section type carrying an (optional) `name`. */
|
|
44
47
|
export const UPDATE_SECTION_WIRE_TYPE = "update";
|
|
45
|
-
/**
|
|
46
|
-
* System-field keys the platform refuses to accept in a layout `group`
|
|
47
|
-
* section's `field_ids` on create — confirmed live against `prestonhigh`:
|
|
48
|
-
* `elementum_layout` create errors "cannot place system fields in layout
|
|
49
|
-
* sections: ID (has HANDLE, TITLE, or STATUS tag), Title (...), Status
|
|
50
|
-
* (...)". The platform's OWN auto-provisioned default "System" section
|
|
51
|
-
* legitimately contains them (so `ei export`/`layoutFromTf` still capture
|
|
52
|
-
* them faithfully — this is a real, current fact about the app), but
|
|
53
|
-
* terraform can never re-create a section containing them: `to-tf` must
|
|
54
|
-
* drop these three specifically wherever a group section names them, or
|
|
55
|
-
* every layout recreate (any `sections` edit forces a full replace) fails.
|
|
56
|
-
* Audit fields (createdAt/createdBy/updatedAt/updatedBy/closedAt/closedBy)
|
|
57
|
-
* are NOT restricted — only HANDLE/TITLE/STATUS.
|
|
58
|
-
*/
|
|
59
|
-
export const LAYOUT_RESTRICTED_SYSTEM_FIELD_KEYS = new Set(["id", "title", "status"]);
|
|
60
48
|
/**
|
|
61
49
|
* System-field key → the `local.<ns>_<attr>` name `entities/app/locals.ts`
|
|
62
50
|
* emits for it (`SYSTEM_FIELD_ID_ATTRS`'s `<tfLabel>_field_id` shape there).
|
|
@@ -78,6 +66,7 @@ export const KNOWN_LAYOUT_SECTION_ATTRS = new Set([
|
|
|
78
66
|
"max_columns",
|
|
79
67
|
"field_ids",
|
|
80
68
|
"modules",
|
|
69
|
+
"agent_id",
|
|
81
70
|
]);
|
|
82
71
|
/** Attributes `listViewFromTf` understands. */
|
|
83
72
|
export const KNOWN_LIST_VIEW_ATTRS = new Set([
|
|
@@ -102,6 +91,19 @@ export const KNOWN_AGENT_VIEW_ATTRS = new Set([
|
|
|
102
91
|
"user_ids",
|
|
103
92
|
"group_ids",
|
|
104
93
|
"display_order",
|
|
94
|
+
"layout",
|
|
95
|
+
]);
|
|
96
|
+
export const KNOWN_CUSTOM_VIEW_ATTRS = new Set([
|
|
97
|
+
"aspect_id",
|
|
98
|
+
"agent_id",
|
|
99
|
+
"name",
|
|
100
|
+
"allow_record_creation",
|
|
101
|
+
"filter",
|
|
102
|
+
"sort",
|
|
103
|
+
"user_ids",
|
|
104
|
+
"group_ids",
|
|
105
|
+
"display_order",
|
|
106
|
+
"layout",
|
|
105
107
|
]);
|
|
106
108
|
const COMMON_TYPED_VIEW_ATTRS = [
|
|
107
109
|
"aspect_id",
|
|
@@ -65,6 +65,18 @@ export interface CreateRecordWidget extends WidgetButtonStyle {
|
|
|
65
65
|
readonly name: string;
|
|
66
66
|
readonly target: AppOrElementRef;
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Values the platform resolves when the button is pressed:
|
|
70
|
+
* - `currentRecord` binds an `ASPECT_RECORD` (`type: "record"`) parameter to
|
|
71
|
+
* the record the button is on.
|
|
72
|
+
* - `triggeredByUser` binds a `USER_ID` (`type: "userId"`) parameter to the
|
|
73
|
+
* user who pressed the button.
|
|
74
|
+
*/
|
|
75
|
+
export declare const runAutomationParameterValue: {
|
|
76
|
+
readonly currentRecord: "CURRENT_RECORD";
|
|
77
|
+
readonly triggeredByUser: "TRIGGERED_BY_USER";
|
|
78
|
+
};
|
|
79
|
+
export type RunAutomationParameterValue = (typeof runAutomationParameterValue)[keyof typeof runAutomationParameterValue];
|
|
68
80
|
interface RunAutomationWidgetParameterBase {
|
|
69
81
|
readonly name: string;
|
|
70
82
|
readonly fieldType: WorkflowFieldType;
|
|
@@ -76,7 +88,10 @@ export type RunAutomationWidgetParameter = RunAutomationWidgetParameterBase & ({
|
|
|
76
88
|
readonly field: FieldRef;
|
|
77
89
|
readonly value?: never;
|
|
78
90
|
} | {
|
|
79
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Static value; supports the provider's `{{field-id}}` interpolation syntax,
|
|
93
|
+
* or a {@link runAutomationParameterValue} resolved at click time.
|
|
94
|
+
*/
|
|
80
95
|
readonly field?: never;
|
|
81
96
|
readonly value: string;
|
|
82
97
|
});
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Values the platform resolves when the button is pressed:
|
|
3
|
+
* - `currentRecord` binds an `ASPECT_RECORD` (`type: "record"`) parameter to
|
|
4
|
+
* the record the button is on.
|
|
5
|
+
* - `triggeredByUser` binds a `USER_ID` (`type: "userId"`) parameter to the
|
|
6
|
+
* user who pressed the button.
|
|
7
|
+
*/
|
|
8
|
+
export const runAutomationParameterValue = {
|
|
9
|
+
currentRecord: "CURRENT_RECORD",
|
|
10
|
+
triggeredByUser: "TRIGGERED_BY_USER",
|
|
11
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { workspaceAspectKey } from "../../engine/build/context.js";
|
|
2
|
-
import { resolveForeignRef } from "../shared/foreign-ref.js";
|
|
2
|
+
import { foreignFieldDataLabel, resolveForeignRef } from "../shared/foreign-ref.js";
|
|
3
3
|
import { appScopedResourceLabel, expr, isCanonicalTsLabel, sanitizeName, scopedResourceLabel, tfLabelToTsLabel, tsLabelToTfLabel, } from "../../engine/tf/index.js";
|
|
4
4
|
import { AUTOMATION_RESOURCE_TYPE } from "../automation/types.js";
|
|
5
5
|
import { fieldMetadataFromEntries } from "../field/metadata.js";
|
|
6
|
-
import { fieldRefToTfValue } from "../field/to-tf.js";
|
|
6
|
+
import { authoredFieldKeysFromPayload, fieldRefToTfValue, } from "../field/to-tf.js";
|
|
7
|
+
import { runAutomationParameterValue } from "./build.js";
|
|
7
8
|
import { WIDGET_RESOURCE_TYPE } from "./module.js";
|
|
8
9
|
import { filterToTf } from "../access-policy/to-tf.js";
|
|
9
10
|
export function relationshipTargetsFromBag(relationships) {
|
|
@@ -57,6 +58,7 @@ export function widgetsToTf(widgets, opts) {
|
|
|
57
58
|
objectId: opts.objectId,
|
|
58
59
|
diagnostics: opts.diagnostics,
|
|
59
60
|
orgRefs: opts.orgRefs,
|
|
61
|
+
fieldAddresses: opts.fieldAddresses,
|
|
60
62
|
});
|
|
61
63
|
attrs["related_link_action"] = body;
|
|
62
64
|
break;
|
|
@@ -132,7 +134,15 @@ function resolveAspect(value, where, opts) {
|
|
|
132
134
|
const kind = value?.__kind === "element" ? "element" : "app";
|
|
133
135
|
const refName = value?.refName ?? "";
|
|
134
136
|
if (kind === opts.scope && refName === opts.ownerRefName) {
|
|
135
|
-
return {
|
|
137
|
+
return {
|
|
138
|
+
value: opts.objectId,
|
|
139
|
+
kind,
|
|
140
|
+
refName,
|
|
141
|
+
tfLabel: opts.ownerTfLabel,
|
|
142
|
+
name: value?.name ?? refName,
|
|
143
|
+
managed: true,
|
|
144
|
+
fieldOwnership: opts.fieldAddresses,
|
|
145
|
+
};
|
|
136
146
|
}
|
|
137
147
|
const sibling = opts.workspaceAspects?.get(workspaceAspectKey(kind, refName));
|
|
138
148
|
if (sibling !== undefined) {
|
|
@@ -140,7 +150,15 @@ function resolveAspect(value, where, opts) {
|
|
|
140
150
|
const payloadName = typeof sibling.streamRootEntity?.payload === "object" && sibling.streamRootEntity.payload !== null
|
|
141
151
|
? sibling.streamRootEntity.payload.name
|
|
142
152
|
: undefined;
|
|
143
|
-
return {
|
|
153
|
+
return {
|
|
154
|
+
value: expr.resourceAttr(type, sibling.tfLabel, ["id"]),
|
|
155
|
+
kind,
|
|
156
|
+
refName,
|
|
157
|
+
tfLabel: sibling.tfLabel,
|
|
158
|
+
name: value?.name ?? payloadName,
|
|
159
|
+
managed: true,
|
|
160
|
+
fieldOwnership: authoredFieldKeysFromPayload(sibling.streamRootEntity?.payload),
|
|
161
|
+
};
|
|
144
162
|
}
|
|
145
163
|
const name = value?.name ?? refName;
|
|
146
164
|
if (name === "") {
|
|
@@ -166,7 +184,7 @@ function resolveAspect(value, where, opts) {
|
|
|
166
184
|
function resolveManagedSystemColumn(key, target) {
|
|
167
185
|
if (!target.managed || target.tfLabel === undefined || target.kind === undefined)
|
|
168
186
|
return undefined;
|
|
169
|
-
return fieldRefToTfValue("HANDLE", key, target.tfLabel, target.kind);
|
|
187
|
+
return fieldRefToTfValue("HANDLE", key, target.tfLabel, target.kind, target.fieldOwnership);
|
|
170
188
|
}
|
|
171
189
|
function resolveColumns(columns, target, where, opts) {
|
|
172
190
|
const out = [];
|
|
@@ -217,14 +235,14 @@ function resolveColumns(columns, target, where, opts) {
|
|
|
217
235
|
}
|
|
218
236
|
if (target.managed && target.kind !== undefined && target.tfLabel !== undefined) {
|
|
219
237
|
const column = resolveManagedColumn(value, refName, target, opts);
|
|
220
|
-
const direct = fieldRefToTfValue(column.fieldType, column.refName, target.tfLabel, target.kind);
|
|
238
|
+
const direct = fieldRefToTfValue(column.fieldType, column.refName, target.tfLabel, target.kind, target.fieldOwnership);
|
|
221
239
|
if (direct !== undefined) {
|
|
222
240
|
out.push(direct);
|
|
223
241
|
continue;
|
|
224
242
|
}
|
|
225
243
|
}
|
|
226
244
|
if (target.kind !== undefined) {
|
|
227
|
-
const label =
|
|
245
|
+
const label = foreignFieldDataLabel(target.kind, target.tfLabel ?? target.refName ?? "target", value.name ?? refName);
|
|
228
246
|
opts.orgRefs.foreignField("elementum_field", label, target.value, value.name ?? refName);
|
|
229
247
|
out.push(expr.dataAttr("elementum_field", label, ["id"]));
|
|
230
248
|
continue;
|
|
@@ -239,13 +257,21 @@ function runAutomationParameters(widget, where, opts) {
|
|
|
239
257
|
if (fieldId !== undefined && parameter.value !== undefined) {
|
|
240
258
|
opts.diagnostics.push(`${where}.parameters[${index}]: field and value are mutually exclusive; value dropped`);
|
|
241
259
|
}
|
|
260
|
+
const fieldType = parameter.fieldType ?? "TEXT";
|
|
261
|
+
let value = fieldId === undefined ? parameter.value ?? null : null;
|
|
262
|
+
if (value === runAutomationParameterValue.triggeredByUser && fieldType !== "USER_ID") {
|
|
263
|
+
opts.diagnostics.push(`${where}.parameters[${index}]: TRIGGERED_BY_USER binds a USER_ID parameter; ` +
|
|
264
|
+
`${JSON.stringify(parameter.name ?? "")} is ${fieldType}. Declare the on-demand input as type "userId" ` +
|
|
265
|
+
`and set fieldType "USER_ID"; value dropped`);
|
|
266
|
+
value = null;
|
|
267
|
+
}
|
|
242
268
|
return {
|
|
243
269
|
name: parameter.name ?? "",
|
|
244
|
-
field_type:
|
|
270
|
+
field_type: fieldType,
|
|
245
271
|
multiple: parameter.multiple ?? false,
|
|
246
272
|
required: parameter.required ?? false,
|
|
247
273
|
field_id: fieldId ?? null,
|
|
248
|
-
value
|
|
274
|
+
value,
|
|
249
275
|
};
|
|
250
276
|
});
|
|
251
277
|
const recordParam = onDemandRecordParamForWidget(widget.automation, opts);
|
|
@@ -260,7 +286,7 @@ function runAutomationParameters(widget, where, opts) {
|
|
|
260
286
|
multiple: false,
|
|
261
287
|
required: false,
|
|
262
288
|
field_id: null,
|
|
263
|
-
value:
|
|
289
|
+
value: runAutomationParameterValue.currentRecord,
|
|
264
290
|
},
|
|
265
291
|
];
|
|
266
292
|
}
|
|
@@ -492,7 +492,7 @@ export type ActionCardItem = {
|
|
|
492
492
|
/**
|
|
493
493
|
* Customer-facing name: Chart
|
|
494
494
|
* Customer-facing description: A bar, line, or donut chart in a card. Use it to compare values or show a trend.
|
|
495
|
-
* Internal authoring guidance: Plot-only report chart in a card with optional title, metric, and caption, branded primary default palette, and no download. Use live grouped count fetch (aspectId + stable groupByFieldId) for useful bar, line, or donut category charts; bar and line share the same grouped dataset. Grouped count supports uncalculated single-value picklist/text fields plus filterJson/filterPreset and named quickFilterValue, ANDed with the block filter. Bind filterJson and use the same filterPreset as ListControls when the chart shares the view filter; omit that binding and give the chart its own filterPreset/filterJson when it should measure a different slice. Use scalar fetch (aggregation + aspectId, optional fieldId/filterJson/filterPreset/quickFilterValue) only for one observation; prefer MetricsRowBlock for a single KPI and never present one scalar line point as a trend. Nonempty filterJson wins; a preset is only a seed. Never mix fetch and embedded data. Use embedded data for preview or when the agent already owns the complete dataset. Grouped numeric sum/avg/min/max is not supported by this count-shaped API. Pair charts with DataTableBlock/ListCollectionBlock and MetricsRowBlock to build dashboards.
|
|
495
|
+
* Internal authoring guidance: Plot-only report chart in a card with optional title, metric, and caption, branded primary default palette, and no download. Use live grouped count fetch (aspectId + stable groupByFieldId) for useful bar, line, or donut category charts; bar and line share the same grouped dataset. Grouped count supports uncalculated single-value picklist/text fields plus filterJson/filterPreset and named quickFilterValue, ANDed with the block filter. Bind filterJson and use the same filterPreset as ListControls when the chart shares the view filter; omit that binding and give the chart its own filterPreset/filterJson when it should measure a different slice. Use date series (aspectId + stable dateFieldId, saved bucket day/week/month, and either an exact YYYY-MM-DD/YYYY-MM-DD range or relativeRange) for a bar or line trend. Exact range is a BETWEEN on that date field. relativeRange is { count, unit, optional offset } with unit day, week, month, quarter, or year. The runtime resolves it to an inclusive local-calendar BETWEEN that moves with today. Omit offset to include the current unfinished unit; offset 1 is the previous complete unit or units. Quarter and year have no series granularity, so set bucket to month unless a day or week bucket is intended. Set only one window. Write the window in the Spec. The builder has no range control. Plot the returned points in order, including zeros the API already filled. A blank window draws the empty plot. There is no runtime bucket switch. Use scalar fetch (aggregation + aspectId, optional fieldId/filterJson/filterPreset/quickFilterValue) only for one observation; prefer MetricsRowBlock for a single KPI and never present one scalar line point as a trend. Nonempty filterJson wins; a preset is only a seed. Never mix fetch and embedded data. Use embedded data for preview or when the agent already owns the complete dataset. Grouped numeric sum/avg/min/max is not supported by this count-shaped API. Pair charts with DataTableBlock/ListCollectionBlock and MetricsRowBlock to build dashboards.
|
|
496
496
|
*/
|
|
497
497
|
export type ChartBlockElement = {
|
|
498
498
|
readonly type: "ChartBlock";
|
|
@@ -504,7 +504,7 @@ export type ChartBlockElement = {
|
|
|
504
504
|
readonly watch?: ElementWatch;
|
|
505
505
|
readonly validation?: ElementValidation;
|
|
506
506
|
};
|
|
507
|
-
export type ChartBlockProps = (ChartBlockPresentationalProps) | (ChartBlockFetchProps) | (ChartBlockGroupedFetchProps);
|
|
507
|
+
export type ChartBlockProps = (ChartBlockPresentationalProps) | (ChartBlockFetchProps) | (ChartBlockGroupedFetchProps) | (ChartBlockDateSeriesProps);
|
|
508
508
|
export type ChartBlockPresentationalProps = {
|
|
509
509
|
readonly variant: ("bar" | "line" | "donut") | (PropExpression);
|
|
510
510
|
readonly height?: ("sm" | "md" | "lg") | (PropExpression);
|
|
@@ -550,6 +550,29 @@ export type ChartBlockGroupedFetchProps = {
|
|
|
550
550
|
readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
|
|
551
551
|
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
552
552
|
};
|
|
553
|
+
export type ChartBlockDateSeriesProps = {
|
|
554
|
+
readonly variant: ("bar" | "line") | (PropExpression);
|
|
555
|
+
readonly height?: ("sm" | "md" | "lg") | (PropExpression);
|
|
556
|
+
readonly colorStyle?: ("gradient" | "flat") | (PropExpression);
|
|
557
|
+
readonly title?: (string) | (PropExpression);
|
|
558
|
+
readonly metric?: (string) | (PropExpression);
|
|
559
|
+
readonly caption?: (string) | (PropExpression);
|
|
560
|
+
readonly aspectId: (string) | (PropExpression);
|
|
561
|
+
readonly dateFieldId: (string) | (PropExpression);
|
|
562
|
+
readonly bucket?: ("day" | "week" | "month") | (PropExpression);
|
|
563
|
+
readonly range?: (string) | (PropExpression);
|
|
564
|
+
readonly relativeRange?: (ChartBlockRelativeRange) | (PropExpression);
|
|
565
|
+
readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
|
|
566
|
+
readonly [key: string]: OpaqueJson;
|
|
567
|
+
}))) | (PropExpression)) | (null);
|
|
568
|
+
readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
|
|
569
|
+
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
570
|
+
};
|
|
571
|
+
export type ChartBlockRelativeRange = {
|
|
572
|
+
readonly count: (number) | (PropExpression);
|
|
573
|
+
readonly unit: ("day" | "week" | "month" | "quarter" | "year") | (PropExpression);
|
|
574
|
+
readonly offset?: (number) | (PropExpression);
|
|
575
|
+
};
|
|
553
576
|
/**
|
|
554
577
|
* Customer-facing name: Metrics
|
|
555
578
|
* Customer-facing description: A single KPI tile with a caption and prominent value.
|
|
@@ -614,7 +637,7 @@ export type MetricsRowSelfFetchProps = {
|
|
|
614
637
|
/**
|
|
615
638
|
* Customer-facing name: Page header
|
|
616
639
|
* Customer-facing description: A compact heading with a short description and actions at the top of a page.
|
|
617
|
-
* Internal authoring guidance: Compact page-level heading with supporting description, icon badge, and primary or outline actions. Best used once at the top of a page or managed view as a child of a StackBlock. Give an action an href to navigate (absolute https:// opens a new tab, "/path" navigates inside Elementum); omit href to make it a press action that writes selectedActionId and emits actionPress. Use DataTableBlock or ListCollectionBlock for collection content and HeaderBlock or BodyBlock for headings inside a detail section.
|
|
640
|
+
* Internal authoring guidance: Compact page-level heading with supporting description, icon badge, and primary or outline actions. Best used once at the top of a page or managed view as a child of a StackBlock. Give an action an href to navigate (absolute https:// opens a new tab, "/path" navigates inside Elementum); omit href to make it a press action that writes selectedActionId and emits actionPress. Handle actionPress with any host action the view supports, such as createRecord or triggerAutomation. Use DataTableBlock or ListCollectionBlock for collection content and HeaderBlock or BodyBlock for headings inside a detail section.
|
|
618
641
|
*/
|
|
619
642
|
export type PageHeaderBlockElement = {
|
|
620
643
|
readonly type: "PageHeaderBlock";
|
|
@@ -646,7 +669,7 @@ export type PageHeaderAction = {
|
|
|
646
669
|
/**
|
|
647
670
|
* Customer-facing name: Buttons
|
|
648
671
|
* Customer-facing description: A row of buttons that link to pages or run actions.
|
|
649
|
-
* Internal authoring guidance: A responsive row of buttons. Each item is a link (href, optional viewId), an action (onPress), or a static button (neither); never set both href and onPress. Omitted emphasis defaults to primary for onPress buttons and secondary for links. Set it explicitly for tertiary alternates or destructive actions. A createRecord onPress opens the host create-record dialog for that App;
|
|
672
|
+
* Internal authoring guidance: A responsive row of buttons. Each item is a link (href, optional viewId), an action (onPress), or a static button (neither); never set both href and onPress. Omitted emphasis defaults to primary for onPress buttons and secondary for links. Set it explicitly for tertiary alternates or destructive actions. A createRecord onPress opens the host create-record dialog for that App. A triggerAutomation onPress runs one on-demand automation from a literal automationId. Prefer recordId { "$state": "/selection/recordId" } for the selected row; a literal recordId must be {aspectUuid}:{handle}, never a handle alone or a fake prefix. Omit recordId to let the user pick. copy goes inside params, never beside action. Shape: params: { automationId, recordId?, copy?: { confirm?, pending?, success?, failure? } }. Omit copy to use the defaults Save / Saving… / Saved / Save failed. Do not invent these strings. Host actions such as createRecord and triggerAutomation also work on PageHeaderBlock via actionPress. The row stacks in narrow panes. Use PageHeaderBlock actions for page-level heading buttons.
|
|
650
673
|
*/
|
|
651
674
|
export type ButtonBlockElement = {
|
|
652
675
|
readonly type: "ButtonBlock";
|
|
@@ -681,11 +704,11 @@ export type ButtonBlockLinkItem = {
|
|
|
681
704
|
readonly icon?: string;
|
|
682
705
|
readonly disabled?: boolean;
|
|
683
706
|
/**
|
|
684
|
-
* Navigation target. Absolute http(s) URL or root-relative /path.
|
|
707
|
+
* Navigation target. Absolute http(s) URL or root-relative /path. For managed views and portal pages, use the href a tool returned verbatim; never build route segments.
|
|
685
708
|
*/
|
|
686
709
|
readonly href: string;
|
|
687
710
|
/**
|
|
688
|
-
* Managed view id this href targets; saved as an AspectView dependency.
|
|
711
|
+
* Managed view id this href targets (from the same tool result as href); saved as an AspectView dependency.
|
|
689
712
|
*/
|
|
690
713
|
readonly viewId?: string;
|
|
691
714
|
};
|
|
@@ -708,11 +731,18 @@ export type ButtonBlockActionItem = {
|
|
|
708
731
|
readonly icon?: string;
|
|
709
732
|
readonly disabled?: boolean;
|
|
710
733
|
/**
|
|
711
|
-
* Non-navigation action, such as createRecord with an aspectId parameter.
|
|
734
|
+
* Non-navigation action, such as createRecord with an aspectId parameter or triggerAutomation with an automationId, optional recordId ({aspectUuid}:{handle}, or omit to pick), and optional copy inside params (never beside action): copy?: { confirm?, pending?, success?, failure? }. Omit copy for Save / Saving… / Saved / Save failed. Do not set href on the same item.
|
|
712
735
|
*/
|
|
713
736
|
readonly onPress: {
|
|
714
737
|
readonly action: string;
|
|
715
738
|
readonly params?: {
|
|
739
|
+
readonly copy?: {
|
|
740
|
+
readonly confirm?: string;
|
|
741
|
+
readonly pending?: string;
|
|
742
|
+
readonly success?: string;
|
|
743
|
+
readonly failure?: string;
|
|
744
|
+
};
|
|
745
|
+
} & {
|
|
716
746
|
readonly [key: string]: (string) | (number) | (boolean) | (null) | ({
|
|
717
747
|
readonly $state: string;
|
|
718
748
|
} & {
|
|
@@ -769,8 +799,6 @@ export type ButtonBlockActionItem = {
|
|
|
769
799
|
readonly [key: string]: unknown;
|
|
770
800
|
});
|
|
771
801
|
readonly preventDefault?: boolean;
|
|
772
|
-
} & {
|
|
773
|
-
readonly [key: string]: unknown;
|
|
774
802
|
};
|
|
775
803
|
};
|
|
776
804
|
export type ButtonBlockStaticItem = {
|
|
@@ -792,7 +820,7 @@ export type ButtonBlockStaticItem = {
|
|
|
792
820
|
readonly icon?: string;
|
|
793
821
|
readonly disabled?: boolean;
|
|
794
822
|
/**
|
|
795
|
-
* Managed view id this href targets; saved as an AspectView dependency.
|
|
823
|
+
* Managed view id this href targets (from the same tool result as href); saved as an AspectView dependency.
|
|
796
824
|
*/
|
|
797
825
|
readonly viewId?: string;
|
|
798
826
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by `npm run generate:ragnarok` — do not edit. Refresh with `npm run refresh:ragnarok`.
|
|
2
|
-
// Source: urn:elementum:elementum-blocks:spec:v1 version 1.
|
|
3
|
-
// Schema sha256:
|
|
2
|
+
// Source: urn:elementum:elementum-blocks:spec:v1 version 1.34.0
|
|
3
|
+
// Schema sha256: b03a0f70e1dab852a792f92f5d684997f290cc364d5f1049d12bd9eb78647f57
|
|
4
4
|
// Generator revision: 2
|
|
5
5
|
export {};
|
|
@@ -51,6 +51,49 @@ export declare const BUILD_VS_EXPORT_RESOLVED_DATA_REFERENCE_EQUIVALENCES: {
|
|
|
51
51
|
dataType: string;
|
|
52
52
|
blockType: string;
|
|
53
53
|
}[];
|
|
54
|
+
export declare const BUILD_VS_EXPORT_KEYED_LOCAL_ALIASES: {
|
|
55
|
+
listAttribute: string;
|
|
56
|
+
keyAttribute: string;
|
|
57
|
+
nameAttribute: string;
|
|
58
|
+
byNameSuffix: string;
|
|
59
|
+
byKeySuffix: string;
|
|
60
|
+
blockType: string;
|
|
61
|
+
}[];
|
|
62
|
+
export declare const BUILD_VS_EXPORT_MANAGED_LOOKUP_ATTRIBUTES: {
|
|
63
|
+
readonly lookupType: string;
|
|
64
|
+
readonly attribute: string;
|
|
65
|
+
readonly ownerType: string;
|
|
66
|
+
readonly ownerReference: string;
|
|
67
|
+
}[];
|
|
68
|
+
export declare const BUILD_VS_EXPORT_COMPUTED_MAP_ATTRIBUTES: {
|
|
69
|
+
attribute: string;
|
|
70
|
+
listAttribute: string;
|
|
71
|
+
keyAttribute: string;
|
|
72
|
+
valueAttribute: string;
|
|
73
|
+
blockType: string;
|
|
74
|
+
}[];
|
|
75
|
+
export declare const BUILD_VS_EXPORT_NESTED_OMITTED_DEFAULTS: {
|
|
76
|
+
attribute: string;
|
|
77
|
+
defaults: Readonly<Record<string, import("../engine/tf/model.js").TfValue>>;
|
|
78
|
+
blockType: string;
|
|
79
|
+
}[];
|
|
80
|
+
export declare const BUILD_VS_EXPORT_COMPUTED_REFERENCE_MAPS: {
|
|
81
|
+
readonly resourceType: string;
|
|
82
|
+
readonly attribute: string;
|
|
83
|
+
readonly listAttribute: string;
|
|
84
|
+
readonly nameAttribute: string;
|
|
85
|
+
readonly value: (name: string) => string;
|
|
86
|
+
}[];
|
|
87
|
+
export declare const BUILD_VS_EXPORT_RECORD_FIELD_OUTPUT_KEYS: {
|
|
88
|
+
readonly nameAttribute: string;
|
|
89
|
+
readonly ownerAttribute: string;
|
|
90
|
+
}[];
|
|
91
|
+
export declare const BUILD_VS_EXPORT_ATTRIBUTE_LOCALS: {
|
|
92
|
+
readonly resourceType: string;
|
|
93
|
+
readonly attribute: string;
|
|
94
|
+
readonly localPrefix: string;
|
|
95
|
+
}[];
|
|
96
|
+
export declare const BUILD_VS_EXPORT_TASK_OUTPUT_REFERENCE_NAMES: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
54
97
|
/** Kind id → module. */
|
|
55
98
|
export declare const KIND_BY_ID: ReadonlyMap<KindId, EntityKindModule>;
|
|
56
99
|
/** @deprecated Use {@link KIND_BY_ID}. */
|
|
@@ -80,6 +123,16 @@ export declare const STREAM_ROOT_RESOURCE_TYPES: ReadonlySet<string>;
|
|
|
80
123
|
* entities/ directly.
|
|
81
124
|
*/
|
|
82
125
|
export declare const AUTHORING_TYPE_BY_RESOURCE_TYPE: ReadonlyMap<string, string>;
|
|
126
|
+
/**
|
|
127
|
+
* Resource type → attributes the platform never returns on read, as each kind
|
|
128
|
+
* declares them on its resource facet. A re-pull fills these from state.
|
|
129
|
+
*/
|
|
130
|
+
export declare const UNREADABLE_ATTRIBUTES_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly string[]>;
|
|
131
|
+
/**
|
|
132
|
+
* Resource type → map attributes the provider manages per key, as each
|
|
133
|
+
* single-resource kind declares them. A re-pull keeps only the keys in state.
|
|
134
|
+
*/
|
|
135
|
+
export declare const STATE_SCOPED_MAP_ATTRIBUTES_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly string[]>;
|
|
83
136
|
/** Entity-declared value equivalences used to compare builder and exporter HCL. */
|
|
84
137
|
export declare const BUILD_VS_EXPORT_NORMALIZATIONS: {
|
|
85
138
|
readonly omittedAttributeDefaults: {
|
|
@@ -125,6 +178,7 @@ export interface CatalogKindMeta {
|
|
|
125
178
|
readonly renderOrder: number;
|
|
126
179
|
readonly catalogRoot: import("./types.js").CatalogRoot;
|
|
127
180
|
readonly factoryName: string;
|
|
181
|
+
readonly fromOwnRef?: true;
|
|
128
182
|
readonly renderEntry: (args: CatalogRenderArgs) => CatalogRenderResult;
|
|
129
183
|
}
|
|
130
184
|
/** refKind → catalog bag / order / root / factory — graph facets win over deferred. */
|
|
@@ -57,6 +57,15 @@ export const BUILD_VS_EXPORT_SCOPE_TYPES = new Set([
|
|
|
57
57
|
export const BUILD_VS_EXPORT_REFERENCE_ALIASES = KIND_MODULES.flatMap((module) => module.roundtrip?.referenceAliases ?? []);
|
|
58
58
|
/** Entity-declared typed-data-vs-resolved-literal equivalences for export comparison. */
|
|
59
59
|
export const BUILD_VS_EXPORT_RESOLVED_DATA_REFERENCE_EQUIVALENCES = KIND_MODULES.flatMap((module) => (module.roundtrip?.resolvedDataReferences ?? []).flatMap((equivalence) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...equivalence }))));
|
|
60
|
+
export const BUILD_VS_EXPORT_KEYED_LOCAL_ALIASES = KIND_MODULES.flatMap((module) => (module.roundtrip?.keyedLocalAliases ?? []).flatMap((alias) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...alias }))));
|
|
61
|
+
export const BUILD_VS_EXPORT_MANAGED_LOOKUP_ATTRIBUTES = KIND_MODULES.flatMap((module) => module.roundtrip?.managedLookupAttributes ?? []);
|
|
62
|
+
export const BUILD_VS_EXPORT_COMPUTED_MAP_ATTRIBUTES = KIND_MODULES.flatMap((module) => (module.roundtrip?.computedMapAttributes ?? []).flatMap((declared) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...declared }))));
|
|
63
|
+
export const BUILD_VS_EXPORT_NESTED_OMITTED_DEFAULTS = KIND_MODULES.flatMap((module) => (module.roundtrip?.nestedOmittedDefaults ?? []).flatMap((declared) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...declared }))));
|
|
64
|
+
export const BUILD_VS_EXPORT_COMPUTED_REFERENCE_MAPS = KIND_MODULES.flatMap((module) => module.roundtrip?.computedReferenceMaps ?? []);
|
|
65
|
+
export const BUILD_VS_EXPORT_RECORD_FIELD_OUTPUT_KEYS = KIND_MODULES.flatMap((module) => module.roundtrip?.recordFieldOutputKeys ?? []);
|
|
66
|
+
export const BUILD_VS_EXPORT_ATTRIBUTE_LOCALS = KIND_MODULES.flatMap((module) => module.roundtrip?.exportedAttributeLocals ?? []);
|
|
67
|
+
export const BUILD_VS_EXPORT_TASK_OUTPUT_REFERENCE_NAMES = new Map(KIND_MODULES.flatMap((module) => Object.entries(module.roundtrip?.taskOutputReferenceNames ?? {}))
|
|
68
|
+
.map(([taskType, names]) => [taskType, new Map(Object.entries(names))]));
|
|
60
69
|
/** Kind id → module. */
|
|
61
70
|
export const KIND_BY_ID = new Map(KIND_MODULES.map((m) => [m.kind, m]));
|
|
62
71
|
/** @deprecated Use {@link KIND_BY_ID}. */
|
|
@@ -98,6 +107,26 @@ export const STREAM_ROOT_RESOURCE_TYPES = new Set(STREAM_ROOT_MODULES.flatMap((m
|
|
|
98
107
|
export const AUTHORING_TYPE_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => m.resource.shape === "subTypes"
|
|
99
108
|
? m.resource.rows.flatMap((row) => (row.authoringType === undefined ? [] : [[row.resourceType, row.authoringType]]))
|
|
100
109
|
: []));
|
|
110
|
+
/**
|
|
111
|
+
* Resource type → attributes the platform never returns on read, as each kind
|
|
112
|
+
* declares them on its resource facet. A re-pull fills these from state.
|
|
113
|
+
*/
|
|
114
|
+
export const UNREADABLE_ATTRIBUTES_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => {
|
|
115
|
+
if (m.resource.shape === "single") {
|
|
116
|
+
return m.resource.unreadableAttributes === undefined ? [] : [[m.resource.resourceType, m.resource.unreadableAttributes]];
|
|
117
|
+
}
|
|
118
|
+
if (m.resource.shape === "subTypes") {
|
|
119
|
+
return m.resource.rows.flatMap((row) => (row.unreadableAttributes === undefined ? [] : [[row.resourceType, row.unreadableAttributes]]));
|
|
120
|
+
}
|
|
121
|
+
return [];
|
|
122
|
+
}));
|
|
123
|
+
/**
|
|
124
|
+
* Resource type → map attributes the provider manages per key, as each
|
|
125
|
+
* single-resource kind declares them. A re-pull keeps only the keys in state.
|
|
126
|
+
*/
|
|
127
|
+
export const STATE_SCOPED_MAP_ATTRIBUTES_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => m.resource.shape === "single" && m.resource.stateScopedMapAttributes !== undefined
|
|
128
|
+
? [[m.resource.resourceType, m.resource.stateScopedMapAttributes]]
|
|
129
|
+
: []));
|
|
101
130
|
/** Entity-declared value equivalences used to compare builder and exporter HCL. */
|
|
102
131
|
export const BUILD_VS_EXPORT_NORMALIZATIONS = {
|
|
103
132
|
omittedAttributeDefaults: KIND_MODULES.flatMap((module) => (module.roundtrip?.omittedAttributeDefaults ?? []).flatMap((equivalence) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...equivalence })))),
|
|
@@ -172,6 +201,7 @@ function catalogMetaOf(facet) {
|
|
|
172
201
|
renderOrder: facet.renderOrder,
|
|
173
202
|
catalogRoot: facet.catalogRoot,
|
|
174
203
|
factoryName: facet.factoryName ?? `${facet.refKind}Ref`,
|
|
204
|
+
...(facet.fromOwnRef === true ? { fromOwnRef: true } : {}),
|
|
175
205
|
renderEntry: facet.renderEntry,
|
|
176
206
|
};
|
|
177
207
|
}
|
|
@@ -29,6 +29,7 @@ import { skillToolModule } from "../entities/skill-tool/module.js";
|
|
|
29
29
|
import { serviceAccountModule } from "../entities/service-account/module.js";
|
|
30
30
|
import { tableModule } from "../entities/table/module.js";
|
|
31
31
|
import { taskModule } from "../entities/task/module.js";
|
|
32
|
+
import { portalModule } from "../entities/portal/module.js";
|
|
32
33
|
import { managedViewOrderModule, viewModule } from "../entities/view/module.js";
|
|
33
34
|
import { phoneServiceModule } from "../entities/phone-service/module.js";
|
|
34
35
|
import { organizationModule } from "../entities/organization/module.js";
|
|
@@ -65,6 +66,7 @@ export const KIND_MODULES = [
|
|
|
65
66
|
searchTableModule,
|
|
66
67
|
tableModule,
|
|
67
68
|
taskModule,
|
|
69
|
+
portalModule,
|
|
68
70
|
cloudLinkModule,
|
|
69
71
|
categoryModule,
|
|
70
72
|
connectorModule,
|