@elementumai/edk 0.0.0-oidc-bootstrap → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +462 -3
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +188 -0
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.js +20 -0
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent.d.ts +245 -0
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent.js +30 -0
- package/dist-sdk/elementum-entity-client/clients/ai-provider-connectors/models/ai-provider-connector.d.ts +18 -0
- package/dist-sdk/elementum-entity-client/clients/ai-provider-connectors/models/ai-provider-connector.js +8 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/aspect.d.ts +718 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/aspect.js +52 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/field-base.d.ts +23 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/field-base.js +1 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/field-types.d.ts +148 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/field-types.js +12 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/format.d.ts +63 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/format.js +17 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +39 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/index.js +35 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +116 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.js +11 -0
- package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +178 -0
- package/dist-sdk/elementum-entity-client/clients/automation/models/automation.js +18 -0
- package/dist-sdk/elementum-entity-client/clients/document-models/models/document-model.d.ts +200 -0
- package/dist-sdk/elementum-entity-client/clients/document-models/models/document-model.js +1 -0
- package/dist-sdk/elementum-entity-client/clients/search-tables/models/index.d.ts +1 -0
- package/dist-sdk/elementum-entity-client/clients/search-tables/models/index.js +1 -0
- package/dist-sdk/elementum-entity-client/clients/search-tables/models/search-table-wire.d.ts +141 -0
- package/dist-sdk/elementum-entity-client/clients/search-tables/models/search-table-wire.js +22 -0
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +123 -0
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.js +14 -0
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.d.ts +78 -0
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.js +23 -0
- package/dist-sdk/elementum-entity-client/clients/tables/models/index.d.ts +1 -0
- package/dist-sdk/elementum-entity-client/clients/tables/models/index.js +1 -0
- package/dist-sdk/elementum-entity-client/clients/tables/models/table-wire.d.ts +265 -0
- package/dist-sdk/elementum-entity-client/clients/tables/models/table-wire.js +15 -0
- package/dist-sdk/elementum-entity-client/errors.d.ts +90 -0
- package/dist-sdk/elementum-entity-client/errors.js +111 -0
- package/dist-sdk/elementum-entity-client/models/connection.d.ts +30 -0
- package/dist-sdk/elementum-entity-client/models/connection.js +16 -0
- package/dist-sdk/elementum-entity-client/types.d.ts +71 -0
- package/dist-sdk/elementum-entity-client/types.js +1 -0
- package/dist-sdk/fs/entity.d.ts +104 -0
- package/dist-sdk/fs/entity.js +52 -0
- package/dist-sdk/pull/util.d.ts +130 -0
- package/dist-sdk/pull/util.js +204 -0
- package/dist-sdk/src/catalog/ai-provider-models.d.ts +30 -0
- package/dist-sdk/src/catalog/ai-provider-models.js +63 -0
- package/dist-sdk/src/catalog/factories.d.ts +242 -0
- package/dist-sdk/src/catalog/factories.js +265 -0
- package/dist-sdk/src/catalog/from-authoring.d.ts +103 -0
- package/dist-sdk/src/catalog/from-authoring.js +467 -0
- package/dist-sdk/src/catalog/index.d.ts +12 -0
- package/dist-sdk/src/catalog/index.js +12 -0
- package/dist-sdk/src/catalog/org.d.ts +11 -0
- package/dist-sdk/src/catalog/org.js +288 -0
- package/dist-sdk/src/catalog/render-helpers.d.ts +35 -0
- package/dist-sdk/src/catalog/render-helpers.js +82 -0
- package/dist-sdk/src/catalog/render.d.ts +48 -0
- package/dist-sdk/src/catalog/render.js +193 -0
- package/dist-sdk/src/catalog/token.d.ts +10 -0
- package/dist-sdk/src/catalog/token.js +76 -0
- package/dist-sdk/src/catalog/types.d.ts +215 -0
- package/dist-sdk/src/catalog/types.js +86 -0
- package/dist-sdk/src/catalog/write.d.ts +43 -0
- package/dist-sdk/src/catalog/write.js +109 -0
- package/dist-sdk/src/core/app-to-ui.d.ts +22 -0
- package/dist-sdk/src/core/app-to-ui.js +75 -0
- package/dist-sdk/src/core/index.d.ts +10 -0
- package/dist-sdk/src/core/index.js +9 -0
- package/dist-sdk/src/core/system-fields.d.ts +95 -0
- package/dist-sdk/src/core/system-fields.js +153 -0
- package/dist-sdk/src/core/triggers/on-demand.d.ts +144 -0
- package/dist-sdk/src/core/triggers/on-demand.js +112 -0
- package/dist-sdk/src/core/types/ai-provider.d.ts +23 -0
- package/dist-sdk/src/core/types/ai-provider.js +8 -0
- package/dist-sdk/src/core/types/app.d.ts +857 -0
- package/dist-sdk/src/core/types/app.js +210 -0
- package/dist-sdk/src/core/types/aspect-category.d.ts +35 -0
- package/dist-sdk/src/core/types/aspect-category.js +33 -0
- package/dist-sdk/src/core/types/cloud-link.d.ts +34 -0
- package/dist-sdk/src/core/types/cloud-link.js +32 -0
- package/dist-sdk/src/core/types/display-block.d.ts +149 -0
- package/dist-sdk/src/core/types/display-block.js +61 -0
- package/dist-sdk/src/core/types/group.d.ts +13 -0
- package/dist-sdk/src/core/types/group.js +6 -0
- package/dist-sdk/src/core/types/platform.d.ts +2 -0
- package/dist-sdk/src/core/types/platform.js +1 -0
- package/dist-sdk/src/core/types/user.d.ts +20 -0
- package/dist-sdk/src/core/types/user.js +8 -0
- package/dist-sdk/src/core/wire/ref-serializer.d.ts +45 -0
- package/dist-sdk/src/core/wire/ref-serializer.js +89 -0
- package/dist-sdk/src/engine/build/context.d.ts +67 -0
- package/dist-sdk/src/engine/build/context.js +6 -0
- package/dist-sdk/src/engine/build/source-context.d.ts +45 -0
- package/dist-sdk/src/engine/build/source-context.js +23 -0
- package/dist-sdk/src/engine/entity.d.ts +44 -0
- package/dist-sdk/src/engine/entity.js +15 -0
- package/dist-sdk/src/engine/pull/context.d.ts +38 -0
- package/dist-sdk/src/engine/pull/context.js +44 -0
- package/dist-sdk/src/engine/pull/org.d.ts +54 -0
- package/dist-sdk/src/engine/pull/org.js +134 -0
- package/dist-sdk/src/engine/tf/escape.d.ts +22 -0
- package/dist-sdk/src/engine/tf/escape.js +28 -0
- package/dist-sdk/src/engine/tf/expr.d.ts +25 -0
- package/dist-sdk/src/engine/tf/expr.js +405 -0
- package/dist-sdk/src/engine/tf/index.d.ts +12 -0
- package/dist-sdk/src/engine/tf/index.js +11 -0
- package/dist-sdk/src/engine/tf/labels.d.ts +76 -0
- package/dist-sdk/src/engine/tf/labels.js +196 -0
- package/dist-sdk/src/engine/tf/model.d.ts +84 -0
- package/dist-sdk/src/engine/tf/model.js +49 -0
- package/dist-sdk/src/engine/tf/parse.d.ts +41 -0
- package/dist-sdk/src/engine/tf/parse.js +189 -0
- package/dist-sdk/src/engine/tf/render.d.ts +13 -0
- package/dist-sdk/src/engine/tf/render.js +102 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.d.ts +43 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.js +201 -0
- package/dist-sdk/src/entities/access-policy/build.d.ts +26 -0
- package/dist-sdk/src/entities/access-policy/build.js +7 -0
- package/dist-sdk/src/entities/access-policy/filter.d.ts +61 -0
- package/dist-sdk/src/entities/access-policy/filter.js +83 -0
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +48 -0
- package/dist-sdk/src/entities/access-policy/from-tf.js +189 -0
- package/dist-sdk/src/entities/access-policy/module.d.ts +3 -0
- package/dist-sdk/src/entities/access-policy/module.js +17 -0
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +36 -0
- package/dist-sdk/src/entities/access-policy/to-tf.js +149 -0
- package/dist-sdk/src/entities/access-policy/types.d.ts +4 -0
- package/dist-sdk/src/entities/access-policy/types.js +10 -0
- package/dist-sdk/src/entities/agent/build.d.ts +108 -0
- package/dist-sdk/src/entities/agent/build.js +148 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +53 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +344 -0
- package/dist-sdk/src/entities/agent/from-tf.d.ts +65 -0
- package/dist-sdk/src/entities/agent/from-tf.js +289 -0
- package/dist-sdk/src/entities/agent/index.d.ts +7 -0
- package/dist-sdk/src/entities/agent/index.js +7 -0
- package/dist-sdk/src/entities/agent/module.d.ts +4 -0
- package/dist-sdk/src/entities/agent/module.js +122 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/agent/to-tf.js +188 -0
- package/dist-sdk/src/entities/agent/tools.d.ts +284 -0
- package/dist-sdk/src/entities/agent/tools.js +238 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +110 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.js +265 -0
- package/dist-sdk/src/entities/agent-tool/module.d.ts +3 -0
- package/dist-sdk/src/entities/agent-tool/module.js +32 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +40 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.js +250 -0
- package/dist-sdk/src/entities/agent-tool/types.d.ts +43 -0
- package/dist-sdk/src/entities/agent-tool/types.js +102 -0
- package/dist-sdk/src/entities/app/build.d.ts +368 -0
- package/dist-sdk/src/entities/app/build.js +372 -0
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +168 -0
- package/dist-sdk/src/entities/app/deserializer/normalize.js +12 -0
- package/dist-sdk/src/entities/app/display-blocks.d.ts +26 -0
- package/dist-sdk/src/entities/app/display-blocks.js +34 -0
- package/dist-sdk/src/entities/app/from-tf.d.ts +23 -0
- package/dist-sdk/src/entities/app/from-tf.js +197 -0
- package/dist-sdk/src/entities/app/index.d.ts +14 -0
- package/dist-sdk/src/entities/app/index.js +11 -0
- package/dist-sdk/src/entities/app/locals.d.ts +11 -0
- package/dist-sdk/src/entities/app/locals.js +31 -0
- package/dist-sdk/src/entities/app/module.d.ts +4 -0
- package/dist-sdk/src/entities/app/module.js +66 -0
- package/dist-sdk/src/entities/app/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/app/to-tf.js +212 -0
- package/dist-sdk/src/entities/approval-chain/build.d.ts +24 -0
- package/dist-sdk/src/entities/approval-chain/build.js +56 -0
- package/dist-sdk/src/entities/approval-chain/index.d.ts +6 -0
- package/dist-sdk/src/entities/approval-chain/index.js +6 -0
- package/dist-sdk/src/entities/approval-chain/steps.d.ts +24 -0
- package/dist-sdk/src/entities/approval-chain/steps.js +20 -0
- package/dist-sdk/src/entities/automation/build.d.ts +259 -0
- package/dist-sdk/src/entities/automation/build.js +436 -0
- package/dist-sdk/src/entities/automation/catalog-render.d.ts +5 -0
- package/dist-sdk/src/entities/automation/catalog-render.js +35 -0
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +152 -0
- package/dist-sdk/src/entities/automation/deserializer/ast.js +13 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +55 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +1176 -0
- package/dist-sdk/src/entities/automation/filter.d.ts +93 -0
- package/dist-sdk/src/entities/automation/filter.js +156 -0
- package/dist-sdk/src/entities/automation/from-tf.d.ts +35 -0
- package/dist-sdk/src/entities/automation/from-tf.js +1258 -0
- package/dist-sdk/src/entities/automation/index.d.ts +22 -0
- package/dist-sdk/src/entities/automation/index.js +25 -0
- package/dist-sdk/src/entities/automation/module.d.ts +3 -0
- package/dist-sdk/src/entities/automation/module.js +150 -0
- package/dist-sdk/src/entities/automation/operators.d.ts +93 -0
- package/dist-sdk/src/entities/automation/operators.js +69 -0
- package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +19 -0
- package/dist-sdk/src/entities/automation/output-key-wire-name.js +24 -0
- package/dist-sdk/src/entities/automation/script-code.d.ts +51 -0
- package/dist-sdk/src/entities/automation/script-code.js +633 -0
- package/dist-sdk/src/entities/automation/serialize.d.ts +6 -0
- package/dist-sdk/src/entities/automation/serialize.js +41 -0
- package/dist-sdk/src/entities/automation/tasks.d.ts +641 -0
- package/dist-sdk/src/entities/automation/tasks.js +765 -0
- package/dist-sdk/src/entities/automation/to-tf.d.ts +19 -0
- package/dist-sdk/src/entities/automation/to-tf.js +1169 -0
- package/dist-sdk/src/entities/automation/triggers.d.ts +205 -0
- package/dist-sdk/src/entities/automation/triggers.js +202 -0
- package/dist-sdk/src/entities/automation/types.d.ts +78 -0
- package/dist-sdk/src/entities/automation/types.js +131 -0
- package/dist-sdk/src/entities/element/build.d.ts +121 -0
- package/dist-sdk/src/entities/element/build.js +110 -0
- package/dist-sdk/src/entities/element/from-tf.d.ts +19 -0
- package/dist-sdk/src/entities/element/from-tf.js +170 -0
- package/dist-sdk/src/entities/element/index.d.ts +12 -0
- package/dist-sdk/src/entities/element/index.js +10 -0
- package/dist-sdk/src/entities/element/locals.d.ts +7 -0
- package/dist-sdk/src/entities/element/locals.js +12 -0
- package/dist-sdk/src/entities/element/module.d.ts +8 -0
- package/dist-sdk/src/entities/element/module.js +65 -0
- package/dist-sdk/src/entities/element/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/element/to-tf.js +169 -0
- package/dist-sdk/src/entities/field/build.d.ts +112 -0
- package/dist-sdk/src/entities/field/build.js +84 -0
- package/dist-sdk/src/entities/field/calc/aggregate.d.ts +60 -0
- package/dist-sdk/src/entities/field/calc/aggregate.js +71 -0
- package/dist-sdk/src/entities/field/calc/date.d.ts +73 -0
- package/dist-sdk/src/entities/field/calc/date.js +109 -0
- package/dist-sdk/src/entities/field/calc/index.d.ts +229 -0
- package/dist-sdk/src/entities/field/calc/index.js +433 -0
- package/dist-sdk/src/entities/field/calc/numeric.d.ts +22 -0
- package/dist-sdk/src/entities/field/calc/numeric.js +67 -0
- package/dist-sdk/src/entities/field/calc/runtime.d.ts +61 -0
- package/dist-sdk/src/entities/field/calc/runtime.js +174 -0
- package/dist-sdk/src/entities/field/calc/text.d.ts +100 -0
- package/dist-sdk/src/entities/field/calc/text.js +208 -0
- package/dist-sdk/src/entities/field/calc/types.d.ts +86 -0
- package/dist-sdk/src/entities/field/calc/types.js +23 -0
- package/dist-sdk/src/entities/field/calc.d.ts +108 -0
- package/dist-sdk/src/entities/field/calc.js +54 -0
- package/dist-sdk/src/entities/field/from-tf.d.ts +31 -0
- package/dist-sdk/src/entities/field/from-tf.js +184 -0
- package/dist-sdk/src/entities/field/locals.d.ts +8 -0
- package/dist-sdk/src/entities/field/locals.js +24 -0
- package/dist-sdk/src/entities/field/module.d.ts +3 -0
- package/dist-sdk/src/entities/field/module.js +50 -0
- package/dist-sdk/src/entities/field/options.d.ts +27 -0
- package/dist-sdk/src/entities/field/options.js +76 -0
- package/dist-sdk/src/entities/field/record-shape.d.ts +57 -0
- package/dist-sdk/src/entities/field/record-shape.js +1 -0
- package/dist-sdk/src/entities/field/to-tf.d.ts +73 -0
- package/dist-sdk/src/entities/field/to-tf.js +142 -0
- package/dist-sdk/src/entities/field/types.d.ts +53 -0
- package/dist-sdk/src/entities/field/types.js +68 -0
- package/dist-sdk/src/entities/file-reader/build.d.ts +182 -0
- package/dist-sdk/src/entities/file-reader/build.js +105 -0
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +6 -0
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +109 -0
- package/dist-sdk/src/entities/file-reader/from-tf.d.ts +13 -0
- package/dist-sdk/src/entities/file-reader/from-tf.js +172 -0
- package/dist-sdk/src/entities/file-reader/index.d.ts +10 -0
- package/dist-sdk/src/entities/file-reader/index.js +10 -0
- package/dist-sdk/src/entities/file-reader/module.d.ts +3 -0
- package/dist-sdk/src/entities/file-reader/module.js +115 -0
- package/dist-sdk/src/entities/file-reader/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/file-reader/to-tf.js +84 -0
- package/dist-sdk/src/entities/file-reader/types.d.ts +32 -0
- package/dist-sdk/src/entities/file-reader/types.js +30 -0
- package/dist-sdk/src/entities/flow/activities/agent.d.ts +15 -0
- package/dist-sdk/src/entities/flow/activities/agent.js +29 -0
- package/dist-sdk/src/entities/flow/activities/approval.d.ts +9 -0
- package/dist-sdk/src/entities/flow/activities/approval.js +18 -0
- package/dist-sdk/src/entities/flow/activities/automation.d.ts +12 -0
- package/dist-sdk/src/entities/flow/activities/automation.js +22 -0
- package/dist-sdk/src/entities/flow/activities/ctx.d.ts +34 -0
- package/dist-sdk/src/entities/flow/activities/ctx.js +38 -0
- package/dist-sdk/src/entities/flow/activities/form.d.ts +22 -0
- package/dist-sdk/src/entities/flow/activities/form.js +36 -0
- package/dist-sdk/src/entities/flow/activities/index.d.ts +14 -0
- package/dist-sdk/src/entities/flow/activities/index.js +13 -0
- package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +39 -0
- package/dist-sdk/src/entities/flow/activities/input-refs.js +19 -0
- package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +13 -0
- package/dist-sdk/src/entities/flow/activities/prompt-template.js +34 -0
- package/dist-sdk/src/entities/flow/activities/render-catalog.d.ts +140 -0
- package/dist-sdk/src/entities/flow/activities/render-catalog.js +174 -0
- package/dist-sdk/src/entities/flow/activities/types.d.ts +33 -0
- package/dist-sdk/src/entities/flow/activities/types.js +1 -0
- package/dist-sdk/src/entities/flow/build.d.ts +38 -0
- package/dist-sdk/src/entities/flow/build.js +115 -0
- package/dist-sdk/src/entities/flow/index.d.ts +8 -0
- package/dist-sdk/src/entities/flow/index.js +7 -0
- package/dist-sdk/src/entities/flow/serialize.d.ts +51 -0
- package/dist-sdk/src/entities/flow/serialize.js +94 -0
- package/dist-sdk/src/entities/flow/util.d.ts +27 -0
- package/dist-sdk/src/entities/flow/util.js +38 -0
- package/dist-sdk/src/entities/org/ai-provider.d.ts +13 -0
- package/dist-sdk/src/entities/org/ai-provider.js +46 -0
- package/dist-sdk/src/entities/org/category.d.ts +5 -0
- package/dist-sdk/src/entities/org/category.js +33 -0
- package/dist-sdk/src/entities/org/cloud-link.d.ts +5 -0
- package/dist-sdk/src/entities/org/cloud-link.js +33 -0
- package/dist-sdk/src/entities/org/connector.d.ts +12 -0
- package/dist-sdk/src/entities/org/connector.js +35 -0
- package/dist-sdk/src/entities/org/group.d.ts +5 -0
- package/dist-sdk/src/entities/org/group.js +40 -0
- package/dist-sdk/src/entities/org/index.d.ts +11 -0
- package/dist-sdk/src/entities/org/index.js +11 -0
- package/dist-sdk/src/entities/org/role.d.ts +7 -0
- package/dist-sdk/src/entities/org/role.js +21 -0
- package/dist-sdk/src/entities/org/user.d.ts +7 -0
- package/dist-sdk/src/entities/org/user.js +30 -0
- package/dist-sdk/src/entities/search-table/build.d.ts +41 -0
- package/dist-sdk/src/entities/search-table/build.js +79 -0
- package/dist-sdk/src/entities/search-table/index.d.ts +5 -0
- package/dist-sdk/src/entities/search-table/index.js +5 -0
- package/dist-sdk/src/entities/search-table/module.d.ts +6 -0
- package/dist-sdk/src/entities/search-table/module.js +64 -0
- package/dist-sdk/src/entities/shared/context.d.ts +93 -0
- package/dist-sdk/src/entities/shared/context.js +156 -0
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +277 -0
- package/dist-sdk/src/entities/shared/filters/ast.js +65 -0
- package/dist-sdk/src/entities/shared/filters/index.d.ts +211 -0
- package/dist-sdk/src/entities/shared/filters/index.js +372 -0
- package/dist-sdk/src/entities/shared/filters/types.d.ts +170 -0
- package/dist-sdk/src/entities/shared/filters/types.js +7 -0
- package/dist-sdk/src/entities/shared/ref.d.ts +160 -0
- package/dist-sdk/src/entities/shared/ref.js +119 -0
- package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +17 -0
- package/dist-sdk/src/entities/shared/tool-field-ref.js +31 -0
- package/dist-sdk/src/entities/shared/types/common.d.ts +106 -0
- package/dist-sdk/src/entities/shared/types/common.js +64 -0
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +58 -0
- package/dist-sdk/src/entities/shared/types/field-types.js +57 -0
- package/dist-sdk/src/entities/shared/types/platform.d.ts +46 -0
- package/dist-sdk/src/entities/shared/types/platform.js +10 -0
- package/dist-sdk/src/entities/skill/build.d.ts +25 -0
- package/dist-sdk/src/entities/skill/build.js +50 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +39 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +124 -0
- package/dist-sdk/src/entities/skill/from-tf.d.ts +33 -0
- package/dist-sdk/src/entities/skill/from-tf.js +96 -0
- package/dist-sdk/src/entities/skill/index.d.ts +7 -0
- package/dist-sdk/src/entities/skill/index.js +7 -0
- package/dist-sdk/src/entities/skill/module.d.ts +4 -0
- package/dist-sdk/src/entities/skill/module.js +111 -0
- package/dist-sdk/src/entities/skill/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/skill/to-tf.js +59 -0
- package/dist-sdk/src/entities/skill/tools.d.ts +93 -0
- package/dist-sdk/src/entities/skill/tools.js +105 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +60 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.js +142 -0
- package/dist-sdk/src/entities/skill-tool/module.d.ts +3 -0
- package/dist-sdk/src/entities/skill-tool/module.js +21 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +34 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.js +130 -0
- package/dist-sdk/src/entities/skill-tool/types.d.ts +40 -0
- package/dist-sdk/src/entities/skill-tool/types.js +67 -0
- package/dist-sdk/src/entities/table/build.d.ts +74 -0
- package/dist-sdk/src/entities/table/build.js +339 -0
- package/dist-sdk/src/entities/table/catalog-render.d.ts +5 -0
- package/dist-sdk/src/entities/table/catalog-render.js +39 -0
- package/dist-sdk/src/entities/table/fields.d.ts +81 -0
- package/dist-sdk/src/entities/table/fields.js +70 -0
- package/dist-sdk/src/entities/table/filter.d.ts +41 -0
- package/dist-sdk/src/entities/table/filter.js +89 -0
- package/dist-sdk/src/entities/table/index.d.ts +8 -0
- package/dist-sdk/src/entities/table/index.js +12 -0
- package/dist-sdk/src/entities/table/joins.d.ts +26 -0
- package/dist-sdk/src/entities/table/joins.js +31 -0
- package/dist-sdk/src/entities/table/keys.d.ts +11 -0
- package/dist-sdk/src/entities/table/keys.js +25 -0
- package/dist-sdk/src/entities/table/module.d.ts +5 -0
- package/dist-sdk/src/entities/table/module.js +25 -0
- package/dist-sdk/src/entities/table/state.d.ts +39 -0
- package/dist-sdk/src/entities/table/state.js +43 -0
- package/dist-sdk/src/entities/view/from-tf.d.ts +29 -0
- package/dist-sdk/src/entities/view/from-tf.js +235 -0
- package/dist-sdk/src/entities/view/module.d.ts +24 -0
- package/dist-sdk/src/entities/view/module.js +61 -0
- package/dist-sdk/src/entities/view/to-tf.d.ts +65 -0
- package/dist-sdk/src/entities/view/to-tf.js +171 -0
- package/dist-sdk/src/entities/view/types.d.ts +58 -0
- package/dist-sdk/src/entities/view/types.js +89 -0
- package/dist-sdk/src/graph/deferred-catalog-render.d.ts +9 -0
- package/dist-sdk/src/graph/deferred-catalog-render.js +18 -0
- package/dist-sdk/src/graph/index.d.ts +91 -0
- package/dist-sdk/src/graph/index.js +211 -0
- package/dist-sdk/src/graph/modules.d.ts +7 -0
- package/dist-sdk/src/graph/modules.js +42 -0
- package/dist-sdk/src/graph/types.d.ts +375 -0
- package/dist-sdk/src/graph/types.js +102 -0
- package/dist-sdk/src/internal/sdk-package.d.ts +7 -0
- package/dist-sdk/src/internal/sdk-package.js +23 -0
- package/package.json +201 -8
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent-tool entity's sub-type table (M3). Agent tools are a real
|
|
3
|
+
* sub-entity — nine terraform resource types sharing one ownership shape
|
|
4
|
+
* (agent_id + app_id + name/description) — so per-sub-type knowledge is one
|
|
5
|
+
* ROW here, exactly like `entities/field/types.ts`.
|
|
6
|
+
*
|
|
7
|
+
* M3 implements createRecord, searchAspect, executeWorkflow, and updateRecord
|
|
8
|
+
* end to end; the other rows are declared so streams REPORT them by name
|
|
9
|
+
* (plan §6) instead of "unknown resource", and adoption scopes ONLY the
|
|
10
|
+
* implemented ones — an adopted type the printer can't reconstruct would
|
|
11
|
+
* plan as a destroy on rebuild.
|
|
12
|
+
*/
|
|
13
|
+
export const RUN_AUTOMATION_TOOL_RESOURCE_TYPE = "elementum_agent_run_automation_tool";
|
|
14
|
+
export const AGENT_TOOL_SUB_TYPES = [
|
|
15
|
+
{ typeKey: "createRecord", resourceType: "elementum_agent_create_record_tool", implemented: true },
|
|
16
|
+
{ typeKey: "searchAspect", resourceType: "elementum_agent_search_records_tool", implemented: true },
|
|
17
|
+
{ typeKey: "updateRecord", resourceType: "elementum_agent_update_record_tool", implemented: true },
|
|
18
|
+
{ typeKey: "searchTable", resourceType: "elementum_agent_ai_search_tool", implemented: true },
|
|
19
|
+
{ typeKey: "relateRecord", resourceType: "elementum_agent_relate_record_tool" },
|
|
20
|
+
{ typeKey: "executeWorkflow", resourceType: RUN_AUTOMATION_TOOL_RESOURCE_TYPE, implemented: true },
|
|
21
|
+
{ typeKey: "runAgent", resourceType: "elementum_agent_run_agent_tool" },
|
|
22
|
+
{ typeKey: "selectBotRoute", resourceType: "elementum_agent_select_bot_route_tool" },
|
|
23
|
+
{ typeKey: "mcp", resourceType: "elementum_agent_mcp_tool" },
|
|
24
|
+
];
|
|
25
|
+
export const TOOL_SUB_TYPE_BY_TYPE_KEY = new Map(AGENT_TOOL_SUB_TYPES.map((t) => [t.typeKey, t]));
|
|
26
|
+
export const TOOL_SUB_TYPE_BY_RESOURCE = new Map(AGENT_TOOL_SUB_TYPES.map((t) => [t.resourceType, t]));
|
|
27
|
+
/** The resource types the terraform path round-trips today (adoption scope). */
|
|
28
|
+
export const IMPLEMENTED_TOOL_RESOURCE_TYPES = AGENT_TOOL_SUB_TYPES.filter((t) => t.implemented === true).map((t) => t.resourceType);
|
|
29
|
+
/** Every declared tool resource type — stream partition recognizes these by name. */
|
|
30
|
+
export const ALL_TOOL_RESOURCE_TYPES = AGENT_TOOL_SUB_TYPES.map((t) => t.resourceType);
|
|
31
|
+
/**
|
|
32
|
+
* EDK's tool-name rule — enforced in the authoring builders (see
|
|
33
|
+
* `entities/agent/tools.ts`), never in the tf passes. It is deliberately
|
|
34
|
+
* STRICTER than the platform's own (`[A-Za-z0-9_-]`, which also tolerates
|
|
35
|
+
* hyphens): EDK requires underscores so an authored name maps 1:1 to its
|
|
36
|
+
* terraform label — a hyphenated name sanitizes to a different label and breaks
|
|
37
|
+
* the name↔label correspondence. 1–64 chars of letters, digits, and
|
|
38
|
+
* underscores; no consecutive underscores (the platform rejects those, opaquely).
|
|
39
|
+
* `from-tf` does NOT apply this — a hyphenated tool deployed outside EDK must
|
|
40
|
+
* still be pullable.
|
|
41
|
+
*/
|
|
42
|
+
export function isValidToolName(name) {
|
|
43
|
+
return /^[A-Za-z0-9_]{1,64}$/.test(name) && !name.includes("__");
|
|
44
|
+
}
|
|
45
|
+
/** Attributes `toolFromTf` understands per implemented sub-type — growth is reported loudly. */
|
|
46
|
+
export const KNOWN_TOOL_ATTRS = {
|
|
47
|
+
createRecord: new Set(["agent_id", "app_id", "name", "description", "start_message", "target_id", "fields"]),
|
|
48
|
+
executeWorkflow: new Set([
|
|
49
|
+
"agent_id",
|
|
50
|
+
"app_id",
|
|
51
|
+
"name",
|
|
52
|
+
"description",
|
|
53
|
+
"start_message",
|
|
54
|
+
"automation_id",
|
|
55
|
+
"inputs",
|
|
56
|
+
"outputs",
|
|
57
|
+
"timeout",
|
|
58
|
+
]),
|
|
59
|
+
searchAspect: new Set([
|
|
60
|
+
"agent_id",
|
|
61
|
+
"app_id",
|
|
62
|
+
"name",
|
|
63
|
+
"description",
|
|
64
|
+
"start_message",
|
|
65
|
+
"target_id",
|
|
66
|
+
"query_description",
|
|
67
|
+
"result_limit",
|
|
68
|
+
"fields",
|
|
69
|
+
"filter_variables",
|
|
70
|
+
]),
|
|
71
|
+
updateRecord: new Set([
|
|
72
|
+
"agent_id",
|
|
73
|
+
"app_id",
|
|
74
|
+
"name",
|
|
75
|
+
"description",
|
|
76
|
+
"start_message",
|
|
77
|
+
"target_id",
|
|
78
|
+
"handle_description",
|
|
79
|
+
"fields",
|
|
80
|
+
]),
|
|
81
|
+
// target_id is OPTIONAL here (unlike the other three) - confirmed live,
|
|
82
|
+
// 5 of 18 real elementum_agent_ai_search_tool blocks have no target_id at
|
|
83
|
+
// all. return_fields (field_id/name/display_name) is the dialect ei's own
|
|
84
|
+
// export still emits on most tools; a minority have already migrated to
|
|
85
|
+
// the newer `fields` (field_id/name/description) shape the provider
|
|
86
|
+
// schema is deprecating return_fields in favor of - both must round-trip,
|
|
87
|
+
// since re-emitting the wrong one on an already-migrated tool would plan
|
|
88
|
+
// a spurious diff on every apply.
|
|
89
|
+
searchTable: new Set([
|
|
90
|
+
"agent_id",
|
|
91
|
+
"app_id",
|
|
92
|
+
"name",
|
|
93
|
+
"description",
|
|
94
|
+
"start_message",
|
|
95
|
+
"target_id",
|
|
96
|
+
"search_table_id",
|
|
97
|
+
"query_description",
|
|
98
|
+
"result_limit",
|
|
99
|
+
"fields",
|
|
100
|
+
"return_fields",
|
|
101
|
+
]),
|
|
102
|
+
};
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 app/element authoring — `defineApp`. Parallel to v1 `src/aspects`,
|
|
3
|
+
* standalone from it.
|
|
4
|
+
*
|
|
5
|
+
* Produces a `DeployableEntity` of kind `app`/`element` with `parent: "org"` (apps are
|
|
6
|
+
* org-owned), whose payload is the platform's `AgentAspectInput` compose body.
|
|
7
|
+
* The cloud link is a `CatalogRef` token resolved at deploy; fields are authored
|
|
8
|
+
* inline (a new app's fields get server-assigned ids on compose). Deployed via
|
|
9
|
+
* the wire client's compose path (`composeAspect`).
|
|
10
|
+
*
|
|
11
|
+
* Slice scope: identity + the common scalar/picklist field types. Calc fields,
|
|
12
|
+
* dependent picklists, display blocks, and field-id reconciliation for updates
|
|
13
|
+
* follow the same pattern and land as expansion.
|
|
14
|
+
*/
|
|
15
|
+
import { type AspectRef, type CloudLinkRef, type FieldRef } from "../../catalog/index.js";
|
|
16
|
+
import type { WorkflowFieldType } from "../shared/types/field-types.js";
|
|
17
|
+
import { type SystemFieldKey } from "../../core/system-fields.js";
|
|
18
|
+
import type { DeployableEntity, EntityDeployOptions } from "../../engine/entity.js";
|
|
19
|
+
import type { AspectFieldInput } from "../../../elementum-entity-client/clients/aspects/models/field-types.js";
|
|
20
|
+
import type { AccessPolicyOptions } from "../access-policy/build.js";
|
|
21
|
+
import { type DisplayBlock } from "./display-blocks.js";
|
|
22
|
+
import type { Expr, ExprType } from "../field/calc.js";
|
|
23
|
+
/**
|
|
24
|
+
* Authoring-time picklist config. Wire `PicklistConfigInput` uses bare id
|
|
25
|
+
* strings; here `relatedAspectId` / `relatedLabelFieldId` / `parentFieldId`
|
|
26
|
+
* may be catalog tokens that `resolvePayload` swaps for ids at plan/apply.
|
|
27
|
+
*
|
|
28
|
+
* Cross-aspect dynamic picklists: prefer an aspect token for
|
|
29
|
+
* `relatedAspectId`. `relatedLabelFieldId` may still need a raw field id
|
|
30
|
+
* when the related aspect isn't the entity being deployed (field tokens
|
|
31
|
+
* resolve against the current app's state only).
|
|
32
|
+
*/
|
|
33
|
+
export interface AppPicklistDynamicConfig {
|
|
34
|
+
readonly relatedAspectId: AspectRef | string;
|
|
35
|
+
readonly relatedLabelFieldId: FieldRef | string;
|
|
36
|
+
readonly parentFieldId?: FieldRef | string;
|
|
37
|
+
readonly autoRelate?: boolean;
|
|
38
|
+
readonly valuesRenderType?: string;
|
|
39
|
+
readonly filter?: Readonly<Record<string, unknown>>;
|
|
40
|
+
readonly sort?: Readonly<Record<string, unknown>>;
|
|
41
|
+
}
|
|
42
|
+
export interface AppPicklistConfig {
|
|
43
|
+
readonly static?: {
|
|
44
|
+
readonly parentFieldId?: FieldRef | string;
|
|
45
|
+
readonly filter?: Readonly<Record<string, unknown>>;
|
|
46
|
+
readonly sort?: Readonly<Record<string, unknown>>;
|
|
47
|
+
};
|
|
48
|
+
readonly dynamic?: AppPicklistDynamicConfig;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A field authored on a v2 app or element — shared with `defineElement`
|
|
52
|
+
* (`src/elements/build.ts`), which imports this type and {@link serializeField}
|
|
53
|
+
* directly from here rather than duplicating them: fields are the one
|
|
54
|
+
* authoring concept genuinely identical between an app and an element (both
|
|
55
|
+
* compose onto the same `AspectFieldInput` wire shape).
|
|
56
|
+
*/
|
|
57
|
+
export interface AppField {
|
|
58
|
+
readonly name: string;
|
|
59
|
+
/** Platform field type, e.g. `"TEXT"`, `"NUMBER"`, `"PICKLIST"`. */
|
|
60
|
+
readonly type: WorkflowFieldType;
|
|
61
|
+
readonly required?: boolean;
|
|
62
|
+
readonly requiredOnClose?: boolean;
|
|
63
|
+
readonly showOnCreate?: boolean;
|
|
64
|
+
readonly lockOnCreate?: boolean;
|
|
65
|
+
readonly description?: string;
|
|
66
|
+
readonly columnName?: string;
|
|
67
|
+
readonly defaultValue?: unknown;
|
|
68
|
+
/**
|
|
69
|
+
* Platform semantic role for system fields. A field with one of the
|
|
70
|
+
* known tags is reconciled by the platform as that system
|
|
71
|
+
* field even when its display name is changed.
|
|
72
|
+
*/
|
|
73
|
+
readonly tags?: readonly string[];
|
|
74
|
+
/**
|
|
75
|
+
* Picklist options (`PICKLIST` / `MULTI_PICKLIST`). A bare string is the
|
|
76
|
+
* label; the object form adds `parentValues` (parent-picklist **option ids**)
|
|
77
|
+
* for a dependent dropdown. (Option ids aren't catalog-modeled yet — raw ids
|
|
78
|
+
* for now.) Omit for dynamic picklists (`config.dynamic`).
|
|
79
|
+
*/
|
|
80
|
+
readonly options?: readonly (string | PicklistOption)[];
|
|
81
|
+
/** Parent picklist for a dependent dropdown (token → `config.static.parentFieldId`). */
|
|
82
|
+
readonly parentField?: FieldRef;
|
|
83
|
+
/**
|
|
84
|
+
* Static or dynamic picklist config. Dynamic picklists source options from
|
|
85
|
+
* another aspect's records (`config.dynamic.relatedAspectId` +
|
|
86
|
+
* `relatedLabelFieldId`). When set, takes precedence over `parentField`.
|
|
87
|
+
*/
|
|
88
|
+
readonly config?: AppPicklistConfig;
|
|
89
|
+
/** Numeric format (`NUMBER` / `DECIMAL`) — pure config, no refs. */
|
|
90
|
+
readonly numericFormat?: Record<string, unknown>;
|
|
91
|
+
/** `DECIMAL` only — display/storage precision (`elementum_decimal_field.decimal_places`). */
|
|
92
|
+
readonly decimalPlaces?: number;
|
|
93
|
+
/** QR format (`TEXT` / `HANDLE`) — pure config, no refs. */
|
|
94
|
+
readonly qrFormat?: Record<string, unknown>;
|
|
95
|
+
/**
|
|
96
|
+
* A calculated-field expression (from the `calc.*` builder). When set, the
|
|
97
|
+
* field serializes as a calculated field; `type` is the declared output type.
|
|
98
|
+
*/
|
|
99
|
+
readonly expression?: Expr<ExprType>;
|
|
100
|
+
/**
|
|
101
|
+
* `RELATION` only — raw platform ids of the related aspect/field
|
|
102
|
+
* (`elementum_relation_field.related_object_id`/`related_label_field_id`),
|
|
103
|
+
* not catalog tokens: a non-recursive export never discovers the related
|
|
104
|
+
* aspect's own identity, so there's nothing to resolve them against.
|
|
105
|
+
*/
|
|
106
|
+
readonly relatedAspectId?: string;
|
|
107
|
+
readonly relatedLabelFieldId?: string;
|
|
108
|
+
/** `RELATION` only. Defaults to `true` on the platform. */
|
|
109
|
+
readonly autoRelate?: boolean;
|
|
110
|
+
}
|
|
111
|
+
/** A picklist option with optional dependent-dropdown parent links. */
|
|
112
|
+
export interface PicklistOption {
|
|
113
|
+
readonly label: string;
|
|
114
|
+
/** Parent-picklist option ids that activate this option (dependent picklists). */
|
|
115
|
+
readonly parentValues?: readonly string[];
|
|
116
|
+
/** Option tags (e.g. "CLOSED" marks the closing status option). */
|
|
117
|
+
readonly tags?: readonly PicklistOptionTag[];
|
|
118
|
+
/** Display color (hex, e.g. "#3B82F6") — surfaced on status options; cosmetic only. */
|
|
119
|
+
readonly color?: string;
|
|
120
|
+
}
|
|
121
|
+
/** The platform's option-tag vocabulary (drives status semantics/urgency). */
|
|
122
|
+
export type PicklistOptionTag = "CLOSED" | "CRITICAL" | "HIGH" | "MEDIUM" | "LOW";
|
|
123
|
+
/** The aspect category (created upsert-by-name if missing) — shared with `defineElement`. */
|
|
124
|
+
export interface AppCategory {
|
|
125
|
+
readonly name: string;
|
|
126
|
+
readonly icon?: string;
|
|
127
|
+
readonly color?: string;
|
|
128
|
+
readonly description?: string;
|
|
129
|
+
}
|
|
130
|
+
/** Cloud-backing options for an aspect's data store (Snowflake-only today). */
|
|
131
|
+
export interface AppCloudOptions {
|
|
132
|
+
readonly snowflake?: {
|
|
133
|
+
/**
|
|
134
|
+
* `false` creates a standard Snowflake table; the platform default (when
|
|
135
|
+
* omitted) is a hybrid table. Mirrors HCL `snowflake_hybrid_table`.
|
|
136
|
+
*/
|
|
137
|
+
readonly hybridTable?: boolean;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* An override for a platform-managed (system) field. Only what the platform
|
|
142
|
+
* genuinely allows overriding is authorable: the display name, an optional
|
|
143
|
+
* description (title/id/status only — the app resource has no
|
|
144
|
+
* `*_field_description` attribute for the others), and, for the status/stage
|
|
145
|
+
* picklists, the option set. `type` and the required/showOnCreate booleans
|
|
146
|
+
* are fixed by the platform's per-tag config and deliberately have no
|
|
147
|
+
* authoring slot.
|
|
148
|
+
*/
|
|
149
|
+
export interface AppSystemFieldOverride {
|
|
150
|
+
readonly name: string;
|
|
151
|
+
readonly description?: string;
|
|
152
|
+
}
|
|
153
|
+
/** A system-picklist override (status/stage): display name + option set. */
|
|
154
|
+
export interface AppSystemPicklistOverride {
|
|
155
|
+
readonly name: string;
|
|
156
|
+
readonly description?: string;
|
|
157
|
+
readonly options: readonly (string | PicklistOption)[];
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Overrides for the platform's auto-provisioned system fields, keyed by their
|
|
161
|
+
* canonical ref names. Every entry (and the whole bag) is optional — author
|
|
162
|
+
* one only when the app deviates from the deploy defaults. An entry is a
|
|
163
|
+
* complete override: `name` is always required (and `options` on
|
|
164
|
+
* status/stage). Only authored keys are serialized into the compose payload;
|
|
165
|
+
* omitted keys are platform-owned.
|
|
166
|
+
*/
|
|
167
|
+
export interface AppSystemFields {
|
|
168
|
+
readonly id?: AppSystemFieldOverride;
|
|
169
|
+
readonly title?: AppSystemFieldOverride;
|
|
170
|
+
readonly status?: AppSystemPicklistOverride;
|
|
171
|
+
readonly stage?: AppSystemPicklistOverride;
|
|
172
|
+
readonly createdAt?: AppSystemFieldOverride;
|
|
173
|
+
readonly createdBy?: AppSystemFieldOverride;
|
|
174
|
+
readonly updatedAt?: AppSystemFieldOverride;
|
|
175
|
+
readonly updatedBy?: AppSystemFieldOverride;
|
|
176
|
+
readonly closedAt?: AppSystemFieldOverride;
|
|
177
|
+
readonly closedBy?: AppSystemFieldOverride;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* A field reference inside a layout section or list view: either a custom
|
|
181
|
+
* field's typed token (`catalog.<app>.fields.<key>`) or a bare system-field
|
|
182
|
+
* key (`"title"`, `"status"`, …) — system fields have no catalog token on a
|
|
183
|
+
* pulled app (`readonlyFields` is an explicit author opt-in `defineApp`
|
|
184
|
+
* doesn't emit), so the canonical key string is the only stable way to name
|
|
185
|
+
* one here, same as `systemFields: {}` is already keyed.
|
|
186
|
+
*/
|
|
187
|
+
export type AppViewFieldRef = FieldRef | SystemFieldKey;
|
|
188
|
+
/**
|
|
189
|
+
* One section of a per-stage record layout (`elementum_layout`). The
|
|
190
|
+
* provider's own 9-value `type` enum (default `"group"`): only `"group"`
|
|
191
|
+
* carries `name`/`icon`/`color`/`fields`; the rest are bare component
|
|
192
|
+
* sections keyed by `displayLocation`/`displayOrder`/`sideNavItem`. `"update"`
|
|
193
|
+
* additionally takes an optional `name` (its `modules` attribute has no
|
|
194
|
+
* captured dialect evidence yet and is not authorable).
|
|
195
|
+
*/
|
|
196
|
+
export interface AppLayoutSection {
|
|
197
|
+
readonly type?: "group" | "activityLog" | "approvals" | "attachments" | "status" | "surveys" | "relatedTasks" | "relationships" | "update";
|
|
198
|
+
readonly displayLocation?: "CENTER";
|
|
199
|
+
readonly displayOrder?: number;
|
|
200
|
+
readonly sideNavItem?: boolean;
|
|
201
|
+
/** `"group"` only (required by the provider). */
|
|
202
|
+
readonly name?: string;
|
|
203
|
+
/** `"group"` only. */
|
|
204
|
+
readonly icon?: string;
|
|
205
|
+
/** `"group"` only. */
|
|
206
|
+
readonly color?: string;
|
|
207
|
+
/** `"group"` only — the fields shown in this group, in order. */
|
|
208
|
+
readonly fields?: readonly AppViewFieldRef[];
|
|
209
|
+
}
|
|
210
|
+
/** A stage's record-detail layout (`elementum_layout`) — immutable after creation; any change replaces it. */
|
|
211
|
+
export interface AppLayout {
|
|
212
|
+
readonly sections: readonly AppLayoutSection[];
|
|
213
|
+
}
|
|
214
|
+
/** A saved list view (`elementum_list_view`). */
|
|
215
|
+
export interface AppListView {
|
|
216
|
+
readonly name: string;
|
|
217
|
+
readonly columns: readonly AppViewFieldRef[];
|
|
218
|
+
readonly allowRecordCreation?: boolean;
|
|
219
|
+
readonly density?: string;
|
|
220
|
+
readonly rows?: number;
|
|
221
|
+
/**
|
|
222
|
+
* Opaque JSON pass-through — not a typed DSL. `elementum build` is stateless, so
|
|
223
|
+
* a list view with a live filter/sort MUST re-author it verbatim (as
|
|
224
|
+
* pulled) or every rebuild plans to null it out, which trips a real
|
|
225
|
+
* provider bug ("inconsistent result after apply"). Round-trip only;
|
|
226
|
+
* hand-author at your own risk (the shape isn't validated).
|
|
227
|
+
*/
|
|
228
|
+
readonly filter?: unknown;
|
|
229
|
+
/** Opaque JSON pass-through — see `filter`. */
|
|
230
|
+
readonly sort?: unknown;
|
|
231
|
+
}
|
|
232
|
+
export interface AppV2Options<F extends Record<string, AppField> = Record<string, AppField>, R extends Record<string, FieldRef> = Record<never, never>> extends EntityDeployOptions {
|
|
233
|
+
readonly name: string;
|
|
234
|
+
readonly category: AppCategory;
|
|
235
|
+
readonly namespace?: string;
|
|
236
|
+
/** The platform's aspect handle (business acronym, e.g. "PRD") — distinct from the refName. Omit to let the platform assign one. */
|
|
237
|
+
readonly handle?: string;
|
|
238
|
+
readonly description?: string;
|
|
239
|
+
readonly icon?: string;
|
|
240
|
+
readonly color?: string;
|
|
241
|
+
/**
|
|
242
|
+
* Cloud link whose data store this aspect's records persist in (token → id at
|
|
243
|
+
* deploy). Optional and valid for **both apps and elements** — omit it to use
|
|
244
|
+
* the org's default cloud link, or set it to target a specific one. Applied on
|
|
245
|
+
* create only: an aspect's cloud link is immutable once created, so the update
|
|
246
|
+
* path drops it. Distinct from element-only Snowflake `cloudMapping`.
|
|
247
|
+
*
|
|
248
|
+
* Some tenant configurations require `cloudLink` for APP creation even when no
|
|
249
|
+
* specific data store is targeted — if `elementum apply` fails with "Unable to
|
|
250
|
+
* validate" on an APP create, set this to the org's default cloud link (run
|
|
251
|
+
* `elementum import cloud-links` and `elementum list cloud-links` to find the handle).
|
|
252
|
+
*/
|
|
253
|
+
readonly cloudLink?: CloudLinkRef;
|
|
254
|
+
/** Cloud-backing options (Snowflake-only); applied on create only. */
|
|
255
|
+
readonly cloudOptions?: AppCloudOptions;
|
|
256
|
+
/** Fields keyed by ref name. At least one required by the compose API. */
|
|
257
|
+
readonly fields: F;
|
|
258
|
+
/**
|
|
259
|
+
* Overrides for the platform's auto-provisioned system fields (ID, Title,
|
|
260
|
+
* Status, Stage, and the audit fields). Omit entirely when the app keeps
|
|
261
|
+
* every deploy default. The canonical keys are reserved — a custom field
|
|
262
|
+
* under `fields:` may not reuse them.
|
|
263
|
+
*/
|
|
264
|
+
readonly systemFields?: AppSystemFields;
|
|
265
|
+
/**
|
|
266
|
+
* Platform-managed (system) fields that exist on every app but are not authored here — e.g.
|
|
267
|
+
* Title, Status, Created on, Closed by. These flow into `ref().fields` so other entities can
|
|
268
|
+
* reference them by typed handle (e.g. `app.fields.title`), but are **never included in the
|
|
269
|
+
* deploy payload** (the platform owns them; sending them on compose would be rejected).
|
|
270
|
+
*/
|
|
271
|
+
readonly readonlyFields?: R;
|
|
272
|
+
/** Record-view (LAYOUT surface) display blocks. */
|
|
273
|
+
readonly displayBlocks?: readonly DisplayBlock[];
|
|
274
|
+
/** New-record form (CREATE surface) display blocks. */
|
|
275
|
+
readonly recordCreateDisplayBlocks?: readonly DisplayBlock[];
|
|
276
|
+
/**
|
|
277
|
+
* Per-stage record layouts, keyed by stage key (the same `snakeSlug(name)`
|
|
278
|
+
* key `systemFields.stage.options`/`stages` derive). Terraform-path only —
|
|
279
|
+
* distinct from `displayBlocks` (the GraphQL-compose layout concept, which
|
|
280
|
+
* `ei export` doesn't surface at all).
|
|
281
|
+
*/
|
|
282
|
+
readonly layouts?: Readonly<Record<string, AppLayout>>;
|
|
283
|
+
/** Saved list views, keyed by view ref name. */
|
|
284
|
+
readonly listViews?: Readonly<Record<string, AppListView>>;
|
|
285
|
+
/** Display order of `listViews` (by key). Defaults to declaration order. */
|
|
286
|
+
readonly viewOrder?: readonly string[];
|
|
287
|
+
/** App-level sharing & row-level-security policies (`elementum_access_policy`), in declaration order. */
|
|
288
|
+
readonly accessPolicies?: readonly AccessPolicyOptions[];
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Serialize an authored field to its `AspectFieldInput` wire shape — shared
|
|
292
|
+
* with `defineElement`. `refName` is the field's bag key in `defineApp`'s
|
|
293
|
+
* `fields: {}` (e.g. `severity`) — carried as the internal `__refName` marker,
|
|
294
|
+
* a client-side-only bookkeeping value `applyV2`'s field reconciliation
|
|
295
|
+
* (`src/deploy/apply/apply.ts`, `reconcileFields`) reads to match this field
|
|
296
|
+
* against its previously-recorded state binding, then strips before the
|
|
297
|
+
* payload reaches the wire — it's never sent as `clientHandle` or anything
|
|
298
|
+
* else. Matching on the bag key instead of `name` is what lets a field's
|
|
299
|
+
* identity survive a display-`name` rename instead of being keyed by the
|
|
300
|
+
* mutable `name` (#230); the bag key itself is never rewritten by a rename,
|
|
301
|
+
* since it's just the field's fixed key in `fields: {}`.
|
|
302
|
+
*/
|
|
303
|
+
export declare function serializeField(field: AppField, refName?: string): AspectFieldInput;
|
|
304
|
+
/**
|
|
305
|
+
* Reject a custom `fields:` bag key that is ALSO authored under
|
|
306
|
+
* `systemFields` — the same slot provisioned twice. Keys not present in
|
|
307
|
+
* systemFields stay legal as ordinary fields (existing workspaces key
|
|
308
|
+
* plain fields `title` etc.); full reservation of the canonical keys is
|
|
309
|
+
* deferred until system-field ref tokens land on `ref().fields`.
|
|
310
|
+
*/
|
|
311
|
+
export declare function assertNoSystemKeyCollision(builder: string, name: string, fields: Record<string, AppField>, systemFields: AppSystemFields | undefined): void;
|
|
312
|
+
/**
|
|
313
|
+
* Serialize the AUTHORED system-field overrides into tagged compose entries
|
|
314
|
+
* (the same wire shape a system field carries on pull). Only authored keys
|
|
315
|
+
* are emitted — omitted keys stay platform-owned. status/stage overrides
|
|
316
|
+
* always carry their option set; the other keys are name-only.
|
|
317
|
+
*/
|
|
318
|
+
export declare function serializeSystemFields(overrides: AppSystemFields | undefined): AspectFieldInput[];
|
|
319
|
+
/**
|
|
320
|
+
* Per-field `FieldRef`s for an authored `fields:` bag, keyed exactly like it,
|
|
321
|
+
* each carrying its own literal `fieldType` (not the widened
|
|
322
|
+
* `WorkflowFieldType` union) — this is what lets `defineApp(...).ref()` serve
|
|
323
|
+
* as the catalog's live source for fields (`src/catalog/render.ts`'s
|
|
324
|
+
* `ownFile`) without losing the per-field type precision `RecordShape`
|
|
325
|
+
* (`entities/field/record-shape.ts`) needs to discriminate value types.
|
|
326
|
+
*/
|
|
327
|
+
export type AppFieldRefs<F extends Record<string, AppField>> = {
|
|
328
|
+
readonly [K in keyof F]: FieldRef & {
|
|
329
|
+
readonly fieldType: F[K]["type"];
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* An app's reference surface: identity plus its fields (the only bag other
|
|
334
|
+
* entities may point at). Generic over the authored `fields:` bag (`F`) and
|
|
335
|
+
* `readonlyFields:` bag (`R`) so `app.ref(name).fields.priority.fieldType`
|
|
336
|
+
* narrows to its literal (e.g. `"PICKLIST"`); the platform-owned system
|
|
337
|
+
* fields round out the bag via `Record<SystemFieldKey, FieldRef>` — a finite
|
|
338
|
+
* union of literal keys, deliberately NOT a wide `Record<string, FieldRef>`.
|
|
339
|
+
*
|
|
340
|
+
* That distinction is load-bearing, not style: a wide `string`-keyed index
|
|
341
|
+
* signature anywhere in this intersection poisons `RecordShape`
|
|
342
|
+
* (`entities/field/record-shape.ts`) when `DeepRef`
|
|
343
|
+
* (`entities/shared/context.ts`) re-maps its keys a second time for
|
|
344
|
+
* `ctx.trigger.record`/`ctx.tasks.<t>.record` drilling — every field
|
|
345
|
+
* collapses to `Ref<string>`, losing e.g. a picklist's `.id`/`.label`. Found
|
|
346
|
+
* and verified via isolated repro before this fix landed; `R`'s default is
|
|
347
|
+
* `Record<never, never>` (a literal empty object, no index signature) for
|
|
348
|
+
* the same reason — `Record<string, never>` would reintroduce it even when
|
|
349
|
+
* no `readonlyFields` are declared.
|
|
350
|
+
*/
|
|
351
|
+
export type AppRef<F extends Record<string, AppField> = Record<string, AppField>, R extends Record<string, FieldRef> = Record<never, never>> = AspectRef & {
|
|
352
|
+
readonly fields: AppFieldRefs<F> & Record<SystemFieldKey, FieldRef> & R;
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* The configured result of `defineApp` — its reference surface (`ref()`) and
|
|
356
|
+
* its deployable entity (`def()`). Both take `refName` as a **call-time
|
|
357
|
+
* argument**, not a constructor option: the ref name is never stored data
|
|
358
|
+
* (see `src/catalog/from-authoring.ts`) — it's recoverable from the file's
|
|
359
|
+
* name alone, which is exactly what every caller (catalog generation,
|
|
360
|
+
* plan/apply discovery) already knows when it calls these. Stating it again
|
|
361
|
+
* inside `defineApp({...})` would be the same redundant property the rest of
|
|
362
|
+
* the system avoids, just one level up.
|
|
363
|
+
*/
|
|
364
|
+
export interface AppConfigured<F extends Record<string, AppField> = Record<string, AppField>, R extends Record<string, FieldRef> = Record<never, never>> {
|
|
365
|
+
ref(refName: string): AppRef<F, R>;
|
|
366
|
+
def(refName: string): DeployableEntity;
|
|
367
|
+
}
|
|
368
|
+
export declare function defineApp<F extends Record<string, AppField>, R extends Record<string, FieldRef> = Record<never, never>>(opts: AppV2Options<F, R>): AppConfigured<F, R>;
|