@rockster/core 0.0.2 → 0.1.0
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/access/access.module.d.ts +11 -0
- package/access/access.module.js +56 -0
- package/access/access.module.js.map +1 -0
- package/access/constants.d.ts +2 -0
- package/access/constants.js +6 -0
- package/access/constants.js.map +1 -0
- package/access/controllers/controllers.d.ts +7 -0
- package/access/controllers/controllers.js +18 -0
- package/access/controllers/controllers.js.map +1 -0
- package/access/controllers/scope-access-profile.controller.d.ts +17 -0
- package/access/controllers/scope-access-profile.controller.js +111 -0
- package/access/controllers/scope-access-profile.controller.js.map +1 -0
- package/access/controllers/scope-group-user.controller.d.ts +20 -0
- package/access/controllers/scope-group-user.controller.js +132 -0
- package/access/controllers/scope-group-user.controller.js.map +1 -0
- package/access/controllers/scope-group.controller.d.ts +22 -0
- package/access/controllers/scope-group.controller.js +177 -0
- package/access/controllers/scope-group.controller.js.map +1 -0
- package/access/controllers/scope-key.controller.d.ts +7 -0
- package/access/controllers/scope-key.controller.js +45 -0
- package/access/controllers/scope-key.controller.js.map +1 -0
- package/access/controllers/scope-owner.controller.d.ts +9 -0
- package/access/controllers/scope-owner.controller.js +80 -0
- package/access/controllers/scope-owner.controller.js.map +1 -0
- package/access/controllers/scope-user.controller.d.ts +14 -0
- package/access/controllers/scope-user.controller.js +109 -0
- package/access/controllers/scope-user.controller.js.map +1 -0
- package/access/decorators/context-params.decorator.d.ts +2 -0
- package/access/decorators/context-params.decorator.js +13 -0
- package/access/decorators/context-params.decorator.js.map +1 -0
- package/access/decorators/index.d.ts +2 -0
- package/access/decorators/index.js +19 -0
- package/access/decorators/index.js.map +1 -0
- package/access/decorators/scope-context-id-resolver.decorator.d.ts +10 -0
- package/access/decorators/scope-context-id-resolver.decorator.js +22 -0
- package/access/decorators/scope-context-id-resolver.decorator.js.map +1 -0
- package/access/entities/entities.d.ts +8 -0
- package/access/entities/entities.js +22 -0
- package/access/entities/entities.js.map +1 -0
- package/access/entities/index.d.ts +7 -0
- package/access/entities/index.js +24 -0
- package/access/entities/index.js.map +1 -0
- package/access/entities/scope-access-profile-key.d.ts +6 -0
- package/access/entities/scope-access-profile-key.js +40 -0
- package/access/entities/scope-access-profile-key.js.map +1 -0
- package/access/entities/scope-access-profile.d.ts +6 -0
- package/access/entities/scope-access-profile.js +37 -0
- package/access/entities/scope-access-profile.js.map +1 -0
- package/access/entities/scope-access.d.ts +9 -0
- package/access/entities/scope-access.js +58 -0
- package/access/entities/scope-access.js.map +1 -0
- package/access/entities/scope-group-user.d.ts +7 -0
- package/access/entities/scope-group-user.js +47 -0
- package/access/entities/scope-group-user.js.map +1 -0
- package/access/entities/scope-group.d.ts +12 -0
- package/access/entities/scope-group.js +72 -0
- package/access/entities/scope-group.js.map +1 -0
- package/access/entities/scope-key.d.ts +5 -0
- package/access/entities/scope-key.js +35 -0
- package/access/entities/scope-key.js.map +1 -0
- package/access/entities/scope-owner.d.ts +7 -0
- package/access/entities/scope-owner.js +45 -0
- package/access/entities/scope-owner.js.map +1 -0
- package/access/env.d.ts +10 -0
- package/access/env.js +10 -0
- package/access/env.js.map +1 -0
- package/access/functions/assert-context-admin-access.d.ts +15 -0
- package/access/functions/assert-context-admin-access.js +62 -0
- package/access/functions/assert-context-admin-access.js.map +1 -0
- package/access/functions/assert-master-or-owner.d.ts +9 -0
- package/access/functions/assert-master-or-owner.js +40 -0
- package/access/functions/assert-master-or-owner.js.map +1 -0
- package/access/functions/assert-scope-action-access.d.ts +32 -0
- package/access/functions/assert-scope-action-access.js +189 -0
- package/access/functions/assert-scope-action-access.js.map +1 -0
- package/access/functions/build-scope-resolver-initial-data.d.ts +4 -0
- package/access/functions/build-scope-resolver-initial-data.js +17 -0
- package/access/functions/build-scope-resolver-initial-data.js.map +1 -0
- package/access/functions/describe-action-scope.d.ts +9 -0
- package/access/functions/describe-action-scope.js +27 -0
- package/access/functions/describe-action-scope.js.map +1 -0
- package/access/functions/get-context-id-service.d.ts +1 -0
- package/access/functions/get-context-id-service.js +8 -0
- package/access/functions/get-context-id-service.js.map +1 -0
- package/access/functions/get-is-owner.d.ts +1 -0
- package/access/functions/get-is-owner.js +8 -0
- package/access/functions/get-is-owner.js.map +1 -0
- package/access/functions/get-user-keys.d.ts +2 -0
- package/access/functions/get-user-keys.js +10 -0
- package/access/functions/get-user-keys.js.map +1 -0
- package/access/functions/index.d.ts +8 -0
- package/access/functions/index.js +25 -0
- package/access/functions/index.js.map +1 -0
- package/access/functions/init-scope-service-executors.d.ts +3 -0
- package/access/functions/init-scope-service-executors.js +38 -0
- package/access/functions/init-scope-service-executors.js.map +1 -0
- package/access/functions/normalize-scope-keys.d.ts +4 -0
- package/access/functions/normalize-scope-keys.js +17 -0
- package/access/functions/normalize-scope-keys.js.map +1 -0
- package/access/functions/register-scope.d.ts +19 -0
- package/access/functions/register-scope.js +94 -0
- package/access/functions/register-scope.js.map +1 -0
- package/access/functions/resolve-scope-context-id.d.ts +9 -0
- package/access/functions/resolve-scope-context-id.js +71 -0
- package/access/functions/resolve-scope-context-id.js.map +1 -0
- package/access/functions/warn-if-public.d.ts +12 -0
- package/access/functions/warn-if-public.js +20 -0
- package/access/functions/warn-if-public.js.map +1 -0
- package/access/index.d.ts +7 -0
- package/access/index.js +24 -0
- package/access/index.js.map +1 -0
- package/access/interfaces/index.d.ts +3 -0
- package/access/interfaces/index.js +20 -0
- package/access/interfaces/index.js.map +1 -0
- package/access/interfaces/resolve-scope-context-id.d.ts +21 -0
- package/access/interfaces/resolve-scope-context-id.js +3 -0
- package/access/interfaces/resolve-scope-context-id.js.map +1 -0
- package/access/interfaces/scope-service-registry.d.ts +21 -0
- package/access/interfaces/scope-service-registry.js +3 -0
- package/access/interfaces/scope-service-registry.js.map +1 -0
- package/access/interfaces/scope-service.d.ts +11 -0
- package/{database/interfaces/protector.js → access/interfaces/scope-service.js} +1 -1
- package/access/interfaces/scope-service.js.map +1 -0
- package/access/models/scope-access-profile-keys-update.d.ts +5 -0
- package/access/models/scope-access-profile-keys-update.js +27 -0
- package/access/models/scope-access-profile-keys-update.js.map +1 -0
- package/access/models/scope-context.d.ts +4 -0
- package/access/models/scope-context.js +27 -0
- package/access/models/scope-context.js.map +1 -0
- package/access/models/scope-group-apply-access-profile.d.ts +6 -0
- package/access/models/scope-group-apply-access-profile.js +32 -0
- package/access/models/scope-group-apply-access-profile.js.map +1 -0
- package/access/models/scope-keys-update.d.ts +7 -0
- package/access/models/scope-keys-update.js +38 -0
- package/access/models/scope-keys-update.js.map +1 -0
- package/access/models/scope-owner.d.ts +5 -0
- package/access/models/scope-owner.js +32 -0
- package/access/models/scope-owner.js.map +1 -0
- package/access/models/scope-user-mapped.d.ts +9 -0
- package/access/models/scope-user-mapped.js +48 -0
- package/access/models/scope-user-mapped.js.map +1 -0
- package/access/models/scope-user.d.ts +9 -0
- package/access/models/scope-user.js +51 -0
- package/access/models/scope-user.js.map +1 -0
- package/access/queries/scope-access-profile.query.d.ts +1 -0
- package/access/queries/scope-access-profile.query.js +10 -0
- package/access/queries/scope-access-profile.query.js.map +1 -0
- package/access/queries/scope-group-user.query.d.ts +1 -0
- package/access/queries/scope-group-user.query.js +26 -0
- package/access/queries/scope-group-user.query.js.map +1 -0
- package/access/queries/scope-group.query.d.ts +1 -0
- package/access/queries/scope-group.query.js +19 -0
- package/access/queries/scope-group.query.js.map +1 -0
- package/access/services/index.d.ts +7 -0
- package/access/services/index.js +24 -0
- package/access/services/index.js.map +1 -0
- package/access/services/scope-access-profile.service.d.ts +13 -0
- package/access/services/scope-access-profile.service.js +75 -0
- package/access/services/scope-access-profile.service.js.map +1 -0
- package/access/services/scope-access.service.d.ts +11 -0
- package/access/services/scope-access.service.js +89 -0
- package/access/services/scope-access.service.js.map +1 -0
- package/access/services/scope-group-user.service.d.ts +8 -0
- package/access/services/scope-group-user.service.js +49 -0
- package/access/services/scope-group-user.service.js.map +1 -0
- package/access/services/scope-group.service.d.ts +17 -0
- package/access/services/scope-group.service.js +75 -0
- package/access/services/scope-group.service.js.map +1 -0
- package/access/services/scope-key.service.d.ts +9 -0
- package/access/services/scope-key.service.js +52 -0
- package/access/services/scope-key.service.js.map +1 -0
- package/access/services/scope-owner.service.d.ts +10 -0
- package/access/services/scope-owner.service.js +60 -0
- package/access/services/scope-owner.service.js.map +1 -0
- package/access/services/scope-service.d.ts +10 -0
- package/access/services/scope-service.js +52 -0
- package/access/services/scope-service.js.map +1 -0
- package/command/functions/execute-post.js +5 -7
- package/command/functions/execute-post.js.map +1 -1
- package/command/services/post-action-builder.js +21 -17
- package/command/services/post-action-builder.js.map +1 -1
- package/command/services/remove-action-builder.js +32 -22
- package/command/services/remove-action-builder.js.map +1 -1
- package/common/entities/base-entity.js +2 -0
- package/common/entities/base-entity.js.map +1 -1
- package/common/interfaces/enum/object-type.d.ts +2 -1
- package/common/interfaces/enum/object-type.js +1 -0
- package/common/interfaces/enum/object-type.js.map +1 -1
- package/controllers/constants/controller-transaction.d.ts +2 -0
- package/controllers/constants/controller-transaction.js +6 -0
- package/controllers/constants/controller-transaction.js.map +1 -0
- package/controllers/controller.controller.d.ts +1 -1
- package/controllers/controller.controller.js +4 -4
- package/controllers/controller.controller.js.map +1 -1
- package/controllers/decorators/controller.decorator.js +8 -0
- package/controllers/decorators/controller.decorator.js.map +1 -1
- package/controllers/decorators/index.d.ts +1 -0
- package/controllers/decorators/index.js +1 -0
- package/controllers/decorators/index.js.map +1 -1
- package/controllers/decorators/transaction.decorator.d.ts +7 -0
- package/controllers/decorators/transaction.decorator.js +23 -0
- package/controllers/decorators/transaction.decorator.js.map +1 -0
- package/controllers/interfaces/controller-object.d.ts +1 -0
- package/controllers/interfaces/controller-options.d.ts +1 -0
- package/controllers/interfaces/controller-property.d.ts +9 -0
- package/controllers/services/default-action-builder.js +14 -0
- package/controllers/services/default-action-builder.js.map +1 -1
- package/controllers/services/restful-action-builder.js +25 -1
- package/controllers/services/restful-action-builder.js.map +1 -1
- package/core/contexts/request-context.d.ts +5 -0
- package/core/contexts/request-context.js +6 -0
- package/core/contexts/request-context.js.map +1 -0
- package/core/core.controller.d.ts +1 -0
- package/core/core.controller.js +15 -2
- package/core/core.controller.js.map +1 -1
- package/core/functions/create-interceptor.js +2 -2
- package/core/functions/create-interceptor.js.map +1 -1
- package/core/functions/resolve-action-transactional.d.ts +3 -0
- package/core/functions/resolve-action-transactional.js +10 -0
- package/core/functions/resolve-action-transactional.js.map +1 -0
- package/core/interfaces/action-def.d.ts +2 -5
- package/core/interfaces/action-docs.d.ts +15 -0
- package/core/interfaces/action-handle.d.ts +5 -0
- package/core/interfaces/action-handle.js +3 -0
- package/core/interfaces/action-handle.js.map +1 -0
- package/core/interfaces/core-options.d.ts +1 -0
- package/core/interfaces/interceptor.d.ts +1 -1
- package/core/interfaces/object.d.ts +3 -2
- package/core/interfaces/request-context.d.ts +7 -2
- package/core/services/request-executor.d.ts +8 -0
- package/core/services/request-executor.js +88 -0
- package/core/services/request-executor.js.map +1 -1
- package/core/services/request-router.js +5 -4
- package/core/services/request-router.js.map +1 -1
- package/database/database.controller.d.ts +1 -3
- package/database/database.controller.js +1 -5
- package/database/database.controller.js.map +1 -1
- package/database/decorators/entity.decorator.d.ts +3 -1
- package/database/decorators/entity.decorator.js +14 -5
- package/database/decorators/entity.decorator.js.map +1 -1
- package/database/decorators/external-column.decorator.d.ts +17 -0
- package/database/decorators/external-column.decorator.js +30 -0
- package/database/decorators/external-column.decorator.js.map +1 -0
- package/database/decorators/index.d.ts +1 -0
- package/database/decorators/index.js +1 -0
- package/database/decorators/index.js.map +1 -1
- package/database/decorators/protect-entity.decorator.d.ts +1 -0
- package/database/decorators/protect-entity.decorator.js +2 -3
- package/database/decorators/protect-entity.decorator.js.map +1 -1
- package/database/decorators/protected-entity.decorator.d.ts +1 -0
- package/database/decorators/protected-entity.decorator.js +2 -16
- package/database/decorators/protected-entity.decorator.js.map +1 -1
- package/database/decorators/relation.decorator.d.ts +2 -2
- package/database/decorators/relation.decorator.js.map +1 -1
- package/database/extensions/select-query-builder.d.ts +1 -5
- package/database/extensions/select-query-builder.js.map +1 -1
- package/database/functions/find-relation.d.ts +2 -1
- package/database/functions/find-relation.js +3 -3
- package/database/functions/find-relation.js.map +1 -1
- package/database/functions/generate-entity-id.d.ts +2 -0
- package/database/functions/{generate-id.js → generate-entity-id.js} +3 -3
- package/database/functions/generate-entity-id.js.map +1 -0
- package/database/functions/get-relations.d.ts +1 -1
- package/database/functions/inject-repository-handle.js +4 -3
- package/database/functions/inject-repository-handle.js.map +1 -1
- package/database/functions/use-transaction.d.ts +1 -0
- package/database/functions/use-transaction.js +2 -6
- package/database/functions/use-transaction.js.map +1 -1
- package/database/interfaces/entity-dto-object.d.ts +7 -0
- package/database/interfaces/entity-dto-object.js +3 -0
- package/database/interfaces/entity-dto-object.js.map +1 -0
- package/database/interfaces/entity-object.d.ts +0 -6
- package/database/interfaces/entity-property.d.ts +12 -0
- package/database/interfaces/index.d.ts +0 -1
- package/database/interfaces/index.js +0 -1
- package/database/interfaces/index.js.map +1 -1
- package/database/interfaces/path.d.ts +6 -2
- package/database/interfaces/repository.d.ts +8 -8
- package/database/interfaces/virtual-select.d.ts +4 -0
- package/database/interfaces/virtual-select.js +3 -0
- package/database/interfaces/virtual-select.js.map +1 -0
- package/database/services/repository.service.d.ts +1 -1
- package/database/services/repository.service.js +3 -6
- package/database/services/repository.service.js.map +1 -1
- package/docs/docs.module.js +3 -1
- package/docs/docs.module.js.map +1 -1
- package/docs/migrations/1747584000000-CreateDocsTables.d.ts +5 -0
- package/docs/migrations/1747584000000-CreateDocsTables.js +90 -0
- package/docs/migrations/1747584000000-CreateDocsTables.js.map +1 -0
- package/docs/migrations/migrations.d.ts +2 -0
- package/docs/migrations/migrations.js +8 -0
- package/docs/migrations/migrations.js.map +1 -0
- package/docs/queries/docs-controller-action.query.d.ts +1 -1
- package/docs/queries/docs-controller.query.d.ts +1 -1
- package/docs/queries/docs-model.query.d.ts +1 -1
- package/docs/queries/docs-model.query.js +1 -1
- package/docs/queries/docs-model.query.js.map +1 -1
- package/docs/queries/docs-version.query.d.ts +1 -1
- package/docs/services/docs-version.service.js +6 -3
- package/docs/services/docs-version.service.js.map +1 -1
- package/forms/queries/form.query.d.ts +1 -1
- package/forms/queries/property.query.d.ts +1 -1
- package/global.d.ts +2 -0
- package/global.js +2 -1
- package/global.js.map +1 -1
- package/http/http.controller.d.ts +2 -0
- package/http/http.controller.js +3 -2
- package/http/http.controller.js.map +1 -1
- package/index.d.ts +5 -2
- package/index.js +4 -7
- package/index.js.map +1 -1
- package/jobs/jobs.controller.d.ts +2 -0
- package/jobs/jobs.controller.js +22 -16
- package/jobs/jobs.controller.js.map +1 -1
- package/package.json +70 -69
- package/query/functions/add-join.js +8 -16
- package/query/functions/add-join.js.map +1 -1
- package/query/functions/collect-external-column-owners.d.ts +10 -0
- package/query/functions/collect-external-column-owners.js +100 -0
- package/query/functions/collect-external-column-owners.js.map +1 -0
- package/query/functions/create-query-builder.js +47 -28
- package/query/functions/create-query-builder.js.map +1 -1
- package/query/functions/create-query-cache-hash.d.ts +16 -0
- package/query/functions/create-query-cache-hash.js +70 -0
- package/query/functions/create-query-cache-hash.js.map +1 -0
- package/query/functions/create-query.d.ts +8 -3
- package/query/functions/create-query.js +12 -9
- package/query/functions/create-query.js.map +1 -1
- package/query/functions/describe-query-filter.js +3 -2
- package/query/functions/describe-query-filter.js.map +1 -1
- package/query/functions/execute-query.js +89 -9
- package/query/functions/execute-query.js.map +1 -1
- package/query/functions/expand-select-with-external-dependencies.d.ts +9 -0
- package/query/functions/expand-select-with-external-dependencies.js +34 -0
- package/query/functions/expand-select-with-external-dependencies.js.map +1 -0
- package/query/functions/external-column-owner-path.d.ts +5 -0
- package/query/functions/external-column-owner-path.js +18 -0
- package/query/functions/external-column-owner-path.js.map +1 -0
- package/query/functions/get-entity-object-class.d.ts +2 -0
- package/query/functions/get-entity-object-class.js +12 -0
- package/query/functions/get-entity-object-class.js.map +1 -0
- package/query/functions/get-native-select.js +3 -0
- package/query/functions/get-native-select.js.map +1 -1
- package/query/functions/load-properties.d.ts +20 -2
- package/query/functions/load-properties.js +190 -40
- package/query/functions/load-properties.js.map +1 -1
- package/query/functions/map-query-property-to-column-name.js +1 -1
- package/query/functions/map-query-property-to-column-name.js.map +1 -1
- package/query/functions/query-structure-cache.d.ts +24 -0
- package/query/functions/query-structure-cache.js +66 -0
- package/query/functions/query-structure-cache.js.map +1 -0
- package/query/interfaces/query.d.ts +44 -1
- package/query/services/query-action-builder.d.ts +4 -1
- package/query/services/query-action-builder.js +26 -12
- package/query/services/query-action-builder.js.map +1 -1
- package/remote-logs/dtos/index.d.ts +2 -0
- package/remote-logs/dtos/index.js +19 -0
- package/remote-logs/dtos/index.js.map +1 -0
- package/remote-logs/dtos/remote-log-hooks.dto.d.ts +72 -0
- package/remote-logs/dtos/remote-log-hooks.dto.js +280 -0
- package/remote-logs/dtos/remote-log-hooks.dto.js.map +1 -0
- package/remote-logs/dtos/remote-log-search.dto.d.ts +34 -0
- package/remote-logs/dtos/remote-log-search.dto.js +146 -0
- package/remote-logs/dtos/remote-log-search.dto.js.map +1 -0
- package/remote-logs/environment.d.ts +4 -0
- package/remote-logs/environment.js +5 -0
- package/remote-logs/environment.js.map +1 -0
- package/remote-logs/index.d.ts +3 -0
- package/remote-logs/index.js +20 -0
- package/remote-logs/index.js.map +1 -0
- package/remote-logs/interfaces/index.d.ts +1 -0
- package/remote-logs/interfaces/index.js +18 -0
- package/remote-logs/interfaces/index.js.map +1 -0
- package/remote-logs/interfaces/remote-logs-module-options.d.ts +8 -0
- package/remote-logs/interfaces/remote-logs-module-options.js +3 -0
- package/remote-logs/interfaces/remote-logs-module-options.js.map +1 -0
- package/remote-logs/remote-logs-hooks.controller.d.ts +60 -0
- package/remote-logs/remote-logs-hooks.controller.js +331 -0
- package/remote-logs/remote-logs-hooks.controller.js.map +1 -0
- package/remote-logs/remote-logs.controller.d.ts +8 -0
- package/remote-logs/remote-logs.controller.js +41 -0
- package/remote-logs/remote-logs.controller.js.map +1 -0
- package/remote-logs/remote-logs.module.d.ts +12 -0
- package/remote-logs/remote-logs.module.js +107 -0
- package/remote-logs/remote-logs.module.js.map +1 -0
- package/remote-logs/services/opensearch.service.d.ts +13 -0
- package/remote-logs/services/opensearch.service.js +167 -0
- package/remote-logs/services/opensearch.service.js.map +1 -0
- package/security/auth.controller.js +4 -4
- package/security/auth.controller.js.map +1 -1
- package/security/env.js.map +1 -1
- package/security/functions/add-protected.d.ts +2 -2
- package/security/functions/add-protected.js +8 -5
- package/security/functions/add-protected.js.map +1 -1
- package/security/functions/create-authentication-interceptor.d.ts +44 -0
- package/security/functions/create-authentication-interceptor.js +114 -0
- package/security/functions/create-authentication-interceptor.js.map +1 -0
- package/security/functions/find-auth-context.d.ts +1 -2
- package/security/functions/find-auth-context.js +6 -11
- package/security/functions/find-auth-context.js.map +1 -1
- package/security/index.d.ts +1 -0
- package/security/index.js +1 -0
- package/security/index.js.map +1 -1
- package/security/interfaces/authorization-schema.d.ts +3 -1
- package/security/requests/security.request.js +1 -1
- package/security/requests/security.request.js.map +1 -1
- package/security/services/authorization.service.d.ts +5 -3
- package/security/services/authorization.service.js +56 -37
- package/security/services/authorization.service.js.map +1 -1
- package/storage/services/routes.service.js +1 -1
- package/storage/services/routes.service.js.map +1 -1
- package/tasks/constants.d.ts +3 -0
- package/tasks/constants.js +2 -1
- package/tasks/constants.js.map +1 -1
- package/tasks/controllers/task.controller.d.ts +3 -2
- package/tasks/controllers/task.controller.js +11 -40
- package/tasks/controllers/task.controller.js.map +1 -1
- package/tasks/decorators/index.d.ts +1 -0
- package/tasks/decorators/index.js +1 -0
- package/tasks/decorators/index.js.map +1 -1
- package/tasks/decorators/task-payload.decorator.d.ts +1 -0
- package/tasks/decorators/task-payload.decorator.js +12 -0
- package/tasks/decorators/task-payload.decorator.js.map +1 -0
- package/tasks/decorators/task.decorator.js +6 -2
- package/tasks/decorators/task.decorator.js.map +1 -1
- package/tasks/functions/compile-all-task-post-hooks.d.ts +1 -0
- package/tasks/functions/compile-all-task-post-hooks.js +27 -0
- package/tasks/functions/compile-all-task-post-hooks.js.map +1 -0
- package/tasks/functions/compile-task-hook-handle.d.ts +6 -0
- package/tasks/functions/compile-task-hook-handle.js +67 -0
- package/tasks/functions/compile-task-hook-handle.js.map +1 -0
- package/tasks/functions/create-task-hook.d.ts +9 -0
- package/tasks/functions/create-task-hook.js +13 -0
- package/tasks/functions/create-task-hook.js.map +1 -0
- package/tasks/functions/{create-task-message-receptor.d.ts → create-task-message-post.d.ts} +1 -1
- package/tasks/functions/{create-task-message-receptor.js → create-task-message-post.js} +10 -3
- package/tasks/functions/create-task-message-post.js.map +1 -0
- package/tasks/functions/register-task-post-hook-interceptors.d.ts +3 -0
- package/tasks/functions/register-task-post-hook-interceptors.js +86 -0
- package/tasks/functions/register-task-post-hook-interceptors.js.map +1 -0
- package/tasks/functions/run-task-post-hooks.d.ts +11 -0
- package/tasks/functions/run-task-post-hooks.js +18 -0
- package/tasks/functions/run-task-post-hooks.js.map +1 -0
- package/tasks/functions/task-message-operations.d.ts +18 -0
- package/tasks/functions/task-message-operations.js +100 -0
- package/tasks/functions/task-message-operations.js.map +1 -0
- package/tasks/functions/validate-task-payload.d.ts +2 -0
- package/tasks/functions/validate-task-payload.js +19 -0
- package/tasks/functions/validate-task-payload.js.map +1 -0
- package/tasks/hook-constants.d.ts +2 -0
- package/tasks/hook-constants.js +6 -0
- package/tasks/hook-constants.js.map +1 -0
- package/tasks/index.d.ts +3 -0
- package/tasks/index.js +3 -0
- package/tasks/index.js.map +1 -1
- package/tasks/interfaces/compiled-task-post-hooks.d.ts +17 -0
- package/tasks/interfaces/compiled-task-post-hooks.js +3 -0
- package/tasks/interfaces/compiled-task-post-hooks.js.map +1 -0
- package/tasks/interfaces/index.d.ts +3 -0
- package/tasks/interfaces/index.js +3 -0
- package/tasks/interfaces/index.js.map +1 -1
- package/tasks/interfaces/task-hook.d.ts +16 -0
- package/tasks/interfaces/task-hook.js +8 -0
- package/tasks/interfaces/task-hook.js.map +1 -0
- package/tasks/interfaces/task-object.d.ts +6 -2
- package/tasks/interfaces/task-post-hook.d.ts +2 -0
- package/tasks/interfaces/task-post-hook.js +3 -0
- package/tasks/interfaces/task-post-hook.js.map +1 -0
- package/tasks/interfaces/task-post-intercept.d.ts +1 -8
- package/tasks/interfaces/task-runner.d.ts +2 -1
- package/tasks/interfaces/task-settings.d.ts +7 -0
- package/tasks/services/task-runner.service.d.ts +24 -3
- package/tasks/services/task-runner.service.js +68 -28
- package/tasks/services/task-runner.service.js.map +1 -1
- package/translations/controllers/translation.controller.js +12 -9
- package/translations/controllers/translation.controller.js.map +1 -1
- package/translations/functions/create-translation-values.js +2 -5
- package/translations/functions/create-translation-values.js.map +1 -1
- package/translations/migrations/1723760669185-CreateTranslationTables.js +3 -3
- package/translations/migrations/1723760669185-CreateTranslationTables.js.map +1 -1
- package/translations/queries/translation-config.query.d.ts +1 -1
- package/translations/queries/translation-values.query.d.ts +1 -1
- package/translations/queries/translation-values.query.js +1 -1
- package/translations/queries/translation-values.query.js.map +1 -1
- package/translations/translations.controller.d.ts +1 -1
- package/translations/translations.controller.js +4 -4
- package/translations/translations.controller.js.map +1 -1
- package/database/functions/generate-id.d.ts +0 -2
- package/database/functions/generate-id.js.map +0 -1
- package/database/functions/use-protector.d.ts +0 -2
- package/database/functions/use-protector.js +0 -11
- package/database/functions/use-protector.js.map +0 -1
- package/database/interfaces/protector.d.ts +0 -51
- package/database/interfaces/protector.js.map +0 -1
- package/database/services/protect-builder.d.ts +0 -59
- package/database/services/protect-builder.js +0 -524
- package/database/services/protect-builder.js.map +0 -1
- package/security/functions/add-protect.d.ts +0 -2
- package/security/functions/add-protect.js +0 -11
- package/security/functions/add-protect.js.map +0 -1
- package/tasks/functions/create-task-message-receptor.js.map +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ScopeKeyService } from "../services/scope-key.service";
|
|
2
|
+
import { ScopeKey } from "../entities/scope-key";
|
|
3
|
+
export declare class ScopeKeyController {
|
|
4
|
+
protected readonly scopeKeyService: ScopeKeyService;
|
|
5
|
+
constructor(scopeKeyService: ScopeKeyService);
|
|
6
|
+
query(contextName: string): Promise<ScopeKey[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ScopeKeyController = void 0;
|
|
16
|
+
const controller_decorator_1 = require("../../controllers/decorators/controller.decorator");
|
|
17
|
+
const get_decorator_1 = require("../../controllers/decorators/http-methods/get.decorator");
|
|
18
|
+
const scope_key_service_1 = require("../services/scope-key.service");
|
|
19
|
+
const from_params_decorator_1 = require("../../controllers/decorators/http-methods/from-params.decorator");
|
|
20
|
+
const response_type_decorator_1 = require("../../controllers/decorators/http-methods/response-type.decorator");
|
|
21
|
+
const scope_key_1 = require("../entities/scope-key");
|
|
22
|
+
let ScopeKeyController = class ScopeKeyController {
|
|
23
|
+
constructor(scopeKeyService) {
|
|
24
|
+
this.scopeKeyService = scopeKeyService;
|
|
25
|
+
}
|
|
26
|
+
async query(contextName) {
|
|
27
|
+
return this.scopeKeyService.getMany({
|
|
28
|
+
where: { contextName }
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.ScopeKeyController = ScopeKeyController;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, response_type_decorator_1.ResponseType)(() => scope_key_1.ScopeKey, { array: true }),
|
|
35
|
+
(0, get_decorator_1.Get)('context/:contextName'),
|
|
36
|
+
__param(0, (0, from_params_decorator_1.FromParams)('contextName')),
|
|
37
|
+
__metadata("design:type", Function),
|
|
38
|
+
__metadata("design:paramtypes", [String]),
|
|
39
|
+
__metadata("design:returntype", Promise)
|
|
40
|
+
], ScopeKeyController.prototype, "query", null);
|
|
41
|
+
exports.ScopeKeyController = ScopeKeyController = __decorate([
|
|
42
|
+
(0, controller_decorator_1.Controller)(),
|
|
43
|
+
__metadata("design:paramtypes", [scope_key_service_1.ScopeKeyService])
|
|
44
|
+
], ScopeKeyController);
|
|
45
|
+
//# sourceMappingURL=scope-key.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-key.controller.js","sourceRoot":"./","sources":["access/controllers/scope-key.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4FAA+E;AAC/E,2FAA8E;AAC9E,qEAAgE;AAChE,2GAA6F;AAC7F,+GAAiG;AACjG,qDAAiD;AAG1C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAE5B,YACsB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IACnD,CAAC;IAIE,AAAN,KAAK,CAAC,KAAK,CAA4B,WAAmB;QACvD,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;YACjC,KAAK,EAAE,EAAE,WAAW,EAAE;SACxB,CAAC,CAAC;IACN,CAAC;CACH,CAAA;AAbY,gDAAkB;AAQtB;IAFL,IAAA,sCAAY,EAAC,GAAG,EAAE,CAAC,oBAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC7C,IAAA,mBAAG,EAAC,sBAAsB,CAAC;IACf,WAAA,IAAA,kCAAU,EAAC,aAAa,CAAC,CAAA;;;;+CAIrC;6BAZS,kBAAkB;IAD9B,IAAA,iCAAU,GAAE;qCAI6B,mCAAe;GAH5C,kBAAkB,CAa9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IRequestContext } from "../../core/interfaces/request-context";
|
|
2
|
+
import { ScopeOwner } from "../models/scope-owner";
|
|
3
|
+
import { ScopeOwnerService } from "../services/scope-owner.service";
|
|
4
|
+
export declare class ScopeOwnerController {
|
|
5
|
+
protected readonly scopeOwnerService: ScopeOwnerService;
|
|
6
|
+
constructor(scopeOwnerService: ScopeOwnerService);
|
|
7
|
+
add(content: ScopeOwner, requestContext: IRequestContext): Promise<void>;
|
|
8
|
+
remove(content: ScopeOwner, requestContext: IRequestContext): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ScopeOwnerController = void 0;
|
|
16
|
+
const action_content_decorator_1 = require("../../controllers/decorators/actions/action-content.decorator");
|
|
17
|
+
const action_decorator_1 = require("../../controllers/decorators/actions/action.decorator");
|
|
18
|
+
const controller_decorator_1 = require("../../controllers/decorators/controller.decorator");
|
|
19
|
+
const request_context_decorator_1 = require("../../controllers/decorators/request-context.decorator");
|
|
20
|
+
const scope_owner_1 = require("../models/scope-owner");
|
|
21
|
+
const scope_owner_service_1 = require("../services/scope-owner.service");
|
|
22
|
+
const assert_context_admin_access_1 = require("../functions/assert-context-admin-access");
|
|
23
|
+
let ScopeOwnerController = class ScopeOwnerController {
|
|
24
|
+
constructor(scopeOwnerService) {
|
|
25
|
+
this.scopeOwnerService = scopeOwnerService;
|
|
26
|
+
}
|
|
27
|
+
async add(content, requestContext) {
|
|
28
|
+
await (0, assert_context_admin_access_1.assertContextAdminAccess)({
|
|
29
|
+
contextName: content.contextName,
|
|
30
|
+
contextId: content.contextId,
|
|
31
|
+
userId: requestContext.session?.userId,
|
|
32
|
+
});
|
|
33
|
+
const owner = await this.scopeOwnerService.getOneBy({
|
|
34
|
+
contextName: content.contextName,
|
|
35
|
+
contextId: content.contextId,
|
|
36
|
+
userId: content.userId
|
|
37
|
+
});
|
|
38
|
+
if (owner)
|
|
39
|
+
return;
|
|
40
|
+
await this.scopeOwnerService.save({
|
|
41
|
+
contextName: content.contextName,
|
|
42
|
+
userId: content.userId,
|
|
43
|
+
contextId: content.contextId
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
async remove(content, requestContext) {
|
|
47
|
+
await (0, assert_context_admin_access_1.assertContextAdminAccess)({
|
|
48
|
+
contextName: content.contextName,
|
|
49
|
+
contextId: content.contextId,
|
|
50
|
+
userId: requestContext.session?.userId,
|
|
51
|
+
});
|
|
52
|
+
await this.scopeOwnerService.removeBy({
|
|
53
|
+
contextId: content.contextId,
|
|
54
|
+
contextName: content.contextName,
|
|
55
|
+
userId: content.userId
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.ScopeOwnerController = ScopeOwnerController;
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, action_decorator_1.Action)(),
|
|
62
|
+
__param(0, (0, action_content_decorator_1.ActionContent)()),
|
|
63
|
+
__param(1, (0, request_context_decorator_1.RequestContext)()),
|
|
64
|
+
__metadata("design:type", Function),
|
|
65
|
+
__metadata("design:paramtypes", [scope_owner_1.ScopeOwner, Object]),
|
|
66
|
+
__metadata("design:returntype", Promise)
|
|
67
|
+
], ScopeOwnerController.prototype, "add", null);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, action_decorator_1.Action)(),
|
|
70
|
+
__param(0, (0, action_content_decorator_1.ActionContent)()),
|
|
71
|
+
__param(1, (0, request_context_decorator_1.RequestContext)()),
|
|
72
|
+
__metadata("design:type", Function),
|
|
73
|
+
__metadata("design:paramtypes", [scope_owner_1.ScopeOwner, Object]),
|
|
74
|
+
__metadata("design:returntype", Promise)
|
|
75
|
+
], ScopeOwnerController.prototype, "remove", null);
|
|
76
|
+
exports.ScopeOwnerController = ScopeOwnerController = __decorate([
|
|
77
|
+
(0, controller_decorator_1.Controller)(),
|
|
78
|
+
__metadata("design:paramtypes", [scope_owner_service_1.ScopeOwnerService])
|
|
79
|
+
], ScopeOwnerController);
|
|
80
|
+
//# sourceMappingURL=scope-owner.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-owner.controller.js","sourceRoot":"./","sources":["access/controllers/scope-owner.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4GAA8F;AAC9F,4FAA+E;AAC/E,4FAA+E;AAC/E,sGAAwF;AAExF,uDAAmD;AACnD,yEAAoE;AACpE,0FAAoF;AAG7E,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAE9B,YAA+B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGjE,AAAN,KAAK,CAAC,GAAG,CACW,OAAmB,EAClB,cAA+B;QAEjD,MAAM,IAAA,sDAAwB,EAAC;YAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM;SACxC,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC;YACjD,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;SACxB,CAAC,CAAC;QAEH,IAAI,KAAK;YAAE,OAAO;QAElB,MAAM,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;YAC/B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,SAAS,EAAE,OAAO,CAAC,SAAS;SAC9B,CAAC,CAAC;IACN,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CACQ,OAAmB,EAClB,cAA+B;QAEjD,MAAM,IAAA,sDAAwB,EAAC;YAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM;SACxC,CAAC,CAAC;QAEH,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC;YACnC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,MAAM,EAAE,OAAO,CAAC,MAAM;SACxB,CAAC,CAAC;IACN,CAAC;CACH,CAAA;AA/CY,oDAAoB;AAKxB;IADL,IAAA,yBAAM,GAAE;IAEL,WAAA,IAAA,wCAAa,GAAE,CAAA;IACf,WAAA,IAAA,0CAAc,GAAE,CAAA;;qCADS,wBAAU;;+CAsBtC;AAGK;IADL,IAAA,yBAAM,GAAE;IAEL,WAAA,IAAA,wCAAa,GAAE,CAAA;IACf,WAAA,IAAA,0CAAc,GAAE,CAAA;;qCADS,wBAAU;;kDActC;+BA9CS,oBAAoB;IADhC,IAAA,iCAAU,GAAE;qCAGwC,uCAAiB;GAFzD,oBAAoB,CA+ChC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CurrentSession, IRequestContext } from "../../core/interfaces/request-context";
|
|
2
|
+
import { ScopeKeysUpdate } from "../models/scope-keys-update";
|
|
3
|
+
import { ScopeUser } from "../models/scope-user";
|
|
4
|
+
import { ScopeAccessService } from "../services/scope-access.service";
|
|
5
|
+
import { ScopeOwnerService } from "../services/scope-owner.service";
|
|
6
|
+
import { ScopeGroupService } from "../services/scope-group.service";
|
|
7
|
+
export declare class ScopeUserController {
|
|
8
|
+
protected readonly scopeOwnerService: ScopeOwnerService;
|
|
9
|
+
protected readonly scopeAccessService: ScopeAccessService;
|
|
10
|
+
protected readonly scopeGroupService: ScopeGroupService;
|
|
11
|
+
constructor(scopeOwnerService: ScopeOwnerService, scopeAccessService: ScopeAccessService, scopeGroupService: ScopeGroupService);
|
|
12
|
+
updateKeys(content: ScopeKeysUpdate, requestContext: IRequestContext): Promise<void>;
|
|
13
|
+
get(userId: string, contextName: string, contextId: string, session: CurrentSession): Promise<ScopeUser>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ScopeUserController = void 0;
|
|
16
|
+
const common_1 = require("@rockster/common");
|
|
17
|
+
const action_content_decorator_1 = require("../../controllers/decorators/actions/action-content.decorator");
|
|
18
|
+
const action_decorator_1 = require("../../controllers/decorators/actions/action.decorator");
|
|
19
|
+
const controller_decorator_1 = require("../../controllers/decorators/controller.decorator");
|
|
20
|
+
const from_params_decorator_1 = require("../../controllers/decorators/http-methods/from-params.decorator");
|
|
21
|
+
const from_query_decorator_1 = require("../../controllers/decorators/http-methods/from-query.decorator");
|
|
22
|
+
const get_decorator_1 = require("../../controllers/decorators/http-methods/get.decorator");
|
|
23
|
+
const response_type_decorator_1 = require("../../controllers/decorators/http-methods/response-type.decorator");
|
|
24
|
+
const request_context_decorator_1 = require("../../controllers/decorators/request-context.decorator");
|
|
25
|
+
const session_decorator_1 = require("../../controllers/decorators/session.decorator");
|
|
26
|
+
const scope_keys_update_1 = require("../models/scope-keys-update");
|
|
27
|
+
const scope_user_1 = require("../models/scope-user");
|
|
28
|
+
const scope_access_service_1 = require("../services/scope-access.service");
|
|
29
|
+
const scope_owner_service_1 = require("../services/scope-owner.service");
|
|
30
|
+
const scope_group_service_1 = require("../services/scope-group.service");
|
|
31
|
+
const normalize_scope_keys_1 = require("../functions/normalize-scope-keys");
|
|
32
|
+
const assert_context_admin_access_1 = require("../functions/assert-context-admin-access");
|
|
33
|
+
let ScopeUserController = class ScopeUserController {
|
|
34
|
+
constructor(scopeOwnerService, scopeAccessService, scopeGroupService) {
|
|
35
|
+
this.scopeOwnerService = scopeOwnerService;
|
|
36
|
+
this.scopeAccessService = scopeAccessService;
|
|
37
|
+
this.scopeGroupService = scopeGroupService;
|
|
38
|
+
}
|
|
39
|
+
async updateKeys(content, requestContext) {
|
|
40
|
+
if (requestContext.session.userId === content.targetId) {
|
|
41
|
+
throw new common_1.ForbiddenError({
|
|
42
|
+
message: 'A user cannot edit their own permissions'
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
await (0, assert_context_admin_access_1.assertContextAdminAccess)({
|
|
46
|
+
contextName: content.contextName,
|
|
47
|
+
contextId: content.contextId,
|
|
48
|
+
userId: requestContext.session?.userId,
|
|
49
|
+
});
|
|
50
|
+
return this.scopeAccessService.updateKeys('user', content.contextName, content.contextId, content.targetId, (0, normalize_scope_keys_1.normalizeScopeKeys)(content.keys));
|
|
51
|
+
}
|
|
52
|
+
async get(userId, contextName, contextId, session) {
|
|
53
|
+
await (0, assert_context_admin_access_1.assertContextAdminAccess)({
|
|
54
|
+
contextName,
|
|
55
|
+
contextId,
|
|
56
|
+
userId: session?.userId,
|
|
57
|
+
});
|
|
58
|
+
const isOwner = await this
|
|
59
|
+
.scopeOwnerService
|
|
60
|
+
.getIsOwner(contextName, userId, contextId);
|
|
61
|
+
const groups = await this
|
|
62
|
+
.scopeGroupService
|
|
63
|
+
.getUserGroups(userId, contextName, contextId);
|
|
64
|
+
const keys = await this
|
|
65
|
+
.scopeAccessService
|
|
66
|
+
.getMany({
|
|
67
|
+
where: {
|
|
68
|
+
contextId: contextId,
|
|
69
|
+
contextName: contextName,
|
|
70
|
+
userId: userId
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
contextName: contextName,
|
|
75
|
+
userId: userId,
|
|
76
|
+
contextId: contextId,
|
|
77
|
+
groups: groups,
|
|
78
|
+
keys: (0, normalize_scope_keys_1.filterScopeAccessRows)(keys),
|
|
79
|
+
isOwner
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
exports.ScopeUserController = ScopeUserController;
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, action_decorator_1.Action)(),
|
|
86
|
+
__param(0, (0, action_content_decorator_1.ActionContent)()),
|
|
87
|
+
__param(1, (0, request_context_decorator_1.RequestContext)()),
|
|
88
|
+
__metadata("design:type", Function),
|
|
89
|
+
__metadata("design:paramtypes", [scope_keys_update_1.ScopeKeysUpdate, Object]),
|
|
90
|
+
__metadata("design:returntype", Promise)
|
|
91
|
+
], ScopeUserController.prototype, "updateKeys", null);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, response_type_decorator_1.ResponseType)(() => scope_user_1.ScopeUser),
|
|
94
|
+
(0, get_decorator_1.Get)(':userId/context/:contextName'),
|
|
95
|
+
__param(0, (0, from_params_decorator_1.FromParams)('userId')),
|
|
96
|
+
__param(1, (0, from_params_decorator_1.FromParams)('contextName')),
|
|
97
|
+
__param(2, (0, from_query_decorator_1.FromQuery)('contextId')),
|
|
98
|
+
__param(3, (0, session_decorator_1.Session)()),
|
|
99
|
+
__metadata("design:type", Function),
|
|
100
|
+
__metadata("design:paramtypes", [String, String, String, Object]),
|
|
101
|
+
__metadata("design:returntype", Promise)
|
|
102
|
+
], ScopeUserController.prototype, "get", null);
|
|
103
|
+
exports.ScopeUserController = ScopeUserController = __decorate([
|
|
104
|
+
(0, controller_decorator_1.Controller)(),
|
|
105
|
+
__metadata("design:paramtypes", [scope_owner_service_1.ScopeOwnerService,
|
|
106
|
+
scope_access_service_1.ScopeAccessService,
|
|
107
|
+
scope_group_service_1.ScopeGroupService])
|
|
108
|
+
], ScopeUserController);
|
|
109
|
+
//# sourceMappingURL=scope-user.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-user.controller.js","sourceRoot":"./","sources":["access/controllers/scope-user.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAkD;AAClD,4GAA8F;AAC9F,4FAA+E;AAC/E,4FAA+E;AAC/E,2GAA6F;AAC7F,yGAA2F;AAC3F,2FAA8E;AAC9E,+GAAiG;AACjG,sGAAwF;AACxF,sFAAyE;AAEzE,mEAA8D;AAC9D,qDAAiD;AACjD,2EAAsE;AACtE,yEAAoE;AACpE,yEAAoE;AACpE,4EAG2C;AAC3C,0FAAoF;AAG7E,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAE7B,YACsB,iBAAoC,EACpC,kBAAsC,EACtC,iBAAoC;QAFpC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,sBAAiB,GAAjB,iBAAiB,CAAmB;IACvD,CAAC;IAGE,AAAN,KAAK,CAAC,UAAU,CACI,OAAwB,EACvB,cAA+B;QAEjD,IAAI,cAAc,CAAC,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC;YACtD,MAAM,IAAI,uBAAc,CAAC;gBACtB,OAAO,EAAE,0CAA0C;aACrD,CAAC,CAAC;QACN,CAAC;QAED,MAAM,IAAA,sDAAwB,EAAC;YAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM;SACxC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,kBAAkB,CAAC,UAAU,CACtC,MAAM,EACN,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,SAAS,EACjB,OAAO,CAAC,QAAQ,EAChB,IAAA,yCAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,CAClC,CAAC;IACL,CAAC;IAIK,AAAN,KAAK,CAAC,GAAG,CACgB,MAAc,EACT,WAAmB,EACtB,SAAiB,EAC9B,OAAuB;QAElC,MAAM,IAAA,sDAAwB,EAAC;YAC5B,WAAW;YACX,SAAS;YACT,MAAM,EAAE,OAAO,EAAE,MAAM;SACzB,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,MAAM,IAAI;aACtB,iBAAiB;aACjB,UAAU,CACR,WAAW,EACX,MAAM,EACN,SAAS,CACX,CAAC;QAEL,MAAM,MAAM,GAAG,MAAM,IAAI;aACrB,iBAAiB;aACjB,aAAa,CACX,MAAM,EACN,WAAW,EACX,SAAS,CACX,CAAC;QAEL,MAAM,IAAI,GAAG,MAAM,IAAI;aACnB,kBAAkB;aAClB,OAAO,CAAC;YACN,KAAK,EAAE;gBACJ,SAAS,EAAE,SAAS;gBACpB,WAAW,EAAE,WAAW;gBACxB,MAAM,EAAE,MAAM;aAChB;SACH,CAAC,CAAC;QAEN,OAAO;YACJ,WAAW,EAAE,WAAW;YACxB,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,SAAS;YACpB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAA,4CAAqB,EAAC,IAAI,CAAC;YACjC,OAAO;SACI,CAAC;IAClB,CAAC;CACH,CAAA;AAnFY,kDAAmB;AASvB;IADL,IAAA,yBAAM,GAAE;IAEL,WAAA,IAAA,wCAAa,GAAE,CAAA;IACf,WAAA,IAAA,0CAAc,GAAE,CAAA;;qCADS,mCAAe;;qDAsB3C;AAIK;IAFL,IAAA,sCAAY,EAAC,GAAG,EAAE,CAAC,sBAAS,CAAC;IAC7B,IAAA,mBAAG,EAAC,8BAA8B,CAAC;IAEhC,WAAA,IAAA,kCAAU,EAAC,QAAQ,CAAC,CAAA;IACpB,WAAA,IAAA,kCAAU,EAAC,aAAa,CAAC,CAAA;IACzB,WAAA,IAAA,gCAAS,EAAC,WAAW,CAAC,CAAA;IACtB,WAAA,IAAA,2BAAO,GAAE,CAAA;;;;8CA0CZ;8BAlFS,mBAAmB;IAD/B,IAAA,iCAAU,GAAE;qCAI+B,uCAAiB;QAChB,yCAAkB;QACnB,uCAAiB;GALhD,mBAAmB,CAmF/B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContextParams = void 0;
|
|
4
|
+
const class_injector_1 = require("@rockster/class-injector");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
/** Injects scope context resolve params for the current action. */
|
|
7
|
+
const ContextParams = () => {
|
|
8
|
+
return (target, propertyKey, index) => {
|
|
9
|
+
(0, class_injector_1.Inject)(constants_1.SCOPE_CONTEXT_PARAMS_KEY)(target, propertyKey, index);
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
exports.ContextParams = ContextParams;
|
|
13
|
+
//# sourceMappingURL=context-params.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-params.decorator.js","sourceRoot":"./","sources":["access/decorators/context-params.decorator.ts"],"names":[],"mappings":";;;AAAA,6DAAkD;AAClD,4CAAwD;AAExD,mEAAmE;AAC5D,MAAM,aAAa,GAAG,GAAG,EAAE;IAC/B,OAAO,CAAC,MAAM,EAAE,WAAmB,EAAE,KAAa,EAAE,EAAE;QACnD,IAAA,uBAAM,EAAC,oCAAwB,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;IAChE,CAAC,CAAC;AACL,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./context-params.decorator"), exports);
|
|
18
|
+
__exportStar(require("./scope-context-id-resolver.decorator"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"./","sources":["access/decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,wEAAsD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ScopeContextIdResolverOptions = {
|
|
2
|
+
/** Marks this method as the default resolver (resolveContextId). */
|
|
3
|
+
default?: boolean;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Marks a scope service method as a context id resolver.
|
|
7
|
+
* Executor name is always the method name (propertyKey).
|
|
8
|
+
* Use with @ContextParams() and optional action decorators (@QueryContent, @PostContent, …).
|
|
9
|
+
*/
|
|
10
|
+
export declare function ScopeContextIdResolver(options?: ScopeContextIdResolverOptions): (target: any, propertyKey: string) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScopeContextIdResolver = ScopeContextIdResolver;
|
|
4
|
+
const class_injector_1 = require("@rockster/class-injector");
|
|
5
|
+
/**
|
|
6
|
+
* Marks a scope service method as a context id resolver.
|
|
7
|
+
* Executor name is always the method name (propertyKey).
|
|
8
|
+
* Use with @ContextParams() and optional action decorators (@QueryContent, @PostContent, …).
|
|
9
|
+
*/
|
|
10
|
+
function ScopeContextIdResolver(options) {
|
|
11
|
+
return (target, propertyKey) => {
|
|
12
|
+
(0, class_injector_1.markExecutable)(target, propertyKey);
|
|
13
|
+
const property = classInjector
|
|
14
|
+
.storage
|
|
15
|
+
.createProperty(target, propertyKey);
|
|
16
|
+
property.scopeContextIdResolver = true;
|
|
17
|
+
if (options?.default === true) {
|
|
18
|
+
property.defaultScopeContextIdResolver = true;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=scope-context-id-resolver.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-context-id-resolver.decorator.js","sourceRoot":"./","sources":["access/decorators/scope-context-id-resolver.decorator.ts"],"names":[],"mappings":";;AAYA,wDAeC;AA3BD,6DAA0D;AAO1D;;;;GAIG;AACH,SAAgB,sBAAsB,CACnC,OAAuC;IAEvC,OAAO,CAAC,MAAM,EAAE,WAAmB,EAAE,EAAE;QACpC,IAAA,+BAAc,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,aAAa;aAC1B,OAAO;aACP,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAExC,QAAQ,CAAC,sBAAsB,GAAG,IAAI,CAAC;QAEvC,IAAI,OAAO,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC;YAC7B,QAAQ,CAAC,6BAA6B,GAAG,IAAI,CAAC;QACjD,CAAC;IACJ,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ScopeUserMapped } from "../models/scope-user-mapped";
|
|
2
|
+
import { ScopeAccess } from "./scope-access";
|
|
3
|
+
import { ScopeAccessProfile } from "./scope-access-profile";
|
|
4
|
+
import { ScopeAccessProfileKey } from "./scope-access-profile-key";
|
|
5
|
+
import { ScopeGroupUser } from "./scope-group-user";
|
|
6
|
+
import { ScopeKey } from "./scope-key";
|
|
7
|
+
import { ScopeOwner } from "./scope-owner";
|
|
8
|
+
export declare const entities: (typeof ScopeKey | typeof ScopeAccessProfileKey | typeof ScopeAccessProfile | typeof ScopeAccess | typeof ScopeOwner | typeof ScopeUserMapped | typeof ScopeGroupUser)[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.entities = void 0;
|
|
4
|
+
const scope_user_mapped_1 = require("../models/scope-user-mapped");
|
|
5
|
+
const scope_access_1 = require("./scope-access");
|
|
6
|
+
const scope_access_profile_1 = require("./scope-access-profile");
|
|
7
|
+
const scope_access_profile_key_1 = require("./scope-access-profile-key");
|
|
8
|
+
const scope_group_1 = require("./scope-group");
|
|
9
|
+
const scope_group_user_1 = require("./scope-group-user");
|
|
10
|
+
const scope_key_1 = require("./scope-key");
|
|
11
|
+
const scope_owner_1 = require("./scope-owner");
|
|
12
|
+
exports.entities = [
|
|
13
|
+
scope_access_1.ScopeAccess,
|
|
14
|
+
scope_access_profile_1.ScopeAccessProfile,
|
|
15
|
+
scope_access_profile_key_1.ScopeAccessProfileKey,
|
|
16
|
+
scope_group_user_1.ScopeGroupUser,
|
|
17
|
+
scope_group_1.ScopeGroup,
|
|
18
|
+
scope_key_1.ScopeKey,
|
|
19
|
+
scope_owner_1.ScopeOwner,
|
|
20
|
+
scope_user_mapped_1.ScopeUserMapped
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=entities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.js","sourceRoot":"./","sources":["access/entities/entities.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAC9D,iDAA6C;AAC7C,iEAA4D;AAC5D,yEAAmE;AACnE,+CAA2C;AAC3C,yDAAoD;AACpD,2CAAuC;AACvC,+CAA2C;AAE9B,QAAA,QAAQ,GAAG;IACrB,0BAAW;IACX,yCAAkB;IAClB,gDAAqB;IACrB,iCAAc;IACd,wBAAU;IACV,oBAAQ;IACR,wBAAU;IACV,mCAAe;CACjB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./scope-access"), exports);
|
|
18
|
+
__exportStar(require("./scope-access-profile"), exports);
|
|
19
|
+
__exportStar(require("./scope-access-profile-key"), exports);
|
|
20
|
+
__exportStar(require("./scope-group-user"), exports);
|
|
21
|
+
__exportStar(require("./scope-group"), exports);
|
|
22
|
+
__exportStar(require("./scope-key"), exports);
|
|
23
|
+
__exportStar(require("./scope-owner"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"./","sources":["access/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,yDAAuC;AACvC,6DAA2C;AAC3C,qDAAmC;AACnC,gDAA8B;AAC9B,8CAA4B;AAC5B,gDAA8B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IScopeAccessProfileKey } from "@rockster/common/access";
|
|
2
|
+
import { BaseEntity } from "../../common/entities/base-entity";
|
|
3
|
+
export declare class ScopeAccessProfileKey extends BaseEntity implements IScopeAccessProfileKey {
|
|
4
|
+
scopeAccessProfileId: string;
|
|
5
|
+
key?: string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ScopeAccessProfileKey = void 0;
|
|
13
|
+
const base_entity_1 = require("../../common/entities/base-entity");
|
|
14
|
+
const entity_decorator_1 = require("../../database/decorators/entity.decorator");
|
|
15
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
16
|
+
const relation_decorator_1 = require("../../database/decorators/relation.decorator");
|
|
17
|
+
const scope_key_1 = require("./scope-key");
|
|
18
|
+
const scope_access_profile_1 = require("./scope-access-profile");
|
|
19
|
+
const typeorm_1 = require("typeorm");
|
|
20
|
+
let ScopeAccessProfileKey = class ScopeAccessProfileKey extends base_entity_1.BaseEntity {
|
|
21
|
+
};
|
|
22
|
+
exports.ScopeAccessProfileKey = ScopeAccessProfileKey;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_pipe_1.Expose)(),
|
|
25
|
+
(0, class_pipe_1.IsRequired)(),
|
|
26
|
+
(0, class_pipe_1.IsString)(),
|
|
27
|
+
(0, typeorm_1.Index)(),
|
|
28
|
+
(0, relation_decorator_1.Relation)(() => scope_access_profile_1.ScopeAccessProfile),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ScopeAccessProfileKey.prototype, "scopeAccessProfileId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_pipe_1.Expose)(),
|
|
33
|
+
(0, class_pipe_1.IsString)(),
|
|
34
|
+
(0, relation_decorator_1.Relation)(() => scope_key_1.ScopeKey, { nullable: true }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ScopeAccessProfileKey.prototype, "key", void 0);
|
|
37
|
+
exports.ScopeAccessProfileKey = ScopeAccessProfileKey = __decorate([
|
|
38
|
+
(0, entity_decorator_1.Entity)()
|
|
39
|
+
], ScopeAccessProfileKey);
|
|
40
|
+
//# sourceMappingURL=scope-access-profile-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-access-profile-key.js","sourceRoot":"./","sources":["access/entities/scope-access-profile-key.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mEAA+D;AAC/D,iFAAoE;AACpE,qDAAoE;AAEpE,qFAAwE;AACxE,2CAAuC;AACvC,iEAA4D;AAC5D,qCAAgC;AAGzB,IAAM,qBAAqB,GAA3B,MAAM,qBACV,SAAQ,wBAAU;CAepB,CAAA;AAhBY,sDAAqB;AAU/B;IALC,IAAA,mBAAM,GAAE;IACR,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;IACV,IAAA,eAAK,GAAE;IACP,IAAA,6BAAQ,EAAC,GAAG,EAAE,CAAC,yCAAkB,CAAC;;mEACN;AAK7B;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,6BAAQ,EAAC,GAAG,EAAE,CAAC,oBAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAChC;gCAfH,qBAAqB;IADjC,IAAA,yBAAM,GAAE;GACI,qBAAqB,CAgBjC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IScopeAccessProfile, IScopeAccessProfileKey } from "@rockster/common/access";
|
|
2
|
+
import { BaseEntity } from "../../common/entities/base-entity";
|
|
3
|
+
export declare class ScopeAccessProfile extends BaseEntity implements IScopeAccessProfile {
|
|
4
|
+
name: string;
|
|
5
|
+
keys?: IScopeAccessProfileKey[];
|
|
6
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ScopeAccessProfile = void 0;
|
|
13
|
+
const base_entity_1 = require("../../common/entities/base-entity");
|
|
14
|
+
const entity_decorator_1 = require("../../database/decorators/entity.decorator");
|
|
15
|
+
const column_decorator_1 = require("../../database/decorators/column.decorator");
|
|
16
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
17
|
+
const scope_access_profile_key_1 = require("./scope-access-profile-key");
|
|
18
|
+
let ScopeAccessProfile = class ScopeAccessProfile extends base_entity_1.BaseEntity {
|
|
19
|
+
};
|
|
20
|
+
exports.ScopeAccessProfile = ScopeAccessProfile;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_pipe_1.Expose)(),
|
|
23
|
+
(0, class_pipe_1.IsRequired)(),
|
|
24
|
+
(0, class_pipe_1.IsString)(),
|
|
25
|
+
(0, column_decorator_1.Column)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ScopeAccessProfile.prototype, "name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_pipe_1.Expose)(),
|
|
30
|
+
(0, class_pipe_1.IsArray)(),
|
|
31
|
+
(0, class_pipe_1.IsType)(() => scope_access_profile_key_1.ScopeAccessProfileKey),
|
|
32
|
+
__metadata("design:type", Array)
|
|
33
|
+
], ScopeAccessProfile.prototype, "keys", void 0);
|
|
34
|
+
exports.ScopeAccessProfile = ScopeAccessProfile = __decorate([
|
|
35
|
+
(0, entity_decorator_1.Entity)()
|
|
36
|
+
], ScopeAccessProfile);
|
|
37
|
+
//# sourceMappingURL=scope-access-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-access-profile.js","sourceRoot":"./","sources":["access/entities/scope-access-profile.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,mEAA+D;AAC/D,iFAAoE;AACpE,iFAAoE;AACpE,qDAM8B;AAC9B,yEAAmE;AAG5D,IAAM,kBAAkB,GAAxB,MAAM,kBACV,SAAQ,wBAAU;CAepB,CAAA;AAhBY,gDAAkB;AAS5B;IAJC,IAAA,mBAAM,GAAE;IACR,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;IACV,IAAA,yBAAM,GAAE;;gDACI;AAMb;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,oBAAO,GAAE;IACT,IAAA,mBAAM,EAAC,GAAG,EAAE,CAAC,gDAAqB,CAAC;;gDACJ;6BAftB,kBAAkB;IAD9B,IAAA,yBAAM,GAAE;GACI,kBAAkB,CAgB9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IScopeAccess } from "@rockster/common/access";
|
|
2
|
+
import { BaseEntity } from "../../common/entities/base-entity";
|
|
3
|
+
export declare class ScopeAccess extends BaseEntity implements IScopeAccess {
|
|
4
|
+
contextName: string;
|
|
5
|
+
contextId?: string;
|
|
6
|
+
userId?: string;
|
|
7
|
+
groupId?: string;
|
|
8
|
+
key?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ScopeAccess = void 0;
|
|
13
|
+
const base_entity_1 = require("../../common/entities/base-entity");
|
|
14
|
+
const entity_decorator_1 = require("../../database/decorators/entity.decorator");
|
|
15
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
16
|
+
const column_decorator_1 = require("../../database/decorators/column.decorator");
|
|
17
|
+
const relation_decorator_1 = require("../../database/decorators/relation.decorator");
|
|
18
|
+
const scope_key_1 = require("./scope-key");
|
|
19
|
+
const scope_group_1 = require("./scope-group");
|
|
20
|
+
const typeorm_1 = require("typeorm");
|
|
21
|
+
let ScopeAccess = class ScopeAccess extends base_entity_1.BaseEntity {
|
|
22
|
+
};
|
|
23
|
+
exports.ScopeAccess = ScopeAccess;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_pipe_1.Expose)(),
|
|
26
|
+
(0, class_pipe_1.IsString)(),
|
|
27
|
+
(0, column_decorator_1.Column)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], ScopeAccess.prototype, "contextName", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_pipe_1.Expose)(),
|
|
32
|
+
(0, class_pipe_1.IsString)(),
|
|
33
|
+
(0, column_decorator_1.Column)({ nullable: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ScopeAccess.prototype, "contextId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_pipe_1.Expose)(),
|
|
38
|
+
(0, class_pipe_1.IsString)(),
|
|
39
|
+
(0, typeorm_1.Index)(),
|
|
40
|
+
(0, column_decorator_1.Column)({ nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ScopeAccess.prototype, "userId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_pipe_1.Expose)(),
|
|
45
|
+
(0, class_pipe_1.IsString)(),
|
|
46
|
+
(0, relation_decorator_1.Relation)(() => scope_group_1.ScopeGroup, { nullable: true }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], ScopeAccess.prototype, "groupId", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_pipe_1.Expose)(),
|
|
51
|
+
(0, class_pipe_1.IsString)(),
|
|
52
|
+
(0, relation_decorator_1.Relation)(() => scope_key_1.ScopeKey, { nullable: true }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], ScopeAccess.prototype, "key", void 0);
|
|
55
|
+
exports.ScopeAccess = ScopeAccess = __decorate([
|
|
56
|
+
(0, entity_decorator_1.Entity)()
|
|
57
|
+
], ScopeAccess);
|
|
58
|
+
//# sourceMappingURL=scope-access.js.map
|