@rockster/core 0.0.1
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/cache/cache-cleaner.d.ts +7 -0
- package/cache/cache-cleaner.js +28 -0
- package/cache/cache.controller.d.ts +10 -0
- package/cache/cache.controller.js +53 -0
- package/cache/constants.d.ts +5 -0
- package/cache/constants.js +6 -0
- package/cache/decorators/index.d.ts +2 -0
- package/cache/decorators/index.js +18 -0
- package/cache/decorators/inject-cache.decorator.d.ts +1 -0
- package/cache/decorators/inject-cache.decorator.js +14 -0
- package/cache/decorators/key-value.d.ts +2 -0
- package/cache/decorators/key-value.js +40 -0
- package/cache/functions/get-cache.d.ts +1 -0
- package/cache/functions/get-cache.js +8 -0
- package/cache/functions/get-key.-handle.d.ts +2 -0
- package/cache/functions/get-key.-handle.js +23 -0
- package/cache/index.d.ts +3 -0
- package/cache/index.js +19 -0
- package/cache/interfaces/cache-instance.d.ts +4 -0
- package/cache/interfaces/cache-instance.js +2 -0
- package/cache/interfaces/cache-key-options.d.ts +6 -0
- package/cache/interfaces/cache-key-options.js +2 -0
- package/cache/interfaces/cache-options.d.ts +12 -0
- package/cache/interfaces/cache-options.js +2 -0
- package/cache/interfaces/get-key-value-handle.d.ts +1 -0
- package/cache/interfaces/get-key-value-handle.js +2 -0
- package/cache/interfaces/index.d.ts +4 -0
- package/cache/interfaces/index.js +20 -0
- package/command/constants.d.ts +4 -0
- package/command/constants.js +7 -0
- package/command/decorators/index.d.ts +6 -0
- package/command/decorators/index.js +22 -0
- package/command/decorators/only-modify.decorator.d.ts +1 -0
- package/command/decorators/only-modify.decorator.js +14 -0
- package/command/decorators/post-action.decorator.d.ts +2 -0
- package/command/decorators/post-action.decorator.js +26 -0
- package/command/decorators/post-content.decorator.d.ts +1 -0
- package/command/decorators/post-content.decorator.js +11 -0
- package/command/decorators/read-only.decorator.d.ts +1 -0
- package/command/decorators/read-only.decorator.js +14 -0
- package/command/decorators/remove-action.decorator.d.ts +2 -0
- package/command/decorators/remove-action.decorator.js +27 -0
- package/command/decorators/remove-content.decorator.d.ts +1 -0
- package/command/decorators/remove-content.decorator.js +11 -0
- package/command/functions/execute-post.d.ts +2 -0
- package/command/functions/execute-post.js +50 -0
- package/command/functions/execute-remove.d.ts +4 -0
- package/command/functions/execute-remove.js +50 -0
- package/command/interfaces/command-property.d.ts +7 -0
- package/command/interfaces/command-property.js +2 -0
- package/command/interfaces/index.d.ts +5 -0
- package/command/interfaces/index.js +21 -0
- package/command/interfaces/post-action-options.d.ts +23 -0
- package/command/interfaces/post-action-options.js +2 -0
- package/command/interfaces/post-content.d.ts +8 -0
- package/command/interfaces/post-content.js +2 -0
- package/command/interfaces/remove-aciton-options.d.ts +23 -0
- package/command/interfaces/remove-aciton-options.js +2 -0
- package/command/interfaces/remove-content.d.ts +5 -0
- package/command/interfaces/remove-content.js +2 -0
- package/command/services/post-action-builder.d.ts +19 -0
- package/command/services/post-action-builder.js +219 -0
- package/command/services/remove-action-builder.d.ts +14 -0
- package/command/services/remove-action-builder.js +165 -0
- package/command/utils/deep-merge-keep-undefined.d.ts +1 -0
- package/command/utils/deep-merge-keep-undefined.js +18 -0
- package/common/entities/base-entity.d.ts +7 -0
- package/common/entities/base-entity.js +47 -0
- package/common/index.d.ts +1 -0
- package/common/index.js +17 -0
- package/common/interfaces/enum/index.d.ts +3 -0
- package/common/interfaces/enum/index.js +19 -0
- package/common/interfaces/enum/object-type.d.ts +12 -0
- package/common/interfaces/enum/object-type.js +16 -0
- package/common/interfaces/enum/property-type.d.ts +7 -0
- package/common/interfaces/enum/property-type.js +11 -0
- package/common/interfaces/enum/request-status.d.ts +3 -0
- package/common/interfaces/enum/request-status.js +7 -0
- package/common/interfaces/get-type-callback.d.ts +2 -0
- package/common/interfaces/get-type-callback.js +2 -0
- package/common/interfaces/index.d.ts +2 -0
- package/common/interfaces/index.js +18 -0
- package/common/models/executed-response.d.ts +3 -0
- package/common/models/executed-response.js +22 -0
- package/controllers/constants.d.ts +11 -0
- package/controllers/constants.js +14 -0
- package/controllers/controller.controller.d.ts +19 -0
- package/controllers/controller.controller.js +50 -0
- package/controllers/decorators/actions/action-content.decorator.d.ts +2 -0
- package/controllers/decorators/actions/action-content.decorator.js +20 -0
- package/controllers/decorators/actions/action.decorator.d.ts +2 -0
- package/controllers/decorators/actions/action.decorator.js +28 -0
- package/controllers/decorators/actions/index.d.ts +2 -0
- package/controllers/decorators/actions/index.js +18 -0
- package/controllers/decorators/controller.decorator.d.ts +3 -0
- package/controllers/decorators/controller.decorator.js +32 -0
- package/controllers/decorators/http-methods/custom-response.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/custom-response.decorator.js +14 -0
- package/controllers/decorators/http-methods/delete.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/delete.decorator.js +16 -0
- package/controllers/decorators/http-methods/from-body.decorator.d.ts +3 -0
- package/controllers/decorators/http-methods/from-body.decorator.js +24 -0
- package/controllers/decorators/http-methods/from-headers.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/from-headers.decorator.js +21 -0
- package/controllers/decorators/http-methods/from-params.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/from-params.decorator.js +21 -0
- package/controllers/decorators/http-methods/from-query.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/from-query.decorator.js +21 -0
- package/controllers/decorators/http-methods/get.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/get.decorator.js +16 -0
- package/controllers/decorators/http-methods/http-req.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/http-req.decorator.js +10 -0
- package/controllers/decorators/http-methods/index.d.ts +12 -0
- package/controllers/decorators/http-methods/index.js +28 -0
- package/controllers/decorators/http-methods/patch.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/patch.decorator.js +16 -0
- package/controllers/decorators/http-methods/post.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/post.decorator.js +16 -0
- package/controllers/decorators/http-methods/put.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/put.decorator.js +16 -0
- package/controllers/decorators/http-methods/response-type.decorator.d.ts +6 -0
- package/controllers/decorators/http-methods/response-type.decorator.js +19 -0
- package/controllers/decorators/index.d.ts +5 -0
- package/controllers/decorators/index.js +21 -0
- package/controllers/decorators/no-auth.decorator.d.ts +1 -0
- package/controllers/decorators/no-auth.decorator.js +11 -0
- package/controllers/decorators/request-context.decorator.d.ts +1 -0
- package/controllers/decorators/request-context.decorator.js +11 -0
- package/controllers/decorators/session.decorator.d.ts +1 -0
- package/controllers/decorators/session.decorator.js +10 -0
- package/controllers/index.d.ts +2 -0
- package/controllers/index.js +18 -0
- package/controllers/interfaces/action-options.d.ts +31 -0
- package/controllers/interfaces/action-options.js +2 -0
- package/controllers/interfaces/content-options.d.ts +5 -0
- package/controllers/interfaces/content-options.js +2 -0
- package/controllers/interfaces/controller-object.d.ts +7 -0
- package/controllers/interfaces/controller-object.js +2 -0
- package/controllers/interfaces/controller-options.d.ts +4 -0
- package/controllers/interfaces/controller-options.js +2 -0
- package/controllers/interfaces/controller-property.d.ts +34 -0
- package/controllers/interfaces/controller-property.js +2 -0
- package/controllers/interfaces/enum/index.d.ts +1 -0
- package/controllers/interfaces/enum/index.js +17 -0
- package/controllers/interfaces/enum/request-interceptor.d.ts +3 -0
- package/controllers/interfaces/enum/request-interceptor.js +6 -0
- package/controllers/interfaces/get-only-data.d.ts +3 -0
- package/controllers/interfaces/get-only-data.js +2 -0
- package/controllers/interfaces/index.d.ts +9 -0
- package/controllers/interfaces/index.js +25 -0
- package/controllers/interfaces/on-before-validation-data.d.ts +4 -0
- package/controllers/interfaces/on-before-validation-data.js +2 -0
- package/controllers/interfaces/response-options.d.ts +5 -0
- package/controllers/interfaces/response-options.js +3 -0
- package/controllers/services/default-action-builder.d.ts +14 -0
- package/controllers/services/default-action-builder.js +166 -0
- package/controllers/services/restful-action-builder.d.ts +11 -0
- package/controllers/services/restful-action-builder.js +132 -0
- package/core/core.controller.d.ts +41 -0
- package/core/core.controller.js +208 -0
- package/core/functions/bootstrap.d.ts +3 -0
- package/core/functions/bootstrap.js +13 -0
- package/core/functions/create-action.d.ts +2 -0
- package/core/functions/create-action.js +18 -0
- package/core/functions/create-interceptor.d.ts +12 -0
- package/core/functions/create-interceptor.js +76 -0
- package/core/functions/format-message.d.ts +2 -0
- package/core/functions/format-message.js +7 -0
- package/core/functions/get-action-path.d.ts +1 -0
- package/core/functions/get-action-path.js +7 -0
- package/core/functions/get-env.d.ts +11 -0
- package/core/functions/get-env.js +19 -0
- package/core/functions/get-node-key.d.ts +1 -0
- package/core/functions/get-node-key.js +7 -0
- package/core/functions/get-other-types.d.ts +2 -0
- package/core/functions/get-other-types.js +19 -0
- package/core/index.d.ts +10 -0
- package/core/index.js +26 -0
- package/core/interfaces/action-def.d.ts +16 -0
- package/core/interfaces/action-def.js +2 -0
- package/core/interfaces/action-docs.d.ts +10 -0
- package/core/interfaces/action-docs.js +2 -0
- package/core/interfaces/core-options.d.ts +32 -0
- package/core/interfaces/core-options.js +2 -0
- package/core/interfaces/docs-options.d.ts +3 -0
- package/core/interfaces/docs-options.js +2 -0
- package/core/interfaces/enum/connect-type.d.ts +4 -0
- package/core/interfaces/enum/connect-type.js +8 -0
- package/core/interfaces/enum/index.d.ts +1 -0
- package/core/interfaces/enum/index.js +17 -0
- package/core/interfaces/format-message-options.d.ts +6 -0
- package/core/interfaces/format-message-options.js +2 -0
- package/core/interfaces/forms-options.d.ts +3 -0
- package/core/interfaces/forms-options.js +2 -0
- package/core/interfaces/index.d.ts +23 -0
- package/core/interfaces/index.js +39 -0
- package/core/interfaces/interceptor.d.ts +38 -0
- package/core/interfaces/interceptor.js +7 -0
- package/core/interfaces/locale-options.d.ts +5 -0
- package/core/interfaces/locale-options.js +2 -0
- package/core/interfaces/mapper.d.ts +3 -0
- package/core/interfaces/mapper.js +2 -0
- package/core/interfaces/object-docs.d.ts +5 -0
- package/core/interfaces/object-docs.js +3 -0
- package/core/interfaces/object.d.ts +15 -0
- package/core/interfaces/object.js +2 -0
- package/core/interfaces/pending-action.d.ts +10 -0
- package/core/interfaces/pending-action.js +2 -0
- package/core/interfaces/property-docs.d.ts +5 -0
- package/core/interfaces/property-docs.js +2 -0
- package/core/interfaces/property.d.ts +9 -0
- package/core/interfaces/property.js +2 -0
- package/core/interfaces/request-callback-handle.d.ts +3 -0
- package/core/interfaces/request-callback-handle.js +2 -0
- package/core/interfaces/request-callback.d.ts +4 -0
- package/core/interfaces/request-callback.js +2 -0
- package/core/interfaces/request-callbacks.d.ts +5 -0
- package/core/interfaces/request-callbacks.js +2 -0
- package/core/interfaces/request-context.d.ts +28 -0
- package/core/interfaces/request-context.js +2 -0
- package/core/interfaces/request-data.d.ts +6 -0
- package/core/interfaces/request-data.js +2 -0
- package/core/interfaces/router-options.d.ts +5 -0
- package/core/interfaces/router-options.js +2 -0
- package/core/interfaces/sanitizer.d.ts +4 -0
- package/core/interfaces/sanitizer.js +2 -0
- package/core/interfaces/storage-options.d.ts +6 -0
- package/core/interfaces/storage-options.js +2 -0
- package/core/interfaces/translations-options.d.ts +7 -0
- package/core/interfaces/translations-options.js +2 -0
- package/core/interfaces/transport-options.d.ts +3 -0
- package/core/interfaces/transport-options.js +2 -0
- package/core/services/context-builder.d.ts +15 -0
- package/core/services/context-builder.js +91 -0
- package/core/services/locale-service.d.ts +13 -0
- package/core/services/locale-service.js +71 -0
- package/core/services/node-control.service.d.ts +5 -0
- package/core/services/node-control.service.js +46 -0
- package/core/services/object-loader.d.ts +10 -0
- package/core/services/object-loader.js +27 -0
- package/core/services/request-executor.d.ts +9 -0
- package/core/services/request-executor.js +108 -0
- package/core/services/request-router.d.ts +15 -0
- package/core/services/request-router.js +127 -0
- package/database/contexts/index.d.ts +1 -0
- package/database/contexts/index.js +17 -0
- package/database/contexts/transaction-context.d.ts +6 -0
- package/database/contexts/transaction-context.js +5 -0
- package/database/database.controller.d.ts +20 -0
- package/database/database.controller.js +92 -0
- package/database/decorators/column.decorator.d.ts +72 -0
- package/database/decorators/column.decorator.js +9 -0
- package/database/decorators/entity.decorator.d.ts +2 -0
- package/database/decorators/entity.decorator.js +10 -0
- package/database/decorators/id-generated.decorator.d.ts +30 -0
- package/database/decorators/id-generated.decorator.js +76 -0
- package/database/decorators/id.decorator.d.ts +13 -0
- package/database/decorators/id.decorator.js +27 -0
- package/database/decorators/index.d.ts +13 -0
- package/database/decorators/index.js +29 -0
- package/database/decorators/inject-data-source.decorator.d.ts +1 -0
- package/database/decorators/inject-data-source.decorator.js +13 -0
- package/database/decorators/inject-repository.decorator.d.ts +2 -0
- package/database/decorators/inject-repository.decorator.js +17 -0
- package/database/decorators/protect-context-column.decorator.d.ts +3 -0
- package/database/decorators/protect-context-column.decorator.js +11 -0
- package/database/decorators/protect-entity.decorator.d.ts +4 -0
- package/database/decorators/protect-entity.decorator.js +12 -0
- package/database/decorators/protect-key-column.decorator.d.ts +2 -0
- package/database/decorators/protect-key-column.decorator.js +11 -0
- package/database/decorators/protect-target-column.decorator.d.ts +3 -0
- package/database/decorators/protect-target-column.decorator.js +11 -0
- package/database/decorators/protected-entity.decorator.d.ts +8 -0
- package/database/decorators/protected-entity.decorator.js +25 -0
- package/database/decorators/relation.decorator.d.ts +3 -0
- package/database/decorators/relation.decorator.js +13 -0
- package/database/decorators/virtual-column.decorator.d.ts +4 -0
- package/database/decorators/virtual-column.decorator.js +16 -0
- package/database/environment.d.ts +21 -0
- package/database/environment.js +25 -0
- package/database/exports/index.d.ts +1 -0
- package/database/exports/index.js +17 -0
- package/database/exports/typeorm.d.ts +1 -0
- package/database/exports/typeorm.js +9 -0
- package/database/extensions/select-query-builder.d.ts +11 -0
- package/database/extensions/select-query-builder.js +21 -0
- package/database/functions/column-decorator.d.ts +6 -0
- package/database/functions/column-decorator.js +31 -0
- package/database/functions/create-entity.d.ts +7 -0
- package/database/functions/create-entity.js +51 -0
- package/database/functions/create-new-class.d.ts +1 -0
- package/database/functions/create-new-class.js +16 -0
- package/database/functions/entity-decorator.d.ts +3 -0
- package/database/functions/entity-decorator.js +29 -0
- package/database/functions/execute-if-not-exists-column.d.ts +3 -0
- package/database/functions/execute-if-not-exists-column.js +16 -0
- package/database/functions/execute-if-not-exists-table.d.ts +3 -0
- package/database/functions/execute-if-not-exists-table.js +14 -0
- package/database/functions/find-relation.d.ts +3 -0
- package/database/functions/find-relation.js +43 -0
- package/database/functions/generate-id.d.ts +2 -0
- package/database/functions/generate-id.js +14 -0
- package/database/functions/get-column-type.d.ts +3 -0
- package/database/functions/get-column-type.js +18 -0
- package/database/functions/get-id-property.d.ts +3 -0
- package/database/functions/get-id-property.js +14 -0
- package/database/functions/get-name-by-strategy.d.ts +6 -0
- package/database/functions/get-name-by-strategy.js +9 -0
- package/database/functions/get-primitive-type.d.ts +3 -0
- package/database/functions/get-primitive-type.js +8 -0
- package/database/functions/get-relations.d.ts +2 -0
- package/database/functions/get-relations.js +12 -0
- package/database/functions/has-update.d.ts +2 -0
- package/database/functions/has-update.js +7 -0
- package/database/functions/inject-repository-handle.d.ts +2 -0
- package/database/functions/inject-repository-handle.js +36 -0
- package/database/functions/object-to-jsonb.d.ts +1 -0
- package/database/functions/object-to-jsonb.js +36 -0
- package/database/functions/register-column.d.ts +7 -0
- package/database/functions/register-column.js +16 -0
- package/database/functions/register-entity.d.ts +5 -0
- package/database/functions/register-entity.js +8 -0
- package/database/functions/register-generated-id.d.ts +6 -0
- package/database/functions/register-generated-id.js +8 -0
- package/database/functions/register-id.d.ts +7 -0
- package/database/functions/register-id.js +8 -0
- package/database/functions/register-relation.d.ts +8 -0
- package/database/functions/register-relation.js +12 -0
- package/database/functions/relation-decorator.d.ts +4 -0
- package/database/functions/relation-decorator.js +74 -0
- package/database/functions/use-protector.d.ts +2 -0
- package/database/functions/use-protector.js +10 -0
- package/database/functions/use-repository.d.ts +2 -0
- package/database/functions/use-repository.js +10 -0
- package/database/functions/use-transaction.d.ts +1 -0
- package/database/functions/use-transaction.js +12 -0
- package/database/index.d.ts +16 -0
- package/database/index.js +32 -0
- package/database/interfaces/base-columns-name-override.d.ts +6 -0
- package/database/interfaces/base-columns-name-override.js +2 -0
- package/database/interfaces/column-def.d.ts +26 -0
- package/database/interfaces/column-def.js +2 -0
- package/database/interfaces/connection.options.d.ts +15 -0
- package/database/interfaces/connection.options.js +2 -0
- package/database/interfaces/direact-alias.d.ts +1 -0
- package/database/interfaces/direact-alias.js +2 -0
- package/database/interfaces/entity-object.d.ts +15 -0
- package/database/interfaces/entity-object.js +2 -0
- package/database/interfaces/entity-options.d.ts +15 -0
- package/database/interfaces/entity-options.js +2 -0
- package/database/interfaces/entity-property.d.ts +19 -0
- package/database/interfaces/entity-property.js +2 -0
- package/database/interfaces/enum/column-def-type.d.ts +5 -0
- package/database/interfaces/enum/column-def-type.js +9 -0
- package/database/interfaces/enum/index.d.ts +5 -0
- package/database/interfaces/enum/index.js +21 -0
- package/database/interfaces/enum/naming-strategy-type.d.ts +5 -0
- package/database/interfaces/enum/naming-strategy-type.js +9 -0
- package/database/interfaces/enum/nano-id-alphabet-type.d.ts +14 -0
- package/database/interfaces/enum/nano-id-alphabet-type.js +18 -0
- package/database/interfaces/enum/order-by-direction.d.ts +4 -0
- package/database/interfaces/enum/order-by-direction.js +8 -0
- package/database/interfaces/enum/primary-strategy-type.d.ts +5 -0
- package/database/interfaces/enum/primary-strategy-type.js +9 -0
- package/database/interfaces/enum/relation-path-type.d.ts +4 -0
- package/database/interfaces/enum/relation-path-type.js +8 -0
- package/database/interfaces/execute-callback.d.ts +3 -0
- package/database/interfaces/execute-callback.js +2 -0
- package/database/interfaces/id-column-def.d.ts +6 -0
- package/database/interfaces/id-column-def.js +2 -0
- package/database/interfaces/index.d.ts +17 -0
- package/database/interfaces/index.js +33 -0
- package/database/interfaces/inverse-alias.d.ts +5 -0
- package/database/interfaces/inverse-alias.js +2 -0
- package/database/interfaces/nano-id-column-options.d.ts +12 -0
- package/database/interfaces/nano-id-column-options.js +2 -0
- package/database/interfaces/path.d.ts +43 -0
- package/database/interfaces/path.js +2 -0
- package/database/interfaces/protector.d.ts +51 -0
- package/database/interfaces/protector.js +2 -0
- package/database/interfaces/register-one-to-many-handle.d.ts +3 -0
- package/database/interfaces/register-one-to-many-handle.js +2 -0
- package/database/interfaces/register-one-to-many.d.ts +6 -0
- package/database/interfaces/register-one-to-many.js +2 -0
- package/database/interfaces/relation-def.d.ts +8 -0
- package/database/interfaces/relation-def.js +2 -0
- package/database/interfaces/relation-path.d.ts +10 -0
- package/database/interfaces/relation-path.js +2 -0
- package/database/interfaces/relation.options.d.ts +9 -0
- package/database/interfaces/relation.options.js +2 -0
- package/database/interfaces/repository.d.ts +8 -0
- package/database/interfaces/repository.js +2 -0
- package/database/migrations/1737637321043-UUIDVarcharMigration.d.ts +5 -0
- package/database/migrations/1737637321043-UUIDVarcharMigration.js +81 -0
- package/database/migrations/use-uuid-varchar-migration.d.ts +2 -0
- package/database/migrations/use-uuid-varchar-migration.js +10 -0
- package/database/services/paths-builder.d.ts +12 -0
- package/database/services/paths-builder.js +82 -0
- package/database/services/protect-builder.d.ts +59 -0
- package/database/services/protect-builder.js +523 -0
- package/database/services/repository.service.d.ts +14 -0
- package/database/services/repository.service.js +75 -0
- package/forms/entities/form.d.ts +8 -0
- package/forms/entities/form.js +61 -0
- package/forms/entities/property.d.ts +7 -0
- package/forms/entities/property.js +51 -0
- package/forms/forms.controller.d.ts +8 -0
- package/forms/forms.controller.js +59 -0
- package/forms/interfaces/form-item.d.ts +5 -0
- package/forms/interfaces/form-item.js +2 -0
- package/forms/interfaces/form.d.ts +8 -0
- package/forms/interfaces/form.js +2 -0
- package/forms/interfaces/property.d.ts +6 -0
- package/forms/interfaces/property.js +2 -0
- package/forms/migrations/1725969116484-CreateFormsTables.d.ts +5 -0
- package/forms/migrations/1725969116484-CreateFormsTables.js +38 -0
- package/forms/models/form-load.request.d.ts +3 -0
- package/forms/models/form-load.request.js +21 -0
- package/forms/queries/form.query.d.ts +1 -0
- package/forms/queries/form.query.js +9 -0
- package/forms/queries/property.query.d.ts +1 -0
- package/forms/queries/property.query.js +9 -0
- package/forms/requests/form.request.d.ts +14 -0
- package/forms/requests/form.request.js +83 -0
- package/forms/requests/property.request.d.ts +8 -0
- package/forms/requests/property.request.js +65 -0
- package/forms/services/form.service.d.ts +20 -0
- package/forms/services/form.service.js +64 -0
- package/forms/services/property.service.d.ts +6 -0
- package/forms/services/property.service.js +30 -0
- package/forms/utils/build-form-validator.d.ts +11 -0
- package/forms/utils/build-form-validator.js +30 -0
- package/forms/utils/get-form-items.d.ts +2 -0
- package/forms/utils/get-form-items.js +20 -0
- package/global.d.ts +52 -0
- package/global.js +50 -0
- package/http/http.controller.d.ts +25 -0
- package/http/http.controller.js +137 -0
- package/http/index.d.ts +2 -0
- package/http/index.js +18 -0
- package/http/interfaces/csrf.options.d.ts +11 -0
- package/http/interfaces/csrf.options.js +2 -0
- package/http/interfaces/http-request.d.ts +6 -0
- package/http/interfaces/http-request.js +2 -0
- package/http/interfaces/http-response.d.ts +4 -0
- package/http/interfaces/http-response.js +3 -0
- package/http/interfaces/http-settings.d.ts +13 -0
- package/http/interfaces/http-settings.js +2 -0
- package/http/interfaces/http-use.d.ts +6 -0
- package/http/interfaces/http-use.js +2 -0
- package/http/interfaces/index.d.ts +6 -0
- package/http/interfaces/index.js +22 -0
- package/http/interfaces/route.d.ts +10 -0
- package/http/interfaces/route.js +2 -0
- package/index.d.ts +44 -0
- package/index.js +65 -0
- package/jobs/constants.d.ts +2 -0
- package/jobs/constants.js +4 -0
- package/jobs/decorators/index.d.ts +1 -0
- package/jobs/decorators/index.js +17 -0
- package/jobs/decorators/job.decorator.d.ts +11 -0
- package/jobs/decorators/job.decorator.js +26 -0
- package/jobs/interfaces/index.d.ts +3 -0
- package/jobs/interfaces/index.js +19 -0
- package/jobs/interfaces/job-data.d.ts +13 -0
- package/jobs/interfaces/job-data.js +2 -0
- package/jobs/interfaces/job-executor.d.ts +3 -0
- package/jobs/interfaces/job-executor.js +2 -0
- package/jobs/interfaces/job-object.d.ts +6 -0
- package/jobs/interfaces/job-object.js +2 -0
- package/jobs/interfaces/job.options.d.ts +1 -0
- package/jobs/interfaces/job.options.js +2 -0
- package/jobs/jobs.controller.d.ts +18 -0
- package/jobs/jobs.controller.js +122 -0
- package/module/decorators/index.d.ts +4 -0
- package/module/decorators/index.js +20 -0
- package/module/decorators/module.decorator.d.ts +2 -0
- package/module/decorators/module.decorator.js +16 -0
- package/module/decorators/on-after-app-start.d.ts +1 -0
- package/module/decorators/on-after-app-start.js +11 -0
- package/module/decorators/on-after-database-init.d.ts +1 -0
- package/module/decorators/on-after-database-init.js +11 -0
- package/module/decorators/on-module-init.d.ts +1 -0
- package/module/decorators/on-module-init.js +11 -0
- package/module/index.d.ts +3 -0
- package/module/index.js +19 -0
- package/module/interfaces/index.d.ts +3 -0
- package/module/interfaces/index.js +19 -0
- package/module/interfaces/module-events.d.ts +5 -0
- package/module/interfaces/module-events.js +2 -0
- package/module/interfaces/module-object.d.ts +7 -0
- package/module/interfaces/module-object.js +2 -0
- package/module/interfaces/module-options.d.ts +8 -0
- package/module/interfaces/module-options.js +2 -0
- package/module/module.controller.d.ts +31 -0
- package/module/module.controller.js +159 -0
- package/package.json +70 -0
- package/query/constants.d.ts +2 -0
- package/query/constants.js +5 -0
- package/query/decorators/index.d.ts +1 -0
- package/query/decorators/index.js +17 -0
- package/query/decorators/query-content.decorator.d.ts +1 -0
- package/query/decorators/query-content.decorator.js +11 -0
- package/query/functions/add-join.d.ts +5 -0
- package/query/functions/add-join.js +37 -0
- package/query/functions/create-query-builder.d.ts +4 -0
- package/query/functions/create-query-builder.js +54 -0
- package/query/functions/create-query.d.ts +5 -0
- package/query/functions/create-query.js +96 -0
- package/query/functions/describe-query-filter.d.ts +7 -0
- package/query/functions/describe-query-filter.js +298 -0
- package/query/functions/execute-query.d.ts +11 -0
- package/query/functions/execute-query.js +74 -0
- package/query/functions/get-column-path.d.ts +2 -0
- package/query/functions/get-column-path.js +14 -0
- package/query/functions/get-native-select.d.ts +2 -0
- package/query/functions/get-native-select.js +9 -0
- package/query/functions/load-properties.d.ts +19 -0
- package/query/functions/load-properties.js +138 -0
- package/query/functions/map-query-property-to-column-name.d.ts +3 -0
- package/query/functions/map-query-property-to-column-name.js +17 -0
- package/query/functions/replace-property-key-to-column-name.d.ts +1 -0
- package/query/functions/replace-property-key-to-column-name.js +10 -0
- package/query/interfaces/index.d.ts +3 -0
- package/query/interfaces/index.js +19 -0
- package/query/interfaces/query-action-options.d.ts +14 -0
- package/query/interfaces/query-action-options.js +2 -0
- package/query/interfaces/query-object.d.ts +10 -0
- package/query/interfaces/query-object.js +2 -0
- package/query/interfaces/query.d.ts +54 -0
- package/query/interfaces/query.js +2 -0
- package/query/models/base-query-response.d.ts +12 -0
- package/query/models/base-query-response.js +41 -0
- package/query/services/query-action-builder.d.ts +14 -0
- package/query/services/query-action-builder.js +145 -0
- package/security/auth.controller.d.ts +8 -0
- package/security/auth.controller.js +68 -0
- package/security/constants.d.ts +0 -0
- package/security/constants.js +2 -0
- package/security/env.d.ts +7 -0
- package/security/env.js +8 -0
- package/security/functions/add-protect.d.ts +2 -0
- package/security/functions/add-protect.js +10 -0
- package/security/functions/add-protected.d.ts +3 -0
- package/security/functions/add-protected.js +23 -0
- package/security/functions/create-authorization.d.ts +2 -0
- package/security/functions/create-authorization.js +12 -0
- package/security/functions/find-auth-context.d.ts +3 -0
- package/security/functions/find-auth-context.js +25 -0
- package/security/functions/is-auth-enabled.d.ts +1 -0
- package/security/functions/is-auth-enabled.js +7 -0
- package/security/functions/use-auth.d.ts +1 -0
- package/security/functions/use-auth.js +8 -0
- package/security/index.d.ts +3 -0
- package/security/index.js +19 -0
- package/security/interceptors/index.d.ts +1 -0
- package/security/interceptors/index.js +17 -0
- package/security/interceptors/is-authorized.interceptor.d.ts +2 -0
- package/security/interceptors/is-authorized.interceptor.js +34 -0
- package/security/interfaces/auth-controller.d.ts +7 -0
- package/security/interfaces/auth-controller.js +2 -0
- package/security/interfaces/auth-object.d.ts +6 -0
- package/security/interfaces/auth-object.js +2 -0
- package/security/interfaces/auth-property.d.ts +4 -0
- package/security/interfaces/auth-property.js +2 -0
- package/security/interfaces/authorization-schema.d.ts +26 -0
- package/security/interfaces/authorization-schema.js +2 -0
- package/security/interfaces/index.d.ts +6 -0
- package/security/interfaces/index.js +22 -0
- package/security/interfaces/security-options.d.ts +8 -0
- package/security/interfaces/security-options.js +2 -0
- package/security/interfaces/ssl-certificate.d.ts +4 -0
- package/security/interfaces/ssl-certificate.js +2 -0
- package/security/models/auth-context-data.d.ts +4 -0
- package/security/models/auth-context-data.js +25 -0
- package/security/models/auth-context.d.ts +9 -0
- package/security/models/auth-context.js +48 -0
- package/security/models/auth-key.d.ts +7 -0
- package/security/models/auth-key.js +36 -0
- package/security/models/get-user-permissions-payload.d.ts +4 -0
- package/security/models/get-user-permissions-payload.js +21 -0
- package/security/models/get-user-permissions-response.d.ts +3 -0
- package/security/models/get-user-permissions-response.js +22 -0
- package/security/models/set-user-permissions-payload.d.ts +5 -0
- package/security/models/set-user-permissions-payload.js +26 -0
- package/security/requests/security.request.d.ts +14 -0
- package/security/requests/security.request.js +75 -0
- package/security/services/authorization.service.d.ts +11 -0
- package/security/services/authorization.service.js +60 -0
- package/storage/entities/metadata.entity.d.ts +19 -0
- package/storage/entities/metadata.entity.js +86 -0
- package/storage/entities/storage.entity.d.ts +6 -0
- package/storage/entities/storage.entity.js +32 -0
- package/storage/env.d.ts +9 -0
- package/storage/env.js +9 -0
- package/storage/functions/index.d.ts +1 -0
- package/storage/functions/index.js +17 -0
- package/storage/functions/set-storage-settings.d.ts +2 -0
- package/storage/functions/set-storage-settings.js +13 -0
- package/storage/index.d.ts +2 -0
- package/storage/index.js +18 -0
- package/storage/interfaces/directory-metadata.d.ts +6 -0
- package/storage/interfaces/directory-metadata.js +2 -0
- package/storage/interfaces/enum/gcp-credentials-type.d.ts +3 -0
- package/storage/interfaces/enum/gcp-credentials-type.js +7 -0
- package/storage/interfaces/enum/index.d.ts +3 -0
- package/storage/interfaces/enum/index.js +19 -0
- package/storage/interfaces/enum/metadata-type.d.ts +4 -0
- package/storage/interfaces/enum/metadata-type.js +8 -0
- package/storage/interfaces/enum/storage-type.d.ts +3 -0
- package/storage/interfaces/enum/storage-type.js +7 -0
- package/storage/interfaces/file-metadata.d.ts +12 -0
- package/storage/interfaces/file-metadata.js +2 -0
- package/storage/interfaces/index.d.ts +7 -0
- package/storage/interfaces/index.js +23 -0
- package/storage/interfaces/metadata.d.ts +18 -0
- package/storage/interfaces/metadata.js +2 -0
- package/storage/interfaces/storage-controller.d.ts +13 -0
- package/storage/interfaces/storage-controller.js +2 -0
- package/storage/interfaces/storage-settings.d.ts +16 -0
- package/storage/interfaces/storage-settings.js +2 -0
- package/storage/interfaces/storage.d.ts +7 -0
- package/storage/interfaces/storage.js +2 -0
- package/storage/services/routes.service.d.ts +31 -0
- package/storage/services/routes.service.js +384 -0
- package/storage/services/storage.service.d.ts +10 -0
- package/storage/services/storage.service.js +92 -0
- package/storage/storage.controller.d.ts +10 -0
- package/storage/storage.controller.js +49 -0
- package/tasks/constants.d.ts +12 -0
- package/tasks/constants.js +21 -0
- package/tasks/decorators/index.d.ts +1 -0
- package/tasks/decorators/index.js +17 -0
- package/tasks/decorators/task.decorator.d.ts +2 -0
- package/tasks/decorators/task.decorator.js +45 -0
- package/tasks/functions/create-task-message-find.d.ts +3 -0
- package/tasks/functions/create-task-message-find.js +23 -0
- package/tasks/functions/create-task-message-model.d.ts +3 -0
- package/tasks/functions/create-task-message-model.js +11 -0
- package/tasks/functions/create-task-message-receptor.d.ts +3 -0
- package/tasks/functions/create-task-message-receptor.js +23 -0
- package/tasks/functions/create-task-message-retry.d.ts +3 -0
- package/tasks/functions/create-task-message-retry.js +22 -0
- package/tasks/functions/create-task-message-schema.d.ts +182 -0
- package/tasks/functions/create-task-message-schema.js +20 -0
- package/tasks/functions/create-task-message-trigger.d.ts +2 -0
- package/tasks/functions/create-task-message-trigger.js +18 -0
- package/tasks/functions/create-task-naming.d.ts +2 -0
- package/tasks/functions/create-task-naming.js +31 -0
- package/tasks/functions/generate-entity-id.d.ts +1 -0
- package/tasks/functions/generate-entity-id.js +5 -0
- package/tasks/functions/get-check-table-exists-script.d.ts +1 -0
- package/tasks/functions/get-check-table-exists-script.js +12 -0
- package/tasks/functions/get-create-table-partition-script.d.ts +2 -0
- package/tasks/functions/get-create-table-partition-script.js +10 -0
- package/tasks/functions/get-create-table-script.d.ts +1 -0
- package/tasks/functions/get-create-table-script.js +22 -0
- package/tasks/functions/get-database-connection-name.d.ts +1 -0
- package/tasks/functions/get-database-connection-name.js +8 -0
- package/tasks/functions/get-database-uri.d.ts +1 -0
- package/tasks/functions/get-database-uri.js +8 -0
- package/tasks/functions/get-partitions-of-table-script.d.ts +1 -0
- package/tasks/functions/get-partitions-of-table-script.js +10 -0
- package/tasks/functions/get-pending-task-script.d.ts +2 -0
- package/tasks/functions/get-pending-task-script.js +19 -0
- package/tasks/functions/parse-task-message-search.d.ts +20 -0
- package/tasks/functions/parse-task-message-search.js +62 -0
- package/tasks/functions/throw-task-error.d.ts +1 -0
- package/tasks/functions/throw-task-error.js +7 -0
- package/tasks/index.d.ts +3 -0
- package/tasks/index.js +19 -0
- package/tasks/interfaces/index.d.ts +6 -0
- package/tasks/interfaces/index.js +22 -0
- package/tasks/interfaces/task-naming.d.ts +11 -0
- package/tasks/interfaces/task-naming.js +2 -0
- package/tasks/interfaces/task-object.d.ts +17 -0
- package/tasks/interfaces/task-object.js +2 -0
- package/tasks/interfaces/task-post-intercept.d.ts +8 -0
- package/tasks/interfaces/task-post-intercept.js +2 -0
- package/tasks/interfaces/task-runner.d.ts +6 -0
- package/tasks/interfaces/task-runner.js +2 -0
- package/tasks/interfaces/task-search-intercept.d.ts +4 -0
- package/tasks/interfaces/task-search-intercept.js +2 -0
- package/tasks/interfaces/task-settings.d.ts +15 -0
- package/tasks/interfaces/task-settings.js +2 -0
- package/tasks/models/task-error.d.ts +8 -0
- package/tasks/models/task-error.js +40 -0
- package/tasks/models/task-message-find.d.ts +3 -0
- package/tasks/models/task-message-find.js +21 -0
- package/tasks/models/task-message.d.ts +13 -0
- package/tasks/models/task-message.js +57 -0
- package/tasks/requests/task.request.d.ts +17 -0
- package/tasks/requests/task.request.js +71 -0
- package/tasks/services/task-manager.service.d.ts +10 -0
- package/tasks/services/task-manager.service.js +60 -0
- package/tasks/services/task-runner.service.d.ts +16 -0
- package/tasks/services/task-runner.service.js +88 -0
- package/tasks/tasks.controller.d.ts +19 -0
- package/tasks/tasks.controller.js +75 -0
- package/translations/entities/translation-config.entity.d.ts +9 -0
- package/translations/entities/translation-config.entity.js +65 -0
- package/translations/entities/translation-values.entity.d.ts +10 -0
- package/translations/entities/translation-values.entity.js +53 -0
- package/translations/env.d.ts +2 -0
- package/translations/env.js +7 -0
- package/translations/functions/check-can-use.d.ts +1 -0
- package/translations/functions/check-can-use.js +10 -0
- package/translations/functions/create-translation-config.d.ts +3 -0
- package/translations/functions/create-translation-config.js +19 -0
- package/translations/functions/create-translation-values.d.ts +3 -0
- package/translations/functions/create-translation-values.js +22 -0
- package/translations/functions/get-translation-config.d.ts +3 -0
- package/translations/functions/get-translation-config.js +14 -0
- package/translations/interfaces/translation-config.d.ts +8 -0
- package/translations/interfaces/translation-config.js +2 -0
- package/translations/interfaces/translation-values.d.ts +9 -0
- package/translations/interfaces/translation-values.js +2 -0
- package/translations/interfaces/translator-handle.d.ts +4 -0
- package/translations/interfaces/translator-handle.js +2 -0
- package/translations/migrations/1723760669185-CreateTranslationTables.d.ts +5 -0
- package/translations/migrations/1723760669185-CreateTranslationTables.js +43 -0
- package/translations/models/get-values.request.d.ts +5 -0
- package/translations/models/get-values.request.js +25 -0
- package/translations/models/get-values.response.d.ts +4 -0
- package/translations/models/get-values.response.js +20 -0
- package/translations/queries/translation-config.query.d.ts +1 -0
- package/translations/queries/translation-config.query.js +9 -0
- package/translations/queries/translation-values.query.d.ts +1 -0
- package/translations/queries/translation-values.query.js +16 -0
- package/translations/requests/translation.request.d.ts +16 -0
- package/translations/requests/translation.request.js +99 -0
- package/translations/services/translations.service.d.ts +11 -0
- package/translations/services/translations.service.js +56 -0
- package/translations/services/translator.service.d.ts +11 -0
- package/translations/services/translator.service.js +56 -0
- package/translations/translations.controller.d.ts +8 -0
- package/translations/translations.controller.js +57 -0
- package/transport/entities/transport-client.d.ts +12 -0
- package/transport/entities/transport-client.js +67 -0
- package/transport/entities/transport-gateway-status.d.ts +9 -0
- package/transport/entities/transport-gateway-status.js +51 -0
- package/transport/entities/transport-gateway.d.ts +6 -0
- package/transport/entities/transport-gateway.js +35 -0
- package/transport/environment.d.ts +4 -0
- package/transport/environment.js +6 -0
- package/transport/index.d.ts +2 -0
- package/transport/index.js +18 -0
- package/transport/interfaces/index.d.ts +1 -0
- package/transport/interfaces/index.js +17 -0
- package/transport/interfaces/transport-module-options.d.ts +14 -0
- package/transport/interfaces/transport-module-options.js +8 -0
- package/transport/transport.module.d.ts +5 -0
- package/transport/transport.module.js +38 -0
- package/web-socket/constants.d.ts +1 -0
- package/web-socket/constants.js +4 -0
- package/web-socket/functions/encode-message.d.ts +2 -0
- package/web-socket/functions/encode-message.js +14 -0
- package/web-socket/functions/get-fake-http-context.d.ts +26 -0
- package/web-socket/functions/get-fake-http-context.js +55 -0
- package/web-socket/functions/get-ip-address.d.ts +1 -0
- package/web-socket/functions/get-ip-address.js +23 -0
- package/web-socket/functions/parse-message.d.ts +1 -0
- package/web-socket/functions/parse-message.js +10 -0
- package/web-socket/index.d.ts +5 -0
- package/web-socket/index.js +21 -0
- package/web-socket/interfaces/client.d.ts +15 -0
- package/web-socket/interfaces/client.js +2 -0
- package/web-socket/interfaces/enum/client-type.d.ts +4 -0
- package/web-socket/interfaces/enum/client-type.js +8 -0
- package/web-socket/interfaces/enum/index.d.ts +3 -0
- package/web-socket/interfaces/enum/index.js +19 -0
- package/web-socket/interfaces/enum/message-type.d.ts +6 -0
- package/web-socket/interfaces/enum/message-type.js +10 -0
- package/web-socket/interfaces/enum/ws-connection-type.d.ts +4 -0
- package/web-socket/interfaces/enum/ws-connection-type.js +8 -0
- package/web-socket/interfaces/index.d.ts +4 -0
- package/web-socket/interfaces/index.js +20 -0
- package/web-socket/interfaces/message.d.ts +30 -0
- package/web-socket/interfaces/message.js +2 -0
- package/web-socket/interfaces/ws-connection.d.ts +4 -0
- package/web-socket/interfaces/ws-connection.js +2 -0
- package/web-socket/web-socket.controller.d.ts +25 -0
- package/web-socket/web-socket.controller.js +184 -0
- package/workers/functions/decode-message.d.ts +2 -0
- package/workers/functions/decode-message.js +7 -0
- package/workers/functions/dispatch-task.d.ts +2 -0
- package/workers/functions/dispatch-task.js +23 -0
- package/workers/functions/encode-message.d.ts +2 -0
- package/workers/functions/encode-message.js +7 -0
- package/workers/interfaces/enum/index.d.ts +1 -0
- package/workers/interfaces/enum/index.js +17 -0
- package/workers/interfaces/enum/worker-message-type.d.ts +6 -0
- package/workers/interfaces/enum/worker-message-type.js +10 -0
- package/workers/interfaces/index.d.ts +3 -0
- package/workers/interfaces/index.js +19 -0
- package/workers/interfaces/worker-data.d.ts +9 -0
- package/workers/interfaces/worker-data.js +2 -0
- package/workers/interfaces/worker-message.d.ts +20 -0
- package/workers/interfaces/worker-message.js +2 -0
- package/workers/workers.controller.d.ts +6 -0
- package/workers/workers.controller.js +72 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UUIDVarcharMigration1737637321043 = void 0;
|
|
7
|
+
const environment_1 = require("../environment");
|
|
8
|
+
const fs_1 = require("fs");
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
class UUIDVarcharMigration1737637321043 {
|
|
11
|
+
async up(queryRunner) {
|
|
12
|
+
const drops = [];
|
|
13
|
+
const changeIds = [];
|
|
14
|
+
const recreates = [];
|
|
15
|
+
const database = environment_1.environment
|
|
16
|
+
.uuidVarcharMigration
|
|
17
|
+
.database;
|
|
18
|
+
const tablesQuery = `
|
|
19
|
+
SELECT
|
|
20
|
+
table_catalog,
|
|
21
|
+
table_schema,
|
|
22
|
+
table_name
|
|
23
|
+
FROM information_schema.tables
|
|
24
|
+
WHERE table_catalog = '${database}'
|
|
25
|
+
AND table_schema = 'public'
|
|
26
|
+
AND table_name <> 'migrations';
|
|
27
|
+
`;
|
|
28
|
+
const columnsQuery = (table) => `
|
|
29
|
+
SELECT
|
|
30
|
+
table_name,
|
|
31
|
+
table_catalog,
|
|
32
|
+
table_schema,
|
|
33
|
+
column_name,
|
|
34
|
+
udt_name
|
|
35
|
+
FROM information_schema.columns
|
|
36
|
+
WHERE table_catalog = '${database}'
|
|
37
|
+
AND table_schema = 'public'
|
|
38
|
+
AND table_name = '${table}'
|
|
39
|
+
AND udt_name = 'uuid';
|
|
40
|
+
`;
|
|
41
|
+
const foreignKeysQuery = (table) => `
|
|
42
|
+
SELECT conrelid::regclass AS table_name,
|
|
43
|
+
conname AS foreign_key,
|
|
44
|
+
pg_get_constraintdef(oid) as foreign_key_def
|
|
45
|
+
FROM pg_constraint
|
|
46
|
+
WHERE contype = 'f'
|
|
47
|
+
AND connamespace = 'public'::regnamespace
|
|
48
|
+
ORDER BY conrelid::regclass::text, contype DESC;
|
|
49
|
+
`;
|
|
50
|
+
const tables = await queryRunner
|
|
51
|
+
.query(tablesQuery);
|
|
52
|
+
for (const table of tables) {
|
|
53
|
+
const columns = await queryRunner.query(columnsQuery(table.table_name));
|
|
54
|
+
const foreignKeys = await queryRunner.query(foreignKeysQuery(table.table_name));
|
|
55
|
+
for (const foreignKey of foreignKeys) {
|
|
56
|
+
drops.pushIfNotExists(`alter table public.${foreignKey.table_name} drop constraint "${foreignKey.foreign_key}";`);
|
|
57
|
+
recreates.pushIfNotExists(`alter table public.${foreignKey.table_name} add constraint "${foreignKey.foreign_key}" ${foreignKey.foreign_key_def};`);
|
|
58
|
+
}
|
|
59
|
+
for (const column of columns) {
|
|
60
|
+
changeIds.push(`alter table public."${table.table_name}" alter column "${column.column_name}" type varchar using "${column.column_name}"::varchar;`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
let commands = ``;
|
|
64
|
+
drops.forEach((drop) => commands += `${drop}\n`);
|
|
65
|
+
changeIds.forEach((changeId) => commands += `${changeId}\n`);
|
|
66
|
+
recreates.forEach((recreate) => commands += `${recreate}\n`);
|
|
67
|
+
(0, fs_1.writeFileSync)(path_1.default.join(process.cwd(), 'uuid_varchar_migration.sql'), commands);
|
|
68
|
+
for (const drop of drops) {
|
|
69
|
+
await queryRunner.query(drop);
|
|
70
|
+
}
|
|
71
|
+
for (const changeId of changeIds) {
|
|
72
|
+
await queryRunner.query(changeId);
|
|
73
|
+
}
|
|
74
|
+
for (const recreate of recreates) {
|
|
75
|
+
await queryRunner.query(recreate);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async down(queryRunner) {
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.UUIDVarcharMigration1737637321043 = UUIDVarcharMigration1737637321043;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useUUIDVarcharMigration = void 0;
|
|
4
|
+
const environment_1 = require("../environment");
|
|
5
|
+
const _1737637321043_UUIDVarcharMigration_1 = require("./1737637321043-UUIDVarcharMigration");
|
|
6
|
+
const useUUIDVarcharMigration = (database) => {
|
|
7
|
+
environment_1.environment.uuidVarcharMigration.database = database;
|
|
8
|
+
return _1737637321043_UUIDVarcharMigration_1.UUIDVarcharMigration1737637321043;
|
|
9
|
+
};
|
|
10
|
+
exports.useUUIDVarcharMigration = useUUIDVarcharMigration;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ObjectNote, PropertyNote } from "@rockster/class-memory";
|
|
2
|
+
import { IEntityObject, IEntityProperty, RelationPath, RelationPathType } from "../interfaces";
|
|
3
|
+
export declare class PathsBuilder {
|
|
4
|
+
static relationsPaths: RelationPath[];
|
|
5
|
+
protected get relations(): RelationPath[];
|
|
6
|
+
build(object: ObjectNote<IEntityObject>): Promise<void>;
|
|
7
|
+
protected buildRelations(parentPath: RelationPath, object: ObjectNote<IEntityObject>): void;
|
|
8
|
+
protected createRelations(type: RelationPathType, parentPath: RelationPath, object: ObjectNote<IEntityObject>, properties: PropertyNote<IEntityProperty>[]): void;
|
|
9
|
+
protected getDirectRelations(object: ObjectNote<IEntityObject>): PropertyNote<IEntityProperty>[];
|
|
10
|
+
protected getIndirectRelations(object: ObjectNote<IEntityObject>): PropertyNote<IEntityProperty>[];
|
|
11
|
+
protected getIsRecursive(relationPath: RelationPath, object: ObjectNote<IEntityObject>): any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var PathsBuilder_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.PathsBuilder = void 0;
|
|
11
|
+
const class_injector_1 = require("@rockster/class-injector");
|
|
12
|
+
const interfaces_1 = require("../interfaces");
|
|
13
|
+
let PathsBuilder = PathsBuilder_1 = class PathsBuilder {
|
|
14
|
+
get relations() {
|
|
15
|
+
return PathsBuilder_1.relationsPaths;
|
|
16
|
+
}
|
|
17
|
+
async build(object) {
|
|
18
|
+
this.buildRelations(null, object);
|
|
19
|
+
}
|
|
20
|
+
buildRelations(parentPath, object) {
|
|
21
|
+
const direct = this.getDirectRelations(object);
|
|
22
|
+
const indirect = this.getIndirectRelations(object);
|
|
23
|
+
this.createRelations(interfaces_1.RelationPathType.direct, parentPath, object, direct);
|
|
24
|
+
this.createRelations(interfaces_1.RelationPathType.indirect, parentPath, object, indirect);
|
|
25
|
+
}
|
|
26
|
+
createRelations(type, parentPath, object, properties) {
|
|
27
|
+
for (const property of properties) {
|
|
28
|
+
const relationObject = core
|
|
29
|
+
.storage
|
|
30
|
+
.findObject(property.getRelationType());
|
|
31
|
+
const relation = {
|
|
32
|
+
type: type,
|
|
33
|
+
parent: parentPath,
|
|
34
|
+
object: object,
|
|
35
|
+
property: property,
|
|
36
|
+
recursive: false
|
|
37
|
+
};
|
|
38
|
+
this.relations.push(relation);
|
|
39
|
+
const isRecursive = this
|
|
40
|
+
.getIsRecursive(relation, relationObject);
|
|
41
|
+
if (!isRecursive) {
|
|
42
|
+
this.buildRelations(relation, relationObject);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
relation.recursive = true;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
getDirectRelations(object) {
|
|
50
|
+
return core
|
|
51
|
+
.storage
|
|
52
|
+
.getProperties(object.objectClass)
|
|
53
|
+
.filter((property) => {
|
|
54
|
+
return property.getRelationType;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
getIndirectRelations(object) {
|
|
58
|
+
return core
|
|
59
|
+
.storage
|
|
60
|
+
.getProperties()
|
|
61
|
+
.filter((property) => {
|
|
62
|
+
return property.getRelationType
|
|
63
|
+
&& property.getRelationType() === object.objectClass;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
getIsRecursive(relationPath, object) {
|
|
67
|
+
if (!object) {
|
|
68
|
+
throw new Error(`Entity metadata not found for: ${relationPath.object.alias}.${relationPath.property.propertyKey}`);
|
|
69
|
+
}
|
|
70
|
+
if (relationPath.object.objectClass === object.objectClass) {
|
|
71
|
+
return relationPath;
|
|
72
|
+
}
|
|
73
|
+
if (relationPath.parent) {
|
|
74
|
+
return this.getIsRecursive(relationPath.parent, object);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
exports.PathsBuilder = PathsBuilder;
|
|
79
|
+
PathsBuilder.relationsPaths = [];
|
|
80
|
+
exports.PathsBuilder = PathsBuilder = PathsBuilder_1 = __decorate([
|
|
81
|
+
(0, class_injector_1.Injectable)()
|
|
82
|
+
], PathsBuilder);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ObjectNote, PropertyNote } from "@rockster/class-memory";
|
|
2
|
+
import { IEntityObject, IEntityProperty } from "../interfaces";
|
|
3
|
+
import { Dictionary, Instantiable } from "@rockster/common";
|
|
4
|
+
import { IProtectedEntityOptions } from "..";
|
|
5
|
+
import { EntityManager } from "typeorm";
|
|
6
|
+
import { GetUserPermissionsHandle, SetUserPermissionsHandle } from "../interfaces/protector";
|
|
7
|
+
type ProtectedData = {
|
|
8
|
+
object: ObjectNote<IEntityObject>;
|
|
9
|
+
context?: PropertyNote<IEntityProperty>;
|
|
10
|
+
options?: IProtectedEntityOptions;
|
|
11
|
+
isContext: boolean;
|
|
12
|
+
};
|
|
13
|
+
type ProtectorData = {
|
|
14
|
+
object: ObjectNote<IEntityObject>;
|
|
15
|
+
target: PropertyNote<IEntityProperty>;
|
|
16
|
+
context?: PropertyNote<IEntityProperty>;
|
|
17
|
+
key?: PropertyNote<IEntityProperty>;
|
|
18
|
+
};
|
|
19
|
+
export declare class ProtectBuilder {
|
|
20
|
+
build(object: ObjectNote<IEntityObject>): Promise<void>;
|
|
21
|
+
protected buildProtectorConfig(object: ObjectNote<IEntityObject>): void;
|
|
22
|
+
protected getRepository(target: Instantiable, entityManager?: EntityManager): import("typeorm").Repository<any>;
|
|
23
|
+
protected createQueryBuilder({ authKeys, data, protectorData, userId, displayContext, entityManager, protectedData }: {
|
|
24
|
+
protectorData: ProtectorData;
|
|
25
|
+
userId: string;
|
|
26
|
+
data: any;
|
|
27
|
+
authKeys: string[];
|
|
28
|
+
displayContext?: string;
|
|
29
|
+
entityManager?: EntityManager;
|
|
30
|
+
protectedData?: ProtectedData;
|
|
31
|
+
}): import("typeorm").SelectQueryBuilder<any>;
|
|
32
|
+
protected buildFilterKeys(protectorAlias: string, protectorKey: string, keys: string[]): string;
|
|
33
|
+
protected getQueryContextAndKeyCondition(protectorData: ProtectorData, protectedData: ProtectedData, protectorAlias: string, alias: string, contextParams: Dictionary<any>, rootPath?: Instantiable): {
|
|
34
|
+
context: string;
|
|
35
|
+
key: string;
|
|
36
|
+
};
|
|
37
|
+
protected buildProtectedConfig(object: ObjectNote<IEntityObject>): void;
|
|
38
|
+
protected getSetUserPermissions(data: ProtectorData): SetUserPermissionsHandle;
|
|
39
|
+
protected getGetUserPermissions(data: ProtectorData): GetUserPermissionsHandle;
|
|
40
|
+
protected getAuthContextFilter(targetUserId: string, data: ProtectorData, contextId: string): {
|
|
41
|
+
where: {
|
|
42
|
+
[x: string]: string;
|
|
43
|
+
};
|
|
44
|
+
keyProperty: PropertyNote<IEntityProperty>;
|
|
45
|
+
contextProperty: PropertyNote<IEntityProperty>;
|
|
46
|
+
targetProperty: PropertyNote<IEntityProperty>;
|
|
47
|
+
};
|
|
48
|
+
protected checkIsAuthorized({ data, userId, entityManager, keys, context, contextId }: {
|
|
49
|
+
data: ProtectorData;
|
|
50
|
+
entityManager?: EntityManager;
|
|
51
|
+
keys: string[];
|
|
52
|
+
context: string;
|
|
53
|
+
contextId: string;
|
|
54
|
+
userId: string;
|
|
55
|
+
}): Promise<void>;
|
|
56
|
+
protected getProtectedData(protector: ProtectorData, object: ObjectNote<IEntityObject>): ProtectedData;
|
|
57
|
+
protected getProtectorData(protector: Instantiable): ProtectorData;
|
|
58
|
+
}
|
|
59
|
+
export {};
|