@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,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared system-field classification used outside any single workflow.
|
|
3
|
+
*
|
|
4
|
+
* The platform auto-provisions a fixed set of system fields on every app. They
|
|
5
|
+
* are identified by tags, not display names: a user may rename a field while
|
|
6
|
+
* the tag keeps its platform role.
|
|
7
|
+
*
|
|
8
|
+
* System fields travel in the normal app `fields` list. Only Title and Status
|
|
9
|
+
* can be assigned record values. Read-only deploy protection comes from the
|
|
10
|
+
* backend `system` flag stored in state.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Canonical semantic-tag values the platform stamps onto its auto-provisioned
|
|
14
|
+
* system fields. Union across all aspect variants.
|
|
15
|
+
*/
|
|
16
|
+
export const REQUIRED_TAG_NAMES = new Set([
|
|
17
|
+
"HANDLE",
|
|
18
|
+
"TITLE",
|
|
19
|
+
"STATUS",
|
|
20
|
+
"STAGE",
|
|
21
|
+
"CREATED_AT",
|
|
22
|
+
"CREATED_BY",
|
|
23
|
+
"UPDATED_AT",
|
|
24
|
+
"UPDATED_BY",
|
|
25
|
+
"CLOSED_AT",
|
|
26
|
+
"CLOSED_BY",
|
|
27
|
+
]);
|
|
28
|
+
/**
|
|
29
|
+
* The subset of system tags whose fields a record-write surface may set.
|
|
30
|
+
* Everything else in {@link REQUIRED_TAG_NAMES} is platform-managed and
|
|
31
|
+
* read-only for record values.
|
|
32
|
+
*/
|
|
33
|
+
export const WRITABLE_SYSTEM_TAG_NAMES = new Set([
|
|
34
|
+
"TITLE",
|
|
35
|
+
"STATUS",
|
|
36
|
+
]);
|
|
37
|
+
export const DEFAULT_SYSTEM_FIELD_NAME_BY_TAG = {
|
|
38
|
+
HANDLE: "ID",
|
|
39
|
+
TITLE: "Title",
|
|
40
|
+
STATUS: "Status",
|
|
41
|
+
STAGE: "Stage",
|
|
42
|
+
CREATED_AT: "Created on",
|
|
43
|
+
CREATED_BY: "Created by",
|
|
44
|
+
UPDATED_AT: "Updated on",
|
|
45
|
+
UPDATED_BY: "Updated by",
|
|
46
|
+
CLOSED_AT: "Closed on",
|
|
47
|
+
CLOSED_BY: "Closed by",
|
|
48
|
+
};
|
|
49
|
+
export function systemFieldTag(f) {
|
|
50
|
+
for (const tag of f.tags ?? f.semanticTags ?? []) {
|
|
51
|
+
if (REQUIRED_TAG_NAMES.has(tag))
|
|
52
|
+
return tag;
|
|
53
|
+
}
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* True if the wire/state field is system-provisioned/reserved by legacy EDK
|
|
58
|
+
* classification. Tags still drive role reconciliation because Title/Status
|
|
59
|
+
* can come back with `system: false`.
|
|
60
|
+
*/
|
|
61
|
+
export function isSystemField(f) {
|
|
62
|
+
if (f.system === true)
|
|
63
|
+
return true;
|
|
64
|
+
return systemFieldTag(f) !== undefined;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* True if the field is a writable system field: TITLE or STATUS.
|
|
68
|
+
*/
|
|
69
|
+
export function isWritableSystemField(f) {
|
|
70
|
+
for (const tag of f.tags ?? f.semanticTags ?? []) {
|
|
71
|
+
if (WRITABLE_SYSTEM_TAG_NAMES.has(tag))
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
/** True for the platform-owned Stage picklist field. */
|
|
77
|
+
export function isStageSystemField(f) {
|
|
78
|
+
return (f.tags ?? f.semanticTags ?? []).includes("STAGE");
|
|
79
|
+
}
|
|
80
|
+
/** True for backend-owned read-only system fields. */
|
|
81
|
+
export function isReadOnlySystemField(f) {
|
|
82
|
+
return f.system === true;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Canonical `systemFields` bag key → platform semantic tag. These keys are the
|
|
86
|
+
* ONLY authoring/catalog identity for system fields: pulled source keys its
|
|
87
|
+
* hoisted refs and overrides by them, `ref()` exposes `fields.<key>` tokens
|
|
88
|
+
* under them, and the custom `fields: {}` bag rejects them as collisions.
|
|
89
|
+
*/
|
|
90
|
+
export const SYSTEM_FIELD_TAG_BY_KEY = {
|
|
91
|
+
id: "HANDLE",
|
|
92
|
+
title: "TITLE",
|
|
93
|
+
status: "STATUS",
|
|
94
|
+
stage: "STAGE",
|
|
95
|
+
createdAt: "CREATED_AT",
|
|
96
|
+
createdBy: "CREATED_BY",
|
|
97
|
+
updatedAt: "UPDATED_AT",
|
|
98
|
+
updatedBy: "UPDATED_BY",
|
|
99
|
+
closedAt: "CLOSED_AT",
|
|
100
|
+
closedBy: "CLOSED_BY",
|
|
101
|
+
};
|
|
102
|
+
/** All canonical keys, in platform rank order (HANDLE first … CLOSED_BY last). */
|
|
103
|
+
export const SYSTEM_FIELD_KEYS = Object.keys(SYSTEM_FIELD_TAG_BY_KEY);
|
|
104
|
+
export const SYSTEM_FIELD_KEY_BY_TAG = Object.fromEntries(Object.entries(SYSTEM_FIELD_TAG_BY_KEY).map(([k, tag]) => [tag, k]));
|
|
105
|
+
/**
|
|
106
|
+
* What a NO-OVERRIDE deploy produces — the terraform provider's auto-create
|
|
107
|
+
* display names. This is the baseline the pull printer compares against when
|
|
108
|
+
* deciding whether a live system field warrants a `systemFields` entry.
|
|
109
|
+
*
|
|
110
|
+
* Deliberately a separate table from {@link DEFAULT_SYSTEM_FIELD_NAME_BY_TAG}:
|
|
111
|
+
* the platform's own compose defaults use "Created on"/"Updated on"/"Closed
|
|
112
|
+
* on", but the provider creates "Created At"/"Updated At"/"Closed At" (and
|
|
113
|
+
* "Created By" etc. with a capital B). An app that came through EDK/terraform
|
|
114
|
+
* therefore round-trips clean against THIS table, while a platform-composed
|
|
115
|
+
* app surfaces its "Created on"-style names as explicit overrides.
|
|
116
|
+
*/
|
|
117
|
+
export const DEPLOY_DEFAULT_SYSTEM_FIELD_NAMES = {
|
|
118
|
+
id: "ID",
|
|
119
|
+
title: "Title",
|
|
120
|
+
status: "Status",
|
|
121
|
+
stage: "Stage",
|
|
122
|
+
createdAt: "Created At",
|
|
123
|
+
createdBy: "Created By",
|
|
124
|
+
updatedAt: "Updated At",
|
|
125
|
+
updatedBy: "Updated By",
|
|
126
|
+
closedAt: "Closed At",
|
|
127
|
+
closedBy: "Closed By",
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* The status options a no-override deploy produces (the provider's
|
|
131
|
+
* `getDefaultStatusOptions` labels, filled when `status_options` is empty).
|
|
132
|
+
* The pull baseline for `systemFields.status.options`; colors/option-tags are
|
|
133
|
+
* platform cosmetics EDK doesn't model (the HCL fold emits labels only).
|
|
134
|
+
*/
|
|
135
|
+
export const DEPLOY_DEFAULT_STATUS_OPTIONS = ["Open", "In Progress", "Closed"];
|
|
136
|
+
/**
|
|
137
|
+
* Whether the provider marks the auto-created field `required` — synthesized
|
|
138
|
+
* into the compose payload so the wire shape matches what terraform creates.
|
|
139
|
+
*/
|
|
140
|
+
export const SYSTEM_FIELD_REQUIRED = {
|
|
141
|
+
id: true,
|
|
142
|
+
title: true,
|
|
143
|
+
status: false,
|
|
144
|
+
stage: false,
|
|
145
|
+
createdAt: true,
|
|
146
|
+
createdBy: true,
|
|
147
|
+
updatedAt: true,
|
|
148
|
+
updatedBy: true,
|
|
149
|
+
closedAt: false,
|
|
150
|
+
closedBy: false,
|
|
151
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ON_DEMAND trigger — an API-invokable trigger with typed input parameters.
|
|
3
|
+
*
|
|
4
|
+
* Maps to Java WorkflowOnDemandTriggerInput / OnDemandProperties.
|
|
5
|
+
* Each input becomes a ServiceTaskParam that downstream tasks can
|
|
6
|
+
* reference via ctx.trigger.<paramName>.
|
|
7
|
+
*/
|
|
8
|
+
import type { FieldTypeToTS, TriggerFieldTypeAlias } from "../../entities/shared/types/field-types.js";
|
|
9
|
+
import type { User } from "../types/platform.js";
|
|
10
|
+
/**
|
|
11
|
+
* The `type` field is constrained to {@link TriggerFieldTypeAlias}, which
|
|
12
|
+
* excludes the aliases Mobius's trigger-parameter validator rejects
|
|
13
|
+
* (`"user"`, `"group"`). Use `"text"` + `description: "USER_ID"` until
|
|
14
|
+
* Mobius lifts the restriction.
|
|
15
|
+
*/
|
|
16
|
+
export interface TriggerInputFieldDef {
|
|
17
|
+
type: TriggerFieldTypeAlias;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
multiple?: boolean;
|
|
20
|
+
defaultValue?: unknown;
|
|
21
|
+
description?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Schema object mapping field names to their definitions.
|
|
25
|
+
* Example:
|
|
26
|
+
* { invoiceId: { type: "text", required: true }, amount: { type: "number" } }
|
|
27
|
+
*/
|
|
28
|
+
export type TriggerInputSchema = Record<string, TriggerInputFieldDef>;
|
|
29
|
+
/**
|
|
30
|
+
* Options carried alongside the schema. `ShowTriggeredBy` defaults to
|
|
31
|
+
* `false`; when true, the built-in `triggeredBy` parameter is
|
|
32
|
+
* referenceable from tasks via `ctx.trigger.triggeredBy` and the
|
|
33
|
+
* conditional in {@link InferTriggerType} adds it to the typed context.
|
|
34
|
+
*/
|
|
35
|
+
export interface OnDemandTriggerOptions {
|
|
36
|
+
showTriggeredBy?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* When true, this on-demand automation is invoked against a specific
|
|
39
|
+
* record, and the invoking record is exposed as `ctx.trigger.record` —
|
|
40
|
+
* the same loosely-typed shape record-event triggers expose. Purely a
|
|
41
|
+
* typing declaration; the platform doesn't require a matching wire flag.
|
|
42
|
+
*/
|
|
43
|
+
record?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Given a TriggerInputSchema, derive the TypeScript object type
|
|
47
|
+
* where each key maps to its TS type based on the field's `type`.
|
|
48
|
+
* This becomes the TTrigger generic on the builder chain.
|
|
49
|
+
*
|
|
50
|
+
* When `Options.showTriggeredBy` is the literal type `true`, merge a
|
|
51
|
+
* `triggeredBy: User` key so tasks can `ctx.trigger.triggeredBy.email`
|
|
52
|
+
* with full type safety. When omitted or `false`, the key is absent
|
|
53
|
+
* and the reference is a `tsc` error.
|
|
54
|
+
*
|
|
55
|
+
* When `Options.record` is the literal type `true`, merge a `record` key
|
|
56
|
+
* (the same loose shape record-event triggers expose) so tasks can
|
|
57
|
+
* `ctx.trigger.record` — used for on-demand automations invoked against a
|
|
58
|
+
* specific record.
|
|
59
|
+
*/
|
|
60
|
+
export type InferTriggerType<S extends TriggerInputSchema, Options extends OnDemandTriggerOptions = {}> = {
|
|
61
|
+
[K in keyof S]: FieldTypeToTS<S[K]["type"]>;
|
|
62
|
+
} & (Options extends {
|
|
63
|
+
showTriggeredBy: true;
|
|
64
|
+
} ? {
|
|
65
|
+
triggeredBy: User;
|
|
66
|
+
} : {}) & (Options extends {
|
|
67
|
+
record: true;
|
|
68
|
+
} ? {
|
|
69
|
+
record: Record<string, unknown>;
|
|
70
|
+
} : {});
|
|
71
|
+
export interface OnDemandTriggerDef<T, S extends TriggerInputSchema = TriggerInputSchema> {
|
|
72
|
+
readonly kind: "onDemand";
|
|
73
|
+
readonly schema: S;
|
|
74
|
+
/** When true, mobius exposes the built-in `triggeredBy` parameter. */
|
|
75
|
+
readonly showTriggeredBy?: boolean;
|
|
76
|
+
/** Phantom — carries the inferred TS type for the builder chain. */
|
|
77
|
+
readonly __triggerType: T;
|
|
78
|
+
/** Phantom — carries the raw schema type so downstream builders can infer param shapes. */
|
|
79
|
+
readonly __schema?: S;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Define an ON_DEMAND trigger with typed input parameters.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* onDemand({
|
|
87
|
+
* invoiceId: { type: "text", required: true },
|
|
88
|
+
* amount: { type: "number", required: true },
|
|
89
|
+
* vendorName: { type: "text" },
|
|
90
|
+
* })
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare function onDemand<S extends TriggerInputSchema, Options extends OnDemandTriggerOptions = {}>(schema: S, options?: Options): OnDemandTriggerDef<InferTriggerType<S, Options>, S>;
|
|
94
|
+
/**
|
|
95
|
+
* Wire shape for an onDemand `defaultValue`. Mirrors mobius's
|
|
96
|
+
* `WorkflowTriggerParameterDefaultValueInput` Java record — a
|
|
97
|
+
* discriminated-union object whose key encodes the value type.
|
|
98
|
+
*
|
|
99
|
+
* Mobius's POST handler types `defaultValue` as that record (see
|
|
100
|
+
* `WorkflowTriggerParameterInput.java:21`); Jackson can only
|
|
101
|
+
* construct it from a JSON object whose key matches one of the
|
|
102
|
+
* record's fields. A bare value (e.g. `defaultValue: 100`) trips
|
|
103
|
+
* Jackson's "no int-argument constructor" error and the request
|
|
104
|
+
* 400s before ever reaching the validator.
|
|
105
|
+
*
|
|
106
|
+
* Asymmetric with the GET response, which surfaces the unwrapped
|
|
107
|
+
* value alongside `fieldType` (mobius collapses the wrapper via
|
|
108
|
+
* `WorkflowTriggerParameterDefaultValueInput.getValue()` before
|
|
109
|
+
* persistence — see line 36 of that file). The pull-side
|
|
110
|
+
* `normalize.ts::normalizeOnDemandProperties` therefore reads
|
|
111
|
+
* `defaultValue` as a bare value; only this serialize-side path
|
|
112
|
+
* needs to wrap.
|
|
113
|
+
*/
|
|
114
|
+
type WireDefaultValue = {
|
|
115
|
+
text: string;
|
|
116
|
+
} | {
|
|
117
|
+
number: number;
|
|
118
|
+
} | {
|
|
119
|
+
decimal: number;
|
|
120
|
+
} | {
|
|
121
|
+
bool: boolean;
|
|
122
|
+
} | {
|
|
123
|
+
date: string;
|
|
124
|
+
} | {
|
|
125
|
+
datetime: string;
|
|
126
|
+
} | {
|
|
127
|
+
userId: string;
|
|
128
|
+
} | {
|
|
129
|
+
attachmentId: string;
|
|
130
|
+
};
|
|
131
|
+
export interface SerializedOnDemandTrigger {
|
|
132
|
+
onDemand: {
|
|
133
|
+
inputs: Array<{
|
|
134
|
+
name: string;
|
|
135
|
+
type: string;
|
|
136
|
+
required: boolean;
|
|
137
|
+
multiple: boolean;
|
|
138
|
+
defaultValue?: WireDefaultValue;
|
|
139
|
+
}>;
|
|
140
|
+
showTriggeredBy?: boolean;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
export declare function serializeOnDemandTrigger(schema: TriggerInputSchema, options?: OnDemandTriggerOptions): SerializedOnDemandTrigger;
|
|
144
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ON_DEMAND trigger — an API-invokable trigger with typed input parameters.
|
|
3
|
+
*
|
|
4
|
+
* Maps to Java WorkflowOnDemandTriggerInput / OnDemandProperties.
|
|
5
|
+
* Each input becomes a ServiceTaskParam that downstream tasks can
|
|
6
|
+
* reference via ctx.trigger.<paramName>.
|
|
7
|
+
*/
|
|
8
|
+
import { FIELD_TYPE_MAP } from "../../entities/shared/types/field-types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Define an ON_DEMAND trigger with typed input parameters.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* onDemand({
|
|
15
|
+
* invoiceId: { type: "text", required: true },
|
|
16
|
+
* amount: { type: "number", required: true },
|
|
17
|
+
* vendorName: { type: "text" },
|
|
18
|
+
* })
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export function onDemand(schema, options) {
|
|
22
|
+
return {
|
|
23
|
+
kind: "onDemand",
|
|
24
|
+
schema,
|
|
25
|
+
...(options?.showTriggeredBy && { showTriggeredBy: true }),
|
|
26
|
+
__triggerType: undefined,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Wrap a user-supplied `defaultValue` into the discriminated shape
|
|
31
|
+
* mobius's POST endpoint requires.
|
|
32
|
+
*
|
|
33
|
+
* The mapping below pairs each EDK alias (what the user types) with
|
|
34
|
+
* the matching field name on `WorkflowTriggerParameterDefaultValueInput`.
|
|
35
|
+
* Two name asymmetries to watch out for and the reason this can't be
|
|
36
|
+
* a 1-to-1 lookup keyed on the alias:
|
|
37
|
+
* - `boolean` (EDK) → `bool` (mobius field)
|
|
38
|
+
* - `user` (EDK) → `userId` (mobius field)
|
|
39
|
+
*
|
|
40
|
+
* `json` and `object` are EDK-only aliases; mobius's record has no
|
|
41
|
+
* default-value slot for them. We throw rather than emit a
|
|
42
|
+
* silently-broken request — the user catches the misconfiguration
|
|
43
|
+
* at deploy time with a message they can act on.
|
|
44
|
+
*
|
|
45
|
+
* Parameter is `FieldTypeAlias` (the full set), not
|
|
46
|
+
* `TriggerFieldTypeAlias` (which excludes `"user"` for compile-time
|
|
47
|
+
* safety on `TriggerInputFieldDef.type`). The runtime serializer
|
|
48
|
+
* still has to route a `"user"` alias to `{ userId }` if one slips
|
|
49
|
+
* through — see the test that asserts that mapping with `as never`.
|
|
50
|
+
*/
|
|
51
|
+
function wrapDefaultValueForWire(alias, value) {
|
|
52
|
+
switch (alias) {
|
|
53
|
+
case "text":
|
|
54
|
+
return { text: value };
|
|
55
|
+
case "number":
|
|
56
|
+
// Mobius's record field is `Long` (`number` in the JSON), so a
|
|
57
|
+
// fractional value would parse-fail downstream as
|
|
58
|
+
// `Cannot deserialize java.lang.Long from "1.5"`. JS `number`
|
|
59
|
+
// covers both ints and floats, so we have to runtime-check —
|
|
60
|
+
// the TypeScript type alone can't enforce this. Refuse early
|
|
61
|
+
// with a message that points the user at `decimal` rather than
|
|
62
|
+
// letting mobius 400 mid-deploy with a generic Jackson error.
|
|
63
|
+
if (typeof value !== "number" || !Number.isInteger(value)) {
|
|
64
|
+
throw new TypeError(`onDemand input default value for type "number" must be an integer ` +
|
|
65
|
+
`(got ${JSON.stringify(value)}). Use type "decimal" for fractional ` +
|
|
66
|
+
`defaults — "number" is integer-only at the platform layer.`);
|
|
67
|
+
}
|
|
68
|
+
return { number: value };
|
|
69
|
+
case "decimal":
|
|
70
|
+
return { decimal: value };
|
|
71
|
+
case "boolean":
|
|
72
|
+
// Mobius's record field is named `bool`, not `boolean`.
|
|
73
|
+
return { bool: value };
|
|
74
|
+
case "date":
|
|
75
|
+
// Expected wire form: "YYYY-MM-DD" — Jackson's LocalDate parser.
|
|
76
|
+
return { date: value };
|
|
77
|
+
case "datetime":
|
|
78
|
+
// Expected wire form: ISO-8601 instant — Jackson's Instant parser.
|
|
79
|
+
return { datetime: value };
|
|
80
|
+
case "user":
|
|
81
|
+
// Mobius's record field is named `userId`, not `user`.
|
|
82
|
+
return { userId: value };
|
|
83
|
+
case "attachmentId":
|
|
84
|
+
return { attachmentId: value };
|
|
85
|
+
case "json":
|
|
86
|
+
case "object":
|
|
87
|
+
throw new Error(`onDemand input default values are not supported for type "${alias}". ` +
|
|
88
|
+
`Defaults are only accepted for text / number / decimal / boolean / ` +
|
|
89
|
+
`date / datetime / user. Drop the defaultValue, or pick a supported ` +
|
|
90
|
+
`type for this input.`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export function serializeOnDemandTrigger(schema, options) {
|
|
94
|
+
const inputs = Object.entries(schema).map(([name, def]) => ({
|
|
95
|
+
name,
|
|
96
|
+
type: FIELD_TYPE_MAP[def.type],
|
|
97
|
+
required: def.required ?? false,
|
|
98
|
+
multiple: def.multiple ?? false,
|
|
99
|
+
// Skip when the user didn't set a default. The wire's omission
|
|
100
|
+
// and `null` aren't the same — `null` would still try to
|
|
101
|
+
// construct the wrapper record and fail.
|
|
102
|
+
...(def.defaultValue === undefined
|
|
103
|
+
? {}
|
|
104
|
+
: { defaultValue: wrapDefaultValueForWire(def.type, def.defaultValue) }),
|
|
105
|
+
}));
|
|
106
|
+
return {
|
|
107
|
+
onDemand: {
|
|
108
|
+
inputs,
|
|
109
|
+
...(options?.showTriggeredBy && { showTriggeredBy: true }),
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI provider connector descriptor — a typed handle to a registered
|
|
3
|
+
* AI provider connector (OpenAI, Anthropic, etc.) on the Elementum platform.
|
|
4
|
+
*
|
|
5
|
+
* Defined once and shared across agents so callers reference the same typed
|
|
6
|
+
* object everywhere (mirroring the `App`, `AppAgent`, `AppAutomation` pattern),
|
|
7
|
+
* rather than re-typing a raw `{ id }` blob at each agent site.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* // connectors/ai-providers.ts
|
|
11
|
+
* export const openAiGpt5 = defineAiProviderConnector({
|
|
12
|
+
* id: "ab100edd-b301-4a16-b269-e5347449ad9b",
|
|
13
|
+
* name: "ChatGPT 5 (OpenAI)",
|
|
14
|
+
* model: "GPT_5",
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* // agents/support-agent.ts
|
|
18
|
+
* import { openAiGpt5 } from "../connectors/ai-providers.js";
|
|
19
|
+
*
|
|
20
|
+
* defineAgent({
|
|
21
|
+
* aiProviderConnector: openAiGpt5,
|
|
22
|
+
* // ...
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export interface AiProviderConnector {
|
|
27
|
+
readonly id: string;
|
|
28
|
+
readonly name?: string;
|
|
29
|
+
/** Model identifier (e.g. "gpt-4o", "claude-3-5-sonnet"). Metadata only — the platform uses the connector's configured model. */
|
|
30
|
+
readonly model?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function defineAiProviderConnector(opts: {
|
|
33
|
+
id: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
model?: string;
|
|
36
|
+
}): AiProviderConnector;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI provider connector descriptor — a typed handle to a registered
|
|
3
|
+
* AI provider connector (OpenAI, Anthropic, etc.) on the Elementum platform.
|
|
4
|
+
*
|
|
5
|
+
* Defined once and shared across agents so callers reference the same typed
|
|
6
|
+
* object everywhere (mirroring the `App`, `AppAgent`, `AppAutomation` pattern),
|
|
7
|
+
* rather than re-typing a raw `{ id }` blob at each agent site.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* // connectors/ai-providers.ts
|
|
11
|
+
* export const openAiGpt5 = defineAiProviderConnector({
|
|
12
|
+
* id: "ab100edd-b301-4a16-b269-e5347449ad9b",
|
|
13
|
+
* name: "ChatGPT 5 (OpenAI)",
|
|
14
|
+
* model: "GPT_5",
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* // agents/support-agent.ts
|
|
18
|
+
* import { openAiGpt5 } from "../connectors/ai-providers.js";
|
|
19
|
+
*
|
|
20
|
+
* defineAgent({
|
|
21
|
+
* aiProviderConnector: openAiGpt5,
|
|
22
|
+
* // ...
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export function defineAiProviderConnector(opts) {
|
|
27
|
+
return {
|
|
28
|
+
id: opts.id,
|
|
29
|
+
...(opts.name != null && { name: opts.name }),
|
|
30
|
+
...(opts.model != null && { model: opts.model }),
|
|
31
|
+
};
|
|
32
|
+
}
|