@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,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automation emission (Phase 1). `automationToTf` consumes the discovered
|
|
3
|
+
* `DeployableEntity` (the `defineAutomation` def() payload) and emits the
|
|
4
|
+
* COMPOSITE ei dialect:
|
|
5
|
+
*
|
|
6
|
+
* elementum_automation.<autoLabel> — identity (app_id, name, ...)
|
|
7
|
+
* elementum_<trigger>_trigger.<autoLabel> — the one trigger (automation ref)
|
|
8
|
+
* elementum_<task>_task.<autoLabel>_<task> — one per task, parent-chained
|
|
9
|
+
* elementum_workflow_publish.<autoLabel> — version + depends_on(all tasks)
|
|
10
|
+
*
|
|
11
|
+
* Labels follow ei's export: the automation label is `sanitizeName(name)` and a
|
|
12
|
+
* task label is `<autoLabel>_<sanitizeName(taskName)>` — so build output matches
|
|
13
|
+
* ei's addresses for adoption/build-vs-export. Ordering is encoded exactly as ei does it:
|
|
14
|
+
* each task's `parent` points at the previous task (or the trigger, for the
|
|
15
|
+
* first). References are BARE resource refs (`elementum_automation.x`, no `.id`),
|
|
16
|
+
* matching the capture.
|
|
17
|
+
*
|
|
18
|
+
* Phase 1 carries the onDemand trigger and the executeScript + setVariable
|
|
19
|
+
* (create form → elementum_variable_task) tasks. Any other trigger/task kind, or
|
|
20
|
+
* an operator (forEach/forkJoin/switch), degrades through `diagnostics` —
|
|
21
|
+
* reported, never silently dropped (plan §6). Task BODY attributes beyond the
|
|
22
|
+
* Phase-1 set are reconciled against a fresh live capture (see the tranche plan).
|
|
23
|
+
*/
|
|
24
|
+
import { type DeployableEntity } from "../../engine/entity.js";
|
|
25
|
+
import { type TfBlock } from "../../engine/tf/index.js";
|
|
26
|
+
export interface AutomationToTfContext {
|
|
27
|
+
/** The owning app's tfLabel — app_id references this resource. */
|
|
28
|
+
readonly appTfLabel: string;
|
|
29
|
+
/** Degradations land here — reported by the caller, never silent. */
|
|
30
|
+
readonly diagnostics: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface AutomationToTfResult {
|
|
33
|
+
readonly blocks: readonly TfBlock[];
|
|
34
|
+
/** The automation's terraform address. */
|
|
35
|
+
readonly address: string;
|
|
36
|
+
}
|
|
37
|
+
/** The composite ei dialect for one automation. */
|
|
38
|
+
export declare function automationToTf(entity: DeployableEntity, ctx: AutomationToTfContext): AutomationToTfResult;
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automation emission (Phase 1). `automationToTf` consumes the discovered
|
|
3
|
+
* `DeployableEntity` (the `defineAutomation` def() payload) and emits the
|
|
4
|
+
* COMPOSITE ei dialect:
|
|
5
|
+
*
|
|
6
|
+
* elementum_automation.<autoLabel> — identity (app_id, name, ...)
|
|
7
|
+
* elementum_<trigger>_trigger.<autoLabel> — the one trigger (automation ref)
|
|
8
|
+
* elementum_<task>_task.<autoLabel>_<task> — one per task, parent-chained
|
|
9
|
+
* elementum_workflow_publish.<autoLabel> — version + depends_on(all tasks)
|
|
10
|
+
*
|
|
11
|
+
* Labels follow ei's export: the automation label is `sanitizeName(name)` and a
|
|
12
|
+
* task label is `<autoLabel>_<sanitizeName(taskName)>` — so build output matches
|
|
13
|
+
* ei's addresses for adoption/build-vs-export. Ordering is encoded exactly as ei does it:
|
|
14
|
+
* each task's `parent` points at the previous task (or the trigger, for the
|
|
15
|
+
* first). References are BARE resource refs (`elementum_automation.x`, no `.id`),
|
|
16
|
+
* matching the capture.
|
|
17
|
+
*
|
|
18
|
+
* Phase 1 carries the onDemand trigger and the executeScript + setVariable
|
|
19
|
+
* (create form → elementum_variable_task) tasks. Any other trigger/task kind, or
|
|
20
|
+
* an operator (forEach/forkJoin/switch), degrades through `diagnostics` —
|
|
21
|
+
* reported, never silently dropped (plan §6). Task BODY attributes beyond the
|
|
22
|
+
* Phase-1 set are reconciled against a fresh live capture (see the tranche plan).
|
|
23
|
+
*/
|
|
24
|
+
import { EntityTfError } from "../../engine/entity.js";
|
|
25
|
+
import { expr, sanitizeName } from "../../engine/tf/index.js";
|
|
26
|
+
import { APP_RESOURCE_TYPE } from "../app/module.js";
|
|
27
|
+
import { indexVariableIds, wireRefToTf } from "./value-ref-tf.js";
|
|
28
|
+
import { AUTOMATION_RESOURCE_TYPE, AUTOMATION_SUB_TYPE_BY_TYPE_KEY, WORKFLOW_PUBLISH_RESOURCE_TYPE, } from "./types.js";
|
|
29
|
+
/** A bare resource reference (`elementum_automation.x`, no attribute path). */
|
|
30
|
+
function bareRef(type, label) {
|
|
31
|
+
return expr.resourceAttr(type, label, []);
|
|
32
|
+
}
|
|
33
|
+
/** Discriminant + body of a one-of wire object (`{ onDemand: {...} }`). */
|
|
34
|
+
function oneOf(wire) {
|
|
35
|
+
if (wire === undefined || typeof wire !== "object")
|
|
36
|
+
return undefined;
|
|
37
|
+
const key = Object.keys(wire)[0];
|
|
38
|
+
if (key === undefined)
|
|
39
|
+
return undefined;
|
|
40
|
+
const body = wire[key];
|
|
41
|
+
return { key, body: body !== null && typeof body === "object" ? body : {} };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Type-specific task-body attributes for the implemented task kinds. Returns
|
|
45
|
+
* `unsupported` (the caller reports it) when the body carries something the
|
|
46
|
+
* terraform dialect can't encode — never emits it wrong.
|
|
47
|
+
*/
|
|
48
|
+
function taskBodyAttrs(typeKey, body, refCtx) {
|
|
49
|
+
switch (typeKey) {
|
|
50
|
+
case "executeScript": {
|
|
51
|
+
const attrs = {};
|
|
52
|
+
attrs["code"] = typeof body["code"] === "string" ? body["code"] : "";
|
|
53
|
+
// Inputs: [{name, value: <ref envelope>}] → [{name, value: refs-syntax expr | literal}].
|
|
54
|
+
const inputs = [];
|
|
55
|
+
for (const entry of body["inputs"] ?? []) {
|
|
56
|
+
if (typeof entry?.name !== "string")
|
|
57
|
+
continue;
|
|
58
|
+
const converted = wireRefToTf(entry.value, refCtx);
|
|
59
|
+
if ("unsupported" in converted) {
|
|
60
|
+
return { unsupported: `input "${entry.name}": ${converted.unsupported}` };
|
|
61
|
+
}
|
|
62
|
+
inputs.push({ name: entry.name, value: converted.value });
|
|
63
|
+
}
|
|
64
|
+
attrs["inputs"] = inputs;
|
|
65
|
+
// The provider takes output_schema as a JSON-encoDED string.
|
|
66
|
+
if (body["outputSchema"] !== undefined) {
|
|
67
|
+
attrs["output_schema"] = { $expr: "jsonencode", value: body["outputSchema"] };
|
|
68
|
+
}
|
|
69
|
+
return { attrs };
|
|
70
|
+
}
|
|
71
|
+
case "variable": {
|
|
72
|
+
// The tf dialect carries ONE variable per task: variable_name /
|
|
73
|
+
// variable_type / value. (The compose id is stamped for the compose
|
|
74
|
+
// path; the provider's variable_id is Computed — no id in HCL.)
|
|
75
|
+
const create = body["create"] ?? [];
|
|
76
|
+
if (create.length !== 1) {
|
|
77
|
+
return { unsupported: `elementum_variable_task carries exactly one variable; got ${create.length}` };
|
|
78
|
+
}
|
|
79
|
+
const decl = create[0];
|
|
80
|
+
const attrs = {
|
|
81
|
+
variable_name: decl.name ?? "",
|
|
82
|
+
variable_type: decl.type ?? "TEXT",
|
|
83
|
+
};
|
|
84
|
+
if (decl.value !== undefined) {
|
|
85
|
+
const converted = wireRefToTf(decl.value, refCtx);
|
|
86
|
+
if ("unsupported" in converted) {
|
|
87
|
+
return { unsupported: `variable "${decl.name}": ${converted.unsupported}` };
|
|
88
|
+
}
|
|
89
|
+
attrs["value"] = converted.value;
|
|
90
|
+
}
|
|
91
|
+
return { attrs };
|
|
92
|
+
}
|
|
93
|
+
default:
|
|
94
|
+
return { unsupported: `no terraform body mapping for task kind "${typeKey}"` };
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/** The composite ei dialect for one automation. */
|
|
98
|
+
export function automationToTf(entity, ctx) {
|
|
99
|
+
if (entity.kind !== "automation") {
|
|
100
|
+
throw new EntityTfError(`automationToTf expects kind "automation"; got "${entity.kind}" (refName "${entity.refName}")`);
|
|
101
|
+
}
|
|
102
|
+
const payload = entity.payload;
|
|
103
|
+
if (payload === null || typeof payload !== "object" || typeof payload.name !== "string") {
|
|
104
|
+
throw new EntityTfError(`automation "${entity.refName}" has no payload.name — was it built with defineAutomation?`);
|
|
105
|
+
}
|
|
106
|
+
const name = payload.name;
|
|
107
|
+
const autoLabel = sanitizeName(name);
|
|
108
|
+
const where = `automation "${name}"`;
|
|
109
|
+
const blocks = [];
|
|
110
|
+
// 1. elementum_automation — identity. `triggers_other_automations` is a
|
|
111
|
+
// platform-derived flag (true iff another automation calls this one);
|
|
112
|
+
// Phase 1 authors a single, uncalled automation, so it is false.
|
|
113
|
+
blocks.push({
|
|
114
|
+
kind: "resource",
|
|
115
|
+
type: AUTOMATION_RESOURCE_TYPE,
|
|
116
|
+
label: autoLabel,
|
|
117
|
+
attrs: {
|
|
118
|
+
app_id: expr.resourceAttr(APP_RESOURCE_TYPE, ctx.appTfLabel, ["id"]),
|
|
119
|
+
name,
|
|
120
|
+
triggers_other_automations: false,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
// 2. the trigger — one per automation, references the automation.
|
|
124
|
+
const trig = oneOf(payload.trigger);
|
|
125
|
+
if (trig === undefined)
|
|
126
|
+
throw new EntityTfError(`${where} has no trigger`);
|
|
127
|
+
const trigRow = AUTOMATION_SUB_TYPE_BY_TYPE_KEY.get(trig.key);
|
|
128
|
+
if (trigRow?.implemented !== true) {
|
|
129
|
+
throw new EntityTfError(`${where}: trigger "${trig.key}" is not carried by the terraform path yet (Phase 1 supports onDemand)`);
|
|
130
|
+
}
|
|
131
|
+
const triggerType = trigRow.resourceType;
|
|
132
|
+
const triggerAttrs = { automation: bareRef(AUTOMATION_RESOURCE_TYPE, autoLabel) };
|
|
133
|
+
// onDemand parameter declarations live ON the trigger resource
|
|
134
|
+
// (parameters = [{name, type, required, multiple, default_value}]).
|
|
135
|
+
const wireInputs = trig.body["inputs"] ?? [];
|
|
136
|
+
if (wireInputs.length > 0) {
|
|
137
|
+
triggerAttrs["parameters"] = wireInputs.map((i) => {
|
|
138
|
+
// The tf schema takes the lowercase authoring alias ("text"), not the
|
|
139
|
+
// wire form ("TEXT"); wire "BOOL" is the alias "boolean".
|
|
140
|
+
const wireType = String(i["type"] ?? "TEXT").toLowerCase();
|
|
141
|
+
const param = {
|
|
142
|
+
name: String(i["name"] ?? ""),
|
|
143
|
+
type: wireType === "bool" ? "boolean" : wireType,
|
|
144
|
+
required: i["required"] === true,
|
|
145
|
+
multiple: i["multiple"] === true,
|
|
146
|
+
};
|
|
147
|
+
// Wire default is a typed envelope ({text: "..."} etc.) — the tf attr is
|
|
148
|
+
// the bare string.
|
|
149
|
+
const dv = i["defaultValue"];
|
|
150
|
+
if (dv !== null && typeof dv === "object") {
|
|
151
|
+
const inner = Object.values(dv)[0];
|
|
152
|
+
if (inner !== undefined)
|
|
153
|
+
param["default_value"] = String(inner);
|
|
154
|
+
}
|
|
155
|
+
return param;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
if (trig.body["showTriggeredBy"] === true)
|
|
159
|
+
triggerAttrs["show_triggered_by"] = true;
|
|
160
|
+
blocks.push({ kind: "resource", type: triggerType, label: autoLabel, attrs: triggerAttrs });
|
|
161
|
+
// Value-reference conversion context, shared by task bodies + outputs.
|
|
162
|
+
const refCtx = {
|
|
163
|
+
autoLabel,
|
|
164
|
+
triggerType,
|
|
165
|
+
paramNames: wireInputs.map((i) => String(i["name"] ?? "")).filter((n) => n !== ""),
|
|
166
|
+
taskType: (refKey) => {
|
|
167
|
+
const entry = (payload.tasks ?? []).find((t) => t.refKey === refKey);
|
|
168
|
+
const kind = entry !== undefined ? oneOf(entry.task)?.key : undefined;
|
|
169
|
+
const row = kind !== undefined ? AUTOMATION_SUB_TYPE_BY_TYPE_KEY.get(kind) : undefined;
|
|
170
|
+
return row?.implemented === true ? row.resourceType : undefined;
|
|
171
|
+
},
|
|
172
|
+
taskResultProps: (refKey) => {
|
|
173
|
+
const entry = (payload.tasks ?? []).find((t) => t.refKey === refKey);
|
|
174
|
+
const schema = entry !== undefined ? oneOf(entry.task)?.body["outputSchema"] : undefined;
|
|
175
|
+
return (schema?.object?.properties ?? [])
|
|
176
|
+
.map((prop) => Object.values(prop)[0]?.name)
|
|
177
|
+
.filter((n) => typeof n === "string");
|
|
178
|
+
},
|
|
179
|
+
variableById: indexVariableIds(payload.tasks ?? []),
|
|
180
|
+
};
|
|
181
|
+
// 3. tasks — parent-chained. First task's parent is the trigger; each
|
|
182
|
+
// subsequent task's parent is its predecessor. Ordering IS the payload's
|
|
183
|
+
// task array order.
|
|
184
|
+
let parentType = triggerType;
|
|
185
|
+
let parentLabel = autoLabel;
|
|
186
|
+
const taskRefs = [];
|
|
187
|
+
const usedTaskLabels = new Map();
|
|
188
|
+
for (const t of payload.tasks ?? []) {
|
|
189
|
+
const one = oneOf(t.task);
|
|
190
|
+
const refKey = typeof t.refKey === "string" ? t.refKey : one !== undefined ? String(one.body.name ?? "") : "";
|
|
191
|
+
if (one === undefined || refKey === "") {
|
|
192
|
+
ctx.diagnostics.push(`${where}: a task has no recognizable body/refKey; dropped`);
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
if (t.children !== undefined) {
|
|
196
|
+
ctx.diagnostics.push(`${where}: task "${refKey}" has operator children (forEach/forkJoin/switch), not carried yet; dropped`);
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
const row = AUTOMATION_SUB_TYPE_BY_TYPE_KEY.get(one.key);
|
|
200
|
+
if (row?.implemented !== true) {
|
|
201
|
+
ctx.diagnostics.push(`${where}: task "${refKey}" of kind "${one.key}" is not carried by the terraform path yet; dropped`);
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
const body = taskBodyAttrs(one.key, one.body, refCtx);
|
|
205
|
+
if ("unsupported" in body) {
|
|
206
|
+
ctx.diagnostics.push(`${where}: task "${refKey}": ${body.unsupported}; dropped`);
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
const taskType = row.resourceType;
|
|
210
|
+
const taskLabel = `${autoLabel}_${sanitizeName(refKey)}`;
|
|
211
|
+
if (usedTaskLabels.has(taskLabel)) {
|
|
212
|
+
// Task names are open text, but their labels are sanitizeName(name) —
|
|
213
|
+
// two names that sanitize identically ("My Task" / "my_task") would
|
|
214
|
+
// collide on the tf address. Report loudly; skip the duplicate.
|
|
215
|
+
ctx.diagnostics.push(`${where}: task "${refKey}" sanitizes to the same tf label as task "${usedTaskLabels.get(taskLabel)}" (${taskLabel}); dropped — rename one of them`);
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
usedTaskLabels.set(taskLabel, refKey);
|
|
219
|
+
const displayName = typeof one.body.name === "string" ? (one.body.name) : refKey;
|
|
220
|
+
blocks.push({
|
|
221
|
+
kind: "resource",
|
|
222
|
+
type: taskType,
|
|
223
|
+
label: taskLabel,
|
|
224
|
+
attrs: {
|
|
225
|
+
parent: bareRef(parentType, parentLabel),
|
|
226
|
+
name: displayName,
|
|
227
|
+
...body.attrs,
|
|
228
|
+
},
|
|
229
|
+
});
|
|
230
|
+
taskRefs.push(bareRef(taskType, taskLabel));
|
|
231
|
+
parentType = taskType;
|
|
232
|
+
parentLabel = taskLabel;
|
|
233
|
+
}
|
|
234
|
+
// 4. elementum_workflow_publish — versions the workflow, depends on every
|
|
235
|
+
// task, and carries the workflow's OUTPUTS ([{name, value}], each value a
|
|
236
|
+
// refs-syntax expression).
|
|
237
|
+
const publishAttrs = {
|
|
238
|
+
automation: bareRef(AUTOMATION_RESOURCE_TYPE, autoLabel),
|
|
239
|
+
workflow_revision: payload.workflowRevision ?? "1.0.0",
|
|
240
|
+
...(taskRefs.length > 0 ? { depends_on: taskRefs } : {}),
|
|
241
|
+
};
|
|
242
|
+
const outputs = payload.outputProperties
|
|
243
|
+
?.outputs;
|
|
244
|
+
if (outputs !== undefined && outputs.length > 0) {
|
|
245
|
+
const converted = [];
|
|
246
|
+
for (const o of outputs) {
|
|
247
|
+
if (typeof o?.name !== "string")
|
|
248
|
+
continue;
|
|
249
|
+
const value = wireRefToTf(o.value, refCtx);
|
|
250
|
+
if ("unsupported" in value) {
|
|
251
|
+
ctx.diagnostics.push(`${where}: output "${o.name}": ${value.unsupported}; dropped`);
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
converted.push({ name: o.name, value: value.value });
|
|
255
|
+
}
|
|
256
|
+
if (converted.length > 0)
|
|
257
|
+
publishAttrs["outputs"] = converted;
|
|
258
|
+
}
|
|
259
|
+
blocks.push({
|
|
260
|
+
kind: "resource",
|
|
261
|
+
type: WORKFLOW_PUBLISH_RESOURCE_TYPE,
|
|
262
|
+
label: autoLabel,
|
|
263
|
+
attrs: publishAttrs,
|
|
264
|
+
});
|
|
265
|
+
return { blocks, address: `${AUTOMATION_RESOURCE_TYPE}.${autoLabel}` };
|
|
266
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 automation trigger factories. Each returns a {@link TriggerDef}: the wire
|
|
3
|
+
* trigger envelope (discriminated by kind, mirroring v1's `serializeStoredTrigger`)
|
|
4
|
+
* plus the typed `ctx.trigger` shape. Aspect/field references are `CatalogRef`
|
|
5
|
+
* tokens, resolved at deploy.
|
|
6
|
+
*
|
|
7
|
+
* `onDemand` reuses v1's typed-schema machinery + wire serializer directly —
|
|
8
|
+
* it's reference-model-agnostic (typed params, no id resolution), so there's
|
|
9
|
+
* nothing to retarget; it relocates to a shared home at the cutover.
|
|
10
|
+
*/
|
|
11
|
+
import type { AspectRef, FieldRef } from "../../catalog/index.js";
|
|
12
|
+
import type { RecordShape } from "../field/record-shape.js";
|
|
13
|
+
import { type InferTriggerType, type OnDemandTriggerOptions, type TriggerInputFieldDef, type TriggerInputSchema } from "../../core/triggers/on-demand.js";
|
|
14
|
+
import type { TriggerFieldTypeAlias } from "../shared/types/field-types.js";
|
|
15
|
+
import type { Filter } from "./filter.js";
|
|
16
|
+
import { type TriggerChain } from "./build.js";
|
|
17
|
+
/**
|
|
18
|
+
* The record a record-trigger fires on. `A` is the app/element ref passed as
|
|
19
|
+
* `app:` — when it's a real catalog ref (carries a `fields` bag), `record` is
|
|
20
|
+
* typed per-field via `RecordShape`; otherwise it falls back to loose
|
|
21
|
+
* `Record<string, unknown>` (see `RecordShape`'s doc comment).
|
|
22
|
+
*/
|
|
23
|
+
export interface RecordTriggerOutput<A extends AspectRef = AspectRef> {
|
|
24
|
+
readonly record: RecordShape<A>;
|
|
25
|
+
/** Raw ids of the fields that changed to fire this trigger (record-update only; empty on create). */
|
|
26
|
+
readonly changedFieldIds: readonly string[];
|
|
27
|
+
}
|
|
28
|
+
export interface RecordTriggerOptions<A extends AspectRef = AspectRef> {
|
|
29
|
+
readonly app: A;
|
|
30
|
+
/** Restrict to fire only when one of these fields changes. */
|
|
31
|
+
readonly changedFields?: readonly FieldRef[];
|
|
32
|
+
readonly thinkUi?: boolean;
|
|
33
|
+
/** Pre-built wire `Filter` (may embed `FieldRef` tokens — resolved at deploy). */
|
|
34
|
+
readonly filter?: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
/** Fires when a record is created on the given aspect. */
|
|
37
|
+
export declare function recordCreated<A extends AspectRef>(opts: RecordTriggerOptions<A>): TriggerChain<RecordTriggerOutput<A>>;
|
|
38
|
+
/** Fires when a record is updated on the given aspect. */
|
|
39
|
+
export declare function recordUpdated<A extends AspectRef>(opts: RecordTriggerOptions<A>): TriggerChain<RecordTriggerOutput<A>>;
|
|
40
|
+
export type ScheduleFrequency = "HOURLY" | "DAILY" | "WEEKLY" | "MONTHLY";
|
|
41
|
+
export type Weekday = "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY";
|
|
42
|
+
export interface ScheduleTriggerOptions {
|
|
43
|
+
readonly frequency: ScheduleFrequency;
|
|
44
|
+
readonly interval?: number;
|
|
45
|
+
readonly timezone: string;
|
|
46
|
+
readonly startAt: string;
|
|
47
|
+
readonly weekdays?: readonly Weekday[];
|
|
48
|
+
readonly dayOfMonth?: number;
|
|
49
|
+
}
|
|
50
|
+
export type ScheduleTriggerOutput = Record<string, never>;
|
|
51
|
+
/** Runs an automation on a recurring schedule. */
|
|
52
|
+
export declare function schedule(opts: ScheduleTriggerOptions): TriggerChain<ScheduleTriggerOutput>;
|
|
53
|
+
/**
|
|
54
|
+
* On-demand (API-invokable) trigger with typed input parameters. Each param
|
|
55
|
+
* becomes `ctx.trigger.<name>` with its declared TS type. Reuses v1's typed
|
|
56
|
+
* schema + wire serializer (both reference-model-agnostic).
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* Schema values may be full field defs or the bare type alias (v3 shorthand):
|
|
60
|
+
* `onDemand({ STUDENT_NAME: "text" })` ≡ `onDemand({ STUDENT_NAME: { type: "text" } })`.
|
|
61
|
+
* The VALUE schema is the source of truth for both the typed `ctx.trigger` AND
|
|
62
|
+
* the wire trigger-parameter declarations — a bare type parameter would be
|
|
63
|
+
* erased and deploy a trigger with no declared inputs.
|
|
64
|
+
*/
|
|
65
|
+
export type TriggerInputSchemaSpec = Record<string, TriggerInputFieldDef | TriggerFieldTypeAlias>;
|
|
66
|
+
/** Normalize a spec entry to the full def shape (type level). */
|
|
67
|
+
type NormalizeSpec<S extends TriggerInputSchemaSpec> = {
|
|
68
|
+
[K in keyof S]: S[K] extends TriggerFieldTypeAlias ? {
|
|
69
|
+
type: S[K];
|
|
70
|
+
} : Extract<S[K], TriggerInputFieldDef>;
|
|
71
|
+
};
|
|
72
|
+
export declare function onDemand<S extends TriggerInputSchemaSpec, Options extends OnDemandTriggerOptions = {}>(schema: S, options?: Options): TriggerChain<InferTriggerType<NormalizeSpec<S> & TriggerInputSchema, Options>>;
|
|
73
|
+
export interface WebhookTriggerOptions {
|
|
74
|
+
readonly authenticated?: boolean;
|
|
75
|
+
/** Pre-built wire custom-response envelope. */
|
|
76
|
+
readonly customResponse?: {
|
|
77
|
+
readonly success: {
|
|
78
|
+
readonly enabled: boolean;
|
|
79
|
+
readonly format: "JSON" | "XML" | "Text";
|
|
80
|
+
readonly statusCode: number;
|
|
81
|
+
readonly body: string;
|
|
82
|
+
};
|
|
83
|
+
readonly failure: {
|
|
84
|
+
readonly enabled: boolean;
|
|
85
|
+
readonly format: "JSON" | "XML" | "Text";
|
|
86
|
+
readonly statusCode: number;
|
|
87
|
+
readonly body: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/** The inbound request payload exposed to tasks. */
|
|
92
|
+
export interface WebhookTriggerOutput {
|
|
93
|
+
readonly body: Record<string, unknown>;
|
|
94
|
+
readonly headers: Record<string, unknown>;
|
|
95
|
+
}
|
|
96
|
+
/** Fires on an inbound HTTP webhook. */
|
|
97
|
+
export declare function webHook(opts?: WebhookTriggerOptions): TriggerChain<WebhookTriggerOutput>;
|
|
98
|
+
/** @deprecated Use {@link webHook}. */
|
|
99
|
+
export declare function webhook(opts?: WebhookTriggerOptions): TriggerChain<WebhookTriggerOutput>;
|
|
100
|
+
export type TemporalUnit = "MINUTES" | "HOURS" | "DAYS";
|
|
101
|
+
export interface TemporalTriggerOptions {
|
|
102
|
+
readonly app: AspectRef;
|
|
103
|
+
readonly field: FieldRef;
|
|
104
|
+
readonly temporalUnit: TemporalUnit;
|
|
105
|
+
readonly value: number;
|
|
106
|
+
}
|
|
107
|
+
/** Fires relative to a date/datetime field on records in the given aspect. */
|
|
108
|
+
export declare function temporal(opts: TemporalTriggerOptions): TriggerChain<RecordTriggerOutput>;
|
|
109
|
+
export type approvalProcessStatusUpdatedStatus = "ACTIVE" | "STEP_APPROVED" | "CANCELLED" | "DENIED" | "APPROVED";
|
|
110
|
+
export interface approvalProcessStatusUpdatedTriggerOptions {
|
|
111
|
+
readonly app: AspectRef;
|
|
112
|
+
readonly approvalChain: string;
|
|
113
|
+
readonly status: approvalProcessStatusUpdatedStatus;
|
|
114
|
+
}
|
|
115
|
+
/** Fires when an approval chain on a record changes to the configured status. */
|
|
116
|
+
export declare function approvalProcessStatusUpdated(opts: approvalProcessStatusUpdatedTriggerOptions): TriggerChain<RecordTriggerOutput>;
|
|
117
|
+
export interface AttachmentTriggerOptions<A extends AspectRef = AspectRef> {
|
|
118
|
+
readonly app: A;
|
|
119
|
+
readonly filter?: Filter;
|
|
120
|
+
readonly thinkUi?: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface AttachmentTriggerOutput<A extends AspectRef = AspectRef> {
|
|
123
|
+
readonly record: RecordShape<A>;
|
|
124
|
+
/** Attachment sub-fields (name/url/mediaType/…) aren't typed yet — follow-up. */
|
|
125
|
+
readonly attachment: Record<string, unknown>;
|
|
126
|
+
}
|
|
127
|
+
/** Fires when an attachment is added to a record on the given aspect. */
|
|
128
|
+
export declare function attachment<A extends AspectRef>(opts: AttachmentTriggerOptions<A>): TriggerChain<AttachmentTriggerOutput<A>>;
|
|
129
|
+
export interface DataMineTriggerOptions {
|
|
130
|
+
readonly datamineId: string;
|
|
131
|
+
readonly fireOnAlert?: boolean;
|
|
132
|
+
readonly fireOnRecovery?: boolean;
|
|
133
|
+
}
|
|
134
|
+
/** Fires when a data mine meets/no longer meets requirements. */
|
|
135
|
+
export declare function dataMine(opts: DataMineTriggerOptions): TriggerChain<Record<string, unknown>>;
|
|
136
|
+
export interface EmailReceivedTriggerOptions {
|
|
137
|
+
readonly emailAliasId: string;
|
|
138
|
+
}
|
|
139
|
+
export interface EmailReceivedTriggerOutput {
|
|
140
|
+
readonly email_id: string;
|
|
141
|
+
readonly sender_email: string;
|
|
142
|
+
readonly sender_name: string;
|
|
143
|
+
readonly subject: string;
|
|
144
|
+
readonly body: string;
|
|
145
|
+
/** The rich-text/HTML rendering of the email body — a distinct platform trigger reference (wire name `bodyHtml`) from the plain-text `body`. */
|
|
146
|
+
readonly body_html: string;
|
|
147
|
+
readonly attachments: readonly Record<string, unknown>[];
|
|
148
|
+
readonly timestamp: string;
|
|
149
|
+
}
|
|
150
|
+
/** Fires when an email is received by the platform email alias. */
|
|
151
|
+
export declare function emailReceived(opts: EmailReceivedTriggerOptions): TriggerChain<EmailReceivedTriggerOutput>;
|
|
152
|
+
export interface CommentAddedTriggerOptions<A extends AspectRef = AspectRef> {
|
|
153
|
+
readonly app: A;
|
|
154
|
+
/** Conversation type the comment was added to (e.g. `"INTERNAL"`). */
|
|
155
|
+
readonly conversationType: string;
|
|
156
|
+
readonly filter?: Filter;
|
|
157
|
+
}
|
|
158
|
+
export interface CommentAddedTriggerOutput<A extends AspectRef = AspectRef> {
|
|
159
|
+
readonly record: RecordShape<A>;
|
|
160
|
+
/** Comment sub-fields aren't typed yet — follow-up. */
|
|
161
|
+
readonly comment: Record<string, unknown>;
|
|
162
|
+
}
|
|
163
|
+
/** Fires when a comment is added to a record on the given aspect. */
|
|
164
|
+
export declare function commentAdded<A extends AspectRef>(opts: CommentAddedTriggerOptions<A>): TriggerChain<CommentAddedTriggerOutput<A>>;
|
|
165
|
+
export type ConversationEndConversationType = "A2A" | "VOICE" | "EMAIL" | "SLACK" | "TEAMS";
|
|
166
|
+
export interface ConversationEndTriggerOptions {
|
|
167
|
+
readonly app: AspectRef;
|
|
168
|
+
readonly conversationType: ConversationEndConversationType;
|
|
169
|
+
}
|
|
170
|
+
export interface ConversationEndTriggerOutput {
|
|
171
|
+
readonly record: Record<string, unknown>;
|
|
172
|
+
readonly transcript: string;
|
|
173
|
+
}
|
|
174
|
+
/** Fires when a conversation of the selected type ends on the given aspect. */
|
|
175
|
+
export declare function conversationEnd(opts: ConversationEndTriggerOptions): TriggerChain<ConversationEndTriggerOutput>;
|
|
176
|
+
export interface SlackMessageTriggerOutput {
|
|
177
|
+
/** Slack thread id when the inbound message is part of a thread. */
|
|
178
|
+
readonly threadId: string;
|
|
179
|
+
readonly channelId: string;
|
|
180
|
+
readonly authorEmail: string;
|
|
181
|
+
readonly authorId: string;
|
|
182
|
+
readonly authorName: string;
|
|
183
|
+
readonly content: string;
|
|
184
|
+
readonly messageId: string;
|
|
185
|
+
readonly meta: Record<string, unknown>;
|
|
186
|
+
}
|
|
187
|
+
/** Fires when a Slack message is received. */
|
|
188
|
+
export declare function slackMessage(): TriggerChain<SlackMessageTriggerOutput>;
|
|
189
|
+
export interface SurveyResponseCreateTriggerOptions {
|
|
190
|
+
readonly app: AspectRef;
|
|
191
|
+
/** Raw survey template id until surveys are catalog-modeled. */
|
|
192
|
+
readonly survey: string;
|
|
193
|
+
}
|
|
194
|
+
export type SurveyResponseCreateTriggerOutput = Record<string, unknown>;
|
|
195
|
+
/** Fires when a response is created for the selected survey template. */
|
|
196
|
+
export declare function surveyResponseCreate(opts: SurveyResponseCreateTriggerOptions): TriggerChain<SurveyResponseCreateTriggerOutput>;
|
|
197
|
+
export {};
|