@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,40 @@
|
|
|
1
|
+
/** Groups: org-owned reference identities, name-keyed data lookups. */
|
|
2
|
+
import { namedOnlyFactoryEntry } from "../../catalog/render-helpers.js";
|
|
3
|
+
import { NO_LIFECYCLE, } from "../../graph/types.js";
|
|
4
|
+
/** org.ts / OrgRefLookup bag — keep in lockstep with `data.orgBag`. */
|
|
5
|
+
export const GROUP_ORG_BAG = "groups";
|
|
6
|
+
export const groupModule = {
|
|
7
|
+
kind: "group",
|
|
8
|
+
stream: { role: "orgExport" },
|
|
9
|
+
data: {
|
|
10
|
+
participates: true,
|
|
11
|
+
lookupAttr: "name",
|
|
12
|
+
catalogKind: "group",
|
|
13
|
+
orgBag: GROUP_ORG_BAG,
|
|
14
|
+
// A GROUP field's `default_value` (entities/field/types.ts's
|
|
15
|
+
// OrgFieldRefValue) and an access policy's `group_ids` (board issue #69)
|
|
16
|
+
// both round-trip as `data.elementum_group` lookups via the generic
|
|
17
|
+
// `rawLookup` mechanism — real, tested coverage, so this participates in
|
|
18
|
+
// the byte-fidelity roundtrip scope. A captured `elementum_group` data
|
|
19
|
+
// block for any OTHER reason still fails loud (missing from build
|
|
20
|
+
// output) rather than silently passing — surfacing gaps instead of
|
|
21
|
+
// hiding them was the tradeoff of leaving this false; if that surfaces a
|
|
22
|
+
// real one, extend the reproducing path rather than reverting this flag.
|
|
23
|
+
referencedByBuild: true,
|
|
24
|
+
},
|
|
25
|
+
authoring: { unit: "none" },
|
|
26
|
+
parents: [{ parent: "org", child: "group" }],
|
|
27
|
+
resource: { shape: "single", resourceType: "elementum_group", adoptable: false },
|
|
28
|
+
lifecycle: NO_LIFECYCLE,
|
|
29
|
+
canvas: { participates: true, label: "Groups", glyph: "◎", component: "orgIdentity" },
|
|
30
|
+
catalog: {
|
|
31
|
+
participates: true,
|
|
32
|
+
refKind: "group",
|
|
33
|
+
catalogBag: "groups",
|
|
34
|
+
renderOrder: 110,
|
|
35
|
+
catalogRoot: "org",
|
|
36
|
+
renderEntry: namedOnlyFactoryEntry("groupRef"),
|
|
37
|
+
stubRef: (refName) => ({ __kind: "group", refName, name: refName }),
|
|
38
|
+
refFromAuthoring: () => undefined,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Org identity / data-facet kinds. Each file exports an EntityKindModule;
|
|
3
|
+
* assembly into KIND_MODULES lives in src/graph/modules.ts.
|
|
4
|
+
*/
|
|
5
|
+
export { aiProviderModules } from "./ai-provider.js";
|
|
6
|
+
export { categoryModule } from "./category.js";
|
|
7
|
+
export { cloudLinkModule } from "./cloud-link.js";
|
|
8
|
+
export { connectorModule } from "./connector.js";
|
|
9
|
+
export { groupModule } from "./group.js";
|
|
10
|
+
export { roleModule } from "./role.js";
|
|
11
|
+
export { userModule } from "./user.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Org identity / data-facet kinds. Each file exports an EntityKindModule;
|
|
3
|
+
* assembly into KIND_MODULES lives in src/graph/modules.ts.
|
|
4
|
+
*/
|
|
5
|
+
export { aiProviderModules } from "./ai-provider.js";
|
|
6
|
+
export { categoryModule } from "./category.js";
|
|
7
|
+
export { cloudLinkModule } from "./cloud-link.js";
|
|
8
|
+
export { connectorModule } from "./connector.js";
|
|
9
|
+
export { groupModule } from "./group.js";
|
|
10
|
+
export { roleModule } from "./role.js";
|
|
11
|
+
export { userModule } from "./user.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roles: stream data lookups only. Managed roles are emitted by app/element
|
|
3
|
+
* exports so other exported resources can reference them, but EDK does not
|
|
4
|
+
* author roles or expose them through the org catalog.
|
|
5
|
+
*/
|
|
6
|
+
import { type EntityKindModule } from "../../graph/types.js";
|
|
7
|
+
export declare const roleModule: EntityKindModule;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roles: stream data lookups only. Managed roles are emitted by app/element
|
|
3
|
+
* exports so other exported resources can reference them, but EDK does not
|
|
4
|
+
* author roles or expose them through the org catalog.
|
|
5
|
+
*/
|
|
6
|
+
import { NO_CANVAS, NO_CATALOG, NO_LIFECYCLE, } from "../../graph/types.js";
|
|
7
|
+
export const roleModule = {
|
|
8
|
+
kind: "role",
|
|
9
|
+
stream: { role: "streamMember" },
|
|
10
|
+
data: {
|
|
11
|
+
participates: true,
|
|
12
|
+
lookupAttr: "name",
|
|
13
|
+
referencedByBuild: false,
|
|
14
|
+
},
|
|
15
|
+
authoring: { unit: "none" },
|
|
16
|
+
parents: [{ parent: "org", child: "role" }],
|
|
17
|
+
resource: { shape: "single", resourceType: "elementum_role", adoptable: false },
|
|
18
|
+
lifecycle: NO_LIFECYCLE,
|
|
19
|
+
canvas: NO_CANVAS,
|
|
20
|
+
catalog: NO_CATALOG,
|
|
21
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Users: data-facet only. Not an org identity — no org.ts bag, never in an
|
|
3
|
+
* org export — but app streams reference users (email-keyed data lookups,
|
|
4
|
+
* e.g. field default assignees), so extraction must resolve them.
|
|
5
|
+
*/
|
|
6
|
+
import { type EntityKindModule } from "../../graph/types.js";
|
|
7
|
+
export declare const userModule: EntityKindModule;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Users: data-facet only. Not an org identity — no org.ts bag, never in an
|
|
3
|
+
* org export — but app streams reference users (email-keyed data lookups,
|
|
4
|
+
* e.g. field default assignees), so extraction must resolve them.
|
|
5
|
+
*/
|
|
6
|
+
import { NO_CANVAS, NO_CATALOG, NO_LIFECYCLE, } from "../../graph/types.js";
|
|
7
|
+
export const userModule = {
|
|
8
|
+
kind: "user",
|
|
9
|
+
stream: { role: "streamMember" },
|
|
10
|
+
data: {
|
|
11
|
+
participates: true,
|
|
12
|
+
lookupAttr: "email",
|
|
13
|
+
// A USER field's `default_value` (entities/field/types.ts's
|
|
14
|
+
// OrgFieldRefValue) and an access policy's `user_ids` (board issue #69)
|
|
15
|
+
// both round-trip as `data.elementum_user` lookups via the generic
|
|
16
|
+
// `rawLookup` mechanism — real, tested coverage, so this participates in
|
|
17
|
+
// the byte-fidelity roundtrip scope. A captured `elementum_user` data
|
|
18
|
+
// block for any OTHER reason still fails loud (missing from build
|
|
19
|
+
// output) rather than silently passing — surfacing gaps instead of
|
|
20
|
+
// hiding them was the tradeoff of leaving this false; if that surfaces a
|
|
21
|
+
// real one, extend the reproducing path rather than reverting this flag.
|
|
22
|
+
referencedByBuild: true,
|
|
23
|
+
},
|
|
24
|
+
authoring: { unit: "none" },
|
|
25
|
+
parents: [{ parent: "org", child: "user" }],
|
|
26
|
+
resource: { shape: "single", resourceType: "elementum_user", adoptable: false },
|
|
27
|
+
lifecycle: NO_LIFECYCLE,
|
|
28
|
+
canvas: NO_CANVAS,
|
|
29
|
+
catalog: NO_CATALOG,
|
|
30
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { SearchTableTimeUnit } from "../../../elementum-entity-client/clients/search-tables/models/index.js";
|
|
2
|
+
import { type CloudLinkRef, type ConnectorRef, type FieldRef, type SearchTableRef } from "../../catalog/index.js";
|
|
3
|
+
import type { DeployableEntity, EntityDeployOptions } from "../../engine/entity.js";
|
|
4
|
+
export type { SearchTableTimeUnit } from "../../../elementum-entity-client/clients/search-tables/models/index.js";
|
|
5
|
+
/** One vector-index column + the embedding connector that indexes it. */
|
|
6
|
+
export interface VectorIndex {
|
|
7
|
+
readonly field: FieldRef;
|
|
8
|
+
readonly connector: ConnectorRef;
|
|
9
|
+
}
|
|
10
|
+
interface CommonOptions extends EntityDeployOptions {
|
|
11
|
+
readonly handle?: string;
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly parent?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SearchTableSnowflakeV2Options extends CommonOptions {
|
|
16
|
+
readonly kind: "snowflake";
|
|
17
|
+
/** Columns returned alongside search hits (tokens → ids). At least one required. */
|
|
18
|
+
readonly attributeFields: readonly FieldRef[];
|
|
19
|
+
readonly duration: SearchTableTimeUnit;
|
|
20
|
+
readonly targetLag: number;
|
|
21
|
+
readonly textIndexFields?: readonly FieldRef[];
|
|
22
|
+
readonly vectorIndexes?: readonly VectorIndex[];
|
|
23
|
+
readonly warehouse?: string;
|
|
24
|
+
/** Legacy single-index key field; prefer `vectorIndexes`. */
|
|
25
|
+
readonly keyField?: FieldRef;
|
|
26
|
+
/** Legacy single-index embedding connector; prefer per-`vectorIndexes`. */
|
|
27
|
+
readonly embeddingConnector?: ConnectorRef;
|
|
28
|
+
}
|
|
29
|
+
export interface SearchTableLinkedV2Options extends CommonOptions {
|
|
30
|
+
readonly kind: "linked";
|
|
31
|
+
readonly cloudLink: CloudLinkRef;
|
|
32
|
+
readonly database: string;
|
|
33
|
+
readonly schema: string;
|
|
34
|
+
readonly serviceName: string;
|
|
35
|
+
readonly warehouse?: string;
|
|
36
|
+
}
|
|
37
|
+
export type DefineSearchTableV2Options = SearchTableSnowflakeV2Options | SearchTableLinkedV2Options;
|
|
38
|
+
/** Build a v2 search-table entity (app-owned; create-only), returning DeployableEntity with `.ref`. */
|
|
39
|
+
export declare function defineSearchTable(opts: DefineSearchTableV2Options): DeployableEntity & {
|
|
40
|
+
readonly ref: SearchTableRef;
|
|
41
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 search-table authoring — `defineSearchTable`. Parallel to v1
|
|
3
|
+
* `src/searchTables`, but standalone: produces a `DeployableEntity` of kind
|
|
4
|
+
* `searchTable` (app-owned) whose field / connector / cloud-link references are
|
|
5
|
+
* catalog tokens resolved at deploy. Two variants — `snowflake` (Elementum
|
|
6
|
+
* manages the table) and `linked` (points at an existing Cortex service) — pick
|
|
7
|
+
* the create endpoint via a `__variant` discriminator on the payload.
|
|
8
|
+
*
|
|
9
|
+
* Mostly create-only in v2: the platform's thin PUT only honors
|
|
10
|
+
* duration/targetLag on a snowflake table (see `planV2`'s
|
|
11
|
+
* `isSearchTableUpdateSupported`, `src/deploy/plan/plan.ts`). A diff limited
|
|
12
|
+
* to those fields routes to update; anything else (attributeFields,
|
|
13
|
+
* vectorIndexes, kind, warehouse, a linked table at all) surfaces as
|
|
14
|
+
* `update-unsupported` (delete + re-create).
|
|
15
|
+
*/
|
|
16
|
+
import { EdkValidationError } from "../../../elementum-entity-client/errors.js";
|
|
17
|
+
import { slimTokens, } from "../../catalog/index.js";
|
|
18
|
+
function snowflakeBody(opts) {
|
|
19
|
+
if (opts.targetLag <= 0) {
|
|
20
|
+
throw new EdkValidationError(`defineSearchTable: targetLag must be > 0 (got ${opts.targetLag}).`);
|
|
21
|
+
}
|
|
22
|
+
if (opts.attributeFields.length === 0) {
|
|
23
|
+
throw new EdkValidationError("defineSearchTable: at least one attributeField is required.");
|
|
24
|
+
}
|
|
25
|
+
const hasVectors = (opts.vectorIndexes?.length ?? 0) > 0;
|
|
26
|
+
const hasLegacy = opts.keyField != null || opts.embeddingConnector != null;
|
|
27
|
+
if (hasLegacy && (opts.keyField == null || opts.embeddingConnector == null)) {
|
|
28
|
+
throw new EdkValidationError("defineSearchTable: `keyField` and `embeddingConnector` must be provided together.");
|
|
29
|
+
}
|
|
30
|
+
if (!hasVectors && !hasLegacy) {
|
|
31
|
+
throw new EdkValidationError("defineSearchTable: provide either `vectorIndexes` or the legacy `keyField`+`embeddingConnector`.");
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
attributeFieldIds: opts.attributeFields, // FieldRef tokens → ids at deploy
|
|
35
|
+
duration: opts.duration,
|
|
36
|
+
targetLag: opts.targetLag,
|
|
37
|
+
...(opts.textIndexFields != null && opts.textIndexFields.length > 0
|
|
38
|
+
? { textIndexFieldIds: opts.textIndexFields }
|
|
39
|
+
: {}),
|
|
40
|
+
...(opts.warehouse != null ? { warehouse: opts.warehouse } : {}),
|
|
41
|
+
...(hasVectors
|
|
42
|
+
? { vectorIndexes: opts.vectorIndexes.map((v) => ({ fieldId: v.field, aiProviderConnectorId: v.connector })) }
|
|
43
|
+
: {}),
|
|
44
|
+
...(opts.keyField != null ? { fieldId: opts.keyField } : {}),
|
|
45
|
+
...(opts.embeddingConnector != null ? { aiProviderConnectorId: opts.embeddingConnector } : {}),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function linkedBody(opts) {
|
|
49
|
+
if (!opts.serviceName) {
|
|
50
|
+
throw new EdkValidationError("defineSearchTable: linked tables require a non-empty `serviceName`.");
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
cloudLinkId: opts.cloudLink, // CloudLinkRef token → id at deploy
|
|
54
|
+
database: opts.database,
|
|
55
|
+
schema: opts.schema,
|
|
56
|
+
serviceName: opts.serviceName,
|
|
57
|
+
...(opts.warehouse != null ? { warehouse: opts.warehouse } : {}),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/** Build a v2 search-table entity (app-owned; create-only), returning DeployableEntity with `.ref`. */
|
|
61
|
+
export function defineSearchTable(opts) {
|
|
62
|
+
const handle = opts.handle ?? "";
|
|
63
|
+
const parent = opts.parent ?? "";
|
|
64
|
+
const ref = { __kind: "searchTable", refName: handle, name: opts.name, parent };
|
|
65
|
+
// `__variant` tells the wire client which create endpoint to POST to; it's
|
|
66
|
+
// stripped from the body before the request.
|
|
67
|
+
const payload = {
|
|
68
|
+
__variant: opts.kind,
|
|
69
|
+
...(opts.kind === "snowflake" ? snowflakeBody(opts) : linkedBody(opts)),
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
ref,
|
|
73
|
+
kind: "searchTable",
|
|
74
|
+
parent,
|
|
75
|
+
refName: handle,
|
|
76
|
+
payload: slimTokens(payload),
|
|
77
|
+
...(opts.enabled !== undefined ? { enabled: opts.enabled } : {}),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 search-table authoring — `defineSearchTable`. App-owned; create-only.
|
|
3
|
+
* Standalone from v1's `src/searchTables`.
|
|
4
|
+
*/
|
|
5
|
+
export { defineSearchTable, type DefineSearchTableV2Options, type SearchTableLinkedV2Options, type SearchTableSnowflakeV2Options, type SearchTableTimeUnit, type VectorIndex, } from "./build.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search-table kind graph stub — own-file under app/element for layout +
|
|
3
|
+
* catalog discovery; TF bridge not on the graph lifecycle yet.
|
|
4
|
+
*/
|
|
5
|
+
import { type EntityKindModule } from "../../graph/types.js";
|
|
6
|
+
export declare const searchTableModule: EntityKindModule;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search-table kind graph stub — own-file under app/element for layout +
|
|
3
|
+
* catalog discovery; TF bridge not on the graph lifecycle yet.
|
|
4
|
+
*/
|
|
5
|
+
import { rootParentFactoryEntry } from "../../catalog/render-helpers.js";
|
|
6
|
+
import { NO_DATA, NO_LIFECYCLE, } from "../../graph/types.js";
|
|
7
|
+
function isConfigured(value) {
|
|
8
|
+
return (typeof value === "object" &&
|
|
9
|
+
value !== null &&
|
|
10
|
+
typeof value.ref === "function" &&
|
|
11
|
+
typeof value.def === "function");
|
|
12
|
+
}
|
|
13
|
+
function searchTableStubRef(refName, parent) {
|
|
14
|
+
return { __kind: "searchTable", refName, name: refName, parent };
|
|
15
|
+
}
|
|
16
|
+
function searchTableRefFromAuthoring(args) {
|
|
17
|
+
const { refName, parent, defaultExport } = args;
|
|
18
|
+
if (isConfigured(defaultExport)) {
|
|
19
|
+
const catalogRef = defaultExport.ref(refName);
|
|
20
|
+
if (catalogRef.__kind !== "searchTable")
|
|
21
|
+
return undefined;
|
|
22
|
+
return catalogRef;
|
|
23
|
+
}
|
|
24
|
+
// DeployableEntity.kind uses the catalog refKind ("searchTable"), not KindId.
|
|
25
|
+
if (typeof defaultExport !== "object" ||
|
|
26
|
+
defaultExport === null ||
|
|
27
|
+
defaultExport.kind !== "searchTable") {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
const entity = defaultExport;
|
|
31
|
+
const entityRefName = entity.refName === "" ? refName : entity.refName;
|
|
32
|
+
const entityParent = entity.parent === "" ? parent : entity.parent;
|
|
33
|
+
const maybeRefName = entity.ref?.name;
|
|
34
|
+
const payloadName = entity.payload?.name;
|
|
35
|
+
const name = typeof maybeRefName === "string"
|
|
36
|
+
? maybeRefName
|
|
37
|
+
: typeof payloadName === "string"
|
|
38
|
+
? payloadName
|
|
39
|
+
: entityRefName;
|
|
40
|
+
return { __kind: "searchTable", refName: entityRefName, name, parent: entityParent };
|
|
41
|
+
}
|
|
42
|
+
export const searchTableModule = {
|
|
43
|
+
kind: "search-table",
|
|
44
|
+
stream: { role: "streamReported" },
|
|
45
|
+
authoring: { unit: "ownFile", bag: "search-tables" },
|
|
46
|
+
parents: [
|
|
47
|
+
{ parent: "app", child: "search-table" },
|
|
48
|
+
{ parent: "element", child: "search-table" },
|
|
49
|
+
],
|
|
50
|
+
resource: { shape: "none" },
|
|
51
|
+
data: NO_DATA,
|
|
52
|
+
lifecycle: NO_LIFECYCLE,
|
|
53
|
+
canvas: { participates: true, label: "Search tables", glyph: "⌕", component: "generic" },
|
|
54
|
+
catalog: {
|
|
55
|
+
participates: true,
|
|
56
|
+
refKind: "searchTable",
|
|
57
|
+
catalogBag: "searchTables",
|
|
58
|
+
renderOrder: 60,
|
|
59
|
+
catalogRoot: "app",
|
|
60
|
+
renderEntry: rootParentFactoryEntry("searchTableRef"),
|
|
61
|
+
stubRef: searchTableStubRef,
|
|
62
|
+
refFromAuthoring: searchTableRefFromAuthoring,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context & Proxy factory — builds the typed `ctx` object passed to each
|
|
3
|
+
* .task() callback.
|
|
4
|
+
*
|
|
5
|
+
* At the TypeScript level, ctx.trigger.vendorName is Ref<string>.
|
|
6
|
+
* At runtime, a Proxy intercepts the property access and returns a Ref
|
|
7
|
+
* with the correct RefData ({ kind: "trigger", name: "vendorName" }).
|
|
8
|
+
*
|
|
9
|
+
* This bridges compile-time type safety with runtime reference building.
|
|
10
|
+
*/
|
|
11
|
+
import type { Ref, ToRefs, Simplify } from "./ref.js";
|
|
12
|
+
/**
|
|
13
|
+
* Deep ref — a `Ref<T>` that also exposes `T`'s string-keyed properties as
|
|
14
|
+
* nested deep refs. This is what makes `ctx.tasks.x.record.id` and
|
|
15
|
+
* `ctx.trigger.record.summary` type-check: each property access yields
|
|
16
|
+
* another `Ref` whose runtime proxy extends the dotted path in `RefData.name`.
|
|
17
|
+
*
|
|
18
|
+
* Arrays stop the recursion — you can't drill into an array element by type.
|
|
19
|
+
*/
|
|
20
|
+
export type DeepRef<T> = Ref<T> & (T extends ReadonlyArray<unknown> ? unknown : T extends object ? {
|
|
21
|
+
[K in keyof T & string]: DeepRef<T[K]>;
|
|
22
|
+
} : unknown);
|
|
23
|
+
/**
|
|
24
|
+
* Maps each key of `T` to a `DeepRef` — used for both trigger outputs and
|
|
25
|
+
* task outputs so that property drilling (`ctx.trigger.record.summary`,
|
|
26
|
+
* `ctx.tasks.x.record.id`) type-checks uniformly.
|
|
27
|
+
*/
|
|
28
|
+
export type DeepRefs<T> = {
|
|
29
|
+
[K in keyof T]: DeepRef<T[K]>;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Default open-ended shape for variables when the builder hasn't tracked
|
|
33
|
+
* any typed `setVariable` calls yet — the generic-path form, where a variable
|
|
34
|
+
* task may create several variables: `ctx.variables.<varTask>.<varName>` is
|
|
35
|
+
* `Ref<unknown>`.
|
|
36
|
+
*/
|
|
37
|
+
export type VariableRefs = {
|
|
38
|
+
[taskName: string]: {
|
|
39
|
+
[varName: string]: Ref<unknown>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Narrow variable refs from the fluent `setVariable` tracking (task name →
|
|
44
|
+
* the variable's TS value type). A fluent variable task holds exactly ONE
|
|
45
|
+
* variable named after the task, so the task-name access IS the ref:
|
|
46
|
+
* `ctx.variables.<name>` is `Ref<T>` — no second hop.
|
|
47
|
+
*/
|
|
48
|
+
type TypedVariableRefs<TVariables extends Record<string, unknown>> = {
|
|
49
|
+
[TaskName in keyof TVariables]: Ref<TVariables[TaskName]>;
|
|
50
|
+
};
|
|
51
|
+
export type Context<TTrigger, TTasks extends Record<string, unknown>, TVariables extends Record<string, unknown> = Record<string, never>> = {
|
|
52
|
+
readonly trigger: DeepRefs<TTrigger>;
|
|
53
|
+
readonly tasks: Simplify<{
|
|
54
|
+
[K in keyof TTasks]: DeepRefs<TTasks[K]>;
|
|
55
|
+
}>;
|
|
56
|
+
readonly variables: keyof TVariables extends never ? VariableRefs : TypedVariableRefs<TVariables> & VariableRefs;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Creates a proxy that intercepts property access and returns trigger Refs.
|
|
60
|
+
* Top-level access returns a deep ref so nested field drilling works:
|
|
61
|
+
* ctx.trigger.vendorName → Ref { kind: "trigger", name: "vendorName" }
|
|
62
|
+
* ctx.trigger.record.id → Ref { kind: "trigger", name: "record.id" }
|
|
63
|
+
*/
|
|
64
|
+
export declare function createTriggerProxy<T>(): DeepRefs<T>;
|
|
65
|
+
/**
|
|
66
|
+
* Creates a proxy for a single task's outputs.
|
|
67
|
+
* ctx.tasks.findVendor.records → Ref with { kind: "task", taskRefKey: "findVendor", name: "records" }
|
|
68
|
+
*/
|
|
69
|
+
export declare function createTaskOutputProxy<T>(taskRefKey: string): DeepRefs<T>;
|
|
70
|
+
/**
|
|
71
|
+
* Creates a proxy for the tasks namespace.
|
|
72
|
+
* ctx.tasks → Proxy where each property access returns a task output proxy.
|
|
73
|
+
*/
|
|
74
|
+
export declare function createTasksProxy<TTasks extends Record<string, unknown>>(taskNames: string[]): Context<never, TTasks>["tasks"];
|
|
75
|
+
/**
|
|
76
|
+
* A forEach item that is both a Ref to the whole item and a proxy
|
|
77
|
+
* with typed field access: item.fieldName → Ref<T[fieldName]>.
|
|
78
|
+
*/
|
|
79
|
+
export type ForEachItem<T> = Ref<T> & ToRefs<T>;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a forEach item proxy.
|
|
82
|
+
* item.fieldName → Ref with { kind: "forEach", forEachTaskName, name: "fieldName" }
|
|
83
|
+
* Accessing the item directly (without a property) returns a Ref to the whole item.
|
|
84
|
+
*/
|
|
85
|
+
export declare function createForEachItemProxy<T>(forEachTaskName: string): ForEachItem<T>;
|
|
86
|
+
/**
|
|
87
|
+
* Build a complete Context object for a given point in the chain.
|
|
88
|
+
*
|
|
89
|
+
* `TVariables` is a phantom — it only affects the compile-time shape of
|
|
90
|
+
* `ctx.variables`. The runtime proxy is still an open-ended lookup.
|
|
91
|
+
*/
|
|
92
|
+
export declare function buildContext<TTrigger, TTasks extends Record<string, unknown>, TVariables extends Record<string, unknown> = Record<string, never>>(taskNames: string[]): Context<TTrigger, TTasks, TVariables>;
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context & Proxy factory — builds the typed `ctx` object passed to each
|
|
3
|
+
* .task() callback.
|
|
4
|
+
*
|
|
5
|
+
* At the TypeScript level, ctx.trigger.vendorName is Ref<string>.
|
|
6
|
+
* At runtime, a Proxy intercepts the property access and returns a Ref
|
|
7
|
+
* with the correct RefData ({ kind: "trigger", name: "vendorName" }).
|
|
8
|
+
*
|
|
9
|
+
* This bridges compile-time type safety with runtime reference building.
|
|
10
|
+
*/
|
|
11
|
+
import { createRef } from "./ref.js";
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
// Proxy factories
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
/**
|
|
16
|
+
* Ref to a trigger output path; further property access extends `name`
|
|
17
|
+
* with dot segments, mirroring `createTaskOutputFieldRef` for task refs.
|
|
18
|
+
* ctx.trigger.record.summary → { kind: "trigger", name: "record.summary" }
|
|
19
|
+
*/
|
|
20
|
+
function createTriggerFieldRef(path) {
|
|
21
|
+
const base = createRef({ kind: "trigger", name: path });
|
|
22
|
+
return new Proxy(base, {
|
|
23
|
+
get(target, prop, receiver) {
|
|
24
|
+
if (typeof prop === "symbol" || prop === "__data" || prop === "__type") {
|
|
25
|
+
return Reflect.get(target, prop, receiver);
|
|
26
|
+
}
|
|
27
|
+
return createTriggerFieldRef(`${path}.${String(prop)}`);
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates a proxy that intercepts property access and returns trigger Refs.
|
|
33
|
+
* Top-level access returns a deep ref so nested field drilling works:
|
|
34
|
+
* ctx.trigger.vendorName → Ref { kind: "trigger", name: "vendorName" }
|
|
35
|
+
* ctx.trigger.record.id → Ref { kind: "trigger", name: "record.id" }
|
|
36
|
+
*/
|
|
37
|
+
export function createTriggerProxy() {
|
|
38
|
+
return new Proxy({}, {
|
|
39
|
+
get(_target, prop) {
|
|
40
|
+
if (typeof prop === "symbol")
|
|
41
|
+
return undefined;
|
|
42
|
+
return createTriggerFieldRef(prop);
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Ref to a task output path; further property access extends `name` with dot segments
|
|
48
|
+
* (`record.id` → `{ kind: "task", taskRefKey, name: "record.id" }`).
|
|
49
|
+
*/
|
|
50
|
+
function createTaskOutputFieldRef(taskRefKey, outputPath) {
|
|
51
|
+
const base = createRef({ kind: "task", taskRefKey, name: outputPath });
|
|
52
|
+
return new Proxy(base, {
|
|
53
|
+
get(target, prop, receiver) {
|
|
54
|
+
if (typeof prop === "symbol" || prop === "__data" || prop === "__type") {
|
|
55
|
+
return Reflect.get(target, prop, receiver);
|
|
56
|
+
}
|
|
57
|
+
return createTaskOutputFieldRef(taskRefKey, `${outputPath}.${String(prop)}`);
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Creates a proxy for a single task's outputs.
|
|
63
|
+
* ctx.tasks.findVendor.records → Ref with { kind: "task", taskRefKey: "findVendor", name: "records" }
|
|
64
|
+
*/
|
|
65
|
+
export function createTaskOutputProxy(taskRefKey) {
|
|
66
|
+
return new Proxy({}, {
|
|
67
|
+
get(_target, prop) {
|
|
68
|
+
if (typeof prop === "symbol")
|
|
69
|
+
return undefined;
|
|
70
|
+
return createTaskOutputFieldRef(taskRefKey, String(prop));
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Creates a proxy for the tasks namespace.
|
|
76
|
+
* ctx.tasks → Proxy where each property access returns a task output proxy.
|
|
77
|
+
*/
|
|
78
|
+
export function createTasksProxy(taskNames) {
|
|
79
|
+
const cache = new Map();
|
|
80
|
+
return new Proxy({}, {
|
|
81
|
+
get(_target, prop) {
|
|
82
|
+
if (typeof prop === "symbol")
|
|
83
|
+
return undefined;
|
|
84
|
+
if (!cache.has(prop)) {
|
|
85
|
+
cache.set(prop, createTaskOutputProxy(prop));
|
|
86
|
+
}
|
|
87
|
+
return cache.get(prop);
|
|
88
|
+
},
|
|
89
|
+
ownKeys() {
|
|
90
|
+
return taskNames;
|
|
91
|
+
},
|
|
92
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
93
|
+
if (typeof prop === "symbol")
|
|
94
|
+
return undefined;
|
|
95
|
+
if (taskNames.includes(prop)) {
|
|
96
|
+
return { configurable: true, enumerable: true, writable: false };
|
|
97
|
+
}
|
|
98
|
+
return undefined;
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Creates a forEach item proxy.
|
|
104
|
+
* item.fieldName → Ref with { kind: "forEach", forEachTaskName, name: "fieldName" }
|
|
105
|
+
* Accessing the item directly (without a property) returns a Ref to the whole item.
|
|
106
|
+
*/
|
|
107
|
+
export function createForEachItemProxy(forEachTaskName) {
|
|
108
|
+
const baseRef = createRef({ kind: "forEach", forEachTaskName, name: "item" });
|
|
109
|
+
return new Proxy(baseRef, {
|
|
110
|
+
get(target, prop) {
|
|
111
|
+
if (typeof prop === "symbol" || prop === "__data" || prop === "__type") {
|
|
112
|
+
return target[prop];
|
|
113
|
+
}
|
|
114
|
+
return createRef({ kind: "forEach", forEachTaskName, name: prop });
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Variables proxy. The first-level access is a HYBRID (same pattern as
|
|
120
|
+
* {@link createForEachItemProxy}): it is itself a Ref to the variable named
|
|
121
|
+
* after the task — the fluent form, `ctx.variables.greeting` — AND a proxy
|
|
122
|
+
* whose further property access yields per-variable refs — the generic form,
|
|
123
|
+
* `ctx.variables.taskName.varName`, for variable tasks creating several
|
|
124
|
+
* variables. Both produce { kind: "variableParam", variableTaskRefKey, name }.
|
|
125
|
+
*/
|
|
126
|
+
function createVariablesProxy() {
|
|
127
|
+
return new Proxy({}, {
|
|
128
|
+
get(_target, taskName) {
|
|
129
|
+
if (typeof taskName === "symbol")
|
|
130
|
+
return undefined;
|
|
131
|
+
const task = String(taskName);
|
|
132
|
+
const base = createRef({ kind: "variableParam", variableTaskRefKey: task, name: task });
|
|
133
|
+
return new Proxy(base, {
|
|
134
|
+
get(target, varName, receiver) {
|
|
135
|
+
if (typeof varName === "symbol" || varName === "__data" || varName === "__type") {
|
|
136
|
+
return Reflect.get(target, varName, receiver);
|
|
137
|
+
}
|
|
138
|
+
return createRef({ kind: "variableParam", variableTaskRefKey: task, name: String(varName) });
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Build a complete Context object for a given point in the chain.
|
|
146
|
+
*
|
|
147
|
+
* `TVariables` is a phantom — it only affects the compile-time shape of
|
|
148
|
+
* `ctx.variables`. The runtime proxy is still an open-ended lookup.
|
|
149
|
+
*/
|
|
150
|
+
export function buildContext(taskNames) {
|
|
151
|
+
return {
|
|
152
|
+
trigger: createTriggerProxy(),
|
|
153
|
+
tasks: createTasksProxy(taskNames),
|
|
154
|
+
variables: createVariablesProxy(),
|
|
155
|
+
};
|
|
156
|
+
}
|