@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,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filter types — mirrors the Java Filter hierarchy in
|
|
3
|
+
* jarvis/util/.../filter/*.java
|
|
4
|
+
*
|
|
5
|
+
* Discriminated on `type` with values matching Java FilterType names.
|
|
6
|
+
*/
|
|
7
|
+
export type ValueType = "BOOLEAN" | "CURRENT_USER" | "DATE" | "DATETIME" | "FIELD" | "NULL" | "NUMBER" | "RECORD_FIELD" | "REFERENCE" | "TEXT" | "UUID";
|
|
8
|
+
export type FilterReference = {
|
|
9
|
+
type: "TRIGGER";
|
|
10
|
+
name: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: "TASK";
|
|
13
|
+
taskId: string;
|
|
14
|
+
name: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: "TASK";
|
|
17
|
+
taskRefKey: string;
|
|
18
|
+
name: string;
|
|
19
|
+
} | {
|
|
20
|
+
type: "FOR_EACH";
|
|
21
|
+
forEachTaskId: string;
|
|
22
|
+
name: string;
|
|
23
|
+
} | {
|
|
24
|
+
type: "FOR_EACH";
|
|
25
|
+
forEachTaskRefKey: string;
|
|
26
|
+
name: string;
|
|
27
|
+
} | {
|
|
28
|
+
type: "VALUE";
|
|
29
|
+
value: unknown;
|
|
30
|
+
} | {
|
|
31
|
+
type: "VARIABLE";
|
|
32
|
+
variableId: string;
|
|
33
|
+
name: string;
|
|
34
|
+
};
|
|
35
|
+
export type FilterValue = {
|
|
36
|
+
type: "TEXT";
|
|
37
|
+
value: string;
|
|
38
|
+
} | {
|
|
39
|
+
type: "NUMBER";
|
|
40
|
+
value: number;
|
|
41
|
+
} | {
|
|
42
|
+
type: "BOOLEAN";
|
|
43
|
+
value: boolean;
|
|
44
|
+
} | {
|
|
45
|
+
type: "UUID";
|
|
46
|
+
value: string;
|
|
47
|
+
} | {
|
|
48
|
+
type: "DATE";
|
|
49
|
+
value: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: "DATETIME";
|
|
52
|
+
value: string;
|
|
53
|
+
} | {
|
|
54
|
+
type: "FIELD";
|
|
55
|
+
value: string;
|
|
56
|
+
treatNullAsEquals?: boolean;
|
|
57
|
+
} | {
|
|
58
|
+
type: "NULL";
|
|
59
|
+
} | {
|
|
60
|
+
type: "CURRENT_USER";
|
|
61
|
+
} | {
|
|
62
|
+
type: "REFERENCE";
|
|
63
|
+
realType: ValueType;
|
|
64
|
+
value: FilterReference;
|
|
65
|
+
};
|
|
66
|
+
export type LikeMode = "STARTS_WITH" | "ENDS_WITH" | "CONTAINS" | "LEGACY";
|
|
67
|
+
export interface EqualsFilter {
|
|
68
|
+
type: "EQUALS";
|
|
69
|
+
field?: string;
|
|
70
|
+
leftValue?: FilterValue;
|
|
71
|
+
value: FilterValue;
|
|
72
|
+
not?: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface GreaterThanFilter {
|
|
75
|
+
type: "GREATER_THAN";
|
|
76
|
+
field?: string;
|
|
77
|
+
leftValue?: FilterValue;
|
|
78
|
+
value: FilterValue;
|
|
79
|
+
}
|
|
80
|
+
export interface GreaterThanEqualsFilter {
|
|
81
|
+
type: "GREATER_THAN_EQUALS";
|
|
82
|
+
field?: string;
|
|
83
|
+
leftValue?: FilterValue;
|
|
84
|
+
value: FilterValue;
|
|
85
|
+
}
|
|
86
|
+
export interface LessThanFilter {
|
|
87
|
+
type: "LESS_THAN";
|
|
88
|
+
field?: string;
|
|
89
|
+
leftValue?: FilterValue;
|
|
90
|
+
value: FilterValue;
|
|
91
|
+
}
|
|
92
|
+
export interface LessThanEqualsFilter {
|
|
93
|
+
type: "LESS_THAN_EQUALS";
|
|
94
|
+
field?: string;
|
|
95
|
+
leftValue?: FilterValue;
|
|
96
|
+
value: FilterValue;
|
|
97
|
+
}
|
|
98
|
+
export interface LikeFilter {
|
|
99
|
+
type: "LIKE";
|
|
100
|
+
field?: string;
|
|
101
|
+
leftValue?: FilterValue;
|
|
102
|
+
value: FilterValue;
|
|
103
|
+
not?: boolean;
|
|
104
|
+
caseInsensitive?: boolean;
|
|
105
|
+
mode?: LikeMode;
|
|
106
|
+
}
|
|
107
|
+
export interface InFilter {
|
|
108
|
+
type: "IN";
|
|
109
|
+
field?: string;
|
|
110
|
+
leftValue?: FilterValue;
|
|
111
|
+
values: FilterValue[];
|
|
112
|
+
not?: boolean;
|
|
113
|
+
}
|
|
114
|
+
export interface BetweenFilter {
|
|
115
|
+
type: "BETWEEN";
|
|
116
|
+
field?: string;
|
|
117
|
+
leftValue?: FilterValue;
|
|
118
|
+
values: [FilterValue, FilterValue];
|
|
119
|
+
not?: boolean;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Field falls within a relative calendar range: `count` `unit`s, shifted
|
|
123
|
+
* `offset` `unit`s back from now. `semantic` selects whether the range
|
|
124
|
+
* snaps to calendar-unit boundaries (`true`) or is a rolling window
|
|
125
|
+
* measured from the current moment (`false`). `unit` is a
|
|
126
|
+
* platform-defined calendar unit string (observed: `"QUARTER"`) — not a
|
|
127
|
+
* closed set here since the full enum isn't confirmed.
|
|
128
|
+
*/
|
|
129
|
+
export interface ConsecutiveRangeFilter {
|
|
130
|
+
type: "CONSECUTIVE_RANGE";
|
|
131
|
+
field?: string;
|
|
132
|
+
leftValue?: FilterValue;
|
|
133
|
+
unit: string;
|
|
134
|
+
count: number;
|
|
135
|
+
offset: number;
|
|
136
|
+
semantic: boolean;
|
|
137
|
+
}
|
|
138
|
+
export interface ContainsFilter {
|
|
139
|
+
type: "CONTAINS";
|
|
140
|
+
field?: string;
|
|
141
|
+
leftValue?: FilterValue;
|
|
142
|
+
values: FilterValue[];
|
|
143
|
+
}
|
|
144
|
+
export interface OverlapsFilter {
|
|
145
|
+
type: "OVERLAPS";
|
|
146
|
+
field?: string;
|
|
147
|
+
leftValue?: FilterValue;
|
|
148
|
+
values: FilterValue[];
|
|
149
|
+
}
|
|
150
|
+
export interface IsNullFilter {
|
|
151
|
+
type: "IS_NULL";
|
|
152
|
+
field?: string;
|
|
153
|
+
leftValue?: FilterValue;
|
|
154
|
+
not?: boolean;
|
|
155
|
+
}
|
|
156
|
+
export interface AndFilter {
|
|
157
|
+
type: "AND";
|
|
158
|
+
children: FilterExpr[];
|
|
159
|
+
}
|
|
160
|
+
export interface OrFilter {
|
|
161
|
+
type: "OR";
|
|
162
|
+
children: FilterExpr[];
|
|
163
|
+
}
|
|
164
|
+
export interface TrueFilter {
|
|
165
|
+
type: "TRUE";
|
|
166
|
+
}
|
|
167
|
+
export interface FalseFilter {
|
|
168
|
+
type: "FALSE";
|
|
169
|
+
}
|
|
170
|
+
export type FilterExpr = EqualsFilter | GreaterThanFilter | GreaterThanEqualsFilter | LessThanFilter | LessThanEqualsFilter | LikeFilter | InFilter | BetweenFilter | ConsecutiveRangeFilter | ContainsFilter | OverlapsFilter | IsNullFilter | AndFilter | OrFilter | TrueFilter | FalseFilter;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value Reference system — the foundation of the SDK's type-safe data flow.
|
|
3
|
+
*
|
|
4
|
+
* A Ref<T> is a *description* of a runtime value, not the value itself.
|
|
5
|
+
* It carries enough metadata to serialize into the Elementum API's
|
|
6
|
+
* ValueReferenceInput format (trigger refs, task refs, forEach refs,
|
|
7
|
+
* static values, and template strings).
|
|
8
|
+
*
|
|
9
|
+
* TypeScript sees the phantom T so autocomplete and type checking work;
|
|
10
|
+
* the runtime Proxy layer (see context.ts) constructs these automatically
|
|
11
|
+
* when agent code accesses ctx.trigger.* or ctx.tasks.*.
|
|
12
|
+
*/
|
|
13
|
+
export interface TriggerRefData {
|
|
14
|
+
kind: "trigger";
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
17
|
+
export interface TaskRefData {
|
|
18
|
+
kind: "task";
|
|
19
|
+
taskRefKey: string;
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ForEachRefData {
|
|
23
|
+
kind: "forEach";
|
|
24
|
+
forEachTaskName: string;
|
|
25
|
+
name: string;
|
|
26
|
+
}
|
|
27
|
+
export interface StaticRefData {
|
|
28
|
+
kind: "static";
|
|
29
|
+
value: unknown;
|
|
30
|
+
}
|
|
31
|
+
export interface TemplateRefData {
|
|
32
|
+
kind: "template";
|
|
33
|
+
parts: (string | RefData)[];
|
|
34
|
+
}
|
|
35
|
+
export interface VariableParamRefData {
|
|
36
|
+
kind: "variableParam";
|
|
37
|
+
variableTaskRefKey: string;
|
|
38
|
+
name: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A reference to a named secret stored in the Elementum secret vault.
|
|
42
|
+
* Resolved at runtime by the executor; never serialized as plaintext.
|
|
43
|
+
*/
|
|
44
|
+
export interface SecretRefData {
|
|
45
|
+
kind: "secret";
|
|
46
|
+
secretId: string;
|
|
47
|
+
}
|
|
48
|
+
export type RefData = TriggerRefData | TaskRefData | ForEachRefData | StaticRefData | TemplateRefData | VariableParamRefData | SecretRefData;
|
|
49
|
+
declare const REF_BRAND: unique symbol;
|
|
50
|
+
export interface Ref<T> {
|
|
51
|
+
readonly [REF_BRAND]: true;
|
|
52
|
+
/** Phantom type — never read at runtime, only used by TypeScript. */
|
|
53
|
+
readonly __type: T;
|
|
54
|
+
/** The serializable descriptor for this reference. */
|
|
55
|
+
readonly __data: RefData;
|
|
56
|
+
}
|
|
57
|
+
export declare function createRef<T>(data: RefData): Ref<T>;
|
|
58
|
+
export declare function isRef(value: unknown): value is Ref<unknown>;
|
|
59
|
+
export type ToRefs<T> = {
|
|
60
|
+
[K in keyof T]: Ref<T[K]>;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Simplify<T> flattens intersection types into a single object for clean
|
|
64
|
+
* IDE hover tooltips (e.g. A & B & C → { ...all keys... }).
|
|
65
|
+
*/
|
|
66
|
+
export type Simplify<T> = {
|
|
67
|
+
[K in keyof T]: T[K];
|
|
68
|
+
} & {};
|
|
69
|
+
/** Create a static-value reference. */
|
|
70
|
+
export declare function val<T>(value: T): Ref<T>;
|
|
71
|
+
/**
|
|
72
|
+
* Branded error type surfaced in IDE hovers when a `template()` arg list
|
|
73
|
+
* has a literal string fragment ending in `$` immediately followed by a
|
|
74
|
+
* `Ref<...>` arg. The Mobius UI's Lexical editor interprets
|
|
75
|
+
* `${{{pN}}}` as an escape and renders the reference placeholder as
|
|
76
|
+
* literal text; see plans/edk-shortcomings.md #27.
|
|
77
|
+
*
|
|
78
|
+
* Fix at the call site by removing the literal `$` — the downstream
|
|
79
|
+
* string usually already contains the currency code ("USD") or the
|
|
80
|
+
* meaning of the prefix.
|
|
81
|
+
*/
|
|
82
|
+
export type _TemplateDollarBeforeRefError = "__edk_error_template_cannot_have_$_immediately_before_a_ref__" & never;
|
|
83
|
+
type IsRefPart<T> = T extends Ref<unknown> ? true : false;
|
|
84
|
+
/**
|
|
85
|
+
* Walk the variadic argument list. Whenever a literal string arg ends in
|
|
86
|
+
* `$` and the next arg is a `Ref<...>`, replace the Ref slot with the
|
|
87
|
+
* branded error type so `tsc` rejects the call at the offending
|
|
88
|
+
* position.
|
|
89
|
+
*/
|
|
90
|
+
export type ValidateTemplateArgs<Args extends readonly unknown[]> = Args extends readonly [
|
|
91
|
+
infer Head,
|
|
92
|
+
infer Next,
|
|
93
|
+
...infer Rest
|
|
94
|
+
] ? Head extends `${string}$` ? IsRefPart<Next> extends true ? readonly [Head, _TemplateDollarBeforeRefError, ...ValidateTemplateArgs<Rest>] : readonly [Head, Next, ...ValidateTemplateArgs<readonly [Next, ...Rest] extends readonly [infer _, ...infer R] ? R : []>] : readonly [Head, ...ValidateTemplateArgs<readonly [Next, ...Rest]>] : Args;
|
|
95
|
+
/**
|
|
96
|
+
* Create a template-string reference from interleaved strings and refs.
|
|
97
|
+
*
|
|
98
|
+
* Rejects any literal string fragment that ends in `$` when immediately
|
|
99
|
+
* followed by a `Ref<...>` — the UI can't render that pattern (see
|
|
100
|
+
* plans/edk-shortcomings.md #27). Dynamic/computed string fragments that
|
|
101
|
+
* the type system can't inspect are caught at serialize time by an
|
|
102
|
+
* escape-character insertion pass.
|
|
103
|
+
*/
|
|
104
|
+
export declare function template<const Args extends readonly (string | Ref<unknown>)[]>(...parts: Args & ValidateTemplateArgs<Args>): Ref<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Reference a named secret by id. The resolver at execution time fetches
|
|
107
|
+
* the plaintext from the Elementum secret vault. EDK never sees the
|
|
108
|
+
* plaintext.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* apiRequest({
|
|
113
|
+
* url: "https://api.example.com",
|
|
114
|
+
* method: "GET",
|
|
115
|
+
* authorization: { type: "bearer", token: secret("payments-provider-token") },
|
|
116
|
+
* })
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
export declare function secret(secretId: string): Ref<string>;
|
|
120
|
+
/**
|
|
121
|
+
* Marker prefix embedded in a trigger ref's `record.<field>` name when the
|
|
122
|
+
* field couldn't be resolved. `unresolvedField` writes it;
|
|
123
|
+
* `src/deploy/plan/resolve-record-refs.ts` strips it back off and passes the
|
|
124
|
+
* raw id straight through to the wire, unchecked against the field catalog —
|
|
125
|
+
* keep both sides in sync.
|
|
126
|
+
*/
|
|
127
|
+
export declare const UNRESOLVED_FIELD_MARKER = "__edkUnresolvedField::";
|
|
128
|
+
/**
|
|
129
|
+
* Escape hatch for a `ctx.trigger.record.<field>` reference the pull-time
|
|
130
|
+
* deserializer couldn't resolve to any field in the owning app's catalog —
|
|
131
|
+
* the wire field id/clientHandle isn't present there (deleted, orphaned, or
|
|
132
|
+
* otherwise never captured). `RecordShape<A>` is closed over the app's known
|
|
133
|
+
* fields, so a raw/unknown id has no normal spelling through
|
|
134
|
+
* `ctx.trigger.record`; this bypasses that typed proxy entirely.
|
|
135
|
+
*
|
|
136
|
+
* `rawFieldId` round-trips straight through to the platform unchanged on
|
|
137
|
+
* deploy — EDK never validates it against the field catalog, so it also never
|
|
138
|
+
* blocks the plan.
|
|
139
|
+
*/
|
|
140
|
+
export declare function unresolvedField(rawFieldId: string): Ref<unknown>;
|
|
141
|
+
/** Accepts a value that is either a literal T or a Ref<T>. */
|
|
142
|
+
export type ValueOrRef<T> = T | Ref<T>;
|
|
143
|
+
/**
|
|
144
|
+
* Unwrap ValueOrRef to its underlying RefData.
|
|
145
|
+
* Literal values become static refs.
|
|
146
|
+
*/
|
|
147
|
+
export declare function toRefData(v: ValueOrRef<unknown>): RefData;
|
|
148
|
+
/**
|
|
149
|
+
* Normalize a string-typed task field so the Mobius UI's templating layer
|
|
150
|
+
* can render it. The platform expects these fields as a `templateReference`;
|
|
151
|
+
* a bare trigger/task/forEach ref serializes to a single-kind ref and the
|
|
152
|
+
* UI either renders empty (postComment.contents) or throws
|
|
153
|
+
* `e.matchAll is not a function` (sendEmail.messageBody) when it tries to
|
|
154
|
+
* expand placeholders.
|
|
155
|
+
*
|
|
156
|
+
* Plain strings and explicit `template(...)` values pass through unchanged.
|
|
157
|
+
* Any other ref kind is wrapped in a one-parameter template.
|
|
158
|
+
*/
|
|
159
|
+
export declare function ensureTemplate(value: ValueOrRef<string> | Ref<unknown>): ValueOrRef<string> | Ref<unknown>;
|
|
160
|
+
export {};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value Reference system — the foundation of the SDK's type-safe data flow.
|
|
3
|
+
*
|
|
4
|
+
* A Ref<T> is a *description* of a runtime value, not the value itself.
|
|
5
|
+
* It carries enough metadata to serialize into the Elementum API's
|
|
6
|
+
* ValueReferenceInput format (trigger refs, task refs, forEach refs,
|
|
7
|
+
* static values, and template strings).
|
|
8
|
+
*
|
|
9
|
+
* TypeScript sees the phantom T so autocomplete and type checking work;
|
|
10
|
+
* the runtime Proxy layer (see context.ts) constructs these automatically
|
|
11
|
+
* when agent code accesses ctx.trigger.* or ctx.tasks.*.
|
|
12
|
+
*/
|
|
13
|
+
import { EdkValidationError } from "../../../elementum-entity-client/errors.js";
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
// Branded Ref<T> type
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
const REF_BRAND = Symbol("Ref");
|
|
18
|
+
export function createRef(data) {
|
|
19
|
+
return { [REF_BRAND]: true, __type: undefined, __data: data };
|
|
20
|
+
}
|
|
21
|
+
export function isRef(value) {
|
|
22
|
+
return (typeof value === "object" &&
|
|
23
|
+
value !== null &&
|
|
24
|
+
REF_BRAND in value &&
|
|
25
|
+
value[REF_BRAND] === true);
|
|
26
|
+
}
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
// Convenience helpers for explicit ref construction
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
/** Create a static-value reference. */
|
|
31
|
+
export function val(value) {
|
|
32
|
+
return createRef({ kind: "static", value });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Create a template-string reference from interleaved strings and refs.
|
|
36
|
+
*
|
|
37
|
+
* Rejects any literal string fragment that ends in `$` when immediately
|
|
38
|
+
* followed by a `Ref<...>` — the UI can't render that pattern (see
|
|
39
|
+
* plans/edk-shortcomings.md #27). Dynamic/computed string fragments that
|
|
40
|
+
* the type system can't inspect are caught at serialize time by an
|
|
41
|
+
* escape-character insertion pass.
|
|
42
|
+
*/
|
|
43
|
+
export function template(...parts) {
|
|
44
|
+
const data = parts.map((p) => isRef(p) ? p.__data : String(p));
|
|
45
|
+
return createRef({ kind: "template", parts: data });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Reference a named secret by id. The resolver at execution time fetches
|
|
49
|
+
* the plaintext from the Elementum secret vault. EDK never sees the
|
|
50
|
+
* plaintext.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* apiRequest({
|
|
55
|
+
* url: "https://api.example.com",
|
|
56
|
+
* method: "GET",
|
|
57
|
+
* authorization: { type: "bearer", token: secret("payments-provider-token") },
|
|
58
|
+
* })
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export function secret(secretId) {
|
|
62
|
+
if (!secretId || typeof secretId !== "string") {
|
|
63
|
+
throw new EdkValidationError("secret() requires a non-empty string secretId.");
|
|
64
|
+
}
|
|
65
|
+
return createRef({ kind: "secret", secretId });
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Marker prefix embedded in a trigger ref's `record.<field>` name when the
|
|
69
|
+
* field couldn't be resolved. `unresolvedField` writes it;
|
|
70
|
+
* `src/deploy/plan/resolve-record-refs.ts` strips it back off and passes the
|
|
71
|
+
* raw id straight through to the wire, unchecked against the field catalog —
|
|
72
|
+
* keep both sides in sync.
|
|
73
|
+
*/
|
|
74
|
+
export const UNRESOLVED_FIELD_MARKER = "__edkUnresolvedField::";
|
|
75
|
+
/**
|
|
76
|
+
* Escape hatch for a `ctx.trigger.record.<field>` reference the pull-time
|
|
77
|
+
* deserializer couldn't resolve to any field in the owning app's catalog —
|
|
78
|
+
* the wire field id/clientHandle isn't present there (deleted, orphaned, or
|
|
79
|
+
* otherwise never captured). `RecordShape<A>` is closed over the app's known
|
|
80
|
+
* fields, so a raw/unknown id has no normal spelling through
|
|
81
|
+
* `ctx.trigger.record`; this bypasses that typed proxy entirely.
|
|
82
|
+
*
|
|
83
|
+
* `rawFieldId` round-trips straight through to the platform unchanged on
|
|
84
|
+
* deploy — EDK never validates it against the field catalog, so it also never
|
|
85
|
+
* blocks the plan.
|
|
86
|
+
*/
|
|
87
|
+
export function unresolvedField(rawFieldId) {
|
|
88
|
+
if (!rawFieldId || typeof rawFieldId !== "string") {
|
|
89
|
+
throw new EdkValidationError("unresolvedField() requires a non-empty string rawFieldId.");
|
|
90
|
+
}
|
|
91
|
+
return createRef({ kind: "trigger", name: `record.${UNRESOLVED_FIELD_MARKER}${rawFieldId}` });
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Unwrap ValueOrRef to its underlying RefData.
|
|
95
|
+
* Literal values become static refs.
|
|
96
|
+
*/
|
|
97
|
+
export function toRefData(v) {
|
|
98
|
+
if (isRef(v))
|
|
99
|
+
return v.__data;
|
|
100
|
+
return { kind: "static", value: v };
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Normalize a string-typed task field so the Mobius UI's templating layer
|
|
104
|
+
* can render it. The platform expects these fields as a `templateReference`;
|
|
105
|
+
* a bare trigger/task/forEach ref serializes to a single-kind ref and the
|
|
106
|
+
* UI either renders empty (postComment.contents) or throws
|
|
107
|
+
* `e.matchAll is not a function` (sendEmail.messageBody) when it tries to
|
|
108
|
+
* expand placeholders.
|
|
109
|
+
*
|
|
110
|
+
* Plain strings and explicit `template(...)` values pass through unchanged.
|
|
111
|
+
* Any other ref kind is wrapped in a one-parameter template.
|
|
112
|
+
*/
|
|
113
|
+
export function ensureTemplate(value) {
|
|
114
|
+
if (!isRef(value))
|
|
115
|
+
return value;
|
|
116
|
+
if (value.__data.kind === "template")
|
|
117
|
+
return value;
|
|
118
|
+
return template(value);
|
|
119
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types used across automations, agents, and other EDK domains.
|
|
3
|
+
*/
|
|
4
|
+
import type { Ref, ValueOrRef } from "../ref.js";
|
|
5
|
+
import type { Attachment } from "./platform.js";
|
|
6
|
+
import type { AppField } from "../../../core/types/app.js";
|
|
7
|
+
export type HttpMethod = "GET" | "POST" | "PUT" | "DELETE";
|
|
8
|
+
export interface BasicAuth {
|
|
9
|
+
type: "basic";
|
|
10
|
+
username: ValueOrRef<string>;
|
|
11
|
+
password: ValueOrRef<string>;
|
|
12
|
+
}
|
|
13
|
+
export interface BearerAuth {
|
|
14
|
+
type: "bearer";
|
|
15
|
+
/**
|
|
16
|
+
* Bearer token. Accepts a raw string (literal or environment-rewritten
|
|
17
|
+
* placeholder), a task/trigger ref (e.g. `ctx.tasks.login.token`), or
|
|
18
|
+
* a `secret(...)` ref that serializes to Mobius's secret-reference
|
|
19
|
+
* shape. Every real integration uses a secret; the raw-string form
|
|
20
|
+
* exists only for the literal / placeholder case.
|
|
21
|
+
*/
|
|
22
|
+
token: ValueOrRef<string>;
|
|
23
|
+
}
|
|
24
|
+
export interface OAuthAuth {
|
|
25
|
+
type: "oauth";
|
|
26
|
+
url: ValueOrRef<string>;
|
|
27
|
+
clientId: ValueOrRef<string>;
|
|
28
|
+
clientSecret: ValueOrRef<string>;
|
|
29
|
+
}
|
|
30
|
+
export type ApiAuthorization = BasicAuth | BearerAuth | OAuthAuth;
|
|
31
|
+
export interface JsonBody {
|
|
32
|
+
type: "json";
|
|
33
|
+
json: unknown;
|
|
34
|
+
}
|
|
35
|
+
export interface FormBody {
|
|
36
|
+
type: "form";
|
|
37
|
+
values: Array<{
|
|
38
|
+
key: string;
|
|
39
|
+
value: string;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
export interface CustomBody {
|
|
43
|
+
type: "custom";
|
|
44
|
+
body: string;
|
|
45
|
+
contentType: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* One entry in a multipart body. Either a text part (any value, optionally
|
|
49
|
+
* referenced from upstream data) or a file part backed by exactly one of
|
|
50
|
+
* `attachmentId`, `attachment`, or `file`. File-source slots accept a
|
|
51
|
+
* `Ref<…>` only — the platform rejects literal values in those slots, so
|
|
52
|
+
* the type forbids them at compile time.
|
|
53
|
+
*/
|
|
54
|
+
export interface MultipartTextPart {
|
|
55
|
+
name: string;
|
|
56
|
+
value: ValueOrRef<string>;
|
|
57
|
+
}
|
|
58
|
+
export type MultipartFilePart = {
|
|
59
|
+
name: string;
|
|
60
|
+
attachmentId: Ref<string>;
|
|
61
|
+
attachment?: never;
|
|
62
|
+
file?: never;
|
|
63
|
+
} | {
|
|
64
|
+
name: string;
|
|
65
|
+
attachment: Ref<Attachment>;
|
|
66
|
+
attachmentId?: never;
|
|
67
|
+
file?: never;
|
|
68
|
+
} | {
|
|
69
|
+
name: string;
|
|
70
|
+
file: Ref<unknown>;
|
|
71
|
+
attachmentId?: never;
|
|
72
|
+
attachment?: never;
|
|
73
|
+
};
|
|
74
|
+
export type MultipartPart = MultipartTextPart | MultipartFilePart;
|
|
75
|
+
export interface MultipartBody {
|
|
76
|
+
type: "multipart";
|
|
77
|
+
parts: ReadonlyArray<MultipartPart>;
|
|
78
|
+
}
|
|
79
|
+
export type ApiBody = JsonBody | FormBody | CustomBody | MultipartBody;
|
|
80
|
+
export type SortDirection = "ASC" | "DESC";
|
|
81
|
+
/** One sort clause (field id + direction). Use {@link asc}, {@link desc}, or {@link sortBy}. */
|
|
82
|
+
export interface SortOrder {
|
|
83
|
+
field: AppField;
|
|
84
|
+
direction: SortDirection;
|
|
85
|
+
}
|
|
86
|
+
export declare function asc(field: AppField): SortOrder;
|
|
87
|
+
export declare function desc(field: AppField): SortOrder;
|
|
88
|
+
/** Multi-field sort (order is significant). Serializes to `Sort.orders` for Mobius. */
|
|
89
|
+
export declare function sortBy(...orders: SortOrder[]): readonly SortOrder[];
|
|
90
|
+
/**
|
|
91
|
+
* Serialize an authored `SortOrder | readonly SortOrder[]` to the
|
|
92
|
+
* platform's `Sort` JSON shape: `{ orders: [{ field: <id>, direction }] }`.
|
|
93
|
+
* Returns `undefined` when `sort` is null/undefined or doesn't match
|
|
94
|
+
* the expected shape — callers can then omit the wire field entirely.
|
|
95
|
+
*
|
|
96
|
+
* Lifted from `automations/serializer/task-serializer.ts` so every
|
|
97
|
+
* tool surface that accepts a sort (automation `recordSearch`, agent
|
|
98
|
+
* search tools, etc.) emits the same wire shape through the same
|
|
99
|
+
* code path.
|
|
100
|
+
*/
|
|
101
|
+
export declare function serializeSortToWire(sort: unknown): Record<string, unknown> | undefined;
|
|
102
|
+
export type AiAgentOutputType = "text" | "json";
|
|
103
|
+
export interface AiJsonFieldDef {
|
|
104
|
+
type: "text" | "number" | "boolean" | "date";
|
|
105
|
+
description?: string;
|
|
106
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types used across automations, agents, and other EDK domains.
|
|
3
|
+
*/
|
|
4
|
+
import { EdkValidationError } from "../../../../elementum-entity-client/errors.js";
|
|
5
|
+
export function asc(field) {
|
|
6
|
+
return { field, direction: "ASC" };
|
|
7
|
+
}
|
|
8
|
+
export function desc(field) {
|
|
9
|
+
return { field, direction: "DESC" };
|
|
10
|
+
}
|
|
11
|
+
/** Multi-field sort (order is significant). Serializes to `Sort.orders` for Mobius. */
|
|
12
|
+
export function sortBy(...orders) {
|
|
13
|
+
if (orders.length === 0) {
|
|
14
|
+
throw new EdkValidationError("sortBy requires at least one sort order.");
|
|
15
|
+
}
|
|
16
|
+
return orders;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Defensive runtime predicate — confirms a `unknown` value matches the
|
|
20
|
+
* authored `SortOrder` shape (`{ field: { id }, direction }`). The
|
|
21
|
+
* serializer accepts `SortOrder | SortOrder[] | unknown` from callers
|
|
22
|
+
* (the public option type is loose enough that an arbitrary object
|
|
23
|
+
* could land here) so this guards against bad input before we project
|
|
24
|
+
* onto the wire. Used by {@link serializeSortToWire}.
|
|
25
|
+
*/
|
|
26
|
+
function isSortOrderLike(v) {
|
|
27
|
+
if (v === null || typeof v !== "object" || Array.isArray(v))
|
|
28
|
+
return false;
|
|
29
|
+
const o = v;
|
|
30
|
+
const field = o.field;
|
|
31
|
+
if (field === null || typeof field !== "object" || !("id" in field))
|
|
32
|
+
return false;
|
|
33
|
+
return typeof field.id === "string" && typeof o.direction === "string";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Serialize an authored `SortOrder | readonly SortOrder[]` to the
|
|
37
|
+
* platform's `Sort` JSON shape: `{ orders: [{ field: <id>, direction }] }`.
|
|
38
|
+
* Returns `undefined` when `sort` is null/undefined or doesn't match
|
|
39
|
+
* the expected shape — callers can then omit the wire field entirely.
|
|
40
|
+
*
|
|
41
|
+
* Lifted from `automations/serializer/task-serializer.ts` so every
|
|
42
|
+
* tool surface that accepts a sort (automation `recordSearch`, agent
|
|
43
|
+
* search tools, etc.) emits the same wire shape through the same
|
|
44
|
+
* code path.
|
|
45
|
+
*/
|
|
46
|
+
export function serializeSortToWire(sort) {
|
|
47
|
+
if (sort == null || typeof sort !== "object")
|
|
48
|
+
return undefined;
|
|
49
|
+
let clauses;
|
|
50
|
+
if (Array.isArray(sort)) {
|
|
51
|
+
clauses = sort.filter(isSortOrderLike);
|
|
52
|
+
}
|
|
53
|
+
else if (isSortOrderLike(sort)) {
|
|
54
|
+
clauses = [sort];
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
clauses = [];
|
|
58
|
+
}
|
|
59
|
+
if (clauses.length === 0)
|
|
60
|
+
return undefined;
|
|
61
|
+
return {
|
|
62
|
+
orders: clauses.map((o) => ({ field: o.field.id, direction: o.direction })),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkflowFieldType — mirrors the Java enum in
|
|
3
|
+
* jarvis/util/.../WorkflowFieldType.java
|
|
4
|
+
*
|
|
5
|
+
* Only the subset relevant to on-demand trigger inputs and task
|
|
6
|
+
* configurations is surfaced here. The full enum is listed for
|
|
7
|
+
* forward-compatibility; uncommon types are commented.
|
|
8
|
+
*/
|
|
9
|
+
export type WorkflowFieldType = "TEXT" | "HANDLE" | "NUMBER" | "DECIMAL" | "BOOLEAN" | "DATE" | "DATETIME" | "HTML" | "USER" | "USER_ID" | "GROUP" | "GROUP_ID" | "FILE" | "ATTACHMENT" | "ATTACHMENT_ID" | "ASPECT_ID" | "ASPECT_RECORD" | "ASPECT_RECORD_ID" | "ASPECT_FIELD_ID" | "FILTER" | "OBJECT" | "JSON" | "PICKLIST" | "PICKLIST_ID" | "MULTI_PICKLIST" | "MULTI_PICKLIST_ID" | "SEARCH_TABLE_ID" | "TABLE_ID" | "TABLE_RECORD" | "VARIABLE" | "RICH_TEXT" | "AI_SEARCH_TABLE_RECORD";
|
|
10
|
+
/**
|
|
11
|
+
* Map from user-friendly type names (used in the SDK's onDemand input
|
|
12
|
+
* schema) to the platform's WorkflowFieldType value.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FIELD_TYPE_MAP: {
|
|
15
|
+
readonly text: "TEXT";
|
|
16
|
+
readonly number: "NUMBER";
|
|
17
|
+
readonly decimal: "DECIMAL";
|
|
18
|
+
readonly boolean: "BOOLEAN";
|
|
19
|
+
readonly date: "DATE";
|
|
20
|
+
readonly datetime: "DATETIME";
|
|
21
|
+
readonly user: "USER";
|
|
22
|
+
readonly json: "JSON";
|
|
23
|
+
readonly object: "OBJECT";
|
|
24
|
+
readonly attachmentId: "ATTACHMENT_ID";
|
|
25
|
+
};
|
|
26
|
+
export type FieldTypeAlias = keyof typeof FIELD_TYPE_MAP;
|
|
27
|
+
/**
|
|
28
|
+
* Subset of {@link FieldTypeAlias} that Mobius's `onDemand` trigger
|
|
29
|
+
* validator accepts. Mobius rejects `WorkflowFieldType.USER` and
|
|
30
|
+
* `WorkflowFieldType.GROUP` (and other `*_ID` types) on trigger params:
|
|
31
|
+
*
|
|
32
|
+
* parameter[submitter]: Parameter type USER is not valid for this trigger.
|
|
33
|
+
*
|
|
34
|
+
* We model the restriction at the type level so `onDemand({ x: { type: "user" } })`
|
|
35
|
+
* is a compile-time error, not a deploy-time 400. When Mobius widens the
|
|
36
|
+
* accepted set, add the alias back here and the full enum will open up
|
|
37
|
+
* for authors.
|
|
38
|
+
*/
|
|
39
|
+
export type TriggerFieldTypeAlias = Exclude<FieldTypeAlias, "user">;
|
|
40
|
+
/**
|
|
41
|
+
* Maps a user-friendly FieldTypeAlias to the TypeScript type it represents.
|
|
42
|
+
* Used to derive the phantom T in Ref<T> for trigger inputs.
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* Maps GraphQL __typename values for aspect fields to WorkflowFieldType.
|
|
46
|
+
* Used when generating app definitions from Hydra's field metadata.
|
|
47
|
+
*/
|
|
48
|
+
export declare const ASPECT_FIELD_TYPE_NAME_TO_WORKFLOW_FIELD_TYPE: Record<string, WorkflowFieldType>;
|
|
49
|
+
export type FieldTypeToTS<A extends FieldTypeAlias> = A extends "text" ? string : A extends "number" | "decimal" ? number : A extends "boolean" ? boolean : A extends "date" | "datetime" ? string : A extends "user" ? string : A extends "attachmentId" ? string : A extends "json" | "object" ? unknown : unknown;
|