@elementumai/edk 0.8.2-alpha.6 → 0.9.5
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 +49 -37
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +3 -3
- package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +3 -11
- package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +3 -11
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.js +1 -1
- package/dist-sdk/fs/entity.d.ts +2 -2
- package/dist-sdk/fs/entity.js +1 -1
- package/dist-sdk/pull/missing-report.d.ts +81 -0
- package/dist-sdk/pull/missing-report.js +52 -0
- package/dist-sdk/pull/util.d.ts +1 -1
- package/dist-sdk/pull/util.js +3 -3
- package/dist-sdk/src/catalog/factories.d.ts +96 -23
- package/dist-sdk/src/catalog/factories.js +141 -21
- package/dist-sdk/src/catalog/from-authoring.d.ts +5 -5
- package/dist-sdk/src/catalog/from-authoring.js +20 -10
- 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 +63 -4
- package/dist-sdk/src/catalog/render-helpers.d.ts +1 -1
- package/dist-sdk/src/catalog/render-helpers.js +1 -1
- package/dist-sdk/src/catalog/render.d.ts +1 -0
- package/dist-sdk/src/catalog/render.js +8 -2
- package/dist-sdk/src/catalog/token.js +18 -4
- package/dist-sdk/src/catalog/types.d.ts +64 -24
- package/dist-sdk/src/catalog/types.js +12 -4
- package/dist-sdk/src/core/app-to-ui.d.ts +6 -6
- package/dist-sdk/src/core/app-to-ui.js +7 -9
- package/dist-sdk/src/core/index.d.ts +11 -10
- package/dist-sdk/src/core/index.js +10 -9
- package/dist-sdk/src/core/platform-id.d.ts +11 -0
- package/dist-sdk/src/core/platform-id.js +8 -0
- package/dist-sdk/src/{entities/flow/activities/render-catalog.d.ts → core/render-tree.d.ts} +3 -3
- package/dist-sdk/src/{entities/flow/activities/render-catalog.js → core/render-tree.js} +7 -10
- package/dist-sdk/src/core/types/ai-provider.d.ts +1 -1
- package/dist-sdk/src/core/types/ai-provider.js +1 -1
- package/dist-sdk/src/core/types/app.d.ts +78 -52
- package/dist-sdk/src/core/types/app.js +2 -3
- package/dist-sdk/src/core/types/aspect-category.d.ts +4 -4
- package/dist-sdk/src/core/types/aspect-category.js +4 -4
- package/dist-sdk/src/core/types/cloud-link.d.ts +3 -3
- package/dist-sdk/src/core/types/cloud-link.js +3 -3
- package/dist-sdk/src/core/types/display-block.d.ts +2 -2
- package/dist-sdk/src/core/types/display-block.js +2 -2
- package/dist-sdk/src/core/types/group.d.ts +1 -1
- package/dist-sdk/src/core/types/group.js +1 -1
- package/dist-sdk/src/core/types/user.d.ts +1 -1
- package/dist-sdk/src/core/types/user.js +1 -1
- package/dist-sdk/src/core/wire/ref-serializer.js +3 -3
- package/dist-sdk/src/engine/build/context.d.ts +23 -16
- package/dist-sdk/src/engine/entity.d.ts +1 -1
- package/dist-sdk/src/engine/pull/attrs.d.ts +4 -0
- package/dist-sdk/src/engine/pull/attrs.js +17 -0
- package/dist-sdk/src/engine/pull/context.d.ts +73 -0
- package/dist-sdk/src/engine/pull/context.js +14 -0
- package/dist-sdk/src/engine/pull/org.d.ts +10 -0
- package/dist-sdk/src/engine/pull/org.js +35 -0
- package/dist-sdk/src/engine/pull/ref-only.d.ts +37 -0
- package/dist-sdk/src/engine/pull/ref-only.js +204 -0
- package/dist-sdk/src/engine/tf/expr.d.ts +7 -3
- package/dist-sdk/src/engine/tf/expr.js +27 -15
- package/dist-sdk/src/engine/tf/index.d.ts +1 -1
- package/dist-sdk/src/engine/tf/index.js +1 -1
- package/dist-sdk/src/engine/tf/model.d.ts +8 -1
- package/dist-sdk/src/engine/tf/model.js +4 -0
- package/dist-sdk/src/engine/tf/parse.js +13 -2
- package/dist-sdk/src/engine/tf/render.js +4 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.js +4 -2
- package/dist-sdk/src/entities/access-policy/build.d.ts +6 -16
- package/dist-sdk/src/entities/access-policy/build.js +2 -2
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +14 -40
- package/dist-sdk/src/entities/access-policy/from-tf.js +26 -85
- package/dist-sdk/src/entities/access-policy/principal.d.ts +39 -0
- package/dist-sdk/src/entities/access-policy/principal.js +13 -0
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +33 -6
- package/dist-sdk/src/entities/access-policy/to-tf.js +62 -60
- package/dist-sdk/src/entities/agent/build.d.ts +42 -11
- package/dist-sdk/src/entities/agent/build.js +40 -19
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +11 -1
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +180 -45
- package/dist-sdk/src/entities/agent/from-tf.d.ts +3 -1
- package/dist-sdk/src/entities/agent/from-tf.js +17 -12
- package/dist-sdk/src/entities/agent/index.d.ts +5 -2
- package/dist-sdk/src/entities/agent/index.js +4 -2
- package/dist-sdk/src/entities/agent/module.js +7 -2
- package/dist-sdk/src/entities/agent/run-as.d.ts +16 -0
- package/dist-sdk/src/entities/agent/run-as.js +1 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +6 -2
- package/dist-sdk/src/entities/agent/to-tf.js +58 -9
- package/dist-sdk/src/entities/agent/tools.d.ts +97 -70
- package/dist-sdk/src/entities/agent/tools.js +63 -43
- package/dist-sdk/src/entities/agent-a2a-skill/from-tf.js +1 -1
- package/dist-sdk/src/entities/agent-a2a-skill/to-tf.js +4 -4
- package/dist-sdk/src/entities/agent-evaluation/build.d.ts +19 -0
- package/dist-sdk/src/entities/agent-evaluation/build.js +41 -0
- package/dist-sdk/src/entities/agent-evaluation/deserializer/print-agent-evaluation.d.ts +4 -0
- package/dist-sdk/src/entities/agent-evaluation/deserializer/print-agent-evaluation.js +30 -0
- package/dist-sdk/src/entities/agent-evaluation/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/agent-evaluation/from-tf.js +46 -0
- package/dist-sdk/src/entities/agent-evaluation/index.d.ts +1 -0
- package/dist-sdk/src/entities/agent-evaluation/index.js +1 -0
- package/dist-sdk/src/entities/agent-evaluation/module.d.ts +3 -0
- package/dist-sdk/src/entities/agent-evaluation/module.js +58 -0
- package/dist-sdk/src/entities/agent-evaluation/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/agent-evaluation/to-tf.js +35 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +25 -15
- package/dist-sdk/src/entities/agent-tool/from-tf.js +175 -43
- package/dist-sdk/src/entities/agent-tool/module.js +6 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +15 -7
- package/dist-sdk/src/entities/agent-tool/to-tf.js +169 -48
- package/dist-sdk/src/entities/agent-tool/types.d.ts +4 -6
- package/dist-sdk/src/entities/agent-tool/types.js +30 -29
- package/dist-sdk/src/entities/app/build.d.ts +214 -47
- package/dist-sdk/src/entities/app/build.js +128 -66
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +188 -8
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.d.ts +59 -0
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.js +70 -0
- package/dist-sdk/src/entities/app/display-blocks.d.ts +2 -1
- package/dist-sdk/src/entities/app/display-blocks.js +1 -1
- package/dist-sdk/src/entities/app/from-tf.d.ts +11 -1
- package/dist-sdk/src/entities/app/from-tf.js +30 -2
- package/dist-sdk/src/entities/app/index.d.ts +20 -8
- package/dist-sdk/src/entities/app/index.js +16 -6
- package/dist-sdk/src/entities/app/module.js +29 -4
- package/dist-sdk/src/entities/app/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/app/to-tf.js +97 -7
- package/dist-sdk/src/entities/approval-chain/build.d.ts +31 -16
- package/dist-sdk/src/entities/approval-chain/build.js +49 -49
- package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +17 -0
- package/dist-sdk/src/entities/approval-chain/from-tf.js +57 -0
- package/dist-sdk/src/entities/approval-chain/index.d.ts +2 -3
- package/dist-sdk/src/entities/approval-chain/index.js +2 -3
- package/dist-sdk/src/entities/approval-chain/module.d.ts +3 -0
- package/dist-sdk/src/entities/approval-chain/module.js +51 -0
- package/dist-sdk/src/entities/approval-chain/printer.d.ts +2 -0
- package/dist-sdk/src/entities/approval-chain/printer.js +21 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.d.ts +9 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.js +43 -0
- package/dist-sdk/src/entities/automation/build.d.ts +177 -95
- package/dist-sdk/src/entities/automation/build.js +164 -72
- package/dist-sdk/src/entities/automation/calculation-expression.d.ts +191 -0
- package/dist-sdk/src/entities/automation/calculation-expression.js +57 -0
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +18 -9
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +18 -14
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +214 -311
- package/dist-sdk/src/entities/automation/filter.d.ts +1 -115
- package/dist-sdk/src/entities/automation/filter.js +1 -197
- package/dist-sdk/src/entities/automation/from-tf.d.ts +28 -0
- package/dist-sdk/src/entities/automation/from-tf.js +695 -182
- package/dist-sdk/src/entities/automation/index.d.ts +9 -10
- package/dist-sdk/src/entities/automation/index.js +11 -11
- package/dist-sdk/src/entities/automation/module.js +82 -8
- package/dist-sdk/src/entities/automation/operators.d.ts +32 -48
- package/dist-sdk/src/entities/automation/operators.js +10 -37
- package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +1 -1
- package/dist-sdk/src/entities/automation/output-key-wire-name.js +1 -1
- package/dist-sdk/src/entities/automation/script-code.js +107 -28
- package/dist-sdk/src/entities/automation/serialize.js +1 -1
- package/dist-sdk/src/entities/automation/tasks.d.ts +167 -102
- package/dist-sdk/src/entities/automation/tasks.js +66 -13
- package/dist-sdk/src/entities/automation/to-tf.d.ts +44 -3
- package/dist-sdk/src/entities/automation/to-tf.js +607 -161
- package/dist-sdk/src/entities/automation/triggers.d.ts +33 -25
- package/dist-sdk/src/entities/automation/triggers.js +8 -2
- package/dist-sdk/src/entities/automation/types.d.ts +3 -2
- package/dist-sdk/src/entities/automation/types.js +3 -2
- package/dist-sdk/src/entities/chart/build.d.ts +95 -0
- package/dist-sdk/src/entities/chart/build.js +42 -0
- package/dist-sdk/src/entities/chart/from-tf.d.ts +55 -0
- package/dist-sdk/src/entities/chart/from-tf.js +269 -0
- package/dist-sdk/src/entities/chart/index.d.ts +4 -0
- package/dist-sdk/src/entities/chart/index.js +3 -0
- package/dist-sdk/src/entities/chart/module.d.ts +3 -0
- package/dist-sdk/src/entities/chart/module.js +61 -0
- package/dist-sdk/src/entities/chart/printer.d.ts +5 -0
- package/dist-sdk/src/entities/chart/printer.js +104 -0
- package/dist-sdk/src/entities/chart/to-tf.d.ts +15 -0
- package/dist-sdk/src/entities/chart/to-tf.js +150 -0
- package/dist-sdk/src/entities/chart/types.d.ts +53 -0
- package/dist-sdk/src/entities/chart/types.js +22 -0
- package/dist-sdk/src/entities/dashboard/build.d.ts +44 -0
- package/dist-sdk/src/entities/dashboard/build.js +16 -0
- package/dist-sdk/src/entities/dashboard/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/dashboard/from-tf.js +113 -0
- package/dist-sdk/src/entities/dashboard/module.d.ts +3 -0
- package/dist-sdk/src/entities/dashboard/module.js +16 -0
- package/dist-sdk/src/entities/dashboard/to-tf.d.ts +43 -0
- package/dist-sdk/src/entities/dashboard/to-tf.js +121 -0
- package/dist-sdk/src/entities/dashboard-widget/module.d.ts +3 -0
- package/dist-sdk/src/entities/dashboard-widget/module.js +10 -0
- package/dist-sdk/src/entities/data-lookup/module.d.ts +3 -0
- package/dist-sdk/src/entities/data-lookup/module.js +22 -0
- package/dist-sdk/src/entities/datamine/build.d.ts +22 -0
- package/dist-sdk/src/entities/datamine/from-tf.d.ts +17 -0
- package/dist-sdk/src/entities/datamine/from-tf.js +98 -0
- package/dist-sdk/src/entities/datamine/module.d.ts +3 -0
- package/dist-sdk/src/entities/datamine/module.js +23 -0
- package/dist-sdk/src/entities/datamine/to-tf.d.ts +11 -0
- package/dist-sdk/src/entities/datamine/to-tf.js +53 -0
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +304 -0
- package/dist-sdk/src/entities/dynamic-layout/build.js +4 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +4 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.js +47 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +10 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +239 -0
- package/dist-sdk/src/entities/dynamic-layout/module.d.ts +3 -0
- package/dist-sdk/src/entities/dynamic-layout/module.js +13 -0
- package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +26 -0
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +267 -0
- package/dist-sdk/src/entities/element/build.d.ts +48 -38
- package/dist-sdk/src/entities/element/build.js +24 -33
- package/dist-sdk/src/entities/element/from-tf.d.ts +9 -1
- package/dist-sdk/src/entities/element/from-tf.js +31 -2
- package/dist-sdk/src/entities/element/index.d.ts +14 -7
- package/dist-sdk/src/entities/element/index.js +11 -5
- package/dist-sdk/src/entities/element/module.js +26 -5
- package/dist-sdk/src/entities/element/to-tf.d.ts +2 -1
- package/dist-sdk/src/entities/element/to-tf.js +64 -4
- package/dist-sdk/src/entities/field/build.d.ts +55 -27
- package/dist-sdk/src/entities/field/build.js +31 -6
- package/dist-sdk/src/entities/field/calc/aggregate.d.ts +52 -21
- package/dist-sdk/src/entities/field/calc/aggregate.js +59 -29
- package/dist-sdk/src/entities/field/calc/date.d.ts +78 -29
- package/dist-sdk/src/entities/field/calc/date.js +120 -29
- package/dist-sdk/src/entities/field/calc/index.d.ts +80 -85
- package/dist-sdk/src/entities/field/calc/index.js +82 -139
- package/dist-sdk/src/entities/field/calc/numeric.d.ts +8 -12
- package/dist-sdk/src/entities/field/calc/numeric.js +10 -27
- package/dist-sdk/src/entities/field/calc/runtime.d.ts +19 -2
- package/dist-sdk/src/entities/field/calc/runtime.js +79 -8
- package/dist-sdk/src/entities/field/calc/text.d.ts +32 -23
- package/dist-sdk/src/entities/field/calc/text.js +43 -31
- package/dist-sdk/src/entities/field/calc/types.d.ts +36 -81
- package/dist-sdk/src/entities/field/calc/types.js +1 -22
- package/dist-sdk/src/entities/field/calc.d.ts +71 -48
- package/dist-sdk/src/entities/field/calc.js +5 -15
- package/dist-sdk/src/entities/field/calculation-types.d.ts +6 -0
- package/dist-sdk/src/entities/field/calculation-types.js +49 -0
- package/dist-sdk/src/entities/field/from-tf.js +238 -13
- package/dist-sdk/src/entities/field/locals.d.ts +11 -3
- package/dist-sdk/src/entities/field/locals.js +15 -2
- package/dist-sdk/src/entities/field/module.d.ts +1 -0
- package/dist-sdk/src/entities/field/module.js +27 -7
- package/dist-sdk/src/entities/field/record-shape.d.ts +25 -11
- package/dist-sdk/src/entities/field/to-tf.d.ts +41 -2
- package/dist-sdk/src/entities/field/to-tf.js +314 -40
- package/dist-sdk/src/entities/field/types.d.ts +1 -1
- package/dist-sdk/src/entities/field/types.js +10 -1
- package/dist-sdk/src/entities/file-reader/build.d.ts +71 -19
- package/dist-sdk/src/entities/file-reader/build.js +49 -4
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +1 -0
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +12 -10
- package/dist-sdk/src/entities/file-reader/from-tf.d.ts +1 -1
- package/dist-sdk/src/entities/file-reader/from-tf.js +31 -2
- package/dist-sdk/src/entities/file-reader/index.d.ts +3 -3
- package/dist-sdk/src/entities/file-reader/index.js +3 -3
- package/dist-sdk/src/entities/file-reader/module.js +6 -5
- package/dist-sdk/src/entities/file-reader/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/file-reader/to-tf.js +5 -2
- package/dist-sdk/src/entities/file-reader/types.d.ts +3 -4
- package/dist-sdk/src/entities/file-reader/types.js +4 -5
- package/dist-sdk/src/entities/org/category.js +4 -5
- package/dist-sdk/src/entities/org/cloud-link.js +4 -5
- package/dist-sdk/src/entities/org/email-alias.d.ts +2 -0
- package/dist-sdk/src/entities/org/email-alias.js +12 -0
- package/dist-sdk/src/entities/org/group.js +4 -5
- package/dist-sdk/src/entities/org/index.d.ts +2 -0
- package/dist-sdk/src/entities/org/index.js +2 -0
- package/dist-sdk/src/entities/org/phone-provider.d.ts +4 -0
- package/dist-sdk/src/entities/org/phone-provider.js +30 -0
- package/dist-sdk/src/entities/org/role.d.ts +3 -3
- package/dist-sdk/src/entities/org/role.js +9 -6
- package/dist-sdk/src/entities/organization/build.d.ts +241 -0
- package/dist-sdk/src/entities/organization/build.js +165 -0
- package/dist-sdk/src/entities/organization/index.d.ts +2 -0
- package/dist-sdk/src/entities/organization/index.js +2 -0
- package/dist-sdk/src/entities/organization/module.d.ts +2 -0
- package/dist-sdk/src/entities/organization/module.js +21 -0
- package/dist-sdk/src/entities/organization/to-tf.d.ts +7 -0
- package/dist-sdk/src/entities/organization/to-tf.js +154 -0
- package/dist-sdk/src/entities/phone-service/build.d.ts +17 -0
- package/dist-sdk/src/entities/phone-service/build.js +31 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.d.ts +4 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +56 -0
- package/dist-sdk/src/entities/phone-service/from-tf.d.ts +25 -0
- package/dist-sdk/src/entities/phone-service/from-tf.js +75 -0
- package/dist-sdk/src/entities/phone-service/index.d.ts +2 -0
- package/dist-sdk/src/entities/phone-service/index.js +2 -0
- package/dist-sdk/src/entities/phone-service/module.d.ts +3 -0
- package/dist-sdk/src/entities/phone-service/module.js +55 -0
- package/dist-sdk/src/entities/phone-service/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/phone-service/to-tf.js +54 -0
- package/dist-sdk/src/entities/phone-service/types.d.ts +35 -0
- package/dist-sdk/src/entities/phone-service/types.js +22 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.d.ts +11 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.js +74 -0
- package/dist-sdk/src/entities/record-create-form/module.d.ts +11 -0
- package/dist-sdk/src/entities/record-create-form/module.js +24 -0
- package/dist-sdk/src/entities/record-create-form/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/record-create-form/to-tf.js +88 -0
- package/dist-sdk/src/entities/relationship/build.d.ts +16 -0
- package/dist-sdk/src/entities/relationship/build.js +1 -0
- package/dist-sdk/src/entities/relationship/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/relationship/from-tf.js +109 -0
- package/dist-sdk/src/entities/relationship/module.d.ts +3 -0
- package/dist-sdk/src/entities/relationship/module.js +16 -0
- package/dist-sdk/src/entities/relationship/to-tf.d.ts +32 -0
- package/dist-sdk/src/entities/relationship/to-tf.js +145 -0
- package/dist-sdk/src/entities/role/build.d.ts +65 -0
- package/dist-sdk/src/entities/role/build.js +33 -0
- package/dist-sdk/src/entities/role/from-tf.d.ts +13 -0
- package/dist-sdk/src/entities/role/from-tf.js +138 -0
- package/dist-sdk/src/entities/role/to-tf.d.ts +13 -0
- package/dist-sdk/src/entities/role/to-tf.js +69 -0
- package/dist-sdk/src/entities/search-table/build.d.ts +67 -28
- package/dist-sdk/src/entities/search-table/build.js +110 -56
- package/dist-sdk/src/entities/search-table/from-tf.d.ts +37 -0
- package/dist-sdk/src/entities/search-table/from-tf.js +113 -0
- package/dist-sdk/src/entities/search-table/index.d.ts +2 -2
- package/dist-sdk/src/entities/search-table/index.js +2 -2
- package/dist-sdk/src/entities/search-table/module.js +88 -10
- package/dist-sdk/src/entities/search-table/printer.d.ts +2 -0
- package/dist-sdk/src/entities/search-table/printer.js +52 -0
- package/dist-sdk/src/entities/search-table/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/search-table/to-tf.js +104 -0
- package/dist-sdk/src/entities/search-table/types.d.ts +8 -0
- package/dist-sdk/src/entities/search-table/types.js +21 -0
- package/dist-sdk/src/entities/service-account/build.d.ts +32 -0
- package/dist-sdk/src/entities/service-account/build.js +9 -0
- package/dist-sdk/src/entities/service-account/from-tf.d.ts +10 -0
- package/dist-sdk/src/entities/service-account/from-tf.js +109 -0
- package/dist-sdk/src/entities/service-account/module.d.ts +4 -0
- package/dist-sdk/src/entities/service-account/module.js +21 -0
- package/dist-sdk/src/entities/service-account/ref.d.ts +11 -0
- package/dist-sdk/src/entities/service-account/ref.js +5 -0
- package/dist-sdk/src/entities/service-account/to-tf.d.ts +32 -0
- package/dist-sdk/src/entities/service-account/to-tf.js +103 -0
- package/dist-sdk/src/entities/shared/connector-from-tf.d.ts +14 -0
- package/dist-sdk/src/entities/shared/connector-from-tf.js +14 -0
- package/dist-sdk/src/entities/shared/context.d.ts +25 -24
- package/dist-sdk/src/entities/shared/context.js +36 -35
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +30 -81
- package/dist-sdk/src/entities/shared/filters/ast.js +6 -2
- package/dist-sdk/src/entities/shared/filters/index.d.ts +95 -206
- package/dist-sdk/src/entities/shared/filters/index.js +196 -341
- package/dist-sdk/src/entities/shared/filters/print.d.ts +11 -0
- package/dist-sdk/src/entities/shared/filters/print.js +122 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +170 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +527 -0
- package/dist-sdk/src/entities/shared/filters/types.d.ts +66 -69
- package/dist-sdk/src/entities/shared/filters/types.js +2 -3
- package/dist-sdk/src/entities/shared/foreign-ref.d.ts +14 -0
- package/dist-sdk/src/entities/shared/foreign-ref.js +12 -0
- package/dist-sdk/src/entities/shared/ref.d.ts +26 -11
- package/dist-sdk/src/entities/shared/ref.js +8 -3
- package/dist-sdk/src/entities/shared/types/common.d.ts +2 -2
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +1 -1
- package/dist-sdk/src/entities/shared/types/field-types.js +1 -1
- package/dist-sdk/src/entities/skill/build.d.ts +4 -4
- package/dist-sdk/src/entities/skill/build.js +6 -5
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +11 -1
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +100 -39
- package/dist-sdk/src/entities/skill/index.d.ts +3 -2
- package/dist-sdk/src/entities/skill/index.js +3 -2
- package/dist-sdk/src/entities/skill/module.js +8 -2
- package/dist-sdk/src/entities/skill/to-tf.d.ts +6 -2
- package/dist-sdk/src/entities/skill/to-tf.js +20 -2
- package/dist-sdk/src/entities/skill/tools.d.ts +47 -31
- package/dist-sdk/src/entities/skill/tools.js +37 -23
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +17 -1
- package/dist-sdk/src/entities/skill-tool/from-tf.js +118 -8
- package/dist-sdk/src/entities/skill-tool/module.js +9 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +6 -1
- package/dist-sdk/src/entities/skill-tool/to-tf.js +100 -48
- package/dist-sdk/src/entities/skill-tool/types.js +18 -1
- package/dist-sdk/src/entities/table/build.d.ts +64 -23
- package/dist-sdk/src/entities/table/build.js +41 -26
- package/dist-sdk/src/entities/table/catalog-render.js +15 -1
- package/dist-sdk/src/entities/table/deserializer/normalize.d.ts +99 -0
- package/dist-sdk/src/entities/table/deserializer/normalize.js +192 -0
- package/dist-sdk/src/entities/table/fields/types.d.ts +86 -0
- package/dist-sdk/src/entities/table/fields/types.js +12 -0
- package/dist-sdk/src/entities/table/fields.d.ts +107 -47
- package/dist-sdk/src/entities/table/fields.js +76 -55
- package/dist-sdk/src/entities/table/from-tf.d.ts +4 -0
- package/dist-sdk/src/entities/table/from-tf.js +261 -0
- package/dist-sdk/src/entities/table/index.d.ts +7 -5
- package/dist-sdk/src/entities/table/index.js +7 -7
- package/dist-sdk/src/entities/table/joins.d.ts +22 -9
- package/dist-sdk/src/entities/table/joins.js +8 -16
- package/dist-sdk/src/entities/table/module.d.ts +2 -1
- package/dist-sdk/src/entities/table/module.js +13 -6
- package/dist-sdk/src/entities/table/to-tf.d.ts +10 -0
- package/dist-sdk/src/entities/table/to-tf.js +222 -0
- package/dist-sdk/src/entities/task/build.d.ts +43 -0
- package/dist-sdk/src/entities/task/build.js +17 -0
- package/dist-sdk/src/entities/task/from-tf.d.ts +28 -0
- package/dist-sdk/src/entities/task/from-tf.js +38 -0
- package/dist-sdk/src/entities/task/index.d.ts +1 -0
- package/dist-sdk/src/entities/task/index.js +1 -0
- package/dist-sdk/src/entities/task/module.d.ts +3 -0
- package/dist-sdk/src/entities/task/module.js +12 -0
- package/dist-sdk/src/entities/task/to-tf.d.ts +9 -0
- package/dist-sdk/src/entities/task/to-tf.js +49 -0
- package/dist-sdk/src/entities/view/build.d.ts +46 -0
- package/dist-sdk/src/entities/view/build.js +19 -0
- package/dist-sdk/src/entities/view/from-tf.d.ts +7 -2
- package/dist-sdk/src/entities/view/from-tf.js +264 -30
- package/dist-sdk/src/entities/view/module.d.ts +6 -13
- package/dist-sdk/src/entities/view/module.js +12 -15
- package/dist-sdk/src/entities/view/sharing.d.ts +10 -0
- package/dist-sdk/src/entities/view/sharing.js +6 -0
- package/dist-sdk/src/entities/view/to-tf.d.ts +56 -12
- package/dist-sdk/src/entities/view/to-tf.js +192 -20
- package/dist-sdk/src/entities/view/types.d.ts +8 -0
- package/dist-sdk/src/entities/view/types.js +46 -0
- package/dist-sdk/src/entities/visual-flow/build.d.ts +87 -0
- package/dist-sdk/src/entities/visual-flow/build.js +72 -0
- package/dist-sdk/src/entities/visual-flow/from-tf.d.ts +49 -0
- package/dist-sdk/src/entities/visual-flow/from-tf.js +124 -0
- package/dist-sdk/src/entities/visual-flow/index.d.ts +1 -0
- package/dist-sdk/src/entities/visual-flow/index.js +1 -0
- package/dist-sdk/src/entities/visual-flow/module.d.ts +3 -0
- package/dist-sdk/src/entities/visual-flow/module.js +41 -0
- package/dist-sdk/src/entities/visual-flow/printer.d.ts +8 -0
- package/dist-sdk/src/entities/visual-flow/printer.js +92 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.d.ts +15 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.js +97 -0
- package/dist-sdk/src/entities/widget/build.d.ts +55 -0
- package/dist-sdk/src/entities/widget/build.js +1 -0
- package/dist-sdk/src/entities/widget/from-tf.d.ts +11 -0
- package/dist-sdk/src/entities/widget/from-tf.js +209 -0
- package/dist-sdk/src/entities/widget/module.d.ts +3 -0
- package/dist-sdk/src/entities/widget/module.js +16 -0
- package/dist-sdk/src/entities/widget/to-tf.d.ts +45 -0
- package/dist-sdk/src/entities/widget/to-tf.js +206 -0
- package/dist-sdk/src/graph/deferred-catalog-render.d.ts +1 -1
- package/dist-sdk/src/graph/deferred-catalog-render.js +1 -1
- package/dist-sdk/src/graph/index.d.ts +12 -1
- package/dist-sdk/src/graph/index.js +8 -19
- package/dist-sdk/src/graph/modules.js +35 -1
- package/dist-sdk/src/graph/types.d.ts +106 -7
- package/dist-sdk/src/internal/safe-identifier.d.ts +4 -0
- package/dist-sdk/src/internal/safe-identifier.js +13 -0
- package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
- package/dist-sdk/src/internal/sdk-package.js +5 -2
- package/package.json +39 -15
- package/dist-sdk/src/entities/access-policy/filter.d.ts +0 -61
- package/dist-sdk/src/entities/access-policy/filter.js +0 -83
- package/dist-sdk/src/entities/approval-chain/steps.d.ts +0 -24
- package/dist-sdk/src/entities/approval-chain/steps.js +0 -20
- package/dist-sdk/src/entities/flow/activities/agent.d.ts +0 -15
- package/dist-sdk/src/entities/flow/activities/agent.js +0 -29
- package/dist-sdk/src/entities/flow/activities/approval.d.ts +0 -9
- package/dist-sdk/src/entities/flow/activities/approval.js +0 -18
- package/dist-sdk/src/entities/flow/activities/automation.d.ts +0 -12
- package/dist-sdk/src/entities/flow/activities/automation.js +0 -22
- package/dist-sdk/src/entities/flow/activities/ctx.d.ts +0 -34
- package/dist-sdk/src/entities/flow/activities/ctx.js +0 -38
- package/dist-sdk/src/entities/flow/activities/form.d.ts +0 -22
- package/dist-sdk/src/entities/flow/activities/form.js +0 -36
- package/dist-sdk/src/entities/flow/activities/index.d.ts +0 -14
- package/dist-sdk/src/entities/flow/activities/index.js +0 -13
- package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +0 -39
- package/dist-sdk/src/entities/flow/activities/input-refs.js +0 -19
- package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +0 -13
- package/dist-sdk/src/entities/flow/activities/prompt-template.js +0 -34
- package/dist-sdk/src/entities/flow/activities/types.d.ts +0 -33
- package/dist-sdk/src/entities/flow/build.d.ts +0 -38
- package/dist-sdk/src/entities/flow/build.js +0 -115
- package/dist-sdk/src/entities/flow/index.d.ts +0 -8
- package/dist-sdk/src/entities/flow/index.js +0 -7
- package/dist-sdk/src/entities/flow/serialize.d.ts +0 -51
- package/dist-sdk/src/entities/flow/serialize.js +0 -94
- package/dist-sdk/src/entities/flow/util.d.ts +0 -27
- package/dist-sdk/src/entities/flow/util.js +0 -38
- package/dist-sdk/src/entities/table/filter.d.ts +0 -41
- package/dist-sdk/src/entities/table/filter.js +0 -89
- /package/dist-sdk/src/entities/{flow/activities/types.js → datamine/build.js} +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { dataRefLabel, optionalBoolean, optionalString, plainObject, resourceRefLabel } from "../../engine/pull/context.js";
|
|
2
|
+
import { isTfExpr, scopedLabelToBagKey, tfLabelToTsLabel } from "../../engine/tf/index.js";
|
|
3
|
+
import { AUTOMATION_RESOURCE_TYPE } from "../automation/types.js";
|
|
4
|
+
import { fieldKeyFromTfRef } from "../field/from-tf.js";
|
|
5
|
+
import { SUB_TYPE_BY_RESOURCE } from "../field/types.js";
|
|
6
|
+
import { WIDGET_RESOURCE_TYPE } from "./module.js";
|
|
7
|
+
import { filterFromTf } from "../access-policy/from-tf.js";
|
|
8
|
+
const KNOWN_ROOT_ATTRS = new Set(["object_id", "related_object", "related_link_action", "related_create_action", "run_automation_action"]);
|
|
9
|
+
export function widgetsFromTf(blocks, owner, ctx) {
|
|
10
|
+
const out = [];
|
|
11
|
+
for (const block of blocks) {
|
|
12
|
+
const widget = widgetFromTf(block, owner, ctx);
|
|
13
|
+
if (widget !== undefined)
|
|
14
|
+
out.push(widget);
|
|
15
|
+
}
|
|
16
|
+
return out;
|
|
17
|
+
}
|
|
18
|
+
function widgetFromTf(block, owner, ctx) {
|
|
19
|
+
const label = block.label ?? "";
|
|
20
|
+
const where = `${WIDGET_RESOURCE_TYPE}.${label || "?"}`;
|
|
21
|
+
for (const attr of Object.keys(block.attrs)) {
|
|
22
|
+
if (!KNOWN_ROOT_ATTRS.has(attr))
|
|
23
|
+
ctx.diagnostics.push(`${where}: unhandled attribute ${JSON.stringify(attr)}; extend widget extraction`);
|
|
24
|
+
}
|
|
25
|
+
if (resourceRefLabel(block.attrs["object_id"], owner.type) !== owner.label)
|
|
26
|
+
return undefined;
|
|
27
|
+
const key = scopedLabelToBagKey(owner.ownerTfLabel, label, owner.scope);
|
|
28
|
+
const variants = ["related_object", "related_link_action", "related_create_action", "run_automation_action"]
|
|
29
|
+
.filter((attr) => block.attrs[attr] !== undefined);
|
|
30
|
+
if (variants.length !== 1) {
|
|
31
|
+
ctx.diagnostics.push(`${where}: expected exactly one widget variant, found ${variants.length}; skipped`);
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const variant = variants[0];
|
|
35
|
+
const body = plainObject(block.attrs[variant]);
|
|
36
|
+
if (body === undefined) {
|
|
37
|
+
ctx.diagnostics.push(`${where}.${variant}: expected an object; skipped`);
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const name = optionalString(body, "name", `${where}.${variant}`, ctx) ?? "";
|
|
41
|
+
if (variant === "related_object") {
|
|
42
|
+
const target = aspectRef(body["object_id"], owner, ctx);
|
|
43
|
+
if (target === undefined)
|
|
44
|
+
return undefined;
|
|
45
|
+
return {
|
|
46
|
+
key,
|
|
47
|
+
type: "relatedRecords",
|
|
48
|
+
name,
|
|
49
|
+
target,
|
|
50
|
+
...columnsAndRows(body, target, owner, ctx, `${where}.${variant}`),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (variant === "related_link_action") {
|
|
54
|
+
const target = aspectRef(body["object_id"], owner, ctx);
|
|
55
|
+
if (target === undefined)
|
|
56
|
+
return undefined;
|
|
57
|
+
const filterOwner = typeof target !== "string" && (target.kind === "app" || target.kind === "element")
|
|
58
|
+
? { type: `elementum_${target.kind}`, label: target.key, ownerRefName: target.key, ownerTfLabel: target.key, scope: target.kind }
|
|
59
|
+
: { type: owner.type, label: owner.label, ownerRefName: owner.ownerRefName, ownerTfLabel: owner.ownerTfLabel, scope: owner.scope };
|
|
60
|
+
const filter = body["filter"] === undefined
|
|
61
|
+
? undefined
|
|
62
|
+
: filterFromTf(body["filter"], filterOwner, `${where}.${variant}.filter`);
|
|
63
|
+
return {
|
|
64
|
+
key,
|
|
65
|
+
type: "linkRecords",
|
|
66
|
+
name,
|
|
67
|
+
target,
|
|
68
|
+
...buttonStyle(body, where, ctx),
|
|
69
|
+
...columnsAndRows(body, target, owner, ctx, `${where}.${variant}`),
|
|
70
|
+
...(filter !== undefined && { filter }),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
if (variant === "related_create_action") {
|
|
74
|
+
const target = aspectRef(body["object_id"], owner, ctx);
|
|
75
|
+
if (target === undefined)
|
|
76
|
+
return undefined;
|
|
77
|
+
return { key, type: "createRecord", name, target, ...buttonStyle(body, where, ctx) };
|
|
78
|
+
}
|
|
79
|
+
const automation = automationRef(body["automation_id"], owner);
|
|
80
|
+
if (automation === undefined) {
|
|
81
|
+
ctx.diagnostics.push(`${where}.run_automation_action: automation_id is not resolvable; skipped`);
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
const parametersRaw = body["parameters"];
|
|
85
|
+
const parameters = Array.isArray(parametersRaw)
|
|
86
|
+
? parametersRaw.flatMap((raw, index) => {
|
|
87
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw) || isTfExpr(raw)) {
|
|
88
|
+
ctx.diagnostics.push(`${where}.run_automation_action.parameters[${index}]: expected an object; dropped`);
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
const rec = raw;
|
|
92
|
+
const field = ownerFieldRef(rec["field_id"], owner);
|
|
93
|
+
return [{
|
|
94
|
+
name: typeof rec["name"] === "string" ? rec["name"] : "",
|
|
95
|
+
fieldType: typeof rec["field_type"] === "string" ? rec["field_type"] : "TEXT",
|
|
96
|
+
multiple: rec["multiple"] === true,
|
|
97
|
+
required: rec["required"] === true,
|
|
98
|
+
...(field !== undefined && { field }),
|
|
99
|
+
...(typeof rec["value"] === "string" && { value: rec["value"] }),
|
|
100
|
+
}];
|
|
101
|
+
})
|
|
102
|
+
: undefined;
|
|
103
|
+
if (parametersRaw !== undefined && !Array.isArray(parametersRaw)) {
|
|
104
|
+
ctx.diagnostics.push(`${where}.run_automation_action.parameters: expected a list; dropped`);
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
key,
|
|
108
|
+
type: "runAutomation",
|
|
109
|
+
name,
|
|
110
|
+
automation,
|
|
111
|
+
...buttonStyle(body, where, ctx),
|
|
112
|
+
...(parameters !== undefined && { parameters }),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function buttonStyle(attrs, where, ctx) {
|
|
116
|
+
const buttonTypeRaw = optionalString(attrs, "button_type", where, ctx) ?? "INLINE";
|
|
117
|
+
const buttonType = buttonTypeRaw === "PRIMARY" || buttonTypeRaw === "SECONDARY" ? buttonTypeRaw : "INLINE";
|
|
118
|
+
const color = optionalString(attrs, "color", where, ctx);
|
|
119
|
+
const icon = optionalString(attrs, "icon", where, ctx);
|
|
120
|
+
const fullWidth = optionalBoolean(attrs, "full_width", where, ctx);
|
|
121
|
+
return {
|
|
122
|
+
buttonType,
|
|
123
|
+
...(color !== undefined && { color }),
|
|
124
|
+
...(icon !== undefined && { icon }),
|
|
125
|
+
...(fullWidth !== undefined && { fullWidth }),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function columnsAndRows(attrs, target, owner, ctx, where) {
|
|
129
|
+
const columnsRaw = attrs["columns"];
|
|
130
|
+
let columns;
|
|
131
|
+
if (Array.isArray(columnsRaw)) {
|
|
132
|
+
columns = columnsRaw.flatMap((value, index) => {
|
|
133
|
+
const decoded = widgetFieldRef(value, target, owner, ctx);
|
|
134
|
+
if (decoded === undefined) {
|
|
135
|
+
ctx.diagnostics.push(`${where}.columns[${index}]: field reference is not resolvable; dropped`);
|
|
136
|
+
return [];
|
|
137
|
+
}
|
|
138
|
+
return [decoded];
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
else if (columnsRaw !== undefined) {
|
|
142
|
+
ctx.diagnostics.push(`${where}.columns: expected a list; dropped`);
|
|
143
|
+
}
|
|
144
|
+
const rows = typeof attrs["rows"] === "number" ? attrs["rows"] : undefined;
|
|
145
|
+
return { ...(columns !== undefined && { columns }), ...(rows !== undefined && { rows }) };
|
|
146
|
+
}
|
|
147
|
+
function aspectRef(value, owner, ctx) {
|
|
148
|
+
if (typeof value === "string")
|
|
149
|
+
return value;
|
|
150
|
+
if (resourceRefLabel(value, owner.type) === owner.label) {
|
|
151
|
+
return { kind: owner.scope, key: owner.ownerRefName, name: owner.ownerRefName };
|
|
152
|
+
}
|
|
153
|
+
for (const [type, kind] of [["elementum_app", "app"], ["elementum_element", "element"]]) {
|
|
154
|
+
const resourceLabel = resourceRefLabel(value, type);
|
|
155
|
+
if (resourceLabel !== undefined)
|
|
156
|
+
return { kind, key: tfLabelToTsLabel(resourceLabel), name: tfLabelToTsLabel(resourceLabel) };
|
|
157
|
+
const dataLabel = dataRefLabel(value, type);
|
|
158
|
+
if (dataLabel !== undefined) {
|
|
159
|
+
const name = ctx.dataName(type, dataLabel) ?? tfLabelToTsLabel(dataLabel);
|
|
160
|
+
return { kind, key: tfLabelToTsLabel(dataLabel), name };
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
function widgetFieldRef(value, target, owner, ctx) {
|
|
166
|
+
if (typeof value === "string")
|
|
167
|
+
return value;
|
|
168
|
+
const targetLabel = typeof target === "string" ? undefined : target.key === owner.ownerRefName ? owner.ownerTfLabel : target.key;
|
|
169
|
+
const targetScope = typeof target === "string" || target.kind === "automation" || target.kind === "field" ? owner.scope : target.kind;
|
|
170
|
+
if (targetLabel !== undefined) {
|
|
171
|
+
const key = fieldKeyFromTfRef(value, targetLabel, targetScope);
|
|
172
|
+
if (key !== undefined) {
|
|
173
|
+
return { kind: "field", key, name: key, ...(typeof target !== "string" && { parent: target.key }), fieldType: "TEXT" };
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
const dataLabel = dataRefLabel(value, "elementum_field");
|
|
177
|
+
if (dataLabel !== undefined) {
|
|
178
|
+
const name = ctx.dataName("elementum_field", dataLabel) ?? tfLabelToTsLabel(dataLabel);
|
|
179
|
+
return { kind: "field", key: tfLabelToTsLabel(dataLabel), name, ...(typeof target !== "string" && { parent: target.key }), fieldType: "TEXT" };
|
|
180
|
+
}
|
|
181
|
+
if (isTfExpr(value) && value.$expr === "resource-attr" && value.path.length === 1 && value.path[0] === "id") {
|
|
182
|
+
const subType = SUB_TYPE_BY_RESOURCE.get(value.type);
|
|
183
|
+
if (subType !== undefined) {
|
|
184
|
+
return { kind: "field", key: tfLabelToTsLabel(value.label), name: tfLabelToTsLabel(value.label), ...(typeof target !== "string" && { parent: target.key }), fieldType: subType.authoringType };
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return undefined;
|
|
188
|
+
}
|
|
189
|
+
function automationRef(value, owner) {
|
|
190
|
+
if (typeof value === "string")
|
|
191
|
+
return value;
|
|
192
|
+
const label = resourceRefLabel(value, AUTOMATION_RESOURCE_TYPE);
|
|
193
|
+
if (label === undefined)
|
|
194
|
+
return undefined;
|
|
195
|
+
return {
|
|
196
|
+
kind: "automation",
|
|
197
|
+
key: scopedLabelToBagKey(owner.ownerTfLabel, label, owner.scope),
|
|
198
|
+
name: scopedLabelToBagKey(owner.ownerTfLabel, label, owner.scope),
|
|
199
|
+
parent: owner.ownerRefName,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function ownerFieldRef(value, owner) {
|
|
203
|
+
if (value === undefined || value === null)
|
|
204
|
+
return undefined;
|
|
205
|
+
if (typeof value === "string")
|
|
206
|
+
return value;
|
|
207
|
+
const key = fieldKeyFromTfRef(value, owner.ownerTfLabel, owner.scope);
|
|
208
|
+
return key === undefined ? undefined : { kind: "field", key, name: key, parent: owner.ownerRefName, fieldType: "TEXT" };
|
|
209
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NO_CANVAS, NO_CATALOG, NO_DATA, NO_LIFECYCLE } from "../../graph/types.js";
|
|
2
|
+
export const WIDGET_RESOURCE_TYPE = "elementum_widget";
|
|
3
|
+
export const widgetModule = {
|
|
4
|
+
kind: "widget",
|
|
5
|
+
stream: { role: "streamMember" },
|
|
6
|
+
authoring: { unit: "inline", bag: "widgets" },
|
|
7
|
+
parents: [
|
|
8
|
+
{ parent: "app", child: "widget" },
|
|
9
|
+
{ parent: "element", child: "widget" },
|
|
10
|
+
],
|
|
11
|
+
resource: { shape: "single", resourceType: WIDGET_RESOURCE_TYPE, adoptable: true },
|
|
12
|
+
data: NO_DATA,
|
|
13
|
+
lifecycle: NO_LIFECYCLE,
|
|
14
|
+
canvas: NO_CANVAS,
|
|
15
|
+
catalog: NO_CATALOG,
|
|
16
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type OrgRefLookup, type WorkspaceAspect } from "../../engine/build/context.js";
|
|
2
|
+
import { type ChildResourceScope, type TfBlock, type TfValue } from "../../engine/tf/index.js";
|
|
3
|
+
import type { Filter } from "../shared/filters/types.js";
|
|
4
|
+
interface RefWire {
|
|
5
|
+
readonly __kind?: string;
|
|
6
|
+
readonly refName?: string;
|
|
7
|
+
readonly name?: string;
|
|
8
|
+
readonly namespace?: string;
|
|
9
|
+
readonly parent?: string;
|
|
10
|
+
readonly fieldType?: string;
|
|
11
|
+
}
|
|
12
|
+
interface WidgetParameterWire {
|
|
13
|
+
readonly name?: string;
|
|
14
|
+
readonly fieldType?: string;
|
|
15
|
+
readonly multiple?: boolean;
|
|
16
|
+
readonly required?: boolean;
|
|
17
|
+
readonly field?: RefWire | string;
|
|
18
|
+
readonly value?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface AppWidgetWire {
|
|
21
|
+
readonly type?: "relatedRecords" | "linkRecords" | "createRecord" | "runAutomation";
|
|
22
|
+
readonly name?: string;
|
|
23
|
+
readonly target?: RefWire | string;
|
|
24
|
+
readonly columns?: readonly (RefWire | string)[];
|
|
25
|
+
readonly rows?: number;
|
|
26
|
+
readonly buttonType?: "INLINE" | "PRIMARY" | "SECONDARY";
|
|
27
|
+
readonly color?: string;
|
|
28
|
+
readonly icon?: string;
|
|
29
|
+
readonly fullWidth?: boolean;
|
|
30
|
+
readonly filter?: Filter;
|
|
31
|
+
readonly automation?: RefWire | string;
|
|
32
|
+
readonly parameters?: readonly WidgetParameterWire[];
|
|
33
|
+
}
|
|
34
|
+
export interface WidgetsToTfOptions {
|
|
35
|
+
readonly ownerRefName: string;
|
|
36
|
+
readonly ownerTfLabel: string;
|
|
37
|
+
readonly ownerType: "elementum_app" | "elementum_element";
|
|
38
|
+
readonly scope: ChildResourceScope;
|
|
39
|
+
readonly objectId: TfValue;
|
|
40
|
+
readonly orgRefs: OrgRefLookup;
|
|
41
|
+
readonly workspaceAspects?: ReadonlyMap<string, WorkspaceAspect>;
|
|
42
|
+
readonly diagnostics: string[];
|
|
43
|
+
}
|
|
44
|
+
export declare function widgetsToTf(widgets: Readonly<Record<string, AppWidgetWire>> | undefined, opts: WidgetsToTfOptions): TfBlock[];
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { workspaceAspectKey } from "../../engine/build/context.js";
|
|
2
|
+
import { resolveForeignRef } from "../shared/foreign-ref.js";
|
|
3
|
+
import { expr, isCanonicalTsLabel, sanitizeName, scopedResourceLabel, tsLabelToTfLabel, } from "../../engine/tf/index.js";
|
|
4
|
+
import { AUTOMATION_RESOURCE_TYPE } from "../automation/types.js";
|
|
5
|
+
import { fieldRefToTfValue } from "../field/to-tf.js";
|
|
6
|
+
import { WIDGET_RESOURCE_TYPE } from "./module.js";
|
|
7
|
+
import { filterToTf } from "../access-policy/to-tf.js";
|
|
8
|
+
export function widgetsToTf(widgets, opts) {
|
|
9
|
+
const blocks = [];
|
|
10
|
+
for (const [key, widget] of Object.entries(widgets ?? {})) {
|
|
11
|
+
const where = `widgets.${key}`;
|
|
12
|
+
if (!isCanonicalTsLabel(key)) {
|
|
13
|
+
opts.diagnostics.push(`${where}: key is not a canonical tsLabel; dropped`);
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
const attrs = { object_id: opts.objectId };
|
|
17
|
+
switch (widget.type) {
|
|
18
|
+
case "relatedRecords": {
|
|
19
|
+
const target = resolveAspect(widget.target, `${where}.target`, opts);
|
|
20
|
+
if (target === undefined)
|
|
21
|
+
continue;
|
|
22
|
+
const body = { name: widget.name ?? "", object_id: target.value };
|
|
23
|
+
const columns = resolveColumns(widget.columns, target, `${where}.columns`, opts);
|
|
24
|
+
if (columns.length > 0)
|
|
25
|
+
body["columns"] = columns;
|
|
26
|
+
if (widget.rows !== undefined)
|
|
27
|
+
body["rows"] = widget.rows;
|
|
28
|
+
attrs["related_object"] = body;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
case "linkRecords": {
|
|
32
|
+
const target = resolveAspect(widget.target, `${where}.target`, opts);
|
|
33
|
+
if (target === undefined)
|
|
34
|
+
continue;
|
|
35
|
+
const body = buttonBody(widget);
|
|
36
|
+
body["object_id"] = target.value;
|
|
37
|
+
const columns = resolveColumns(widget.columns, target, `${where}.columns`, opts);
|
|
38
|
+
if (columns.length > 0)
|
|
39
|
+
body["columns"] = columns;
|
|
40
|
+
if (widget.rows !== undefined)
|
|
41
|
+
body["rows"] = widget.rows;
|
|
42
|
+
if (widget.filter !== undefined)
|
|
43
|
+
body["filter"] = filterToTf(widget.filter, `${where}.filter`, {
|
|
44
|
+
ownerTfLabel: opts.ownerTfLabel,
|
|
45
|
+
scope: opts.scope,
|
|
46
|
+
objectId: opts.objectId,
|
|
47
|
+
diagnostics: opts.diagnostics,
|
|
48
|
+
orgRefs: opts.orgRefs,
|
|
49
|
+
});
|
|
50
|
+
attrs["related_link_action"] = body;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
case "createRecord": {
|
|
54
|
+
const target = resolveAspect(widget.target, `${where}.target`, opts);
|
|
55
|
+
if (target === undefined)
|
|
56
|
+
continue;
|
|
57
|
+
const body = buttonBody(widget);
|
|
58
|
+
body["object_id"] = target.value;
|
|
59
|
+
attrs["related_create_action"] = body;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case "runAutomation": {
|
|
63
|
+
const automationId = resolveAutomation(widget.automation, `${where}.automation`, opts);
|
|
64
|
+
if (automationId === undefined)
|
|
65
|
+
continue;
|
|
66
|
+
const body = buttonBody(widget);
|
|
67
|
+
body["automation_id"] = automationId;
|
|
68
|
+
if (widget.parameters !== undefined) {
|
|
69
|
+
body["parameters"] = widget.parameters.map((parameter, index) => {
|
|
70
|
+
const fieldId = resolveOwnerField(parameter.field, `${where}.parameters[${index}].field`, opts);
|
|
71
|
+
if (fieldId !== undefined && parameter.value !== undefined) {
|
|
72
|
+
opts.diagnostics.push(`${where}.parameters[${index}]: field and value are mutually exclusive; value dropped`);
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
name: parameter.name ?? "",
|
|
76
|
+
field_type: parameter.fieldType ?? "TEXT",
|
|
77
|
+
multiple: parameter.multiple ?? false,
|
|
78
|
+
required: parameter.required ?? false,
|
|
79
|
+
field_id: fieldId ?? null,
|
|
80
|
+
value: fieldId === undefined ? parameter.value ?? null : null,
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
attrs["run_automation_action"] = body;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
default:
|
|
88
|
+
opts.diagnostics.push(`${where}: unsupported widget type ${JSON.stringify(widget.type)}; dropped`);
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
blocks.push({
|
|
92
|
+
kind: "resource",
|
|
93
|
+
type: WIDGET_RESOURCE_TYPE,
|
|
94
|
+
label: scopedResourceLabel(opts.ownerTfLabel, tsLabelToTfLabel(key), opts.scope),
|
|
95
|
+
attrs,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return blocks;
|
|
99
|
+
}
|
|
100
|
+
function buttonBody(widget) {
|
|
101
|
+
const body = {
|
|
102
|
+
name: widget.name ?? "",
|
|
103
|
+
button_type: widget.buttonType ?? "INLINE",
|
|
104
|
+
};
|
|
105
|
+
if (widget.color !== undefined)
|
|
106
|
+
body["color"] = widget.color;
|
|
107
|
+
if (widget.icon !== undefined)
|
|
108
|
+
body["icon"] = widget.icon;
|
|
109
|
+
if (widget.fullWidth !== undefined)
|
|
110
|
+
body["full_width"] = widget.fullWidth;
|
|
111
|
+
return body;
|
|
112
|
+
}
|
|
113
|
+
function resolveAspect(value, where, opts) {
|
|
114
|
+
if (typeof value === "string")
|
|
115
|
+
return { value, managed: false };
|
|
116
|
+
const kind = value?.__kind === "element" ? "element" : "app";
|
|
117
|
+
const refName = value?.refName ?? "";
|
|
118
|
+
if (kind === opts.scope && refName === opts.ownerRefName) {
|
|
119
|
+
return { value: opts.objectId, kind, refName, tfLabel: opts.ownerTfLabel, managed: true };
|
|
120
|
+
}
|
|
121
|
+
const sibling = opts.workspaceAspects?.get(workspaceAspectKey(kind, refName));
|
|
122
|
+
if (sibling !== undefined) {
|
|
123
|
+
const type = kind === "app" ? "elementum_app" : "elementum_element";
|
|
124
|
+
return { value: expr.resourceAttr(type, sibling.tfLabel, ["id"]), kind, refName, tfLabel: sibling.tfLabel, managed: true };
|
|
125
|
+
}
|
|
126
|
+
const name = value?.name ?? refName;
|
|
127
|
+
if (name === "") {
|
|
128
|
+
opts.diagnostics.push(`${where}: target has no name/refName; dropped`);
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
const namespace = value?.namespace;
|
|
132
|
+
const foreign = resolveForeignRef(kind, { name, namespace }, opts.orgRefs, opts.diagnostics, where);
|
|
133
|
+
return {
|
|
134
|
+
value: foreign.value,
|
|
135
|
+
kind,
|
|
136
|
+
refName,
|
|
137
|
+
tfLabel: foreign.tfLabel,
|
|
138
|
+
managed: false,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function resolveColumns(columns, target, where, opts) {
|
|
142
|
+
const out = [];
|
|
143
|
+
for (const [index, value] of (columns ?? []).entries()) {
|
|
144
|
+
if (typeof value === "string") {
|
|
145
|
+
out.push(value);
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
if (value == null) {
|
|
149
|
+
opts.diagnostics.push(`${where}[${index}]: field reference is unresolved (skipped during extract); dropped`);
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
const refName = value.refName ?? "";
|
|
153
|
+
if (refName === "") {
|
|
154
|
+
opts.diagnostics.push(`${where}[${index}]: field has no refName; dropped`);
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
if (value.parent !== undefined && target.refName !== undefined && value.parent !== target.refName) {
|
|
158
|
+
opts.diagnostics.push(`${where}[${index}]: field belongs to ${JSON.stringify(value.parent)}, not target ${JSON.stringify(target.refName)}; dropped`);
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (target.managed && target.kind !== undefined && target.tfLabel !== undefined) {
|
|
162
|
+
const direct = fieldRefToTfValue(value.fieldType ?? "", refName, target.tfLabel, target.kind);
|
|
163
|
+
if (direct !== undefined) {
|
|
164
|
+
out.push(direct);
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (target.kind !== undefined) {
|
|
169
|
+
const label = sanitizeName(`${target.kind}_${target.tfLabel ?? target.refName ?? "target"}_${value.name ?? refName}`);
|
|
170
|
+
opts.orgRefs.foreignField("elementum_field", label, target.value, value.name ?? refName);
|
|
171
|
+
out.push(expr.dataAttr("elementum_field", label, ["id"]));
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
opts.diagnostics.push(`${where}[${index}]: a typed field needs a typed app/element target; dropped`);
|
|
175
|
+
}
|
|
176
|
+
return out;
|
|
177
|
+
}
|
|
178
|
+
function resolveAutomation(value, where, opts) {
|
|
179
|
+
if (typeof value === "string")
|
|
180
|
+
return value;
|
|
181
|
+
const refName = value?.refName ?? "";
|
|
182
|
+
if (refName === "") {
|
|
183
|
+
opts.diagnostics.push(`${where}: automation has no refName; dropped`);
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
|
186
|
+
if (value?.parent !== undefined && value.parent !== opts.ownerRefName) {
|
|
187
|
+
opts.diagnostics.push(`${where}: foreign automation references require a provider data lookup with app_id; use a raw id until that data-source tranche lands`);
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
return expr.resourceAttr(AUTOMATION_RESOURCE_TYPE, scopedResourceLabel(opts.ownerTfLabel, tsLabelToTfLabel(refName), opts.scope), ["id"]);
|
|
191
|
+
}
|
|
192
|
+
function resolveOwnerField(value, where, opts) {
|
|
193
|
+
if (typeof value === "string")
|
|
194
|
+
return value;
|
|
195
|
+
if (value === undefined)
|
|
196
|
+
return undefined;
|
|
197
|
+
const refName = value.refName ?? "";
|
|
198
|
+
if (value.parent !== undefined && value.parent !== opts.ownerRefName) {
|
|
199
|
+
opts.diagnostics.push(`${where}: field belongs to a different aspect; dropped`);
|
|
200
|
+
return undefined;
|
|
201
|
+
}
|
|
202
|
+
const resolved = fieldRefToTfValue(value.fieldType ?? "", refName, opts.ownerTfLabel, opts.scope);
|
|
203
|
+
if (resolved === undefined)
|
|
204
|
+
opts.diagnostics.push(`${where}: field ${JSON.stringify(refName)} has no Terraform mapping; dropped`);
|
|
205
|
+
return resolved;
|
|
206
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Moves onto each kind's CatalogFacet when its module lands.
|
|
4
4
|
*/
|
|
5
5
|
import type { CatalogRenderArgs, CatalogRenderResult } from "./types.js";
|
|
6
|
-
/** Simple `{ name }` / optional parent
|
|
6
|
+
/** Simple `{ name }` / optional parent for deferred catalog stubs. */
|
|
7
7
|
export declare function renderDeferredNamedEntry(factoryName: string, opts?: {
|
|
8
8
|
readonly omitParent?: boolean;
|
|
9
9
|
}): (args: CatalogRenderArgs) => CatalogRenderResult;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Moves onto each kind's CatalogFacet when its module lands.
|
|
4
4
|
*/
|
|
5
5
|
import { asNamedRef, namedFactoryEntry, } from "../catalog/render-helpers.js";
|
|
6
|
-
/** Simple `{ name }` / optional parent
|
|
6
|
+
/** Simple `{ name }` / optional parent for deferred catalog stubs. */
|
|
7
7
|
export function renderDeferredNamedEntry(factoryName, opts) {
|
|
8
8
|
return (args) => {
|
|
9
9
|
const named = asNamedRef(args.ref);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { type CatalogRenderArgs, type CatalogRenderResult, type EntityKindModule, type KindId, type ParentEdge, matchType } from "./types.js";
|
|
5
5
|
export type { AuthoringFacet, CanvasComponentId, CanvasFacet, CanvasView, CatalogAuthoringArgs, CatalogFacet, CatalogRenderArgs, CatalogRenderResult, CatalogRoot, DataFacet, DataFacetCatalogKind, EntityKindId, EntityKindModule, KindId, LifecycleFacet, OrgIdentityBag, ParentEdge, ParentageFacet, ResourceFacet, StreamFacet, StreamMatch, StreamPartition, StreamRootExtractResult, ToTfResult, } from "./types.js";
|
|
6
|
+
export type { ReferenceLookupStrategy } from "./types.js";
|
|
6
7
|
export { NO_CANVAS, NO_CATALOG, NO_DATA, NO_LIFECYCLE, defaultMatchResourceType, implementedResourceTypes, isResourceAdoptable, isTfLive, knownResourceTypes, matchType, singleResourceType, } from "./types.js";
|
|
7
8
|
export { KIND_MODULES } from "./modules.js";
|
|
8
9
|
/** @deprecated Use {@link KIND_MODULES}. */
|
|
@@ -15,12 +16,15 @@ export interface ResourceKindModule {
|
|
|
15
16
|
}
|
|
16
17
|
/** Modules whose data facet participates (not {@link NO_DATA}). */
|
|
17
18
|
export declare const DATA_FACET_MODULES: readonly EntityKindModule[];
|
|
19
|
+
/** Generic direct-reference registry. Resolver engines inspect strategies,
|
|
20
|
+
* never entity/provider names. */
|
|
21
|
+
export declare const REFERENCE_LOOKUP_MODULES: readonly EntityKindModule[];
|
|
18
22
|
/** Data source type → module (replaces ORG_KIND_BY_TYPE). */
|
|
19
23
|
export declare const DATA_FACET_BY_TYPE: ReadonlyMap<string, EntityKindModule>;
|
|
20
24
|
/** Org identity bags written by `edk pull org` (data.orgBag set). */
|
|
21
25
|
export declare const ORG_IDENTITY_BAGS: readonly EntityKindModule[];
|
|
22
26
|
/**
|
|
23
|
-
* `
|
|
27
|
+
* `aiProvider({ type })` identifiers → their terraform resource type —
|
|
24
28
|
* one entry per `ai-provider-*` kind, derived from the kind id so authored
|
|
25
29
|
* source never has to name a resource type directly.
|
|
26
30
|
*/
|
|
@@ -40,6 +44,13 @@ export declare const BUILD_VS_EXPORT_REFERENCE_ALIASES: {
|
|
|
40
44
|
readonly fromType: string;
|
|
41
45
|
readonly toType: string;
|
|
42
46
|
}[];
|
|
47
|
+
/** Entity-declared typed-data-vs-resolved-literal equivalences for export comparison. */
|
|
48
|
+
export declare const BUILD_VS_EXPORT_RESOLVED_DATA_REFERENCE_EQUIVALENCES: {
|
|
49
|
+
attribute: string;
|
|
50
|
+
nestedAttribute: string;
|
|
51
|
+
dataType: string;
|
|
52
|
+
blockType: string;
|
|
53
|
+
}[];
|
|
43
54
|
/** Kind id → module. */
|
|
44
55
|
export declare const KIND_BY_ID: ReadonlyMap<KindId, EntityKindModule>;
|
|
45
56
|
/** @deprecated Use {@link KIND_BY_ID}. */
|
|
@@ -10,11 +10,14 @@ export { KIND_MODULES } from "./modules.js";
|
|
|
10
10
|
export const ENTITY_KIND_MODULES = KIND_MODULES;
|
|
11
11
|
/** Modules whose data facet participates (not {@link NO_DATA}). */
|
|
12
12
|
export const DATA_FACET_MODULES = KIND_MODULES.filter((m) => m.data.participates);
|
|
13
|
+
/** Generic direct-reference registry. Resolver engines inspect strategies,
|
|
14
|
+
* never entity/provider names. */
|
|
15
|
+
export const REFERENCE_LOOKUP_MODULES = DATA_FACET_MODULES.filter((m) => m.data.participates && (m.data.referenceLookups?.length ?? 0) > 0);
|
|
13
16
|
/** Data source type → module (replaces ORG_KIND_BY_TYPE). */
|
|
14
17
|
export const DATA_FACET_BY_TYPE = (() => {
|
|
15
18
|
const map = new Map();
|
|
16
19
|
for (const m of DATA_FACET_MODULES) {
|
|
17
|
-
const type = singleResourceType(m);
|
|
20
|
+
const type = m.data.participates ? m.data.resourceType ?? singleResourceType(m) : undefined;
|
|
18
21
|
if (type !== undefined)
|
|
19
22
|
map.set(type, m);
|
|
20
23
|
}
|
|
@@ -24,7 +27,7 @@ export const DATA_FACET_BY_TYPE = (() => {
|
|
|
24
27
|
export const ORG_IDENTITY_BAGS = DATA_FACET_MODULES.filter((m) => m.data.participates && m.data.orgBag !== undefined);
|
|
25
28
|
const AI_PROVIDER_KIND_PREFIX = "ai-provider-";
|
|
26
29
|
/**
|
|
27
|
-
* `
|
|
30
|
+
* `aiProvider({ type })` identifiers → their terraform resource type —
|
|
28
31
|
* one entry per `ai-provider-*` kind, derived from the kind id so authored
|
|
29
32
|
* source never has to name a resource type directly.
|
|
30
33
|
*/
|
|
@@ -46,12 +49,14 @@ export const ADOPTABLE_RESOURCE_TYPES = new Set(KIND_MODULES.filter((m) => isTfL
|
|
|
46
49
|
export const BUILD_VS_EXPORT_SCOPE_TYPES = new Set([
|
|
47
50
|
...KIND_MODULES.filter(isTfLive).flatMap((m) => implementedResourceTypes(m.resource)),
|
|
48
51
|
...DATA_FACET_MODULES.filter((m) => m.data.participates && m.data.referencedByBuild).flatMap((m) => {
|
|
49
|
-
const type = singleResourceType(m);
|
|
52
|
+
const type = m.data.participates ? m.data.resourceType ?? singleResourceType(m) : undefined;
|
|
50
53
|
return type !== undefined ? [type] : [];
|
|
51
54
|
}),
|
|
52
55
|
]);
|
|
53
56
|
/** Entity-declared reference aliases normalized by the live round-trip gate. */
|
|
54
57
|
export const BUILD_VS_EXPORT_REFERENCE_ALIASES = KIND_MODULES.flatMap((module) => module.roundtrip?.referenceAliases ?? []);
|
|
58
|
+
/** Entity-declared typed-data-vs-resolved-literal equivalences for export comparison. */
|
|
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 }))));
|
|
55
60
|
/** Kind id → module. */
|
|
56
61
|
export const KIND_BY_ID = new Map(KIND_MODULES.map((m) => [m.kind, m]));
|
|
57
62
|
/** @deprecated Use {@link KIND_BY_ID}. */
|
|
@@ -137,22 +142,6 @@ function catalogMetaOf(facet) {
|
|
|
137
142
|
* (triggerParameter, tableColumn, …) stay residual.
|
|
138
143
|
*/
|
|
139
144
|
const DEFERRED_CATALOG_META = [
|
|
140
|
-
{
|
|
141
|
-
refKind: "flow",
|
|
142
|
-
catalogBag: "flows",
|
|
143
|
-
renderOrder: 25,
|
|
144
|
-
catalogRoot: "app",
|
|
145
|
-
factoryName: "flowRef",
|
|
146
|
-
renderEntry: renderDeferredNamedEntry("flowRef"),
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
refKind: "approvalChain",
|
|
150
|
-
catalogBag: "approvalChains",
|
|
151
|
-
renderOrder: 26,
|
|
152
|
-
catalogRoot: "app",
|
|
153
|
-
factoryName: "approvalChainRef",
|
|
154
|
-
renderEntry: renderDeferredNamedEntry("approvalChainRef"),
|
|
155
|
-
},
|
|
156
145
|
{
|
|
157
146
|
refKind: "tableColumn",
|
|
158
147
|
catalogBag: "columns",
|