@solidxai/core 0.1.13-beta.2 → 0.1.13-beta.21
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/CHANGELOG.md +10107 -0
- package/CLAUDE.md +5 -6
- package/README.md +19 -0
- package/dist/commands/run-tests.command.d.ts +9 -1
- package/dist/commands/run-tests.command.d.ts.map +1 -1
- package/dist/commands/run-tests.command.js +69 -6
- package/dist/commands/run-tests.command.js.map +1 -1
- package/dist/commands/seed.command.d.ts +2 -0
- package/dist/commands/seed.command.d.ts.map +1 -1
- package/dist/commands/seed.command.js +21 -0
- package/dist/commands/seed.command.js.map +1 -1
- package/dist/config/cache.options.d.ts.map +1 -1
- package/dist/config/cache.options.js +2 -2
- package/dist/config/cache.options.js.map +1 -1
- package/dist/constants/chatter-message.constants.d.ts +1 -0
- package/dist/constants/chatter-message.constants.d.ts.map +1 -1
- package/dist/constants/chatter-message.constants.js +3 -1
- package/dist/constants/chatter-message.constants.js.map +1 -1
- package/dist/constants/draft-publish-fields.d.ts +2 -0
- package/dist/constants/draft-publish-fields.d.ts.map +1 -0
- package/dist/constants/draft-publish-fields.js +5 -0
- package/dist/constants/draft-publish-fields.js.map +1 -0
- package/dist/constants/error-messages.d.ts +7 -0
- package/dist/constants/error-messages.d.ts.map +1 -1
- package/dist/constants/error-messages.js +7 -0
- package/dist/constants/error-messages.js.map +1 -1
- package/dist/constants/media-file-types.d.ts +12 -0
- package/dist/constants/media-file-types.d.ts.map +1 -1
- package/dist/constants/media-file-types.js +66 -1
- package/dist/constants/media-file-types.js.map +1 -1
- package/dist/constants/success-messages.d.ts +3 -0
- package/dist/constants/success-messages.d.ts.map +1 -1
- package/dist/constants/success-messages.js +3 -0
- package/dist/constants/success-messages.js.map +1 -1
- package/dist/constants/user.constants.d.ts +2 -0
- package/dist/constants/user.constants.d.ts.map +1 -0
- package/dist/constants/user.constants.js +5 -0
- package/dist/constants/user.constants.js.map +1 -0
- package/dist/controllers/action-metadata.controller.d.ts +1 -1
- package/dist/controllers/action-metadata.controller.js +1 -1
- package/dist/controllers/agent-event.controller.d.ts +1 -1
- package/dist/controllers/agent-event.controller.js +1 -1
- package/dist/controllers/agent-session.controller.d.ts +1 -1
- package/dist/controllers/agent-session.controller.js +1 -1
- package/dist/controllers/authentication.controller.d.ts +1 -1
- package/dist/controllers/authentication.controller.d.ts.map +1 -1
- package/dist/controllers/authentication.controller.js +4 -3
- package/dist/controllers/authentication.controller.js.map +1 -1
- package/dist/controllers/chatter-message.controller.d.ts +5 -0
- package/dist/controllers/chatter-message.controller.d.ts.map +1 -1
- package/dist/controllers/chatter-message.controller.js +14 -0
- package/dist/controllers/chatter-message.controller.js.map +1 -1
- package/dist/controllers/dashboard-user-layout.controller.d.ts +1 -1
- package/dist/controllers/dashboard-user-layout.controller.js +1 -1
- package/dist/controllers/email-template.controller.d.ts +1 -1
- package/dist/controllers/email-template.controller.js +1 -1
- package/dist/controllers/export-template.controller.d.ts +1 -1
- package/dist/controllers/export-template.controller.d.ts.map +1 -1
- package/dist/controllers/export-template.controller.js +6 -4
- package/dist/controllers/export-template.controller.js.map +1 -1
- package/dist/controllers/export-transaction.controller.d.ts +1 -1
- package/dist/controllers/export-transaction.controller.js +1 -1
- package/dist/controllers/field-metadata.controller.d.ts +2 -2
- package/dist/controllers/import-transaction-error-log.controller.d.ts +1 -1
- package/dist/controllers/import-transaction-error-log.controller.js +1 -1
- package/dist/controllers/import-transaction.controller.d.ts +1 -1
- package/dist/controllers/import-transaction.controller.d.ts.map +1 -1
- package/dist/controllers/import-transaction.controller.js +7 -7
- package/dist/controllers/import-transaction.controller.js.map +1 -1
- package/dist/controllers/list-of-values.controller.d.ts +1 -1
- package/dist/controllers/list-of-values.controller.js +1 -1
- package/dist/controllers/locale.controller.d.ts +1 -1
- package/dist/controllers/locale.controller.js +1 -1
- package/dist/controllers/mcp-audit-log.controller.d.ts +1 -1
- package/dist/controllers/mcp-audit-log.controller.js +1 -1
- package/dist/controllers/media.controller.d.ts +2 -2
- package/dist/controllers/media.controller.d.ts.map +1 -1
- package/dist/controllers/media.controller.js +13 -8
- package/dist/controllers/media.controller.js.map +1 -1
- package/dist/controllers/menu-item-metadata.controller.d.ts +1 -1
- package/dist/controllers/menu-item-metadata.controller.js +1 -1
- package/dist/controllers/model-sequence.controller.d.ts +1 -1
- package/dist/controllers/model-sequence.controller.js +1 -1
- package/dist/controllers/module-package.controller.d.ts.map +1 -1
- package/dist/controllers/module-package.controller.js +2 -3
- package/dist/controllers/module-package.controller.js.map +1 -1
- package/dist/controllers/mpin-authentication.controller.d.ts +44 -0
- package/dist/controllers/mpin-authentication.controller.d.ts.map +1 -0
- package/dist/controllers/mpin-authentication.controller.js +102 -0
- package/dist/controllers/mpin-authentication.controller.js.map +1 -0
- package/dist/controllers/mq-message-queue.controller.d.ts +1 -1
- package/dist/controllers/mq-message-queue.controller.js +1 -1
- package/dist/controllers/mq-message.controller.d.ts +1 -1
- package/dist/controllers/mq-message.controller.js +1 -1
- package/dist/controllers/permission-metadata.controller.d.ts +1 -1
- package/dist/controllers/permission-metadata.controller.js +1 -1
- package/dist/controllers/role-metadata.controller.d.ts +1 -1
- package/dist/controllers/role-metadata.controller.js +1 -1
- package/dist/controllers/saved-filters.controller.d.ts +1 -1
- package/dist/controllers/saved-filters.controller.js +1 -1
- package/dist/controllers/scheduled-job.controller.d.ts +1 -1
- package/dist/controllers/scheduled-job.controller.js +1 -1
- package/dist/controllers/security-rule.controller.d.ts +1 -1
- package/dist/controllers/security-rule.controller.js +1 -1
- package/dist/controllers/sms-template.controller.d.ts +1 -1
- package/dist/controllers/sms-template.controller.js +1 -1
- package/dist/controllers/user-activity-history.controller.d.ts +1 -1
- package/dist/controllers/user-activity-history.controller.js +1 -1
- package/dist/controllers/user-view-metadata.controller.d.ts +1 -1
- package/dist/controllers/user-view-metadata.controller.js +1 -1
- package/dist/controllers/user.controller.d.ts +2 -2
- package/dist/controllers/user.controller.js +2 -2
- package/dist/controllers/view-metadata.controller.d.ts +2 -2
- package/dist/controllers/view-metadata.controller.js +1 -1
- package/dist/controllers/workflow-definition.controller.d.ts +1 -1
- package/dist/controllers/workflow-definition.controller.js +1 -1
- package/dist/controllers/workflow-execution-artifact.controller.d.ts +1 -1
- package/dist/controllers/workflow-execution-artifact.controller.js +1 -1
- package/dist/controllers/workflow-execution-log.controller.d.ts +1 -1
- package/dist/controllers/workflow-execution-log.controller.js +1 -1
- package/dist/controllers/workflow-execution.controller.d.ts +1 -1
- package/dist/controllers/workflow-execution.controller.js +1 -1
- package/dist/controllers/workflow-secret.controller.d.ts +1 -1
- package/dist/controllers/workflow-secret.controller.js +1 -1
- package/dist/controllers/workflow-step-execution.controller.d.ts +1 -1
- package/dist/controllers/workflow-step-execution.controller.js +1 -1
- package/dist/controllers/workflow-trigger-execution.controller.d.ts +1 -1
- package/dist/controllers/workflow-trigger-execution.controller.js +1 -1
- package/dist/dtos/basic-filters.dto.d.ts +0 -1
- package/dist/dtos/basic-filters.dto.d.ts.map +1 -1
- package/dist/dtos/basic-filters.dto.js +1 -6
- package/dist/dtos/basic-filters.dto.js.map +1 -1
- package/dist/dtos/change-mpin.dto.d.ts +6 -0
- package/dist/dtos/change-mpin.dto.d.ts.map +1 -0
- package/dist/dtos/change-mpin.dto.js +39 -0
- package/dist/dtos/change-mpin.dto.js.map +1 -0
- package/dist/dtos/create-field-metadata.dto.d.ts +3 -6
- package/dist/dtos/create-field-metadata.dto.d.ts.map +1 -1
- package/dist/dtos/create-field-metadata.dto.js +15 -10
- package/dist/dtos/create-field-metadata.dto.js.map +1 -1
- package/dist/dtos/create-model-sequence.dto.d.ts +1 -1
- package/dist/dtos/create-model-sequence.dto.d.ts.map +1 -1
- package/dist/dtos/create-model-sequence.dto.js +1 -1
- package/dist/dtos/create-model-sequence.dto.js.map +1 -1
- package/dist/dtos/mpin-login.dto.d.ts +5 -0
- package/dist/dtos/mpin-login.dto.d.ts.map +1 -0
- package/dist/dtos/mpin-login.dto.js +33 -0
- package/dist/dtos/mpin-login.dto.js.map +1 -0
- package/dist/dtos/setup-mpin.dto.d.ts +7 -0
- package/dist/dtos/setup-mpin.dto.d.ts.map +1 -0
- package/dist/dtos/setup-mpin.dto.js +47 -0
- package/dist/dtos/setup-mpin.dto.js.map +1 -0
- package/dist/entities/common.entity.d.ts +4 -0
- package/dist/entities/common.entity.d.ts.map +1 -1
- package/dist/entities/common.entity.js +25 -1
- package/dist/entities/common.entity.js.map +1 -1
- package/dist/entities/dashboard-user-layout.entity.js +2 -2
- package/dist/entities/dashboard-user-layout.entity.js.map +1 -1
- package/dist/entities/field-metadata.entity.d.ts +1 -0
- package/dist/entities/field-metadata.entity.d.ts.map +1 -1
- package/dist/entities/field-metadata.entity.js +5 -1
- package/dist/entities/field-metadata.entity.js.map +1 -1
- package/dist/entities/saved-filters.entity.js +3 -3
- package/dist/entities/saved-filters.entity.js.map +1 -1
- package/dist/entities/user-device-credential.entity.d.ts +18 -0
- package/dist/entities/user-device-credential.entity.d.ts.map +1 -0
- package/dist/entities/user-device-credential.entity.js +91 -0
- package/dist/entities/user-device-credential.entity.js.map +1 -0
- package/dist/entities/user.entity.d.ts.map +1 -1
- package/dist/entities/user.entity.js +36 -0
- package/dist/entities/user.entity.js.map +1 -1
- package/dist/entities/view-metadata.entity.js.map +1 -1
- package/dist/entities/workflow-execution-artifact.entity.d.ts.map +1 -1
- package/dist/entities/workflow-execution-artifact.entity.js +4 -3
- package/dist/entities/workflow-execution-artifact.entity.js.map +1 -1
- package/dist/entities/workflow-execution-log.entity.d.ts.map +1 -1
- package/dist/entities/workflow-execution-log.entity.js +4 -3
- package/dist/entities/workflow-execution-log.entity.js.map +1 -1
- package/dist/entities/workflow-execution.entity.d.ts.map +1 -1
- package/dist/entities/workflow-execution.entity.js +3 -2
- package/dist/entities/workflow-execution.entity.js.map +1 -1
- package/dist/entities/workflow-secret.entity.d.ts.map +1 -1
- package/dist/entities/workflow-secret.entity.js +3 -2
- package/dist/entities/workflow-secret.entity.js.map +1 -1
- package/dist/entities/workflow-step-execution.entity.d.ts.map +1 -1
- package/dist/entities/workflow-step-execution.entity.js +3 -2
- package/dist/entities/workflow-step-execution.entity.js.map +1 -1
- package/dist/entities/workflow-trigger-execution.entity.d.ts.map +1 -1
- package/dist/entities/workflow-trigger-execution.entity.js +7 -6
- package/dist/entities/workflow-trigger-execution.entity.js.map +1 -1
- package/dist/factories/mail.factory.d.ts.map +1 -1
- package/dist/factories/mail.factory.js +4 -0
- package/dist/factories/mail.factory.js.map +1 -1
- package/dist/filters/http-exception.filter.d.ts.map +1 -1
- package/dist/filters/http-exception.filter.js +5 -1
- package/dist/filters/http-exception.filter.js.map +1 -1
- package/dist/helpers/bootstrap.helper.d.ts +5 -2
- package/dist/helpers/bootstrap.helper.d.ts.map +1 -1
- package/dist/helpers/bootstrap.helper.js +7 -3
- package/dist/helpers/bootstrap.helper.js.map +1 -1
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.d.ts +7 -0
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.d.ts.map +1 -1
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.js +66 -32
- package/dist/helpers/field-crud-managers/MediaFieldCrudManager.js.map +1 -1
- package/dist/helpers/file-download.helper.d.ts +9 -0
- package/dist/helpers/file-download.helper.d.ts.map +1 -0
- package/dist/helpers/file-download.helper.js +19 -0
- package/dist/helpers/file-download.helper.js.map +1 -0
- package/dist/helpers/model-metadata-helper.service.d.ts.map +1 -1
- package/dist/helpers/model-metadata-helper.service.js +30 -1
- package/dist/helpers/model-metadata-helper.service.js.map +1 -1
- package/dist/helpers/security.helper.d.ts +5 -1
- package/dist/helpers/security.helper.d.ts.map +1 -1
- package/dist/helpers/security.helper.js +15 -4
- package/dist/helpers/security.helper.js.map +1 -1
- package/dist/helpers/solid-core-error-codes-provider.service.d.ts.map +1 -1
- package/dist/helpers/solid-core-error-codes-provider.service.js +45 -0
- package/dist/helpers/solid-core-error-codes-provider.service.js.map +1 -1
- package/dist/helpers/solid-microservice-adapter.service.d.ts.map +1 -1
- package/dist/helpers/solid-microservice-adapter.service.js +1 -1
- package/dist/helpers/solid-microservice-adapter.service.js.map +1 -1
- package/dist/helpers/solid-registry.js +1 -1
- package/dist/helpers/solid-registry.js.map +1 -1
- package/dist/helpers/typeorm-db-helper.d.ts.map +1 -1
- package/dist/helpers/typeorm-db-helper.js +9 -0
- package/dist/helpers/typeorm-db-helper.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/active-user-data.interface.d.ts +1 -0
- package/dist/interfaces/active-user-data.interface.d.ts.map +1 -1
- package/dist/interfaces/active-user-data.interface.js.map +1 -1
- package/dist/interfaces.d.ts +1 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/repository/user-device-credential.repository.d.ts +12 -0
- package/dist/repository/user-device-credential.repository.d.ts.map +1 -0
- package/dist/repository/user-device-credential.repository.js +34 -0
- package/dist/repository/user-device-credential.repository.js.map +1 -0
- package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js +51 -30
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/module-test-data.service.d.ts +3 -1
- package/dist/seeders/module-test-data.service.d.ts.map +1 -1
- package/dist/seeders/module-test-data.service.js +8 -2
- package/dist/seeders/module-test-data.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +290 -78
- package/dist/services/api-key.service.d.ts.map +1 -1
- package/dist/services/api-key.service.js +1 -1
- package/dist/services/api-key.service.js.map +1 -1
- package/dist/services/authentication.service.d.ts +9 -5
- package/dist/services/authentication.service.d.ts.map +1 -1
- package/dist/services/authentication.service.js +102 -23
- package/dist/services/authentication.service.js.map +1 -1
- package/dist/services/chatter-message.service.d.ts +16 -1
- package/dist/services/chatter-message.service.d.ts.map +1 -1
- package/dist/services/chatter-message.service.js +100 -16
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/services/crud-helper.service.d.ts +6 -4
- package/dist/services/crud-helper.service.d.ts.map +1 -1
- package/dist/services/crud-helper.service.js +32 -48
- package/dist/services/crud-helper.service.js.map +1 -1
- package/dist/services/crud.service.d.ts +13 -1
- package/dist/services/crud.service.d.ts.map +1 -1
- package/dist/services/crud.service.js +94 -68
- package/dist/services/crud.service.js.map +1 -1
- package/dist/services/datasource-introspection.service.d.ts.map +1 -1
- package/dist/services/datasource-introspection.service.js.map +1 -1
- package/dist/services/draft-publish-helper.service.d.ts +53 -0
- package/dist/services/draft-publish-helper.service.d.ts.map +1 -0
- package/dist/services/draft-publish-helper.service.js +402 -0
- package/dist/services/draft-publish-helper.service.js.map +1 -0
- package/dist/services/field-metadata.service.d.ts +2 -2
- package/dist/services/field-metadata.service.d.ts.map +1 -1
- package/dist/services/field-metadata.service.js +4 -1
- package/dist/services/field-metadata.service.js.map +1 -1
- package/dist/services/internationalisation-helper.service.d.ts +19 -0
- package/dist/services/internationalisation-helper.service.d.ts.map +1 -0
- package/dist/services/internationalisation-helper.service.js +107 -0
- package/dist/services/internationalisation-helper.service.js.map +1 -0
- package/dist/services/locale.service.d.ts +1 -1
- package/dist/services/media-storage.utils.d.ts +1 -0
- package/dist/services/media-storage.utils.d.ts.map +1 -1
- package/dist/services/media-storage.utils.js +12 -1
- package/dist/services/media-storage.utils.js.map +1 -1
- package/dist/services/media.service.d.ts +3 -2
- package/dist/services/media.service.d.ts.map +1 -1
- package/dist/services/media.service.js +45 -29
- package/dist/services/media.service.js.map +1 -1
- package/dist/services/metadata-validation.service.d.ts +7 -0
- package/dist/services/metadata-validation.service.d.ts.map +1 -0
- package/dist/services/metadata-validation.service.js +42 -0
- package/dist/services/metadata-validation.service.js.map +1 -0
- package/dist/services/model-metadata.service.d.ts.map +1 -1
- package/dist/services/model-metadata.service.js +2 -1
- package/dist/services/model-metadata.service.js.map +1 -1
- package/dist/services/module-metadata.service.d.ts.map +1 -1
- package/dist/services/module-metadata.service.js +9 -1
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/services/mpin.service.d.ts +67 -0
- package/dist/services/mpin.service.d.ts.map +1 -0
- package/dist/services/mpin.service.js +282 -0
- package/dist/services/mpin.service.js.map +1 -0
- package/dist/services/object.utils.d.ts +2 -0
- package/dist/services/object.utils.d.ts.map +1 -0
- package/dist/services/object.utils.js +11 -0
- package/dist/services/object.utils.js.map +1 -0
- package/dist/services/refresh-token-ids-storage.service.d.ts +25 -6
- package/dist/services/refresh-token-ids-storage.service.d.ts.map +1 -1
- package/dist/services/refresh-token-ids-storage.service.js +80 -42
- package/dist/services/refresh-token-ids-storage.service.js.map +1 -1
- package/dist/services/setting.service.d.ts.map +1 -1
- package/dist/services/setting.service.js +6 -1
- package/dist/services/setting.service.js.map +1 -1
- package/dist/services/settings/default-settings-provider.service.d.ts +248 -12
- package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
- package/dist/services/settings/default-settings-provider.service.js +143 -6
- package/dist/services/settings/default-settings-provider.service.js.map +1 -1
- package/dist/services/user.service.d.ts +2 -2
- package/dist/services/user.service.d.ts.map +1 -1
- package/dist/services/user.service.js +9 -3
- package/dist/services/user.service.js.map +1 -1
- package/dist/services/view-metadata.service.d.ts +1 -2
- package/dist/services/view-metadata.service.d.ts.map +1 -1
- package/dist/services/view-metadata.service.js +3 -55
- package/dist/services/view-metadata.service.js.map +1 -1
- package/dist/services/workflow/nodes/execution-fail.node.d.ts +6 -0
- package/dist/services/workflow/nodes/execution-fail.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/execution-fail.node.js +81 -0
- package/dist/services/workflow/nodes/execution-fail.node.js.map +1 -0
- package/dist/services/workflow/nodes/for-each.node.d.ts +2 -0
- package/dist/services/workflow/nodes/for-each.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/for-each.node.js +114 -5
- package/dist/services/workflow/nodes/for-each.node.js.map +1 -1
- package/dist/services/workflow/nodes/if.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/if.node.js +7 -0
- package/dist/services/workflow/nodes/if.node.js.map +1 -1
- package/dist/services/workflow/nodes/log-write.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/log-write.node.js +2 -0
- package/dist/services/workflow/nodes/log-write.node.js.map +1 -1
- package/dist/services/workflow/nodes/loop-until.node.d.ts +12 -0
- package/dist/services/workflow/nodes/loop-until.node.d.ts.map +1 -0
- package/dist/services/workflow/nodes/loop-until.node.js +281 -0
- package/dist/services/workflow/nodes/loop-until.node.js.map +1 -0
- package/dist/services/workflow/nodes/parallel.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/parallel.node.js +7 -0
- package/dist/services/workflow/nodes/parallel.node.js.map +1 -1
- package/dist/services/workflow/nodes/sequential.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/sequential.node.js +7 -0
- package/dist/services/workflow/nodes/sequential.node.js.map +1 -1
- package/dist/services/workflow/nodes/switch.node.d.ts.map +1 -1
- package/dist/services/workflow/nodes/switch.node.js +7 -0
- package/dist/services/workflow/nodes/switch.node.js.map +1 -1
- package/dist/services/workflow/workflow-definition-validator.service.d.ts.map +1 -1
- package/dist/services/workflow/workflow-definition-validator.service.js +5 -2
- package/dist/services/workflow/workflow-definition-validator.service.js.map +1 -1
- package/dist/services/workflow/workflow-expression.service.d.ts.map +1 -1
- package/dist/services/workflow/workflow-expression.service.js +5 -0
- package/dist/services/workflow/workflow-expression.service.js.map +1 -1
- package/dist/services/workflow/workflow-node-registry.service.d.ts +2 -1
- package/dist/services/workflow/workflow-node-registry.service.d.ts.map +1 -1
- package/dist/services/workflow/workflow-node-registry.service.js +7 -0
- package/dist/services/workflow/workflow-node-registry.service.js.map +1 -1
- package/dist/services/workflow/workflow-runtime.service.d.ts +8 -0
- package/dist/services/workflow/workflow-runtime.service.d.ts.map +1 -1
- package/dist/services/workflow/workflow-runtime.service.js +197 -32
- package/dist/services/workflow/workflow-runtime.service.js.map +1 -1
- package/dist/services/workflow-definition.service.d.ts +1 -1
- package/dist/solid-core.module.d.ts +1 -3
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +28 -40
- package/dist/solid-core.module.js.map +1 -1
- package/dist/testing/adapters/ui/playwright-adapter.d.ts +5 -0
- package/dist/testing/adapters/ui/playwright-adapter.d.ts.map +1 -1
- package/dist/testing/adapters/ui/playwright-adapter.js +17 -1
- package/dist/testing/adapters/ui/playwright-adapter.js.map +1 -1
- package/dist/testing/adapters/ui/ui.types.d.ts +2 -0
- package/dist/testing/adapters/ui/ui.types.d.ts.map +1 -1
- package/dist/testing/adapters/ui/ui.types.js.map +1 -1
- package/dist/testing/reporter/console-reporter.d.ts +3 -0
- package/dist/testing/reporter/console-reporter.d.ts.map +1 -1
- package/dist/testing/reporter/console-reporter.js +2 -0
- package/dist/testing/reporter/console-reporter.js.map +1 -1
- package/dist/testing/reporter/progress-reporter.d.ts +64 -0
- package/dist/testing/reporter/progress-reporter.d.ts.map +1 -0
- package/dist/testing/reporter/progress-reporter.js +224 -0
- package/dist/testing/reporter/progress-reporter.js.map +1 -0
- package/dist/testing/reporter/reporter.types.d.ts +3 -0
- package/dist/testing/reporter/reporter.types.d.ts.map +1 -1
- package/dist/testing/reporter/reporter.types.js.map +1 -1
- package/dist/testing/runner/run-from-metadata.d.ts.map +1 -1
- package/dist/testing/runner/run-from-metadata.js +1 -0
- package/dist/testing/runner/run-from-metadata.js.map +1 -1
- package/dist/testing/steps/ui/actions.step.d.ts.map +1 -1
- package/dist/testing/steps/ui/actions.step.js +6 -2
- package/dist/testing/steps/ui/actions.step.js.map +1 -1
- package/dist/testing/steps/ui/assertions.step.d.ts.map +1 -1
- package/dist/testing/steps/ui/assertions.step.js +11 -3
- package/dist/testing/steps/ui/assertions.step.js.map +1 -1
- package/dist/testing/steps/ui/form.step.d.ts.map +1 -1
- package/dist/testing/steps/ui/form.step.js +9 -3
- package/dist/testing/steps/ui/form.step.js.map +1 -1
- package/dist/testing/steps/ui/manual.step.js +1 -1
- package/dist/testing/steps/ui/manual.step.js.map +1 -1
- package/dist/testing/steps/ui/navigation.step.d.ts.map +1 -1
- package/dist/testing/steps/ui/navigation.step.js +3 -1
- package/dist/testing/steps/ui/navigation.step.js.map +1 -1
- package/dist/theme/theme-registry.d.ts +14 -0
- package/dist/theme/theme-registry.d.ts.map +1 -0
- package/dist/theme/theme-registry.js +147 -0
- package/dist/theme/theme-registry.js.map +1 -0
- package/dist/types/workflow-dsl.types.d.ts +14 -0
- package/dist/types/workflow-dsl.types.d.ts.map +1 -1
- package/dist/types/workflow-dsl.types.js.map +1 -1
- package/package.json +2 -2
- package/src/commands/run-tests.command.ts +64 -4
- package/src/commands/seed.command.ts +19 -0
- package/src/config/cache.options.ts +9 -1
- package/src/constants/chatter-message.constants.ts +12 -0
- package/src/constants/draft-publish-fields.ts +5 -0
- package/src/constants/error-messages.ts +14 -0
- package/src/constants/media-file-types.ts +128 -0
- package/src/constants/success-messages.ts +5 -0
- package/src/constants/user.constants.ts +13 -0
- package/src/controllers/authentication.controller.ts +5 -2
- package/src/controllers/chatter-message.controller.ts +8 -0
- package/src/controllers/export-template.controller.ts +5 -3
- package/src/controllers/import-transaction.controller.ts +6 -6
- package/src/controllers/media.controller.ts +17 -6
- package/src/controllers/module-package.controller.ts +2 -3
- package/src/controllers/mpin-authentication.controller.ts +67 -0
- package/src/dtos/basic-filters.dto.ts +0 -4
- package/src/dtos/change-mpin.dto.ts +18 -0
- package/src/dtos/create-field-metadata.dto.ts +17 -9
- package/src/dtos/create-model-sequence.dto.ts +1 -1
- package/src/dtos/mpin-login.dto.ts +24 -0
- package/src/dtos/setup-mpin.dto.ts +51 -0
- package/src/entities/common.entity.ts +24 -0
- package/src/entities/dashboard-user-layout.entity.ts +2 -2
- package/src/entities/field-metadata.entity.ts +3 -0
- package/src/entities/saved-filters.entity.ts +3 -3
- package/src/entities/user-device-credential.entity.ts +130 -0
- package/src/entities/user.entity.ts +53 -36
- package/src/entities/view-metadata.entity.ts +2 -2
- package/src/entities/workflow-execution-artifact.entity.ts +4 -3
- package/src/entities/workflow-execution-log.entity.ts +4 -3
- package/src/entities/workflow-execution.entity.ts +3 -2
- package/src/entities/workflow-secret.entity.ts +3 -2
- package/src/entities/workflow-step-execution.entity.ts +3 -2
- package/src/entities/workflow-trigger-execution.entity.ts +7 -6
- package/src/factories/mail.factory.ts +7 -1
- package/src/filters/http-exception.filter.ts +11 -1
- package/src/helpers/bootstrap.helper.ts +43 -6
- package/src/helpers/field-crud-managers/MediaFieldCrudManager.ts +90 -37
- package/src/helpers/file-download.helper.ts +45 -0
- package/src/helpers/model-metadata-helper.service.ts +32 -1
- package/src/helpers/security.helper.ts +35 -8
- package/src/helpers/solid-core-error-codes-provider.service.ts +53 -0
- package/src/helpers/solid-microservice-adapter.service.ts +6 -1
- package/src/helpers/solid-registry.ts +1 -1
- package/src/helpers/typeorm-db-helper.ts +12 -1
- package/src/index.ts +10 -0
- package/src/interfaces/active-user-data.interface.ts +9 -0
- package/src/interfaces.ts +1 -0
- package/src/repository/user-device-credential.repository.ts +17 -0
- package/src/seeders/module-metadata-seeder.service.ts +61 -39
- package/src/seeders/module-test-data.service.ts +6 -0
- package/src/seeders/seed-data/solid-core-metadata.json +290 -78
- package/src/services/api-key.service.ts +13 -1
- package/src/services/authentication.service.ts +203 -41
- package/src/services/chatter-message.service.ts +180 -19
- package/src/services/crud-helper.service.ts +35 -50
- package/src/services/crud.service.ts +132 -105
- package/src/services/datasource-introspection.service.ts +5 -0
- package/src/services/draft-publish-helper.service.ts +581 -0
- package/src/services/field-metadata.service.ts +5 -2
- package/src/services/internationalisation-helper.service.ts +148 -0
- package/src/services/media-storage.utils.ts +26 -1
- package/src/services/media.service.ts +68 -36
- package/src/services/metadata-validation.service.ts +39 -0
- package/src/services/model-metadata.service.ts +4 -1
- package/src/services/module-metadata.service.ts +10 -1
- package/src/services/mpin.service.ts +447 -0
- package/src/services/object.utils.ts +10 -0
- package/src/services/refresh-token-ids-storage.service.ts +229 -90
- package/src/services/setting.service.ts +8 -1
- package/src/services/settings/default-settings-provider.service.ts +154 -6
- package/src/services/user.service.ts +18 -3
- package/src/services/view-metadata.service.ts +5 -145
- package/src/services/workflow/nodes/execution-fail.node.ts +82 -0
- package/src/services/workflow/nodes/for-each.node.ts +140 -6
- package/src/services/workflow/nodes/if.node.ts +7 -0
- package/src/services/workflow/nodes/log-write.node.ts +2 -0
- package/src/services/workflow/nodes/loop-until.node.ts +343 -0
- package/src/services/workflow/nodes/parallel.node.ts +7 -0
- package/src/services/workflow/nodes/sequential.node.ts +7 -0
- package/src/services/workflow/nodes/switch.node.ts +7 -0
- package/src/services/workflow/workflow-definition-validator.service.ts +5 -2
- package/src/services/workflow/workflow-expression.service.ts +5 -0
- package/src/services/workflow/workflow-node-registry.service.ts +11 -0
- package/src/services/workflow/workflow-runtime.service.ts +274 -39
- package/src/solid-core.module.ts +46 -15
- package/src/testing/README.md +75 -3
- package/src/testing/adapters/ui/playwright-adapter.ts +25 -0
- package/src/testing/adapters/ui/ui.types.ts +2 -0
- package/src/testing/reporter/console-reporter.ts +4 -0
- package/src/testing/reporter/progress-reporter.ts +251 -0
- package/src/testing/reporter/reporter.types.ts +3 -0
- package/src/testing/runner/run-from-metadata.ts +1 -0
- package/src/testing/steps/ui/actions.step.ts +8 -4
- package/src/testing/steps/ui/assertions.step.ts +18 -5
- package/src/testing/steps/ui/form.step.ts +16 -6
- package/src/testing/steps/ui/manual.step.ts +1 -1
- package/src/testing/steps/ui/navigation.step.ts +4 -2
- package/src/theme/theme-registry.ts +181 -0
- package/src/types/workflow-dsl.types.ts +43 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-dsl.types.js","sourceRoot":"","sources":["../../src/types/workflow-dsl.types.ts"],"names":[],"mappings":"","sourcesContent":["import { WorkflowExecution } from '../entities/workflow-execution.entity';\nimport { WorkflowStepExecution } from '../entities/workflow-step-execution.entity';\n\n/**\n * Declares the execution role of a node in the workflow graph.\n *\n * - `task`: performs one unit of work, for example `log.write` or `http.request`.\n * - `control`: owns child-node execution semantics, for example `if`, `parallel`, `sequential`, or `switch`.\n * - `subflow`: reserved for invoking another workflow as a node.\n *\n * Example:\n * ```yaml\n * kind: control\n * type: if\n * ```\n */\nexport type WorkflowNodeKind = 'task' | 'control' | 'subflow';\n\n/**\n * Describes the logical value type of a configurable node field.\n *\n * This powers schema-driven authoring UI, validation messaging, docs badges, and future field-editor selection.\n *\n * Example:\n * ```yaml\n * configuration:\n * uri: \"{{ variables.defaultUrl }}\" # valueType: uri, expressionAllowed: true\n * ```\n */\nexport type WorkflowNodeConfigurationValueType =\n | 'string'\n | 'number'\n | 'integer'\n | 'boolean'\n | 'object'\n | 'array'\n | 'json'\n | 'secret'\n | 'expression'\n | 'relation'\n | 'uri'\n | 'any';\n\n/** Lifecycle status for an entire workflow execution. */\nexport type WorkflowExecutionStatus =\n | 'enqueued'\n | 'created'\n | 'running'\n | 'success'\n | 'failed'\n | 'cancelled';\n\n/** Lifecycle status for one node execution inside a workflow execution. */\nexport type WorkflowStepExecutionStatus =\n | 'created'\n | 'running'\n | 'success'\n | 'failed'\n | 'skipped';\n\n/**\n * Retry behavior attached to a node instance in the workflow YAML.\n *\n * This belongs to the editable runtime surface when a node provider sets\n * `authoring.supportsRetryPolicy`.\n *\n * Example:\n * ```yaml\n * retryPolicy:\n * maxRetries: 3\n * delayMs: 1000\n * ```\n */\nexport interface WorkflowRetryPolicy {\n /** Maximum number of retry attempts after the initial failure. */\n maxRetries?: number;\n\n /** Delay between retry attempts in milliseconds. */\n delayMs?: number;\n}\n\n/**\n * A concrete node instance inside `WorkflowDefinitionDsl.nodes` or inside a\n * control node child slot.\n *\n * This is the author-facing DSL shape saved in `definitionYaml`. The topology\n * renderer interprets `kind`, `type`, and child-slot keys (`tasks`, `then`,\n * `else`, `cases`, `defaults`) to draw the graph dynamically. The edit modal\n * exposes common fields plus `configuration` fields declared by the matching\n * `WorkflowNodeProviderMetadata.authoring` metadata.\n *\n * Example:\n * ```yaml\n * - id: check_status\n * name: Check status\n * kind: control\n * type: if\n * configuration:\n * condition: \"{{ outputs.http_request.code != 200 }}\"\n * then:\n * - id: alert\n * kind: task\n * type: log.write\n * configuration:\n * message: Server is down\n * ```\n */\nexport interface WorkflowNodeDefinition {\n /** Stable unique identifier for output lookup, execution tracking, and UI mutations. */\n id: string;\n\n /** Optional display label for the node card; UI can fall back to `id`. */\n name?: string;\n\n /** Optional human-readable note explaining what this node does. */\n description?: string;\n\n /** Declares whether this is a work node, control-flow node, or subflow node. */\n kind: WorkflowNodeKind;\n\n /**\n * Provider type key used to resolve execution handler, schema, docs, icon, and\n * authoring metadata. Examples: `log.write`, `http.request`, `if`, `switch`.\n */\n type: string;\n\n /** When true, the engine skips this node at runtime. */\n disabled?: boolean;\n\n /** Optional node execution timeout in milliseconds. */\n timeoutMs?: number;\n\n /** Optional retry policy for failed task execution. */\n retryPolicy?: WorkflowRetryPolicy;\n\n /** Error behavior: `fail` stops the workflow; `continue` moves to the next node. */\n onError?: 'fail' | 'continue';\n\n /**\n * Provider-specific input properties for this node.\n *\n * Think of this as the node's input payload: each provider declares which\n * properties it accepts, and the schema-driven form writes those properties\n * into this object using `WorkflowNodeConfigurationFieldDefinition.path` or\n * `.key`.\n *\n * Values may be literals or expression strings. When expressions are allowed\n * for a field, the runtime evaluates them against workflow context before the\n * node handler receives the effective input value.\n *\n * Example for `type: http.request`:\n * ```yaml\n * configuration:\n * method: GET\n * uri: \"{{ variables.defaultUrl }}\"\n * ```\n */\n configuration?: Record<string, any>;\n\n /** Non-runtime custom annotations for tooling and future extensions. */\n metadata?: Record<string, any>;\n\n /**\n * Ordered child nodes for control nodes that own a generic task collection.\n *\n * Used by grouping controls such as `sequential` and `parallel`, and also by\n * loop-style controls where the same child task collection is executed for\n * each item or iteration. The control node defines the execution semantics;\n * this property defines the child nodes that participate.\n *\n * Example for `type: sequential`:\n * ```yaml\n * tasks:\n * - id: first\n * kind: task\n * type: log.write\n * - id: second\n * kind: task\n * type: log.write\n * ```\n */\n tasks?: WorkflowNodeDefinition[];\n\n /**\n * Child nodes executed when an `if` control node condition resolves truthy.\n *\n * Example:\n * ```yaml\n * then:\n * - id: server_unreachable_alert\n * kind: task\n * type: log.write\n * ```\n */\n then?: WorkflowNodeDefinition[];\n\n /** Child nodes executed when an `if` control node condition resolves falsey. */\n else?: WorkflowNodeDefinition[];\n\n /** Child nodes executed when no `switch.cases` entry matches the switch value. */\n defaults?: WorkflowNodeDefinition[];\n\n /**\n * Named child-node collections for `switch`.\n *\n * Keys are case values. Values are the nodes that run when the evaluated switch\n * value matches that key.\n *\n * Example:\n * ```yaml\n * cases:\n * true:\n * - id: is_true\n * kind: task\n * type: log.write\n * false:\n * - id: is_false\n * kind: task\n * type: log.write\n * ```\n */\n cases?: Record<string, WorkflowNodeDefinition[]>;\n}\n\n/**\n * A workflow trigger definition.\n *\n * Triggers start workflow executions, but they are not part of the main node\n * sequence rendered in topology.\n */\nexport interface WorkflowTriggerDefinition {\n /** Stable trigger id within the workflow. */\n id: string;\n\n /** Optional display label for UI surfaces. */\n name?: string;\n\n /** Trigger provider key, for example a schedule trigger type. */\n type: string;\n\n /** Provider-specific trigger settings. */\n configuration?: Record<string, any>;\n\n /** When true, the trigger is defined but inactive. */\n disabled?: boolean;\n\n /** Custom annotations for trigger tooling. */\n metadata?: Record<string, any>;\n}\n\n/**\n * Root workflow DSL document saved as YAML.\n *\n * Rendering phases are:\n * 1. fetch `definitionYaml`;\n * 2. parse YAML into this shape;\n * 3. validate this shape and all nested nodes;\n * 4. render topology using node provider metadata and child-slot rules.\n *\n * Example:\n * ```yaml\n * version: 1.0.0\n * variables:\n * defaultUrl: https://example.com\n * nodes:\n * - id: start\n * kind: task\n * type: log.write\n * ```\n */\nexport interface WorkflowDefinitionDsl {\n /** DSL version of this workflow definition. */\n version?: string;\n\n /** Workflow-level markdown/plaintext description for humans. */\n description?: string;\n\n /** Workflow input declarations or defaults. */\n inputs?: Record<string, any>;\n\n /** Workflow-scoped reusable values available to expressions. */\n variables?: Record<string, any>;\n\n /** Top-level executable node sequence. */\n nodes: WorkflowNodeDefinition[];\n\n /** Optional workflow triggers that can create executions. */\n triggers?: WorkflowTriggerDefinition[];\n\n /** Workflow-level custom annotations for tooling. */\n metadata?: Record<string, any>;\n}\n\n/**\n * Provider metadata declared by `@WorkflowNodeProvider(...)`.\n *\n * This is not saved inside workflow YAML. It describes how a `type` behaves,\n * how it is edited, what docs are shown, and what runtime features are enabled.\n *\n * Example provider fragment:\n * ```ts\n * @WorkflowNodeProvider({\n * type: 'http.request',\n * kind: 'task',\n * authoring: {\n * configurationFields: [{ key: 'uri', required: true, valueType: 'uri' }]\n * }\n * })\n * ```\n */\nexport interface WorkflowNodeProviderMetadata {\n /** Provider type key matched by `WorkflowNodeDefinition.type`. */\n type: string;\n\n /** Node kind supported by this provider. */\n kind: WorkflowNodeKind;\n\n /** Provider metadata version, independent from workflow DSL version. */\n version?: string;\n\n /** Top-level palette/docs grouping. */\n category?: string;\n\n /** Secondary palette/docs grouping. */\n subcategory?: string;\n\n /** Human label shown in node cards, palettes, dialogs, and docs. */\n label?: string;\n\n /** Human description shown in docs and selection surfaces. */\n description?: string;\n\n /** Icon key consumed by the UI icon resolver. */\n icon?: string;\n\n /** Search/filter tags for palette and docs surfaces. */\n tags?: string[];\n\n /** Alternate type/search labels accepted for discovery. */\n aliases?: string[];\n\n /** Machine schema for node configuration validation. */\n configSchema?: Record<string, any>;\n\n /** Optional schema hints for configuration UI. */\n uiSchema?: Record<string, any>;\n\n /** Machine schema describing the node output payload. */\n outputSchema?: Record<string, any>;\n\n /** Documentation examples shown in node docs. */\n examples?: WorkflowNodeExampleDefinition[];\n\n /** Runtime metrics emitted or documented by the node. */\n metrics?: WorkflowNodeMetricDefinition[];\n\n /** Reference material for docs, such as expression variables or output fields. */\n definitions?: WorkflowNodeReferenceDefinition[];\n\n /** Authoring metadata that defines the editable surface for this node type. */\n authoring?: WorkflowNodeAuthoringMetadata;\n\n /** Runtime capability metadata used by execution tooling and docs. */\n runtime?: WorkflowNodeRuntimeMetadata;\n\n /** Human documentation metadata. */\n documentation?: WorkflowNodeDocumentationMetadata;\n\n /** UI integration metadata for custom editors, docs, palette, and layout hints. */\n ui?: WorkflowNodeUiMetadata;\n}\n\n/**\n * Declares which parts of a node are editable in generic authoring UI.\n *\n * This metadata is what the topology edit/add modal reads to decide which common\n * fields, configuration fields, and child-slot affordances to expose.\n */\nexport interface WorkflowNodeAuthoringMetadata {\n /** Initial `configuration` object for a newly added node. */\n defaultConfiguration?: Record<string, any>;\n\n /** Schema-driven editable fields that write to `node.configuration`. */\n configurationFields?: WorkflowNodeConfigurationFieldDefinition[];\n\n /** Optional higher-level layout for configuration fields. */\n configurationLayout?: WorkflowNodeConfigurationLayoutDefinition;\n\n /** Child collections owned by this node when `kind: control`. */\n childSlots?: WorkflowNodeChildSlotDefinition[];\n\n /** Documented or typed outputs produced by this node. */\n outputs?: WorkflowNodeOutputDefinition[];\n\n /** Whether this node generally supports expression values. */\n supportsExpressions?: boolean;\n\n /** Expose `retryPolicy` in the edit modal. */\n supportsRetryPolicy?: boolean;\n\n /** Expose `timeoutMs` in the edit modal. */\n supportsTimeoutMs?: boolean;\n\n /** Expose `onError` in the edit modal. */\n supportsOnError?: boolean;\n\n /** Expose `disabled` in the edit modal. */\n supportsDisableToggle?: boolean;\n\n /** Expose the common `name` field in the edit modal. */\n supportsName?: boolean;\n\n /** Expose the common `description` field in the edit modal. */\n supportsDescription?: boolean;\n\n /** Extra searchable text for palette and docs discovery. */\n searchableText?: string[];\n}\n\n/** Declarative layout for schema-driven node configuration fields. */\nexport interface WorkflowNodeConfigurationLayoutDefinition {\n /** Layout strategy. Only `tabs` is currently implemented by the generic UI. */\n type: 'tabs';\n\n /** Tab definitions. Fields not assigned to a tab should fall back to `Other`. */\n tabs: WorkflowNodeConfigurationLayoutTabDefinition[];\n}\n\n/** One configuration tab. Tabs may include explicit fields and/or whole groups. */\nexport interface WorkflowNodeConfigurationLayoutTabDefinition {\n /** Stable tab key. */\n key: string;\n\n /** Human label shown in the editor. */\n label: string;\n\n /** Field keys or field paths to include in this tab. */\n fields?: string[];\n\n /** Group labels to include in this tab. */\n groups?: string[];\n}\n\n/**\n * Describes a control node child collection that can be edited from topology.\n *\n * Child slots tell the renderer and mutation layer which node property contains\n * child nodes and how those children should be arranged.\n *\n * Example for `if`:\n * ```ts\n * { key: 'then', label: 'Then', kind: 'sequence', layout: 'sequential' }\n * ```\n *\n * Example for `switch`:\n * ```ts\n * { key: 'cases', label: 'Cases', kind: 'case-collection', layout: 'parallel' }\n * ```\n */\nexport interface WorkflowNodeChildSlotDefinition {\n /** Property key on `WorkflowNodeDefinition`, for example `tasks`, `then`, `else`, `cases`. */\n key: string;\n\n /** Human label shown in topology or editor summaries. */\n label?: string;\n\n /** Human explanation of what this child slot means. */\n description?: string;\n\n /**\n * Shape of child data.\n *\n * `sequence` means the property is `WorkflowNodeDefinition[]`.\n * `case-collection` means the property is `Record<string, WorkflowNodeDefinition[]>`.\n */\n kind: 'sequence' | 'case-collection';\n\n /**\n * Preferred visual arrangement for children in this slot.\n *\n * `sequential` renders top-to-bottom. `parallel` renders peer lines side-by-side.\n */\n layout?: 'sequential' | 'parallel';\n\n /** Whether a valid node instance should contain this child slot. */\n required?: boolean;\n\n /** Minimum allowed children or cases. */\n minItems?: number;\n\n /** Maximum allowed children or cases. */\n maxItems?: number;\n}\n\n/**\n * Describes one editable field in `WorkflowNodeDefinition.configuration`.\n *\n * These definitions drive the generic schema-based add/edit modal. They are the\n * bridge between provider metadata and the user-editable YAML.\n *\n * Example:\n * ```ts\n * { key: 'uri', label: 'URI', valueType: 'uri', required: true }\n * ```\n * writes:\n * ```yaml\n * configuration:\n * uri: https://example.com\n * ```\n */\nexport interface WorkflowNodeConfigurationFieldDefinition {\n /** Stable field key and default path within `configuration`. */\n key: string;\n\n /** Human label shown above the form field. */\n label?: string;\n\n /** Help text shown below or near the field. */\n description?: string;\n\n /** Logical type used for validation, docs badges, and default editor selection. */\n valueType?: WorkflowNodeConfigurationValueType;\n\n /** Whether this field must be present for a valid node configuration. */\n required?: boolean;\n\n /** Dot-path override inside `configuration`; defaults to `key`. */\n path?: string;\n\n /** Whether the field supports expression strings like `{{ inputs.value }}`. */\n expressionAllowed?: boolean;\n\n /** Whether the field supports secret references or secret handling. */\n secretAllowed?: boolean;\n\n /** Initial value used when creating a new node of this type. */\n defaultValue?: any;\n\n /** Fixed option list rendered as a select-like control. */\n enumValues?: Array<string | number | boolean>;\n\n /** Example values for docs and future inline help. */\n examples?: any[];\n\n /** Form grouping label used to visually cluster related fields. */\n group?: string;\n\n /** Preferred generic widget, for example `textarea`, `yaml-editor`, or `json-editor`. */\n widgetHint?: string;\n\n /** Custom field editor component registry key. */\n extensionComponentKey?: string;\n\n /** Optional machine schema for this specific field. */\n schema?: Record<string, any>;\n\n /** Optional UI schema for this specific field. */\n uiSchema?: Record<string, any>;\n}\n\n/** Describes one output value produced by a node provider. */\nexport interface WorkflowNodeOutputDefinition {\n /** Stable output key. */\n key: string;\n\n /** Human label for docs. */\n label?: string;\n\n /** Human explanation of the output. */\n description?: string;\n\n /** Logical value type of the output. */\n valueType?: WorkflowNodeConfigurationValueType;\n\n /** Dot path inside the runtime output object. */\n path?: string;\n\n /** Whether the output is expected on successful execution. */\n required?: boolean;\n\n /** Optional machine schema for this output value. */\n schema?: Record<string, any>;\n}\n\n/** Documents a runtime metric associated with a node provider. */\nexport interface WorkflowNodeMetricDefinition {\n /** Stable metric key. */\n key: string;\n\n /** Human label for docs. */\n label?: string;\n\n /** Human explanation of the metric. */\n description?: string;\n\n /** Metric shape. */\n type?: 'counter' | 'gauge' | 'histogram' | 'timer' | 'summary';\n\n /** Unit label, for example `ms`, `bytes`, or `count`. */\n unit?: string;\n\n /** Dot path if derived from output or execution context. */\n path?: string;\n\n /** Metric tags emitted with the value. */\n tags?: string[];\n}\n\n/** Example snippet shown in node documentation. */\nexport interface WorkflowNodeExampleDefinition {\n /** Stable example key. */\n key: string;\n\n /** Human example title. */\n label?: string;\n\n /** Short explanation of what the example demonstrates. */\n description?: string;\n\n /** Snippet language for syntax highlighting. */\n language?: 'json' | 'yaml' | 'javascript' | 'typescript' | 'text';\n\n /** The example source text. */\n snippet: string;\n\n /** True when the snippet only represents `configuration`, not a full node. */\n configurationOnly?: boolean;\n\n /** Custom annotations for docs tooling. */\n metadata?: Record<string, any>;\n}\n\n/** Additional reference block shown in node documentation. */\nexport interface WorkflowNodeReferenceDefinition {\n /** Stable reference key. */\n key: string;\n\n /** Human reference title. */\n label?: string;\n\n /** Short explanation of the reference. */\n description?: string;\n\n /** Main reference content. */\n content?: string;\n\n /** Examples attached to this reference block. */\n examples?: WorkflowNodeExampleDefinition[];\n\n /** Optional machine schema for referenced data. */\n schema?: Record<string, any>;\n\n /** Custom annotations for docs tooling. */\n metadata?: Record<string, any>;\n}\n\n/** Runtime capability metadata for a node provider. */\nexport interface WorkflowNodeRuntimeMetadata {\n /** Whether the node commonly emits log entries. */\n emitsLogs?: boolean;\n\n /** Whether the node may emit artifacts. */\n emitsArtifacts?: boolean;\n\n /** Whether the same input should produce stable output. */\n deterministicOutputs?: boolean;\n\n /** Whether execution is a normal task handler or engine-orchestrated control flow. */\n executionMode?: 'task' | 'engine-controlled';\n\n /** Statuses considered successful for this node type. */\n successStatuses?: WorkflowStepExecutionStatus[];\n}\n\n/** Human-facing documentation metadata for a node provider. */\nexport interface WorkflowNodeDocumentationMetadata {\n /** Short docs summary shown in node documentation surfaces. */\n summary?: string;\n}\n\n/** UI integration metadata for node authoring and documentation. */\nexport interface WorkflowNodeUiMetadata {\n /** Icon key used by topology cards, palette items, and docs. */\n icon?: string;\n\n /** Icon foreground color used by palette/dialog/topology surfaces. */\n iconColor?: string;\n\n /** Icon tile background color used by palette/dialog/topology surfaces. */\n iconBackgroundColor?: string;\n\n /** Optional icon tile border color for richer palette treatments. */\n iconBorderColor?: string;\n\n /** Custom full-node editor component registry key. */\n editorComponentKey?: string;\n\n /** Custom documentation component registry key. */\n docsComponentKey?: string;\n\n /** Custom palette item component registry key. */\n paletteComponentKey?: string;\n\n /** Default edit mode: generic schema form or custom editor. */\n defaultEditorMode?: 'schema' | 'custom';\n\n /** Per-field custom editor component registry keys keyed by configuration field key. */\n fieldComponentKeys?: Record<string, string>;\n\n /** Preferred modal size for add/edit UI. */\n modalSize?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\n /** Optional visual hints for docs/editor/topology layout. */\n layoutHints?: {\n /** Preferred workflow page panel when this node is focused. */\n preferredPanel?: 'code' | 'flow' | 'docs';\n\n /** Preferred order for configuration field groups. */\n groupOrder?: string[];\n\n /** Whether a summary should remain visible while editing long forms. */\n stickySummary?: boolean;\n };\n}\n\n/**\n * Serialized provider metadata returned to the frontend.\n *\n * This intentionally mirrors `WorkflowNodeProviderMetadata` so the UI can render\n * the palette, docs modal, topology cards, and add/edit dialog without importing\n * backend provider classes.\n */\nexport interface WorkflowNodeMetadataResponse {\n /** Provider type key matched by `WorkflowNodeDefinition.type`. */\n type: string;\n\n /** Node kind supported by this provider. */\n kind: WorkflowNodeKind;\n\n /** Provider metadata version. */\n version?: string;\n\n /** Top-level palette/docs grouping. */\n category?: string;\n\n /** Secondary palette/docs grouping. */\n subcategory?: string;\n\n /** Human label shown in UI. */\n label?: string;\n\n /** Human description shown in UI. */\n description?: string;\n\n /** Icon key consumed by the UI icon resolver. */\n icon?: string;\n\n /** Search/filter tags. */\n tags?: string[];\n\n /** Machine schema for node configuration validation. */\n configSchema?: Record<string, any>;\n\n /** Optional schema hints for configuration UI. */\n uiSchema?: Record<string, any>;\n\n /** Machine schema describing node output payload. */\n outputSchema?: Record<string, any>;\n\n /** Documentation examples. */\n examples?: WorkflowNodeExampleDefinition[];\n\n /** Runtime metrics. */\n metrics?: WorkflowNodeMetricDefinition[];\n\n /** Reference docs blocks. */\n definitions?: WorkflowNodeReferenceDefinition[];\n\n /** Authoring metadata consumed by generic UI. */\n authoring?: WorkflowNodeAuthoringMetadata;\n\n /** Runtime capability metadata. */\n runtime?: WorkflowNodeRuntimeMetadata;\n\n /** Human documentation metadata. */\n documentation?: WorkflowNodeDocumentationMetadata;\n\n /** UI integration metadata. */\n ui?: WorkflowNodeUiMetadata;\n}\n\n/** Return value from a node execution handler. */\nexport interface WorkflowNodeHandlerResult {\n /** Final step status; defaults are inferred when omitted. */\n status?: WorkflowStepExecutionStatus;\n\n /** Output payload stored under this node id for downstream expressions. */\n output?: any;\n\n /** Artifacts emitted by this node execution. */\n artifacts?: WorkflowArtifactEmitRequest[];\n}\n\n/** Log entry emitted by node handlers during workflow execution. */\nexport interface WorkflowLogEmitRequest {\n /** Log level. */\n level?: 'debug' | 'info' | 'warn' | 'error';\n\n /** Human log message. */\n message: string;\n\n /** Optional structured event type. */\n eventType?: string;\n\n /** Optional source label, usually node/provider related. */\n source?: string;\n\n /** Structured context values for querying/debugging. */\n context?: Record<string, any>;\n\n /** Custom annotations for log consumers. */\n metadata?: Record<string, any>;\n}\n\n/** Artifact emitted by a node execution. */\nexport interface WorkflowArtifactEmitRequest {\n /** Human or stable artifact name. */\n name: string;\n\n /** Human explanation of the artifact. */\n description?: string;\n\n /** Logical artifact kind, for example `file`, `json`, or `report`. */\n artifactType?: string;\n\n /** URI where the artifact can be fetched. */\n uri?: string;\n\n /** File name when the artifact maps to a file. */\n fileName?: string;\n\n /** MIME type when known. */\n mimeType?: string;\n\n /** Artifact size in bytes when known. */\n sizeBytes?: number;\n\n /** Optional checksum for integrity checks. */\n checksum?: string;\n\n /** Inline payload for small artifacts. */\n payload?: any;\n\n /** Custom annotations for artifact consumers. */\n metadata?: Record<string, any>;\n}\n\n/** Expression service available to node handlers. */\nexport interface WorkflowExpressionResolver {\n /** Recursively interpolates expression strings inside a value. */\n interpolate<T = any>(value: T, context: WorkflowRuntimeContext): T;\n\n /** Evaluates a condition-like expression to a boolean. */\n evaluateCondition(expression: any, context: WorkflowRuntimeContext): boolean;\n\n /** Resolves one expression string against runtime context. */\n resolveExpression(expression: string, context: WorkflowRuntimeContext): any;\n}\n\n/** Runtime context shared by workflow execution and node execution. */\nexport interface WorkflowRuntimeContext {\n /** Parent workflow execution entity. */\n execution: WorkflowExecution;\n\n /** Current step execution, when inside a node handler. */\n stepExecution?: WorkflowStepExecution;\n\n /** Current node definition, when inside a node handler. */\n node?: WorkflowNodeDefinition;\n\n /** Input values supplied when execution was requested. */\n input: Record<string, any>;\n\n /** Workflow variables from DSL plus request-time overrides. */\n variables: Record<string, any>;\n\n /** Decrypted global secrets available to workflow expressions. */\n secrets?: Record<string, any>;\n\n /** Outputs keyed by node id. */\n outputs: Record<string, any>;\n\n /** Internal counters used to generate stable execution/log ordering. */\n counters?: {\n /** Step counter. */\n step: number;\n\n /** Log counter. */\n log: number;\n };\n\n /** Current item for itemized/iterative control nodes. */\n item?: any;\n\n /** Current item index for itemized/iterative control nodes. */\n index?: number;\n\n /** Parent control node id when executing nested child nodes. */\n parentNodeId?: string;\n\n /** Parent step execution key when executing nested child nodes. */\n parentStepExecutionKey?: string;\n}\n\n/**\n * Node-handler execution context.\n *\n * This extends runtime context with guaranteed current-node values, expression\n * helpers, nested execution helpers, and emitters.\n */\nexport interface WorkflowNodeExecutionContext extends WorkflowRuntimeContext {\n /** Current node definition being executed. */\n node: WorkflowNodeDefinition;\n\n /** Current step execution entity. */\n stepExecution: WorkflowStepExecution;\n\n /** Expression helper bound to the current runtime context. */\n expression: WorkflowExpressionResolver;\n\n /** Execute child nodes with optional context overrides. Used by control nodes. */\n runNodes(\n nodes: WorkflowNodeDefinition[],\n options?: Partial<WorkflowRuntimeContext>,\n ): Promise<Record<string, any>>;\n\n /** Emit a structured log entry for this node execution. */\n emitLog(entry: WorkflowLogEmitRequest): Promise<void>;\n\n /** Emit an artifact for this node execution. */\n emitArtifact(entry: WorkflowArtifactEmitRequest): Promise<void>;\n}\n\n/** Request payload for starting a workflow execution. */\nexport interface WorkflowExecutionRequest {\n /** Input values supplied by caller. */\n input?: Record<string, any>;\n\n /** Variable overrides supplied by caller. */\n variables?: Record<string, any>;\n\n /** Trigger source/type if execution was trigger-created. */\n triggerType?: string;\n\n /** User id responsible for the request, when available. */\n requestedByUserId?: number;\n}\n\n/** API response describing a workflow execution. */\nexport interface WorkflowExecutionResponse {\n /** Database id. */\n id: number;\n\n /** Public/stable execution identifier. */\n executionIdentifier: string;\n\n /** Workflow key that was executed. */\n workflowKey: string;\n\n /** Current or final execution status. */\n status: WorkflowExecutionStatus;\n\n /** Execution start timestamp. */\n startedAt: Date;\n\n /** Execution finish timestamp, if completed. */\n finishedAt?: Date;\n\n /** Execution duration in milliseconds, if completed. */\n durationMs?: number;\n\n /** Final workflow output payload. */\n outputPayload?: any;\n\n /** Human-readable failure summary, when failed. */\n errorSummary?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"workflow-dsl.types.js","sourceRoot":"","sources":["../../src/types/workflow-dsl.types.ts"],"names":[],"mappings":"","sourcesContent":["import { WorkflowExecution } from '../entities/workflow-execution.entity';\nimport { WorkflowStepExecution } from '../entities/workflow-step-execution.entity';\n\n/**\n * Declares the execution role of a node in the workflow graph.\n *\n * - `task`: performs one unit of work, for example `log.write` or `http.request`.\n * - `control`: owns child-node execution semantics, for example `if`, `parallel`, `sequential`, or `switch`.\n * - `subflow`: reserved for invoking another workflow as a node.\n *\n * Example:\n * ```yaml\n * kind: control\n * type: if\n * ```\n */\nexport type WorkflowNodeKind = 'task' | 'control' | 'subflow';\n\n/**\n * Describes the logical value type of a configurable node field.\n *\n * This powers schema-driven authoring UI, validation messaging, docs badges, and future field-editor selection.\n *\n * Example:\n * ```yaml\n * configuration:\n * uri: \"{{ variables.defaultUrl }}\" # valueType: uri, expressionAllowed: true\n * ```\n */\nexport type WorkflowNodeConfigurationValueType =\n | 'string'\n | 'number'\n | 'integer'\n | 'boolean'\n | 'object'\n | 'array'\n | 'json'\n | 'secret'\n | 'expression'\n | 'relation'\n | 'uri'\n | 'any';\n\n/** Lifecycle status for an entire workflow execution. */\nexport type WorkflowExecutionStatus =\n | 'enqueued'\n | 'created'\n | 'running'\n | 'success'\n | 'failed'\n | 'cancelled';\n\n/** Lifecycle status for one node execution inside a workflow execution. */\nexport type WorkflowStepExecutionStatus =\n | 'created'\n | 'running'\n | 'success'\n | 'failed'\n | 'skipped';\n\n/**\n * Retry behavior attached to a node instance in the workflow YAML.\n *\n * This belongs to the editable runtime surface when a node provider sets\n * `authoring.supportsRetryPolicy`.\n *\n * Example:\n * ```yaml\n * retryPolicy:\n * maxRetries: 3\n * delayMs: 1000\n * ```\n */\nexport interface WorkflowRetryPolicy {\n /** Maximum number of retry attempts after the initial failure. */\n maxRetries?: number;\n\n /** Delay between retry attempts in milliseconds. */\n delayMs?: number;\n}\n\n/**\n * A concrete node instance inside `WorkflowDefinitionDsl.nodes` or inside a\n * control node child slot.\n *\n * This is the author-facing DSL shape saved in `definitionYaml`. The topology\n * renderer interprets `kind`, `type`, and child-slot keys (`tasks`, `then`,\n * `else`, `cases`, `defaults`) to draw the graph dynamically. The edit modal\n * exposes common fields plus `configuration` fields declared by the matching\n * `WorkflowNodeProviderMetadata.authoring` metadata.\n *\n * Example:\n * ```yaml\n * - id: check_status\n * name: Check status\n * kind: control\n * type: if\n * configuration:\n * condition: \"{{ outputs.http_request.code != 200 }}\"\n * then:\n * - id: alert\n * kind: task\n * type: log.write\n * configuration:\n * message: Server is down\n * ```\n */\nexport interface WorkflowNodeDefinition {\n /** Stable unique identifier for output lookup, execution tracking, and UI mutations. */\n id: string;\n\n /** Optional display label for the node card; UI can fall back to `id`. */\n name?: string;\n\n /** Optional human-readable note explaining what this node does. */\n description?: string;\n\n /** Declares whether this is a work node, control-flow node, or subflow node. */\n kind: WorkflowNodeKind;\n\n /**\n * Provider type key used to resolve execution handler, schema, docs, icon, and\n * authoring metadata. Examples: `log.write`, `http.request`, `if`, `switch`.\n */\n type: string;\n\n /** When true, the engine skips this node at runtime. */\n disabled?: boolean;\n\n /** Optional node execution timeout in milliseconds. */\n timeoutMs?: number;\n\n /** Optional retry policy for failed task execution. */\n retryPolicy?: WorkflowRetryPolicy;\n\n /** Error behavior: `fail` stops the workflow; `continue` moves to the next node. */\n onError?: 'fail' | 'continue';\n\n /**\n * Provider-specific input properties for this node.\n *\n * Think of this as the node's input payload: each provider declares which\n * properties it accepts, and the schema-driven form writes those properties\n * into this object using `WorkflowNodeConfigurationFieldDefinition.path` or\n * `.key`.\n *\n * Values may be literals or expression strings. When expressions are allowed\n * for a field, the runtime evaluates them against workflow context before the\n * node handler receives the effective input value.\n *\n * Example for `type: http.request`:\n * ```yaml\n * configuration:\n * method: GET\n * uri: \"{{ variables.defaultUrl }}\"\n * ```\n */\n configuration?: Record<string, any>;\n\n /** Non-runtime custom annotations for tooling and future extensions. */\n metadata?: Record<string, any>;\n\n /**\n * Ordered child nodes for control nodes that own a generic task collection.\n *\n * Used by grouping controls such as `sequential` and `parallel`, and also by\n * loop-style controls where the same child task collection is executed for\n * each item or iteration. The control node defines the execution semantics;\n * this property defines the child nodes that participate.\n *\n * Example for `type: sequential`:\n * ```yaml\n * tasks:\n * - id: first\n * kind: task\n * type: log.write\n * - id: second\n * kind: task\n * type: log.write\n * ```\n */\n tasks?: WorkflowNodeDefinition[];\n\n /**\n * Child nodes executed when an `if` control node condition resolves truthy.\n *\n * Example:\n * ```yaml\n * then:\n * - id: server_unreachable_alert\n * kind: task\n * type: log.write\n * ```\n */\n then?: WorkflowNodeDefinition[];\n\n /** Child nodes executed when an `if` control node condition resolves falsey. */\n else?: WorkflowNodeDefinition[];\n\n /** Child nodes executed when no `switch.cases` entry matches the switch value. */\n defaults?: WorkflowNodeDefinition[];\n\n /** Child nodes executed when this node or its child subtree fails. */\n errors?: WorkflowNodeDefinition[];\n\n /**\n * Named child-node collections for `switch`.\n *\n * Keys are case values. Values are the nodes that run when the evaluated switch\n * value matches that key.\n *\n * Example:\n * ```yaml\n * cases:\n * true:\n * - id: is_true\n * kind: task\n * type: log.write\n * false:\n * - id: is_false\n * kind: task\n * type: log.write\n * ```\n */\n cases?: Record<string, WorkflowNodeDefinition[]>;\n}\n\n/**\n * A workflow trigger definition.\n *\n * Triggers start workflow executions, but they are not part of the main node\n * sequence rendered in topology.\n */\nexport interface WorkflowTriggerDefinition {\n /** Stable trigger id within the workflow. */\n id: string;\n\n /** Optional display label for UI surfaces. */\n name?: string;\n\n /** Trigger provider key, for example a schedule trigger type. */\n type: string;\n\n /** Provider-specific trigger settings. */\n configuration?: Record<string, any>;\n\n /** When true, the trigger is defined but inactive. */\n disabled?: boolean;\n\n /** Custom annotations for trigger tooling. */\n metadata?: Record<string, any>;\n}\n\n/**\n * Root workflow DSL document saved as YAML.\n *\n * Rendering phases are:\n * 1. fetch `definitionYaml`;\n * 2. parse YAML into this shape;\n * 3. validate this shape and all nested nodes;\n * 4. render topology using node provider metadata and child-slot rules.\n *\n * Example:\n * ```yaml\n * version: 1.0.0\n * variables:\n * defaultUrl: https://example.com\n * nodes:\n * - id: start\n * kind: task\n * type: log.write\n * ```\n */\nexport interface WorkflowDefinitionDsl {\n /** DSL version of this workflow definition. */\n version?: string;\n\n /** Workflow-level markdown/plaintext description for humans. */\n description?: string;\n\n /** Workflow input declarations or defaults. */\n inputs?: Record<string, any>;\n\n /** Workflow-scoped reusable values available to expressions. */\n variables?: Record<string, any>;\n\n /** Top-level executable node sequence. */\n nodes: WorkflowNodeDefinition[];\n\n /** Optional workflow triggers that can create executions. */\n triggers?: WorkflowTriggerDefinition[];\n\n /** Workflow-level error handler nodes executed sequentially when execution fails. */\n errors?: WorkflowNodeDefinition[];\n\n /** Workflow-level cleanup nodes executed sequentially after success or failure. */\n finally?: WorkflowNodeDefinition[];\n\n /** Workflow-level custom annotations for tooling. */\n metadata?: Record<string, any>;\n}\n\n/**\n * Provider metadata declared by `@WorkflowNodeProvider(...)`.\n *\n * This is not saved inside workflow YAML. It describes how a `type` behaves,\n * how it is edited, what docs are shown, and what runtime features are enabled.\n *\n * Example provider fragment:\n * ```ts\n * @WorkflowNodeProvider({\n * type: 'http.request',\n * kind: 'task',\n * authoring: {\n * configurationFields: [{ key: 'uri', required: true, valueType: 'uri' }]\n * }\n * })\n * ```\n */\nexport interface WorkflowNodeProviderMetadata {\n /** Provider type key matched by `WorkflowNodeDefinition.type`. */\n type: string;\n\n /** Node kind supported by this provider. */\n kind: WorkflowNodeKind;\n\n /** Provider metadata version, independent from workflow DSL version. */\n version?: string;\n\n /** Top-level palette/docs grouping. */\n category?: string;\n\n /** Secondary palette/docs grouping. */\n subcategory?: string;\n\n /** Human label shown in node cards, palettes, dialogs, and docs. */\n label?: string;\n\n /** Human description shown in docs and selection surfaces. */\n description?: string;\n\n /** Icon key consumed by the UI icon resolver. */\n icon?: string;\n\n /** Search/filter tags for palette and docs surfaces. */\n tags?: string[];\n\n /** Alternate type/search labels accepted for discovery. */\n aliases?: string[];\n\n /** Machine schema for node configuration validation. */\n configSchema?: Record<string, any>;\n\n /** Optional schema hints for configuration UI. */\n uiSchema?: Record<string, any>;\n\n /** Machine schema describing the node output payload. */\n outputSchema?: Record<string, any>;\n\n /** Documentation examples shown in node docs. */\n examples?: WorkflowNodeExampleDefinition[];\n\n /** Runtime metrics emitted or documented by the node. */\n metrics?: WorkflowNodeMetricDefinition[];\n\n /** Reference material for docs, such as expression variables or output fields. */\n definitions?: WorkflowNodeReferenceDefinition[];\n\n /** Authoring metadata that defines the editable surface for this node type. */\n authoring?: WorkflowNodeAuthoringMetadata;\n\n /** Runtime capability metadata used by execution tooling and docs. */\n runtime?: WorkflowNodeRuntimeMetadata;\n\n /** Human documentation metadata. */\n documentation?: WorkflowNodeDocumentationMetadata;\n\n /** UI integration metadata for custom editors, docs, palette, and layout hints. */\n ui?: WorkflowNodeUiMetadata;\n}\n\n/**\n * Declares which parts of a node are editable in generic authoring UI.\n *\n * This metadata is what the topology edit/add modal reads to decide which common\n * fields, configuration fields, and child-slot affordances to expose.\n */\nexport interface WorkflowNodeAuthoringMetadata {\n /** Initial `configuration` object for a newly added node. */\n defaultConfiguration?: Record<string, any>;\n\n /** Schema-driven editable fields that write to `node.configuration`. */\n configurationFields?: WorkflowNodeConfigurationFieldDefinition[];\n\n /** Optional higher-level layout for configuration fields. */\n configurationLayout?: WorkflowNodeConfigurationLayoutDefinition;\n\n /** Child collections owned by this node when `kind: control`. */\n childSlots?: WorkflowNodeChildSlotDefinition[];\n\n /** Documented or typed outputs produced by this node. */\n outputs?: WorkflowNodeOutputDefinition[];\n\n /** Whether this node generally supports expression values. */\n supportsExpressions?: boolean;\n\n /** Expose `retryPolicy` in the edit modal. */\n supportsRetryPolicy?: boolean;\n\n /** Expose `timeoutMs` in the edit modal. */\n supportsTimeoutMs?: boolean;\n\n /** Expose `onError` in the edit modal. */\n supportsOnError?: boolean;\n\n /** Expose `disabled` in the edit modal. */\n supportsDisableToggle?: boolean;\n\n /** Expose the common `name` field in the edit modal. */\n supportsName?: boolean;\n\n /** Expose the common `description` field in the edit modal. */\n supportsDescription?: boolean;\n\n /** Extra searchable text for palette and docs discovery. */\n searchableText?: string[];\n}\n\n/** Declarative layout for schema-driven node configuration fields. */\nexport interface WorkflowNodeConfigurationLayoutDefinition {\n /** Layout strategy. Only `tabs` is currently implemented by the generic UI. */\n type: 'tabs';\n\n /** Tab definitions. Fields not assigned to a tab should fall back to `Other`. */\n tabs: WorkflowNodeConfigurationLayoutTabDefinition[];\n}\n\n/** One configuration tab. Tabs may include explicit fields and/or whole groups. */\nexport interface WorkflowNodeConfigurationLayoutTabDefinition {\n /** Stable tab key. */\n key: string;\n\n /** Human label shown in the editor. */\n label: string;\n\n /** Field keys or field paths to include in this tab. */\n fields?: string[];\n\n /** Group labels to include in this tab. */\n groups?: string[];\n}\n\n/**\n * Describes a control node child collection that can be edited from topology.\n *\n * Child slots tell the renderer and mutation layer which node property contains\n * child nodes and how those children should be arranged.\n *\n * Example for `if`:\n * ```ts\n * { key: 'then', label: 'Then', kind: 'sequence', layout: 'sequential' }\n * ```\n *\n * Example for `switch`:\n * ```ts\n * { key: 'cases', label: 'Cases', kind: 'case-collection', layout: 'parallel' }\n * ```\n */\nexport interface WorkflowNodeChildSlotDefinition {\n /** Property key on `WorkflowNodeDefinition`, for example `tasks`, `then`, `else`, `cases`. */\n key: string;\n\n /** Human label shown in topology or editor summaries. */\n label?: string;\n\n /** Human explanation of what this child slot means. */\n description?: string;\n\n /**\n * Shape of child data.\n *\n * `sequence` means the property is `WorkflowNodeDefinition[]`.\n * `case-collection` means the property is `Record<string, WorkflowNodeDefinition[]>`.\n */\n kind: 'sequence' | 'case-collection';\n\n /**\n * Preferred visual arrangement for children in this slot.\n *\n * `sequential` renders top-to-bottom. `parallel` renders peer lines side-by-side.\n */\n layout?: 'sequential' | 'parallel';\n\n /** Whether a valid node instance should contain this child slot. */\n required?: boolean;\n\n /** Minimum allowed children or cases. */\n minItems?: number;\n\n /** Maximum allowed children or cases. */\n maxItems?: number;\n}\n\n/**\n * Describes one editable field in `WorkflowNodeDefinition.configuration`.\n *\n * These definitions drive the generic schema-based add/edit modal. They are the\n * bridge between provider metadata and the user-editable YAML.\n *\n * Example:\n * ```ts\n * { key: 'uri', label: 'URI', valueType: 'uri', required: true }\n * ```\n * writes:\n * ```yaml\n * configuration:\n * uri: https://example.com\n * ```\n */\nexport interface WorkflowNodeConfigurationFieldDefinition {\n /** Stable field key and default path within `configuration`. */\n key: string;\n\n /** Human label shown above the form field. */\n label?: string;\n\n /** Help text shown below or near the field. */\n description?: string;\n\n /** Logical type used for validation, docs badges, and default editor selection. */\n valueType?: WorkflowNodeConfigurationValueType;\n\n /** Whether this field must be present for a valid node configuration. */\n required?: boolean;\n\n /** Dot-path override inside `configuration`; defaults to `key`. */\n path?: string;\n\n /** Whether the field supports expression strings like `{{ inputs.value }}`. */\n expressionAllowed?: boolean;\n\n /** Whether the field supports secret references or secret handling. */\n secretAllowed?: boolean;\n\n /** Initial value used when creating a new node of this type. */\n defaultValue?: any;\n\n /** Fixed option list rendered as a select-like control. */\n enumValues?: Array<string | number | boolean>;\n\n /** Example values for docs and future inline help. */\n examples?: any[];\n\n /** Form grouping label used to visually cluster related fields. */\n group?: string;\n\n /** Preferred generic widget, for example `textarea`, `yaml-editor`, or `json-editor`. */\n widgetHint?: string;\n\n /** Custom field editor component registry key. */\n extensionComponentKey?: string;\n\n /** Optional machine schema for this specific field. */\n schema?: Record<string, any>;\n\n /** Optional UI schema for this specific field. */\n uiSchema?: Record<string, any>;\n}\n\n/** Describes one output value produced by a node provider. */\nexport interface WorkflowNodeOutputDefinition {\n /** Stable output key. */\n key: string;\n\n /** Human label for docs. */\n label?: string;\n\n /** Human explanation of the output. */\n description?: string;\n\n /** Logical value type of the output. */\n valueType?: WorkflowNodeConfigurationValueType;\n\n /** Dot path inside the runtime output object. */\n path?: string;\n\n /** Whether the output is expected on successful execution. */\n required?: boolean;\n\n /**\n * Whether this output is added to `outputs.<nodeId>` for downstream expressions.\n * Defaults to true. Set false for observability-only outputs that should be\n * stored on the step execution but not suggested or exposed to later nodes.\n */\n includeInRuntimeContext?: boolean;\n\n /** Optional machine schema for this output value. */\n schema?: Record<string, any>;\n}\n\n/** Documents a runtime metric associated with a node provider. */\nexport interface WorkflowNodeMetricDefinition {\n /** Stable metric key. */\n key: string;\n\n /** Human label for docs. */\n label?: string;\n\n /** Human explanation of the metric. */\n description?: string;\n\n /** Metric shape. */\n type?: 'counter' | 'gauge' | 'histogram' | 'timer' | 'summary';\n\n /** Unit label, for example `ms`, `bytes`, or `count`. */\n unit?: string;\n\n /** Dot path if derived from output or execution context. */\n path?: string;\n\n /** Metric tags emitted with the value. */\n tags?: string[];\n}\n\n/** Example snippet shown in node documentation. */\nexport interface WorkflowNodeExampleDefinition {\n /** Stable example key. */\n key: string;\n\n /** Human example title. */\n label?: string;\n\n /** Short explanation of what the example demonstrates. */\n description?: string;\n\n /** Snippet language for syntax highlighting. */\n language?: 'json' | 'yaml' | 'javascript' | 'typescript' | 'text';\n\n /** The example source text. */\n snippet: string;\n\n /** True when the snippet only represents `configuration`, not a full node. */\n configurationOnly?: boolean;\n\n /** Custom annotations for docs tooling. */\n metadata?: Record<string, any>;\n}\n\n/** Additional reference block shown in node documentation. */\nexport interface WorkflowNodeReferenceDefinition {\n /** Stable reference key. */\n key: string;\n\n /** Human reference title. */\n label?: string;\n\n /** Short explanation of the reference. */\n description?: string;\n\n /** Main reference content. */\n content?: string;\n\n /** Examples attached to this reference block. */\n examples?: WorkflowNodeExampleDefinition[];\n\n /** Optional machine schema for referenced data. */\n schema?: Record<string, any>;\n\n /** Custom annotations for docs tooling. */\n metadata?: Record<string, any>;\n}\n\n/** Runtime capability metadata for a node provider. */\nexport interface WorkflowNodeRuntimeMetadata {\n /** Whether the node commonly emits log entries. */\n emitsLogs?: boolean;\n\n /** Whether the node may emit artifacts. */\n emitsArtifacts?: boolean;\n\n /** Whether the same input should produce stable output. */\n deterministicOutputs?: boolean;\n\n /** Whether execution is a normal task handler or engine-orchestrated control flow. */\n executionMode?: 'task' | 'engine-controlled';\n\n /** Statuses considered successful for this node type. */\n successStatuses?: WorkflowStepExecutionStatus[];\n}\n\n/** Human-facing documentation metadata for a node provider. */\nexport interface WorkflowNodeDocumentationMetadata {\n /** Short docs summary shown in node documentation surfaces. */\n summary?: string;\n}\n\n/** UI integration metadata for node authoring and documentation. */\nexport interface WorkflowNodeUiMetadata {\n /** Icon key used by topology cards, palette items, and docs. */\n icon?: string;\n\n /** Icon foreground color used by palette/dialog/topology surfaces. */\n iconColor?: string;\n\n /** Icon tile background color used by palette/dialog/topology surfaces. */\n iconBackgroundColor?: string;\n\n /** Optional icon tile border color for richer palette treatments. */\n iconBorderColor?: string;\n\n /** Custom full-node editor component registry key. */\n editorComponentKey?: string;\n\n /** Custom documentation component registry key. */\n docsComponentKey?: string;\n\n /** Custom palette item component registry key. */\n paletteComponentKey?: string;\n\n /** Default edit mode: generic schema form or custom editor. */\n defaultEditorMode?: 'schema' | 'custom';\n\n /** Per-field custom editor component registry keys keyed by configuration field key. */\n fieldComponentKeys?: Record<string, string>;\n\n /** Preferred modal size for add/edit UI. */\n modalSize?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\n /** Optional visual hints for docs/editor/topology layout. */\n layoutHints?: {\n /** Preferred workflow page panel when this node is focused. */\n preferredPanel?: 'code' | 'flow' | 'docs';\n\n /** Preferred order for configuration field groups. */\n groupOrder?: string[];\n\n /** Whether a summary should remain visible while editing long forms. */\n stickySummary?: boolean;\n };\n}\n\n/**\n * Serialized provider metadata returned to the frontend.\n *\n * This intentionally mirrors `WorkflowNodeProviderMetadata` so the UI can render\n * the palette, docs modal, topology cards, and add/edit dialog without importing\n * backend provider classes.\n */\nexport interface WorkflowNodeMetadataResponse {\n /** Provider type key matched by `WorkflowNodeDefinition.type`. */\n type: string;\n\n /** Node kind supported by this provider. */\n kind: WorkflowNodeKind;\n\n /** Provider metadata version. */\n version?: string;\n\n /** Top-level palette/docs grouping. */\n category?: string;\n\n /** Secondary palette/docs grouping. */\n subcategory?: string;\n\n /** Human label shown in UI. */\n label?: string;\n\n /** Human description shown in UI. */\n description?: string;\n\n /** Icon key consumed by the UI icon resolver. */\n icon?: string;\n\n /** Search/filter tags. */\n tags?: string[];\n\n /** Machine schema for node configuration validation. */\n configSchema?: Record<string, any>;\n\n /** Optional schema hints for configuration UI. */\n uiSchema?: Record<string, any>;\n\n /** Machine schema describing node output payload. */\n outputSchema?: Record<string, any>;\n\n /** Documentation examples. */\n examples?: WorkflowNodeExampleDefinition[];\n\n /** Runtime metrics. */\n metrics?: WorkflowNodeMetricDefinition[];\n\n /** Reference docs blocks. */\n definitions?: WorkflowNodeReferenceDefinition[];\n\n /** Authoring metadata consumed by generic UI. */\n authoring?: WorkflowNodeAuthoringMetadata;\n\n /** Runtime capability metadata. */\n runtime?: WorkflowNodeRuntimeMetadata;\n\n /** Human documentation metadata. */\n documentation?: WorkflowNodeDocumentationMetadata;\n\n /** UI integration metadata. */\n ui?: WorkflowNodeUiMetadata;\n}\n\n/** Return value from a node execution handler. */\nexport interface WorkflowNodeHandlerResult {\n /** Final step status; defaults are inferred when omitted. */\n status?: WorkflowStepExecutionStatus;\n\n /** Output payload stored under this node id for downstream expressions. */\n output?: any;\n\n /** Artifacts emitted by this node execution. */\n artifacts?: WorkflowArtifactEmitRequest[];\n}\n\n/** Log entry emitted by node handlers during workflow execution. */\nexport interface WorkflowLogEmitRequest {\n /** Log level. */\n level?: 'debug' | 'info' | 'warn' | 'error';\n\n /** Human log message. */\n message: string;\n\n /** Optional structured event type. */\n eventType?: string;\n\n /** Optional source label, usually node/provider related. */\n source?: string;\n\n /** Structured context values for querying/debugging. */\n context?: Record<string, any>;\n\n /** Custom annotations for log consumers. */\n metadata?: Record<string, any>;\n}\n\n/** Artifact emitted by a node execution. */\nexport interface WorkflowArtifactEmitRequest {\n /** Human or stable artifact name. */\n name: string;\n\n /** Human explanation of the artifact. */\n description?: string;\n\n /** Logical artifact kind, for example `file`, `json`, or `report`. */\n artifactType?: string;\n\n /** URI where the artifact can be fetched. */\n uri?: string;\n\n /** File name when the artifact maps to a file. */\n fileName?: string;\n\n /** MIME type when known. */\n mimeType?: string;\n\n /** Artifact size in bytes when known. */\n sizeBytes?: number;\n\n /** Optional checksum for integrity checks. */\n checksum?: string;\n\n /** Inline payload for small artifacts. */\n payload?: any;\n\n /** Custom annotations for artifact consumers. */\n metadata?: Record<string, any>;\n}\n\n/** Expression service available to node handlers. */\nexport interface WorkflowExpressionResolver {\n /** Recursively interpolates expression strings inside a value. */\n interpolate<T = any>(value: T, context: WorkflowRuntimeContext): T;\n\n /** Evaluates a condition-like expression to a boolean. */\n evaluateCondition(expression: any, context: WorkflowRuntimeContext): boolean;\n\n /** Resolves one expression string against runtime context. */\n resolveExpression(expression: string, context: WorkflowRuntimeContext): any;\n}\n\n/** Loop context exposed to expressions for nested itemized controls. */\nexport interface WorkflowLoopContext {\n /** Current item for this loop frame. */\n item: any;\n\n /** Zero-based iteration index for this loop frame. */\n index: number;\n\n /** Loop control node id. */\n nodeId?: string;\n\n /** Loop control step execution key. */\n stepExecutionKey?: string;\n}\n\n/** Runtime context shared by workflow execution and node execution. */\nexport interface WorkflowRuntimeContext {\n /** Parent workflow execution entity. */\n execution: WorkflowExecution;\n\n /** Current step execution, when inside a node handler. */\n stepExecution?: WorkflowStepExecution;\n\n /** Current node definition, when inside a node handler. */\n node?: WorkflowNodeDefinition;\n\n /** Input values supplied when execution was requested. */\n input: Record<string, any>;\n\n /** Workflow variables from DSL plus request-time overrides. */\n variables: Record<string, any>;\n\n /** Decrypted global secrets available to workflow expressions. */\n secrets?: Record<string, any>;\n\n /** Outputs keyed by node id. */\n outputs: Record<string, any>;\n\n /** Internal counters used to generate stable execution/log ordering. */\n counters?: {\n /** Step counter. */\n step: number;\n\n /** Log counter. */\n log: number;\n };\n\n /** Current item for itemized/iterative control nodes. */\n item?: any;\n\n /** Current item index for itemized/iterative control nodes. */\n index?: number;\n\n /** Nearest parent loop frame, when inside nested loop children. */\n parent?: WorkflowLoopContext;\n\n /** Parent loop frames, nearest first. */\n parents?: WorkflowLoopContext[];\n\n /** Loop frames from outermost to innermost, including the current loop. */\n loops?: WorkflowLoopContext[];\n\n /** Current error context when executing an error handler. */\n error?: any;\n\n /** Parent control node id when executing nested child nodes. */\n parentNodeId?: string;\n\n /** Parent step execution key when executing nested child nodes. */\n parentStepExecutionKey?: string;\n}\n\n/**\n * Node-handler execution context.\n *\n * This extends runtime context with guaranteed current-node values, expression\n * helpers, nested execution helpers, and emitters.\n */\nexport interface WorkflowNodeExecutionContext extends WorkflowRuntimeContext {\n /** Current node definition being executed. */\n node: WorkflowNodeDefinition;\n\n /** Current step execution entity. */\n stepExecution: WorkflowStepExecution;\n\n /** Expression helper bound to the current runtime context. */\n expression: WorkflowExpressionResolver;\n\n /** Execute child nodes with optional context overrides. Used by control nodes. */\n runNodes(\n nodes: WorkflowNodeDefinition[],\n options?: Partial<WorkflowRuntimeContext>,\n ): Promise<Record<string, any>>;\n\n /** Emit a structured log entry for this node execution. */\n emitLog(entry: WorkflowLogEmitRequest): Promise<void>;\n\n /** Emit an artifact for this node execution. */\n emitArtifact(entry: WorkflowArtifactEmitRequest): Promise<void>;\n}\n\n/** Request payload for starting a workflow execution. */\nexport interface WorkflowExecutionRequest {\n /** Input values supplied by caller. */\n input?: Record<string, any>;\n\n /** Variable overrides supplied by caller. */\n variables?: Record<string, any>;\n\n /** Trigger source/type if execution was trigger-created. */\n triggerType?: string;\n\n /** User id responsible for the request, when available. */\n requestedByUserId?: number;\n}\n\n/** API response describing a workflow execution. */\nexport interface WorkflowExecutionResponse {\n /** Database id. */\n id: number;\n\n /** Public/stable execution identifier. */\n executionIdentifier: string;\n\n /** Workflow key that was executed. */\n workflowKey: string;\n\n /** Current or final execution status. */\n status: WorkflowExecutionStatus;\n\n /** Execution start timestamp. */\n startedAt: Date;\n\n /** Execution finish timestamp, if completed. */\n finishedAt?: Date;\n\n /** Execution duration in milliseconds, if completed. */\n durationMs?: number;\n\n /** Final workflow output payload. */\n outputPayload?: any;\n\n /** Human-readable failure summary, when failed. */\n errorSummary?: string;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidxai/core",
|
|
3
|
-
"version": "0.1.13-beta.
|
|
3
|
+
"version": "0.1.13-beta.21",
|
|
4
4
|
"description": "This module is a NestJS module containing all the required core providers required by a Solid application",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"bcrypt": "^5.1.1",
|
|
46
46
|
"bson": "^6.10.1",
|
|
47
47
|
"cache-manager": "^5.5.2",
|
|
48
|
-
"cache-manager-redis-
|
|
48
|
+
"cache-manager-redis-yet": "^5.1.5",
|
|
49
49
|
"class-transformer": "^0.5.1",
|
|
50
50
|
"class-validator": "^0.14.1",
|
|
51
51
|
"cron-parser": "^5.5.0",
|
|
@@ -3,10 +3,13 @@ import { SubCommand, CommandRunner, Option } from 'nest-commander';
|
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import { ModuleMetadataHelperService } from 'src/helpers/module-metadata-helper.service';
|
|
5
5
|
import { ConsoleReporter } from 'src/testing/reporter/console-reporter';
|
|
6
|
+
import { ProgressReporter } from 'src/testing/reporter/progress-reporter';
|
|
6
7
|
import { WebhookReporter } from 'src/testing/reporter/webhook-reporter';
|
|
7
8
|
import { runFromMetadata } from 'src/testing/runner/run-from-metadata';
|
|
8
9
|
import type { TestingMetadata } from 'src/testing/contracts/testing-metadata.types';
|
|
9
10
|
import { SpecRegistry } from 'src/testing/core/spec-registry';
|
|
11
|
+
import { SettingService } from 'src/services/setting.service';
|
|
12
|
+
import type { SolidCoreSetting } from 'src/services/settings/default-settings-provider.service';
|
|
10
13
|
|
|
11
14
|
interface TestRunCommandOptions {
|
|
12
15
|
module?: string;
|
|
@@ -18,11 +21,14 @@ interface TestRunCommandOptions {
|
|
|
18
21
|
apiBaseUrl?: string;
|
|
19
22
|
uiBaseUrl?: string;
|
|
20
23
|
headless?: boolean;
|
|
24
|
+
uiTimeoutMs?: number;
|
|
25
|
+
uiNavigationTimeoutMs?: number;
|
|
21
26
|
timeoutMs?: number;
|
|
22
27
|
retries?: number;
|
|
23
28
|
listSpecs?: boolean;
|
|
24
29
|
printApiLogs?: boolean;
|
|
25
30
|
runName?: string;
|
|
31
|
+
progress?: boolean;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
@SubCommand({
|
|
@@ -34,6 +40,7 @@ export class TestRunCommand extends CommandRunner {
|
|
|
34
40
|
|
|
35
41
|
constructor(
|
|
36
42
|
private readonly moduleMetadataHelperService: ModuleMetadataHelperService,
|
|
43
|
+
private readonly settingService: SettingService,
|
|
37
44
|
) {
|
|
38
45
|
super();
|
|
39
46
|
}
|
|
@@ -89,13 +96,24 @@ export class TestRunCommand extends CommandRunner {
|
|
|
89
96
|
const apiBaseUrl = options?.apiBaseUrl ?? process.env.BASE_URL;
|
|
90
97
|
const uiBaseUrl = options?.uiBaseUrl ?? process.env.FRONTEND_BASE_URL;
|
|
91
98
|
const headless = options?.headless ?? true;
|
|
99
|
+
const uiTimeoutMs =
|
|
100
|
+
options?.uiTimeoutMs
|
|
101
|
+
?? toPositiveNumber(process.env.UI_TIMEOUT_MS)
|
|
102
|
+
?? toPositiveNumber(this.settingService.getConfigValue<SolidCoreSetting>('uiTestDefaultTimeoutMs'));
|
|
103
|
+
const uiNavigationTimeoutMs =
|
|
104
|
+
options?.uiNavigationTimeoutMs
|
|
105
|
+
?? toPositiveNumber(process.env.UI_NAVIGATION_TIMEOUT_MS)
|
|
106
|
+
?? toPositiveNumber(this.settingService.getConfigValue<SolidCoreSetting>('uiTestNavigationTimeoutMs'));
|
|
92
107
|
const printApiLogs = options?.printApiLogs ?? false;
|
|
93
108
|
|
|
94
109
|
const webhookUrl = process.env.SOLIDCTL_WEBHOOK_URL;
|
|
95
110
|
const runName = options?.runName ?? `run-${Date.now()}`;
|
|
96
|
-
const
|
|
111
|
+
const baseReporter = webhookUrl
|
|
97
112
|
? new WebhookReporter(webhookUrl, runName)
|
|
98
113
|
: new ConsoleReporter();
|
|
114
|
+
const reporter = options?.progress === false
|
|
115
|
+
? baseReporter
|
|
116
|
+
: new ProgressReporter(baseReporter);
|
|
99
117
|
|
|
100
118
|
try {
|
|
101
119
|
await runFromMetadata({
|
|
@@ -105,7 +123,12 @@ export class TestRunCommand extends CommandRunner {
|
|
|
105
123
|
skipScenarioIds,
|
|
106
124
|
reporter,
|
|
107
125
|
api: apiBaseUrl ? { baseUrl: apiBaseUrl } : undefined,
|
|
108
|
-
ui: {
|
|
126
|
+
ui: {
|
|
127
|
+
baseUrl: uiBaseUrl,
|
|
128
|
+
headless,
|
|
129
|
+
defaultTimeoutMs: uiTimeoutMs,
|
|
130
|
+
navigationTimeoutMs: uiNavigationTimeoutMs,
|
|
131
|
+
},
|
|
109
132
|
defaults: {
|
|
110
133
|
timeoutMs: options?.timeoutMs,
|
|
111
134
|
retries: options?.retries,
|
|
@@ -120,8 +143,8 @@ export class TestRunCommand extends CommandRunner {
|
|
|
120
143
|
console.error('Run tests command failed');
|
|
121
144
|
process.exitCode = 1;
|
|
122
145
|
} finally {
|
|
123
|
-
if (
|
|
124
|
-
await
|
|
146
|
+
if (baseReporter instanceof WebhookReporter) {
|
|
147
|
+
await baseReporter.flush(Number(process.exitCode ?? 0));
|
|
125
148
|
}
|
|
126
149
|
}
|
|
127
150
|
return;
|
|
@@ -225,6 +248,26 @@ export class TestRunCommand extends CommandRunner {
|
|
|
225
248
|
return val === 'false' ? false : true;
|
|
226
249
|
}
|
|
227
250
|
|
|
251
|
+
@Option({
|
|
252
|
+
flags: '--ui-timeout-ms [number]',
|
|
253
|
+
description:
|
|
254
|
+
'Default timeout in ms for UI steps (waits, clicks, fills). Defaults to process.env.UI_TIMEOUT_MS, then the uiTestDefaultTimeoutMs setting, then 30000.',
|
|
255
|
+
required: false,
|
|
256
|
+
})
|
|
257
|
+
parseUiTimeoutMs(val: string): number {
|
|
258
|
+
return Number(val);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
@Option({
|
|
262
|
+
flags: '--ui-navigation-timeout-ms [number]',
|
|
263
|
+
description:
|
|
264
|
+
'Default timeout in ms for ui.goto navigation. Defaults to process.env.UI_NAVIGATION_TIMEOUT_MS, then the uiTestNavigationTimeoutMs setting, then --ui-timeout-ms.',
|
|
265
|
+
required: false,
|
|
266
|
+
})
|
|
267
|
+
parseUiNavigationTimeoutMs(val: string): number {
|
|
268
|
+
return Number(val);
|
|
269
|
+
}
|
|
270
|
+
|
|
228
271
|
@Option({
|
|
229
272
|
flags: '--timeout-ms [number]',
|
|
230
273
|
description: 'Default scenario timeout in milliseconds.',
|
|
@@ -251,6 +294,15 @@ export class TestRunCommand extends CommandRunner {
|
|
|
251
294
|
parseRunName(val: string): string {
|
|
252
295
|
return val;
|
|
253
296
|
}
|
|
297
|
+
|
|
298
|
+
@Option({
|
|
299
|
+
flags: '--no-progress',
|
|
300
|
+
description: 'Disable the interactive test progress footer.',
|
|
301
|
+
required: false,
|
|
302
|
+
})
|
|
303
|
+
parseNoProgress(): boolean {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
254
306
|
}
|
|
255
307
|
|
|
256
308
|
function splitCsv(value?: string): string[] | undefined {
|
|
@@ -262,6 +314,14 @@ function splitCsv(value?: string): string[] | undefined {
|
|
|
262
314
|
return items.length ? items : undefined;
|
|
263
315
|
}
|
|
264
316
|
|
|
317
|
+
// Accepts unknown because settings come back already parsed as numbers, while env
|
|
318
|
+
// vars arrive as strings.
|
|
319
|
+
function toPositiveNumber(value?: unknown): number | undefined {
|
|
320
|
+
if (value === null || value === undefined || value === '') return undefined;
|
|
321
|
+
const parsed = Number(value);
|
|
322
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
|
|
323
|
+
}
|
|
324
|
+
|
|
265
325
|
function resolveSpecPath(entry: string, metadataPath: string): string {
|
|
266
326
|
if (path.isAbsolute(entry)) {
|
|
267
327
|
return entry;
|
|
@@ -7,6 +7,7 @@ interface SeedCommandOptions {
|
|
|
7
7
|
seeder?: string;
|
|
8
8
|
modulesToSeed?: string;
|
|
9
9
|
prune?: boolean;
|
|
10
|
+
skipHooks?: boolean;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
@Command({ name: 'seed', description: 'Install seed data for a given module' })
|
|
@@ -28,6 +29,7 @@ export class SeedCommand extends CommandRunner {
|
|
|
28
29
|
modulesToSeed,
|
|
29
30
|
pruneMetadata: false,
|
|
30
31
|
seedGlobalMetadata: true,
|
|
32
|
+
skipHooks: false,
|
|
31
33
|
};
|
|
32
34
|
this.logger.log(`Modules to seed: ${modulesToSeed.join(', ')}`);
|
|
33
35
|
} else {
|
|
@@ -39,10 +41,22 @@ export class SeedCommand extends CommandRunner {
|
|
|
39
41
|
modulesToSeed: null,
|
|
40
42
|
pruneMetadata: false,
|
|
41
43
|
seedGlobalMetadata: true,
|
|
44
|
+
skipHooks: false,
|
|
42
45
|
};
|
|
43
46
|
parsedConf.pruneMetadata = true;
|
|
44
47
|
}
|
|
45
48
|
|
|
49
|
+
if (options?.skipHooks) {
|
|
50
|
+
parsedConf = parsedConf ?? {
|
|
51
|
+
modulesToSeed: null,
|
|
52
|
+
pruneMetadata: false,
|
|
53
|
+
seedGlobalMetadata: true,
|
|
54
|
+
skipHooks: false,
|
|
55
|
+
};
|
|
56
|
+
parsedConf.skipHooks = true;
|
|
57
|
+
this.logger.log('Skipping pre-seed and post-seed hooks.');
|
|
58
|
+
}
|
|
59
|
+
|
|
46
60
|
const seeder = this.solidRegistry
|
|
47
61
|
.getSeeders()
|
|
48
62
|
.filter((seeder) => seeder.name === options.seeder)
|
|
@@ -74,4 +88,9 @@ export class SeedCommand extends CommandRunner {
|
|
|
74
88
|
parsePrune(): boolean {
|
|
75
89
|
return true;
|
|
76
90
|
}
|
|
91
|
+
|
|
92
|
+
@Option({ flags: '--skip-hooks', description: 'Skip emitting pre-seed and post-seed lifecycle hooks/events.' })
|
|
93
|
+
parseSkipHooks(): boolean {
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
77
96
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { CacheModuleAsyncOptions } from '@nestjs/cache-manager';
|
|
2
2
|
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
3
|
-
|
|
3
|
+
// cache-manager-redis-yet, not cache-manager-redis-store. The latter stops at
|
|
4
|
+
// 3.0.1 and implements the cache-manager v4 store contract: it expects an
|
|
5
|
+
// options object and reads `options.ttl` in seconds. cache-manager v5 calls
|
|
6
|
+
// `store.set(key, value, ttl)` with a bare number of milliseconds, so that
|
|
7
|
+
// store found no `.ttl`, fell back to an unset default, and issued a plain
|
|
8
|
+
// `SET` - silently discarding every TTL passed anywhere in the app and leaving
|
|
9
|
+
// Redis keys that never expire. redis-yet implements the v5 contract and
|
|
10
|
+
// writes with `PX`, so millisecond TTLs land correctly.
|
|
11
|
+
import { redisStore } from 'cache-manager-redis-yet';
|
|
4
12
|
import { isRedisConfigured } from 'src/helpers/environment.helper';
|
|
5
13
|
|
|
6
14
|
export const CacheManagerOptions: CacheModuleAsyncOptions = {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { USER_SUMMARY_FIELDS } from 'src/constants/user.constants';
|
|
2
|
+
|
|
1
3
|
export const CHATTER_MESSAGE_TYPE = {
|
|
2
4
|
AUDIT: 'audit',
|
|
3
5
|
CUSTOM: 'custom',
|
|
@@ -16,3 +18,13 @@ export const CHATTER_MESSAGE_STATUS = {
|
|
|
16
18
|
PENDING: 'pending',
|
|
17
19
|
COMPLETED: 'completed',
|
|
18
20
|
} as const;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Columns of the message author exposed by the chatter APIs.
|
|
24
|
+
*
|
|
25
|
+
* The chatter panel renders `fullName` (name label + initials avatar) and uses `id`
|
|
26
|
+
* for the own-note edit check; the admin list/form/tree views display `fullName` via
|
|
27
|
+
* each view's `coModelFieldToDisplay`. That is exactly the platform-wide summary
|
|
28
|
+
* shape, so this is an alias rather than a second list to keep in step.
|
|
29
|
+
*/
|
|
30
|
+
export const CHATTER_MESSAGE_USER_FIELDS = USER_SUMMARY_FIELDS;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// The versioning columns CommonEntity adds for draft/publish support. These don't exist on
|
|
2
|
+
// legacy tables (see LegacyCommonEntityWithExistingId) and don't carry over when a new draft
|
|
3
|
+
// version is copied from its source entity, so both of those call sites share this list rather
|
|
4
|
+
// than each hand-enumerating the same four names.
|
|
5
|
+
export const DRAFT_PUBLISH_VERSIONING_FIELD_NAMES = ['isPublished', 'isLatest', 'initialEntityVersionId', 'publishedTracker'] as const;
|
|
@@ -127,6 +127,20 @@ export const ERROR_MESSAGES = {
|
|
|
127
127
|
|
|
128
128
|
DEFAULT_REGEX_PATTERN_NOT_MATCHING_ERROR_MSG: 'Invalid regex pattern.',
|
|
129
129
|
|
|
130
|
+
// MPIN errors.
|
|
131
|
+
// MPIN_INVALID is deliberately shared by "wrong MPIN" and "unknown handle",
|
|
132
|
+
// so a failed sign-in never reveals whether the credential handle was real.
|
|
133
|
+
// MPIN_REVOKED is separate and is returned for any attempt against a
|
|
134
|
+
// deactivated credential - it discloses nothing useful, since a dead
|
|
135
|
+
// credential grants no capability, and it lets the client stop retrying.
|
|
136
|
+
MPIN_INVALID: 'Invalid MPIN.',
|
|
137
|
+
MPIN_LOCKED: 'MPIN sign-in is temporarily locked due to repeated failed attempts.',
|
|
138
|
+
MPIN_REVOKED: 'MPIN sign-in has been disabled for this device. Please sign in normally.',
|
|
139
|
+
MPIN_NOT_ENABLED: 'MPIN sign-in is not enabled.',
|
|
140
|
+
MPIN_FORMAT_INVALID: 'MPIN does not meet the required format.',
|
|
141
|
+
MPIN_TOO_PREDICTABLE: 'MPIN is too easy to guess. Avoid repeated or sequential digits.',
|
|
142
|
+
MPIN_CREDENTIAL_NOT_FOUND: 'MPIN device credential not found.',
|
|
143
|
+
|
|
130
144
|
PERMISSION_MESSAGES: {
|
|
131
145
|
insertMany: (model?: string) =>
|
|
132
146
|
`You do not have permission to import ${model ?? 'these'} records.`,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type MediaCategory = 'image' | 'audio' | 'video' | 'file' | 'pdf';
|
|
2
2
|
|
|
3
|
+
export const MEDIA_CATEGORIES = ['image', 'audio', 'video', 'file', 'pdf'] as const;
|
|
4
|
+
|
|
3
5
|
const IMAGE_EXTENSIONS = ['png', 'jpg', 'jpeg', 'webp', 'gif', 'bmp', 'tiff', 'heic', 'heif'];
|
|
4
6
|
const AUDIO_EXTENSIONS = ['mp3', 'wav', 'ogg', 'aac', 'm4a', 'flac', 'webm'];
|
|
5
7
|
const VIDEO_EXTENSIONS = ['mp4', 'mov', 'avi', 'mkv', 'mpeg', 'mpg', '3gp', '3g2', 'webm', 'ogg'];
|
|
@@ -15,8 +17,134 @@ export const DANGEROUS_EXTENSIONS = new Set([
|
|
|
15
17
|
'html', 'htm', 'xhtml', 'svg', 'xml',
|
|
16
18
|
'js', 'mjs', 'php', 'phtml', 'jsp', 'asp', 'aspx',
|
|
17
19
|
'exe', 'sh', 'bat', 'cmd', 'ps1', 'jar', 'dll',
|
|
20
|
+
'msi', 'msix', 'msp', 'com', 'scr', 'vbs', 'vbe', 'wsf', 'wsh', 'hta', 'cpl', 'pif', 'reg',
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Mimetypes that are never safe to accept, regardless of extension. These render as active
|
|
26
|
+
* content in a browser (svg can carry <script>), so they are rejected even when the filename
|
|
27
|
+
* looks harmless. Kept alongside DANGEROUS_EXTENSIONS so upload paths check both.
|
|
28
|
+
*/
|
|
29
|
+
export const DANGEROUS_MIME_TYPES = new Set([
|
|
30
|
+
'image/svg+xml', 'text/html', 'application/xhtml+xml',
|
|
18
31
|
]);
|
|
19
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Percent-decodes a filename, repeating a bounded number of times so a double-encoded payload
|
|
35
|
+
* (`%252e` -> `%2e` -> `.`) survives a single pass through a proxy/framework that already
|
|
36
|
+
* decoded once. Malformed escape sequences are left as-is rather than thrown, since this runs
|
|
37
|
+
* on attacker-controlled input and a literal `%` in a filename (`100%done.pdf`) is legal.
|
|
38
|
+
*/
|
|
39
|
+
function decodePercentEncodingSafely(name: string): string {
|
|
40
|
+
let decoded = name;
|
|
41
|
+
for (let i = 0; i < 3; i++) {
|
|
42
|
+
let next: string;
|
|
43
|
+
try {
|
|
44
|
+
next = decodeURIComponent(decoded);
|
|
45
|
+
} catch {
|
|
46
|
+
return decoded;
|
|
47
|
+
}
|
|
48
|
+
if (next === decoded) {
|
|
49
|
+
return decoded;
|
|
50
|
+
}
|
|
51
|
+
decoded = next;
|
|
52
|
+
}
|
|
53
|
+
return decoded;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Reduces a client-supplied name to the name that will actually be resolved on disk, so
|
|
58
|
+
* extension checks can't be dodged by decorating it. Each step defends a known bypass:
|
|
59
|
+
*
|
|
60
|
+
* - `evil.exe%2e` -> percent-encoding a trailing dot (or anything else) hides the real
|
|
61
|
+
* extension from naive string matching; decode before inspecting it.
|
|
62
|
+
* - `../../evil.exe` -> only the final path segment is the file name.
|
|
63
|
+
* - `evil.exe\0.png` -> a NUL truncates the name at the syscall/filesystem layer, so
|
|
64
|
+
* anything after it is invisible to the OS but visible to naive
|
|
65
|
+
* validation.
|
|
66
|
+
* - `evil.exe::$DATA` -> NTFS alternate data stream suffix; the file on disk is evil.exe.
|
|
67
|
+
* - `evil.exe.` / `.exe ` -> Windows silently strips trailing dots and spaces when resolving
|
|
68
|
+
* a path, so these land on disk as evil.exe.
|
|
69
|
+
*/
|
|
70
|
+
export function normalizeUploadedFileName(fileName?: string | null): string {
|
|
71
|
+
if (!fileName) {
|
|
72
|
+
return '';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let name = decodePercentEncodingSafely(String(fileName));
|
|
76
|
+
name = name.split(/[/\\]/).pop() ?? '';
|
|
77
|
+
|
|
78
|
+
const nulIndex = name.indexOf('\0');
|
|
79
|
+
if (nulIndex >= 0) {
|
|
80
|
+
name = name.slice(0, nulIndex);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const streamIndex = name.indexOf(':');
|
|
84
|
+
if (streamIndex >= 0) {
|
|
85
|
+
name = name.slice(0, streamIndex);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return name.replace(/[\s.]+$/, '');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The effective extension - what the OS/browser will treat the file as. Used for media
|
|
93
|
+
* category resolution and inline-safety decisions. Always normalizes first, so
|
|
94
|
+
* `evil.exe.` resolves to `exe` rather than to nothing.
|
|
95
|
+
*/
|
|
96
|
+
export function getLowercaseFileExtension(fileName?: string | null): string | undefined {
|
|
97
|
+
const name = normalizeUploadedFileName(fileName);
|
|
98
|
+
|
|
99
|
+
const lastDotIndex = name.lastIndexOf('.');
|
|
100
|
+
if (lastDotIndex < 0 || lastDotIndex === name.length - 1) {
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return name.slice(lastDotIndex + 1).toLowerCase();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Every dot-delimited segment after the stem, lowercased. The danger check uses this rather
|
|
109
|
+
* than only the effective extension so a dangerous type buried in a double extension
|
|
110
|
+
* (`evil.exe.png`, `shell.php.jpg`) is still caught - several servers and browsers resolve
|
|
111
|
+
* such names by an earlier segment than the last one.
|
|
112
|
+
*
|
|
113
|
+
* The stem is skipped so an innocuous file that merely starts with a keyword (`exe.png`)
|
|
114
|
+
* isn't rejected.
|
|
115
|
+
*/
|
|
116
|
+
export function getLowercaseFileExtensionSegments(fileName?: string | null): string[] {
|
|
117
|
+
const segments = normalizeUploadedFileName(fileName).toLowerCase().split('.');
|
|
118
|
+
return segments.slice(1).filter(segment => segment.length > 0);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Minimal shape of an uploaded file, so this module stays free of framework imports. */
|
|
122
|
+
export interface UploadedFileLike {
|
|
123
|
+
mimetype?: string;
|
|
124
|
+
originalname?: string;
|
|
125
|
+
filename?: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** originalname is the client-supplied name; filename is multer's on-disk name. */
|
|
129
|
+
export function getUploadedFileName(file?: UploadedFileLike | null): string {
|
|
130
|
+
return file?.originalname ?? file?.filename ?? '';
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Single predicate for "must never be stored". Shared by every upload entry point
|
|
135
|
+
* (MediaFieldCrudManager, chatter attachments) so the rules can't drift between them.
|
|
136
|
+
* Extensions are checked before mimetype so a spoofed Content-Type (e.g.
|
|
137
|
+
* application/octet-stream, or image/png, on an .html file) can't bypass it.
|
|
138
|
+
*/
|
|
139
|
+
export function isDangerousMediaFile(file?: UploadedFileLike | null): boolean {
|
|
140
|
+
const segments = getLowercaseFileExtensionSegments(getUploadedFileName(file));
|
|
141
|
+
if (segments.some(segment => DANGEROUS_EXTENSIONS.has(segment))) {
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return DANGEROUS_MIME_TYPES.has((file?.mimetype || '').toLowerCase().trim());
|
|
146
|
+
}
|
|
147
|
+
|
|
20
148
|
/**
|
|
21
149
|
* Single source of truth for extension -> coarse media category. Shared by upload-time
|
|
22
150
|
* validation (MediaFieldCrudManager) and serve-time header hardening (ServeStaticModule), so
|
|
@@ -6,6 +6,11 @@ export const SUCCESS_MESSAGES = {
|
|
|
6
6
|
LOGOUT_SUCCESS: 'Logged out successfully',
|
|
7
7
|
USER_REGISTERED: 'User registered successfully.',
|
|
8
8
|
|
|
9
|
+
// MPIN messages
|
|
10
|
+
MPIN_SETUP_SUCCESS: 'MPIN set up successfully.',
|
|
11
|
+
MPIN_CHANGED_SUCCESS: 'MPIN changed successfully.',
|
|
12
|
+
MPIN_DEVICE_REVOKED: 'MPIN sign-in removed for this device.',
|
|
13
|
+
|
|
9
14
|
// CRUD service messages
|
|
10
15
|
RECORD_RECOVERED: 'Record successfully recovered',
|
|
11
16
|
SELECTED_RECORDS_RECOVERED: 'Selected records successfully recovered',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The columns of a `User` that are safe to embed in another entity's API response.
|
|
3
|
+
*
|
|
4
|
+
* Whenever a user is attached to a record the caller asked for - a `createdBy` /
|
|
5
|
+
* `updatedBy` populate, a chatter message author - the caller wants to display who it
|
|
6
|
+
* was, not to read their profile. Everything else on `User` is PII (email, mobile),
|
|
7
|
+
* authz metadata (roles, apiKeys) or secret, and the embedded user is frequently
|
|
8
|
+
* someone the viewer has no other visibility of.
|
|
9
|
+
*
|
|
10
|
+
* `fullName` is nullable; consumers that need a fallback should use the record's own
|
|
11
|
+
* context rather than widening this list.
|
|
12
|
+
*/
|
|
13
|
+
export const USER_SUMMARY_FIELDS = ['id', 'fullName'] as const;
|
|
@@ -107,8 +107,11 @@ export class AuthenticationController {
|
|
|
107
107
|
@Post('logout')
|
|
108
108
|
@Public()
|
|
109
109
|
@HttpCode(HttpStatus.OK)
|
|
110
|
-
async logout(
|
|
111
|
-
|
|
110
|
+
async logout(
|
|
111
|
+
@Body('refreshToken') refreshToken: string,
|
|
112
|
+
@Body('allDevices') allDevices?: boolean,
|
|
113
|
+
) {
|
|
114
|
+
return this.authService.logout(refreshToken, allDevices === true);
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
@ApiBearerAuth("jwt")
|
|
@@ -95,6 +95,14 @@ export class ChatterMessageController {
|
|
|
95
95
|
return this.service.find(query);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
@ApiBearerAuth("jwt")
|
|
99
|
+
@ApiQuery({ name: 'search', required: false, type: String })
|
|
100
|
+
@ApiQuery({ name: 'limit', required: false, type: Number })
|
|
101
|
+
@Get('mentionable-users')
|
|
102
|
+
async getMentionableUsers(@Query() query: any) {
|
|
103
|
+
return this.service.getMentionableUsers(query?.search, query?.limit ? +query.limit : undefined);
|
|
104
|
+
}
|
|
105
|
+
|
|
98
106
|
@ApiBearerAuth("jwt")
|
|
99
107
|
@Get(':id')
|
|
100
108
|
async findOne(@Param('id') id: string, @Query() query: any) {
|