@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,21 @@
|
|
|
1
|
+
import { ExecutorData } from "@rockster/class-injector/interfaces";
|
|
2
|
+
import { Dictionary, Instantiable } from "@rockster/common";
|
|
3
|
+
import { IScopeService } from "./scope-service";
|
|
4
|
+
export interface IScopeServiceRegistry {
|
|
5
|
+
Service: Instantiable<IScopeService<any>>;
|
|
6
|
+
/** When false, scope has no context id (e.g. manager). */
|
|
7
|
+
withId?: boolean;
|
|
8
|
+
instance?: IScopeService<any>;
|
|
9
|
+
resolvers?: Dictionary<ExecutorData>;
|
|
10
|
+
/** Marks this scope as the hierarchy root (e.g. workspace). */
|
|
11
|
+
root?: boolean;
|
|
12
|
+
/** Context name of the root scope this scope descends from. */
|
|
13
|
+
rootScope?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Key that, held at the ROOT context, grants everything in every descendant
|
|
16
|
+
* scope (platform master). Set on the root scope.
|
|
17
|
+
*/
|
|
18
|
+
masterKey?: string;
|
|
19
|
+
/** Key that grants everything WITHIN this context (context admin). */
|
|
20
|
+
adminKey?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-service-registry.js","sourceRoot":"./","sources":["access/interfaces/scope-service-registry.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IScopeUserMapped } from "@rockster/common/access";
|
|
2
|
+
import { GetConditionCallbackResult } from "../../database/interfaces/path";
|
|
3
|
+
import { SelectQueryBuilder } from "../../database/extensions/select-query-builder";
|
|
4
|
+
export interface IScopeService<_TCurrentSession = unknown> {
|
|
5
|
+
joinUser(rootAlias: string, contextId: string, queryBuilder: SelectQueryBuilder<IScopeUserMapped>): GetConditionCallbackResult;
|
|
6
|
+
/**
|
|
7
|
+
* Maps a context id to its hierarchy ROOT context id (e.g. account/project →
|
|
8
|
+
* workspace). The root scope returns the same id. Used by the master-key check.
|
|
9
|
+
*/
|
|
10
|
+
resolveRootContextId?(contextId: string): Promise<string | undefined>;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-service.js","sourceRoot":"./","sources":["access/interfaces/scope-service.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.ScopeAccessProfileKeysUpdate = void 0;
|
|
13
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
14
|
+
class ScopeAccessProfileKeysUpdate {
|
|
15
|
+
}
|
|
16
|
+
exports.ScopeAccessProfileKeysUpdate = ScopeAccessProfileKeysUpdate;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_pipe_1.IsRequired)(),
|
|
19
|
+
(0, class_pipe_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ScopeAccessProfileKeysUpdate.prototype, "scopeAccessProfileId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_pipe_1.IsRequired)(),
|
|
24
|
+
(0, class_pipe_1.IsArray)(),
|
|
25
|
+
__metadata("design:type", Array)
|
|
26
|
+
], ScopeAccessProfileKeysUpdate.prototype, "keys", void 0);
|
|
27
|
+
//# sourceMappingURL=scope-access-profile-keys-update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-access-profile-keys-update.js","sourceRoot":"./","sources":["access/models/scope-access-profile-keys-update.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqE;AAGrE,MAAa,4BAA4B;CASxC;AATD,oEASC;AALE;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;0EACkB;AAI7B;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,oBAAO,GAAE;;0DACK"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.ScopeContext = void 0;
|
|
13
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
14
|
+
class ScopeContext {
|
|
15
|
+
}
|
|
16
|
+
exports.ScopeContext = ScopeContext;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_pipe_1.IsRequired)(),
|
|
19
|
+
(0, class_pipe_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ScopeContext.prototype, "$contextName", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_pipe_1.IsOptional)(),
|
|
24
|
+
(0, class_pipe_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ScopeContext.prototype, "$contextId", void 0);
|
|
27
|
+
//# sourceMappingURL=scope-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-context.js","sourceRoot":"./","sources":["access/models/scope-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwE;AAExE,MAAa,YAAY;CASxB;AATD,oCASC;AALE;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;kDACU;AAIrB;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;gDACQ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.ScopeGroupApplyAccessProfile = void 0;
|
|
13
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
14
|
+
class ScopeGroupApplyAccessProfile {
|
|
15
|
+
}
|
|
16
|
+
exports.ScopeGroupApplyAccessProfile = ScopeGroupApplyAccessProfile;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_pipe_1.IsRequired)(),
|
|
19
|
+
(0, class_pipe_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ScopeGroupApplyAccessProfile.prototype, "groupId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_pipe_1.IsRequired)(),
|
|
24
|
+
(0, class_pipe_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ScopeGroupApplyAccessProfile.prototype, "contextName", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_pipe_1.IsRequired)(),
|
|
29
|
+
(0, class_pipe_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ScopeGroupApplyAccessProfile.prototype, "contextId", void 0);
|
|
32
|
+
//# sourceMappingURL=scope-group-apply-access-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-group-apply-access-profile.js","sourceRoot":"./","sources":["access/models/scope-group-apply-access-profile.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4D;AAG5D,MAAa,4BAA4B;CAaxC;AAbD,oEAaC;AATE;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;6DACK;AAIhB;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;iEACS;AAIpB;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;+DACO"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.ScopeKeysUpdate = void 0;
|
|
13
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
14
|
+
class ScopeKeysUpdate {
|
|
15
|
+
}
|
|
16
|
+
exports.ScopeKeysUpdate = ScopeKeysUpdate;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_pipe_1.IsOptional)(),
|
|
19
|
+
(0, class_pipe_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ScopeKeysUpdate.prototype, "contextId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_pipe_1.IsRequired)(),
|
|
24
|
+
(0, class_pipe_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ScopeKeysUpdate.prototype, "contextName", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_pipe_1.IsRequired)(),
|
|
29
|
+
(0, class_pipe_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ScopeKeysUpdate.prototype, "targetId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_pipe_1.IsRequired)(),
|
|
34
|
+
(0, class_pipe_1.IsString)(),
|
|
35
|
+
(0, class_pipe_1.IsArray)(),
|
|
36
|
+
__metadata("design:type", Array)
|
|
37
|
+
], ScopeKeysUpdate.prototype, "keys", void 0);
|
|
38
|
+
//# sourceMappingURL=scope-keys-update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-keys-update.js","sourceRoot":"./","sources":["access/models/scope-keys-update.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiF;AAGjF,MAAa,eAAe;CAkB3B;AAlBD,0CAkBC;AAdE;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;kDACO;AAIlB;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;oDACS;AAIpB;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;iDACM;AAKjB;IAHC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;IACV,IAAA,oBAAO,GAAE;;6CACK"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.ScopeOwner = void 0;
|
|
13
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
14
|
+
class ScopeOwner {
|
|
15
|
+
}
|
|
16
|
+
exports.ScopeOwner = ScopeOwner;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_pipe_1.IsRequired)(),
|
|
19
|
+
(0, class_pipe_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ScopeOwner.prototype, "contextName", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_pipe_1.IsRequired)(),
|
|
24
|
+
(0, class_pipe_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ScopeOwner.prototype, "userId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_pipe_1.IsOptional)(),
|
|
29
|
+
(0, class_pipe_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ScopeOwner.prototype, "contextId", void 0);
|
|
32
|
+
//# sourceMappingURL=scope-owner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-owner.js","sourceRoot":"./","sources":["access/models/scope-owner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwE;AAExE,MAAa,UAAU;CAatB;AAbD,gCAaC;AATE;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;+CACS;AAIpB;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;0CACI;AAIf;IAFC,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;;6CACQ"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.ScopeUserMapped = void 0;
|
|
13
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
14
|
+
class ScopeUserMapped {
|
|
15
|
+
}
|
|
16
|
+
exports.ScopeUserMapped = ScopeUserMapped;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_pipe_1.Expose)(),
|
|
19
|
+
(0, class_pipe_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ScopeUserMapped.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_pipe_1.Expose)(),
|
|
24
|
+
(0, class_pipe_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ScopeUserMapped.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_pipe_1.Expose)(),
|
|
29
|
+
(0, class_pipe_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ScopeUserMapped.prototype, "email", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_pipe_1.Expose)(),
|
|
34
|
+
(0, class_pipe_1.IsString)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ScopeUserMapped.prototype, "imageUrl", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_pipe_1.Expose)(),
|
|
39
|
+
(0, class_pipe_1.IsBoolean)(),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], ScopeUserMapped.prototype, "active", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_pipe_1.Expose)(),
|
|
44
|
+
(0, class_pipe_1.IsBoolean)(),
|
|
45
|
+
(0, class_pipe_1.IsOptional)(),
|
|
46
|
+
__metadata("design:type", Boolean)
|
|
47
|
+
], ScopeUserMapped.prototype, "isScopeOwner", void 0);
|
|
48
|
+
//# sourceMappingURL=scope-user-mapped.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-user-mapped.js","sourceRoot":"./","sources":["access/models/scope-user-mapped.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+E;AAG/E,MAAa,eAAe;CA2B3B;AA3BD,0CA2BC;AAtBE;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;;2CACA;AAIX;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;;6CACE;AAIb;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;;8CACG;AAId;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;;iDACO;AAIlB;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,sBAAS,GAAE;;+CACK;AAKjB;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,sBAAS,GAAE;IACX,IAAA,uBAAU,GAAE;;qDACU"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IScopeAccess, IScopeGroup, IScopeUser } from "@rockster/common/access";
|
|
2
|
+
export declare class ScopeUser implements IScopeUser {
|
|
3
|
+
isOwner?: boolean;
|
|
4
|
+
userId: string;
|
|
5
|
+
contextName: string;
|
|
6
|
+
contextId?: string;
|
|
7
|
+
groups?: IScopeGroup[];
|
|
8
|
+
keys?: IScopeAccess[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.ScopeUser = void 0;
|
|
13
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
14
|
+
const scope_group_1 = require("../entities/scope-group");
|
|
15
|
+
const scope_access_1 = require("../entities/scope-access");
|
|
16
|
+
class ScopeUser {
|
|
17
|
+
}
|
|
18
|
+
exports.ScopeUser = ScopeUser;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_pipe_1.Expose)(),
|
|
21
|
+
(0, class_pipe_1.IsBoolean)(),
|
|
22
|
+
__metadata("design:type", Boolean)
|
|
23
|
+
], ScopeUser.prototype, "isOwner", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_pipe_1.Expose)(),
|
|
26
|
+
(0, class_pipe_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ScopeUser.prototype, "userId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_pipe_1.Expose)(),
|
|
31
|
+
(0, class_pipe_1.IsString)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], ScopeUser.prototype, "contextName", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_pipe_1.Expose)(),
|
|
36
|
+
(0, class_pipe_1.IsString)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], ScopeUser.prototype, "contextId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_pipe_1.Expose)(),
|
|
41
|
+
(0, class_pipe_1.IsArray)(),
|
|
42
|
+
(0, class_pipe_1.IsType)(() => scope_group_1.ScopeGroup),
|
|
43
|
+
__metadata("design:type", Array)
|
|
44
|
+
], ScopeUser.prototype, "groups", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_pipe_1.Expose)(),
|
|
47
|
+
(0, class_pipe_1.IsArray)(),
|
|
48
|
+
(0, class_pipe_1.IsType)(() => scope_access_1.ScopeAccess),
|
|
49
|
+
__metadata("design:type", Array)
|
|
50
|
+
], ScopeUser.prototype, "keys", void 0);
|
|
51
|
+
//# sourceMappingURL=scope-user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-user.js","sourceRoot":"./","sources":["access/models/scope-user.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAM8B;AAM9B,yDAAqD;AAErD,2DAAuD;AAEvD,MAAa,SAAS;CA2BrB;AA3BD,8BA2BC;AAvBE;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,sBAAS,GAAE;;0CACM;AAIlB;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;;yCACI;AAIf;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;;8CACS;AAIpB;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;;4CACQ;AAKnB;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,oBAAO,GAAE;IACT,IAAA,mBAAM,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;;yCACF;AAKvB;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,oBAAO,GAAE;IACT,IAAA,mBAAM,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC;;uCACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ScopeAccessProfileQuery: import("../../query/functions/create-query").QueryDecoratorFactory;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScopeAccessProfileQuery = void 0;
|
|
4
|
+
const create_query_1 = require("../../query/functions/create-query");
|
|
5
|
+
const scope_access_profile_1 = require("../entities/scope-access-profile");
|
|
6
|
+
exports.ScopeAccessProfileQuery = (0, create_query_1.createQuery)({
|
|
7
|
+
alias: "scopeAccessProfile",
|
|
8
|
+
target: () => scope_access_profile_1.ScopeAccessProfile,
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=scope-access-profile.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-access-profile.query.js","sourceRoot":"./","sources":["access/queries/scope-access-profile.query.ts"],"names":[],"mappings":";;;AAAA,qEAAiE;AACjE,2EAAsE;AAEzD,QAAA,uBAAuB,GAAG,IAAA,0BAAW,EAAC;IAChD,KAAK,EAAE,oBAAoB;IAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,yCAAkB;CAClC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ScopeGroupUserQuery: import("../../query/functions/create-query").QueryDecoratorFactory;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScopeGroupUserQuery = void 0;
|
|
4
|
+
const create_query_1 = require("../../query/functions/create-query");
|
|
5
|
+
const scope_group_user_1 = require("../entities/scope-group-user");
|
|
6
|
+
const env_1 = require("../env");
|
|
7
|
+
const scope_context_1 = require("../models/scope-context");
|
|
8
|
+
const scope_user_mapped_1 = require("../models/scope-user-mapped");
|
|
9
|
+
exports.ScopeGroupUserQuery = (0, create_query_1.createQuery)({
|
|
10
|
+
alias: 'scopeGroupUser',
|
|
11
|
+
target: () => scope_group_user_1.ScopeGroupUser,
|
|
12
|
+
context: () => scope_context_1.ScopeContext,
|
|
13
|
+
paths: {
|
|
14
|
+
user: (0, create_query_1.joinOne)({
|
|
15
|
+
alias: 'user',
|
|
16
|
+
target: () => scope_user_mapped_1.ScopeUserMapped,
|
|
17
|
+
condition: (queryBuilder, queryContent) => {
|
|
18
|
+
const contextId = queryContent.context.$contextId;
|
|
19
|
+
const contextName = queryContent.context.$contextName;
|
|
20
|
+
const service = env_1.env.scopeServiceRegistry.get(contextName);
|
|
21
|
+
return service.instance.joinUser('"scopeGroupUser"', contextId, queryBuilder);
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=scope-group-user.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-group-user.query.js","sourceRoot":"./","sources":["access/queries/scope-group-user.query.ts"],"names":[],"mappings":";;;AAAA,qEAA0E;AAC1E,mEAA8D;AAC9D,gCAA6B;AAC7B,2DAAuD;AACvD,mEAA8D;AAEjD,QAAA,mBAAmB,GAAG,IAAA,0BAAW,EAAC;IAC5C,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE,GAAG,EAAE,CAAC,iCAAc;IAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,4BAAY;IAC3B,KAAK,EAAE;QACJ,IAAI,EAAE,IAAA,sBAAO,EAAC;YACX,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,GAAG,EAAE,CAAC,mCAAe;YAC7B,SAAS,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,EAAE;gBACvC,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC;gBAClD,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC;gBACtD,MAAM,OAAO,GAAG,SAAG,CAAC,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;gBAC1D,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;YACjF,CAAC;SACH,CAAC;KACJ;CACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ScopeGroupQuery: import("../../query/functions/create-query").QueryDecoratorFactory;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScopeGroupQuery = void 0;
|
|
4
|
+
const create_query_1 = require("../../query/functions/create-query");
|
|
5
|
+
const scope_access_profile_1 = require("../entities/scope-access-profile");
|
|
6
|
+
const scope_group_1 = require("../entities/scope-group");
|
|
7
|
+
const scope_context_1 = require("../models/scope-context");
|
|
8
|
+
exports.ScopeGroupQuery = (0, create_query_1.createQuery)({
|
|
9
|
+
alias: "scopeGroup",
|
|
10
|
+
target: () => scope_group_1.ScopeGroup,
|
|
11
|
+
context: () => scope_context_1.ScopeContext,
|
|
12
|
+
paths: {
|
|
13
|
+
scopeAccessProfile: (0, create_query_1.joinOne)({
|
|
14
|
+
alias: "scopeAccessProfile",
|
|
15
|
+
target: () => scope_access_profile_1.ScopeAccessProfile,
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=scope-group.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-group.query.js","sourceRoot":"./","sources":["access/queries/scope-group.query.ts"],"names":[],"mappings":";;;AAAA,qEAA0E;AAC1E,2EAAsE;AACtE,yDAAqD;AACrD,2DAAuD;AAE1C,QAAA,eAAe,GAAG,IAAA,0BAAW,EAAC;IACxC,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC,wBAAU;IACxB,OAAO,EAAE,GAAG,EAAE,CAAC,4BAAY;IAC3B,KAAK,EAAE;QACJ,kBAAkB,EAAE,IAAA,sBAAO,EAAC;YACzB,KAAK,EAAE,oBAAoB;YAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,yCAAkB;SAClC,CAAC;KACJ;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './scope-access.service';
|
|
2
|
+
export * from './scope-access-profile.service';
|
|
3
|
+
export * from './scope-group-user.service';
|
|
4
|
+
export * from './scope-group.service';
|
|
5
|
+
export * from './scope-key.service';
|
|
6
|
+
export * from './scope-owner.service';
|
|
7
|
+
export * from './scope-service';
|
|
@@ -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.service"), exports);
|
|
18
|
+
__exportStar(require("./scope-access-profile.service"), exports);
|
|
19
|
+
__exportStar(require("./scope-group-user.service"), exports);
|
|
20
|
+
__exportStar(require("./scope-group.service"), exports);
|
|
21
|
+
__exportStar(require("./scope-key.service"), exports);
|
|
22
|
+
__exportStar(require("./scope-owner.service"), exports);
|
|
23
|
+
__exportStar(require("./scope-service"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"./","sources":["access/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,iEAA+C;AAC/C,6DAA2C;AAC3C,wDAAsC;AACtC,sDAAoC;AACpC,wDAAsC;AACtC,kDAAgC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IScopeAccessProfile, IScopeAccessProfileKey } from "@rockster/common/access";
|
|
2
|
+
import { RepositoryService } from "../../database/services/repository.service";
|
|
3
|
+
import { Repository } from "../../database/interfaces/repository";
|
|
4
|
+
import { ScopeKey } from "../entities/scope-key";
|
|
5
|
+
export declare class ScopeAccessProfileService extends RepositoryService<IScopeAccessProfile> {
|
|
6
|
+
protected repository: Repository<IScopeAccessProfile>;
|
|
7
|
+
protected profileKeyRepository: Repository<IScopeAccessProfileKey>;
|
|
8
|
+
protected scopeKeyRepository: Repository<ScopeKey>;
|
|
9
|
+
updateKeys(scopeAccessProfileId: string, keys: string[]): Promise<IScopeAccessProfileKey[]>;
|
|
10
|
+
getProfileKeys(scopeAccessProfileId: string): Promise<IScopeAccessProfileKey[]>;
|
|
11
|
+
/** Keys from the profile whose scope_key.context_name matches the given context. */
|
|
12
|
+
getKeysForContext(scopeAccessProfileId: string, contextName: string): Promise<string[]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.ScopeAccessProfileService = void 0;
|
|
13
|
+
const class_injector_1 = require("@rockster/class-injector");
|
|
14
|
+
const repository_service_1 = require("../../database/services/repository.service");
|
|
15
|
+
const inject_repository_decorator_1 = require("../../database/decorators/inject-repository.decorator");
|
|
16
|
+
const scope_access_profile_1 = require("../entities/scope-access-profile");
|
|
17
|
+
const scope_access_profile_key_1 = require("../entities/scope-access-profile-key");
|
|
18
|
+
const scope_key_1 = require("../entities/scope-key");
|
|
19
|
+
const generate_entity_id_1 = require("../../database/functions/generate-entity-id");
|
|
20
|
+
const normalize_scope_keys_1 = require("../functions/normalize-scope-keys");
|
|
21
|
+
let ScopeAccessProfileService = class ScopeAccessProfileService extends repository_service_1.RepositoryService {
|
|
22
|
+
async updateKeys(scopeAccessProfileId, keys) {
|
|
23
|
+
await this.profileKeyRepository.delete({ scopeAccessProfileId });
|
|
24
|
+
const validKeys = (0, normalize_scope_keys_1.normalizeScopeKeys)(keys);
|
|
25
|
+
if (!validKeys.length) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
const rows = validKeys.map((key) => ({
|
|
29
|
+
id: (0, generate_entity_id_1.generateEntityId)(scope_access_profile_key_1.ScopeAccessProfileKey),
|
|
30
|
+
scopeAccessProfileId,
|
|
31
|
+
key,
|
|
32
|
+
}));
|
|
33
|
+
return this.profileKeyRepository.save(rows);
|
|
34
|
+
}
|
|
35
|
+
async getProfileKeys(scopeAccessProfileId) {
|
|
36
|
+
return this.profileKeyRepository.find({
|
|
37
|
+
where: { scopeAccessProfileId },
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** Keys from the profile whose scope_key.context_name matches the given context. */
|
|
41
|
+
async getKeysForContext(scopeAccessProfileId, contextName) {
|
|
42
|
+
const profileKeys = await this.getProfileKeys(scopeAccessProfileId);
|
|
43
|
+
if (!profileKeys.length) {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
const keyNames = profileKeys
|
|
47
|
+
.map((row) => row.key)
|
|
48
|
+
.filter((key) => Boolean(key));
|
|
49
|
+
if (!keyNames.length) {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
const scopeKeys = await this.scopeKeyRepository.find({
|
|
53
|
+
where: { contextName },
|
|
54
|
+
});
|
|
55
|
+
const allowed = new Set(scopeKeys.map((row) => row.name));
|
|
56
|
+
return (0, normalize_scope_keys_1.normalizeScopeKeys)(keyNames.filter((key) => allowed.has(key)));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.ScopeAccessProfileService = ScopeAccessProfileService;
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, inject_repository_decorator_1.InjectRepository)(() => scope_access_profile_1.ScopeAccessProfile),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], ScopeAccessProfileService.prototype, "repository", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, inject_repository_decorator_1.InjectRepository)(() => scope_access_profile_key_1.ScopeAccessProfileKey),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], ScopeAccessProfileService.prototype, "profileKeyRepository", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, inject_repository_decorator_1.InjectRepository)(() => scope_key_1.ScopeKey),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], ScopeAccessProfileService.prototype, "scopeKeyRepository", void 0);
|
|
72
|
+
exports.ScopeAccessProfileService = ScopeAccessProfileService = __decorate([
|
|
73
|
+
(0, class_injector_1.Injectable)()
|
|
74
|
+
], ScopeAccessProfileService);
|
|
75
|
+
//# sourceMappingURL=scope-access-profile.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-access-profile.service.js","sourceRoot":"./","sources":["access/services/scope-access-profile.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAAsD;AAKtD,mFAA+E;AAC/E,uGAAyF;AAEzF,2EAAsE;AACtE,mFAA6E;AAC7E,qDAAiD;AACjD,oFAA+E;AAC/E,4EAAuE;AAGhE,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,sCAAsC;IAWlF,KAAK,CAAC,UAAU,CAAC,oBAA4B,EAAE,IAAc;QAC1D,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAAC;QAEjE,MAAM,SAAS,GAAG,IAAA,yCAAkB,EAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;YACrB,OAAO,EAAE,CAAC;QACb,CAAC;QAED,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAClC,EAAE,EAAE,IAAA,qCAAgB,EAAC,gDAAqB,CAAC;YAC3C,oBAAoB;YACpB,GAAG;SACsB,CAAA,CAAC,CAAC;QAE9B,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,oBAA4B;QAC9C,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC;YACnC,KAAK,EAAE,EAAE,oBAAoB,EAAE;SACjC,CAAC,CAAC;IACN,CAAC;IAED,oFAAoF;IACpF,KAAK,CAAC,iBAAiB,CAAC,oBAA4B,EAAE,WAAmB;QACtE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC;QACpE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;YACvB,OAAO,EAAc,CAAC;QACzB,CAAC;QAED,MAAM,QAAQ,GAAG,WAAW;aACxB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;aACrB,MAAM,CAAC,CAAC,GAAG,EAAiB,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;QAEjD,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACpB,OAAO,EAAE,CAAC;QACb,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAClD,KAAK,EAAE,EAAE,WAAW,EAAE;SACxB,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,OAAO,IAAA,yCAAkB,EAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;CACH,CAAA;AAzDY,8DAAyB;AAGzB;IADT,IAAA,8CAAgB,EAAC,GAAG,EAAE,CAAC,yCAAkB,CAAC;;6DACW;AAG5C;IADT,IAAA,8CAAgB,EAAC,GAAG,EAAE,CAAC,gDAAqB,CAAC;;uEACqB;AAGzD;IADT,IAAA,8CAAgB,EAAC,GAAG,EAAE,CAAC,oBAAQ,CAAC;;qEACkB;oCATzC,yBAAyB;IADrC,IAAA,2BAAU,GAAE;GACA,yBAAyB,CAyDrC"}
|