@elementumai/edk 0.0.0-oidc-bootstrap → 0.8.0-preview.11
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 +408 -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/factories.d.ts +189 -0
- package/dist-sdk/src/catalog/factories.js +202 -0
- package/dist-sdk/src/catalog/from-authoring.d.ts +103 -0
- package/dist-sdk/src/catalog/from-authoring.js +462 -0
- package/dist-sdk/src/catalog/index.d.ts +11 -0
- package/dist-sdk/src/catalog/index.js +11 -0
- package/dist-sdk/src/catalog/org.d.ts +11 -0
- package/dist-sdk/src/catalog/org.js +211 -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 +36 -0
- package/dist-sdk/src/catalog/render.js +176 -0
- package/dist-sdk/src/catalog/token.d.ts +10 -0
- package/dist-sdk/src/catalog/token.js +62 -0
- package/dist-sdk/src/catalog/types.d.ts +158 -0
- package/dist-sdk/src/catalog/types.js +83 -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 +93 -0
- package/dist-sdk/src/core/system-fields.js +151 -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 +36 -0
- package/dist-sdk/src/core/types/ai-provider.js +32 -0
- package/dist-sdk/src/core/types/app.d.ts +838 -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 +49 -0
- package/dist-sdk/src/engine/build/context.js +6 -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 +23 -0
- package/dist-sdk/src/engine/pull/context.js +44 -0
- package/dist-sdk/src/engine/pull/org.d.ts +44 -0
- package/dist-sdk/src/engine/pull/org.js +104 -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 +31 -0
- package/dist-sdk/src/engine/tf/labels.js +125 -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/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 +18 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +177 -0
- package/dist-sdk/src/entities/agent/from-tf.d.ts +50 -0
- package/dist-sdk/src/entities/agent/from-tf.js +169 -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 +116 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/agent/to-tf.js +136 -0
- package/dist-sdk/src/entities/agent/tools.d.ts +205 -0
- package/dist-sdk/src/entities/agent/tools.js +199 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +63 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.js +169 -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 +38 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.js +164 -0
- package/dist-sdk/src/entities/agent-tool/types.d.ts +42 -0
- package/dist-sdk/src/entities/agent-tool/types.js +70 -0
- package/dist-sdk/src/entities/app/build.d.ts +318 -0
- package/dist-sdk/src/entities/app/build.js +325 -0
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +165 -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 +180 -0
- package/dist-sdk/src/entities/app/index.d.ts +11 -0
- package/dist-sdk/src/entities/app/index.js +10 -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 +59 -0
- package/dist-sdk/src/entities/app/to-tf.d.ts +28 -0
- package/dist-sdk/src/entities/app/to-tf.js +183 -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 +215 -0
- package/dist-sdk/src/entities/automation/build.js +424 -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 +135 -0
- package/dist-sdk/src/entities/automation/deserializer/ast.js +13 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +40 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +1040 -0
- package/dist-sdk/src/entities/automation/filter.d.ts +81 -0
- package/dist-sdk/src/entities/automation/filter.js +146 -0
- package/dist-sdk/src/entities/automation/from-tf.d.ts +36 -0
- package/dist-sdk/src/entities/automation/from-tf.js +252 -0
- package/dist-sdk/src/entities/automation/index.d.ts +18 -0
- package/dist-sdk/src/entities/automation/index.js +21 -0
- package/dist-sdk/src/entities/automation/module.d.ts +3 -0
- package/dist-sdk/src/entities/automation/module.js +153 -0
- package/dist-sdk/src/entities/automation/operators.d.ts +66 -0
- package/dist-sdk/src/entities/automation/operators.js +43 -0
- package/dist-sdk/src/entities/automation/script-code.d.ts +62 -0
- package/dist-sdk/src/entities/automation/script-code.js +366 -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 +535 -0
- package/dist-sdk/src/entities/automation/tasks.js +697 -0
- package/dist-sdk/src/entities/automation/to-tf.d.ts +38 -0
- package/dist-sdk/src/entities/automation/to-tf.js +266 -0
- package/dist-sdk/src/entities/automation/triggers.d.ts +197 -0
- package/dist-sdk/src/entities/automation/triggers.js +202 -0
- package/dist-sdk/src/entities/automation/types.d.ts +53 -0
- package/dist-sdk/src/entities/automation/types.js +101 -0
- package/dist-sdk/src/entities/automation/value-ref-tf.d.ts +76 -0
- package/dist-sdk/src/entities/automation/value-ref-tf.js +190 -0
- package/dist-sdk/src/entities/element/build.d.ts +108 -0
- package/dist-sdk/src/entities/element/build.js +109 -0
- package/dist-sdk/src/entities/element/from-tf.d.ts +19 -0
- package/dist-sdk/src/entities/element/from-tf.js +155 -0
- package/dist-sdk/src/entities/element/index.d.ts +9 -0
- package/dist-sdk/src/entities/element/index.js +9 -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 +63 -0
- package/dist-sdk/src/entities/element/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/element/to-tf.js +151 -0
- package/dist-sdk/src/entities/field/build.d.ts +69 -0
- package/dist-sdk/src/entities/field/build.js +74 -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 +170 -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 +29 -0
- package/dist-sdk/src/entities/field/from-tf.js +73 -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 +49 -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 +55 -0
- package/dist-sdk/src/entities/field/to-tf.js +97 -0
- package/dist-sdk/src/entities/field/types.d.ts +27 -0
- package/dist-sdk/src/entities/field/types.js +46 -0
- package/dist-sdk/src/entities/file-reader/build.d.ts +124 -0
- package/dist-sdk/src/entities/file-reader/build.js +105 -0
- package/dist-sdk/src/entities/file-reader/index.d.ts +5 -0
- package/dist-sdk/src/entities/file-reader/index.js +5 -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/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 +5 -0
- package/dist-sdk/src/entities/org/connector.js +37 -0
- package/dist-sdk/src/entities/org/group.d.ts +5 -0
- package/dist-sdk/src/entities/org/group.js +31 -0
- package/dist-sdk/src/entities/org/index.d.ts +10 -0
- package/dist-sdk/src/entities/org/index.js +10 -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 +21 -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 +242 -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/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 +49 -0
- package/dist-sdk/src/entities/shared/types/field-types.js +48 -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 +20 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +96 -0
- package/dist-sdk/src/entities/skill/from-tf.d.ts +33 -0
- package/dist-sdk/src/entities/skill/from-tf.js +95 -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 +106 -0
- package/dist-sdk/src/entities/skill/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/skill/to-tf.js +58 -0
- package/dist-sdk/src/entities/skill/tools.d.ts +71 -0
- package/dist-sdk/src/entities/skill/tools.js +88 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +47 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.js +121 -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 +32 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.js +107 -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 +25 -0
- package/dist-sdk/src/entities/view/from-tf.js +233 -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 +63 -0
- package/dist-sdk/src/entities/view/to-tf.js +156 -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 +14 -0
- package/dist-sdk/src/graph/deferred-catalog-render.js +37 -0
- package/dist-sdk/src/graph/index.d.ts +83 -0
- package/dist-sdk/src/graph/index.js +207 -0
- package/dist-sdk/src/graph/modules.d.ts +7 -0
- package/dist-sdk/src/graph/modules.js +37 -0
- package/dist-sdk/src/graph/types.d.ts +301 -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 +173 -8
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App object pattern — a single typed object per Elementum app that
|
|
3
|
+
* carries all related IDs (fields, agents, search tables, automations).
|
|
4
|
+
*
|
|
5
|
+
* Each app is code-generated from its platform definition and imported into
|
|
6
|
+
* automation files. Downstream task configs (e.g. `recordSearch`,
|
|
7
|
+
* `updateField`, `aiSearchTable`) accept the imported app value directly;
|
|
8
|
+
* the generics infer field / record shapes from it.
|
|
9
|
+
*/
|
|
10
|
+
import { isRef } from "../../entities/shared/ref.js";
|
|
11
|
+
import { EdkValidationError } from "../../../elementum-entity-client/errors.js";
|
|
12
|
+
import { appToUi } from "../app-to-ui.js";
|
|
13
|
+
export function picklistOption(id, label, parentValues) {
|
|
14
|
+
return { id, label, ...(parentValues != null && { parentValues }) };
|
|
15
|
+
}
|
|
16
|
+
function optionValues(options) {
|
|
17
|
+
return Object.values(options);
|
|
18
|
+
}
|
|
19
|
+
function isPicklistOptionValue(value) {
|
|
20
|
+
return (typeof value === "object" &&
|
|
21
|
+
value !== null &&
|
|
22
|
+
"id" in value &&
|
|
23
|
+
"label" in value &&
|
|
24
|
+
typeof value.id === "string" &&
|
|
25
|
+
typeof value.label === "string");
|
|
26
|
+
}
|
|
27
|
+
// Scope-agnostic parameters — these helpers operate on the runtime shape of
|
|
28
|
+
// `AppField`, which is identical regardless of the phantom `Scope` marker.
|
|
29
|
+
// `options` is on the picklist variants only; the property-existence guard
|
|
30
|
+
// narrows the union before accessing it.
|
|
31
|
+
function matchesFieldOption(field, value) {
|
|
32
|
+
if (!("options" in field) || !field.options)
|
|
33
|
+
return false;
|
|
34
|
+
return optionValues(field.options).some((o) => o.id === value.id && o.label === value.label);
|
|
35
|
+
}
|
|
36
|
+
/** If `value` is a static picklist option for this field, return its API id; otherwise return `value`. */
|
|
37
|
+
export function picklistStaticValueToApiId(field, value) {
|
|
38
|
+
if (!("options" in field) || !field.options || isRef(value))
|
|
39
|
+
return value;
|
|
40
|
+
if (isPicklistOptionValue(value) && matchesFieldOption(field, value))
|
|
41
|
+
return value.id;
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Well-known UUID for the system `id` field on every aspect record.
|
|
46
|
+
* Not part of an app's custom field definitions but always present on
|
|
47
|
+
* `AspectRecord<A>` as `{ id: string }`.
|
|
48
|
+
*/
|
|
49
|
+
const SYSTEM_RECORD_ID_FIELD = "10000001-2000-4000-a000-800000000000";
|
|
50
|
+
/**
|
|
51
|
+
* Build a map from field property key → field UUID for the given app.
|
|
52
|
+
* Used by the serializer to rewrite `record.<fieldKey>` → `record.<fieldUUID>`
|
|
53
|
+
* in both trigger and task references. Includes the system `id` field.
|
|
54
|
+
*/
|
|
55
|
+
export function buildFieldMap(app) {
|
|
56
|
+
const m = new Map();
|
|
57
|
+
m.set("id", SYSTEM_RECORD_ID_FIELD);
|
|
58
|
+
const fields = app.fields;
|
|
59
|
+
for (const [key, field] of Object.entries(fields)) {
|
|
60
|
+
m.set(key, field.id);
|
|
61
|
+
}
|
|
62
|
+
return m;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Build a map from field UUID → field type literal for the given app.
|
|
66
|
+
* Used by the serializer to decide whether a `record.<fieldUuid>` trigger
|
|
67
|
+
* ref placed in a USER_ID / GROUP_ID slot (sendEmail.users / groups) needs
|
|
68
|
+
* an `.id` drill-in: USER and GROUP record fields surface as objects on
|
|
69
|
+
* the wire, and the surrounding slot wants the id specifically.
|
|
70
|
+
*/
|
|
71
|
+
export function buildFieldTypeByIdMap(app) {
|
|
72
|
+
const m = new Map();
|
|
73
|
+
const fields = app.fields;
|
|
74
|
+
for (const field of Object.values(fields)) {
|
|
75
|
+
m.set(field.id, field.type);
|
|
76
|
+
}
|
|
77
|
+
return m;
|
|
78
|
+
}
|
|
79
|
+
export function defineApp(opts) {
|
|
80
|
+
const built = {
|
|
81
|
+
id: opts.id,
|
|
82
|
+
name: opts.name,
|
|
83
|
+
fields: (opts.fields ?? {}),
|
|
84
|
+
systemFields: (opts.systemFields ?? {}),
|
|
85
|
+
agents: (opts.agents ?? {}),
|
|
86
|
+
searchTables: (opts.searchTables ?? {}),
|
|
87
|
+
automations: brandAutomations(opts.automations),
|
|
88
|
+
phoneServices: (opts.phoneServices ?? {}),
|
|
89
|
+
flows: (opts.flows ?? {}),
|
|
90
|
+
approvalChains: (opts.approvalChains ?? {}),
|
|
91
|
+
agenticSkills: (opts.agenticSkills ?? {}),
|
|
92
|
+
stages: (opts.stages ?? {}),
|
|
93
|
+
...(opts.handle != null && { handle: opts.handle }),
|
|
94
|
+
...(opts.namespace != null && { namespace: opts.namespace }),
|
|
95
|
+
...(opts.description != null && { description: opts.description }),
|
|
96
|
+
...(opts.type != null && { type: opts.type }),
|
|
97
|
+
...(opts.category != null && { category: opts.category }),
|
|
98
|
+
...(opts.icon != null && { icon: opts.icon }),
|
|
99
|
+
...(opts.color != null && { color: opts.color }),
|
|
100
|
+
...(opts.cloudLink != null && { cloudLink: opts.cloudLink }),
|
|
101
|
+
...(opts.cloudConnection != null && { cloudConnection: opts.cloudConnection }),
|
|
102
|
+
...(opts.commentsEnabled != null && { commentsEnabled: opts.commentsEnabled }),
|
|
103
|
+
...(opts.displayBlocks != null && { displayBlocks: opts.displayBlocks }),
|
|
104
|
+
...(opts.recordCreateDisplayBlocks != null && { recordCreateDisplayBlocks: opts.recordCreateDisplayBlocks }),
|
|
105
|
+
toUI() {
|
|
106
|
+
return appToUi(built);
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
return built;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Stamps `kind: "automation"` on each automation entry and
|
|
113
|
+
* `kind: "workflow"` on each nested `workflowCurrent` /
|
|
114
|
+
* `workflowDraft` so tool factories can reject a workflow ref passed
|
|
115
|
+
* where an automation ref was expected. Both shapes share the same
|
|
116
|
+
* required surface (`id: string`), so type-system structural typing
|
|
117
|
+
* lets the swap slip past `tsc`. The runtime brand is the safety net.
|
|
118
|
+
*
|
|
119
|
+
* Pure function — returns a new object graph rather than mutating
|
|
120
|
+
* the input. Non-`AppAutomation` entries (`DeployableAutomation`
|
|
121
|
+
* objects produced by `defineAutomation(...).build()`) pass through
|
|
122
|
+
* unchanged; the brand is only relevant for `AppAutomation` data
|
|
123
|
+
* refs.
|
|
124
|
+
*/
|
|
125
|
+
function brandAutomations(automations) {
|
|
126
|
+
if (!automations)
|
|
127
|
+
return {};
|
|
128
|
+
const out = {};
|
|
129
|
+
for (const [key, value] of Object.entries(automations)) {
|
|
130
|
+
if (isAppAutomationRef(value)) {
|
|
131
|
+
out[key] = {
|
|
132
|
+
kind: "automation",
|
|
133
|
+
...value,
|
|
134
|
+
...(value.workflowCurrent != null && {
|
|
135
|
+
workflowCurrent: { kind: "workflow", ...value.workflowCurrent },
|
|
136
|
+
}),
|
|
137
|
+
...(value.workflowDraft != null && {
|
|
138
|
+
workflowDraft: { kind: "workflow", ...value.workflowDraft },
|
|
139
|
+
}),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
out[key] = value;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return out;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Distinguishes a data ref (`AppAutomation`) from a built deployable
|
|
150
|
+
* (`DeployableAutomation`). Built deployables carry a `deploy()`
|
|
151
|
+
* function and a `kind: "automation"` from the builder; we only want
|
|
152
|
+
* to brand plain data refs since builders produce their own typed
|
|
153
|
+
* shape that the late-binding registry resolves at deploy time.
|
|
154
|
+
*/
|
|
155
|
+
function isAppAutomationRef(value) {
|
|
156
|
+
return typeof value.deploy !== "function";
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Build a row proxy. Runtime-only identity cast — the returned object IS
|
|
160
|
+
* the source; only its static type changes to expose row-scoped fields.
|
|
161
|
+
* Tasks that filter rows call this before invoking the user's callback so
|
|
162
|
+
* the callback argument is typed as `RowProxy<T>`.
|
|
163
|
+
*/
|
|
164
|
+
export function asRowProxy(source) {
|
|
165
|
+
return source;
|
|
166
|
+
}
|
|
167
|
+
function isPicklistOptionsResolver(value) {
|
|
168
|
+
return typeof value === "function";
|
|
169
|
+
}
|
|
170
|
+
export function resolveFieldValues(app, values) {
|
|
171
|
+
const fields = app.fields;
|
|
172
|
+
const systemFields = (app.systemFields ?? {});
|
|
173
|
+
return Object.entries(values).map(([key, value]) => {
|
|
174
|
+
// User fields win the lookup over system fields. A collision is
|
|
175
|
+
// practically impossible — reserved system-field names are blocked
|
|
176
|
+
// in `fields`, so it would take a user field whose handle happens
|
|
177
|
+
// to match a system handle — but the precedence is explicit.
|
|
178
|
+
const field = fields[key] ?? systemFields[key];
|
|
179
|
+
if (!field)
|
|
180
|
+
throw new EdkValidationError(`Unknown field "${key}" on app "${app.name}"`);
|
|
181
|
+
if (isRef(value)) {
|
|
182
|
+
return { fieldId: field.id, value };
|
|
183
|
+
}
|
|
184
|
+
if ((field.type === "PICKLIST" || field.type === "MULTI_PICKLIST") && field.options) {
|
|
185
|
+
if (!isPicklistOptionsResolver(value)) {
|
|
186
|
+
throw new EdkValidationError(`Field "${field.name}" (${field.type}) requires a static picklist callback ` +
|
|
187
|
+
`\`(options) => options.YourOption\`, or a Ref (e.g. val(uuid)) for a dynamic value.`);
|
|
188
|
+
}
|
|
189
|
+
const chosen = value(field.options);
|
|
190
|
+
if (field.type === "MULTI_PICKLIST") {
|
|
191
|
+
if (!Array.isArray(chosen)) {
|
|
192
|
+
throw new EdkValidationError(`Multi-picklist callback for "${field.name}" must return an array of options.`);
|
|
193
|
+
}
|
|
194
|
+
const resolved = chosen.map((item) => {
|
|
195
|
+
if (isRef(item))
|
|
196
|
+
return item;
|
|
197
|
+
if (isPicklistOptionValue(item) && matchesFieldOption(field, item))
|
|
198
|
+
return item.id;
|
|
199
|
+
throw new EdkValidationError(`Invalid multi-picklist item for field "${field.name}" — use options from the callback parameter.`);
|
|
200
|
+
});
|
|
201
|
+
return { fieldId: field.id, value: resolved };
|
|
202
|
+
}
|
|
203
|
+
if (!isPicklistOptionValue(chosen) || !matchesFieldOption(field, chosen)) {
|
|
204
|
+
throw new EdkValidationError(`Picklist callback for "${field.name}" must return one of its options, e.g. (options) => options.SomeOption.`);
|
|
205
|
+
}
|
|
206
|
+
return { fieldId: field.id, value: chosen.id };
|
|
207
|
+
}
|
|
208
|
+
return { fieldId: field.id, value };
|
|
209
|
+
});
|
|
210
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AspectCategoryRef — a typed handle to an existing aspect category on
|
|
3
|
+
* the Elementum platform. Distinct from {@link AppCategory} (in
|
|
4
|
+
* `app.ts`), which is the by-name shape that `defineApp({ category })`
|
|
5
|
+
* accepts because the compose endpoint upserts categories by name.
|
|
6
|
+
*
|
|
7
|
+
* Some antman endpoints (notably `POST /v1/elements`) accept a
|
|
8
|
+
* category by id only — there's no upsert there. Authors get the id
|
|
9
|
+
* via `elementum list categories` (a pass-through to `ei categories list`) and import a typed handle
|
|
10
|
+
* here, mirroring the `CloudLink` / `AiProviderConnector` pattern.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* // connectors/categories.ts
|
|
14
|
+
* export const importedData = defineCategory({
|
|
15
|
+
* id: "3b7a6ef4-...",
|
|
16
|
+
* name: "Imported Data",
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* // elements/tickets.ts
|
|
20
|
+
* import { importedData } from "../connectors/categories.js";
|
|
21
|
+
*
|
|
22
|
+
* defineElement({
|
|
23
|
+
* category: importedData,
|
|
24
|
+
* // ...
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export interface AspectCategoryRef {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly name?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function defineCategory(opts: {
|
|
33
|
+
id: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
}): AspectCategoryRef;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AspectCategoryRef — a typed handle to an existing aspect category on
|
|
3
|
+
* the Elementum platform. Distinct from {@link AppCategory} (in
|
|
4
|
+
* `app.ts`), which is the by-name shape that `defineApp({ category })`
|
|
5
|
+
* accepts because the compose endpoint upserts categories by name.
|
|
6
|
+
*
|
|
7
|
+
* Some antman endpoints (notably `POST /v1/elements`) accept a
|
|
8
|
+
* category by id only — there's no upsert there. Authors get the id
|
|
9
|
+
* via `elementum list categories` (a pass-through to `ei categories list`) and import a typed handle
|
|
10
|
+
* here, mirroring the `CloudLink` / `AiProviderConnector` pattern.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* // connectors/categories.ts
|
|
14
|
+
* export const importedData = defineCategory({
|
|
15
|
+
* id: "3b7a6ef4-...",
|
|
16
|
+
* name: "Imported Data",
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* // elements/tickets.ts
|
|
20
|
+
* import { importedData } from "../connectors/categories.js";
|
|
21
|
+
*
|
|
22
|
+
* defineElement({
|
|
23
|
+
* category: importedData,
|
|
24
|
+
* // ...
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function defineCategory(opts) {
|
|
29
|
+
return {
|
|
30
|
+
id: opts.id,
|
|
31
|
+
...(opts.name != null && { name: opts.name }),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CloudLink descriptor — a typed handle to a configured CloudLink on the
|
|
3
|
+
* Elementum platform. CloudLinks aren't authored by the EDK (they hold
|
|
4
|
+
* credentials and stay manually configured); this ref exists so EDK
|
|
5
|
+
* builders that need to point at one can do so type-safely instead of
|
|
6
|
+
* accepting a raw id string.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors the `AiProviderConnector` pattern in `./ai-provider.ts`.
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* // connectors/cloud-links.ts
|
|
12
|
+
* export const prodSnowflake = defineCloudLink({
|
|
13
|
+
* id: "ab100edd-b301-4a16-b269-e5347449ad9b",
|
|
14
|
+
* name: "Prod Snowflake",
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* // search-tables/linked-tickets.ts
|
|
18
|
+
* import { prodSnowflake } from "../connectors/cloud-links.js";
|
|
19
|
+
*
|
|
20
|
+
* defineSearchTable({
|
|
21
|
+
* kind: "linked",
|
|
22
|
+
* cloudLink: prodSnowflake,
|
|
23
|
+
* // ...
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export interface CloudLink {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly name?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function defineCloudLink(opts: {
|
|
32
|
+
id: string;
|
|
33
|
+
name?: string;
|
|
34
|
+
}): CloudLink;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CloudLink descriptor — a typed handle to a configured CloudLink on the
|
|
3
|
+
* Elementum platform. CloudLinks aren't authored by the EDK (they hold
|
|
4
|
+
* credentials and stay manually configured); this ref exists so EDK
|
|
5
|
+
* builders that need to point at one can do so type-safely instead of
|
|
6
|
+
* accepting a raw id string.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors the `AiProviderConnector` pattern in `./ai-provider.ts`.
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* // connectors/cloud-links.ts
|
|
12
|
+
* export const prodSnowflake = defineCloudLink({
|
|
13
|
+
* id: "ab100edd-b301-4a16-b269-e5347449ad9b",
|
|
14
|
+
* name: "Prod Snowflake",
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* // search-tables/linked-tickets.ts
|
|
18
|
+
* import { prodSnowflake } from "../connectors/cloud-links.js";
|
|
19
|
+
*
|
|
20
|
+
* defineSearchTable({
|
|
21
|
+
* kind: "linked",
|
|
22
|
+
* cloudLink: prodSnowflake,
|
|
23
|
+
* // ...
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function defineCloudLink(opts) {
|
|
28
|
+
return {
|
|
29
|
+
id: opts.id,
|
|
30
|
+
...(opts.name != null && { name: opts.name }),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display-block authoring types — the typed shapes an author places in
|
|
3
|
+
* `defineApp({ displayBlocks: {...} })` (record-view layout) and
|
|
4
|
+
* `defineApp({ recordCreateDisplayBlocks: {...} })` (new-record form).
|
|
5
|
+
*
|
|
6
|
+
* A display block controls how a record's fields and components are
|
|
7
|
+
* laid out in the UI. Each bag is keyed by an author-chosen handle;
|
|
8
|
+
* each entry is a discriminated variant keyed on `kind`. The platform
|
|
9
|
+
* stores all variant data inside one JSON `properties` column plus a
|
|
10
|
+
* few flat columns (`fieldId`, `stageId`, parent linkage); the
|
|
11
|
+
* serializer translates these typed shapes into that wire form, and
|
|
12
|
+
* the deserializer inverts it.
|
|
13
|
+
*
|
|
14
|
+
* Two structural rules mirror the platform:
|
|
15
|
+
* - **Children-on-parent.** A `group` block lists its child blocks
|
|
16
|
+
* by bag key in `blocks: ["title", "status"]`. Children stay at
|
|
17
|
+
* the top level of the bag (no `parent` slot); the serializer
|
|
18
|
+
* wires the parent linkage from the group's `blocks` list.
|
|
19
|
+
* - **Stage scoping is top-level only.** `stage` is honored on
|
|
20
|
+
* top-level bag entries; a group's children inherit the group's
|
|
21
|
+
* stage. Omit `stage` for the default (unstaged) layout.
|
|
22
|
+
*/
|
|
23
|
+
import type { AppField, AppStage } from "./app.js";
|
|
24
|
+
/** Where a block renders within the record layout. */
|
|
25
|
+
export type DisplayBlockLocation = "CENTER" | "RIGHT";
|
|
26
|
+
/**
|
|
27
|
+
* Comments channel. Today the platform exposes a single channel
|
|
28
|
+
* (`CONSUMER`); modeled as a union so new channels are additive.
|
|
29
|
+
*/
|
|
30
|
+
export type CommentsChannel = "CONSUMER";
|
|
31
|
+
/**
|
|
32
|
+
* Shared slots on every display-block variant. Per-variant interfaces
|
|
33
|
+
* extend this with their specific fields.
|
|
34
|
+
*/
|
|
35
|
+
interface DisplayBlockCommon {
|
|
36
|
+
/**
|
|
37
|
+
* Server-assigned block id. Stamped on pulled blocks so a re-deploy
|
|
38
|
+
* updates the existing block in place instead of creating a
|
|
39
|
+
* duplicate. Hand-authored blocks omit it — the platform assigns one.
|
|
40
|
+
*/
|
|
41
|
+
readonly id?: string;
|
|
42
|
+
/** Hide the block without removing it. */
|
|
43
|
+
readonly hidden?: boolean;
|
|
44
|
+
/** Which column the block renders in. */
|
|
45
|
+
readonly displayLocation?: DisplayBlockLocation;
|
|
46
|
+
/**
|
|
47
|
+
* Workflow stage this block is scoped to. Only honored on top-level
|
|
48
|
+
* bag entries — a group's children inherit the group's stage. Omit
|
|
49
|
+
* for the default (unstaged) layout.
|
|
50
|
+
*/
|
|
51
|
+
readonly stage?: AppStage;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A layout container. Groups hold other blocks (referenced by bag key
|
|
55
|
+
* in `blocks`) and are the only blocks that can surface as a side-nav
|
|
56
|
+
* entry.
|
|
57
|
+
*/
|
|
58
|
+
export interface GroupDisplayBlock extends DisplayBlockCommon {
|
|
59
|
+
readonly kind: "group";
|
|
60
|
+
readonly name: string;
|
|
61
|
+
readonly color?: string;
|
|
62
|
+
readonly icon?: string;
|
|
63
|
+
/** Max layout columns the group renders its children across. */
|
|
64
|
+
readonly maxColumns?: number;
|
|
65
|
+
/** Surface this group as a left-nav entry. */
|
|
66
|
+
readonly sideNavItem?: boolean;
|
|
67
|
+
/** Bag keys of the child blocks nested under this group, in order. */
|
|
68
|
+
readonly blocks?: readonly string[];
|
|
69
|
+
}
|
|
70
|
+
/** Renders a single aspect field. */
|
|
71
|
+
export interface FieldDisplayBlock extends DisplayBlockCommon {
|
|
72
|
+
readonly kind: "field";
|
|
73
|
+
/** Typed reference to the field this block renders. */
|
|
74
|
+
readonly field: AppField;
|
|
75
|
+
}
|
|
76
|
+
/** Renders a custom display widget. */
|
|
77
|
+
export interface WidgetDisplayBlock extends DisplayBlockCommon {
|
|
78
|
+
readonly kind: "widget";
|
|
79
|
+
/** Display-widget id. No typed widget ref in the EDK yet. */
|
|
80
|
+
readonly widget: string;
|
|
81
|
+
}
|
|
82
|
+
/** The comments section. */
|
|
83
|
+
export interface CommentsDisplayBlock extends DisplayBlockCommon {
|
|
84
|
+
readonly kind: "comments";
|
|
85
|
+
/** Channels the comments section exposes. */
|
|
86
|
+
readonly channels?: readonly CommentsChannel[];
|
|
87
|
+
/** Optional per-channel display name override. */
|
|
88
|
+
readonly channelNames?: Partial<Record<CommentsChannel, string>>;
|
|
89
|
+
}
|
|
90
|
+
/** The attachments section. */
|
|
91
|
+
export interface AttachmentDisplayBlock extends DisplayBlockCommon {
|
|
92
|
+
readonly kind: "attachment";
|
|
93
|
+
}
|
|
94
|
+
/** The activity-log section. */
|
|
95
|
+
export interface ActivityLogDisplayBlock extends DisplayBlockCommon {
|
|
96
|
+
readonly kind: "activityLog";
|
|
97
|
+
}
|
|
98
|
+
/** The status section. */
|
|
99
|
+
export interface StatusDisplayBlock extends DisplayBlockCommon {
|
|
100
|
+
readonly kind: "status";
|
|
101
|
+
}
|
|
102
|
+
/** The related-items section. */
|
|
103
|
+
export interface RelatedItemsDisplayBlock extends DisplayBlockCommon {
|
|
104
|
+
readonly kind: "relatedItems";
|
|
105
|
+
}
|
|
106
|
+
/** The related-tasks section. */
|
|
107
|
+
export interface RelatedTasksDisplayBlock extends DisplayBlockCommon {
|
|
108
|
+
readonly kind: "relatedTasks";
|
|
109
|
+
}
|
|
110
|
+
/** The approvals section. */
|
|
111
|
+
export interface ApprovalsDisplayBlock extends DisplayBlockCommon {
|
|
112
|
+
readonly kind: "approvals";
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The surveys section. `stageOwners` (per-stage survey ownership) is a
|
|
116
|
+
* richer structure not yet modeled — it round-trips opaquely through
|
|
117
|
+
* the serializer but isn't author-editable today.
|
|
118
|
+
*/
|
|
119
|
+
export interface SurveysDisplayBlock extends DisplayBlockCommon {
|
|
120
|
+
readonly kind: "surveys";
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The related-create section (deprecated on the platform; kept for
|
|
124
|
+
* round-trip completeness).
|
|
125
|
+
*/
|
|
126
|
+
export interface RelatedCreateDisplayBlock extends DisplayBlockCommon {
|
|
127
|
+
readonly kind: "relatedCreate";
|
|
128
|
+
readonly name: string;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* One display block in either bag. Discriminated on `kind`.
|
|
132
|
+
*/
|
|
133
|
+
export type DisplayBlock = GroupDisplayBlock | FieldDisplayBlock | WidgetDisplayBlock | CommentsDisplayBlock | AttachmentDisplayBlock | ActivityLogDisplayBlock | StatusDisplayBlock | RelatedItemsDisplayBlock | RelatedTasksDisplayBlock | ApprovalsDisplayBlock | SurveysDisplayBlock | RelatedCreateDisplayBlock;
|
|
134
|
+
/** A keyed bag of display blocks, mirroring the `fields` bag shape. */
|
|
135
|
+
export type DisplayBlockBag = Readonly<Record<string, DisplayBlock>>;
|
|
136
|
+
/**
|
|
137
|
+
* The `kind` discriminator → platform `DisplayBlockType` enum value.
|
|
138
|
+
* The serializer stamps the enum into each block's `properties.type`.
|
|
139
|
+
*/
|
|
140
|
+
export declare const DISPLAY_BLOCK_KIND_TO_TYPE: Readonly<Record<DisplayBlock["kind"], string>>;
|
|
141
|
+
/**
|
|
142
|
+
* Read-side GraphQL `__typename` → `kind`. The pull response
|
|
143
|
+
* discriminates blocks by their concrete GraphQL type name
|
|
144
|
+
* (`AspectCommentsDisplayBlock`, …), NOT by the `DisplayBlockType`
|
|
145
|
+
* enum the write side stamps into `properties.type` — so the
|
|
146
|
+
* deserializer keys off this map, not {@link DISPLAY_BLOCK_KIND_TO_TYPE}.
|
|
147
|
+
*/
|
|
148
|
+
export declare const DISPLAY_BLOCK_TYPENAME_TO_KIND: Readonly<Record<string, DisplayBlock["kind"]>>;
|
|
149
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display-block authoring types — the typed shapes an author places in
|
|
3
|
+
* `defineApp({ displayBlocks: {...} })` (record-view layout) and
|
|
4
|
+
* `defineApp({ recordCreateDisplayBlocks: {...} })` (new-record form).
|
|
5
|
+
*
|
|
6
|
+
* A display block controls how a record's fields and components are
|
|
7
|
+
* laid out in the UI. Each bag is keyed by an author-chosen handle;
|
|
8
|
+
* each entry is a discriminated variant keyed on `kind`. The platform
|
|
9
|
+
* stores all variant data inside one JSON `properties` column plus a
|
|
10
|
+
* few flat columns (`fieldId`, `stageId`, parent linkage); the
|
|
11
|
+
* serializer translates these typed shapes into that wire form, and
|
|
12
|
+
* the deserializer inverts it.
|
|
13
|
+
*
|
|
14
|
+
* Two structural rules mirror the platform:
|
|
15
|
+
* - **Children-on-parent.** A `group` block lists its child blocks
|
|
16
|
+
* by bag key in `blocks: ["title", "status"]`. Children stay at
|
|
17
|
+
* the top level of the bag (no `parent` slot); the serializer
|
|
18
|
+
* wires the parent linkage from the group's `blocks` list.
|
|
19
|
+
* - **Stage scoping is top-level only.** `stage` is honored on
|
|
20
|
+
* top-level bag entries; a group's children inherit the group's
|
|
21
|
+
* stage. Omit `stage` for the default (unstaged) layout.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* The `kind` discriminator → platform `DisplayBlockType` enum value.
|
|
25
|
+
* The serializer stamps the enum into each block's `properties.type`.
|
|
26
|
+
*/
|
|
27
|
+
export const DISPLAY_BLOCK_KIND_TO_TYPE = {
|
|
28
|
+
group: "GROUP",
|
|
29
|
+
field: "FIELD",
|
|
30
|
+
widget: "WIDGET",
|
|
31
|
+
comments: "COMMENTS",
|
|
32
|
+
attachment: "ATTACHMENTS",
|
|
33
|
+
activityLog: "ACTIVITY_LOG",
|
|
34
|
+
status: "STATUS",
|
|
35
|
+
relatedItems: "RELATED_ITEMS",
|
|
36
|
+
relatedTasks: "RELATED_TASKS",
|
|
37
|
+
approvals: "APPROVALS",
|
|
38
|
+
surveys: "SURVEYS",
|
|
39
|
+
relatedCreate: "RELATED_CREATE",
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Read-side GraphQL `__typename` → `kind`. The pull response
|
|
43
|
+
* discriminates blocks by their concrete GraphQL type name
|
|
44
|
+
* (`AspectCommentsDisplayBlock`, …), NOT by the `DisplayBlockType`
|
|
45
|
+
* enum the write side stamps into `properties.type` — so the
|
|
46
|
+
* deserializer keys off this map, not {@link DISPLAY_BLOCK_KIND_TO_TYPE}.
|
|
47
|
+
*/
|
|
48
|
+
export const DISPLAY_BLOCK_TYPENAME_TO_KIND = {
|
|
49
|
+
AspectGroupDisplayBlock: "group",
|
|
50
|
+
AspectFieldDisplayBlock: "field",
|
|
51
|
+
AspectWidgetDisplayBlock: "widget",
|
|
52
|
+
AspectCommentsDisplayBlock: "comments",
|
|
53
|
+
AspectAttachmentDisplayBlock: "attachment",
|
|
54
|
+
AspectActivityLogDisplayBlock: "activityLog",
|
|
55
|
+
AspectStatusDisplayBlock: "status",
|
|
56
|
+
AspectRelatedItemsDisplayBlock: "relatedItems",
|
|
57
|
+
AspectRelatedTasksDisplayBlock: "relatedTasks",
|
|
58
|
+
AspectApprovalsDisplayBlock: "approvals",
|
|
59
|
+
AspectSurveysDisplayBlock: "surveys",
|
|
60
|
+
AspectRelatedCreateDisplayBlock: "relatedCreate",
|
|
61
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A typed handle to an org group. Reference-only, same contract as
|
|
3
|
+
* {@link UserRef} — exists so builders point at a group type-safely
|
|
4
|
+
* instead of accepting a raw id string.
|
|
5
|
+
*/
|
|
6
|
+
export interface GroupRef {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly name?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function defineGroup(opts: {
|
|
11
|
+
id: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
}): GroupRef;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A typed handle to an org user. Reference-only: the EDK never creates,
|
|
3
|
+
* invites, or updates users — this ref exists so builders that point at
|
|
4
|
+
* a user do so type-safely instead of accepting a raw id string.
|
|
5
|
+
*
|
|
6
|
+
* `email` is required because the user catalog namespaces handles by it
|
|
7
|
+
* (`users.aliceAtAcmeDotCom`); `id` is what the serializer sends.
|
|
8
|
+
*/
|
|
9
|
+
export interface UserRef {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly email: string;
|
|
12
|
+
readonly firstName?: string;
|
|
13
|
+
readonly lastName?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function defineUser(opts: {
|
|
16
|
+
id: string;
|
|
17
|
+
email: string;
|
|
18
|
+
firstName?: string;
|
|
19
|
+
lastName?: string;
|
|
20
|
+
}): UserRef;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ref serializer — converts RefData to the Elementum API's
|
|
3
|
+
* ValueReferenceInput JSON format.
|
|
4
|
+
*/
|
|
5
|
+
import { type RefData, type ValueOrRef } from "../../entities/shared/ref.js";
|
|
6
|
+
export interface TemplateParameterJSON {
|
|
7
|
+
value?: {
|
|
8
|
+
name: string;
|
|
9
|
+
value: ValueReferenceJSON;
|
|
10
|
+
};
|
|
11
|
+
list?: {
|
|
12
|
+
template: string;
|
|
13
|
+
name: string;
|
|
14
|
+
value: ValueReferenceJSON;
|
|
15
|
+
parameters: TemplateParameterJSON[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface ValueReferenceJSON {
|
|
19
|
+
value?: unknown;
|
|
20
|
+
triggerReference?: {
|
|
21
|
+
name: string;
|
|
22
|
+
};
|
|
23
|
+
taskReference?: {
|
|
24
|
+
taskRefKey: string;
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
forEachReference?: {
|
|
28
|
+
forEachTaskRefKey: string;
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
templateReference?: {
|
|
32
|
+
template: string;
|
|
33
|
+
parameters: TemplateParameterJSON[];
|
|
34
|
+
};
|
|
35
|
+
/** Reference to a named secret in the Elementum secret vault. */
|
|
36
|
+
secretReference?: {
|
|
37
|
+
secretId: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export declare function serializeRefData(data: RefData): ValueReferenceJSON;
|
|
41
|
+
/**
|
|
42
|
+
* Serialize a ValueOrRef to a ValueReferenceInput JSON.
|
|
43
|
+
* Literal values become { value: ... }.
|
|
44
|
+
*/
|
|
45
|
+
export declare function serializeValueOrRef(v: ValueOrRef<unknown>): ValueReferenceJSON;
|