@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
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* it's reference-model-agnostic (typed params, no id resolution), so there's
|
|
9
9
|
* nothing to retarget; it relocates to a shared home at the cutover.
|
|
10
10
|
*/
|
|
11
|
-
import type {
|
|
11
|
+
import type { AppOrElementRef, DatamineRef, FieldRef } from "../../catalog/index.js";
|
|
12
|
+
import type { UnsafePlatformId } from "../../core/platform-id.js";
|
|
12
13
|
import type { RecordShape } from "../field/record-shape.js";
|
|
13
14
|
import { type InferTriggerType, type OnDemandTriggerOptions, type TriggerInputFieldDef, type TriggerInputSchema } from "../../core/triggers/on-demand.js";
|
|
14
15
|
import type { TriggerFieldTypeAlias } from "../shared/types/field-types.js";
|
|
@@ -17,26 +18,26 @@ import { type TriggerChain } from "./build.js";
|
|
|
17
18
|
/**
|
|
18
19
|
* The record a record-trigger fires on. `A` is the app/element ref passed as
|
|
19
20
|
* `app:` — when it's a real catalog ref (carries a `fields` bag), `record` is
|
|
20
|
-
* typed per-field via `RecordShape`; otherwise
|
|
21
|
-
* `
|
|
21
|
+
* typed per-field via `RecordShape`; otherwise only the synthetic `id` and
|
|
22
|
+
* `recordId` keys are available (see `RecordShape`'s doc comment).
|
|
22
23
|
*/
|
|
23
|
-
export interface RecordTriggerOutput<A extends
|
|
24
|
+
export interface RecordTriggerOutput<A extends AppOrElementRef = AppOrElementRef> {
|
|
24
25
|
readonly record: RecordShape<A>;
|
|
25
26
|
/** Raw ids of the fields that changed to fire this trigger (record-update only; empty on create). */
|
|
26
27
|
readonly changedFieldIds: readonly string[];
|
|
27
28
|
}
|
|
28
|
-
export interface RecordTriggerOptions<A extends
|
|
29
|
+
export interface RecordTriggerOptions<A extends AppOrElementRef = AppOrElementRef> {
|
|
29
30
|
readonly app: A;
|
|
30
31
|
/** Restrict to fire only when one of these fields changes. */
|
|
31
32
|
readonly changedFields?: readonly FieldRef[];
|
|
32
33
|
readonly thinkUi?: boolean;
|
|
33
34
|
/** Pre-built wire `Filter` (may embed `FieldRef` tokens — resolved at deploy). */
|
|
34
|
-
readonly filter?:
|
|
35
|
+
readonly filter?: Filter;
|
|
35
36
|
}
|
|
36
37
|
/** Fires when a record is created on the given aspect. */
|
|
37
|
-
export declare function recordCreated<A extends
|
|
38
|
+
export declare function recordCreated<A extends AppOrElementRef>(opts: RecordTriggerOptions<A>): TriggerChain<RecordTriggerOutput<A>>;
|
|
38
39
|
/** Fires when a record is updated on the given aspect. */
|
|
39
|
-
export declare function recordUpdated<A extends
|
|
40
|
+
export declare function recordUpdated<A extends AppOrElementRef>(opts: RecordTriggerOptions<A>): TriggerChain<RecordTriggerOutput<A>>;
|
|
40
41
|
export type ScheduleFrequency = "HOURLY" | "DAILY" | "WEEKLY" | "MONTHLY";
|
|
41
42
|
export type Weekday = "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY";
|
|
42
43
|
export interface ScheduleTriggerOptions {
|
|
@@ -98,36 +99,43 @@ export declare function webHook(opts?: WebhookTriggerOptions): TriggerChain<Webh
|
|
|
98
99
|
/** @deprecated Use {@link webHook}. */
|
|
99
100
|
export declare function webhook(opts?: WebhookTriggerOptions): TriggerChain<WebhookTriggerOutput>;
|
|
100
101
|
export type TemporalUnit = "MINUTES" | "HOURS" | "DAYS";
|
|
101
|
-
export interface TemporalTriggerOptions {
|
|
102
|
-
readonly app:
|
|
102
|
+
export interface TemporalTriggerOptions<A extends AppOrElementRef = AppOrElementRef> {
|
|
103
|
+
readonly app: A;
|
|
103
104
|
readonly field: FieldRef;
|
|
104
105
|
readonly temporalUnit: TemporalUnit;
|
|
105
106
|
readonly value: number;
|
|
106
107
|
}
|
|
107
108
|
/** Fires relative to a date/datetime field on records in the given aspect. */
|
|
108
|
-
export declare function temporal(opts: TemporalTriggerOptions): TriggerChain<RecordTriggerOutput
|
|
109
|
+
export declare function temporal<A extends AppOrElementRef>(opts: TemporalTriggerOptions<A>): TriggerChain<RecordTriggerOutput<A>>;
|
|
109
110
|
export type approvalProcessStatusUpdatedStatus = "ACTIVE" | "STEP_APPROVED" | "CANCELLED" | "DENIED" | "APPROVED";
|
|
110
|
-
export interface approvalProcessStatusUpdatedTriggerOptions {
|
|
111
|
-
readonly app:
|
|
111
|
+
export interface approvalProcessStatusUpdatedTriggerOptions<A extends AppOrElementRef = AppOrElementRef> {
|
|
112
|
+
readonly app: A;
|
|
112
113
|
readonly approvalChain: string;
|
|
113
114
|
readonly status: approvalProcessStatusUpdatedStatus;
|
|
114
115
|
}
|
|
115
116
|
/** Fires when an approval chain on a record changes to the configured status. */
|
|
116
|
-
export declare function approvalProcessStatusUpdated(opts: approvalProcessStatusUpdatedTriggerOptions): TriggerChain<RecordTriggerOutput
|
|
117
|
-
export interface AttachmentTriggerOptions<A extends
|
|
117
|
+
export declare function approvalProcessStatusUpdated<A extends AppOrElementRef>(opts: approvalProcessStatusUpdatedTriggerOptions<A>): TriggerChain<RecordTriggerOutput<A>>;
|
|
118
|
+
export interface AttachmentTriggerOptions<A extends AppOrElementRef = AppOrElementRef> {
|
|
118
119
|
readonly app: A;
|
|
119
120
|
readonly filter?: Filter;
|
|
120
121
|
readonly thinkUi?: boolean;
|
|
121
122
|
}
|
|
122
|
-
export interface AttachmentTriggerOutput<A extends
|
|
123
|
+
export interface AttachmentTriggerOutput<A extends AppOrElementRef = AppOrElementRef> {
|
|
123
124
|
readonly record: RecordShape<A>;
|
|
124
|
-
/**
|
|
125
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Trigger attachment payload. `id` is the live ATTACHMENT_ID wire key
|
|
127
|
+
* (`refs["Attachment Id"]`); remaining sub-fields (name/url/mediaType/…)
|
|
128
|
+
* aren't typed yet — follow-up.
|
|
129
|
+
*/
|
|
130
|
+
readonly attachment: {
|
|
131
|
+
readonly id: string;
|
|
132
|
+
readonly [key: string]: unknown;
|
|
133
|
+
};
|
|
126
134
|
}
|
|
127
135
|
/** Fires when an attachment is added to a record on the given aspect. */
|
|
128
|
-
export declare function attachment<A extends
|
|
136
|
+
export declare function attachment<A extends AppOrElementRef>(opts: AttachmentTriggerOptions<A>): TriggerChain<AttachmentTriggerOutput<A>>;
|
|
129
137
|
export interface DataMineTriggerOptions {
|
|
130
|
-
readonly
|
|
138
|
+
readonly datamine: DatamineRef | UnsafePlatformId;
|
|
131
139
|
readonly fireOnAlert?: boolean;
|
|
132
140
|
readonly fireOnRecovery?: boolean;
|
|
133
141
|
}
|
|
@@ -149,22 +157,22 @@ export interface EmailReceivedTriggerOutput {
|
|
|
149
157
|
}
|
|
150
158
|
/** Fires when an email is received by the platform email alias. */
|
|
151
159
|
export declare function emailReceived(opts: EmailReceivedTriggerOptions): TriggerChain<EmailReceivedTriggerOutput>;
|
|
152
|
-
export interface CommentAddedTriggerOptions<A extends
|
|
160
|
+
export interface CommentAddedTriggerOptions<A extends AppOrElementRef = AppOrElementRef> {
|
|
153
161
|
readonly app: A;
|
|
154
162
|
/** Conversation type the comment was added to (e.g. `"INTERNAL"`). */
|
|
155
163
|
readonly conversationType: string;
|
|
156
164
|
readonly filter?: Filter;
|
|
157
165
|
}
|
|
158
|
-
export interface CommentAddedTriggerOutput<A extends
|
|
166
|
+
export interface CommentAddedTriggerOutput<A extends AppOrElementRef = AppOrElementRef> {
|
|
159
167
|
readonly record: RecordShape<A>;
|
|
160
168
|
/** Comment sub-fields aren't typed yet — follow-up. */
|
|
161
169
|
readonly comment: Record<string, unknown>;
|
|
162
170
|
}
|
|
163
171
|
/** Fires when a comment is added to a record on the given aspect. */
|
|
164
|
-
export declare function commentAdded<A extends
|
|
172
|
+
export declare function commentAdded<A extends AppOrElementRef>(opts: CommentAddedTriggerOptions<A>): TriggerChain<CommentAddedTriggerOutput<A>>;
|
|
165
173
|
export type ConversationEndConversationType = "A2A" | "VOICE" | "EMAIL" | "SLACK" | "TEAMS";
|
|
166
174
|
export interface ConversationEndTriggerOptions {
|
|
167
|
-
readonly app:
|
|
175
|
+
readonly app: AppOrElementRef;
|
|
168
176
|
readonly conversationType: ConversationEndConversationType;
|
|
169
177
|
}
|
|
170
178
|
export interface ConversationEndTriggerOutput {
|
|
@@ -195,7 +203,7 @@ export interface SlackMessageTriggerOutput {
|
|
|
195
203
|
/** Fires when a Slack message is received. */
|
|
196
204
|
export declare function slackMessage(): TriggerChain<SlackMessageTriggerOutput>;
|
|
197
205
|
export interface SurveyResponseCreateTriggerOptions {
|
|
198
|
-
readonly app:
|
|
206
|
+
readonly app: AppOrElementRef;
|
|
199
207
|
/** Raw survey template id until surveys are catalog-modeled. */
|
|
200
208
|
readonly survey: string;
|
|
201
209
|
}
|
|
@@ -76,7 +76,13 @@ export function webHook(opts = {}) {
|
|
|
76
76
|
return chainableTrigger({
|
|
77
77
|
wire: {
|
|
78
78
|
webhook: {
|
|
79
|
-
|
|
79
|
+
// authenticated is schema-Optional but NOT Computed
|
|
80
|
+
// (webhook_trigger_resource.go) - omitting it from generated
|
|
81
|
+
// config when false reads to OpenTofu as "unset this" rather than
|
|
82
|
+
// "leave at the live false", diffing forever (edk#557, same defect
|
|
83
|
+
// class as the approval-chain approveButton fix, edk#325). Always
|
|
84
|
+
// emit it, defaulting to the platform's real false.
|
|
85
|
+
authenticated: opts.authenticated ?? false,
|
|
80
86
|
...(opts.customResponse !== undefined ? { customResponse: opts.customResponse } : {}),
|
|
81
87
|
},
|
|
82
88
|
},
|
|
@@ -134,7 +140,7 @@ export function dataMine(opts) {
|
|
|
134
140
|
return chainableTrigger({
|
|
135
141
|
wire: {
|
|
136
142
|
datamine: {
|
|
137
|
-
datamineId: opts.
|
|
143
|
+
datamineId: opts.datamine,
|
|
138
144
|
type: "DATAMINE",
|
|
139
145
|
...(opts.fireOnAlert !== undefined ? { fireOnAlert: opts.fireOnAlert } : {}),
|
|
140
146
|
...(opts.fireOnRecovery !== undefined ? { fireOnRecovery: opts.fireOnRecovery } : {}),
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
* kind the printer can't reconstruct would plan as a destroy on rebuild.
|
|
13
13
|
*
|
|
14
14
|
* `typeKey` is the wire discriminant the authoring builders emit
|
|
15
|
-
* (`triggers.ts` trigger `wire` keys, `tasks.ts` `
|
|
15
|
+
* (`triggers.ts` trigger `wire` keys, `tasks.ts` `ActionDef.key`); `resourceType`
|
|
16
16
|
* is the terraform type ei's export uses. Only the implemented rows' `typeKey`
|
|
17
17
|
* is load-bearing (to-tf maps authored → resource by it); the declared rows
|
|
18
18
|
* need only an accurate `resourceType` for from-tf recognition.
|
|
19
19
|
*/
|
|
20
20
|
export interface AutomationSubType {
|
|
21
|
-
/** Wire discriminant: a trigger `wire` key or a `
|
|
21
|
+
/** Wire discriminant: a trigger `wire` key or a `ActionDef.key`. */
|
|
22
22
|
readonly typeKey: string;
|
|
23
23
|
/** Terraform resource type, e.g. "elementum_on_demand_trigger". */
|
|
24
24
|
readonly resourceType: string;
|
|
@@ -28,6 +28,7 @@ export interface AutomationSubType {
|
|
|
28
28
|
/** The automation's own resource + its versioning/publish resource. */
|
|
29
29
|
export declare const AUTOMATION_RESOURCE_TYPE = "elementum_automation";
|
|
30
30
|
export declare const WORKFLOW_PUBLISH_RESOURCE_TYPE = "elementum_workflow_publish";
|
|
31
|
+
export declare const TABLE_RECORDS_SEARCH_TASK_RESOURCE_TYPE = "elementum_table_records_search_task";
|
|
31
32
|
/** Trigger kinds. One trigger per automation. Phase 1: onDemand only. */
|
|
32
33
|
export declare const TRIGGER_SUB_TYPES: readonly AutomationSubType[];
|
|
33
34
|
/**
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* kind the printer can't reconstruct would plan as a destroy on rebuild.
|
|
13
13
|
*
|
|
14
14
|
* `typeKey` is the wire discriminant the authoring builders emit
|
|
15
|
-
* (`triggers.ts` trigger `wire` keys, `tasks.ts` `
|
|
15
|
+
* (`triggers.ts` trigger `wire` keys, `tasks.ts` `ActionDef.key`); `resourceType`
|
|
16
16
|
* is the terraform type ei's export uses. Only the implemented rows' `typeKey`
|
|
17
17
|
* is load-bearing (to-tf maps authored → resource by it); the declared rows
|
|
18
18
|
* need only an accurate `resourceType` for from-tf recognition.
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
/** The automation's own resource + its versioning/publish resource. */
|
|
21
21
|
export const AUTOMATION_RESOURCE_TYPE = "elementum_automation";
|
|
22
22
|
export const WORKFLOW_PUBLISH_RESOURCE_TYPE = "elementum_workflow_publish";
|
|
23
|
+
export const TABLE_RECORDS_SEARCH_TASK_RESOURCE_TYPE = "elementum_table_records_search_task";
|
|
23
24
|
/** Trigger kinds. One trigger per automation. Phase 1: onDemand only. */
|
|
24
25
|
export const TRIGGER_SUB_TYPES = [
|
|
25
26
|
{ typeKey: "onDemand", resourceType: "elementum_on_demand_trigger", implemented: true },
|
|
@@ -51,7 +52,7 @@ export const TASK_SUB_TYPES = [
|
|
|
51
52
|
{ typeKey: "updateVariable", resourceType: "elementum_update_variable_task", implemented: true },
|
|
52
53
|
{ typeKey: "updateField", resourceType: "elementum_update_field_task", implemented: true },
|
|
53
54
|
{ typeKey: "recordSearch", resourceType: "elementum_record_search_task", implemented: true },
|
|
54
|
-
{ typeKey: "tableRecordsSearch", resourceType:
|
|
55
|
+
{ typeKey: "tableRecordsSearch", resourceType: TABLE_RECORDS_SEARCH_TASK_RESOURCE_TYPE, implemented: true },
|
|
55
56
|
{ typeKey: "createRecord", resourceType: "elementum_create_record_task", implemented: true },
|
|
56
57
|
{ typeKey: "findRelatedRecords", resourceType: "elementum_find_related_records_task", implemented: true },
|
|
57
58
|
{ typeKey: "relateRecords", resourceType: "elementum_relate_records_task", implemented: true },
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type AppCatalogRef, type AppOrElementRef, type ChartRef, type FieldRef, type TableColumnRef, type TableRef } from "../../catalog/index.js";
|
|
2
|
+
import type { DeployableEntity, EntityDeployOptions } from "../../engine/entity.js";
|
|
3
|
+
import type { Filter } from "../shared/filters/types.js";
|
|
4
|
+
import type { ChartAggregation, ChartColumnValueType, ChartJoinType, ChartType } from "./types.js";
|
|
5
|
+
export { chartAggregation, chartColumnValueType, chartJoinType, chartType, type ChartAggregation, type ChartColumnValueType, type ChartJoinType, type ChartType, } from "./types.js";
|
|
6
|
+
export type ChartDatasourceRef = AppOrElementRef | TableRef;
|
|
7
|
+
type RefBagValue<T> = T extends Readonly<Record<string, infer Value>> ? Value : never;
|
|
8
|
+
export type ChartFieldFor<Datasource> = Datasource extends {
|
|
9
|
+
readonly __kind: "table";
|
|
10
|
+
readonly columns?: infer Columns;
|
|
11
|
+
} ? Extract<RefBagValue<NonNullable<Columns>>, TableColumnRef> : Datasource extends {
|
|
12
|
+
readonly fields: infer Fields;
|
|
13
|
+
} ? Extract<RefBagValue<Fields>, FieldRef> : Datasource extends AppOrElementRef<infer Parent> ? FieldRef<Parent> : Datasource extends TableRef<infer Parent> ? TableColumnRef<Parent> : never;
|
|
14
|
+
interface ChartColumnBase {
|
|
15
|
+
readonly name?: string;
|
|
16
|
+
}
|
|
17
|
+
export type ChartColumn<Datasource extends ChartDatasourceRef = ChartDatasourceRef> = (ChartColumnBase & {
|
|
18
|
+
readonly field?: ChartFieldFor<Datasource>;
|
|
19
|
+
readonly aggregation: ChartAggregation;
|
|
20
|
+
readonly value?: never;
|
|
21
|
+
readonly valueType?: never;
|
|
22
|
+
readonly expression?: never;
|
|
23
|
+
}) | (ChartColumnBase & {
|
|
24
|
+
readonly value: string;
|
|
25
|
+
readonly valueType: ChartColumnValueType;
|
|
26
|
+
readonly field?: never;
|
|
27
|
+
readonly aggregation?: never;
|
|
28
|
+
readonly expression?: never;
|
|
29
|
+
});
|
|
30
|
+
export interface ChartGroupBy<Datasource extends ChartDatasourceRef = ChartDatasourceRef> {
|
|
31
|
+
readonly field: ChartFieldFor<Datasource>;
|
|
32
|
+
}
|
|
33
|
+
declare const chartJoinBrand: unique symbol;
|
|
34
|
+
export interface ChartJoin<From extends ChartDatasourceRef = ChartDatasourceRef, To extends ChartDatasourceRef = ChartDatasourceRef> {
|
|
35
|
+
readonly [chartJoinBrand]: {
|
|
36
|
+
readonly from: From;
|
|
37
|
+
readonly to: To;
|
|
38
|
+
};
|
|
39
|
+
readonly datasource: To;
|
|
40
|
+
readonly leftField?: ChartFieldFor<From>;
|
|
41
|
+
readonly rightField?: ChartFieldFor<To>;
|
|
42
|
+
readonly type?: ChartJoinType;
|
|
43
|
+
}
|
|
44
|
+
type ChartJoinSides<From extends ChartDatasourceRef, To extends ChartDatasourceRef> = {
|
|
45
|
+
readonly leftField: ChartFieldFor<From>;
|
|
46
|
+
readonly rightField: ChartFieldFor<To>;
|
|
47
|
+
readonly leftExpression?: never;
|
|
48
|
+
readonly rightExpression?: never;
|
|
49
|
+
};
|
|
50
|
+
/** Define an ownership-checked join used by a chart subscription. */
|
|
51
|
+
export declare function chartJoin<const From extends ChartDatasourceRef, const To extends ChartDatasourceRef>(opts: {
|
|
52
|
+
readonly from: From;
|
|
53
|
+
readonly datasource: To;
|
|
54
|
+
readonly type?: ChartJoinType;
|
|
55
|
+
} & ChartJoinSides<NoInfer<From>, NoInfer<To>>): ChartJoin<From, To>;
|
|
56
|
+
declare const chartSubscriptionBrand: unique symbol;
|
|
57
|
+
export interface ChartSubscription<Datasource extends ChartDatasourceRef = ChartDatasourceRef> {
|
|
58
|
+
readonly [chartSubscriptionBrand]: Datasource;
|
|
59
|
+
readonly datasource: Datasource;
|
|
60
|
+
readonly columns: readonly ChartColumn<Datasource>[];
|
|
61
|
+
readonly groupBy?: readonly ChartGroupBy<Datasource>[];
|
|
62
|
+
readonly joins?: readonly ChartJoin<Datasource, ChartDatasourceRef>[];
|
|
63
|
+
readonly filter?: Filter<ChartFieldFor<Datasource>, never>;
|
|
64
|
+
readonly limit?: string;
|
|
65
|
+
readonly tags?: readonly string[];
|
|
66
|
+
}
|
|
67
|
+
/** Build a chart subscription while preserving datasource/field ownership. */
|
|
68
|
+
export declare function chartSubscription<const Datasource extends ChartDatasourceRef>(opts: Omit<ChartSubscription<Datasource>, typeof chartSubscriptionBrand | "columns" | "groupBy" | "joins"> & {
|
|
69
|
+
readonly columns: readonly ChartColumn<NoInfer<Datasource>>[];
|
|
70
|
+
readonly groupBy?: readonly ChartGroupBy<NoInfer<Datasource>>[];
|
|
71
|
+
readonly joins?: readonly ChartJoin<NoInfer<Datasource>, ChartDatasourceRef>[];
|
|
72
|
+
}): ChartSubscription<Datasource>;
|
|
73
|
+
export interface ChartProperties {
|
|
74
|
+
readonly beginAtZero?: boolean;
|
|
75
|
+
readonly fill?: boolean;
|
|
76
|
+
readonly horizontal?: boolean;
|
|
77
|
+
readonly legend?: boolean;
|
|
78
|
+
readonly stacked?: boolean;
|
|
79
|
+
readonly target?: number;
|
|
80
|
+
}
|
|
81
|
+
export interface DefineChartOptions<AppRefName extends string = string> extends EntityDeployOptions {
|
|
82
|
+
/** Logical owner used for catalog placement and dashboard ownership checks. */
|
|
83
|
+
readonly app: AppCatalogRef<AppRefName>;
|
|
84
|
+
readonly name: string;
|
|
85
|
+
readonly type: ChartType;
|
|
86
|
+
readonly target?: number;
|
|
87
|
+
readonly properties?: ChartProperties;
|
|
88
|
+
readonly subscriptions: readonly ChartSubscription[];
|
|
89
|
+
}
|
|
90
|
+
export interface ChartConfigured<AppRefName extends string = string> {
|
|
91
|
+
ref<const RefName extends string>(refName: RefName): ChartRef<AppRefName, RefName>;
|
|
92
|
+
def(refName: string): DeployableEntity;
|
|
93
|
+
}
|
|
94
|
+
/** Define an app-owned chart resource for use by dashboard chart widgets. */
|
|
95
|
+
export declare function defineChart<const AppRefName extends string>(opts: DefineChartOptions<AppRefName>): ChartConfigured<AppRefName>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { slimTokens, } from "../../catalog/index.js";
|
|
2
|
+
export { chartAggregation, chartColumnValueType, chartJoinType, chartType, } from "./types.js";
|
|
3
|
+
/** Define an ownership-checked join used by a chart subscription. */
|
|
4
|
+
export function chartJoin(opts) {
|
|
5
|
+
const { from: _from, ...wire } = opts;
|
|
6
|
+
return wire;
|
|
7
|
+
}
|
|
8
|
+
/** Build a chart subscription while preserving datasource/field ownership. */
|
|
9
|
+
export function chartSubscription(opts) {
|
|
10
|
+
return opts;
|
|
11
|
+
}
|
|
12
|
+
function validateChart(refName, opts) {
|
|
13
|
+
const fail = (message) => { throw new Error(`defineChart "${refName}": ${message}`); };
|
|
14
|
+
if (opts.app.__kind !== "app")
|
|
15
|
+
fail("app must be an app catalog ref");
|
|
16
|
+
if (opts.name.trim() === "")
|
|
17
|
+
fail("name must not be empty");
|
|
18
|
+
if (opts.subscriptions.length === 0)
|
|
19
|
+
fail("at least one subscription is required");
|
|
20
|
+
for (const [index, subscription] of opts.subscriptions.entries()) {
|
|
21
|
+
if (subscription.columns.length === 0)
|
|
22
|
+
fail(`subscriptions[${index}] must include at least one column`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Define an app-owned chart resource for use by dashboard chart widgets. */
|
|
26
|
+
export function defineChart(opts) {
|
|
27
|
+
return {
|
|
28
|
+
ref(refName) {
|
|
29
|
+
return { __kind: "chart", refName, name: opts.name, parent: opts.app.refName };
|
|
30
|
+
},
|
|
31
|
+
def(refName) {
|
|
32
|
+
validateChart(refName, opts);
|
|
33
|
+
return {
|
|
34
|
+
kind: "chart",
|
|
35
|
+
parent: opts.app.refName,
|
|
36
|
+
refName,
|
|
37
|
+
payload: slimTokens(opts),
|
|
38
|
+
...(opts.enabled !== undefined ? { enabled: opts.enabled } : {}),
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type FromTfContext } from "../../engine/pull/context.js";
|
|
2
|
+
import { type TfBlock } from "../../engine/tf/index.js";
|
|
3
|
+
import type { Filter } from "../shared/filters/types.js";
|
|
4
|
+
import type { ChartProperties } from "./build.js";
|
|
5
|
+
export interface NormalizedChartDatasource {
|
|
6
|
+
readonly kind: "app" | "element" | "table";
|
|
7
|
+
readonly refName: string;
|
|
8
|
+
readonly name?: string;
|
|
9
|
+
readonly local: boolean;
|
|
10
|
+
readonly tfLabel: string;
|
|
11
|
+
}
|
|
12
|
+
export interface NormalizedChartField {
|
|
13
|
+
readonly kind: "field" | "tableColumn";
|
|
14
|
+
readonly parentKind: "app" | "element" | "table";
|
|
15
|
+
readonly parentRefName: string;
|
|
16
|
+
readonly refName: string;
|
|
17
|
+
readonly name?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface NormalizedChartColumn {
|
|
20
|
+
readonly field?: NormalizedChartField;
|
|
21
|
+
readonly aggregation?: string;
|
|
22
|
+
readonly name?: string;
|
|
23
|
+
readonly value?: string;
|
|
24
|
+
readonly valueType?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface NormalizedChartGroupBy {
|
|
27
|
+
readonly field: NormalizedChartField;
|
|
28
|
+
}
|
|
29
|
+
export interface NormalizedChartJoin {
|
|
30
|
+
readonly datasource: NormalizedChartDatasource;
|
|
31
|
+
readonly leftField: NormalizedChartField;
|
|
32
|
+
readonly rightField: NormalizedChartField;
|
|
33
|
+
readonly type?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface NormalizedChartSubscription {
|
|
36
|
+
readonly datasource: NormalizedChartDatasource;
|
|
37
|
+
readonly columns: readonly NormalizedChartColumn[];
|
|
38
|
+
readonly groupBy?: readonly NormalizedChartGroupBy[];
|
|
39
|
+
readonly joins?: readonly NormalizedChartJoin[];
|
|
40
|
+
readonly filter?: Filter<NormalizedChartField, never>;
|
|
41
|
+
readonly limit?: string;
|
|
42
|
+
readonly tags?: readonly string[];
|
|
43
|
+
}
|
|
44
|
+
export interface NormalizedChart {
|
|
45
|
+
readonly refName: string;
|
|
46
|
+
readonly name: string;
|
|
47
|
+
readonly type: string;
|
|
48
|
+
readonly target?: number;
|
|
49
|
+
readonly properties?: ChartProperties;
|
|
50
|
+
readonly subscriptions: readonly NormalizedChartSubscription[];
|
|
51
|
+
}
|
|
52
|
+
export declare function chartFromTf(block: TfBlock, opts: {
|
|
53
|
+
readonly appLabel: string;
|
|
54
|
+
readonly appRefName: string;
|
|
55
|
+
}, ctx: FromTfContext): NormalizedChart | undefined;
|