@elementumai/edk 0.8.2-alpha.5 → 0.9.2
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 +18 -14
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +3 -3
- package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +3 -11
- package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +2 -10
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +1 -1
- package/dist-sdk/fs/entity.d.ts +2 -2
- package/dist-sdk/fs/entity.js +1 -1
- package/dist-sdk/pull/missing-report.d.ts +81 -0
- package/dist-sdk/pull/missing-report.js +52 -0
- package/dist-sdk/src/catalog/factories.d.ts +53 -19
- package/dist-sdk/src/catalog/factories.js +51 -12
- package/dist-sdk/src/catalog/from-authoring.js +13 -3
- package/dist-sdk/src/catalog/index.d.ts +2 -2
- package/dist-sdk/src/catalog/index.js +1 -1
- package/dist-sdk/src/catalog/org.js +1 -0
- package/dist-sdk/src/catalog/render.js +6 -0
- package/dist-sdk/src/catalog/token.js +7 -0
- package/dist-sdk/src/catalog/types.d.ts +34 -23
- package/dist-sdk/src/catalog/types.js +7 -4
- package/dist-sdk/src/core/app-to-ui.d.ts +6 -6
- package/dist-sdk/src/core/app-to-ui.js +7 -9
- package/dist-sdk/src/core/index.d.ts +1 -0
- package/dist-sdk/src/core/index.js +1 -0
- package/dist-sdk/src/core/platform-id.d.ts +11 -0
- package/dist-sdk/src/core/platform-id.js +8 -0
- package/dist-sdk/src/{entities/flow/activities/render-catalog.d.ts → core/render-tree.d.ts} +2 -2
- package/dist-sdk/src/{entities/flow/activities/render-catalog.js → core/render-tree.js} +6 -8
- package/dist-sdk/src/core/types/app.d.ts +13 -23
- package/dist-sdk/src/core/types/app.js +0 -1
- package/dist-sdk/src/engine/build/context.d.ts +3 -3
- package/dist-sdk/src/engine/pull/attrs.d.ts +4 -0
- package/dist-sdk/src/engine/pull/attrs.js +17 -0
- package/dist-sdk/src/engine/pull/context.d.ts +39 -0
- package/dist-sdk/src/engine/pull/org.d.ts +1 -0
- package/dist-sdk/src/engine/pull/org.js +2 -0
- package/dist-sdk/src/engine/tf/expr.d.ts +1 -1
- package/dist-sdk/src/engine/tf/expr.js +10 -3
- package/dist-sdk/src/engine/workspace/authoring-layout.js +4 -2
- package/dist-sdk/src/entities/access-policy/build.d.ts +4 -13
- package/dist-sdk/src/entities/access-policy/build.js +1 -1
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +12 -38
- package/dist-sdk/src/entities/access-policy/from-tf.js +16 -74
- package/dist-sdk/src/entities/access-policy/principal.d.ts +29 -0
- package/dist-sdk/src/entities/access-policy/principal.js +13 -0
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +20 -5
- package/dist-sdk/src/entities/access-policy/to-tf.js +26 -54
- package/dist-sdk/src/entities/agent/build.d.ts +39 -8
- package/dist-sdk/src/entities/agent/build.js +36 -15
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +5 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +121 -36
- package/dist-sdk/src/entities/agent/from-tf.js +5 -8
- package/dist-sdk/src/entities/agent/index.d.ts +5 -2
- package/dist-sdk/src/entities/agent/index.js +4 -2
- package/dist-sdk/src/entities/agent/module.js +5 -2
- package/dist-sdk/src/entities/agent/run-as.d.ts +16 -0
- package/dist-sdk/src/entities/agent/run-as.js +1 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +2 -1
- package/dist-sdk/src/entities/agent/to-tf.js +2 -1
- package/dist-sdk/src/entities/agent/tools.d.ts +60 -48
- package/dist-sdk/src/entities/agent/tools.js +44 -38
- package/dist-sdk/src/entities/agent-a2a-skill/from-tf.js +1 -1
- package/dist-sdk/src/entities/agent-a2a-skill/to-tf.js +4 -4
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +17 -8
- package/dist-sdk/src/entities/agent-tool/from-tf.js +127 -37
- package/dist-sdk/src/entities/agent-tool/module.js +6 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +5 -5
- package/dist-sdk/src/entities/agent-tool/to-tf.js +93 -20
- package/dist-sdk/src/entities/agent-tool/types.d.ts +4 -5
- package/dist-sdk/src/entities/agent-tool/types.js +36 -8
- package/dist-sdk/src/entities/app/build.d.ts +137 -25
- package/dist-sdk/src/entities/app/build.js +104 -53
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +173 -1
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.d.ts +59 -0
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.js +68 -0
- package/dist-sdk/src/entities/app/display-blocks.d.ts +2 -1
- package/dist-sdk/src/entities/app/display-blocks.js +1 -1
- package/dist-sdk/src/entities/app/from-tf.d.ts +11 -1
- package/dist-sdk/src/entities/app/from-tf.js +30 -2
- package/dist-sdk/src/entities/app/index.d.ts +13 -4
- package/dist-sdk/src/entities/app/index.js +8 -1
- package/dist-sdk/src/entities/app/module.js +27 -2
- package/dist-sdk/src/entities/app/to-tf.js +75 -1
- package/dist-sdk/src/entities/approval-chain/build.d.ts +31 -16
- package/dist-sdk/src/entities/approval-chain/build.js +49 -49
- package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +17 -0
- package/dist-sdk/src/entities/approval-chain/from-tf.js +57 -0
- package/dist-sdk/src/entities/approval-chain/index.d.ts +2 -3
- package/dist-sdk/src/entities/approval-chain/index.js +2 -3
- package/dist-sdk/src/entities/approval-chain/module.d.ts +3 -0
- package/dist-sdk/src/entities/approval-chain/module.js +51 -0
- package/dist-sdk/src/entities/approval-chain/printer.d.ts +2 -0
- package/dist-sdk/src/entities/approval-chain/printer.js +21 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.d.ts +9 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.js +43 -0
- package/dist-sdk/src/entities/automation/build.d.ts +10 -6
- package/dist-sdk/src/entities/automation/build.js +5 -4
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +10 -8
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +51 -114
- package/dist-sdk/src/entities/automation/filter.d.ts +1 -115
- package/dist-sdk/src/entities/automation/filter.js +1 -197
- package/dist-sdk/src/entities/automation/from-tf.d.ts +4 -0
- package/dist-sdk/src/entities/automation/from-tf.js +202 -119
- package/dist-sdk/src/entities/automation/index.d.ts +4 -2
- package/dist-sdk/src/entities/automation/index.js +3 -1
- package/dist-sdk/src/entities/automation/module.js +10 -4
- package/dist-sdk/src/entities/automation/script-code.js +94 -6
- package/dist-sdk/src/entities/automation/tasks.d.ts +20 -19
- package/dist-sdk/src/entities/automation/tasks.js +2 -2
- package/dist-sdk/src/entities/automation/to-tf.d.ts +34 -2
- package/dist-sdk/src/entities/automation/to-tf.js +273 -98
- package/dist-sdk/src/entities/automation/triggers.d.ts +18 -17
- package/dist-sdk/src/entities/automation/triggers.js +1 -1
- package/dist-sdk/src/entities/dashboard/build.d.ts +17 -0
- package/dist-sdk/src/entities/dashboard/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/dashboard/from-tf.js +95 -0
- package/dist-sdk/src/entities/dashboard/module.d.ts +3 -0
- package/dist-sdk/src/entities/dashboard/module.js +16 -0
- package/dist-sdk/src/entities/dashboard/to-tf.d.ts +30 -0
- package/dist-sdk/src/entities/dashboard/to-tf.js +94 -0
- package/dist-sdk/src/entities/dashboard-widget/module.d.ts +3 -0
- package/dist-sdk/src/entities/dashboard-widget/module.js +10 -0
- package/dist-sdk/src/entities/data-lookup/module.d.ts +3 -0
- package/dist-sdk/src/entities/data-lookup/module.js +22 -0
- package/dist-sdk/src/entities/datamine/build.d.ts +22 -0
- package/dist-sdk/src/entities/datamine/build.js +1 -0
- package/dist-sdk/src/entities/datamine/from-tf.d.ts +17 -0
- package/dist-sdk/src/entities/datamine/from-tf.js +98 -0
- package/dist-sdk/src/entities/datamine/module.d.ts +3 -0
- package/dist-sdk/src/entities/datamine/module.js +23 -0
- package/dist-sdk/src/entities/datamine/to-tf.d.ts +11 -0
- package/dist-sdk/src/entities/datamine/to-tf.js +53 -0
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +303 -0
- package/dist-sdk/src/entities/dynamic-layout/build.js +4 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +2 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.js +9 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +10 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +233 -0
- package/dist-sdk/src/entities/dynamic-layout/module.d.ts +3 -0
- package/dist-sdk/src/entities/dynamic-layout/module.js +13 -0
- package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +26 -0
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +267 -0
- package/dist-sdk/src/entities/element/build.d.ts +31 -14
- package/dist-sdk/src/entities/element/build.js +12 -4
- package/dist-sdk/src/entities/element/from-tf.d.ts +9 -1
- package/dist-sdk/src/entities/element/from-tf.js +31 -2
- package/dist-sdk/src/entities/element/index.d.ts +8 -3
- package/dist-sdk/src/entities/element/index.js +4 -1
- package/dist-sdk/src/entities/element/module.js +19 -2
- package/dist-sdk/src/entities/element/to-tf.js +57 -1
- package/dist-sdk/src/entities/field/build.d.ts +4 -3
- package/dist-sdk/src/entities/field/calculation-types.d.ts +6 -0
- package/dist-sdk/src/entities/field/calculation-types.js +42 -0
- package/dist-sdk/src/entities/field/from-tf.js +90 -11
- package/dist-sdk/src/entities/field/module.d.ts +1 -0
- package/dist-sdk/src/entities/field/module.js +5 -2
- package/dist-sdk/src/entities/field/record-shape.d.ts +1 -1
- package/dist-sdk/src/entities/field/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/field/to-tf.js +22 -6
- package/dist-sdk/src/entities/field/types.js +3 -0
- package/dist-sdk/src/entities/file-reader/build.d.ts +66 -19
- package/dist-sdk/src/entities/file-reader/build.js +49 -4
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +1 -0
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +11 -9
- package/dist-sdk/src/entities/file-reader/from-tf.d.ts +1 -1
- package/dist-sdk/src/entities/file-reader/from-tf.js +31 -2
- package/dist-sdk/src/entities/file-reader/index.d.ts +3 -3
- package/dist-sdk/src/entities/file-reader/index.js +3 -3
- package/dist-sdk/src/entities/file-reader/module.js +6 -5
- package/dist-sdk/src/entities/file-reader/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/file-reader/to-tf.js +5 -2
- package/dist-sdk/src/entities/file-reader/types.d.ts +3 -4
- package/dist-sdk/src/entities/file-reader/types.js +4 -5
- package/dist-sdk/src/entities/org/category.js +4 -5
- package/dist-sdk/src/entities/org/group.js +4 -5
- package/dist-sdk/src/entities/org/index.d.ts +1 -0
- package/dist-sdk/src/entities/org/index.js +1 -0
- package/dist-sdk/src/entities/org/phone-provider.d.ts +4 -0
- package/dist-sdk/src/entities/org/phone-provider.js +33 -0
- package/dist-sdk/src/entities/org/role.d.ts +3 -3
- package/dist-sdk/src/entities/org/role.js +9 -6
- package/dist-sdk/src/entities/organization/build.d.ts +29 -0
- package/dist-sdk/src/entities/organization/build.js +24 -0
- package/dist-sdk/src/entities/organization/index.d.ts +2 -0
- package/dist-sdk/src/entities/organization/index.js +2 -0
- package/dist-sdk/src/entities/organization/module.d.ts +2 -0
- package/dist-sdk/src/entities/organization/module.js +18 -0
- package/dist-sdk/src/entities/organization/to-tf.d.ts +6 -0
- package/dist-sdk/src/entities/organization/to-tf.js +37 -0
- package/dist-sdk/src/entities/phone-service/build.d.ts +17 -0
- package/dist-sdk/src/entities/phone-service/build.js +31 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.d.ts +4 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +54 -0
- package/dist-sdk/src/entities/phone-service/from-tf.d.ts +25 -0
- package/dist-sdk/src/entities/phone-service/from-tf.js +75 -0
- package/dist-sdk/src/entities/phone-service/index.d.ts +2 -0
- package/dist-sdk/src/entities/phone-service/index.js +2 -0
- package/dist-sdk/src/entities/phone-service/module.d.ts +3 -0
- package/dist-sdk/src/entities/phone-service/module.js +55 -0
- package/dist-sdk/src/entities/phone-service/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/phone-service/to-tf.js +54 -0
- package/dist-sdk/src/entities/phone-service/types.d.ts +35 -0
- package/dist-sdk/src/entities/phone-service/types.js +22 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.d.ts +11 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.js +74 -0
- package/dist-sdk/src/entities/record-create-form/module.d.ts +11 -0
- package/dist-sdk/src/entities/record-create-form/module.js +24 -0
- package/dist-sdk/src/entities/record-create-form/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/record-create-form/to-tf.js +80 -0
- package/dist-sdk/src/entities/relationship/build.d.ts +16 -0
- package/dist-sdk/src/entities/relationship/build.js +1 -0
- package/dist-sdk/src/entities/relationship/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/relationship/from-tf.js +109 -0
- package/dist-sdk/src/entities/relationship/module.d.ts +3 -0
- package/dist-sdk/src/entities/relationship/module.js +16 -0
- package/dist-sdk/src/entities/relationship/to-tf.d.ts +31 -0
- package/dist-sdk/src/entities/relationship/to-tf.js +153 -0
- package/dist-sdk/src/entities/role/build.d.ts +65 -0
- package/dist-sdk/src/entities/role/build.js +33 -0
- package/dist-sdk/src/entities/role/from-tf.d.ts +13 -0
- package/dist-sdk/src/entities/role/from-tf.js +138 -0
- package/dist-sdk/src/entities/role/to-tf.d.ts +13 -0
- package/dist-sdk/src/entities/role/to-tf.js +69 -0
- package/dist-sdk/src/entities/search-table/build.d.ts +67 -28
- package/dist-sdk/src/entities/search-table/build.js +110 -56
- package/dist-sdk/src/entities/search-table/from-tf.d.ts +37 -0
- package/dist-sdk/src/entities/search-table/from-tf.js +113 -0
- package/dist-sdk/src/entities/search-table/index.d.ts +2 -2
- package/dist-sdk/src/entities/search-table/index.js +2 -2
- package/dist-sdk/src/entities/search-table/module.js +88 -10
- package/dist-sdk/src/entities/search-table/printer.d.ts +2 -0
- package/dist-sdk/src/entities/search-table/printer.js +52 -0
- package/dist-sdk/src/entities/search-table/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/search-table/to-tf.js +104 -0
- package/dist-sdk/src/entities/search-table/types.d.ts +8 -0
- package/dist-sdk/src/entities/search-table/types.js +21 -0
- package/dist-sdk/src/entities/service-account/build.d.ts +32 -0
- package/dist-sdk/src/entities/service-account/build.js +9 -0
- package/dist-sdk/src/entities/service-account/from-tf.d.ts +10 -0
- package/dist-sdk/src/entities/service-account/from-tf.js +109 -0
- package/dist-sdk/src/entities/service-account/module.d.ts +4 -0
- package/dist-sdk/src/entities/service-account/module.js +21 -0
- package/dist-sdk/src/entities/service-account/ref.d.ts +11 -0
- package/dist-sdk/src/entities/service-account/ref.js +5 -0
- package/dist-sdk/src/entities/service-account/to-tf.d.ts +11 -0
- package/dist-sdk/src/entities/service-account/to-tf.js +72 -0
- package/dist-sdk/src/entities/shared/connector-from-tf.d.ts +14 -0
- package/dist-sdk/src/entities/shared/connector-from-tf.js +14 -0
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +21 -79
- package/dist-sdk/src/entities/shared/filters/ast.js +5 -2
- package/dist-sdk/src/entities/shared/filters/index.d.ts +94 -206
- package/dist-sdk/src/entities/shared/filters/index.js +189 -341
- package/dist-sdk/src/entities/shared/filters/print.d.ts +11 -0
- package/dist-sdk/src/entities/shared/filters/print.js +122 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +170 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +527 -0
- package/dist-sdk/src/entities/shared/filters/types.d.ts +66 -69
- package/dist-sdk/src/entities/shared/filters/types.js +2 -3
- package/dist-sdk/src/entities/skill/build.d.ts +2 -2
- package/dist-sdk/src/entities/skill/build.js +4 -3
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +10 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +74 -32
- package/dist-sdk/src/entities/skill/index.d.ts +2 -1
- package/dist-sdk/src/entities/skill/index.js +2 -1
- package/dist-sdk/src/entities/skill/module.js +6 -0
- package/dist-sdk/src/entities/skill/to-tf.d.ts +5 -1
- package/dist-sdk/src/entities/skill/to-tf.js +18 -0
- package/dist-sdk/src/entities/skill/tools.d.ts +46 -31
- package/dist-sdk/src/entities/skill/tools.js +33 -20
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +4 -1
- package/dist-sdk/src/entities/skill-tool/from-tf.js +76 -8
- package/dist-sdk/src/entities/skill-tool/module.js +9 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +6 -1
- package/dist-sdk/src/entities/skill-tool/to-tf.js +94 -42
- package/dist-sdk/src/entities/skill-tool/types.js +18 -1
- package/dist-sdk/src/entities/table/build.d.ts +64 -23
- package/dist-sdk/src/entities/table/build.js +33 -18
- package/dist-sdk/src/entities/table/catalog-render.js +6 -0
- package/dist-sdk/src/entities/table/deserializer/normalize.d.ts +99 -0
- package/dist-sdk/src/entities/table/deserializer/normalize.js +192 -0
- package/dist-sdk/src/entities/table/fields/types.d.ts +86 -0
- package/dist-sdk/src/entities/table/fields/types.js +12 -0
- package/dist-sdk/src/entities/table/fields.d.ts +107 -47
- package/dist-sdk/src/entities/table/fields.js +76 -55
- package/dist-sdk/src/entities/table/from-tf.d.ts +4 -0
- package/dist-sdk/src/entities/table/from-tf.js +261 -0
- package/dist-sdk/src/entities/table/index.d.ts +7 -5
- package/dist-sdk/src/entities/table/index.js +7 -7
- package/dist-sdk/src/entities/table/joins.d.ts +22 -9
- package/dist-sdk/src/entities/table/joins.js +8 -16
- package/dist-sdk/src/entities/table/module.d.ts +2 -1
- package/dist-sdk/src/entities/table/module.js +13 -6
- package/dist-sdk/src/entities/table/to-tf.d.ts +10 -0
- package/dist-sdk/src/entities/table/to-tf.js +230 -0
- package/dist-sdk/src/entities/task/build.d.ts +43 -0
- package/dist-sdk/src/entities/task/build.js +17 -0
- package/dist-sdk/src/entities/task/from-tf.d.ts +28 -0
- package/dist-sdk/src/entities/task/from-tf.js +38 -0
- package/dist-sdk/src/entities/task/index.d.ts +1 -0
- package/dist-sdk/src/entities/task/index.js +1 -0
- package/dist-sdk/src/entities/task/module.d.ts +3 -0
- package/dist-sdk/src/entities/task/module.js +12 -0
- package/dist-sdk/src/entities/task/to-tf.d.ts +9 -0
- package/dist-sdk/src/entities/task/to-tf.js +49 -0
- package/dist-sdk/src/entities/view/from-tf.d.ts +7 -2
- package/dist-sdk/src/entities/view/from-tf.js +209 -25
- package/dist-sdk/src/entities/view/module.js +5 -1
- package/dist-sdk/src/entities/view/to-tf.d.ts +49 -7
- package/dist-sdk/src/entities/view/to-tf.js +155 -18
- package/dist-sdk/src/entities/view/types.d.ts +8 -0
- package/dist-sdk/src/entities/view/types.js +43 -0
- package/dist-sdk/src/entities/visual-flow/build.d.ts +87 -0
- package/dist-sdk/src/entities/visual-flow/build.js +72 -0
- package/dist-sdk/src/entities/visual-flow/from-tf.d.ts +49 -0
- package/dist-sdk/src/entities/visual-flow/from-tf.js +124 -0
- package/dist-sdk/src/entities/visual-flow/index.d.ts +1 -0
- package/dist-sdk/src/entities/visual-flow/index.js +1 -0
- package/dist-sdk/src/entities/visual-flow/module.d.ts +3 -0
- package/dist-sdk/src/entities/visual-flow/module.js +41 -0
- package/dist-sdk/src/entities/visual-flow/printer.d.ts +8 -0
- package/dist-sdk/src/entities/visual-flow/printer.js +92 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.js +101 -0
- package/dist-sdk/src/entities/widget/build.d.ts +55 -0
- package/dist-sdk/src/entities/widget/build.js +1 -0
- package/dist-sdk/src/entities/widget/from-tf.d.ts +11 -0
- package/dist-sdk/src/entities/widget/from-tf.js +209 -0
- package/dist-sdk/src/entities/widget/module.d.ts +3 -0
- package/dist-sdk/src/entities/widget/module.js +16 -0
- package/dist-sdk/src/entities/widget/to-tf.d.ts +44 -0
- package/dist-sdk/src/entities/widget/to-tf.js +204 -0
- package/dist-sdk/src/graph/deferred-catalog-render.d.ts +1 -1
- package/dist-sdk/src/graph/deferred-catalog-render.js +1 -1
- package/dist-sdk/src/graph/index.d.ts +7 -0
- package/dist-sdk/src/graph/index.js +4 -18
- package/dist-sdk/src/graph/modules.js +30 -1
- package/dist-sdk/src/graph/types.d.ts +55 -7
- package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
- package/dist-sdk/src/internal/sdk-package.js +4 -2
- package/package.json +30 -15
- package/dist-sdk/src/entities/access-policy/filter.d.ts +0 -61
- package/dist-sdk/src/entities/access-policy/filter.js +0 -83
- package/dist-sdk/src/entities/approval-chain/steps.d.ts +0 -24
- package/dist-sdk/src/entities/approval-chain/steps.js +0 -20
- package/dist-sdk/src/entities/flow/activities/agent.d.ts +0 -15
- package/dist-sdk/src/entities/flow/activities/agent.js +0 -29
- package/dist-sdk/src/entities/flow/activities/approval.d.ts +0 -9
- package/dist-sdk/src/entities/flow/activities/approval.js +0 -18
- package/dist-sdk/src/entities/flow/activities/automation.d.ts +0 -12
- package/dist-sdk/src/entities/flow/activities/automation.js +0 -22
- package/dist-sdk/src/entities/flow/activities/ctx.d.ts +0 -34
- package/dist-sdk/src/entities/flow/activities/ctx.js +0 -38
- package/dist-sdk/src/entities/flow/activities/form.d.ts +0 -22
- package/dist-sdk/src/entities/flow/activities/form.js +0 -36
- package/dist-sdk/src/entities/flow/activities/index.d.ts +0 -14
- package/dist-sdk/src/entities/flow/activities/index.js +0 -13
- package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +0 -39
- package/dist-sdk/src/entities/flow/activities/input-refs.js +0 -19
- package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +0 -13
- package/dist-sdk/src/entities/flow/activities/prompt-template.js +0 -34
- package/dist-sdk/src/entities/flow/activities/types.d.ts +0 -33
- package/dist-sdk/src/entities/flow/build.d.ts +0 -38
- package/dist-sdk/src/entities/flow/build.js +0 -115
- package/dist-sdk/src/entities/flow/index.d.ts +0 -8
- package/dist-sdk/src/entities/flow/index.js +0 -7
- package/dist-sdk/src/entities/flow/serialize.d.ts +0 -51
- package/dist-sdk/src/entities/flow/serialize.js +0 -94
- package/dist-sdk/src/entities/flow/util.d.ts +0 -27
- package/dist-sdk/src/entities/flow/util.js +0 -38
- package/dist-sdk/src/entities/table/filter.d.ts +0 -41
- package/dist-sdk/src/entities/table/filter.js +0 -89
- /package/dist-sdk/src/entities/{flow/activities/types.js → dashboard/build.js} +0 -0
|
@@ -1,13 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
/** Typed constructors for JSON/XML structure nodes. Avoids authoring wire discriminant strings. */
|
|
2
|
+
export const fileReaderStructure = {
|
|
3
|
+
text: (name) => ({ type: "text", name }),
|
|
4
|
+
number: (name) => ({ type: "number", name }),
|
|
5
|
+
decimal: (name) => ({ type: "decimal", name }),
|
|
6
|
+
boolean: (name) => ({ type: "boolean", name }),
|
|
7
|
+
date: (name, format) => ({ type: "date", name, format }),
|
|
8
|
+
datetime: (name, format) => ({ type: "datetime", name, format }),
|
|
9
|
+
object: (name, properties) => ({ type: "object", name, properties }),
|
|
10
|
+
array: (name, itemType) => ({ type: "array", name, itemType }),
|
|
11
|
+
};
|
|
12
|
+
export const fileReaderFieldType = {
|
|
13
|
+
text: "TEXT",
|
|
14
|
+
number: "NUMBER",
|
|
15
|
+
decimal: "DECIMAL",
|
|
16
|
+
boolean: "BOOLEAN",
|
|
17
|
+
date: "DATE",
|
|
18
|
+
datetime: "DATETIME",
|
|
19
|
+
picklist: "PICKLIST",
|
|
20
|
+
userId: "USER_ID",
|
|
21
|
+
groupId: "GROUP_ID",
|
|
22
|
+
html: "HTML",
|
|
23
|
+
localizationKey: "LOCALIZATION_KEY",
|
|
24
|
+
uuid: "UUID",
|
|
25
|
+
};
|
|
26
|
+
function configureFileReader(opts) {
|
|
2
27
|
return {
|
|
3
28
|
ref(refName) {
|
|
4
|
-
return { __kind: "documentModel", refName, name: opts.name, parent: opts.
|
|
29
|
+
return { __kind: "documentModel", refName, name: opts.name, parent: opts.owner.refName, readerType: opts.type };
|
|
5
30
|
},
|
|
6
31
|
def(refName) {
|
|
7
|
-
const {
|
|
32
|
+
const { owner, enabled, ...payload } = opts;
|
|
8
33
|
return {
|
|
9
34
|
kind: "documentModel",
|
|
10
|
-
parent,
|
|
35
|
+
parent: owner.refName,
|
|
11
36
|
refName,
|
|
12
37
|
payload,
|
|
13
38
|
...(enabled !== undefined ? { enabled } : {}),
|
|
@@ -15,6 +40,26 @@ export function defineFileReader(opts) {
|
|
|
15
40
|
},
|
|
16
41
|
};
|
|
17
42
|
}
|
|
43
|
+
/** Extract structured values with an AI model. */
|
|
44
|
+
export function aiFileReader(opts) {
|
|
45
|
+
return configureFileReader({ ...opts, type: "ai" });
|
|
46
|
+
}
|
|
47
|
+
/** Extract fixed cell locations from a spreadsheet. */
|
|
48
|
+
export function excelFileReader(opts) {
|
|
49
|
+
return configureFileReader({ ...opts, type: "excel" });
|
|
50
|
+
}
|
|
51
|
+
/** Extract a typed JSON structure. */
|
|
52
|
+
export function jsonFileReader(opts) {
|
|
53
|
+
return configureFileReader({ ...opts, type: "json" });
|
|
54
|
+
}
|
|
55
|
+
/** Read freeform text. */
|
|
56
|
+
export function textFileReader(opts) {
|
|
57
|
+
return configureFileReader({ ...opts, type: "text" });
|
|
58
|
+
}
|
|
59
|
+
/** Extract a typed XML structure. */
|
|
60
|
+
export function xmlFileReader(opts) {
|
|
61
|
+
return configureFileReader({ ...opts, type: "xml" });
|
|
62
|
+
}
|
|
18
63
|
function serializeJsonStructureField(f) {
|
|
19
64
|
switch (f.type) {
|
|
20
65
|
case "text":
|
|
@@ -2,5 +2,6 @@ import type { NormalizedFileReader } from "../from-tf.js";
|
|
|
2
2
|
export interface PrintFileReaderOptions {
|
|
3
3
|
/** The owning app's refName — the file's `parent` option. */
|
|
4
4
|
readonly parent: string;
|
|
5
|
+
readonly parentScope: "app" | "element";
|
|
5
6
|
}
|
|
6
7
|
export declare function printFileReader(model: NormalizedFileReader, opts: PrintFileReaderOptions): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `NormalizedFileReader` → editable
|
|
2
|
+
* `NormalizedFileReader` → an editable variant-specific file-reader factory,
|
|
3
3
|
* configured `{ ref, def }` builder call exported as default — same
|
|
4
4
|
* convention as the other configured-builder printers (`print-skill-v2.ts`,
|
|
5
5
|
* `print-agent.ts`). File readers carry no catalog-token references of their
|
|
@@ -8,18 +8,19 @@
|
|
|
8
8
|
import { sdkPackageSpecifier } from "../../../internal/sdk-package.js";
|
|
9
9
|
export function printFileReader(model, opts) {
|
|
10
10
|
const { payload } = model;
|
|
11
|
+
const factory = `${payload.type}FileReader`;
|
|
11
12
|
const lines = [];
|
|
12
13
|
lines.push(`/**`);
|
|
13
14
|
lines.push(` * Auto-generated by EDK (pull). Hand-edit freely; the generator is a`);
|
|
14
15
|
lines.push(` * one-shot starting point, not a live-binding view.`);
|
|
15
16
|
lines.push(` */`);
|
|
16
17
|
lines.push("");
|
|
17
|
-
lines.push(`import {
|
|
18
|
+
lines.push(`import { ${factory}${payload.type === "json" || payload.type === "xml" ? ", fileReaderStructure" : ""} } from "${sdkPackageSpecifier("fileReaders")}";`);
|
|
19
|
+
lines.push(`import catalog from "@catalog";`);
|
|
18
20
|
lines.push("");
|
|
19
|
-
lines.push(`const fileReader =
|
|
20
|
-
lines.push(` type: ${quote(payload.type)},`);
|
|
21
|
+
lines.push(`const fileReader = ${factory}({`);
|
|
21
22
|
lines.push(` name: ${quote(payload.name)},`);
|
|
22
|
-
lines.push(`
|
|
23
|
+
lines.push(` owner: catalog.${opts.parent},`);
|
|
23
24
|
const body = printBody(payload);
|
|
24
25
|
if (body.length > 0)
|
|
25
26
|
lines.push(body);
|
|
@@ -46,6 +47,7 @@ function printBody(payload) {
|
|
|
46
47
|
...(payload.fileType !== undefined ? [` fileType: ${quote(payload.fileType)},`] : []),
|
|
47
48
|
].join("\n");
|
|
48
49
|
case "json":
|
|
50
|
+
case "xml":
|
|
49
51
|
return ` structure: ${printStructure(payload.structure, 1)},`;
|
|
50
52
|
case "text":
|
|
51
53
|
return "";
|
|
@@ -94,14 +96,14 @@ function printStructureField(f, indent) {
|
|
|
94
96
|
case "number":
|
|
95
97
|
case "decimal":
|
|
96
98
|
case "boolean":
|
|
97
|
-
return `{
|
|
99
|
+
return `fileReaderStructure.${f.type}(${quote(f.name)})`;
|
|
98
100
|
case "date":
|
|
99
101
|
case "datetime":
|
|
100
|
-
return `{
|
|
102
|
+
return `fileReaderStructure.${f.type}(${quote(f.name)}, ${quote(f.format)})`;
|
|
101
103
|
case "object":
|
|
102
|
-
return `
|
|
104
|
+
return `fileReaderStructure.object(${quote(f.name)}, ${printStructure(f.properties, indent)})`;
|
|
103
105
|
case "array":
|
|
104
|
-
return `
|
|
106
|
+
return `fileReaderStructure.array(${quote(f.name)}, ${printStructureField(f.itemType, indent)})`;
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
function quote(s) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FromTfContext } from "../../engine/pull/context.js";
|
|
2
2
|
import { type TfBlock } from "../../engine/tf/index.js";
|
|
3
|
-
import type
|
|
3
|
+
import { type FileReaderPayload } from "./build.js";
|
|
4
4
|
export interface NormalizedFileReader {
|
|
5
5
|
readonly refName: string;
|
|
6
6
|
readonly payload: FileReaderPayload;
|
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
import { EntityTfError } from "../../engine/entity.js";
|
|
8
8
|
import { isTfExpr, scopedLabelToBagKey } from "../../engine/tf/index.js";
|
|
9
9
|
import { FILE_READER_SUB_TYPE_BY_RESOURCE } from "./types.js";
|
|
10
|
+
import { fileReaderFieldType, } from "./build.js";
|
|
11
|
+
const FILE_READER_FIELD_TYPES = new Set(Object.values(fileReaderFieldType));
|
|
12
|
+
function parseFieldType(value, where) {
|
|
13
|
+
if (!FILE_READER_FIELD_TYPES.has(value))
|
|
14
|
+
throw new EntityTfError(`${where}: unsupported field type ${JSON.stringify(value)}`);
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
10
17
|
function isObject(value) {
|
|
11
18
|
return value !== null && typeof value === "object" && !Array.isArray(value) && !("$expr" in value);
|
|
12
19
|
}
|
|
@@ -16,6 +23,7 @@ const KNOWN_EXCEL_ATTRS = new Set([
|
|
|
16
23
|
const KNOWN_JSON_ATTRS = new Set(["app_id", "name", "structure"]);
|
|
17
24
|
const KNOWN_TEXT_ATTRS = new Set(["app_id", "name"]);
|
|
18
25
|
const KNOWN_AI_ATTRS = new Set(["app_id", "name", "instructions", "fields"]);
|
|
26
|
+
const KNOWN_XML_ATTRS = new Set(["app_id", "name", "values"]);
|
|
19
27
|
function assertAllowed(block, allowed) {
|
|
20
28
|
for (const key of Object.keys(block.attrs)) {
|
|
21
29
|
if (!allowed.has(key)) {
|
|
@@ -35,6 +43,17 @@ function decodeJson(value) {
|
|
|
35
43
|
return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, decodeJson(v)]));
|
|
36
44
|
return value;
|
|
37
45
|
}
|
|
46
|
+
function decodeJsonString(value, where) {
|
|
47
|
+
const decoded = decodeJson(value);
|
|
48
|
+
if (typeof decoded !== "string")
|
|
49
|
+
return decoded;
|
|
50
|
+
try {
|
|
51
|
+
return JSON.parse(decoded);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
throw new EntityTfError(`${where}: expected valid JSON`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
38
57
|
function parseStructureField(node, where) {
|
|
39
58
|
if (!isObject(node))
|
|
40
59
|
throw new EntityTfError(`${where}: invalid structure node`);
|
|
@@ -87,7 +106,7 @@ function parseExcelFields(value, where) {
|
|
|
87
106
|
}
|
|
88
107
|
return {
|
|
89
108
|
name: item.name,
|
|
90
|
-
type: item.type,
|
|
109
|
+
type: parseFieldType(item.type, `${where}.${item.name}`),
|
|
91
110
|
location: { column: location.column, row: location.row, sheet: location.sheet },
|
|
92
111
|
...(typeof item.include === "boolean" ? { include: item.include } : {}),
|
|
93
112
|
...(typeof item.required === "boolean" ? { required: item.required } : {}),
|
|
@@ -104,7 +123,7 @@ function parseAiFields(value, where) {
|
|
|
104
123
|
return {
|
|
105
124
|
name: item.name,
|
|
106
125
|
description: item.description,
|
|
107
|
-
type: item.type,
|
|
126
|
+
type: parseFieldType(item.type, `${where}.${item.name}`),
|
|
108
127
|
...(typeof item.required === "boolean" ? { required: item.required } : {}),
|
|
109
128
|
};
|
|
110
129
|
});
|
|
@@ -159,6 +178,16 @@ export function fileReaderFromTf(block, appTfLabel, _ctx) {
|
|
|
159
178
|
const structure = parseStructure(decodeJson(attrs.structure), where);
|
|
160
179
|
return { fileReader: { refName, payload: { type: "json", name, structure } } };
|
|
161
180
|
}
|
|
181
|
+
if (subType.typeKey === "xml") {
|
|
182
|
+
assertAllowed(block, KNOWN_XML_ATTRS);
|
|
183
|
+
if (attrs.values === undefined)
|
|
184
|
+
throw new EntityTfError(`${where}: "values" is required`);
|
|
185
|
+
const decoded = decodeJsonString(attrs.values, `${where}.values`);
|
|
186
|
+
// Accept older bridge exports that emitted the root `properties` array
|
|
187
|
+
// directly. Current exports preserve the provider's wrapped structure.
|
|
188
|
+
const structure = parseStructure(Array.isArray(decoded) ? { properties: decoded } : decoded, where);
|
|
189
|
+
return { fileReader: { refName, payload: { type: "xml", name, structure } } };
|
|
190
|
+
}
|
|
162
191
|
if (subType.typeKey === "ai") {
|
|
163
192
|
assertAllowed(block, KNOWN_AI_ATTRS);
|
|
164
193
|
if (typeof attrs.instructions !== "string")
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* File-reader authoring — create/edit Excel, JSON, and
|
|
3
|
-
* readers, referenced by
|
|
2
|
+
* File-reader authoring — create/edit AI, Excel, JSON, text, and XML file
|
|
3
|
+
* readers, referenced by automation file-reading tasks.
|
|
4
4
|
*
|
|
5
5
|
* The `Legacy*`/`@deprecated` exports below are the pre-terraform,
|
|
6
6
|
* GraphQL-mutation-based API this file replaced — kept for published
|
|
7
7
|
* `@elementumai/edk/fileReaders` API back-compat only, not used by
|
|
8
8
|
* `elementum build`/`pull`. See `build.ts`'s "Legacy" section doc comment.
|
|
9
9
|
*/
|
|
10
|
-
export {
|
|
10
|
+
export { aiFileReader, excelFileReader, jsonFileReader, textFileReader, xmlFileReader, fileReaderStructure, type AiFileReaderOptions, type ExcelFileReaderOptions, type JsonFileReaderOptions, type TextFileReaderOptions, type XmlFileReaderOptions, type AiFileReaderField, type ExcelCellLocation, type FileReaderConfigured, type FileReaderExcelField, fileReaderFieldType, type FileReaderFieldType, type JsonStructureField, } from "./build.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* File-reader authoring — create/edit Excel, JSON, and
|
|
3
|
-
* readers, referenced by
|
|
2
|
+
* File-reader authoring — create/edit AI, Excel, JSON, text, and XML file
|
|
3
|
+
* readers, referenced by automation file-reading tasks.
|
|
4
4
|
*
|
|
5
5
|
* The `Legacy*`/`@deprecated` exports below are the pre-terraform,
|
|
6
6
|
* GraphQL-mutation-based API this file replaced — kept for published
|
|
7
7
|
* `@elementumai/edk/fileReaders` API back-compat only, not used by
|
|
8
8
|
* `elementum build`/`pull`. See `build.ts`'s "Legacy" section doc comment.
|
|
9
9
|
*/
|
|
10
|
-
export {
|
|
10
|
+
export { aiFileReader, excelFileReader, jsonFileReader, textFileReader, xmlFileReader, fileReaderStructure, fileReaderFieldType, } from "./build.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** The file-reader entity's registry entry (see src/graph/). */
|
|
2
2
|
import { safeCatalogKey } from "../../catalog/render-helpers.js";
|
|
3
3
|
import { NO_CANVAS, } from "../../graph/types.js";
|
|
4
|
-
import { NO_DATA } from "../../graph/types.js";
|
|
5
4
|
import { printFileReader } from "./deserializer/print-file-reader.js";
|
|
6
5
|
import { fileReaderFromTf } from "./from-tf.js";
|
|
7
6
|
import { fileReaderToTf } from "./to-tf.js";
|
|
@@ -19,7 +18,7 @@ function fileReaderStubRef(refName, parent) {
|
|
|
19
18
|
function topLevelFieldNames(payload) {
|
|
20
19
|
if (payload.type === "excel")
|
|
21
20
|
return payload.fields.map((f) => f.name);
|
|
22
|
-
if (payload.type === "json")
|
|
21
|
+
if (payload.type === "json" || payload.type === "xml")
|
|
23
22
|
return payload.structure.map((f) => f.name);
|
|
24
23
|
if (payload.type === "ai")
|
|
25
24
|
return payload.fields.map((f) => f.name);
|
|
@@ -81,7 +80,7 @@ export const fileReaderModule = {
|
|
|
81
80
|
kind: "file-reader",
|
|
82
81
|
stream: { role: "streamMember" },
|
|
83
82
|
authoring: { unit: "ownFile", bag: "fileReaders" },
|
|
84
|
-
parents: [{ parent: "app", child: "file-reader" }],
|
|
83
|
+
parents: [{ parent: "app", child: "file-reader" }, { parent: "element", child: "file-reader" }],
|
|
85
84
|
resource: {
|
|
86
85
|
shape: "subTypes",
|
|
87
86
|
rows: FILE_READER_SUB_TYPES.map((t) => ({
|
|
@@ -90,13 +89,15 @@ export const fileReaderModule = {
|
|
|
90
89
|
implemented: t.implemented === true,
|
|
91
90
|
})),
|
|
92
91
|
},
|
|
93
|
-
data:
|
|
92
|
+
data: { participates: true, resourceType: "elementum_ai_file_reader", lookupAttr: "name", referencedByBuild: false },
|
|
94
93
|
lifecycle: {
|
|
95
94
|
participates: true,
|
|
96
95
|
extractOwnFile: extractFileReaders,
|
|
97
96
|
printOwnFile: (item, opts) => {
|
|
98
97
|
const fileReader = item;
|
|
99
|
-
|
|
98
|
+
if (opts.parentScope === "table")
|
|
99
|
+
throw new Error("file readers cannot belong to tables");
|
|
100
|
+
return { refName: fileReader.refName, source: printFileReader(fileReader, { parent: opts.appRefName, parentScope: opts.parentScope }) };
|
|
100
101
|
},
|
|
101
102
|
toTf: (entity, ctx) => fileReaderToTf(entity, { appTfLabel: ctx.appTfLabel }),
|
|
102
103
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `DeployableEntity` (kind "documentModel", built by
|
|
2
|
+
* `DeployableEntity` (kind "documentModel", built by a file-reader factory) →
|
|
3
3
|
* one `elementum_<excel|json|text>_file_reader` resource block. Mirrors
|
|
4
4
|
* `skill/to-tf.ts`'s shape for a single-resource own-file kind.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `DeployableEntity` (kind "documentModel", built by
|
|
2
|
+
* `DeployableEntity` (kind "documentModel", built by a file-reader factory) →
|
|
3
3
|
* one `elementum_<excel|json|text>_file_reader` resource block. Mirrors
|
|
4
4
|
* `skill/to-tf.ts`'s shape for a single-resource own-file kind.
|
|
5
5
|
*/
|
|
@@ -51,7 +51,7 @@ export function fileReaderToTf(entity, ctx) {
|
|
|
51
51
|
}
|
|
52
52
|
const payload = entity.payload;
|
|
53
53
|
if (payload === null || typeof payload !== "object") {
|
|
54
|
-
throw new EntityTfError(`file reader "${entity.refName}" has no payload — was it built with
|
|
54
|
+
throw new EntityTfError(`file reader "${entity.refName}" has no payload — was it built with a file-reader factory?`);
|
|
55
55
|
}
|
|
56
56
|
const subType = FILE_READER_SUB_TYPE_BY_TYPE_KEY.get(payload.type);
|
|
57
57
|
if (subType === undefined || subType.implemented !== true) {
|
|
@@ -75,6 +75,9 @@ export function fileReaderToTf(entity, ctx) {
|
|
|
75
75
|
else if (payload.type === "json") {
|
|
76
76
|
attrs.structure = expr.jsonencode({ properties: payload.structure.map(serializeStructureField) });
|
|
77
77
|
}
|
|
78
|
+
else if (payload.type === "xml") {
|
|
79
|
+
attrs.values = expr.jsonencode({ properties: payload.structure.map(serializeStructureField) });
|
|
80
|
+
}
|
|
78
81
|
else if (payload.type === "ai") {
|
|
79
82
|
attrs.instructions = payload.instructions;
|
|
80
83
|
attrs.fields = payload.fields.map(aiFieldToTf);
|
|
@@ -6,14 +6,13 @@
|
|
|
6
6
|
* `elementum_ai_file_reader` — exactly the `entities/field/types.ts` /
|
|
7
7
|
* `entities/agent-tool/types.ts` pattern, one ROW per sub-type.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* All five variants are implemented. excel/json/text are the three
|
|
10
10
|
* `elementum_file_reader_task.file_reader_id` accepts (the provider's own
|
|
11
11
|
* schema docs say so explicitly); `ai` backs `elementum_ai_file_read_task`
|
|
12
12
|
* instead (see `entities/automation/types.ts`'s `aiFileAnalysis` row) — a
|
|
13
13
|
* live capture also confirms a plain `elementum_file_reader_task` can
|
|
14
|
-
* reference one.
|
|
15
|
-
*
|
|
16
|
-
* and adoption scopes ONLY the implemented ones.
|
|
14
|
+
* reference one. XML shares JSON's recursive structure dialect under the
|
|
15
|
+
* provider's `values` attribute.
|
|
17
16
|
*/
|
|
18
17
|
export interface FileReaderSubType {
|
|
19
18
|
/** The authoring `type` discriminant (`FileReaderOptions.type`). */
|
|
@@ -6,20 +6,19 @@
|
|
|
6
6
|
* `elementum_ai_file_reader` — exactly the `entities/field/types.ts` /
|
|
7
7
|
* `entities/agent-tool/types.ts` pattern, one ROW per sub-type.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* All five variants are implemented. excel/json/text are the three
|
|
10
10
|
* `elementum_file_reader_task.file_reader_id` accepts (the provider's own
|
|
11
11
|
* schema docs say so explicitly); `ai` backs `elementum_ai_file_read_task`
|
|
12
12
|
* instead (see `entities/automation/types.ts`'s `aiFileAnalysis` row) — a
|
|
13
13
|
* live capture also confirms a plain `elementum_file_reader_task` can
|
|
14
|
-
* reference one.
|
|
15
|
-
*
|
|
16
|
-
* and adoption scopes ONLY the implemented ones.
|
|
14
|
+
* reference one. XML shares JSON's recursive structure dialect under the
|
|
15
|
+
* provider's `values` attribute.
|
|
17
16
|
*/
|
|
18
17
|
export const FILE_READER_SUB_TYPES = [
|
|
19
18
|
{ typeKey: "excel", resourceType: "elementum_excel_file_reader", implemented: true },
|
|
20
19
|
{ typeKey: "json", resourceType: "elementum_json_file_reader", implemented: true },
|
|
21
20
|
{ typeKey: "text", resourceType: "elementum_text_file_reader", implemented: true },
|
|
22
|
-
{ typeKey: "xml", resourceType: "elementum_xml_file_reader" },
|
|
21
|
+
{ typeKey: "xml", resourceType: "elementum_xml_file_reader", implemented: true },
|
|
23
22
|
{ typeKey: "ai", resourceType: "elementum_ai_file_reader", implemented: true },
|
|
24
23
|
];
|
|
25
24
|
export const FILE_READER_SUB_TYPE_BY_TYPE_KEY = new Map(FILE_READER_SUB_TYPES.map((t) => [t.typeKey, t]));
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/** Categories: org-owned reference identities, name-keyed data lookups. */
|
|
2
2
|
import { namedOnlyFactoryEntry } from "../../catalog/render-helpers.js";
|
|
3
|
-
import { NO_LIFECYCLE, } from "../../graph/types.js";
|
|
4
3
|
/** org.ts / OrgRefLookup bag — keep in lockstep with `data.orgBag`. */
|
|
5
4
|
export const CATEGORY_ORG_BAG = "categories";
|
|
6
5
|
export const categoryModule = {
|
|
7
6
|
kind: "category",
|
|
8
|
-
stream: { role: "
|
|
7
|
+
stream: { role: "streamMember" },
|
|
9
8
|
data: {
|
|
10
9
|
participates: true,
|
|
11
10
|
lookupAttr: "name",
|
|
@@ -15,10 +14,10 @@ export const categoryModule = {
|
|
|
15
14
|
// source and the build-vs-export must scope it.
|
|
16
15
|
referencedByBuild: true,
|
|
17
16
|
},
|
|
18
|
-
authoring: { unit: "
|
|
17
|
+
authoring: { unit: "inline", bag: "categories" },
|
|
19
18
|
parents: [{ parent: "org", child: "category" }],
|
|
20
|
-
resource: { shape: "single", resourceType: "elementum_category", adoptable:
|
|
21
|
-
lifecycle:
|
|
19
|
+
resource: { shape: "single", resourceType: "elementum_category", adoptable: true },
|
|
20
|
+
lifecycle: { participates: true },
|
|
22
21
|
canvas: { participates: true, label: "Categories", glyph: "▣", component: "orgIdentity" },
|
|
23
22
|
catalog: {
|
|
24
23
|
participates: true,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/** Groups: org-owned reference identities, name-keyed data lookups. */
|
|
2
2
|
import { namedOnlyFactoryEntry } from "../../catalog/render-helpers.js";
|
|
3
|
-
import { NO_LIFECYCLE, } from "../../graph/types.js";
|
|
4
3
|
/** org.ts / OrgRefLookup bag — keep in lockstep with `data.orgBag`. */
|
|
5
4
|
export const GROUP_ORG_BAG = "groups";
|
|
6
5
|
export const groupModule = {
|
|
7
6
|
kind: "group",
|
|
8
|
-
stream: { role: "
|
|
7
|
+
stream: { role: "streamMember" },
|
|
9
8
|
data: {
|
|
10
9
|
participates: true,
|
|
11
10
|
lookupAttr: "name",
|
|
@@ -22,10 +21,10 @@ export const groupModule = {
|
|
|
22
21
|
// real one, extend the reproducing path rather than reverting this flag.
|
|
23
22
|
referencedByBuild: true,
|
|
24
23
|
},
|
|
25
|
-
authoring: { unit: "
|
|
24
|
+
authoring: { unit: "inline", bag: "groups" },
|
|
26
25
|
parents: [{ parent: "org", child: "group" }],
|
|
27
|
-
resource: { shape: "single", resourceType: "elementum_group", adoptable:
|
|
28
|
-
lifecycle:
|
|
26
|
+
resource: { shape: "single", resourceType: "elementum_group", adoptable: true },
|
|
27
|
+
lifecycle: { participates: true },
|
|
29
28
|
canvas: { participates: true, label: "Groups", glyph: "◎", component: "orgIdentity" },
|
|
30
29
|
catalog: {
|
|
31
30
|
participates: true,
|
|
@@ -7,5 +7,6 @@ export { categoryModule } from "./category.js";
|
|
|
7
7
|
export { cloudLinkModule } from "./cloud-link.js";
|
|
8
8
|
export { connectorModule } from "./connector.js";
|
|
9
9
|
export { groupModule } from "./group.js";
|
|
10
|
+
export { phoneProviderModule } from "./phone-provider.js";
|
|
10
11
|
export { roleModule } from "./role.js";
|
|
11
12
|
export { userModule } from "./user.js";
|
|
@@ -7,5 +7,6 @@ export { categoryModule } from "./category.js";
|
|
|
7
7
|
export { cloudLinkModule } from "./cloud-link.js";
|
|
8
8
|
export { connectorModule } from "./connector.js";
|
|
9
9
|
export { groupModule } from "./group.js";
|
|
10
|
+
export { phoneProviderModule } from "./phone-provider.js";
|
|
10
11
|
export { roleModule } from "./role.js";
|
|
11
12
|
export { userModule } from "./user.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Phone providers: org-owned reference identities, name-keyed data lookups. */
|
|
2
|
+
import { namedOnlyFactoryEntry } from "../../catalog/render-helpers.js";
|
|
3
|
+
import { NO_LIFECYCLE } from "../../graph/types.js";
|
|
4
|
+
export const PHONE_PROVIDER_ORG_BAG = "phoneProviders";
|
|
5
|
+
export const phoneProviderModule = {
|
|
6
|
+
kind: "phone-provider",
|
|
7
|
+
stream: { role: "orgExport" },
|
|
8
|
+
data: {
|
|
9
|
+
participates: true,
|
|
10
|
+
resourceType: "elementum_phone_provider",
|
|
11
|
+
lookupAttr: "name",
|
|
12
|
+
catalogKind: "phoneProvider",
|
|
13
|
+
orgBag: PHONE_PROVIDER_ORG_BAG,
|
|
14
|
+
referencedByBuild: true,
|
|
15
|
+
},
|
|
16
|
+
authoring: { unit: "none" },
|
|
17
|
+
parents: [{ parent: "org", child: "phone-provider" }],
|
|
18
|
+
// Creation is a separate future tranche; this module currently owns the
|
|
19
|
+
// provider's genuine data-source/catalog surface only.
|
|
20
|
+
resource: { shape: "none" },
|
|
21
|
+
lifecycle: NO_LIFECYCLE,
|
|
22
|
+
canvas: { participates: true, label: "Phone Providers", glyph: "☎", component: "orgIdentity" },
|
|
23
|
+
catalog: {
|
|
24
|
+
participates: true,
|
|
25
|
+
refKind: "phoneProvider",
|
|
26
|
+
catalogBag: "phoneProviders",
|
|
27
|
+
renderOrder: 115,
|
|
28
|
+
catalogRoot: "org",
|
|
29
|
+
renderEntry: namedOnlyFactoryEntry("phoneProviderRef"),
|
|
30
|
+
stubRef: (refName) => ({ __kind: "phoneProvider", refName, name: refName }),
|
|
31
|
+
refFromAuthoring: () => undefined,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* author roles or expose them through the org catalog.
|
|
2
|
+
* Custom roles are inline app/element resources. Managed Admin/Edit/View
|
|
3
|
+
* roles remain lookup-only data blocks in the same export stream.
|
|
5
4
|
*/
|
|
6
5
|
import { type EntityKindModule } from "../../graph/types.js";
|
|
7
6
|
export declare const roleModule: EntityKindModule;
|
|
7
|
+
export declare const ROLE_RESOURCE_TYPE = "elementum_role";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* author roles or expose them through the org catalog.
|
|
2
|
+
* Custom roles are inline app/element resources. Managed Admin/Edit/View
|
|
3
|
+
* roles remain lookup-only data blocks in the same export stream.
|
|
5
4
|
*/
|
|
6
5
|
import { NO_CANVAS, NO_CATALOG, NO_LIFECYCLE, } from "../../graph/types.js";
|
|
7
6
|
export const roleModule = {
|
|
@@ -12,10 +11,14 @@ export const roleModule = {
|
|
|
12
11
|
lookupAttr: "name",
|
|
13
12
|
referencedByBuild: false,
|
|
14
13
|
},
|
|
15
|
-
authoring: { unit: "
|
|
16
|
-
parents: [
|
|
17
|
-
|
|
14
|
+
authoring: { unit: "inline", bag: "roles" },
|
|
15
|
+
parents: [
|
|
16
|
+
{ parent: "app", child: "role" },
|
|
17
|
+
{ parent: "element", child: "role" },
|
|
18
|
+
],
|
|
19
|
+
resource: { shape: "single", resourceType: "elementum_role", adoptable: true },
|
|
18
20
|
lifecycle: NO_LIFECYCLE,
|
|
19
21
|
canvas: NO_CANVAS,
|
|
20
22
|
catalog: NO_CATALOG,
|
|
21
23
|
};
|
|
24
|
+
export const ROLE_RESOURCE_TYPE = "elementum_role";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { RoleUserRef } from "../role/build.js";
|
|
2
|
+
export interface OrganizationCategory {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly color?: string;
|
|
5
|
+
readonly icon?: string;
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface OrganizationGroup {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly approver?: boolean;
|
|
11
|
+
readonly assignable?: boolean;
|
|
12
|
+
readonly mentionable?: boolean;
|
|
13
|
+
readonly watchable?: boolean;
|
|
14
|
+
readonly dynamic?: boolean;
|
|
15
|
+
readonly tags?: readonly string[];
|
|
16
|
+
/** Typed users. Provider IDs stay internal to build and pull. */
|
|
17
|
+
readonly members?: readonly RoleUserRef[];
|
|
18
|
+
}
|
|
19
|
+
export interface DefineOrganizationOptions {
|
|
20
|
+
readonly categories?: Readonly<Record<string, OrganizationCategory>>;
|
|
21
|
+
readonly groups?: Readonly<Record<string, OrganizationGroup>>;
|
|
22
|
+
}
|
|
23
|
+
export interface ConfiguredOrganization {
|
|
24
|
+
readonly kind: "organizationConfig";
|
|
25
|
+
readonly categories: Readonly<Record<string, OrganizationCategory>>;
|
|
26
|
+
readonly groups: Readonly<Record<string, OrganizationGroup>>;
|
|
27
|
+
}
|
|
28
|
+
/** Organization-owned resources live in one ergonomic, optional `organization.ts` file. */
|
|
29
|
+
export declare function defineOrganization(opts: DefineOrganizationOptions): ConfiguredOrganization;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EdkValidationError } from "../../../elementum-entity-client/errors.js";
|
|
2
|
+
function requireNames(bag, values) {
|
|
3
|
+
for (const [key, value] of Object.entries(values ?? {})) {
|
|
4
|
+
if (key.trim() === "")
|
|
5
|
+
throw new EdkValidationError(`defineOrganization ${bag} keys must be non-empty.`);
|
|
6
|
+
if (value.name.trim() === "")
|
|
7
|
+
throw new EdkValidationError(`defineOrganization ${bag}.${key}.name must be non-empty.`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/** Organization-owned resources live in one ergonomic, optional `organization.ts` file. */
|
|
11
|
+
export function defineOrganization(opts) {
|
|
12
|
+
requireNames("categories", opts.categories);
|
|
13
|
+
requireNames("groups", opts.groups);
|
|
14
|
+
for (const [key, group] of Object.entries(opts.groups ?? {})) {
|
|
15
|
+
if (group.dynamic === true && (group.members?.length ?? 0) > 0) {
|
|
16
|
+
throw new EdkValidationError(`defineOrganization groups.${key} cannot set members on a dynamic group.`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
kind: "organizationConfig",
|
|
21
|
+
categories: opts.categories ?? {},
|
|
22
|
+
groups: opts.groups ?? {},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NO_CANVAS, NO_CATALOG, NO_DATA } from "../../graph/types.js";
|
|
2
|
+
import { organizationToTf } from "./to-tf.js";
|
|
3
|
+
export const organizationModule = {
|
|
4
|
+
kind: "org",
|
|
5
|
+
stream: { role: "streamMember" },
|
|
6
|
+
authoring: { unit: "inline", bag: "organization" },
|
|
7
|
+
parents: [],
|
|
8
|
+
resource: { shape: "none" },
|
|
9
|
+
data: NO_DATA,
|
|
10
|
+
lifecycle: {
|
|
11
|
+
participates: true,
|
|
12
|
+
toTf: (entity, ctx) => ({
|
|
13
|
+
blocks: organizationToTf(entity.payload, { orgRefs: ctx.orgRefs }),
|
|
14
|
+
}),
|
|
15
|
+
},
|
|
16
|
+
canvas: NO_CANVAS,
|
|
17
|
+
catalog: NO_CATALOG,
|
|
18
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { OrgRefLookup } from "../../engine/build/context.js";
|
|
2
|
+
import { type TfBlock } from "../../engine/tf/index.js";
|
|
3
|
+
import type { ConfiguredOrganization } from "./build.js";
|
|
4
|
+
export declare function organizationToTf(organization: ConfiguredOrganization, ctx: {
|
|
5
|
+
readonly orgRefs: OrgRefLookup;
|
|
6
|
+
}): TfBlock[];
|