@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":"error-messages.js","sourceRoot":"","sources":["../../src/constants/error-messages.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAG;IAE1B,cAAc,EAAE,sBAAsB;IACtC,eAAe,EAAE,gCAAgC;IACjD,aAAa,EAAE,mBAAmB;IAClC,eAAe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wB,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,aAAa;IAC5H,kCAAkC,EAAE,yDAAyD;IAG7F,gBAAgB,EAAE,CAAC,UAAkB,EAAE,EAAE,CAAC,oBAAoB,UAAU,aAAa;IACrF,mBAAmB,EAAE,CAAC,EAAmB,EAAE,EAAE,CAAC,kBAAkB,EAAE,aAAa;IAG/E,gBAAgB,EAAE,CAAC,MAAwB,EAAE,EAAE,CAAC,SAAS,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa;IAChG,oBAAoB,EAAE,6CAA6C;IACnE,kBAAkB,EAAE,2CAA2C;IAG/D,uBAAuB,EAAE,CAAC,EAAmB,EAAE,EAAE,CAAC,wDAAwD,EAAE,GAAG;IAC/G,yBAAyB,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,iCAAiC,GAAG,EAAE;IAGlF,mCAAmC,EAAE,CAAC,EAAmB,EAAE,EAAE,CAAC,gCAAgC,EAAE,aAAa;IAC7G,gCAAgC,EAAE,kCAAkC;IAGpE,wBAAwB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,6BAA6B,QAAQ,EAAE;IAGvF,gCAAgC,EAAE,gEAAgE;IAClG,+BAA+B,EAAE,iFAAiF;IAClH,6BAA6B,EAAE,uCAAuC;IAEtE,4CAA4C,EAAE,wBAAwB;IAEtE,mBAAmB,EAAE;QACrB,UAAU,EAAE,CAAC,KAAc,EAAE,EAAE,CAC7B,wCAAwC,KAAK,IAAI,OAAO,WAAW;KACtB;CAElD,CAAC","sourcesContent":["// backend/common/constants/error-messages.ts\n\nexport const ERROR_MESSAGES = {\n //authentication errors\n USER_NOT_FOUND: 'User does not exist.',\n USER_NOT_ACTIVE: 'User profile is not activated.',\n USER_INACTIVE: 'User is inactive.',\n ACCOUNT_BLOCKED: 'Your account has been blocked due to multiple failed login attempts.',\n PASSWORD_INCORRECT: 'Password does not match.',\n PUBLIC_REGISTRATION_DISABLED: 'Public registrations are disabled.',\n UNIQUE_CONSTRAINT_VIOLATION: 'A unique constraint violation occurred.',\n PASSWORDLESS_REGISTRATION_DISABLED: 'Passwordless registration is not enabled.',\n REGISTRATION_REQUIRES_CONTACT: 'Either mobile or email is required for initiating registration.',\n EMAIL_REQUIRED_FOR_VALIDATION: 'Email is required for email validation source.',\n MOBILE_REQUIRED_FOR_VALIDATION: 'Mobile is required for mobile validation source.',\n USER_ALREADY_EXISTS: 'User already exists. Please sign in.',\n VALIDATION_SOURCE_REQUIRED: 'At least one validation source is required.',\n INVALID_OTP: 'Invalid OTP.',\n OTP_EXPIRED: 'OTP has expired.',\n INVALID_VERIFICATION_TYPE: 'Invalid type. Must be either email or mobile.',\n NON_LOCAL_PROVIDER: 'User seems to have used a passwordless mode to authenticate.',\n USER_ID_MISMATCH: \"User ID's do not match.\",\n USERNAME_MISMATCH: \"User username's do not match.\",\n INCORRECT_CURRENT_PASSWORD: 'Incorrect current password specified.',\n PASSWORD_REUSED: 'Try a different password',\n INVALID_VERIFICATION_TOKEN: 'Invalid verification token',\n INVALID_REFRESH_TOKEN: 'Invalid refresh token',\n ACCESS_DENIED: 'Access denied',\n INVALID_USER_PROFILE: 'Invalid user profile',\n GOOGLE_OAUTH_PROFILE_FETCH_FAILED: 'Failed to fetch user profile from Google OAuth service',\n MICROSOFT_ACTIVE_DIRECTORY_OAUTH_PROFILE_FETCH_FAILED: 'Failed to fetch user profile from Microsoft Active Directory OAuth service',\n LOGOUT_FAILED: 'Logout failed due to an unexpected error.',\n\n INVALID_CREDENTIALS: 'Invalid credentials',\n LOGIN_FAILED: 'Login Failed',\n OLD_PASSWORD_INCORRECT: 'You have specified an incorrect old password.',\n INVALID_NEW_PASSWORD: 'Invalid new password.',\n PASSWORDS_DO_NOT_MATCH: 'New passwords are not matching.',\n\n // user management errors\n DELETE_SELF_NOT_ALLOWED: 'Deleting logged-in user is not allowed.',\n DELETE_IDS_REQUIRED: 'At least one ID is required for deletion.',\n USER_MISSING_ID: 'User must exist before initializing roles.',\n ROLES_NOT_FOUND: (roles: string[]) => `The following roles were not found: ${roles.join(', ')}`,\n USER_NOT_FOUND_BY_USERNAME: (username: string) => `User with username '${username}' not found.`,\n ROLE_NOT_FOUND: (roleName: string) => `Role '${roleName}' not found.`,\n PERMISSION_NOT_EXIST: (permission: string) => `Permission '${permission}' does not exist.`,\n\n // session errors\n SESSION_INVALID: 'Your session is no longer valid. Please log in again.',\n SESSION_EXPIRED: 'Your session has expired. Please log in again.',\n\n // filter errors\n GROUP_BY_LIMIT: 'buildFilterQuery: Only 1 Group by field is supported currently.',\n INVALID_GROUP_BY_COUNT: 'Exactly one groupBy field is required to count grouped records.',\n\n // general errors\n FORBIDDEN: 'Forbidden',\n RESOURCE_NOT_FOUND: 'The requested resource was not found.',\n\n\n // database errors\n DUPLICATE_ENTRY: 'Duplicate entry. A record with similar unique fields already exists.',\n\n // validation errors\n ID_REQUIRED_FOR_UPDATE: 'Id is required for update.',\n ID_REQUIRED_FOR_DELETE: 'Id is required for deletion.',\n\n // CRUD service errors\n RELATION_TYPE_NOT_SUPPORTED: 'Relation type not supported in CRUD service.',\n NO_SOFT_DELETED_RECORD_FOUND: 'No soft-deleted record found with the given ID.',\n CONFLICTING_RECORD_ON_UNARCHIVE: 'Another record is conflicting with the record you are attempting to Un-Archive, either delete or change the other record so as to avoid this conflict.',\n NO_SOFT_DELETED_RECORDS_FOUND: 'No matching soft-deleted records found.',\n EMPTY_PATH_PARTS: 'Path parts cannot be empty',\n\n\n // CSV/Excel service errors\n MISSING_HEADERS_OR_FUNCTION: 'Either headers or data records function must be provided.',\n INVALID_CHUNK_SIZE: 'Chunk size must be greater than 0 when data records function is provided.',\n INVALID_FORMAT: (format: string) => `Invalid ${format} format`,\n\n\n //field errors\n INVALID_INVERSE_FIELD_TYPE: 'Only relation fields can have inverse fields.',\n MODEL_AND_MODULE_REQUIRED_TO_UPDATE_INVERSE_FIELD: 'Model and module are required to update inverse field.',\n MODEL_NAME_AND_MODULE_NAME_REQUIRED_TO_CREATE_INVERSE_FIELD: 'Model name and module name are required to create inverse field.',\n FIELD_NOT_FOUND: (id: number | string) => `No field with id #${id} exists`,\n PROVIDER_NOT_FOUND: (provider: string) => `Field incorrectly configured. No provider with name ${provider} registered in backend.`,\n FILE_WRITE_FAILED: 'File creation failed, rolling back transaction',\n FILE_DELETE_FAILED: 'File deletion failed, rolling back transaction',\n // file service errors\n FILE_NOT_FOUND: 'File not found',\n FILE_COPY_ERROR: 'Error copying file',\n S3_CLIENT_NOT_INITIALIZED: 'S3 Client not initialized. Please check the S3 configuration.',\n\n // model errors\n MODEL_METADATA_NOT_FOUND: (id: string | number) => `Model metadata with ID ${id} not found.`,\n MODEL_SERVICE_NOT_FOUND: (model: string) => `Model service for ${model} not found.`,\n RELATION_CO_MODEL_NOT_DEFINED_FOR_FIELD: (fieldName: string) => `Relation coModelSingularName is not defined for relation field ${fieldName}`,\n MODEL_NOT_FOUND: (singularName?: string) => `Model${singularName ? ` with singular name \"${singularName}\"` : ''} not found.`,\n MODEL_REQUIRED_FOR_CODE_GENERATION: 'Model ID or Model Name is required for generating code.',\n\n //module errors\n MODULE_NOT_FOUND: (moduleName: string) => `Module with name ${moduleName} not found.`,\n MODULE_ID_NOT_FOUND: (id: string | number) => `Module with ID ${id} not found.`,\n\n //entity errors\n ENTITY_NOT_FOUND: (entity?: string | number) => `Entity${entity ? ' ' + entity : ''} not found.`,\n ENTITY_NAME_REQUIRED: 'Entity name is required to find the entity.',\n ENTITY_ID_REQUIRED: 'Entity ID is required to find the entity.',\n\n // import errors\n NO_ERROR_LOG_FOR_IMPORT: (id: string | number) => `No error log entries found for import transaction ID ${id}.`,\n FILE_READ_FAILED_FROM_URL: (url: string) => `Failed to read file from URL: ${url}`,\n\n // media storage provider errors\n MEDIA_STORAGE_PROVIDER_ID_NOT_FOUND: (id: number | string) => `Media Storage Provider with #${id} not found.`,\n MEDIA_STORAGE_PROVIDER_NOT_FOUND: 'Media Storage Provider not found',\n\n // SQL errors\n UNSUPPORTED_SQL_OPERATOR: (operator: string) => `Unsupported SQL operator: ${operator}`,\n\n // AI interaction errors\n PYTHON_EXECUTABLE_NOT_CONFIGURED: 'SolidX AI MCP python executable or client path not configured.',\n UNABLE_TO_RESOLVE_SOLID_COMMAND: 'Unable to resolve a solid_ command that was used to come up with this response.',\n UNABLE_TO_RESOLVE_MCP_HANDLER: 'Unable to resolve a mcp tool handler.',\n\n DEFAULT_REGEX_PATTERN_NOT_MATCHING_ERROR_MSG: 'Invalid regex pattern.',\n\n PERMISSION_MESSAGES: {\n insertMany: (model?: string) =>\n `You do not have permission to import ${model ?? 'these'} records.`,\n } as Record<string, (model?: string) => string>,\n\n};\n"]}
|
|
1
|
+
{"version":3,"file":"error-messages.js","sourceRoot":"","sources":["../../src/constants/error-messages.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAG;IAE1B,cAAc,EAAE,sBAAsB;IACtC,eAAe,EAAE,gCAAgC;IACjD,aAAa,EAAE,mBAAmB;IAClC,eAAe,EAAE,sEAAsE;IACvF,kBAAkB,EAAE,0BAA0B;IAC9C,4BAA4B,EAAE,oCAAoC;IAClE,2BAA2B,EAAE,yCAAyC;IACtE,kCAAkC,EAAE,2CAA2C;IAC/E,6BAA6B,EAAE,iEAAiE;IAChG,6BAA6B,EAAE,gDAAgD;IAC/E,8BAA8B,EAAE,kDAAkD;IAClF,mBAAmB,EAAE,sCAAsC;IAC3D,0BAA0B,EAAE,6CAA6C;IACzE,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,kBAAkB;IAC/B,yBAAyB,EAAE,+CAA+C;IAC1E,kBAAkB,EAAE,8DAA8D;IAClF,gBAAgB,EAAE,yBAAyB;IAC3C,iBAAiB,EAAE,+BAA+B;IAClD,0BAA0B,EAAE,uCAAuC;IACnE,eAAe,EAAE,0BAA0B;IAC3C,0BAA0B,EAAE,4BAA4B;IACxD,qBAAqB,EAAE,uBAAuB;IAC9C,aAAa,EAAE,eAAe;IAC9B,oBA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,CAAC,gCAAgC,EAAE,aAAa;IAC7G,gCAAgC,EAAE,kCAAkC;IAGpE,wBAAwB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,6BAA6B,QAAQ,EAAE;IAGvF,gCAAgC,EAAE,gEAAgE;IAClG,+BAA+B,EAAE,iFAAiF;IAClH,6BAA6B,EAAE,uCAAuC;IAEtE,4CAA4C,EAAE,wBAAwB;IAQtE,YAAY,EAAE,eAAe;IAC7B,WAAW,EAAE,qEAAqE;IAClF,YAAY,EAAE,0EAA0E;IACxF,gBAAgB,EAAE,8BAA8B;IAChD,mBAAmB,EAAE,yCAAyC;IAC9D,oBAAoB,EAAE,iEAAiE;IACvF,yBAAyB,EAAE,mCAAmC;IAE9D,mBAAmB,EAAE;QACrB,UAAU,EAAE,CAAC,KAAc,EAAE,EAAE,CAC7B,wCAAwC,KAAK,IAAI,OAAO,WAAW;KACtB;CAElD,CAAC","sourcesContent":["// backend/common/constants/error-messages.ts\n\nexport const ERROR_MESSAGES = {\n //authentication errors\n USER_NOT_FOUND: 'User does not exist.',\n USER_NOT_ACTIVE: 'User profile is not activated.',\n USER_INACTIVE: 'User is inactive.',\n ACCOUNT_BLOCKED: 'Your account has been blocked due to multiple failed login attempts.',\n PASSWORD_INCORRECT: 'Password does not match.',\n PUBLIC_REGISTRATION_DISABLED: 'Public registrations are disabled.',\n UNIQUE_CONSTRAINT_VIOLATION: 'A unique constraint violation occurred.',\n PASSWORDLESS_REGISTRATION_DISABLED: 'Passwordless registration is not enabled.',\n REGISTRATION_REQUIRES_CONTACT: 'Either mobile or email is required for initiating registration.',\n EMAIL_REQUIRED_FOR_VALIDATION: 'Email is required for email validation source.',\n MOBILE_REQUIRED_FOR_VALIDATION: 'Mobile is required for mobile validation source.',\n USER_ALREADY_EXISTS: 'User already exists. Please sign in.',\n VALIDATION_SOURCE_REQUIRED: 'At least one validation source is required.',\n INVALID_OTP: 'Invalid OTP.',\n OTP_EXPIRED: 'OTP has expired.',\n INVALID_VERIFICATION_TYPE: 'Invalid type. Must be either email or mobile.',\n NON_LOCAL_PROVIDER: 'User seems to have used a passwordless mode to authenticate.',\n USER_ID_MISMATCH: \"User ID's do not match.\",\n USERNAME_MISMATCH: \"User username's do not match.\",\n INCORRECT_CURRENT_PASSWORD: 'Incorrect current password specified.',\n PASSWORD_REUSED: 'Try a different password',\n INVALID_VERIFICATION_TOKEN: 'Invalid verification token',\n INVALID_REFRESH_TOKEN: 'Invalid refresh token',\n ACCESS_DENIED: 'Access denied',\n INVALID_USER_PROFILE: 'Invalid user profile',\n GOOGLE_OAUTH_PROFILE_FETCH_FAILED: 'Failed to fetch user profile from Google OAuth service',\n MICROSOFT_ACTIVE_DIRECTORY_OAUTH_PROFILE_FETCH_FAILED: 'Failed to fetch user profile from Microsoft Active Directory OAuth service',\n LOGOUT_FAILED: 'Logout failed due to an unexpected error.',\n\n INVALID_CREDENTIALS: 'Invalid credentials',\n LOGIN_FAILED: 'Login Failed',\n OLD_PASSWORD_INCORRECT: 'You have specified an incorrect old password.',\n INVALID_NEW_PASSWORD: 'Invalid new password.',\n PASSWORDS_DO_NOT_MATCH: 'New passwords are not matching.',\n\n // user management errors\n DELETE_SELF_NOT_ALLOWED: 'Deleting logged-in user is not allowed.',\n DELETE_IDS_REQUIRED: 'At least one ID is required for deletion.',\n USER_MISSING_ID: 'User must exist before initializing roles.',\n ROLES_NOT_FOUND: (roles: string[]) => `The following roles were not found: ${roles.join(', ')}`,\n USER_NOT_FOUND_BY_USERNAME: (username: string) => `User with username '${username}' not found.`,\n ROLE_NOT_FOUND: (roleName: string) => `Role '${roleName}' not found.`,\n PERMISSION_NOT_EXIST: (permission: string) => `Permission '${permission}' does not exist.`,\n\n // session errors\n SESSION_INVALID: 'Your session is no longer valid. Please log in again.',\n SESSION_EXPIRED: 'Your session has expired. Please log in again.',\n\n // filter errors\n GROUP_BY_LIMIT: 'buildFilterQuery: Only 1 Group by field is supported currently.',\n INVALID_GROUP_BY_COUNT: 'Exactly one groupBy field is required to count grouped records.',\n\n // general errors\n FORBIDDEN: 'Forbidden',\n RESOURCE_NOT_FOUND: 'The requested resource was not found.',\n\n\n // database errors\n DUPLICATE_ENTRY: 'Duplicate entry. A record with similar unique fields already exists.',\n\n // validation errors\n ID_REQUIRED_FOR_UPDATE: 'Id is required for update.',\n ID_REQUIRED_FOR_DELETE: 'Id is required for deletion.',\n\n // CRUD service errors\n RELATION_TYPE_NOT_SUPPORTED: 'Relation type not supported in CRUD service.',\n NO_SOFT_DELETED_RECORD_FOUND: 'No soft-deleted record found with the given ID.',\n CONFLICTING_RECORD_ON_UNARCHIVE: 'Another record is conflicting with the record you are attempting to Un-Archive, either delete or change the other record so as to avoid this conflict.',\n NO_SOFT_DELETED_RECORDS_FOUND: 'No matching soft-deleted records found.',\n EMPTY_PATH_PARTS: 'Path parts cannot be empty',\n\n\n // CSV/Excel service errors\n MISSING_HEADERS_OR_FUNCTION: 'Either headers or data records function must be provided.',\n INVALID_CHUNK_SIZE: 'Chunk size must be greater than 0 when data records function is provided.',\n INVALID_FORMAT: (format: string) => `Invalid ${format} format`,\n\n\n //field errors\n INVALID_INVERSE_FIELD_TYPE: 'Only relation fields can have inverse fields.',\n MODEL_AND_MODULE_REQUIRED_TO_UPDATE_INVERSE_FIELD: 'Model and module are required to update inverse field.',\n MODEL_NAME_AND_MODULE_NAME_REQUIRED_TO_CREATE_INVERSE_FIELD: 'Model name and module name are required to create inverse field.',\n FIELD_NOT_FOUND: (id: number | string) => `No field with id #${id} exists`,\n PROVIDER_NOT_FOUND: (provider: string) => `Field incorrectly configured. No provider with name ${provider} registered in backend.`,\n FILE_WRITE_FAILED: 'File creation failed, rolling back transaction',\n FILE_DELETE_FAILED: 'File deletion failed, rolling back transaction',\n // file service errors\n FILE_NOT_FOUND: 'File not found',\n FILE_COPY_ERROR: 'Error copying file',\n S3_CLIENT_NOT_INITIALIZED: 'S3 Client not initialized. Please check the S3 configuration.',\n\n // model errors\n MODEL_METADATA_NOT_FOUND: (id: string | number) => `Model metadata with ID ${id} not found.`,\n MODEL_SERVICE_NOT_FOUND: (model: string) => `Model service for ${model} not found.`,\n RELATION_CO_MODEL_NOT_DEFINED_FOR_FIELD: (fieldName: string) => `Relation coModelSingularName is not defined for relation field ${fieldName}`,\n MODEL_NOT_FOUND: (singularName?: string) => `Model${singularName ? ` with singular name \"${singularName}\"` : ''} not found.`,\n MODEL_REQUIRED_FOR_CODE_GENERATION: 'Model ID or Model Name is required for generating code.',\n\n //module errors\n MODULE_NOT_FOUND: (moduleName: string) => `Module with name ${moduleName} not found.`,\n MODULE_ID_NOT_FOUND: (id: string | number) => `Module with ID ${id} not found.`,\n\n //entity errors\n ENTITY_NOT_FOUND: (entity?: string | number) => `Entity${entity ? ' ' + entity : ''} not found.`,\n ENTITY_NAME_REQUIRED: 'Entity name is required to find the entity.',\n ENTITY_ID_REQUIRED: 'Entity ID is required to find the entity.',\n\n // import errors\n NO_ERROR_LOG_FOR_IMPORT: (id: string | number) => `No error log entries found for import transaction ID ${id}.`,\n FILE_READ_FAILED_FROM_URL: (url: string) => `Failed to read file from URL: ${url}`,\n\n // media storage provider errors\n MEDIA_STORAGE_PROVIDER_ID_NOT_FOUND: (id: number | string) => `Media Storage Provider with #${id} not found.`,\n MEDIA_STORAGE_PROVIDER_NOT_FOUND: 'Media Storage Provider not found',\n\n // SQL errors\n UNSUPPORTED_SQL_OPERATOR: (operator: string) => `Unsupported SQL operator: ${operator}`,\n\n // AI interaction errors\n PYTHON_EXECUTABLE_NOT_CONFIGURED: 'SolidX AI MCP python executable or client path not configured.',\n UNABLE_TO_RESOLVE_SOLID_COMMAND: 'Unable to resolve a solid_ command that was used to come up with this response.',\n UNABLE_TO_RESOLVE_MCP_HANDLER: 'Unable to resolve a mcp tool handler.',\n\n DEFAULT_REGEX_PATTERN_NOT_MATCHING_ERROR_MSG: 'Invalid regex pattern.',\n\n // MPIN errors.\n // MPIN_INVALID is deliberately shared by \"wrong MPIN\" and \"unknown handle\",\n // so a failed sign-in never reveals whether the credential handle was real.\n // MPIN_REVOKED is separate and is returned for any attempt against a\n // deactivated credential - it discloses nothing useful, since a dead\n // credential grants no capability, and it lets the client stop retrying.\n MPIN_INVALID: 'Invalid MPIN.',\n MPIN_LOCKED: 'MPIN sign-in is temporarily locked due to repeated failed attempts.',\n MPIN_REVOKED: 'MPIN sign-in has been disabled for this device. Please sign in normally.',\n MPIN_NOT_ENABLED: 'MPIN sign-in is not enabled.',\n MPIN_FORMAT_INVALID: 'MPIN does not meet the required format.',\n MPIN_TOO_PREDICTABLE: 'MPIN is too easy to guess. Avoid repeated or sequential digits.',\n MPIN_CREDENTIAL_NOT_FOUND: 'MPIN device credential not found.',\n\n PERMISSION_MESSAGES: {\n insertMany: (model?: string) =>\n `You do not have permission to import ${model ?? 'these'} records.`,\n } as Record<string, (model?: string) => string>,\n\n};\n"]}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
export type MediaCategory = 'image' | 'audio' | 'video' | 'file' | 'pdf';
|
|
2
|
+
export declare const MEDIA_CATEGORIES: readonly ["image", "audio", "video", "file", "pdf"];
|
|
2
3
|
export declare const DANGEROUS_EXTENSIONS: Set<string>;
|
|
4
|
+
export declare const DANGEROUS_MIME_TYPES: Set<string>;
|
|
5
|
+
export declare function normalizeUploadedFileName(fileName?: string | null): string;
|
|
6
|
+
export declare function getLowercaseFileExtension(fileName?: string | null): string | undefined;
|
|
7
|
+
export declare function getLowercaseFileExtensionSegments(fileName?: string | null): string[];
|
|
8
|
+
export interface UploadedFileLike {
|
|
9
|
+
mimetype?: string;
|
|
10
|
+
originalname?: string;
|
|
11
|
+
filename?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function getUploadedFileName(file?: UploadedFileLike | null): string;
|
|
14
|
+
export declare function isDangerousMediaFile(file?: UploadedFileLike | null): boolean;
|
|
3
15
|
export declare const EXT_TO_MEDIA_TYPE: Record<string, MediaCategory>;
|
|
4
16
|
export declare const INLINE_SAFE_EXTENSIONS: Set<string>;
|
|
5
17
|
//# sourceMappingURL=media-file-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-file-types.d.ts","sourceRoot":"","sources":["../../src/constants/media-file-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"media-file-types.d.ts","sourceRoot":"","sources":["../../src/constants/media-file-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAEzE,eAAO,MAAM,gBAAgB,qDAAsD,CAAC;AAapF,eAAO,MAAM,oBAAoB,aAK/B,CAAC;AAQH,eAAO,MAAM,oBAAoB,aAE/B,CAAC;AAuCH,wBAAgB,yBAAyB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAmB1E;AAOD,wBAAgB,yBAAyB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAStF;AAWD,wBAAgB,iCAAiC,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAAE,CAGpF;AAGD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,wBAAgB,mBAAmB,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,GAAG,MAAM,CAE1E;AAQD,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,GAAG,OAAO,CAO5E;AASD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAM3D,CAAC;AAMF,eAAO,MAAM,sBAAsB,aAKjC,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.INLINE_SAFE_EXTENSIONS = exports.EXT_TO_MEDIA_TYPE = exports.DANGEROUS_EXTENSIONS = void 0;
|
|
3
|
+
exports.INLINE_SAFE_EXTENSIONS = exports.EXT_TO_MEDIA_TYPE = exports.DANGEROUS_MIME_TYPES = exports.DANGEROUS_EXTENSIONS = exports.MEDIA_CATEGORIES = void 0;
|
|
4
|
+
exports.normalizeUploadedFileName = normalizeUploadedFileName;
|
|
5
|
+
exports.getLowercaseFileExtension = getLowercaseFileExtension;
|
|
6
|
+
exports.getLowercaseFileExtensionSegments = getLowercaseFileExtensionSegments;
|
|
7
|
+
exports.getUploadedFileName = getUploadedFileName;
|
|
8
|
+
exports.isDangerousMediaFile = isDangerousMediaFile;
|
|
9
|
+
exports.MEDIA_CATEGORIES = ['image', 'audio', 'video', 'file', 'pdf'];
|
|
4
10
|
const IMAGE_EXTENSIONS = ['png', 'jpg', 'jpeg', 'webp', 'gif', 'bmp', 'tiff', 'heic', 'heif'];
|
|
5
11
|
const AUDIO_EXTENSIONS = ['mp3', 'wav', 'ogg', 'aac', 'm4a', 'flac', 'webm'];
|
|
6
12
|
const VIDEO_EXTENSIONS = ['mp4', 'mov', 'avi', 'mkv', 'mpeg', 'mpg', '3gp', '3g2', 'webm', 'ogg'];
|
|
@@ -10,7 +16,66 @@ exports.DANGEROUS_EXTENSIONS = new Set([
|
|
|
10
16
|
'html', 'htm', 'xhtml', 'svg', 'xml',
|
|
11
17
|
'js', 'mjs', 'php', 'phtml', 'jsp', 'asp', 'aspx',
|
|
12
18
|
'exe', 'sh', 'bat', 'cmd', 'ps1', 'jar', 'dll',
|
|
19
|
+
'msi', 'msix', 'msp', 'com', 'scr', 'vbs', 'vbe', 'wsf', 'wsh', 'hta', 'cpl', 'pif', 'reg',
|
|
13
20
|
]);
|
|
21
|
+
exports.DANGEROUS_MIME_TYPES = new Set([
|
|
22
|
+
'image/svg+xml', 'text/html', 'application/xhtml+xml',
|
|
23
|
+
]);
|
|
24
|
+
function decodePercentEncodingSafely(name) {
|
|
25
|
+
let decoded = name;
|
|
26
|
+
for (let i = 0; i < 3; i++) {
|
|
27
|
+
let next;
|
|
28
|
+
try {
|
|
29
|
+
next = decodeURIComponent(decoded);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return decoded;
|
|
33
|
+
}
|
|
34
|
+
if (next === decoded) {
|
|
35
|
+
return decoded;
|
|
36
|
+
}
|
|
37
|
+
decoded = next;
|
|
38
|
+
}
|
|
39
|
+
return decoded;
|
|
40
|
+
}
|
|
41
|
+
function normalizeUploadedFileName(fileName) {
|
|
42
|
+
if (!fileName) {
|
|
43
|
+
return '';
|
|
44
|
+
}
|
|
45
|
+
let name = decodePercentEncodingSafely(String(fileName));
|
|
46
|
+
name = name.split(/[/\\]/).pop() ?? '';
|
|
47
|
+
const nulIndex = name.indexOf('\0');
|
|
48
|
+
if (nulIndex >= 0) {
|
|
49
|
+
name = name.slice(0, nulIndex);
|
|
50
|
+
}
|
|
51
|
+
const streamIndex = name.indexOf(':');
|
|
52
|
+
if (streamIndex >= 0) {
|
|
53
|
+
name = name.slice(0, streamIndex);
|
|
54
|
+
}
|
|
55
|
+
return name.replace(/[\s.]+$/, '');
|
|
56
|
+
}
|
|
57
|
+
function getLowercaseFileExtension(fileName) {
|
|
58
|
+
const name = normalizeUploadedFileName(fileName);
|
|
59
|
+
const lastDotIndex = name.lastIndexOf('.');
|
|
60
|
+
if (lastDotIndex < 0 || lastDotIndex === name.length - 1) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
return name.slice(lastDotIndex + 1).toLowerCase();
|
|
64
|
+
}
|
|
65
|
+
function getLowercaseFileExtensionSegments(fileName) {
|
|
66
|
+
const segments = normalizeUploadedFileName(fileName).toLowerCase().split('.');
|
|
67
|
+
return segments.slice(1).filter(segment => segment.length > 0);
|
|
68
|
+
}
|
|
69
|
+
function getUploadedFileName(file) {
|
|
70
|
+
return file?.originalname ?? file?.filename ?? '';
|
|
71
|
+
}
|
|
72
|
+
function isDangerousMediaFile(file) {
|
|
73
|
+
const segments = getLowercaseFileExtensionSegments(getUploadedFileName(file));
|
|
74
|
+
if (segments.some(segment => exports.DANGEROUS_EXTENSIONS.has(segment))) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
return exports.DANGEROUS_MIME_TYPES.has((file?.mimetype || '').toLowerCase().trim());
|
|
78
|
+
}
|
|
14
79
|
exports.EXT_TO_MEDIA_TYPE = {
|
|
15
80
|
...Object.fromEntries(IMAGE_EXTENSIONS.map((ext) => [ext, 'image'])),
|
|
16
81
|
...Object.fromEntries(AUDIO_EXTENSIONS.map((ext) => [ext, 'audio'])),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-file-types.js","sourceRoot":"","sources":["../../src/constants/media-file-types.ts"],"names":[],"mappings":";;;AAEA,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9F,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7E,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAClG,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAA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', 'heic', 'heif'];\nconst AUDIO_EXTENSIONS = ['mp3', 'wav', 'ogg', 'aac', 'm4a', 'flac', 'webm'];\nconst VIDEO_EXTENSIONS = ['mp4', 'mov', 'avi', 'mkv', 'mpeg', 'mpg', '3gp', '3g2', 'webm', 'ogg'];\nconst DOCUMENT_EXTENSIONS = ['txt', 'md', 'csv', 'json', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'zip', 'rar', '7z'];\nconst PDF_EXTENSION = 'pdf';\n\n/**\n * Extensions that must never be accepted as media uploads, regardless of declared mimetype or\n * admin-configured mediaTypes allowlist. Checked before any other resolution so a spoofed\n * Content-Type (e.g. application/octet-stream on an .html file) can't bypass this.\n */\nexport const DANGEROUS_EXTENSIONS = new Set([\n 'html', 'htm', 'xhtml', 'svg', 'xml',\n 'js', 'mjs', 'php', 'phtml', 'jsp', 'asp', 'aspx',\n 'exe', 'sh', 'bat', 'cmd', 'ps1', 'jar', 'dll',\n]);\n\n/**\n * Single source of truth for extension -> coarse media category. Shared by upload-time\n * validation (MediaFieldCrudManager) and serve-time header hardening (ServeStaticModule), so\n * both agree on which extensions belong to which category and neither drifts out of sync.\n * webm/ogg are shared between AUDIO_EXTENSIONS and VIDEO_EXTENSIONS - last one wins here, they\n * default to 'video' since that's the more common upload case.\n */\nexport const EXT_TO_MEDIA_TYPE: Record<string, MediaCategory> = {\n ...Object.fromEntries(IMAGE_EXTENSIONS.map((ext) => [ext, 'image' as const])),\n ...Object.fromEntries(AUDIO_EXTENSIONS.map((ext) => [ext, 'audio' as const])),\n ...Object.fromEntries(VIDEO_EXTENSIONS.map((ext) => [ext, 'video' as const])),\n ...Object.fromEntries(DOCUMENT_EXTENSIONS.map((ext) => [ext, 'file' as const])),\n [PDF_EXTENSION]: 'pdf',\n};\n\n/**\n * Extensions safe to serve inline with their natural Content-Type; everything else served from\n * media-files-storage is forced to application/octet-stream + Content-Disposition: attachment.\n */\nexport const INLINE_SAFE_EXTENSIONS = new Set<string>([\n ...I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CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,4BAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QAC9D,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,4BAAoB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;AACjF,CAAC;AASY,QAAA,iBAAiB,GAAkC;IAC5D,GAAG,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,OAAgB,CAAC,CAAC,CAAC;IAC7E,GAAG,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,OAAgB,CAAC,CAAC,CAAC;IAC7E,GAAG,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,OAAgB,CAAC,CAAC,CAAC;IAC7E,GAAG,MAAM,CAAC,WAAW,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,MAAe,CAAC,CAAC,CAAC;IAC/E,CAAC,aAAa,CAAC,EAAE,KAAK;CACzB,CAAC;AAMW,QAAA,sBAAsB,GAAG,IAAI,GAAG,CAAS;IAClD,GAAG,gBAAgB;IACnB,GAAG,gBAAgB;IACnB,GAAG,gBAAgB;IACnB,aAAa;CAChB,CAAC,CAAC","sourcesContent":["export type MediaCategory = 'image' | 'audio' | 'video' | 'file' | 'pdf';\n\nexport const MEDIA_CATEGORIES = ['image', 'audio', 'video', 'file', 'pdf'] as const;\n\nconst IMAGE_EXTENSIONS = ['png', 'jpg', 'jpeg', 'webp', 'gif', 'bmp', 'tiff', 'heic', 'heif'];\nconst AUDIO_EXTENSIONS = ['mp3', 'wav', 'ogg', 'aac', 'm4a', 'flac', 'webm'];\nconst VIDEO_EXTENSIONS = ['mp4', 'mov', 'avi', 'mkv', 'mpeg', 'mpg', '3gp', '3g2', 'webm', 'ogg'];\nconst DOCUMENT_EXTENSIONS = ['txt', 'md', 'csv', 'json', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'zip', 'rar', '7z'];\nconst PDF_EXTENSION = 'pdf';\n\n/**\n * Extensions that must never be accepted as media uploads, regardless of declared mimetype or\n * admin-configured mediaTypes allowlist. Checked before any other resolution so a spoofed\n * Content-Type (e.g. application/octet-stream on an .html file) can't bypass this.\n */\nexport const DANGEROUS_EXTENSIONS = new Set([\n 'html', 'htm', 'xhtml', 'svg', 'xml',\n 'js', 'mjs', 'php', 'phtml', 'jsp', 'asp', 'aspx',\n 'exe', 'sh', 'bat', 'cmd', 'ps1', 'jar', 'dll',\n 'msi', 'msix', 'msp', 'com', 'scr', 'vbs', 'vbe', 'wsf', 'wsh', 'hta', 'cpl', 'pif', 'reg',\n]);\n\n\n/**\n * Mimetypes that are never safe to accept, regardless of extension. These render as active\n * content in a browser (svg can carry <script>), so they are rejected even when the filename\n * looks harmless. Kept alongside DANGEROUS_EXTENSIONS so upload paths check both.\n */\nexport const DANGEROUS_MIME_TYPES = new Set([\n 'image/svg+xml', 'text/html', 'application/xhtml+xml',\n]);\n\n/**\n * Percent-decodes a filename, repeating a bounded number of times so a double-encoded payload\n * (`%252e` -> `%2e` -> `.`) survives a single pass through a proxy/framework that already\n * decoded once. Malformed escape sequences are left as-is rather than thrown, since this runs\n * on attacker-controlled input and a literal `%` in a filename (`100%done.pdf`) is legal.\n */\nfunction decodePercentEncodingSafely(name: string): string {\n let decoded = name;\n for (let i = 0; i < 3; i++) {\n let next: string;\n try {\n next = decodeURIComponent(decoded);\n } catch {\n return decoded;\n }\n if (next === decoded) {\n return decoded;\n }\n decoded = next;\n }\n return decoded;\n}\n\n/**\n * Reduces a client-supplied name to the name that will actually be resolved on disk, so\n * extension checks can't be dodged by decorating it. Each step defends a known bypass:\n *\n * - `evil.exe%2e` -> percent-encoding a trailing dot (or anything else) hides the real\n * extension from naive string matching; decode before inspecting it.\n * - `../../evil.exe` -> only the final path segment is the file name.\n * - `evil.exe\\0.png` -> a NUL truncates the name at the syscall/filesystem layer, so\n * anything after it is invisible to the OS but visible to naive\n * validation.\n * - `evil.exe::$DATA` -> NTFS alternate data stream suffix; the file on disk is evil.exe.\n * - `evil.exe.` / `.exe ` -> Windows silently strips trailing dots and spaces when resolving\n * a path, so these land on disk as evil.exe.\n */\nexport function normalizeUploadedFileName(fileName?: string | null): string {\n if (!fileName) {\n return '';\n }\n\n let name = decodePercentEncodingSafely(String(fileName));\n name = name.split(/[/\\\\]/).pop() ?? '';\n\n const nulIndex = name.indexOf('\\0');\n if (nulIndex >= 0) {\n name = name.slice(0, nulIndex);\n }\n\n const streamIndex = name.indexOf(':');\n if (streamIndex >= 0) {\n name = name.slice(0, streamIndex);\n }\n\n return name.replace(/[\\s.]+$/, '');\n}\n\n/**\n * The effective extension - what the OS/browser will treat the file as. Used for media\n * category resolution and inline-safety decisions. Always normalizes first, so\n * `evil.exe.` resolves to `exe` rather than to nothing.\n */\nexport function getLowercaseFileExtension(fileName?: string | null): string | undefined {\n const name = normalizeUploadedFileName(fileName);\n\n const lastDotIndex = name.lastIndexOf('.');\n if (lastDotIndex < 0 || lastDotIndex === name.length - 1) {\n return undefined;\n }\n\n return name.slice(lastDotIndex + 1).toLowerCase();\n}\n\n/**\n * Every dot-delimited segment after the stem, lowercased. The danger check uses this rather\n * than only the effective extension so a dangerous type buried in a double extension\n * (`evil.exe.png`, `shell.php.jpg`) is still caught - several servers and browsers resolve\n * such names by an earlier segment than the last one.\n *\n * The stem is skipped so an innocuous file that merely starts with a keyword (`exe.png`)\n * isn't rejected.\n */\nexport function getLowercaseFileExtensionSegments(fileName?: string | null): string[] {\n const segments = normalizeUploadedFileName(fileName).toLowerCase().split('.');\n return segments.slice(1).filter(segment => segment.length > 0);\n}\n\n/** Minimal shape of an uploaded file, so this module stays free of framework imports. */\nexport interface UploadedFileLike {\n mimetype?: string;\n originalname?: string;\n filename?: string;\n}\n\n/** originalname is the client-supplied name; filename is multer's on-disk name. */\nexport function getUploadedFileName(file?: UploadedFileLike | null): string {\n return file?.originalname ?? file?.filename ?? '';\n}\n\n/**\n * Single predicate for \"must never be stored\". Shared by every upload entry point\n * (MediaFieldCrudManager, chatter attachments) so the rules can't drift between them.\n * Extensions are checked before mimetype so a spoofed Content-Type (e.g.\n * application/octet-stream, or image/png, on an .html file) can't bypass it.\n */\nexport function isDangerousMediaFile(file?: UploadedFileLike | null): boolean {\n const segments = getLowercaseFileExtensionSegments(getUploadedFileName(file));\n if (segments.some(segment => DANGEROUS_EXTENSIONS.has(segment))) {\n return true;\n }\n\n return DANGEROUS_MIME_TYPES.has((file?.mimetype || '').toLowerCase().trim());\n}\n\n/**\n * Single source of truth for extension -> coarse media category. Shared by upload-time\n * validation (MediaFieldCrudManager) and serve-time header hardening (ServeStaticModule), so\n * both agree on which extensions belong to which category and neither drifts out of sync.\n * webm/ogg are shared between AUDIO_EXTENSIONS and VIDEO_EXTENSIONS - last one wins here, they\n * default to 'video' since that's the more common upload case.\n */\nexport const EXT_TO_MEDIA_TYPE: Record<string, MediaCategory> = {\n ...Object.fromEntries(IMAGE_EXTENSIONS.map((ext) => [ext, 'image' as const])),\n ...Object.fromEntries(AUDIO_EXTENSIONS.map((ext) => [ext, 'audio' as const])),\n ...Object.fromEntries(VIDEO_EXTENSIONS.map((ext) => [ext, 'video' as const])),\n ...Object.fromEntries(DOCUMENT_EXTENSIONS.map((ext) => [ext, 'file' as const])),\n [PDF_EXTENSION]: 'pdf',\n};\n\n/**\n * Extensions safe to serve inline with their natural Content-Type; everything else served from\n * media-files-storage is forced to application/octet-stream + Content-Disposition: attachment.\n */\nexport const INLINE_SAFE_EXTENSIONS = new Set<string>([\n ...IMAGE_EXTENSIONS,\n ...AUDIO_EXTENSIONS,\n ...VIDEO_EXTENSIONS,\n PDF_EXTENSION,\n]);\n"]}
|
|
@@ -5,6 +5,9 @@ export declare const SUCCESS_MESSAGES: {
|
|
|
5
5
|
FORGOT_PASSWORD_CONFIRMED: string;
|
|
6
6
|
LOGOUT_SUCCESS: string;
|
|
7
7
|
USER_REGISTERED: string;
|
|
8
|
+
MPIN_SETUP_SUCCESS: string;
|
|
9
|
+
MPIN_CHANGED_SUCCESS: string;
|
|
10
|
+
MPIN_DEVICE_REVOKED: string;
|
|
8
11
|
RECORD_RECOVERED: string;
|
|
9
12
|
SELECTED_RECORDS_RECOVERED: string;
|
|
10
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"success-messages.d.ts","sourceRoot":"","sources":["../../src/constants/success-messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"success-messages.d.ts","sourceRoot":"","sources":["../../src/constants/success-messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;CAiB5B,CAAC"}
|
|
@@ -8,6 +8,9 @@ exports.SUCCESS_MESSAGES = {
|
|
|
8
8
|
FORGOT_PASSWORD_CONFIRMED: 'Forgot password confirmed.',
|
|
9
9
|
LOGOUT_SUCCESS: 'Logged out successfully',
|
|
10
10
|
USER_REGISTERED: 'User registered successfully.',
|
|
11
|
+
MPIN_SETUP_SUCCESS: 'MPIN set up successfully.',
|
|
12
|
+
MPIN_CHANGED_SUCCESS: 'MPIN changed successfully.',
|
|
13
|
+
MPIN_DEVICE_REVOKED: 'MPIN sign-in removed for this device.',
|
|
11
14
|
RECORD_RECOVERED: 'Record successfully recovered',
|
|
12
15
|
SELECTED_RECORDS_RECOVERED: 'Selected records successfully recovered',
|
|
13
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"success-messages.js","sourceRoot":"","sources":["../../src/constants/success-messages.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC5B,6BAA6B,EAAE,oDAAoD;IACnF,sBAAsB,EAAE,6CAA6C;IACrE,0BAA0B,EAAE,6CAA6C;IACzE,yBAAyB,EAAE,4BAA4B;IACvD,cAAc,EAAE,yBAAyB;IACzC,eAAe,EAAE,+BAA+B;IAGhD,gBAAgB,EAAE,+BAA+B;IACjD,0BAA0B,EAAE,yCAAyC;CAExE,CAAC","sourcesContent":["export const SUCCESS_MESSAGES = {\n OTP_SENT_SUCCESS_REGISTRATION: 'User registration initiated. OTP sent to the user.',\n OTP_SENT_SUCCESS_LOGIN: 'User login initiated. OTP sent to the user.',\n FORGOT_PASSWORD_TOKEN_SENT: 'Forgot password - token generated and sent.',\n FORGOT_PASSWORD_CONFIRMED: 'Forgot password confirmed.',\n LOGOUT_SUCCESS: 'Logged out successfully',\n USER_REGISTERED: 'User registered successfully.',\n\n // CRUD service messages\n RECORD_RECOVERED: 'Record successfully recovered',\n SELECTED_RECORDS_RECOVERED: 'Selected records successfully recovered',\n\n};\n"]}
|
|
1
|
+
{"version":3,"file":"success-messages.js","sourceRoot":"","sources":["../../src/constants/success-messages.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC5B,6BAA6B,EAAE,oDAAoD;IACnF,sBAAsB,EAAE,6CAA6C;IACrE,0BAA0B,EAAE,6CAA6C;IACzE,yBAAyB,EAAE,4BAA4B;IACvD,cAAc,EAAE,yBAAyB;IACzC,eAAe,EAAE,+BAA+B;IAGhD,kBAAkB,EAAE,2BAA2B;IAC/C,oBAAoB,EAAE,4BAA4B;IAClD,mBAAmB,EAAE,uCAAuC;IAG5D,gBAAgB,EAAE,+BAA+B;IACjD,0BAA0B,EAAE,yCAAyC;CAExE,CAAC","sourcesContent":["export const SUCCESS_MESSAGES = {\n OTP_SENT_SUCCESS_REGISTRATION: 'User registration initiated. OTP sent to the user.',\n OTP_SENT_SUCCESS_LOGIN: 'User login initiated. OTP sent to the user.',\n FORGOT_PASSWORD_TOKEN_SENT: 'Forgot password - token generated and sent.',\n FORGOT_PASSWORD_CONFIRMED: 'Forgot password confirmed.',\n LOGOUT_SUCCESS: 'Logged out successfully',\n USER_REGISTERED: 'User registered successfully.',\n\n // MPIN messages\n MPIN_SETUP_SUCCESS: 'MPIN set up successfully.',\n MPIN_CHANGED_SUCCESS: 'MPIN changed successfully.',\n MPIN_DEVICE_REVOKED: 'MPIN sign-in removed for this device.',\n\n // CRUD service messages\n RECORD_RECOVERED: 'Record successfully recovered',\n SELECTED_RECORDS_RECOVERED: 'Selected records successfully recovered',\n\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.constants.d.ts","sourceRoot":"","sources":["../../src/constants/user.constants.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,mBAAmB,6BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.constants.js","sourceRoot":"","sources":["../../src/constants/user.constants.ts"],"names":[],"mappings":";;;AAYa,QAAA,mBAAmB,GAAG,CAAC,IAAI,EAAE,UAAU,CAAU,CAAC","sourcesContent":["/**\n * The columns of a `User` that are safe to embed in another entity's API response.\n *\n * Whenever a user is attached to a record the caller asked for - a `createdBy` /\n * `updatedBy` populate, a chatter message author - the caller wants to display who it\n * was, not to read their profile. Everything else on `User` is PII (email, mobile),\n * authz metadata (roles, apiKeys) or secret, and the embedded user is frequently\n * someone the viewer has no other visibility of.\n *\n * `fullName` is nullable; consumers that need a fallback should use the record's own\n * context rather than widening this list.\n */\nexport const USER_SUMMARY_FIELDS = ['id', 'fullName'] as const;\n"]}
|
|
@@ -11,6 +11,6 @@ export declare class ActionMetadataController {
|
|
|
11
11
|
findMany(query: any, solidRequestContext: SolidRequestContextDto): Promise<any>;
|
|
12
12
|
findOne(id: string, query: any, solidRequestContext: SolidRequestContextDto): Promise<import("..").ActionMetadata>;
|
|
13
13
|
deleteMany(ids: number[], solidRequestContext: SolidRequestContextDto): Promise<any>;
|
|
14
|
-
delete(id: number, solidRequestContext: SolidRequestContextDto): Promise<import("..").ActionMetadata>;
|
|
14
|
+
delete(id: number, solidRequestContext: SolidRequestContextDto): Promise<import("..").ActionMetadata[]>;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=action-metadata.controller.d.ts.map
|
|
@@ -129,7 +129,7 @@ __decorate([
|
|
|
129
129
|
__decorate([
|
|
130
130
|
(0, swagger_1.ApiBearerAuth)("jwt"),
|
|
131
131
|
(0, common_1.Delete)(':id'),
|
|
132
|
-
openapi.ApiResponse({ status: 200, type: require("../entities/action-metadata.entity").ActionMetadata }),
|
|
132
|
+
openapi.ApiResponse({ status: 200, type: [require("../entities/action-metadata.entity").ActionMetadata] }),
|
|
133
133
|
__param(0, (0, common_1.Param)('id')),
|
|
134
134
|
__param(1, (0, solid_request_context_decorator_1.SolidRequestContextDecorator)()),
|
|
135
135
|
__metadata("design:type", Function),
|
|
@@ -11,6 +11,6 @@ export declare class AgentEventController {
|
|
|
11
11
|
findMany(query: any): Promise<any>;
|
|
12
12
|
findOne(id: string, query: any): Promise<import("..").AgentEvent>;
|
|
13
13
|
deleteMany(ids: number[]): Promise<any>;
|
|
14
|
-
delete(id: number): Promise<import("..").AgentEvent>;
|
|
14
|
+
delete(id: number): Promise<import("..").AgentEvent[]>;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=agent-event.controller.d.ts.map
|
|
@@ -133,7 +133,7 @@ __decorate([
|
|
|
133
133
|
__decorate([
|
|
134
134
|
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
135
135
|
(0, common_1.Delete)(':id'),
|
|
136
|
-
openapi.ApiResponse({ status: 200, type: require("../entities/agent-event.entity").AgentEvent }),
|
|
136
|
+
openapi.ApiResponse({ status: 200, type: [require("../entities/agent-event.entity").AgentEvent] }),
|
|
137
137
|
__param(0, (0, common_1.Param)('id')),
|
|
138
138
|
__metadata("design:type", Function),
|
|
139
139
|
__metadata("design:paramtypes", [Number]),
|
|
@@ -11,6 +11,6 @@ export declare class AgentSessionController {
|
|
|
11
11
|
findMany(query: any): Promise<any>;
|
|
12
12
|
findOne(id: string, query: any): Promise<import("..").AgentSession>;
|
|
13
13
|
deleteMany(ids: number[]): Promise<any>;
|
|
14
|
-
delete(id: number): Promise<import("..").AgentSession>;
|
|
14
|
+
delete(id: number): Promise<import("..").AgentSession[]>;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=agent-session.controller.d.ts.map
|
|
@@ -133,7 +133,7 @@ __decorate([
|
|
|
133
133
|
__decorate([
|
|
134
134
|
(0, swagger_1.ApiBearerAuth)('jwt'),
|
|
135
135
|
(0, common_1.Delete)(':id'),
|
|
136
|
-
openapi.ApiResponse({ status: 200, type: require("../entities/agent-session.entity").AgentSession }),
|
|
136
|
+
openapi.ApiResponse({ status: 200, type: [require("../entities/agent-session.entity").AgentSession] }),
|
|
137
137
|
__param(0, (0, common_1.Param)('id')),
|
|
138
138
|
__metadata("design:type", Function),
|
|
139
139
|
__metadata("design:paramtypes", [Number]),
|
|
@@ -64,7 +64,7 @@ export declare class AuthenticationController {
|
|
|
64
64
|
};
|
|
65
65
|
refreshToken: string;
|
|
66
66
|
}>;
|
|
67
|
-
logout(refreshToken: string): Promise<{
|
|
67
|
+
logout(refreshToken: string, allDevices?: boolean): Promise<{
|
|
68
68
|
message: string;
|
|
69
69
|
}>;
|
|
70
70
|
generateApiKey(dto: CreateApiKeyDto, activeUser: ActiveUserData): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/authentication.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MA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AAE,yBAAyB;;;;;;;;;;;IAOnF,qBAAqB,CAAS,wBAAwB,EAAE,wBAAwB;;;;;;;IAMhF,cAAc,CAAS,iBAAiB,EAAE,iBAAiB,EAAgB,UAAU,EAAE,cAAc;IAMrG,EAAE,CACgB,UAAU,EAAE,cAAc;;;;;;;;;;IAStC,MAAM,CACc,YAAY,EAAE,MAAM,EACtB,UAAU,CAAC,EAAE,OAAO;;;IAQ5C,cAAc,CACF,GAAG,EAAE,eAAe,EACd,UAAU,EAAE,cAAc;;;;IAQ5C,qBAAqB,CACc,MAAM,EAAE,MAAM,EACrC,GAAG,EAAE,eAAe;;;;IAQhC,YAAY,CACmB,EAAE,EAAE,MAAM,EAC7B,GAAG,EAAE,eAAe,EACd,UAAU,EAAE,cAAc;IAQtC,QAAQ,CAA4B,MAAM,EAAE,MAAM;;;;;;;;;;;;IAMxD,eAAe,CACG,UAAU,EAAE,cAAc,EACd,aAAa,EAAE,MAAM;;;IASnD,eAAe,CAAS,cAAc,EAAE,cAAc;;;;;;;;;;;;CAGzD"}
|
|
@@ -61,8 +61,8 @@ let AuthenticationController = AuthenticationController_1 = class Authentication
|
|
|
61
61
|
me(activeUser) {
|
|
62
62
|
return this.authService.me(activeUser);
|
|
63
63
|
}
|
|
64
|
-
async logout(refreshToken) {
|
|
65
|
-
return this.authService.logout(refreshToken);
|
|
64
|
+
async logout(refreshToken, allDevices) {
|
|
65
|
+
return this.authService.logout(refreshToken, allDevices === true);
|
|
66
66
|
}
|
|
67
67
|
generateApiKey(dto, activeUser) {
|
|
68
68
|
return this.apiKeyService.generate(activeUser.sub, dto);
|
|
@@ -169,8 +169,9 @@ __decorate([
|
|
|
169
169
|
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
170
170
|
openapi.ApiResponse({ status: common_1.HttpStatus.OK }),
|
|
171
171
|
__param(0, (0, common_1.Body)('refreshToken')),
|
|
172
|
+
__param(1, (0, common_1.Body)('allDevices')),
|
|
172
173
|
__metadata("design:type", Function),
|
|
173
|
-
__metadata("design:paramtypes", [String]),
|
|
174
|
+
__metadata("design:paramtypes", [String, Boolean]),
|
|
174
175
|
__metadata("design:returntype", Promise)
|
|
175
176
|
], AuthenticationController.prototype, "logout", null);
|
|
176
177
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.controller.js","sourceRoot":"","sources":["../../src/controllers/authentication.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAqI;AACrI,6CAAoE;AAEpE,+EAAiE;AACjE,qEAAwD;AACxD,qEAAgE;AAChE,qFAA+E;AAC/E,mEAA6D;AAC7D,mEAA6D;AAC7D,uFAAiF;AACjF,iEAA4D;AAC5D,+DAA0D;AAC1D,qDAAgD;AAChD,uEAAkE;AAClE,qDAAgD;AAEhD,iEAA4D;AAC5D,+EAA2E;AAQpE,IAAM,wBAAwB,gCAA9B,MAAM,wBAAwB;IAGjC,YACqB,WAAkC,EAClC,aAA4B;QAD5B,gBAAW,GAAX,WAAW,CAAuB;QAClC,kBAAa,GAAb,aAAa,CAAe;QAJhC,WAAM,GAAG,IAAI,eAAM,CAAC,0BAAwB,CAAC,IAAI,CAAC,CAAC;IAKhE,CAAC;IAKL,MAAM,CAAS,SAAoB;QAC/B,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC9C,CAAC;IAID,aAAa,CAAS,SAA6B,EAAgB,UAA0B;QACzF,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC1D,CAAC;IAMK,AAAN,KAAK,CAAC,MAAM,CACoB,QAAkB,EACtC,SAAoB;QAM5B,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAS9C,CAAC;IAMD,aAAa,CAAS,eAAgC;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAC3D,CAAC;IA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pB,IAAA,cAAK,EAAC,cAAc,CAAC;IACrB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;kCAAd,mBAAU,CAAC,EAAE;IAElB,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IACzB,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,kCAAU,GAAE,CAAA;;6CADA,oCAAe;;4DAI/B;AAKK;IAHL,IAAA,yBAAM,GAAE;IACR,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;IAC5G,IAAA,YAAG,EAAC,aAAa,CAAC;;IACH,WAAA,IAAA,gBAAO,EAAC,gBAAgB,CAAC,CAAA;;;;wDAExC;AAID;IAFC,IAAA,aAAI,EAAC,UAAU,CAAC;IAChB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;kCAAd,mBAAU,CAAC,EAAE;IAElB,WAAA,IAAA,kCAAU,GAAE,CAAA;IACZ,WAAA,IAAA,gBAAO,EAAC,eAAe,CAAC,CAAA;;;;+DAI5B;AAKD;IAHC,IAAA,yBAAM,GAAE;IACR,IAAA,aAAI,EAAC,cAAc,CAAC;IACpB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;kCAAd,mBAAU,CAAC,EAAE;IACN,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAiB,iCAAc;;+DAErD;mCA7IQ,wBAAwB;IAJpC,IAAA,mBAAU,EAAC,KAAK,CAAC;IACjB,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAOgB,8CAAqB;QACnB,+BAAa;GALxC,wBAAwB,CA8IpC","sourcesContent":["import { Body, Controller, Get, HttpCode, HttpStatus, Logger, Param, ParseIntPipe, Patch, Post, Res, Headers } from '@nestjs/common';\nimport { ApiBearerAuth, ApiHeader, ApiTags } from '@nestjs/swagger';\nimport { Response } from 'express';\nimport { ActiveUser } from \"../decorators/active-user.decorator\";\nimport { Public } from '../decorators/public.decorator';\nimport { ChangePasswordDto } from \"../dtos/change-password.dto\";\nimport { ConfirmForgotPasswordDto } from '../dtos/confirm-forgot-password.dto';\nimport { CreateApiKeyDto } from '../dtos/create-api-key.dto';\nimport { UpdateApiKeyDto } from '../dtos/update-api-key.dto';\nimport { InitiateForgotPasswordDto } from '../dtos/initiate-forgot-password.dto';\nimport { RefreshTokenDto } from '../dtos/refresh-token.dto';\nimport { SsoExchangeDto } from '../dtos/sso-exchange.dto';\nimport { SignInDto } from '../dtos/sign-in.dto';\nimport { RegisterPrivateDto } from '../dtos/register-private.dto';\nimport { SignUpDto } from '../dtos/sign-up.dto';\nimport { ActiveUserData } from \"../interfaces/active-user-data.interface\";\nimport { ApiKeyService } from '../services/api-key.service';\nimport { AuthenticationService } from '../services/authentication.service';\n\n\n// @Auth(AuthType.None)\n@Controller('iam')\n@ApiTags(\"Solid Core\")\n// @UseGuards(ThrottlerGuard)\n// @SkipThrottle({login: true, short: true, burst: true, sustained: true}) // disable all sets by default for this controller\nexport class AuthenticationController {\n private readonly logger = new Logger(AuthenticationController.name);\n\n constructor(\n private readonly authService: AuthenticationService,\n private readonly apiKeyService: ApiKeyService,\n ) { }\n\n @Public()\n // @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\n @Post('register')\n signUp(@Body() signUpDto: SignUpDto) {\n return this.authService.signUp(signUpDto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('register-private')\n signUpPrivate(@Body() signUpDto: RegisterPrivateDto, @ActiveUser() activeUser: ActiveUserData) {\n return this.authService.signUp(signUpDto, activeUser);\n }\n\n @Public()\n // @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\n @HttpCode(HttpStatus.OK) // by default @Post does 201, we wanted 200 - hence using @HttpCode(HttpStatus.OK)\n @Post('authenticate')\n async signIn(\n @Res({ passthrough: true }) response: Response,\n @Body() signInDto: SignInDto\n ) {\n // This means that we are passing the token back in plain text. \n // This is less secure. \n // console.log(\"signInDto in Signin Controller\", signInDto);\n\n return this.authService.signIn(signInDto);\n\n // This means we are setting the token as a http only cookie.\n // const accessToken = await this.authService.signIn(signInDto);\n // response.cookie('accessToken', accessToken, {\n // secure: true,\n // httpOnly: true,\n // sameSite: true,\n // });\n }\n\n @Public()\n // @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\n @HttpCode(HttpStatus.OK) // changed since the default is 201\n @Post('refresh-tokens')\n refreshTokens(@Body() refreshTokenDto: RefreshTokenDto) {\n return this.authService.refreshTokens(refreshTokenDto);\n }\n\n @Public()\n // @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\n @Post('initiate/forgot-password')\n initiateForgotPassword(@Body() initiateForgotPasswordDto: InitiateForgotPasswordDto) {\n return this.authService.initiateForgotPassword(initiateForgotPasswordDto);\n }\n\n @Public()\n // @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\n @Post('confirm/forgot-password')\n confirmForgotPassword(@Body() confirmForgotPasswordDto: ConfirmForgotPasswordDto) {\n return this.authService.confirmForgotPassword(confirmForgotPasswordDto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('change-password')\n changePassword(@Body() changePasswordDto: ChangePasswordDto, @ActiveUser() activeUser: ActiveUserData) {\n return this.authService.changePassword(changePasswordDto, activeUser);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get('me')\n me(\n @ActiveUser() activeUser: ActiveUserData\n ) {\n return this.authService.me(activeUser);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('logout')\n @Public()\n @HttpCode(HttpStatus.OK)\n async logout(@Body('refreshToken') refreshToken: string) {\n return this.authService.logout(refreshToken);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('api-keys')\n @HttpCode(HttpStatus.CREATED)\n generateApiKey(\n @Body() dto: CreateApiKeyDto,\n @ActiveUser() activeUser: ActiveUserData,\n ) {\n return this.apiKeyService.generate(activeUser.sub, dto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('api-keys/users/:userId')\n @HttpCode(HttpStatus.CREATED)\n generateApiKeyForUser(\n @Param('userId', ParseIntPipe) userId: number,\n @Body() dto: CreateApiKeyDto,\n ) {\n return this.apiKeyService.generate(userId, dto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Patch('api-keys/:id')\n @HttpCode(HttpStatus.OK)\n updateApiKey(\n @Param('id', ParseIntPipe) id: number,\n @Body() dto: UpdateApiKeyDto,\n @ActiveUser() activeUser: ActiveUserData,\n ) {\n return this.apiKeyService.updateKey(id, activeUser.sub, dto);\n }\n\n @Public()\n @ApiHeader({ name: 'solidx-api-key', required: true, description: 'API key for authenticating the request' })\n @Get('api-keys/me')\n async apiKeyMe(@Headers('solidx-api-key') apiKey: string) {\n return this.apiKeyService.apiKeyMe(apiKey);\n }\n\n @Post('sso/code')\n @HttpCode(HttpStatus.OK)\n generateSsoCode(\n @ActiveUser() activeUser: ActiveUserData, \n @Headers('authorization') authorization: string,\n ) {\n const rawAccessToken = authorization?.replace(/^Bearer\\s+/i, '');\n return this.authService.generateSsoCode(activeUser, rawAccessToken);\n }\n\n @Public()\n @Post('sso/exchange')\n @HttpCode(HttpStatus.OK)\n exchangeSsoCode(@Body() ssoExchangeDto: SsoExchangeDto) {\n return this.authService.exchangeSsoCode(ssoExchangeDto.code);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"authentication.controller.js","sourceRoot":"","sources":["../../src/controllers/authentication.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAqI;AACrI,6CAAoE;AAEpE,+EAAiE;AACjE,qEAAwD;AACxD,qEAAgE;AAChE,qFAA+E;AAC/E,mEAA6D;AAC7D,mEAA6D;AAC7D,uFAAiF;AACjF,iEAA4D;AAC5D,+DAA0D;AAC1D,qDAAgD;AAChD,uEAAkE;AAClE,qDAAgD;AAEhD,iEAA4D;AAC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AAG,EAAC,aAAa,CAAC;;IACH,WAAA,IAAA,gBAAO,EAAC,gBAAgB,CAAC,CAAA;;;;wDAExC;AAID;IAFC,IAAA,aAAI,EAAC,UAAU,CAAC;IAChB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;kCAAd,mBAAU,CAAC,EAAE;IAElB,WAAA,IAAA,kCAAU,GAAE,CAAA;IACZ,WAAA,IAAA,gBAAO,EAAC,eAAe,CAAC,CAAA;;;;+DAI5B;AAKD;IAHC,IAAA,yBAAM,GAAE;IACR,IAAA,aAAI,EAAC,cAAc,CAAC;IACpB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;kCAAd,mBAAU,CAAC,EAAE;IACN,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAiB,iCAAc;;+DAErD;mCAhJQ,wBAAwB;IAJpC,IAAA,mBAAU,EAAC,KAAK,CAAC;IACjB,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAOgB,8CAAqB;QACnB,+BAAa;GALxC,wBAAwB,CAiJpC","sourcesContent":["import { Body, Controller, Get, HttpCode, HttpStatus, Logger, Param, ParseIntPipe, Patch, Post, Res, Headers } from '@nestjs/common';\nimport { ApiBearerAuth, ApiHeader, ApiTags } from '@nestjs/swagger';\nimport { Response } from 'express';\nimport { ActiveUser } from \"../decorators/active-user.decorator\";\nimport { Public } from '../decorators/public.decorator';\nimport { ChangePasswordDto } from \"../dtos/change-password.dto\";\nimport { ConfirmForgotPasswordDto } from '../dtos/confirm-forgot-password.dto';\nimport { CreateApiKeyDto } from '../dtos/create-api-key.dto';\nimport { UpdateApiKeyDto } from '../dtos/update-api-key.dto';\nimport { InitiateForgotPasswordDto } from '../dtos/initiate-forgot-password.dto';\nimport { RefreshTokenDto } from '../dtos/refresh-token.dto';\nimport { SsoExchangeDto } from '../dtos/sso-exchange.dto';\nimport { SignInDto } from '../dtos/sign-in.dto';\nimport { RegisterPrivateDto } from '../dtos/register-private.dto';\nimport { SignUpDto } from '../dtos/sign-up.dto';\nimport { ActiveUserData } from \"../interfaces/active-user-data.interface\";\nimport { ApiKeyService } from '../services/api-key.service';\nimport { AuthenticationService } from '../services/authentication.service';\n\n\n// @Auth(AuthType.None)\n@Controller('iam')\n@ApiTags(\"Solid Core\")\n// @UseGuards(ThrottlerGuard)\n// @SkipThrottle({login: true, short: true, burst: true, sustained: true}) // disable all sets by default for this controller\nexport class AuthenticationController {\n private readonly logger = new Logger(AuthenticationController.name);\n\n constructor(\n private readonly authService: AuthenticationService,\n private readonly apiKeyService: ApiKeyService,\n ) { }\n\n @Public()\n // @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\n @Post('register')\n signUp(@Body() signUpDto: SignUpDto) {\n return this.authService.signUp(signUpDto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('register-private')\n signUpPrivate(@Body() signUpDto: RegisterPrivateDto, @ActiveUser() activeUser: ActiveUserData) {\n return this.authService.signUp(signUpDto, activeUser);\n }\n\n @Public()\n // @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\n @HttpCode(HttpStatus.OK) // by default @Post does 201, we wanted 200 - hence using @HttpCode(HttpStatus.OK)\n @Post('authenticate')\n async signIn(\n @Res({ passthrough: true }) response: Response,\n @Body() signInDto: SignInDto\n ) {\n // This means that we are passing the token back in plain text. \n // This is less secure. \n // console.log(\"signInDto in Signin Controller\", signInDto);\n\n return this.authService.signIn(signInDto);\n\n // This means we are setting the token as a http only cookie.\n // const accessToken = await this.authService.signIn(signInDto);\n // response.cookie('accessToken', accessToken, {\n // secure: true,\n // httpOnly: true,\n // sameSite: true,\n // });\n }\n\n @Public()\n // @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\n @HttpCode(HttpStatus.OK) // changed since the default is 201\n @Post('refresh-tokens')\n refreshTokens(@Body() refreshTokenDto: RefreshTokenDto) {\n return this.authService.refreshTokens(refreshTokenDto);\n }\n\n @Public()\n // @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\n @Post('initiate/forgot-password')\n initiateForgotPassword(@Body() initiateForgotPasswordDto: InitiateForgotPasswordDto) {\n return this.authService.initiateForgotPassword(initiateForgotPasswordDto);\n }\n\n @Public()\n // @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\n @Post('confirm/forgot-password')\n confirmForgotPassword(@Body() confirmForgotPasswordDto: ConfirmForgotPasswordDto) {\n return this.authService.confirmForgotPassword(confirmForgotPasswordDto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('change-password')\n changePassword(@Body() changePasswordDto: ChangePasswordDto, @ActiveUser() activeUser: ActiveUserData) {\n return this.authService.changePassword(changePasswordDto, activeUser);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get('me')\n me(\n @ActiveUser() activeUser: ActiveUserData\n ) {\n return this.authService.me(activeUser);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('logout')\n @Public()\n @HttpCode(HttpStatus.OK)\n async logout(\n @Body('refreshToken') refreshToken: string,\n @Body('allDevices') allDevices?: boolean,\n ) {\n return this.authService.logout(refreshToken, allDevices === true);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('api-keys')\n @HttpCode(HttpStatus.CREATED)\n generateApiKey(\n @Body() dto: CreateApiKeyDto,\n @ActiveUser() activeUser: ActiveUserData,\n ) {\n return this.apiKeyService.generate(activeUser.sub, dto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Post('api-keys/users/:userId')\n @HttpCode(HttpStatus.CREATED)\n generateApiKeyForUser(\n @Param('userId', ParseIntPipe) userId: number,\n @Body() dto: CreateApiKeyDto,\n ) {\n return this.apiKeyService.generate(userId, dto);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Patch('api-keys/:id')\n @HttpCode(HttpStatus.OK)\n updateApiKey(\n @Param('id', ParseIntPipe) id: number,\n @Body() dto: UpdateApiKeyDto,\n @ActiveUser() activeUser: ActiveUserData,\n ) {\n return this.apiKeyService.updateKey(id, activeUser.sub, dto);\n }\n\n @Public()\n @ApiHeader({ name: 'solidx-api-key', required: true, description: 'API key for authenticating the request' })\n @Get('api-keys/me')\n async apiKeyMe(@Headers('solidx-api-key') apiKey: string) {\n return this.apiKeyService.apiKeyMe(apiKey);\n }\n\n @Post('sso/code')\n @HttpCode(HttpStatus.OK)\n generateSsoCode(\n @ActiveUser() activeUser: ActiveUserData, \n @Headers('authorization') authorization: string,\n ) {\n const rawAccessToken = authorization?.replace(/^Bearer\\s+/i, '');\n return this.authService.generateSsoCode(activeUser, rawAccessToken);\n }\n\n @Public()\n @Post('sso/exchange')\n @HttpCode(HttpStatus.OK)\n exchangeSsoCode(@Body() ssoExchangeDto: SsoExchangeDto) {\n return this.authService.exchangeSsoCode(ssoExchangeDto.code);\n }\n}\n"]}
|
|
@@ -16,6 +16,11 @@ export declare class ChatterMessageController {
|
|
|
16
16
|
records: import("..").ChatterMessage[];
|
|
17
17
|
}>;
|
|
18
18
|
findMany(query: any): Promise<any>;
|
|
19
|
+
getMentionableUsers(query: any): Promise<{
|
|
20
|
+
id: number;
|
|
21
|
+
username: string;
|
|
22
|
+
fullName: string;
|
|
23
|
+
}[]>;
|
|
19
24
|
findOne(id: string, query: any): Promise<import("..").ChatterMessage>;
|
|
20
25
|
postMessage(postDto: PostChatterMessageDto, files: Array<Express.Multer.File>): Promise<import("..").ChatterMessage>;
|
|
21
26
|
markCompleted(id: string): Promise<import("..").ChatterMessage>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatter-message.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/chatter-message.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAG5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAUtF,qBAEa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,qBAAqB;IAsDrD,kBAAkB,CACH,QAAQ,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAC9B,KAAK,EAAE,GAAG;;;;;;;;;;;IAgBf,QAAQ,CAAU,KAAK,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"chatter-message.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/chatter-message.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAG5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAUtF,qBAEa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,qBAAqB;IAsDrD,kBAAkB,CACH,QAAQ,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAC9B,KAAK,EAAE,GAAG;;;;;;;;;;;IAgBf,QAAQ,CAAU,KAAK,EAAE,GAAG;IAQ5B,mBAAmB,CAAU,KAAK,EAAE,GAAG;;;;;IAMvC,OAAO,CAAc,EAAE,EAAE,MAAM,EAAW,KAAK,EAAE,GAAG;IAmBpD,WAAW,CACP,OAAO,EAAE,qBAAqB,EACrB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IAO9C,aAAa,CAAc,EAAE,EAAE,MAAM;IAOrC,uBAAuB,CACd,EAAE,EAAE,MAAM,EACf,SAAS,EAAE,2BAA2B,EAC7B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;CAIrD"}
|
|
@@ -35,6 +35,9 @@ let ChatterMessageController = class ChatterMessageController {
|
|
|
35
35
|
async findMany(query) {
|
|
36
36
|
return this.service.find(query);
|
|
37
37
|
}
|
|
38
|
+
async getMentionableUsers(query) {
|
|
39
|
+
return this.service.getMentionableUsers(query?.search, query?.limit ? +query.limit : undefined);
|
|
40
|
+
}
|
|
38
41
|
async findOne(id, query) {
|
|
39
42
|
return this.service.findOne(+id, query);
|
|
40
43
|
}
|
|
@@ -87,6 +90,17 @@ __decorate([
|
|
|
87
90
|
__metadata("design:paramtypes", [Object]),
|
|
88
91
|
__metadata("design:returntype", Promise)
|
|
89
92
|
], ChatterMessageController.prototype, "findMany", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, swagger_1.ApiBearerAuth)("jwt"),
|
|
95
|
+
(0, swagger_1.ApiQuery)({ name: 'search', required: false, type: String }),
|
|
96
|
+
(0, swagger_1.ApiQuery)({ name: 'limit', required: false, type: Number }),
|
|
97
|
+
(0, common_1.Get)('mentionable-users'),
|
|
98
|
+
openapi.ApiResponse({ status: 200 }),
|
|
99
|
+
__param(0, (0, common_1.Query)()),
|
|
100
|
+
__metadata("design:type", Function),
|
|
101
|
+
__metadata("design:paramtypes", [Object]),
|
|
102
|
+
__metadata("design:returntype", Promise)
|
|
103
|
+
], ChatterMessageController.prototype, "getMentionableUsers", null);
|
|
90
104
|
__decorate([
|
|
91
105
|
(0, swagger_1.ApiBearerAuth)("jwt"),
|
|
92
106
|
(0, common_1.Get)(':id'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatter-message.controller.js","sourceRoot":"","sources":["../../src/controllers/chatter-message.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA+H;AAC/H,+DAA+D;AAC/D,6CAAmE;AACnE,iFAA4E;AAG5E,+EAAyE;AACzE,6FAAsF;AAKtF,IAAK,eAGJ;AAHD,WAAK,eAAe;IAClB,0CAAuB,CAAA;IACvB,0CAAuB,CAAA;AACzB,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;AAIM,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YAA6B,OAA8B;QAA9B,YAAO,GAAP,OAAO,CAAuB;IAAG,CAAC;IAsDzD,AAAN,KAAK,CAA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KAAK;;2DAG9B;AAIK;IAFL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,cAAK,EAAC,cAAc,CAAC;;IACD,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;6DAE/B;AAKK;IAHL,IAAA,uBAAa,EAAC,KAAK,CAAC;IACpB,IAAA,cAAK,EAAC,UAAU,CAAC;IACjB,IAAA,wBAAe,EAAC,IAAA,sCAAmB,GAAE,CAAC;;IAEpC,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,sBAAa,GAAE,CAAA;;6CADG,6DAA2B;QACtB,KAAK;;uEAG9B;mCAzHU,wBAAwB;IAFpC,IAAA,iBAAO,EAAC,YAAY,CAAC;IACrB,IAAA,mBAAU,EAAC,iBAAiB,CAAC;qCAEU,+CAAqB;GADhD,wBAAwB,CA0HpC","sourcesContent":["import { Controller, Post, Body, Param, UploadedFiles, UseInterceptors, Put, Get, Query, Delete, Patch } from '@nestjs/common';\nimport { AnyFilesInterceptor } from \"@nestjs/platform-express\";\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { ChatterMessageService } from '../services/chatter-message.service';\nimport { CreateChatterMessageDto } from '../dtos/create-chatter-message.dto';\nimport { UpdateChatterMessageDto } from '../dtos/update-chatter-message.dto';\nimport { PostChatterMessageDto } from '../dtos/post-chatter-message.dto';\nimport { UpdateChatterNoteMessageDto } from '../dtos/update-chatter-note-message.dto';\nimport { SolidRequestContextDecorator } from 'src/decorators/solid-request-context.decorator';\nimport { SolidRequestContextDto } from 'src/dtos/solid-request-context.dto';\nimport { Public } from 'src/decorators/public.decorator';\n\nenum ShowSoftDeleted {\n INCLUSIVE = \"inclusive\",\n EXCLUSIVE = \"exclusive\",\n}\n\n@ApiTags('Solid Core')\n@Controller('chatter-message')\nexport class ChatterMessageController {\n constructor(private readonly service: ChatterMessageService) {}\n\n // @ApiBearerAuth(\"jwt\")\n // @Post()\n // @UseInterceptors(AnyFilesInterceptor())\n // create(@Body() createDto: CreateChatterMessageDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n // return this.service.create(createDto, files);\n // }\n\n // @ApiBearerAuth(\"jwt\")\n // @Post('/bulk')\n // @UseInterceptors(AnyFilesInterceptor())\n // insertMany(@Body() createDtos: CreateChatterMessageDto[], @UploadedFiles() filesArray: Express.Multer.File[][] = []) {\n // return this.service.insertMany(createDtos, filesArray);\n // }\n\n\n // @ApiBearerAuth(\"jwt\")\n // @Put(':id')\n // @UseInterceptors(AnyFilesInterceptor())\n // update(@Param('id') id: number, @Body() updateDto: UpdateChatterMessageDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n // return this.service.update(id, updateDto, files);\n // }\n\n // @ApiBearerAuth(\"jwt\")\n // @Patch(':id')\n // @UseInterceptors(AnyFilesInterceptor())\n // partialUpdate(@Param('id') id: number, @Body() updateDto: UpdateChatterMessageDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n // return this.service.update(id, updateDto, files, true);\n // }\n\n // @ApiBearerAuth(\"jwt\")\n // @Post('/bulk-recover')\n // async recoverMany(@Body() ids: number[]) {\n // return this.service.recoverMany(ids);\n // }\n\n // @ApiBearerAuth(\"jwt\")\n // @Get('/recover/:id')\n // async recover(@Param('id') id: number) {\n // return this.service.recover(id);\n // }\n\n @ApiBearerAuth(\"jwt\")\n @Get('/getChatterMessages/:entityId/:entityName')\n @ApiQuery({ name: 'showSoftDeleted', required: false, enum: ShowSoftDeleted })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array })\n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n async getChatterMessages(\n @Param('entityId') entityId: number,\n @Param('entityName') entityName: string,\n @Query() query: any\n ) {\n return this.service.getChatterMessages(entityId, entityName, query);\n }\n\n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'showSoftDeleted', required: false, enum: ShowSoftDeleted })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array }) \n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n @Get()\n async findMany(@Query() query: any) { \n return this.service.find(query); \n }\n\n @ApiBearerAuth(\"jwt\")\n @Get(':id')\n async findOne(@Param('id') id: string, @Query() query: any) {\n return this.service.findOne(+id, query);\n }\n\n // @ApiBearerAuth(\"jwt\")\n // @Delete('/bulk')\n // async deleteMany(@Body() ids: number[]) {\n // return this.service.deleteMany(ids);\n // }\n\n // @ApiBearerAuth(\"jwt\")\n // @Delete(':id')\n // async delete(@Param('id') id: number) {\n // return this.service.delete(id);\n // }\n\n @ApiBearerAuth(\"jwt\")\n @Post('post')\n @UseInterceptors(AnyFilesInterceptor())\n async postMessage(\n @Body() postDto: PostChatterMessageDto,\n @UploadedFiles() files: Array<Express.Multer.File>,\n ) {\n return this.service.postMessage(postDto, files);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Patch(':id/complete')\n async markCompleted(@Param('id') id: string) {\n return this.service.markCompleted(+id);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Patch(':id/note')\n @UseInterceptors(AnyFilesInterceptor())\n async updateCustomNoteMessage(\n @Param('id') id: string,\n @Body() updateDto: UpdateChatterNoteMessageDto,\n @UploadedFiles() files: Array<Express.Multer.File>,\n ) {\n return this.service.updateCustomNoteMessage(+id, updateDto, files);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"chatter-message.controller.js","sourceRoot":"","sources":["../../src/controllers/chatter-message.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA+H;AAC/H,+DAA+D;AAC/D,6CAAmE;AACnE,iFAA4E;AAG5E,+EAAyE;AACzE,6FAAsF;AAKtF,IAAK,eAGJ;AAHD,WAAK,eAAe;IAClB,0CAAuB,CAAA;IACvB,0CAAuB,CAAA;AACzB,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;AAIM,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YAA6B,OAA8B;QAA9B,YAAO,GAAP,OAAO,CAAuB;IAAG,CAAC;IAsDzD,AAAN,KAAK,CAAC,kBAAkB,CACH,QAAgB,EACd,UAAkB,EAC9B,KAAU;QAEnB,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IACtE,CAAC;IAaK,AAAN,KAAK,CAAC,QAAQ,CAAU,KAAU;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAMK,AAAN,KAAK,CAAC,mBAAmB,CAAU,KAAU;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClG,CAAC;IAIK,AAAN,KAAK,CAAC,OAAO,CAAc,EAAU,EAAW,KAAU;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAiBK,AAAN,KAAK,CAAC,WAAW,CACP,OAA8B,EACrB,KAAiC;QAElD,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC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IAAA,cAAK,EAAC,UAAU,CAAC;IACjB,IAAA,wBAAe,EAAC,IAAA,sCAAmB,GAAE,CAAC;;IAEpC,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,sBAAa,GAAE,CAAA;;6CADG,6DAA2B;QACtB,KAAK;;uEAG9B;mCAjIU,wBAAwB;IAFpC,IAAA,iBAAO,EAAC,YAAY,CAAC;IACrB,IAAA,mBAAU,EAAC,iBAAiB,CAAC;qCAEU,+CAAqB;GADhD,wBAAwB,CAkIpC","sourcesContent":["import { Controller, Post, Body, Param, UploadedFiles, UseInterceptors, Put, Get, Query, Delete, Patch } from '@nestjs/common';\nimport { AnyFilesInterceptor } from \"@nestjs/platform-express\";\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { ChatterMessageService } from '../services/chatter-message.service';\nimport { CreateChatterMessageDto } from '../dtos/create-chatter-message.dto';\nimport { UpdateChatterMessageDto } from '../dtos/update-chatter-message.dto';\nimport { PostChatterMessageDto } from '../dtos/post-chatter-message.dto';\nimport { UpdateChatterNoteMessageDto } from '../dtos/update-chatter-note-message.dto';\nimport { SolidRequestContextDecorator } from 'src/decorators/solid-request-context.decorator';\nimport { SolidRequestContextDto } from 'src/dtos/solid-request-context.dto';\nimport { Public } from 'src/decorators/public.decorator';\n\nenum ShowSoftDeleted {\n INCLUSIVE = \"inclusive\",\n EXCLUSIVE = \"exclusive\",\n}\n\n@ApiTags('Solid Core')\n@Controller('chatter-message')\nexport class ChatterMessageController {\n constructor(private readonly service: ChatterMessageService) {}\n\n // @ApiBearerAuth(\"jwt\")\n // @Post()\n // @UseInterceptors(AnyFilesInterceptor())\n // create(@Body() createDto: CreateChatterMessageDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n // return this.service.create(createDto, files);\n // }\n\n // @ApiBearerAuth(\"jwt\")\n // @Post('/bulk')\n // @UseInterceptors(AnyFilesInterceptor())\n // insertMany(@Body() createDtos: CreateChatterMessageDto[], @UploadedFiles() filesArray: Express.Multer.File[][] = []) {\n // return this.service.insertMany(createDtos, filesArray);\n // }\n\n\n // @ApiBearerAuth(\"jwt\")\n // @Put(':id')\n // @UseInterceptors(AnyFilesInterceptor())\n // update(@Param('id') id: number, @Body() updateDto: UpdateChatterMessageDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n // return this.service.update(id, updateDto, files);\n // }\n\n // @ApiBearerAuth(\"jwt\")\n // @Patch(':id')\n // @UseInterceptors(AnyFilesInterceptor())\n // partialUpdate(@Param('id') id: number, @Body() updateDto: UpdateChatterMessageDto, @UploadedFiles() files: Array<Express.Multer.File>) {\n // return this.service.update(id, updateDto, files, true);\n // }\n\n // @ApiBearerAuth(\"jwt\")\n // @Post('/bulk-recover')\n // async recoverMany(@Body() ids: number[]) {\n // return this.service.recoverMany(ids);\n // }\n\n // @ApiBearerAuth(\"jwt\")\n // @Get('/recover/:id')\n // async recover(@Param('id') id: number) {\n // return this.service.recover(id);\n // }\n\n @ApiBearerAuth(\"jwt\")\n @Get('/getChatterMessages/:entityId/:entityName')\n @ApiQuery({ name: 'showSoftDeleted', required: false, enum: ShowSoftDeleted })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array })\n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n async getChatterMessages(\n @Param('entityId') entityId: number,\n @Param('entityName') entityName: string,\n @Query() query: any\n ) {\n return this.service.getChatterMessages(entityId, entityName, query);\n }\n\n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'showSoftDeleted', required: false, enum: ShowSoftDeleted })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @ApiQuery({ name: 'offset', required: false, type: Number })\n @ApiQuery({ name: 'fields', required: false, type: Array })\n @ApiQuery({ name: 'sort', required: false, type: Array }) \n @ApiQuery({ name: 'groupBy', required: false, type: Array })\n @ApiQuery({ name: 'populate', required: false, type: Array })\n @ApiQuery({ name: 'populateMedia', required: false, type: Array })\n @ApiQuery({ name: 'filters', required: false, type: Array })\n @Get()\n async findMany(@Query() query: any) { \n return this.service.find(query); \n }\n\n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'search', required: false, type: String })\n @ApiQuery({ name: 'limit', required: false, type: Number })\n @Get('mentionable-users')\n async getMentionableUsers(@Query() query: any) {\n return this.service.getMentionableUsers(query?.search, query?.limit ? +query.limit : undefined);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get(':id')\n async findOne(@Param('id') id: string, @Query() query: any) {\n return this.service.findOne(+id, query);\n }\n\n // @ApiBearerAuth(\"jwt\")\n // @Delete('/bulk')\n // async deleteMany(@Body() ids: number[]) {\n // return this.service.deleteMany(ids);\n // }\n\n // @ApiBearerAuth(\"jwt\")\n // @Delete(':id')\n // async delete(@Param('id') id: number) {\n // return this.service.delete(id);\n // }\n\n @ApiBearerAuth(\"jwt\")\n @Post('post')\n @UseInterceptors(AnyFilesInterceptor())\n async postMessage(\n @Body() postDto: PostChatterMessageDto,\n @UploadedFiles() files: Array<Express.Multer.File>,\n ) {\n return this.service.postMessage(postDto, files);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Patch(':id/complete')\n async markCompleted(@Param('id') id: string) {\n return this.service.markCompleted(+id);\n }\n\n @ApiBearerAuth(\"jwt\")\n @Patch(':id/note')\n @UseInterceptors(AnyFilesInterceptor())\n async updateCustomNoteMessage(\n @Param('id') id: string,\n @Body() updateDto: UpdateChatterNoteMessageDto,\n @UploadedFiles() files: Array<Express.Multer.File>,\n ) {\n return this.service.updateCustomNoteMessage(+id, updateDto, files);\n }\n}\n"]}
|
|
@@ -19,6 +19,6 @@ export declare class DashboardUserLayoutController {
|
|
|
19
19
|
findMany(query: any): Promise<any>;
|
|
20
20
|
findOne(id: string, query: any): Promise<import("..").DashboardUserLayout>;
|
|
21
21
|
deleteMany(ids: number[]): Promise<any>;
|
|
22
|
-
delete(id: number): Promise<import("..").DashboardUserLayout>;
|
|
22
|
+
delete(id: number): Promise<import("..").DashboardUserLayout[]>;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=dashboard-user-layout.controller.d.ts.map
|
|
@@ -165,7 +165,7 @@ __decorate([
|
|
|
165
165
|
__decorate([
|
|
166
166
|
(0, swagger_1.ApiBearerAuth)("jwt"),
|
|
167
167
|
(0, common_1.Delete)(':id'),
|
|
168
|
-
openapi.ApiResponse({ status: 200, type: require("../entities/dashboard-user-layout.entity").DashboardUserLayout }),
|
|
168
|
+
openapi.ApiResponse({ status: 200, type: [require("../entities/dashboard-user-layout.entity").DashboardUserLayout] }),
|
|
169
169
|
__param(0, (0, common_1.Param)('id')),
|
|
170
170
|
__metadata("design:type", Function),
|
|
171
171
|
__metadata("design:paramtypes", [Number]),
|
|
@@ -12,7 +12,7 @@ export declare class EmailTemplateController {
|
|
|
12
12
|
findMany(query: any): Promise<any>;
|
|
13
13
|
findOne(id: string, query: any): Promise<import("..").EmailTemplate>;
|
|
14
14
|
deleteMany(ids: number[]): Promise<any>;
|
|
15
|
-
delete(id: number): Promise<import("..").EmailTemplate>;
|
|
15
|
+
delete(id: number): Promise<import("..").EmailTemplate[]>;
|
|
16
16
|
generateMailgenTemplate(templateType: string): any;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=email-template.controller.d.ts.map
|
|
@@ -190,7 +190,7 @@ __decorate([
|
|
|
190
190
|
__decorate([
|
|
191
191
|
(0, swagger_1.ApiBearerAuth)("jwt"),
|
|
192
192
|
(0, common_1.Delete)(':id'),
|
|
193
|
-
openapi.ApiResponse({ status: 200, type: require("../entities/email-template.entity").EmailTemplate }),
|
|
193
|
+
openapi.ApiResponse({ status: 200, type: [require("../entities/email-template.entity").EmailTemplate] }),
|
|
194
194
|
__param(0, (0, common_1.Param)('id')),
|
|
195
195
|
__metadata("design:type", Function),
|
|
196
196
|
__metadata("design:paramtypes", [Number]),
|
|
@@ -14,7 +14,7 @@ export declare class ExportTemplateController {
|
|
|
14
14
|
findMany(query: any): Promise<any>;
|
|
15
15
|
findOne(id: string, query: any): Promise<import("..").ExportTemplate>;
|
|
16
16
|
deleteMany(ids: number[]): Promise<any>;
|
|
17
|
-
delete(id: number): Promise<import("..").ExportTemplate>;
|
|
17
|
+
delete(id: number): Promise<import("..").ExportTemplate[]>;
|
|
18
18
|
startExportSync(dto: StartExportSyncDto, res: Response, activeUser: ActiveUserData): Promise<void>;
|
|
19
19
|
startExportAsync(dto: StartExportSyncDto): Promise<import("..").ExportTransaction>;
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-template.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/export-template.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"export-template.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/export-template.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,C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